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/PricesApi.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Billabear::PricesApi
|
|
2
2
|
|
|
3
3
|
All URIs are relative to *https://{customerId}.billabear.cloud/api/v1*
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ Method | HTTP request | Description
|
|
|
8
8
|
[**list_price**](PricesApi.md#list_price) | **GET** /product/{productId}/price | List
|
|
9
9
|
|
|
10
10
|
# **create_price**
|
|
11
|
-
>
|
|
11
|
+
> create_price(bodyproduct_id)
|
|
12
12
|
|
|
13
13
|
Create
|
|
14
14
|
|
|
@@ -17,25 +17,24 @@ Create a price
|
|
|
17
17
|
### Example
|
|
18
18
|
```ruby
|
|
19
19
|
# load the gem
|
|
20
|
-
require '
|
|
20
|
+
require 'billabear'
|
|
21
21
|
# setup authorization
|
|
22
|
-
|
|
22
|
+
Billabear.configure do |config|
|
|
23
23
|
# Configure API key authorization: ApiKeyAuth
|
|
24
24
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
25
25
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
26
26
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
api_instance =
|
|
30
|
-
body =
|
|
29
|
+
api_instance = Billabear::PricesApi.new
|
|
30
|
+
body = Billabear::Price.new # Price |
|
|
31
31
|
product_id = 'product_id_example' # String | The id of the product to retrieve
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
begin
|
|
35
35
|
#Create
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
rescue SwaggerClient::ApiError => e
|
|
36
|
+
api_instance.create_price(bodyproduct_id)
|
|
37
|
+
rescue Billabear::ApiError => e
|
|
39
38
|
puts "Exception when calling PricesApi->create_price: #{e}"
|
|
40
39
|
end
|
|
41
40
|
```
|
|
@@ -49,7 +48,7 @@ Name | Type | Description | Notes
|
|
|
49
48
|
|
|
50
49
|
### Return type
|
|
51
50
|
|
|
52
|
-
|
|
51
|
+
nil (empty response body)
|
|
53
52
|
|
|
54
53
|
### Authorization
|
|
55
54
|
|
|
@@ -63,7 +62,7 @@ Name | Type | Description | Notes
|
|
|
63
62
|
|
|
64
63
|
|
|
65
64
|
# **list_price**
|
|
66
|
-
>
|
|
65
|
+
> InlineResponse20011 list_price(product_id, opts)
|
|
67
66
|
|
|
68
67
|
List
|
|
69
68
|
|
|
@@ -72,16 +71,16 @@ List all prices
|
|
|
72
71
|
### Example
|
|
73
72
|
```ruby
|
|
74
73
|
# load the gem
|
|
75
|
-
require '
|
|
74
|
+
require 'billabear'
|
|
76
75
|
# setup authorization
|
|
77
|
-
|
|
76
|
+
Billabear.configure do |config|
|
|
78
77
|
# Configure API key authorization: ApiKeyAuth
|
|
79
78
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
80
79
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
81
80
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
82
81
|
end
|
|
83
82
|
|
|
84
|
-
api_instance =
|
|
83
|
+
api_instance = Billabear::PricesApi.new
|
|
85
84
|
product_id = 'product_id_example' # String | The id of the product to retrieve
|
|
86
85
|
opts = {
|
|
87
86
|
limit: 56, # Integer | How many items to return at one time (max 100)
|
|
@@ -92,7 +91,7 @@ begin
|
|
|
92
91
|
#List
|
|
93
92
|
result = api_instance.list_price(product_id, opts)
|
|
94
93
|
p result
|
|
95
|
-
rescue
|
|
94
|
+
rescue Billabear::ApiError => e
|
|
96
95
|
puts "Exception when calling PricesApi->list_price: #{e}"
|
|
97
96
|
end
|
|
98
97
|
```
|
|
@@ -107,7 +106,7 @@ Name | Type | Description | Notes
|
|
|
107
106
|
|
|
108
107
|
### Return type
|
|
109
108
|
|
|
110
|
-
[**
|
|
109
|
+
[**InlineResponse20011**](InlineResponse20011.md)
|
|
111
110
|
|
|
112
111
|
### Authorization
|
|
113
112
|
|
data/docs/Product.md
CHANGED
data/docs/ProductTaxType.md
CHANGED
data/docs/ProductsApi.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Billabear::ProductsApi
|
|
2
2
|
|
|
3
3
|
All URIs are relative to *https://{customerId}.billabear.cloud/api/v1*
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ Method | HTTP request | Description
|
|
|
10
10
|
[**update_product**](ProductsApi.md#update_product) | **PUT** /product/{productId} | Update
|
|
11
11
|
|
|
12
12
|
# **create_product**
|
|
13
|
-
>
|
|
13
|
+
> create_product(body)
|
|
14
14
|
|
|
15
15
|
Create
|
|
16
16
|
|
|
@@ -19,24 +19,23 @@ Create a product
|
|
|
19
19
|
### Example
|
|
20
20
|
```ruby
|
|
21
21
|
# load the gem
|
|
22
|
-
require '
|
|
22
|
+
require 'billabear'
|
|
23
23
|
# setup authorization
|
|
24
|
-
|
|
24
|
+
Billabear.configure do |config|
|
|
25
25
|
# Configure API key authorization: ApiKeyAuth
|
|
26
26
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
27
27
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
28
28
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
-
api_instance =
|
|
32
|
-
body =
|
|
31
|
+
api_instance = Billabear::ProductsApi.new
|
|
32
|
+
body = Billabear::Product.new # Product |
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
begin
|
|
36
36
|
#Create
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
rescue SwaggerClient::ApiError => e
|
|
37
|
+
api_instance.create_product(body)
|
|
38
|
+
rescue Billabear::ApiError => e
|
|
40
39
|
puts "Exception when calling ProductsApi->create_product: #{e}"
|
|
41
40
|
end
|
|
42
41
|
```
|
|
@@ -49,7 +48,7 @@ Name | Type | Description | Notes
|
|
|
49
48
|
|
|
50
49
|
### Return type
|
|
51
50
|
|
|
52
|
-
|
|
51
|
+
nil (empty response body)
|
|
53
52
|
|
|
54
53
|
### Authorization
|
|
55
54
|
|
|
@@ -63,7 +62,7 @@ Name | Type | Description | Notes
|
|
|
63
62
|
|
|
64
63
|
|
|
65
64
|
# **list_product**
|
|
66
|
-
>
|
|
65
|
+
> InlineResponse20010 list_product(opts)
|
|
67
66
|
|
|
68
67
|
List
|
|
69
68
|
|
|
@@ -72,16 +71,16 @@ List all products
|
|
|
72
71
|
### Example
|
|
73
72
|
```ruby
|
|
74
73
|
# load the gem
|
|
75
|
-
require '
|
|
74
|
+
require 'billabear'
|
|
76
75
|
# setup authorization
|
|
77
|
-
|
|
76
|
+
Billabear.configure do |config|
|
|
78
77
|
# Configure API key authorization: ApiKeyAuth
|
|
79
78
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
80
79
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
81
80
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
82
81
|
end
|
|
83
82
|
|
|
84
|
-
api_instance =
|
|
83
|
+
api_instance = Billabear::ProductsApi.new
|
|
85
84
|
opts = {
|
|
86
85
|
limit: 56, # Integer | How many items to return at one time (max 100)
|
|
87
86
|
last_key: 'last_key_example', # String | The key to be used in pagination to say what the last key of the previous page was
|
|
@@ -92,7 +91,7 @@ begin
|
|
|
92
91
|
#List
|
|
93
92
|
result = api_instance.list_product(opts)
|
|
94
93
|
p result
|
|
95
|
-
rescue
|
|
94
|
+
rescue Billabear::ApiError => e
|
|
96
95
|
puts "Exception when calling ProductsApi->list_product: #{e}"
|
|
97
96
|
end
|
|
98
97
|
```
|
|
@@ -107,7 +106,7 @@ Name | Type | Description | Notes
|
|
|
107
106
|
|
|
108
107
|
### Return type
|
|
109
108
|
|
|
110
|
-
[**
|
|
109
|
+
[**InlineResponse20010**](InlineResponse20010.md)
|
|
111
110
|
|
|
112
111
|
### Authorization
|
|
113
112
|
|
|
@@ -130,16 +129,16 @@ Info for a specific product
|
|
|
130
129
|
### Example
|
|
131
130
|
```ruby
|
|
132
131
|
# load the gem
|
|
133
|
-
require '
|
|
132
|
+
require 'billabear'
|
|
134
133
|
# setup authorization
|
|
135
|
-
|
|
134
|
+
Billabear.configure do |config|
|
|
136
135
|
# Configure API key authorization: ApiKeyAuth
|
|
137
136
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
138
137
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
139
138
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
140
139
|
end
|
|
141
140
|
|
|
142
|
-
api_instance =
|
|
141
|
+
api_instance = Billabear::ProductsApi.new
|
|
143
142
|
product_id = 'product_id_example' # String | The id of the product to retrieve
|
|
144
143
|
|
|
145
144
|
|
|
@@ -147,7 +146,7 @@ begin
|
|
|
147
146
|
#Detail
|
|
148
147
|
result = api_instance.show_product_by_id(product_id)
|
|
149
148
|
p result
|
|
150
|
-
rescue
|
|
149
|
+
rescue Billabear::ApiError => e
|
|
151
150
|
puts "Exception when calling ProductsApi->show_product_by_id: #{e}"
|
|
152
151
|
end
|
|
153
152
|
```
|
|
@@ -183,16 +182,16 @@ Update a product
|
|
|
183
182
|
### Example
|
|
184
183
|
```ruby
|
|
185
184
|
# load the gem
|
|
186
|
-
require '
|
|
185
|
+
require 'billabear'
|
|
187
186
|
# setup authorization
|
|
188
|
-
|
|
187
|
+
Billabear.configure do |config|
|
|
189
188
|
# Configure API key authorization: ApiKeyAuth
|
|
190
189
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
191
190
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
192
191
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
193
192
|
end
|
|
194
193
|
|
|
195
|
-
api_instance =
|
|
194
|
+
api_instance = Billabear::ProductsApi.new
|
|
196
195
|
product_id = 'product_id_example' # String | The id of the product to retrieve
|
|
197
196
|
|
|
198
197
|
|
|
@@ -200,7 +199,7 @@ begin
|
|
|
200
199
|
#Update
|
|
201
200
|
result = api_instance.update_product(product_id)
|
|
202
201
|
p result
|
|
203
|
-
rescue
|
|
202
|
+
rescue Billabear::ApiError => e
|
|
204
203
|
puts "Exception when calling ProductsApi->update_product: #{e}"
|
|
205
204
|
end
|
|
206
205
|
```
|
data/docs/ReceiptApi.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Billabear::ReceiptApi
|
|
2
2
|
|
|
3
3
|
All URIs are relative to *https://{customerId}.billabear.cloud/api/v1*
|
|
4
4
|
|
|
@@ -16,16 +16,16 @@ Returns the pdf blob for the Receipt
|
|
|
16
16
|
### Example
|
|
17
17
|
```ruby
|
|
18
18
|
# load the gem
|
|
19
|
-
require '
|
|
19
|
+
require 'billabear'
|
|
20
20
|
# setup authorization
|
|
21
|
-
|
|
21
|
+
Billabear.configure do |config|
|
|
22
22
|
# Configure API key authorization: ApiKeyAuth
|
|
23
23
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
24
24
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
25
25
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
-
api_instance =
|
|
28
|
+
api_instance = Billabear::ReceiptApi.new
|
|
29
29
|
receipt = 'receipt_example' # String | The id of the receipt
|
|
30
30
|
|
|
31
31
|
|
|
@@ -33,7 +33,7 @@ begin
|
|
|
33
33
|
#Download Receipt
|
|
34
34
|
result = api_instance.download_receipt(receipt)
|
|
35
35
|
p result
|
|
36
|
-
rescue
|
|
36
|
+
rescue Billabear::ApiError => e
|
|
37
37
|
puts "Exception when calling ReceiptApi->download_receipt: #{e}"
|
|
38
38
|
end
|
|
39
39
|
```
|
data/docs/Refund.md
CHANGED
data/docs/RefundsApi.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Billabear::RefundsApi
|
|
2
2
|
|
|
3
3
|
All URIs are relative to *https://{customerId}.billabear.cloud/api/v1*
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@ Method | HTTP request | Description
|
|
|
9
9
|
[**show_refund_by_id**](RefundsApi.md#show_refund_by_id) | **GET** /refund/{refundId} | Detail
|
|
10
10
|
|
|
11
11
|
# **get_refunds_for_customer**
|
|
12
|
-
>
|
|
12
|
+
> InlineResponse2003 get_refunds_for_customer(customer_id, opts)
|
|
13
13
|
|
|
14
14
|
List Customer Refunds
|
|
15
15
|
|
|
@@ -18,16 +18,16 @@ List Customer Refund
|
|
|
18
18
|
### Example
|
|
19
19
|
```ruby
|
|
20
20
|
# load the gem
|
|
21
|
-
require '
|
|
21
|
+
require 'billabear'
|
|
22
22
|
# setup authorization
|
|
23
|
-
|
|
23
|
+
Billabear.configure do |config|
|
|
24
24
|
# Configure API key authorization: ApiKeyAuth
|
|
25
25
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
26
26
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
27
27
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
api_instance =
|
|
30
|
+
api_instance = Billabear::RefundsApi.new
|
|
31
31
|
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
32
32
|
opts = {
|
|
33
33
|
limit: 56, # Integer | How many items to return at one time (max 100)
|
|
@@ -39,7 +39,7 @@ begin
|
|
|
39
39
|
#List Customer Refunds
|
|
40
40
|
result = api_instance.get_refunds_for_customer(customer_id, opts)
|
|
41
41
|
p result
|
|
42
|
-
rescue
|
|
42
|
+
rescue Billabear::ApiError => e
|
|
43
43
|
puts "Exception when calling RefundsApi->get_refunds_for_customer: #{e}"
|
|
44
44
|
end
|
|
45
45
|
```
|
|
@@ -55,7 +55,7 @@ Name | Type | Description | Notes
|
|
|
55
55
|
|
|
56
56
|
### Return type
|
|
57
57
|
|
|
58
|
-
[**
|
|
58
|
+
[**InlineResponse2003**](InlineResponse2003.md)
|
|
59
59
|
|
|
60
60
|
### Authorization
|
|
61
61
|
|
|
@@ -69,7 +69,7 @@ Name | Type | Description | Notes
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
# **list_refund**
|
|
72
|
-
>
|
|
72
|
+
> InlineResponse2003 list_refund(opts)
|
|
73
73
|
|
|
74
74
|
List
|
|
75
75
|
|
|
@@ -78,16 +78,16 @@ List all refund
|
|
|
78
78
|
### Example
|
|
79
79
|
```ruby
|
|
80
80
|
# load the gem
|
|
81
|
-
require '
|
|
81
|
+
require 'billabear'
|
|
82
82
|
# setup authorization
|
|
83
|
-
|
|
83
|
+
Billabear.configure do |config|
|
|
84
84
|
# Configure API key authorization: ApiKeyAuth
|
|
85
85
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
86
86
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
87
87
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
88
88
|
end
|
|
89
89
|
|
|
90
|
-
api_instance =
|
|
90
|
+
api_instance = Billabear::RefundsApi.new
|
|
91
91
|
opts = {
|
|
92
92
|
limit: 56, # Integer | How many items to return at one time (max 100)
|
|
93
93
|
last_key: 'last_key_example', # String | The key to be used in pagination to say what the last key of the previous page was
|
|
@@ -98,7 +98,7 @@ begin
|
|
|
98
98
|
#List
|
|
99
99
|
result = api_instance.list_refund(opts)
|
|
100
100
|
p result
|
|
101
|
-
rescue
|
|
101
|
+
rescue Billabear::ApiError => e
|
|
102
102
|
puts "Exception when calling RefundsApi->list_refund: #{e}"
|
|
103
103
|
end
|
|
104
104
|
```
|
|
@@ -113,7 +113,7 @@ Name | Type | Description | Notes
|
|
|
113
113
|
|
|
114
114
|
### Return type
|
|
115
115
|
|
|
116
|
-
[**
|
|
116
|
+
[**InlineResponse2003**](InlineResponse2003.md)
|
|
117
117
|
|
|
118
118
|
### Authorization
|
|
119
119
|
|
|
@@ -136,16 +136,16 @@ Info for a specific Refund
|
|
|
136
136
|
### Example
|
|
137
137
|
```ruby
|
|
138
138
|
# load the gem
|
|
139
|
-
require '
|
|
139
|
+
require 'billabear'
|
|
140
140
|
# setup authorization
|
|
141
|
-
|
|
141
|
+
Billabear.configure do |config|
|
|
142
142
|
# Configure API key authorization: ApiKeyAuth
|
|
143
143
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
144
144
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
145
145
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
146
146
|
end
|
|
147
147
|
|
|
148
|
-
api_instance =
|
|
148
|
+
api_instance = Billabear::RefundsApi.new
|
|
149
149
|
refund_id = 'refund_id_example' # String | The id of the refund
|
|
150
150
|
|
|
151
151
|
|
|
@@ -153,7 +153,7 @@ begin
|
|
|
153
153
|
#Detail
|
|
154
154
|
result = api_instance.show_refund_by_id(refund_id)
|
|
155
155
|
p result
|
|
156
|
-
rescue
|
|
156
|
+
rescue Billabear::ApiError => e
|
|
157
157
|
puts "Exception when calling RefundsApi->show_refund_by_id: #{e}"
|
|
158
158
|
end
|
|
159
159
|
```
|
data/docs/SeatsAddBody.md
CHANGED
data/docs/SeatsRemoveBody.md
CHANGED
data/docs/Subscription.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Billabear::Subscription
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
Name | Type | Description | Notes
|
|
@@ -13,6 +13,7 @@ Name | Type | Description | Notes
|
|
|
13
13
|
**valid_until** | **String** | | [optional]
|
|
14
14
|
**main_external_reference** | **String** | | [optional]
|
|
15
15
|
**child_external_reference** | **String** | | [optional]
|
|
16
|
+
**metadata** | **Object** | | [optional]
|
|
16
17
|
**price** | [**Price**](Price.md) | | [optional]
|
|
17
18
|
**plan** | [**SubscriptionPlan**](SubscriptionPlan.md) | | [optional]
|
|
18
19
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Billabear::SubscriptionIdPlanBody
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
|
6
6
|
**_when** | **String** | |
|
|
7
|
-
**plan** | **String** | The ID for the subscription plan to be used |
|
|
7
|
+
**plan** | **String** | The ID for the subscription plan to be used |
|
|
8
8
|
**price** | **String** | The ID for the price to be used |
|
|
9
9
|
|
data/docs/SubscriptionPlan.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Billabear::SubscriptionStartBody
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
Name | Type | Description | Notes
|
|
@@ -11,4 +11,5 @@ Name | Type | Description | Notes
|
|
|
11
11
|
**currency** | **String** | The currency of the plan that is to be started. Only used if price isn't given. Requires schedule as well. | [optional]
|
|
12
12
|
**seat_numbrers** | **Integer** | | [optional]
|
|
13
13
|
**deny_trial** | [**Bool**](Bool.md) | | [optional]
|
|
14
|
+
**metadata** | **Object** | Any metadata you want to add to a subscription | [optional]
|
|
14
15
|
|