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

Latest commit

 

History

History
136 lines (76 loc) · 4.2 KB

SubscriptionsApi.md

File metadata and controls

136 lines (76 loc) · 4.2 KB

\SubscriptionsApi

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

create_subscription

crate::models::Subscription create_subscription(subscription_create_input) Assign a plan to a customer

Assign a plan to a customer

Parameters

Name Type Description Required Notes
subscription_create_input SubscriptionCreateInput Subscription payload [required]

Return type

crate::models::Subscription

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]

destroy_subscription

crate::models::Subscription destroy_subscription(external_id) Terminate a subscription

Terminate a subscription

Parameters

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

Return type

crate::models::Subscription

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_subscriptions

crate::models::SubscriptionsPaginated find_all_subscriptions(page, per_page, external_customer_id, plan_code) Find subscriptions

Find all suscriptions for certain customer

Parameters

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

Return type

crate::models::SubscriptionsPaginated

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]

update_subscription

crate::models::Subscription update_subscription(external_id, subscription_update_input) Update an existing subscription

Update an existing subscription by external ID

Parameters

Name Type Description Required Notes
external_id String External ID of the existing subscription [required]
subscription_update_input SubscriptionUpdateInput Update an existing subscription [required]

Return type

crate::models::Subscription

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]