Skip to content

Latest commit

 

History

History
406 lines (258 loc) · 14.3 KB

SubscriptionsApi.md

File metadata and controls

406 lines (258 loc) · 14.3 KB

BillaBear{{classname}}

All URIs are relative to https://{customerId}.billabear.cloud/api/v1

Method HTTP request Description
AddSeatsSubscriptions Post /subscription/{subscriptionId}/seats/add Add Seats
CancelSubscription Post /subscription/{subscriptionId}/cancel Cancel Subscription
ChangeSubscriptionPrice Post /subscription/{subscriptionId}/price Change Price
CreateSubscription Post /customer/{customerId}/subscription/start Create Subscription
CustomerChangeSubscriptionPlan Post /subscription/{subscriptionId}/plan Change Subscription Plan
ExtendTrial Post /subscription/{subscriptionId}/extend Extend Trial Subscription
GetActiveForCustomer Get /customer/{customerId}/subscription/active List Customer Active Subscriptions
GetForCustomer Get /customer/{customerId}/subscription List Customer Subscriptions
ListSubscriptionPlans Get /subscription/plans List Subscription Plans
ListSubscriptions Get /subscription List
RemoveSeatsSubscriptions Post /subscription/{subscriptionId}/seats/remove Remove Seats
ShowSubscriptionById Get /subscription/{subscriptionId} Detail
StartTrial Post /customer/{customerId}/subscription/trial Start Trial Subscription For Customer

AddSeatsSubscriptions

InlineResponse20011 AddSeatsSubscriptions(ctx, body, subscriptionId) Add Seats

Adds seats to a per seat subscription

Since 1.1.4

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body SeatsAddBody
subscriptionId string The id of the subscription to retrieve

Return type

InlineResponse20011

Authorization

ApiKeyAuth

HTTP request headers

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

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

CancelSubscription

string CancelSubscription(ctx, body, subscriptionId) Cancel Subscription

Info for a specific subscription

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body SubscriptionIdCancelBody
subscriptionId string The id of the subscription to retrieve

Return type

string

Authorization

ApiKeyAuth

HTTP request headers

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

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

ChangeSubscriptionPrice

InlineResponse20011 ChangeSubscriptionPrice(ctx, body, subscriptionId) Change Price

Changes the price being used for a price. Useful for changing pricing schedule or just price.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body SubscriptionIdPriceBody
subscriptionId string The id of the subscription to retrieve

Return type

InlineResponse20011

Authorization

ApiKeyAuth

HTTP request headers

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

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

CreateSubscription

Subscription CreateSubscription(ctx, body, customerId) Create Subscription

Create subscription for a customer

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body SubscriptionStartBody
customerId string The id of the customer to retrieve

Return type

Subscription

Authorization

ApiKeyAuth

HTTP request headers

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

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

CustomerChangeSubscriptionPlan

Subscription CustomerChangeSubscriptionPlan(ctx, body, subscriptionId) Change Subscription Plan

Change the subscription plan for a customer

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body SubscriptionIdPlanBody
subscriptionId string The id of the subscription to retrieve

Return type

Subscription

Authorization

ApiKeyAuth

HTTP request headers

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

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

ExtendTrial

Subscription ExtendTrial(ctx, body, subscriptionId) Extend Trial Subscription

Extend a trial subscription so it's converted from a trial to a normal subscription.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body SubscriptionIdExtendBody
subscriptionId string The id of the subscription to retrieve

Return type

Subscription

Authorization

ApiKeyAuth

HTTP request headers

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

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

GetActiveForCustomer

InlineResponse2006 GetActiveForCustomer(ctx, customerId) List Customer Active Subscriptions

List all Active customer subscriptions

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
customerId string The id of the customer to retrieve

Return type

InlineResponse2006

Authorization

ApiKeyAuth

HTTP request headers

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

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

GetForCustomer

InlineResponse2006 GetForCustomer(ctx, customerId) List Customer Subscriptions

List all customer subscriptions

Since 1.1

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
customerId string The id of the customer to retrieve

Return type

InlineResponse2006

Authorization

ApiKeyAuth

HTTP request headers

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

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

ListSubscriptionPlans

InlineResponse20010 ListSubscriptionPlans(ctx, optional) List Subscription Plans

List all subscriptions plans

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *SubscriptionsApiListSubscriptionPlansOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a SubscriptionsApiListSubscriptionPlansOpts struct

Name Type Description Notes
limit optional.Int32 How many items to return at one time (max 100)
lastKey optional.String The key to be used in pagination to say what the last key of the previous page was

Return type

InlineResponse20010

Authorization

ApiKeyAuth

HTTP request headers

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

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

ListSubscriptions

InlineResponse2006 ListSubscriptions(ctx, optional) List

List all subscriptions

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *SubscriptionsApiListSubscriptionsOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a SubscriptionsApiListSubscriptionsOpts struct

Name Type Description Notes
limit optional.Int32 How many items to return at one time (max 100)
lastKey optional.String The key to be used in pagination to say what the last key of the previous page was

Return type

InlineResponse2006

Authorization

ApiKeyAuth

HTTP request headers

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

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

RemoveSeatsSubscriptions

InlineResponse20011 RemoveSeatsSubscriptions(ctx, body, subscriptionId) Remove Seats

Remove seats to a per seat subscription

Since 1.1.4

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body SeatsRemoveBody
subscriptionId string The id of the subscription to retrieve

Return type

InlineResponse20011

Authorization

ApiKeyAuth

HTTP request headers

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

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

ShowSubscriptionById

Subscription ShowSubscriptionById(ctx, subscriptionId) Detail

Info for a specific subscription

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
subscriptionId string The id of the subscription to retrieve

Return type

Subscription

Authorization

ApiKeyAuth

HTTP request headers

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

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

StartTrial

Subscription StartTrial(ctx, body, customerId) Start Trial Subscription For Customer

Start subscription for a customer

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body SubscriptionTrialBody
customerId string The id of the customer to retrieve

Return type

Subscription

Authorization

ApiKeyAuth

HTTP request headers

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

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