All URIs are relative to https://{customerId}.billabear.cloud/api/v1
Method | HTTP request | Description |
---|---|---|
add_seats_subscriptions | POST /subscription/{subscriptionId}/seats/add | Add Seats |
cancel_subscription | POST /subscription/{subscriptionId}/cancel | Cancel Subscription |
change_subscription_price | POST /subscription/{subscriptionId}/price | Change Price |
create_subscription | POST /customer/{customerId}/subscription/start | Create Subscription |
customer_change_subscription_plan | POST /subscription/{subscriptionId}/plan | Change Subscription Plan |
extend_trial | POST /subscription/{subscriptionId}/extend | Extend Trial Subscription |
get_active_for_customer | GET /customer/{customerId}/subscription/active | List Customer Active Subscriptions |
get_for_customer | GET /customer/{customerId}/subscription | List Customer Subscriptions |
list_subscription_plans | GET /subscription/plans | List Subscription Plans |
list_subscriptions | GET /subscription | List |
remove_seats_subscriptions | POST /subscription/{subscriptionId}/seats/remove | Remove Seats |
show_subscription_by_id | GET /subscription/{subscriptionId} | Detail |
start_trial | POST /customer/{customerId}/subscription/trial | Start Trial Subscription For Customer |
InlineResponse20011 add_seats_subscriptions(bodysubscription_id)
Add Seats
Adds seats to a per seat subscription
Since 1.1.4
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = SwaggerClient::SubscriptionsApi.new
body = SwaggerClient::SeatsAddBody.new # SeatsAddBody |
subscription_id = 'subscription_id_example' # String | The id of the subscription to retrieve
begin
#Add Seats
result = api_instance.add_seats_subscriptions(bodysubscription_id)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling SubscriptionsApi->add_seats_subscriptions: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | SeatsAddBody | ||
subscription_id | String | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
String cancel_subscription(bodysubscription_id)
Cancel Subscription
Info for a specific subscription
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = SwaggerClient::SubscriptionsApi.new
body = SwaggerClient::SubscriptionIdCancelBody.new # SubscriptionIdCancelBody |
subscription_id = 'subscription_id_example' # String | The id of the subscription to retrieve
begin
#Cancel Subscription
result = api_instance.cancel_subscription(bodysubscription_id)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling SubscriptionsApi->cancel_subscription: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | SubscriptionIdCancelBody | ||
subscription_id | String | The id of the subscription to retrieve |
String
- Content-Type: application/json
- Accept: application/json
InlineResponse20011 change_subscription_price(bodysubscription_id)
Change Price
Changes the price being used for a price. Useful for changing pricing schedule or just price.
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = SwaggerClient::SubscriptionsApi.new
body = SwaggerClient::SubscriptionIdPriceBody.new # SubscriptionIdPriceBody |
subscription_id = 'subscription_id_example' # String | The id of the subscription to retrieve
begin
#Change Price
result = api_instance.change_subscription_price(bodysubscription_id)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling SubscriptionsApi->change_subscription_price: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | SubscriptionIdPriceBody | ||
subscription_id | String | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
Subscription create_subscription(bodycustomer_id)
Create Subscription
Create subscription for a customer
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = SwaggerClient::SubscriptionsApi.new
body = SwaggerClient::SubscriptionStartBody.new # SubscriptionStartBody |
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
begin
#Create Subscription
result = api_instance.create_subscription(bodycustomer_id)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling SubscriptionsApi->create_subscription: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | SubscriptionStartBody | ||
customer_id | String | The id of the customer to retrieve |
- Content-Type: application/json
- Accept: application/json
Subscription customer_change_subscription_plan(bodysubscription_id)
Change Subscription Plan
Change the subscription plan for a customer
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = SwaggerClient::SubscriptionsApi.new
body = SwaggerClient::SubscriptionIdPlanBody.new # SubscriptionIdPlanBody |
subscription_id = 'subscription_id_example' # String | The id of the subscription to retrieve
begin
#Change Subscription Plan
result = api_instance.customer_change_subscription_plan(bodysubscription_id)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling SubscriptionsApi->customer_change_subscription_plan: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | SubscriptionIdPlanBody | ||
subscription_id | String | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
Subscription extend_trial(bodysubscription_id)
Extend Trial Subscription
Extend a trial subscription so it's converted from a trial to a normal subscription.
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = SwaggerClient::SubscriptionsApi.new
body = SwaggerClient::SubscriptionIdExtendBody.new # SubscriptionIdExtendBody |
subscription_id = 'subscription_id_example' # String | The id of the subscription to retrieve
begin
#Extend Trial Subscription
result = api_instance.extend_trial(bodysubscription_id)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling SubscriptionsApi->extend_trial: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | SubscriptionIdExtendBody | ||
subscription_id | String | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
InlineResponse2006 get_active_for_customer(customer_id)
List Customer Active Subscriptions
List all Active customer subscriptions
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = SwaggerClient::SubscriptionsApi.new
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
begin
#List Customer Active Subscriptions
result = api_instance.get_active_for_customer(customer_id)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling SubscriptionsApi->get_active_for_customer: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
customer_id | String | The id of the customer to retrieve |
- Content-Type: Not defined
- Accept: application/json
InlineResponse2006 get_for_customer(customer_id)
List Customer Subscriptions
List all customer subscriptions
Since 1.1
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = SwaggerClient::SubscriptionsApi.new
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
begin
#List Customer Subscriptions
result = api_instance.get_for_customer(customer_id)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling SubscriptionsApi->get_for_customer: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
customer_id | String | The id of the customer to retrieve |
- Content-Type: Not defined
- Accept: application/json
InlineResponse20010 list_subscription_plans(opts)
List Subscription Plans
List all subscriptions plans
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = SwaggerClient::SubscriptionsApi.new
opts = {
limit: 56, # Integer | How many items to return at one time (max 100)
last_key: 'last_key_example' # String | The key to be used in pagination to say what the last key of the previous page was
}
begin
#List Subscription Plans
result = api_instance.list_subscription_plans(opts)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling SubscriptionsApi->list_subscription_plans: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
limit | Integer | How many items to return at one time (max 100) | [optional] |
last_key | String | The key to be used in pagination to say what the last key of the previous page was | [optional] |
- Content-Type: Not defined
- Accept: application/json
InlineResponse2006 list_subscriptions(opts)
List
List all subscriptions
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = SwaggerClient::SubscriptionsApi.new
opts = {
limit: 56, # Integer | How many items to return at one time (max 100)
last_key: 'last_key_example' # String | The key to be used in pagination to say what the last key of the previous page was
}
begin
#List
result = api_instance.list_subscriptions(opts)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling SubscriptionsApi->list_subscriptions: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
limit | Integer | How many items to return at one time (max 100) | [optional] |
last_key | String | The key to be used in pagination to say what the last key of the previous page was | [optional] |
- Content-Type: Not defined
- Accept: application/json
InlineResponse20011 remove_seats_subscriptions(bodysubscription_id)
Remove Seats
Remove seats to a per seat subscription
Since 1.1.4
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = SwaggerClient::SubscriptionsApi.new
body = SwaggerClient::SeatsRemoveBody.new # SeatsRemoveBody |
subscription_id = 'subscription_id_example' # String | The id of the subscription to retrieve
begin
#Remove Seats
result = api_instance.remove_seats_subscriptions(bodysubscription_id)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling SubscriptionsApi->remove_seats_subscriptions: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | SeatsRemoveBody | ||
subscription_id | String | The id of the subscription to retrieve |
- Content-Type: application/json
- Accept: application/json
Subscription show_subscription_by_id(subscription_id)
Detail
Info for a specific subscription
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = SwaggerClient::SubscriptionsApi.new
subscription_id = 'subscription_id_example' # String | The id of the subscription to retrieve
begin
#Detail
result = api_instance.show_subscription_by_id(subscription_id)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling SubscriptionsApi->show_subscription_by_id: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
subscription_id | String | The id of the subscription to retrieve |
- Content-Type: Not defined
- Accept: application/json
Subscription start_trial(bodycustomer_id)
Start Trial Subscription For Customer
Start subscription for a customer
# load the gem
require 'swagger_client'
# setup authorization
SwaggerClient.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['X-API-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['X-API-Key'] = 'Bearer'
end
api_instance = SwaggerClient::SubscriptionsApi.new
body = SwaggerClient::SubscriptionTrialBody.new # SubscriptionTrialBody |
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
begin
#Start Trial Subscription For Customer
result = api_instance.start_trial(bodycustomer_id)
p result
rescue SwaggerClient::ApiError => e
puts "Exception when calling SubscriptionsApi->start_trial: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | SubscriptionTrialBody | ||
customer_id | String | The id of the customer to retrieve |
- Content-Type: application/json
- Accept: application/json