Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Latest commit

 

History

History
228 lines (126 loc) · 6.66 KB

CustomersApi.md

File metadata and controls

228 lines (126 loc) · 6.66 KB

\CustomersApi

All URIs are relative to https://api.getlago.com/api/v1

Method HTTP request Description
create_customer POST /customers Create a customer
delete_applied_coupon DELETE /customers/{customer_external_id}/applied_coupons/{applied_coupon_id} Delete customer's appplied coupon
destroy_customer DELETE /customers/{external_id} Delete a customer
find_all_customers GET /customers Find customers
find_customer GET /customers/{external_id} Find customer by external ID
find_customer_current_usage GET /customers/{customer_external_id}/current_usage Find customer current usage
get_customer_portal_url GET /customers/{customer_external_id}/portal_url Get customer portal URL

create_customer

crate::models::Customer create_customer(customer_input) Create a customer

Create a new customer

Parameters

Name Type Description Required Notes
customer_input CustomerInput Customer payload [required]

Return type

crate::models::Customer

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_applied_coupon

crate::models::AppliedCoupon delete_applied_coupon(customer_external_id, applied_coupon_id) Delete customer's appplied coupon

Delete customer's appplied coupon

Parameters

Name Type Description Required Notes
customer_external_id String External ID of the existing customer [required]
applied_coupon_id String Applied Coupon Lago ID [required]

Return type

crate::models::AppliedCoupon

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

destroy_customer

crate::models::Customer destroy_customer(external_id) Delete a customer

Return the deleted customer

Parameters

Name Type Description Required Notes
external_id String External ID of the existing customer [required]

Return type

crate::models::Customer

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

find_all_customers

crate::models::CustomersPaginated find_all_customers(page, per_page) Find customers

Find all customers in certain organisation

Parameters

Name Type Description Required Notes
page Option<i32> Number of page
per_page Option<i32> Number of records per page

Return type

crate::models::CustomersPaginated

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

find_customer

crate::models::Customer find_customer(external_id) Find customer by external ID

Return a single customer

Parameters

Name Type Description Required Notes
external_id String External ID of the existing customer [required]

Return type

crate::models::Customer

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

find_customer_current_usage

crate::models::CustomerUsage find_customer_current_usage(customer_external_id, external_subscription_id) Find customer current usage

Return a customer current usage

Parameters

Name Type Description Required Notes
customer_external_id String External ID of the existing customer [required]
external_subscription_id String External subscription ID [required]

Return type

crate::models::CustomerUsage

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_customer_portal_url

crate::models::GetCustomerPortalUrl200Response get_customer_portal_url(customer_external_id) Get customer portal URL

Get customer portal URL

Parameters

Name Type Description Required Notes
customer_external_id String External ID of the existing customer [required]

Return type

crate::models::GetCustomerPortalUrl200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]