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
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
#The REST API provided by BillaBear
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 1.
|
|
6
|
+
OpenAPI spec version: 1.1.0
|
|
7
7
|
Contact: support@billabear.com
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 3.0.
|
|
9
|
+
Swagger Codegen version: 3.0.66
|
|
10
10
|
=end
|
|
11
11
|
|
|
12
|
-
module
|
|
12
|
+
module Billabear
|
|
13
13
|
class SubscriptionsApi
|
|
14
14
|
attr_accessor :api_client
|
|
15
15
|
|
|
@@ -21,7 +21,7 @@ module SwaggerClient
|
|
|
21
21
|
# @param body
|
|
22
22
|
# @param subscription_id The id of the subscription to retrieve
|
|
23
23
|
# @param [Hash] opts the optional parameters
|
|
24
|
-
# @return [
|
|
24
|
+
# @return [InlineResponse20013]
|
|
25
25
|
def add_seats_subscriptions(body, subscription_id, opts = {})
|
|
26
26
|
data, _status_code, _headers = add_seats_subscriptions_with_http_info(body, subscription_id, opts)
|
|
27
27
|
data
|
|
@@ -32,7 +32,7 @@ module SwaggerClient
|
|
|
32
32
|
# @param body
|
|
33
33
|
# @param subscription_id The id of the subscription to retrieve
|
|
34
34
|
# @param [Hash] opts the optional parameters
|
|
35
|
-
# @return [Array<(
|
|
35
|
+
# @return [Array<(InlineResponse20013, Integer, Hash)>] InlineResponse20013 data, response status code and response headers
|
|
36
36
|
def add_seats_subscriptions_with_http_info(body, subscription_id, opts = {})
|
|
37
37
|
if @api_client.config.debugging
|
|
38
38
|
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.add_seats_subscriptions ...'
|
|
@@ -64,7 +64,7 @@ module SwaggerClient
|
|
|
64
64
|
# http body (model)
|
|
65
65
|
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
66
66
|
|
|
67
|
-
return_type = opts[:return_type] || '
|
|
67
|
+
return_type = opts[:return_type] || 'InlineResponse20013'
|
|
68
68
|
|
|
69
69
|
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
70
70
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
@@ -85,10 +85,10 @@ module SwaggerClient
|
|
|
85
85
|
# @param body
|
|
86
86
|
# @param subscription_id The id of the subscription to retrieve
|
|
87
87
|
# @param [Hash] opts the optional parameters
|
|
88
|
-
# @return [
|
|
88
|
+
# @return [nil]
|
|
89
89
|
def cancel_subscription(body, subscription_id, opts = {})
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
cancel_subscription_with_http_info(body, subscription_id, opts)
|
|
91
|
+
nil
|
|
92
92
|
end
|
|
93
93
|
|
|
94
94
|
# Cancel Subscription
|
|
@@ -96,7 +96,7 @@ module SwaggerClient
|
|
|
96
96
|
# @param body
|
|
97
97
|
# @param subscription_id The id of the subscription to retrieve
|
|
98
98
|
# @param [Hash] opts the optional parameters
|
|
99
|
-
# @return [Array<(
|
|
99
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
100
100
|
def cancel_subscription_with_http_info(body, subscription_id, opts = {})
|
|
101
101
|
if @api_client.config.debugging
|
|
102
102
|
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.cancel_subscription ...'
|
|
@@ -128,7 +128,7 @@ module SwaggerClient
|
|
|
128
128
|
# http body (model)
|
|
129
129
|
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
130
130
|
|
|
131
|
-
return_type = opts[:return_type]
|
|
131
|
+
return_type = opts[:return_type]
|
|
132
132
|
|
|
133
133
|
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
134
134
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
@@ -149,7 +149,7 @@ module SwaggerClient
|
|
|
149
149
|
# @param body
|
|
150
150
|
# @param subscription_id The id of the subscription to retrieve
|
|
151
151
|
# @param [Hash] opts the optional parameters
|
|
152
|
-
# @return [
|
|
152
|
+
# @return [InlineResponse20013]
|
|
153
153
|
def change_subscription_price(body, subscription_id, opts = {})
|
|
154
154
|
data, _status_code, _headers = change_subscription_price_with_http_info(body, subscription_id, opts)
|
|
155
155
|
data
|
|
@@ -160,7 +160,7 @@ module SwaggerClient
|
|
|
160
160
|
# @param body
|
|
161
161
|
# @param subscription_id The id of the subscription to retrieve
|
|
162
162
|
# @param [Hash] opts the optional parameters
|
|
163
|
-
# @return [Array<(
|
|
163
|
+
# @return [Array<(InlineResponse20013, Integer, Hash)>] InlineResponse20013 data, response status code and response headers
|
|
164
164
|
def change_subscription_price_with_http_info(body, subscription_id, opts = {})
|
|
165
165
|
if @api_client.config.debugging
|
|
166
166
|
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.change_subscription_price ...'
|
|
@@ -192,7 +192,7 @@ module SwaggerClient
|
|
|
192
192
|
# http body (model)
|
|
193
193
|
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
194
194
|
|
|
195
|
-
return_type = opts[:return_type] || '
|
|
195
|
+
return_type = opts[:return_type] || 'InlineResponse20013'
|
|
196
196
|
|
|
197
197
|
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
198
198
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
@@ -404,7 +404,7 @@ module SwaggerClient
|
|
|
404
404
|
# List all Active customer subscriptions
|
|
405
405
|
# @param customer_id The id of the customer to retrieve
|
|
406
406
|
# @param [Hash] opts the optional parameters
|
|
407
|
-
# @return [
|
|
407
|
+
# @return [InlineResponse2008]
|
|
408
408
|
def get_active_for_customer(customer_id, opts = {})
|
|
409
409
|
data, _status_code, _headers = get_active_for_customer_with_http_info(customer_id, opts)
|
|
410
410
|
data
|
|
@@ -414,7 +414,7 @@ module SwaggerClient
|
|
|
414
414
|
# List all Active customer subscriptions
|
|
415
415
|
# @param customer_id The id of the customer to retrieve
|
|
416
416
|
# @param [Hash] opts the optional parameters
|
|
417
|
-
# @return [Array<(
|
|
417
|
+
# @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
|
|
418
418
|
def get_active_for_customer_with_http_info(customer_id, opts = {})
|
|
419
419
|
if @api_client.config.debugging
|
|
420
420
|
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.get_active_for_customer ...'
|
|
@@ -440,7 +440,7 @@ module SwaggerClient
|
|
|
440
440
|
# http body (model)
|
|
441
441
|
post_body = opts[:body]
|
|
442
442
|
|
|
443
|
-
return_type = opts[:return_type] || '
|
|
443
|
+
return_type = opts[:return_type] || 'InlineResponse2008'
|
|
444
444
|
|
|
445
445
|
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
446
446
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
@@ -460,7 +460,7 @@ module SwaggerClient
|
|
|
460
460
|
# List all customer subscriptions<br><br><strong>Since 1.1</strong>
|
|
461
461
|
# @param customer_id The id of the customer to retrieve
|
|
462
462
|
# @param [Hash] opts the optional parameters
|
|
463
|
-
# @return [
|
|
463
|
+
# @return [InlineResponse2008]
|
|
464
464
|
def get_for_customer(customer_id, opts = {})
|
|
465
465
|
data, _status_code, _headers = get_for_customer_with_http_info(customer_id, opts)
|
|
466
466
|
data
|
|
@@ -470,7 +470,7 @@ module SwaggerClient
|
|
|
470
470
|
# List all customer subscriptions<br><br><strong>Since 1.1</strong>
|
|
471
471
|
# @param customer_id The id of the customer to retrieve
|
|
472
472
|
# @param [Hash] opts the optional parameters
|
|
473
|
-
# @return [Array<(
|
|
473
|
+
# @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
|
|
474
474
|
def get_for_customer_with_http_info(customer_id, opts = {})
|
|
475
475
|
if @api_client.config.debugging
|
|
476
476
|
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.get_for_customer ...'
|
|
@@ -496,7 +496,7 @@ module SwaggerClient
|
|
|
496
496
|
# http body (model)
|
|
497
497
|
post_body = opts[:body]
|
|
498
498
|
|
|
499
|
-
return_type = opts[:return_type] || '
|
|
499
|
+
return_type = opts[:return_type] || 'InlineResponse2008'
|
|
500
500
|
|
|
501
501
|
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
502
502
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
@@ -517,7 +517,7 @@ module SwaggerClient
|
|
|
517
517
|
# @param [Hash] opts the optional parameters
|
|
518
518
|
# @option opts [Integer] :limit How many items to return at one time (max 100)
|
|
519
519
|
# @option opts [String] :last_key The key to be used in pagination to say what the last key of the previous page was
|
|
520
|
-
# @return [
|
|
520
|
+
# @return [InlineResponse20012]
|
|
521
521
|
def list_subscription_plans(opts = {})
|
|
522
522
|
data, _status_code, _headers = list_subscription_plans_with_http_info(opts)
|
|
523
523
|
data
|
|
@@ -528,7 +528,7 @@ module SwaggerClient
|
|
|
528
528
|
# @param [Hash] opts the optional parameters
|
|
529
529
|
# @option opts [Integer] :limit How many items to return at one time (max 100)
|
|
530
530
|
# @option opts [String] :last_key The key to be used in pagination to say what the last key of the previous page was
|
|
531
|
-
# @return [Array<(
|
|
531
|
+
# @return [Array<(InlineResponse20012, Integer, Hash)>] InlineResponse20012 data, response status code and response headers
|
|
532
532
|
def list_subscription_plans_with_http_info(opts = {})
|
|
533
533
|
if @api_client.config.debugging
|
|
534
534
|
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.list_subscription_plans ...'
|
|
@@ -552,7 +552,7 @@ module SwaggerClient
|
|
|
552
552
|
# http body (model)
|
|
553
553
|
post_body = opts[:body]
|
|
554
554
|
|
|
555
|
-
return_type = opts[:return_type] || '
|
|
555
|
+
return_type = opts[:return_type] || 'InlineResponse20012'
|
|
556
556
|
|
|
557
557
|
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
558
558
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
@@ -573,7 +573,7 @@ module SwaggerClient
|
|
|
573
573
|
# @param [Hash] opts the optional parameters
|
|
574
574
|
# @option opts [Integer] :limit How many items to return at one time (max 100)
|
|
575
575
|
# @option opts [String] :last_key The key to be used in pagination to say what the last key of the previous page was
|
|
576
|
-
# @return [
|
|
576
|
+
# @return [InlineResponse2008]
|
|
577
577
|
def list_subscriptions(opts = {})
|
|
578
578
|
data, _status_code, _headers = list_subscriptions_with_http_info(opts)
|
|
579
579
|
data
|
|
@@ -584,7 +584,7 @@ module SwaggerClient
|
|
|
584
584
|
# @param [Hash] opts the optional parameters
|
|
585
585
|
# @option opts [Integer] :limit How many items to return at one time (max 100)
|
|
586
586
|
# @option opts [String] :last_key The key to be used in pagination to say what the last key of the previous page was
|
|
587
|
-
# @return [Array<(
|
|
587
|
+
# @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
|
|
588
588
|
def list_subscriptions_with_http_info(opts = {})
|
|
589
589
|
if @api_client.config.debugging
|
|
590
590
|
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.list_subscriptions ...'
|
|
@@ -608,7 +608,7 @@ module SwaggerClient
|
|
|
608
608
|
# http body (model)
|
|
609
609
|
post_body = opts[:body]
|
|
610
610
|
|
|
611
|
-
return_type = opts[:return_type] || '
|
|
611
|
+
return_type = opts[:return_type] || 'InlineResponse2008'
|
|
612
612
|
|
|
613
613
|
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
614
614
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
@@ -629,7 +629,7 @@ module SwaggerClient
|
|
|
629
629
|
# @param body
|
|
630
630
|
# @param subscription_id The id of the subscription to retrieve
|
|
631
631
|
# @param [Hash] opts the optional parameters
|
|
632
|
-
# @return [
|
|
632
|
+
# @return [InlineResponse20013]
|
|
633
633
|
def remove_seats_subscriptions(body, subscription_id, opts = {})
|
|
634
634
|
data, _status_code, _headers = remove_seats_subscriptions_with_http_info(body, subscription_id, opts)
|
|
635
635
|
data
|
|
@@ -640,7 +640,7 @@ module SwaggerClient
|
|
|
640
640
|
# @param body
|
|
641
641
|
# @param subscription_id The id of the subscription to retrieve
|
|
642
642
|
# @param [Hash] opts the optional parameters
|
|
643
|
-
# @return [Array<(
|
|
643
|
+
# @return [Array<(InlineResponse20013, Integer, Hash)>] InlineResponse20013 data, response status code and response headers
|
|
644
644
|
def remove_seats_subscriptions_with_http_info(body, subscription_id, opts = {})
|
|
645
645
|
if @api_client.config.debugging
|
|
646
646
|
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.remove_seats_subscriptions ...'
|
|
@@ -672,7 +672,7 @@ module SwaggerClient
|
|
|
672
672
|
# http body (model)
|
|
673
673
|
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
674
674
|
|
|
675
|
-
return_type = opts[:return_type] || '
|
|
675
|
+
return_type = opts[:return_type] || 'InlineResponse20013'
|
|
676
676
|
|
|
677
677
|
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
678
678
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#BillaBear
|
|
3
|
+
|
|
4
|
+
#The REST API provided by BillaBear
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 1.1.0
|
|
7
|
+
Contact: support@billabear.com
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 3.0.66
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
module Billabear
|
|
13
|
+
class UsageApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(api_client = ApiClient.default)
|
|
17
|
+
@api_client = api_client
|
|
18
|
+
end
|
|
19
|
+
# Create Usage Limit
|
|
20
|
+
# Create Usage Limit for the custoemr
|
|
21
|
+
# @param body
|
|
22
|
+
# @param customer_id The id of the customer to retrieve
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @return [UsageLimit]
|
|
25
|
+
def create_customer_usage_limit(body, customer_id, opts = {})
|
|
26
|
+
data, _status_code, _headers = create_customer_usage_limit_with_http_info(body, customer_id, opts)
|
|
27
|
+
data
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Create Usage Limit
|
|
31
|
+
# Create Usage Limit for the custoemr
|
|
32
|
+
# @param body
|
|
33
|
+
# @param customer_id The id of the customer to retrieve
|
|
34
|
+
# @param [Hash] opts the optional parameters
|
|
35
|
+
# @return [Array<(UsageLimit, Integer, Hash)>] UsageLimit data, response status code and response headers
|
|
36
|
+
def create_customer_usage_limit_with_http_info(body, customer_id, opts = {})
|
|
37
|
+
if @api_client.config.debugging
|
|
38
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.create_customer_usage_limit ...'
|
|
39
|
+
end
|
|
40
|
+
# verify the required parameter 'body' is set
|
|
41
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
42
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling UsageApi.create_customer_usage_limit"
|
|
43
|
+
end
|
|
44
|
+
# verify the required parameter 'customer_id' is set
|
|
45
|
+
if @api_client.config.client_side_validation && customer_id.nil?
|
|
46
|
+
fail ArgumentError, "Missing the required parameter 'customer_id' when calling UsageApi.create_customer_usage_limit"
|
|
47
|
+
end
|
|
48
|
+
# resource path
|
|
49
|
+
local_var_path = '/customer/{customerId}/uasge-limit'.sub('{' + 'customerId' + '}', customer_id.to_s)
|
|
50
|
+
|
|
51
|
+
# query parameters
|
|
52
|
+
query_params = opts[:query_params] || {}
|
|
53
|
+
|
|
54
|
+
# header parameters
|
|
55
|
+
header_params = opts[:header_params] || {}
|
|
56
|
+
# HTTP header 'Accept' (if needed)
|
|
57
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
58
|
+
# HTTP header 'Content-Type'
|
|
59
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
60
|
+
|
|
61
|
+
# form parameters
|
|
62
|
+
form_params = opts[:form_params] || {}
|
|
63
|
+
|
|
64
|
+
# http body (model)
|
|
65
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
66
|
+
|
|
67
|
+
return_type = opts[:return_type] || 'UsageLimit'
|
|
68
|
+
|
|
69
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
70
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
71
|
+
:header_params => header_params,
|
|
72
|
+
:query_params => query_params,
|
|
73
|
+
:form_params => form_params,
|
|
74
|
+
:body => post_body,
|
|
75
|
+
:auth_names => auth_names,
|
|
76
|
+
:return_type => return_type)
|
|
77
|
+
|
|
78
|
+
if @api_client.config.debugging
|
|
79
|
+
@api_client.config.logger.debug "API called: UsageApi#create_customer_usage_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
80
|
+
end
|
|
81
|
+
return data, status_code, headers
|
|
82
|
+
end
|
|
83
|
+
# Create Event
|
|
84
|
+
# Creates an event that is used for usage billing
|
|
85
|
+
# @param body
|
|
86
|
+
# @param [Hash] opts the optional parameters
|
|
87
|
+
# @return [nil]
|
|
88
|
+
def create_event(body, opts = {})
|
|
89
|
+
create_event_with_http_info(body, opts)
|
|
90
|
+
nil
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Create Event
|
|
94
|
+
# Creates an event that is used for usage billing
|
|
95
|
+
# @param body
|
|
96
|
+
# @param [Hash] opts the optional parameters
|
|
97
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
98
|
+
def create_event_with_http_info(body, opts = {})
|
|
99
|
+
if @api_client.config.debugging
|
|
100
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.create_event ...'
|
|
101
|
+
end
|
|
102
|
+
# verify the required parameter 'body' is set
|
|
103
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
104
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling UsageApi.create_event"
|
|
105
|
+
end
|
|
106
|
+
# resource path
|
|
107
|
+
local_var_path = '/events'
|
|
108
|
+
|
|
109
|
+
# query parameters
|
|
110
|
+
query_params = opts[:query_params] || {}
|
|
111
|
+
|
|
112
|
+
# header parameters
|
|
113
|
+
header_params = opts[:header_params] || {}
|
|
114
|
+
# HTTP header 'Accept' (if needed)
|
|
115
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
116
|
+
# HTTP header 'Content-Type'
|
|
117
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
118
|
+
|
|
119
|
+
# form parameters
|
|
120
|
+
form_params = opts[:form_params] || {}
|
|
121
|
+
|
|
122
|
+
# http body (model)
|
|
123
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
124
|
+
|
|
125
|
+
return_type = opts[:return_type]
|
|
126
|
+
|
|
127
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
128
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
129
|
+
:header_params => header_params,
|
|
130
|
+
:query_params => query_params,
|
|
131
|
+
:form_params => form_params,
|
|
132
|
+
:body => post_body,
|
|
133
|
+
:auth_names => auth_names,
|
|
134
|
+
:return_type => return_type)
|
|
135
|
+
|
|
136
|
+
if @api_client.config.debugging
|
|
137
|
+
@api_client.config.logger.debug "API called: UsageApi#create_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
138
|
+
end
|
|
139
|
+
return data, status_code, headers
|
|
140
|
+
end
|
|
141
|
+
# Delete Usage Limit
|
|
142
|
+
# Delete Usage Limit for the custoemr
|
|
143
|
+
# @param customer_id The id of the customer to retrieve
|
|
144
|
+
# @param usage_limit_id The id of the usage limit
|
|
145
|
+
# @param [Hash] opts the optional parameters
|
|
146
|
+
# @return [nil]
|
|
147
|
+
def customer_customer_id_uasge_limit_limit_id_delete(customer_id, usage_limit_id, opts = {})
|
|
148
|
+
customer_customer_id_uasge_limit_limit_id_delete_with_http_info(customer_id, usage_limit_id, opts)
|
|
149
|
+
nil
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Delete Usage Limit
|
|
153
|
+
# Delete Usage Limit for the custoemr
|
|
154
|
+
# @param customer_id The id of the customer to retrieve
|
|
155
|
+
# @param usage_limit_id The id of the usage limit
|
|
156
|
+
# @param [Hash] opts the optional parameters
|
|
157
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
158
|
+
def customer_customer_id_uasge_limit_limit_id_delete_with_http_info(customer_id, usage_limit_id, opts = {})
|
|
159
|
+
if @api_client.config.debugging
|
|
160
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.customer_customer_id_uasge_limit_limit_id_delete ...'
|
|
161
|
+
end
|
|
162
|
+
# verify the required parameter 'customer_id' is set
|
|
163
|
+
if @api_client.config.client_side_validation && customer_id.nil?
|
|
164
|
+
fail ArgumentError, "Missing the required parameter 'customer_id' when calling UsageApi.customer_customer_id_uasge_limit_limit_id_delete"
|
|
165
|
+
end
|
|
166
|
+
# verify the required parameter 'usage_limit_id' is set
|
|
167
|
+
if @api_client.config.client_side_validation && usage_limit_id.nil?
|
|
168
|
+
fail ArgumentError, "Missing the required parameter 'usage_limit_id' when calling UsageApi.customer_customer_id_uasge_limit_limit_id_delete"
|
|
169
|
+
end
|
|
170
|
+
# resource path
|
|
171
|
+
local_var_path = '/customer/{customerId}/uasge-limit/{limitId}'.sub('{' + 'customerId' + '}', customer_id.to_s).sub('{' + 'usageLimitId' + '}', usage_limit_id.to_s)
|
|
172
|
+
|
|
173
|
+
# query parameters
|
|
174
|
+
query_params = opts[:query_params] || {}
|
|
175
|
+
|
|
176
|
+
# header parameters
|
|
177
|
+
header_params = opts[:header_params] || {}
|
|
178
|
+
|
|
179
|
+
# form parameters
|
|
180
|
+
form_params = opts[:form_params] || {}
|
|
181
|
+
|
|
182
|
+
# http body (model)
|
|
183
|
+
post_body = opts[:body]
|
|
184
|
+
|
|
185
|
+
return_type = opts[:return_type]
|
|
186
|
+
|
|
187
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
188
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
189
|
+
:header_params => header_params,
|
|
190
|
+
:query_params => query_params,
|
|
191
|
+
:form_params => form_params,
|
|
192
|
+
:body => post_body,
|
|
193
|
+
:auth_names => auth_names,
|
|
194
|
+
:return_type => return_type)
|
|
195
|
+
|
|
196
|
+
if @api_client.config.debugging
|
|
197
|
+
@api_client.config.logger.debug "API called: UsageApi#customer_customer_id_uasge_limit_limit_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
198
|
+
end
|
|
199
|
+
return data, status_code, headers
|
|
200
|
+
end
|
|
201
|
+
# Usage Cost Estimate
|
|
202
|
+
# The estimated costs from usage based billing for a customer
|
|
203
|
+
# @param customer_id The id of the customer to retrieve
|
|
204
|
+
# @param [Hash] opts the optional parameters
|
|
205
|
+
# @return [InlineResponse2001]
|
|
206
|
+
def get_customer_costs(customer_id, opts = {})
|
|
207
|
+
data, _status_code, _headers = get_customer_costs_with_http_info(customer_id, opts)
|
|
208
|
+
data
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Usage Cost Estimate
|
|
212
|
+
# The estimated costs from usage based billing for a customer
|
|
213
|
+
# @param customer_id The id of the customer to retrieve
|
|
214
|
+
# @param [Hash] opts the optional parameters
|
|
215
|
+
# @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
|
|
216
|
+
def get_customer_costs_with_http_info(customer_id, opts = {})
|
|
217
|
+
if @api_client.config.debugging
|
|
218
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.get_customer_costs ...'
|
|
219
|
+
end
|
|
220
|
+
# verify the required parameter 'customer_id' is set
|
|
221
|
+
if @api_client.config.client_side_validation && customer_id.nil?
|
|
222
|
+
fail ArgumentError, "Missing the required parameter 'customer_id' when calling UsageApi.get_customer_costs"
|
|
223
|
+
end
|
|
224
|
+
# resource path
|
|
225
|
+
local_var_path = '/customer/{customerId}/costs'.sub('{' + 'customerId' + '}', customer_id.to_s)
|
|
226
|
+
|
|
227
|
+
# query parameters
|
|
228
|
+
query_params = opts[:query_params] || {}
|
|
229
|
+
|
|
230
|
+
# header parameters
|
|
231
|
+
header_params = opts[:header_params] || {}
|
|
232
|
+
# HTTP header 'Accept' (if needed)
|
|
233
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
234
|
+
|
|
235
|
+
# form parameters
|
|
236
|
+
form_params = opts[:form_params] || {}
|
|
237
|
+
|
|
238
|
+
# http body (model)
|
|
239
|
+
post_body = opts[:body]
|
|
240
|
+
|
|
241
|
+
return_type = opts[:return_type] || 'InlineResponse2001'
|
|
242
|
+
|
|
243
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
244
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
245
|
+
:header_params => header_params,
|
|
246
|
+
:query_params => query_params,
|
|
247
|
+
:form_params => form_params,
|
|
248
|
+
:body => post_body,
|
|
249
|
+
:auth_names => auth_names,
|
|
250
|
+
:return_type => return_type)
|
|
251
|
+
|
|
252
|
+
if @api_client.config.debugging
|
|
253
|
+
@api_client.config.logger.debug "API called: UsageApi#get_customer_costs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
254
|
+
end
|
|
255
|
+
return data, status_code, headers
|
|
256
|
+
end
|
|
257
|
+
# Fetch Customer Usage Limits
|
|
258
|
+
# Usage Limits for a specific customer
|
|
259
|
+
# @param customer_id The id of the customer to retrieve
|
|
260
|
+
# @param [Hash] opts the optional parameters
|
|
261
|
+
# @return [InlineResponse2005]
|
|
262
|
+
def get_customer_usage_limits_by_id(customer_id, opts = {})
|
|
263
|
+
data, _status_code, _headers = get_customer_usage_limits_by_id_with_http_info(customer_id, opts)
|
|
264
|
+
data
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# Fetch Customer Usage Limits
|
|
268
|
+
# Usage Limits for a specific customer
|
|
269
|
+
# @param customer_id The id of the customer to retrieve
|
|
270
|
+
# @param [Hash] opts the optional parameters
|
|
271
|
+
# @return [Array<(InlineResponse2005, Integer, Hash)>] InlineResponse2005 data, response status code and response headers
|
|
272
|
+
def get_customer_usage_limits_by_id_with_http_info(customer_id, opts = {})
|
|
273
|
+
if @api_client.config.debugging
|
|
274
|
+
@api_client.config.logger.debug 'Calling API: UsageApi.get_customer_usage_limits_by_id ...'
|
|
275
|
+
end
|
|
276
|
+
# verify the required parameter 'customer_id' is set
|
|
277
|
+
if @api_client.config.client_side_validation && customer_id.nil?
|
|
278
|
+
fail ArgumentError, "Missing the required parameter 'customer_id' when calling UsageApi.get_customer_usage_limits_by_id"
|
|
279
|
+
end
|
|
280
|
+
# resource path
|
|
281
|
+
local_var_path = '/customer/{customerId}/uasge-limit'.sub('{' + 'customerId' + '}', customer_id.to_s)
|
|
282
|
+
|
|
283
|
+
# query parameters
|
|
284
|
+
query_params = opts[:query_params] || {}
|
|
285
|
+
|
|
286
|
+
# header parameters
|
|
287
|
+
header_params = opts[:header_params] || {}
|
|
288
|
+
# HTTP header 'Accept' (if needed)
|
|
289
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
290
|
+
|
|
291
|
+
# form parameters
|
|
292
|
+
form_params = opts[:form_params] || {}
|
|
293
|
+
|
|
294
|
+
# http body (model)
|
|
295
|
+
post_body = opts[:body]
|
|
296
|
+
|
|
297
|
+
return_type = opts[:return_type] || 'InlineResponse2005'
|
|
298
|
+
|
|
299
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth']
|
|
300
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
301
|
+
:header_params => header_params,
|
|
302
|
+
:query_params => query_params,
|
|
303
|
+
:form_params => form_params,
|
|
304
|
+
:body => post_body,
|
|
305
|
+
:auth_names => auth_names,
|
|
306
|
+
:return_type => return_type)
|
|
307
|
+
|
|
308
|
+
if @api_client.config.debugging
|
|
309
|
+
@api_client.config.logger.debug "API called: UsageApi#get_customer_usage_limits_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
310
|
+
end
|
|
311
|
+
return data, status_code, headers
|
|
312
|
+
end
|
|
313
|
+
end
|
|
314
|
+
end
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
#The REST API provided by BillaBear
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 1.
|
|
6
|
+
OpenAPI spec version: 1.1.0
|
|
7
7
|
Contact: support@billabear.com
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 3.0.
|
|
9
|
+
Swagger Codegen version: 3.0.66
|
|
10
10
|
=end
|
|
11
11
|
|
|
12
12
|
require 'date'
|
|
@@ -16,7 +16,7 @@ require 'tempfile'
|
|
|
16
16
|
require 'typhoeus'
|
|
17
17
|
require 'uri'
|
|
18
18
|
|
|
19
|
-
module
|
|
19
|
+
module Billabear
|
|
20
20
|
class ApiClient
|
|
21
21
|
# The Configuration object holding settings to be used in the API client.
|
|
22
22
|
attr_accessor :config
|
|
@@ -237,7 +237,7 @@ module SwaggerClient
|
|
|
237
237
|
end
|
|
238
238
|
else
|
|
239
239
|
# models, e.g. Pet
|
|
240
|
-
|
|
240
|
+
Billabear.const_get(return_type).build_from_hash(data)
|
|
241
241
|
end
|
|
242
242
|
end
|
|
243
243
|
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
#The REST API provided by BillaBear
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 1.
|
|
6
|
+
OpenAPI spec version: 1.1.0
|
|
7
7
|
Contact: support@billabear.com
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 3.0.
|
|
9
|
+
Swagger Codegen version: 3.0.66
|
|
10
10
|
=end
|
|
11
11
|
|
|
12
|
-
module
|
|
12
|
+
module Billabear
|
|
13
13
|
class ApiError < StandardError
|
|
14
14
|
attr_reader :code, :response_headers, :response_body
|
|
15
15
|
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
#The REST API provided by BillaBear
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 1.
|
|
6
|
+
OpenAPI spec version: 1.1.0
|
|
7
7
|
Contact: support@billabear.com
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 3.0.
|
|
9
|
+
Swagger Codegen version: 3.0.66
|
|
10
10
|
=end
|
|
11
11
|
|
|
12
|
-
module
|
|
12
|
+
module Billabear
|
|
13
13
|
class Configuration
|
|
14
14
|
# Defines url scheme
|
|
15
15
|
attr_accessor :scheme
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
|
|
4
4
|
#The REST API provided by BillaBear
|
|
5
5
|
|
|
6
|
-
OpenAPI spec version: 1.
|
|
6
|
+
OpenAPI spec version: 1.1.0
|
|
7
7
|
Contact: support@billabear.com
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
-
Swagger Codegen version: 3.0.
|
|
9
|
+
Swagger Codegen version: 3.0.66
|
|
10
10
|
=end
|
|
11
11
|
|
|
12
12
|
require 'date'
|
|
13
13
|
|
|
14
|
-
module
|
|
14
|
+
module Billabear
|
|
15
15
|
class Address
|
|
16
16
|
attr_accessor :company_name
|
|
17
17
|
|
|
@@ -63,13 +63,13 @@ module SwaggerClient
|
|
|
63
63
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
64
|
def initialize(attributes = {})
|
|
65
65
|
if (!attributes.is_a?(Hash))
|
|
66
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Billabear::Address` initialize method"
|
|
67
67
|
end
|
|
68
68
|
|
|
69
69
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
70
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
71
71
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
72
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Billabear::Address`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
73
73
|
end
|
|
74
74
|
h[k.to_sym] = v
|
|
75
75
|
}
|
|
@@ -213,7 +213,7 @@ module SwaggerClient
|
|
|
213
213
|
end
|
|
214
214
|
end
|
|
215
215
|
else # model
|
|
216
|
-
|
|
216
|
+
Billabear.const_get(type).build_from_hash(value)
|
|
217
217
|
end
|
|
218
218
|
end
|
|
219
219
|
|