All URIs are relative to https://api.getlago.com/api/v1
Method | HTTP request | Description |
---|---|---|
create_subscription | POST /subscriptions | Assign a plan to a customer |
destroy_subscription | DELETE /subscriptions/{external_id} | Terminate a subscription |
find_all_subscriptions | GET /subscriptions | Find subscriptions |
update_subscription | PUT /subscriptions/{external_id} | Update an existing subscription |
crate::models::Subscription create_subscription(subscription_create_input) Assign a plan to a customer
Assign a plan to a customer
Name | Type | Description | Required | Notes |
---|---|---|---|---|
subscription_create_input | SubscriptionCreateInput | Subscription payload | [required] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
crate::models::Subscription destroy_subscription(external_id) Terminate a subscription
Terminate a subscription
Name | Type | Description | Required | Notes |
---|---|---|---|---|
external_id | String | External ID of the existing subscription | [required] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
crate::models::SubscriptionsPaginated find_all_subscriptions(page, per_page, external_customer_id, plan_code) Find subscriptions
Find all suscriptions for certain customer
Name | Type | Description | Required | Notes |
---|---|---|---|---|
page | Option<i32> | Number of page | ||
per_page | Option<i32> | Number of records per page | ||
external_customer_id | Option<String> | External customer ID | ||
plan_code | Option<String> | Code of the plan attached to the subscription |
crate::models::SubscriptionsPaginated
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
crate::models::Subscription update_subscription(external_id, subscription_update_input) Update an existing subscription
Update an existing subscription by external ID
Name | Type | Description | Required | Notes |
---|---|---|---|---|
external_id | String | External ID of the existing subscription | [required] | |
subscription_update_input | SubscriptionUpdateInput | Update an existing subscription | [required] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]