billabear 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +509 -364
- data/billabear.gemspec +4 -4
- data/docs/Address.md +1 -1
- data/docs/BillingAdmin.md +1 -1
- data/docs/CheckoutApi.md +6 -6
- data/docs/CheckoutBody.md +1 -1
- data/docs/CheckoutItems.md +1 -1
- data/docs/CheckoutSubscriptions.md +1 -1
- data/docs/Cost.md +8 -0
- data/docs/Customer.md +3 -1
- data/docs/CustomerIdUasgelimitBody.md +8 -0
- data/docs/CustomersApi.md +319 -101
- data/docs/Error.md +1 -1
- data/docs/Event.md +11 -0
- data/docs/Feature.md +1 -1
- data/docs/FrontendToken.md +1 -1
- data/docs/InlineResponse200.md +1 -1
- data/docs/InlineResponse2001.md +3 -4
- data/docs/InlineResponse20010.md +2 -2
- data/docs/InlineResponse20011.md +4 -2
- data/docs/InlineResponse20012.md +4 -3
- data/docs/InlineResponse20013.md +7 -0
- data/docs/InlineResponse20014.md +8 -0
- data/docs/InlineResponse2002.md +4 -4
- data/docs/InlineResponse2003.md +2 -2
- data/docs/InlineResponse2004.md +2 -2
- data/docs/InlineResponse2005.md +2 -2
- data/docs/InlineResponse2006.md +2 -2
- data/docs/InlineResponse2007.md +2 -2
- data/docs/InlineResponse2008.md +2 -2
- data/docs/InlineResponse2009.md +2 -2
- data/docs/{InlineResponse2007Data.md → InlineResponse2009Data.md} +2 -2
- data/docs/{InlineResponse2007Receipts.md → InlineResponse2009Receipts.md} +1 -1
- data/docs/InlineResponse201.md +1 -1
- data/docs/InlineResponse201Lines.md +1 -1
- data/docs/InlineResponse400.md +1 -1
- data/docs/Invoice.md +1 -1
- data/docs/InvoiceLines.md +1 -1
- data/docs/InvoicesApi.md +17 -17
- data/docs/IssueRefundPayment.md +1 -1
- data/docs/Limit.md +1 -1
- data/docs/Metric.md +12 -0
- data/docs/MetricCost.md +10 -0
- data/docs/MetricFilter.md +11 -0
- data/docs/PaymentDetails.md +1 -1
- data/docs/PaymentDetailsApi.md +48 -52
- data/docs/PaymentsApi.md +41 -42
- data/docs/Price.md +2 -1
- data/docs/PricesApi.md +15 -16
- data/docs/Product.md +1 -1
- data/docs/ProductTaxType.md +1 -1
- data/docs/ProductsApi.md +23 -24
- data/docs/ReceiptApi.md +5 -5
- data/docs/Refund.md +1 -1
- data/docs/RefundsApi.md +17 -17
- data/docs/SeatsAddBody.md +1 -1
- data/docs/SeatsRemoveBody.md +1 -1
- data/docs/Subscription.md +2 -1
- data/docs/SubscriptionIdCancelBody.md +1 -1
- data/docs/SubscriptionIdExtendBody.md +1 -1
- data/docs/SubscriptionIdPlanBody.md +2 -2
- data/docs/SubscriptionIdPriceBody.md +1 -1
- data/docs/SubscriptionPlan.md +1 -1
- data/docs/SubscriptionStartBody.md +2 -1
- data/docs/SubscriptionTrialBody.md +1 -1
- data/docs/SubscriptionsApi.md +78 -79
- data/docs/UsageApi.md +279 -0
- data/docs/UsageLimit.md +9 -0
- data/docs/VoucherCode.md +1 -1
- data/git_push.sh +2 -2
- data/lib/{swagger_client → billabear}/api/checkout_api.rb +3 -3
- data/lib/{swagger_client → billabear}/api/customers_api.rb +284 -45
- data/lib/{swagger_client → billabear}/api/invoices_api.rb +9 -9
- data/lib/{swagger_client → billabear}/api/payment_details_api.rb +26 -26
- data/lib/{swagger_client → billabear}/api/payments_api.rb +20 -20
- data/lib/{swagger_client → billabear}/api/prices_api.rb +11 -11
- data/lib/{swagger_client → billabear}/api/products_api.rb +11 -11
- data/lib/{swagger_client → billabear}/api/receipt_api.rb +3 -3
- data/lib/{swagger_client → billabear}/api/refunds_api.rb +9 -9
- data/lib/{swagger_client → billabear}/api/subscriptions_api.rb +29 -29
- data/lib/billabear/api/usage_api.rb +314 -0
- data/lib/{swagger_client → billabear}/api_client.rb +4 -4
- data/lib/{swagger_client → billabear}/api_error.rb +3 -3
- data/lib/{swagger_client → billabear}/configuration.rb +3 -3
- data/lib/{swagger_client → billabear}/models/address.rb +6 -6
- data/lib/{swagger_client → billabear}/models/billing_admin.rb +6 -6
- data/lib/{swagger_client → billabear}/models/checkout_body.rb +6 -6
- data/lib/{swagger_client → billabear}/models/checkout_items.rb +6 -6
- data/lib/{swagger_client → billabear}/models/checkout_subscriptions.rb +6 -6
- data/lib/billabear/models/cost.rb +215 -0
- data/lib/{swagger_client → billabear}/models/customer.rb +45 -11
- data/lib/billabear/models/customer_id_uasgelimit_body.rb +259 -0
- data/lib/{swagger_client → billabear}/models/error.rb +6 -6
- data/lib/billabear/models/event.rb +262 -0
- data/lib/{swagger_client → billabear}/models/feature.rb +6 -6
- data/lib/{swagger_client → billabear}/models/frontend_token.rb +6 -6
- data/lib/{swagger_client → billabear}/models/inline_response_200.rb +6 -6
- data/lib/billabear/models/inline_response_200_1.rb +217 -0
- data/lib/{swagger_client → billabear}/models/inline_response_200_10.rb +6 -6
- data/lib/{swagger_client/models/inline_response_200_2.rb → billabear/models/inline_response_200_11.rb} +7 -7
- data/lib/billabear/models/inline_response_200_12.rb +226 -0
- data/lib/{swagger_client/models/inline_response_200_11.rb → billabear/models/inline_response_200_13.rb} +7 -7
- data/lib/{swagger_client/models/inline_response_200_12.rb → billabear/models/inline_response_200_14.rb} +7 -7
- data/lib/{swagger_client/models/inline_response_200_1.rb → billabear/models/inline_response_200_2.rb} +7 -7
- data/lib/{swagger_client → billabear}/models/inline_response_200_3.rb +6 -6
- data/lib/{swagger_client → billabear}/models/inline_response_200_4.rb +6 -6
- data/lib/{swagger_client → billabear}/models/inline_response_200_5.rb +6 -6
- data/lib/{swagger_client → billabear}/models/inline_response_200_6.rb +6 -6
- data/lib/{swagger_client → billabear}/models/inline_response_200_7.rb +6 -6
- data/lib/{swagger_client → billabear}/models/inline_response_200_8.rb +6 -6
- data/lib/{swagger_client → billabear}/models/inline_response_200_9.rb +6 -6
- data/lib/{swagger_client/models/inline_response_200_7_data.rb → billabear/models/inline_response_200_9_data.rb} +7 -7
- data/lib/{swagger_client/models/inline_response_200_7_receipts.rb → billabear/models/inline_response_200_9_receipts.rb} +7 -7
- data/lib/{swagger_client → billabear}/models/inline_response_201.rb +6 -6
- data/lib/{swagger_client → billabear}/models/inline_response_201_lines.rb +6 -6
- data/lib/{swagger_client → billabear}/models/inline_response_400.rb +6 -6
- data/lib/{swagger_client → billabear}/models/invoice.rb +6 -6
- data/lib/{swagger_client → billabear}/models/invoice_lines.rb +6 -6
- data/lib/{swagger_client → billabear}/models/issue_refund_payment.rb +6 -6
- data/lib/{swagger_client → billabear}/models/limit.rb +6 -6
- data/lib/billabear/models/metric.rb +288 -0
- data/lib/billabear/models/metric_cost.rb +234 -0
- data/lib/billabear/models/metric_filter.rb +276 -0
- data/lib/{swagger_client → billabear}/models/payment_details.rb +6 -6
- data/lib/{swagger_client → billabear}/models/price.rb +20 -11
- data/lib/{swagger_client → billabear}/models/product.rb +6 -6
- data/lib/{swagger_client → billabear}/models/product_tax_type.rb +6 -6
- data/lib/{swagger_client → billabear}/models/refund.rb +6 -6
- data/lib/{swagger_client → billabear}/models/seats_add_body.rb +6 -6
- data/lib/{swagger_client → billabear}/models/seats_remove_body.rb +6 -6
- data/lib/{swagger_client → billabear}/models/subscription.rb +16 -7
- data/lib/{swagger_client → billabear}/models/subscription_id_cancel_body.rb +6 -6
- data/lib/{swagger_client → billabear}/models/subscription_id_extend_body.rb +6 -6
- data/lib/{swagger_client → billabear}/models/subscription_id_plan_body.rb +11 -6
- data/lib/{swagger_client → billabear}/models/subscription_id_price_body.rb +6 -6
- data/lib/{swagger_client → billabear}/models/subscription_plan.rb +6 -6
- data/lib/{swagger_client → billabear}/models/subscription_start_body.rb +20 -10
- data/lib/{swagger_client → billabear}/models/subscription_trial_body.rb +6 -6
- data/lib/billabear/models/usage_limit.rb +258 -0
- data/lib/{swagger_client → billabear}/models/voucher_code.rb +6 -6
- data/lib/{swagger_client → billabear}/version.rb +4 -4
- data/lib/billabear.rb +105 -0
- data/spec/api/checkout_api_spec.rb +5 -5
- data/spec/api/customers_api_spec.rb +68 -17
- data/spec/api/invoices_api_spec.rb +7 -7
- data/spec/api/payment_details_api_spec.rb +10 -10
- data/spec/api/payments_api_spec.rb +10 -10
- data/spec/api/prices_api_spec.rb +7 -7
- data/spec/api/products_api_spec.rb +7 -7
- data/spec/api/receipt_api_spec.rb +5 -5
- data/spec/api/refunds_api_spec.rb +7 -7
- data/spec/api/subscriptions_api_spec.rb +13 -13
- data/spec/api/usage_api_spec.rb +96 -0
- data/spec/api_client_spec.rb +31 -31
- data/spec/configuration_spec.rb +5 -5
- data/spec/models/address_spec.rb +5 -5
- data/spec/models/billing_admin_spec.rb +5 -5
- data/spec/models/checkout_body_spec.rb +5 -5
- data/spec/models/checkout_items_spec.rb +5 -5
- data/spec/models/checkout_subscriptions_spec.rb +5 -5
- data/spec/models/cost_spec.rb +46 -0
- data/spec/models/customer_id_uasgelimit_body_spec.rb +50 -0
- data/spec/models/customer_spec.rb +21 -5
- data/spec/models/error_spec.rb +5 -5
- data/spec/models/event_spec.rb +64 -0
- data/spec/models/feature_spec.rb +5 -5
- data/spec/models/frontend_token_spec.rb +5 -5
- data/spec/models/inline_response_200_10_spec.rb +5 -5
- data/spec/models/inline_response_200_11_spec.rb +18 -6
- data/spec/models/inline_response_200_12_spec.rb +13 -11
- data/spec/models/inline_response_200_13_spec.rb +40 -0
- data/spec/models/inline_response_200_14_spec.rb +50 -0
- data/spec/models/inline_response_200_1_spec.rb +7 -13
- data/spec/models/inline_response_200_2_spec.rb +8 -8
- data/spec/models/inline_response_200_3_spec.rb +5 -5
- data/spec/models/inline_response_200_4_spec.rb +5 -5
- data/spec/models/inline_response_200_5_spec.rb +5 -5
- data/spec/models/inline_response_200_6_spec.rb +5 -5
- data/spec/models/inline_response_200_7_spec.rb +5 -5
- data/spec/models/inline_response_200_8_spec.rb +5 -5
- data/spec/models/{inline_response_200_7_data_spec.rb → inline_response_200_9_data_spec.rb} +8 -8
- data/spec/models/{inline_response_200_7_receipts_spec.rb → inline_response_200_9_receipts_spec.rb} +8 -8
- data/spec/models/inline_response_200_9_spec.rb +5 -5
- data/spec/models/inline_response_200_spec.rb +5 -5
- data/spec/models/inline_response_201_lines_spec.rb +5 -5
- data/spec/models/inline_response_201_spec.rb +5 -5
- data/spec/models/inline_response_400_spec.rb +5 -5
- data/spec/models/invoice_lines_spec.rb +5 -5
- data/spec/models/invoice_spec.rb +5 -5
- data/spec/models/issue_refund_payment_spec.rb +5 -5
- data/spec/models/limit_spec.rb +5 -5
- data/spec/models/metric_cost_spec.rb +58 -0
- data/spec/models/metric_filter_spec.rb +68 -0
- data/spec/models/metric_spec.rb +74 -0
- data/spec/models/payment_details_spec.rb +5 -5
- data/spec/models/price_spec.rb +11 -5
- data/spec/models/product_spec.rb +5 -5
- data/spec/models/product_tax_type_spec.rb +5 -5
- data/spec/models/refund_spec.rb +5 -5
- data/spec/models/seats_add_body_spec.rb +5 -5
- data/spec/models/seats_remove_body_spec.rb +5 -5
- data/spec/models/subscription_id_cancel_body_spec.rb +5 -5
- data/spec/models/subscription_id_extend_body_spec.rb +5 -5
- data/spec/models/subscription_id_plan_body_spec.rb +5 -5
- data/spec/models/subscription_id_price_body_spec.rb +5 -5
- data/spec/models/subscription_plan_spec.rb +5 -5
- data/spec/models/subscription_spec.rb +11 -5
- data/spec/models/subscription_start_body_spec.rb +11 -5
- data/spec/models/subscription_trial_body_spec.rb +5 -5
- data/spec/models/usage_limit_spec.rb +56 -0
- data/spec/models/voucher_code_spec.rb +5 -5
- data/spec/spec_helper.rb +3 -3
- metadata +110 -70
- data/lib/swagger_client.rb +0 -95
data/docs/SubscriptionsApi.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Billabear::SubscriptionsApi
|
|
2
2
|
|
|
3
3
|
All URIs are relative to *https://{customerId}.billabear.cloud/api/v1*
|
|
4
4
|
|
|
@@ -19,7 +19,7 @@ Method | HTTP request | Description
|
|
|
19
19
|
[**start_trial**](SubscriptionsApi.md#start_trial) | **POST** /customer/{customerId}/subscription/trial | Start Trial Subscription For Customer
|
|
20
20
|
|
|
21
21
|
# **add_seats_subscriptions**
|
|
22
|
-
>
|
|
22
|
+
> InlineResponse20013 add_seats_subscriptions(bodysubscription_id)
|
|
23
23
|
|
|
24
24
|
Add Seats
|
|
25
25
|
|
|
@@ -28,17 +28,17 @@ Adds seats to a per seat subscription<br><br><strong>Since 1.1.4</strong>
|
|
|
28
28
|
### Example
|
|
29
29
|
```ruby
|
|
30
30
|
# load the gem
|
|
31
|
-
require '
|
|
31
|
+
require 'billabear'
|
|
32
32
|
# setup authorization
|
|
33
|
-
|
|
33
|
+
Billabear.configure do |config|
|
|
34
34
|
# Configure API key authorization: ApiKeyAuth
|
|
35
35
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
36
36
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
37
37
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
-
api_instance =
|
|
41
|
-
body =
|
|
40
|
+
api_instance = Billabear::SubscriptionsApi.new
|
|
41
|
+
body = Billabear::SeatsAddBody.new # SeatsAddBody |
|
|
42
42
|
subscription_id = 'subscription_id_example' # String | The id of the subscription to retrieve
|
|
43
43
|
|
|
44
44
|
|
|
@@ -46,7 +46,7 @@ begin
|
|
|
46
46
|
#Add Seats
|
|
47
47
|
result = api_instance.add_seats_subscriptions(bodysubscription_id)
|
|
48
48
|
p result
|
|
49
|
-
rescue
|
|
49
|
+
rescue Billabear::ApiError => e
|
|
50
50
|
puts "Exception when calling SubscriptionsApi->add_seats_subscriptions: #{e}"
|
|
51
51
|
end
|
|
52
52
|
```
|
|
@@ -60,7 +60,7 @@ Name | Type | Description | Notes
|
|
|
60
60
|
|
|
61
61
|
### Return type
|
|
62
62
|
|
|
63
|
-
[**
|
|
63
|
+
[**InlineResponse20013**](InlineResponse20013.md)
|
|
64
64
|
|
|
65
65
|
### Authorization
|
|
66
66
|
|
|
@@ -74,7 +74,7 @@ Name | Type | Description | Notes
|
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
# **cancel_subscription**
|
|
77
|
-
>
|
|
77
|
+
> cancel_subscription(bodysubscription_id)
|
|
78
78
|
|
|
79
79
|
Cancel Subscription
|
|
80
80
|
|
|
@@ -83,25 +83,24 @@ Info for a specific subscription
|
|
|
83
83
|
### Example
|
|
84
84
|
```ruby
|
|
85
85
|
# load the gem
|
|
86
|
-
require '
|
|
86
|
+
require 'billabear'
|
|
87
87
|
# setup authorization
|
|
88
|
-
|
|
88
|
+
Billabear.configure do |config|
|
|
89
89
|
# Configure API key authorization: ApiKeyAuth
|
|
90
90
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
91
91
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
92
92
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
93
93
|
end
|
|
94
94
|
|
|
95
|
-
api_instance =
|
|
96
|
-
body =
|
|
95
|
+
api_instance = Billabear::SubscriptionsApi.new
|
|
96
|
+
body = Billabear::SubscriptionIdCancelBody.new # SubscriptionIdCancelBody |
|
|
97
97
|
subscription_id = 'subscription_id_example' # String | The id of the subscription to retrieve
|
|
98
98
|
|
|
99
99
|
|
|
100
100
|
begin
|
|
101
101
|
#Cancel Subscription
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
rescue SwaggerClient::ApiError => e
|
|
102
|
+
api_instance.cancel_subscription(bodysubscription_id)
|
|
103
|
+
rescue Billabear::ApiError => e
|
|
105
104
|
puts "Exception when calling SubscriptionsApi->cancel_subscription: #{e}"
|
|
106
105
|
end
|
|
107
106
|
```
|
|
@@ -115,7 +114,7 @@ Name | Type | Description | Notes
|
|
|
115
114
|
|
|
116
115
|
### Return type
|
|
117
116
|
|
|
118
|
-
|
|
117
|
+
nil (empty response body)
|
|
119
118
|
|
|
120
119
|
### Authorization
|
|
121
120
|
|
|
@@ -129,7 +128,7 @@ Name | Type | Description | Notes
|
|
|
129
128
|
|
|
130
129
|
|
|
131
130
|
# **change_subscription_price**
|
|
132
|
-
>
|
|
131
|
+
> InlineResponse20013 change_subscription_price(bodysubscription_id)
|
|
133
132
|
|
|
134
133
|
Change Price
|
|
135
134
|
|
|
@@ -138,17 +137,17 @@ Changes the price being used for a price. Useful for changing pricing schedule o
|
|
|
138
137
|
### Example
|
|
139
138
|
```ruby
|
|
140
139
|
# load the gem
|
|
141
|
-
require '
|
|
140
|
+
require 'billabear'
|
|
142
141
|
# setup authorization
|
|
143
|
-
|
|
142
|
+
Billabear.configure do |config|
|
|
144
143
|
# Configure API key authorization: ApiKeyAuth
|
|
145
144
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
146
145
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
147
146
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
148
147
|
end
|
|
149
148
|
|
|
150
|
-
api_instance =
|
|
151
|
-
body =
|
|
149
|
+
api_instance = Billabear::SubscriptionsApi.new
|
|
150
|
+
body = Billabear::SubscriptionIdPriceBody.new # SubscriptionIdPriceBody |
|
|
152
151
|
subscription_id = 'subscription_id_example' # String | The id of the subscription to retrieve
|
|
153
152
|
|
|
154
153
|
|
|
@@ -156,7 +155,7 @@ begin
|
|
|
156
155
|
#Change Price
|
|
157
156
|
result = api_instance.change_subscription_price(bodysubscription_id)
|
|
158
157
|
p result
|
|
159
|
-
rescue
|
|
158
|
+
rescue Billabear::ApiError => e
|
|
160
159
|
puts "Exception when calling SubscriptionsApi->change_subscription_price: #{e}"
|
|
161
160
|
end
|
|
162
161
|
```
|
|
@@ -170,7 +169,7 @@ Name | Type | Description | Notes
|
|
|
170
169
|
|
|
171
170
|
### Return type
|
|
172
171
|
|
|
173
|
-
[**
|
|
172
|
+
[**InlineResponse20013**](InlineResponse20013.md)
|
|
174
173
|
|
|
175
174
|
### Authorization
|
|
176
175
|
|
|
@@ -193,17 +192,17 @@ Create subscription for a customer
|
|
|
193
192
|
### Example
|
|
194
193
|
```ruby
|
|
195
194
|
# load the gem
|
|
196
|
-
require '
|
|
195
|
+
require 'billabear'
|
|
197
196
|
# setup authorization
|
|
198
|
-
|
|
197
|
+
Billabear.configure do |config|
|
|
199
198
|
# Configure API key authorization: ApiKeyAuth
|
|
200
199
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
201
200
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
202
201
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
203
202
|
end
|
|
204
203
|
|
|
205
|
-
api_instance =
|
|
206
|
-
body =
|
|
204
|
+
api_instance = Billabear::SubscriptionsApi.new
|
|
205
|
+
body = Billabear::SubscriptionStartBody.new # SubscriptionStartBody |
|
|
207
206
|
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
208
207
|
|
|
209
208
|
|
|
@@ -211,7 +210,7 @@ begin
|
|
|
211
210
|
#Create Subscription
|
|
212
211
|
result = api_instance.create_subscription(bodycustomer_id)
|
|
213
212
|
p result
|
|
214
|
-
rescue
|
|
213
|
+
rescue Billabear::ApiError => e
|
|
215
214
|
puts "Exception when calling SubscriptionsApi->create_subscription: #{e}"
|
|
216
215
|
end
|
|
217
216
|
```
|
|
@@ -248,17 +247,17 @@ Change the subscription plan for a customer
|
|
|
248
247
|
### Example
|
|
249
248
|
```ruby
|
|
250
249
|
# load the gem
|
|
251
|
-
require '
|
|
250
|
+
require 'billabear'
|
|
252
251
|
# setup authorization
|
|
253
|
-
|
|
252
|
+
Billabear.configure do |config|
|
|
254
253
|
# Configure API key authorization: ApiKeyAuth
|
|
255
254
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
256
255
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
257
256
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
258
257
|
end
|
|
259
258
|
|
|
260
|
-
api_instance =
|
|
261
|
-
body =
|
|
259
|
+
api_instance = Billabear::SubscriptionsApi.new
|
|
260
|
+
body = Billabear::SubscriptionIdPlanBody.new # SubscriptionIdPlanBody |
|
|
262
261
|
subscription_id = 'subscription_id_example' # String | The id of the subscription to retrieve
|
|
263
262
|
|
|
264
263
|
|
|
@@ -266,7 +265,7 @@ begin
|
|
|
266
265
|
#Change Subscription Plan
|
|
267
266
|
result = api_instance.customer_change_subscription_plan(bodysubscription_id)
|
|
268
267
|
p result
|
|
269
|
-
rescue
|
|
268
|
+
rescue Billabear::ApiError => e
|
|
270
269
|
puts "Exception when calling SubscriptionsApi->customer_change_subscription_plan: #{e}"
|
|
271
270
|
end
|
|
272
271
|
```
|
|
@@ -303,17 +302,17 @@ Extend a trial subscription so it's converted from a trial to a normal subscript
|
|
|
303
302
|
### Example
|
|
304
303
|
```ruby
|
|
305
304
|
# load the gem
|
|
306
|
-
require '
|
|
305
|
+
require 'billabear'
|
|
307
306
|
# setup authorization
|
|
308
|
-
|
|
307
|
+
Billabear.configure do |config|
|
|
309
308
|
# Configure API key authorization: ApiKeyAuth
|
|
310
309
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
311
310
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
312
311
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
313
312
|
end
|
|
314
313
|
|
|
315
|
-
api_instance =
|
|
316
|
-
body =
|
|
314
|
+
api_instance = Billabear::SubscriptionsApi.new
|
|
315
|
+
body = Billabear::SubscriptionIdExtendBody.new # SubscriptionIdExtendBody |
|
|
317
316
|
subscription_id = 'subscription_id_example' # String | The id of the subscription to retrieve
|
|
318
317
|
|
|
319
318
|
|
|
@@ -321,7 +320,7 @@ begin
|
|
|
321
320
|
#Extend Trial Subscription
|
|
322
321
|
result = api_instance.extend_trial(bodysubscription_id)
|
|
323
322
|
p result
|
|
324
|
-
rescue
|
|
323
|
+
rescue Billabear::ApiError => e
|
|
325
324
|
puts "Exception when calling SubscriptionsApi->extend_trial: #{e}"
|
|
326
325
|
end
|
|
327
326
|
```
|
|
@@ -349,7 +348,7 @@ Name | Type | Description | Notes
|
|
|
349
348
|
|
|
350
349
|
|
|
351
350
|
# **get_active_for_customer**
|
|
352
|
-
>
|
|
351
|
+
> InlineResponse2008 get_active_for_customer(customer_id)
|
|
353
352
|
|
|
354
353
|
List Customer Active Subscriptions
|
|
355
354
|
|
|
@@ -358,16 +357,16 @@ List all Active customer subscriptions
|
|
|
358
357
|
### Example
|
|
359
358
|
```ruby
|
|
360
359
|
# load the gem
|
|
361
|
-
require '
|
|
360
|
+
require 'billabear'
|
|
362
361
|
# setup authorization
|
|
363
|
-
|
|
362
|
+
Billabear.configure do |config|
|
|
364
363
|
# Configure API key authorization: ApiKeyAuth
|
|
365
364
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
366
365
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
367
366
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
368
367
|
end
|
|
369
368
|
|
|
370
|
-
api_instance =
|
|
369
|
+
api_instance = Billabear::SubscriptionsApi.new
|
|
371
370
|
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
372
371
|
|
|
373
372
|
|
|
@@ -375,7 +374,7 @@ begin
|
|
|
375
374
|
#List Customer Active Subscriptions
|
|
376
375
|
result = api_instance.get_active_for_customer(customer_id)
|
|
377
376
|
p result
|
|
378
|
-
rescue
|
|
377
|
+
rescue Billabear::ApiError => e
|
|
379
378
|
puts "Exception when calling SubscriptionsApi->get_active_for_customer: #{e}"
|
|
380
379
|
end
|
|
381
380
|
```
|
|
@@ -388,7 +387,7 @@ Name | Type | Description | Notes
|
|
|
388
387
|
|
|
389
388
|
### Return type
|
|
390
389
|
|
|
391
|
-
[**
|
|
390
|
+
[**InlineResponse2008**](InlineResponse2008.md)
|
|
392
391
|
|
|
393
392
|
### Authorization
|
|
394
393
|
|
|
@@ -402,7 +401,7 @@ Name | Type | Description | Notes
|
|
|
402
401
|
|
|
403
402
|
|
|
404
403
|
# **get_for_customer**
|
|
405
|
-
>
|
|
404
|
+
> InlineResponse2008 get_for_customer(customer_id)
|
|
406
405
|
|
|
407
406
|
List Customer Subscriptions
|
|
408
407
|
|
|
@@ -411,16 +410,16 @@ List all customer subscriptions<br><br><strong>Since 1.1</strong>
|
|
|
411
410
|
### Example
|
|
412
411
|
```ruby
|
|
413
412
|
# load the gem
|
|
414
|
-
require '
|
|
413
|
+
require 'billabear'
|
|
415
414
|
# setup authorization
|
|
416
|
-
|
|
415
|
+
Billabear.configure do |config|
|
|
417
416
|
# Configure API key authorization: ApiKeyAuth
|
|
418
417
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
419
418
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
420
419
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
421
420
|
end
|
|
422
421
|
|
|
423
|
-
api_instance =
|
|
422
|
+
api_instance = Billabear::SubscriptionsApi.new
|
|
424
423
|
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
425
424
|
|
|
426
425
|
|
|
@@ -428,7 +427,7 @@ begin
|
|
|
428
427
|
#List Customer Subscriptions
|
|
429
428
|
result = api_instance.get_for_customer(customer_id)
|
|
430
429
|
p result
|
|
431
|
-
rescue
|
|
430
|
+
rescue Billabear::ApiError => e
|
|
432
431
|
puts "Exception when calling SubscriptionsApi->get_for_customer: #{e}"
|
|
433
432
|
end
|
|
434
433
|
```
|
|
@@ -441,7 +440,7 @@ Name | Type | Description | Notes
|
|
|
441
440
|
|
|
442
441
|
### Return type
|
|
443
442
|
|
|
444
|
-
[**
|
|
443
|
+
[**InlineResponse2008**](InlineResponse2008.md)
|
|
445
444
|
|
|
446
445
|
### Authorization
|
|
447
446
|
|
|
@@ -455,7 +454,7 @@ Name | Type | Description | Notes
|
|
|
455
454
|
|
|
456
455
|
|
|
457
456
|
# **list_subscription_plans**
|
|
458
|
-
>
|
|
457
|
+
> InlineResponse20012 list_subscription_plans(opts)
|
|
459
458
|
|
|
460
459
|
List Subscription Plans
|
|
461
460
|
|
|
@@ -464,16 +463,16 @@ List all subscriptions plans
|
|
|
464
463
|
### Example
|
|
465
464
|
```ruby
|
|
466
465
|
# load the gem
|
|
467
|
-
require '
|
|
466
|
+
require 'billabear'
|
|
468
467
|
# setup authorization
|
|
469
|
-
|
|
468
|
+
Billabear.configure do |config|
|
|
470
469
|
# Configure API key authorization: ApiKeyAuth
|
|
471
470
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
472
471
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
473
472
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
474
473
|
end
|
|
475
474
|
|
|
476
|
-
api_instance =
|
|
475
|
+
api_instance = Billabear::SubscriptionsApi.new
|
|
477
476
|
opts = {
|
|
478
477
|
limit: 56, # Integer | How many items to return at one time (max 100)
|
|
479
478
|
last_key: 'last_key_example' # String | The key to be used in pagination to say what the last key of the previous page was
|
|
@@ -483,7 +482,7 @@ begin
|
|
|
483
482
|
#List Subscription Plans
|
|
484
483
|
result = api_instance.list_subscription_plans(opts)
|
|
485
484
|
p result
|
|
486
|
-
rescue
|
|
485
|
+
rescue Billabear::ApiError => e
|
|
487
486
|
puts "Exception when calling SubscriptionsApi->list_subscription_plans: #{e}"
|
|
488
487
|
end
|
|
489
488
|
```
|
|
@@ -497,7 +496,7 @@ Name | Type | Description | Notes
|
|
|
497
496
|
|
|
498
497
|
### Return type
|
|
499
498
|
|
|
500
|
-
[**
|
|
499
|
+
[**InlineResponse20012**](InlineResponse20012.md)
|
|
501
500
|
|
|
502
501
|
### Authorization
|
|
503
502
|
|
|
@@ -511,7 +510,7 @@ Name | Type | Description | Notes
|
|
|
511
510
|
|
|
512
511
|
|
|
513
512
|
# **list_subscriptions**
|
|
514
|
-
>
|
|
513
|
+
> InlineResponse2008 list_subscriptions(opts)
|
|
515
514
|
|
|
516
515
|
List
|
|
517
516
|
|
|
@@ -520,16 +519,16 @@ List all subscriptions
|
|
|
520
519
|
### Example
|
|
521
520
|
```ruby
|
|
522
521
|
# load the gem
|
|
523
|
-
require '
|
|
522
|
+
require 'billabear'
|
|
524
523
|
# setup authorization
|
|
525
|
-
|
|
524
|
+
Billabear.configure do |config|
|
|
526
525
|
# Configure API key authorization: ApiKeyAuth
|
|
527
526
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
528
527
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
529
528
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
530
529
|
end
|
|
531
530
|
|
|
532
|
-
api_instance =
|
|
531
|
+
api_instance = Billabear::SubscriptionsApi.new
|
|
533
532
|
opts = {
|
|
534
533
|
limit: 56, # Integer | How many items to return at one time (max 100)
|
|
535
534
|
last_key: 'last_key_example' # String | The key to be used in pagination to say what the last key of the previous page was
|
|
@@ -539,7 +538,7 @@ begin
|
|
|
539
538
|
#List
|
|
540
539
|
result = api_instance.list_subscriptions(opts)
|
|
541
540
|
p result
|
|
542
|
-
rescue
|
|
541
|
+
rescue Billabear::ApiError => e
|
|
543
542
|
puts "Exception when calling SubscriptionsApi->list_subscriptions: #{e}"
|
|
544
543
|
end
|
|
545
544
|
```
|
|
@@ -553,7 +552,7 @@ Name | Type | Description | Notes
|
|
|
553
552
|
|
|
554
553
|
### Return type
|
|
555
554
|
|
|
556
|
-
[**
|
|
555
|
+
[**InlineResponse2008**](InlineResponse2008.md)
|
|
557
556
|
|
|
558
557
|
### Authorization
|
|
559
558
|
|
|
@@ -567,7 +566,7 @@ Name | Type | Description | Notes
|
|
|
567
566
|
|
|
568
567
|
|
|
569
568
|
# **remove_seats_subscriptions**
|
|
570
|
-
>
|
|
569
|
+
> InlineResponse20013 remove_seats_subscriptions(bodysubscription_id)
|
|
571
570
|
|
|
572
571
|
Remove Seats
|
|
573
572
|
|
|
@@ -576,17 +575,17 @@ Remove seats to a per seat subscription<br><br><strong>Since 1.1.4</strong>
|
|
|
576
575
|
### Example
|
|
577
576
|
```ruby
|
|
578
577
|
# load the gem
|
|
579
|
-
require '
|
|
578
|
+
require 'billabear'
|
|
580
579
|
# setup authorization
|
|
581
|
-
|
|
580
|
+
Billabear.configure do |config|
|
|
582
581
|
# Configure API key authorization: ApiKeyAuth
|
|
583
582
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
584
583
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
585
584
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
586
585
|
end
|
|
587
586
|
|
|
588
|
-
api_instance =
|
|
589
|
-
body =
|
|
587
|
+
api_instance = Billabear::SubscriptionsApi.new
|
|
588
|
+
body = Billabear::SeatsRemoveBody.new # SeatsRemoveBody |
|
|
590
589
|
subscription_id = 'subscription_id_example' # String | The id of the subscription to retrieve
|
|
591
590
|
|
|
592
591
|
|
|
@@ -594,7 +593,7 @@ begin
|
|
|
594
593
|
#Remove Seats
|
|
595
594
|
result = api_instance.remove_seats_subscriptions(bodysubscription_id)
|
|
596
595
|
p result
|
|
597
|
-
rescue
|
|
596
|
+
rescue Billabear::ApiError => e
|
|
598
597
|
puts "Exception when calling SubscriptionsApi->remove_seats_subscriptions: #{e}"
|
|
599
598
|
end
|
|
600
599
|
```
|
|
@@ -608,7 +607,7 @@ Name | Type | Description | Notes
|
|
|
608
607
|
|
|
609
608
|
### Return type
|
|
610
609
|
|
|
611
|
-
[**
|
|
610
|
+
[**InlineResponse20013**](InlineResponse20013.md)
|
|
612
611
|
|
|
613
612
|
### Authorization
|
|
614
613
|
|
|
@@ -631,16 +630,16 @@ Info for a specific subscription
|
|
|
631
630
|
### Example
|
|
632
631
|
```ruby
|
|
633
632
|
# load the gem
|
|
634
|
-
require '
|
|
633
|
+
require 'billabear'
|
|
635
634
|
# setup authorization
|
|
636
|
-
|
|
635
|
+
Billabear.configure do |config|
|
|
637
636
|
# Configure API key authorization: ApiKeyAuth
|
|
638
637
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
639
638
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
640
639
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
641
640
|
end
|
|
642
641
|
|
|
643
|
-
api_instance =
|
|
642
|
+
api_instance = Billabear::SubscriptionsApi.new
|
|
644
643
|
subscription_id = 'subscription_id_example' # String | The id of the subscription to retrieve
|
|
645
644
|
|
|
646
645
|
|
|
@@ -648,7 +647,7 @@ begin
|
|
|
648
647
|
#Detail
|
|
649
648
|
result = api_instance.show_subscription_by_id(subscription_id)
|
|
650
649
|
p result
|
|
651
|
-
rescue
|
|
650
|
+
rescue Billabear::ApiError => e
|
|
652
651
|
puts "Exception when calling SubscriptionsApi->show_subscription_by_id: #{e}"
|
|
653
652
|
end
|
|
654
653
|
```
|
|
@@ -684,17 +683,17 @@ Start subscription for a customer
|
|
|
684
683
|
### Example
|
|
685
684
|
```ruby
|
|
686
685
|
# load the gem
|
|
687
|
-
require '
|
|
686
|
+
require 'billabear'
|
|
688
687
|
# setup authorization
|
|
689
|
-
|
|
688
|
+
Billabear.configure do |config|
|
|
690
689
|
# Configure API key authorization: ApiKeyAuth
|
|
691
690
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
692
691
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
693
692
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
694
693
|
end
|
|
695
694
|
|
|
696
|
-
api_instance =
|
|
697
|
-
body =
|
|
695
|
+
api_instance = Billabear::SubscriptionsApi.new
|
|
696
|
+
body = Billabear::SubscriptionTrialBody.new # SubscriptionTrialBody |
|
|
698
697
|
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
699
698
|
|
|
700
699
|
|
|
@@ -702,7 +701,7 @@ begin
|
|
|
702
701
|
#Start Trial Subscription For Customer
|
|
703
702
|
result = api_instance.start_trial(bodycustomer_id)
|
|
704
703
|
p result
|
|
705
|
-
rescue
|
|
704
|
+
rescue Billabear::ApiError => e
|
|
706
705
|
puts "Exception when calling SubscriptionsApi->start_trial: #{e}"
|
|
707
706
|
end
|
|
708
707
|
```
|