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/CustomersApi.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Billabear::CustomersApi
|
|
2
2
|
|
|
3
3
|
All URIs are relative to *https://{customerId}.billabear.cloud/api/v1*
|
|
4
4
|
|
|
@@ -7,12 +7,16 @@ Method | HTTP request | Description
|
|
|
7
7
|
[**add_seats_subscriptions**](CustomersApi.md#add_seats_subscriptions) | **POST** /subscription/{subscriptionId}/seats/add | Add Seats
|
|
8
8
|
[**apply_voucher_to_customer**](CustomersApi.md#apply_voucher_to_customer) | **POST** /customer/{customerId}/voucher | Apply voucher
|
|
9
9
|
[**create_customer**](CustomersApi.md#create_customer) | **POST** /customer | Create
|
|
10
|
+
[**create_customer_usage_limit**](CustomersApi.md#create_customer_usage_limit) | **POST** /customer/{customerId}/uasge-limit | Create Usage Limit
|
|
11
|
+
[**customer_customer_id_uasge_limit_limit_id_delete**](CustomersApi.md#customer_customer_id_uasge_limit_limit_id_delete) | **DELETE** /customer/{customerId}/uasge-limit/{limitId} | Delete Usage Limit
|
|
10
12
|
[**disable_customer**](CustomersApi.md#disable_customer) | **POST** /customer/{customerId}/disable | Disable Customer
|
|
11
13
|
[**enable_customer**](CustomersApi.md#enable_customer) | **POST** /customer/{customerId}/enable | Enable Customer
|
|
12
14
|
[**get_active_for_customer**](CustomersApi.md#get_active_for_customer) | **GET** /customer/{customerId}/subscription/active | List Customer Active Subscriptions
|
|
13
15
|
[**get_all_customers**](CustomersApi.md#get_all_customers) | **GET** /customer | List
|
|
14
16
|
[**get_customer_by_id**](CustomersApi.md#get_customer_by_id) | **GET** /customer/{customerId} | Detail
|
|
17
|
+
[**get_customer_costs**](CustomersApi.md#get_customer_costs) | **GET** /customer/{customerId}/costs | Usage Cost Estimate
|
|
15
18
|
[**get_customer_limits_by_id**](CustomersApi.md#get_customer_limits_by_id) | **GET** /customer/{customerId}/limits | Fetch Customer Limits
|
|
19
|
+
[**get_customer_usage_limits_by_id**](CustomersApi.md#get_customer_usage_limits_by_id) | **GET** /customer/{customerId}/uasge-limit | Fetch Customer Usage Limits
|
|
16
20
|
[**get_for_customer**](CustomersApi.md#get_for_customer) | **GET** /customer/{customerId}/subscription | List Customer Subscriptions
|
|
17
21
|
[**get_invoices_for_customer**](CustomersApi.md#get_invoices_for_customer) | **GET** /customer/{customerId}/invoices | List Customer Invoices
|
|
18
22
|
[**get_payments_for_customer**](CustomersApi.md#get_payments_for_customer) | **GET** /customer/{customerId}/payment | List Customer Payments
|
|
@@ -22,7 +26,7 @@ Method | HTTP request | Description
|
|
|
22
26
|
[**update_customer**](CustomersApi.md#update_customer) | **PUT** /customer/{customerId} | Update
|
|
23
27
|
|
|
24
28
|
# **add_seats_subscriptions**
|
|
25
|
-
>
|
|
29
|
+
> InlineResponse20013 add_seats_subscriptions(bodysubscription_id)
|
|
26
30
|
|
|
27
31
|
Add Seats
|
|
28
32
|
|
|
@@ -31,17 +35,17 @@ Adds seats to a per seat subscription<br><br><strong>Since 1.1.4</strong>
|
|
|
31
35
|
### Example
|
|
32
36
|
```ruby
|
|
33
37
|
# load the gem
|
|
34
|
-
require '
|
|
38
|
+
require 'billabear'
|
|
35
39
|
# setup authorization
|
|
36
|
-
|
|
40
|
+
Billabear.configure do |config|
|
|
37
41
|
# Configure API key authorization: ApiKeyAuth
|
|
38
42
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
39
43
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
40
44
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
41
45
|
end
|
|
42
46
|
|
|
43
|
-
api_instance =
|
|
44
|
-
body =
|
|
47
|
+
api_instance = Billabear::CustomersApi.new
|
|
48
|
+
body = Billabear::SeatsAddBody.new # SeatsAddBody |
|
|
45
49
|
subscription_id = 'subscription_id_example' # String | The id of the subscription to retrieve
|
|
46
50
|
|
|
47
51
|
|
|
@@ -49,7 +53,7 @@ begin
|
|
|
49
53
|
#Add Seats
|
|
50
54
|
result = api_instance.add_seats_subscriptions(bodysubscription_id)
|
|
51
55
|
p result
|
|
52
|
-
rescue
|
|
56
|
+
rescue Billabear::ApiError => e
|
|
53
57
|
puts "Exception when calling CustomersApi->add_seats_subscriptions: #{e}"
|
|
54
58
|
end
|
|
55
59
|
```
|
|
@@ -63,7 +67,7 @@ Name | Type | Description | Notes
|
|
|
63
67
|
|
|
64
68
|
### Return type
|
|
65
69
|
|
|
66
|
-
[**
|
|
70
|
+
[**InlineResponse20013**](InlineResponse20013.md)
|
|
67
71
|
|
|
68
72
|
### Authorization
|
|
69
73
|
|
|
@@ -77,7 +81,7 @@ Name | Type | Description | Notes
|
|
|
77
81
|
|
|
78
82
|
|
|
79
83
|
# **apply_voucher_to_customer**
|
|
80
|
-
>
|
|
84
|
+
> apply_voucher_to_customer(bodycustomer_id)
|
|
81
85
|
|
|
82
86
|
Apply voucher
|
|
83
87
|
|
|
@@ -86,25 +90,24 @@ Apply Voucher to Customer
|
|
|
86
90
|
### Example
|
|
87
91
|
```ruby
|
|
88
92
|
# load the gem
|
|
89
|
-
require '
|
|
93
|
+
require 'billabear'
|
|
90
94
|
# setup authorization
|
|
91
|
-
|
|
95
|
+
Billabear.configure do |config|
|
|
92
96
|
# Configure API key authorization: ApiKeyAuth
|
|
93
97
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
94
98
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
95
99
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
96
100
|
end
|
|
97
101
|
|
|
98
|
-
api_instance =
|
|
99
|
-
body =
|
|
102
|
+
api_instance = Billabear::CustomersApi.new
|
|
103
|
+
body = Billabear::VoucherCode.new # VoucherCode |
|
|
100
104
|
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
101
105
|
|
|
102
106
|
|
|
103
107
|
begin
|
|
104
108
|
#Apply voucher
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
rescue SwaggerClient::ApiError => e
|
|
109
|
+
api_instance.apply_voucher_to_customer(bodycustomer_id)
|
|
110
|
+
rescue Billabear::ApiError => e
|
|
108
111
|
puts "Exception when calling CustomersApi->apply_voucher_to_customer: #{e}"
|
|
109
112
|
end
|
|
110
113
|
```
|
|
@@ -118,7 +121,7 @@ Name | Type | Description | Notes
|
|
|
118
121
|
|
|
119
122
|
### Return type
|
|
120
123
|
|
|
121
|
-
|
|
124
|
+
nil (empty response body)
|
|
122
125
|
|
|
123
126
|
### Authorization
|
|
124
127
|
|
|
@@ -141,24 +144,24 @@ Create a customer
|
|
|
141
144
|
### Example
|
|
142
145
|
```ruby
|
|
143
146
|
# load the gem
|
|
144
|
-
require '
|
|
147
|
+
require 'billabear'
|
|
145
148
|
# setup authorization
|
|
146
|
-
|
|
149
|
+
Billabear.configure do |config|
|
|
147
150
|
# Configure API key authorization: ApiKeyAuth
|
|
148
151
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
149
152
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
150
153
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
151
154
|
end
|
|
152
155
|
|
|
153
|
-
api_instance =
|
|
154
|
-
body =
|
|
156
|
+
api_instance = Billabear::CustomersApi.new
|
|
157
|
+
body = Billabear::Customer.new # Customer |
|
|
155
158
|
|
|
156
159
|
|
|
157
160
|
begin
|
|
158
161
|
#Create
|
|
159
162
|
result = api_instance.create_customer(body)
|
|
160
163
|
p result
|
|
161
|
-
rescue
|
|
164
|
+
rescue Billabear::ApiError => e
|
|
162
165
|
puts "Exception when calling CustomersApi->create_customer: #{e}"
|
|
163
166
|
end
|
|
164
167
|
```
|
|
@@ -184,8 +187,117 @@ Name | Type | Description | Notes
|
|
|
184
187
|
|
|
185
188
|
|
|
186
189
|
|
|
190
|
+
# **create_customer_usage_limit**
|
|
191
|
+
> UsageLimit create_customer_usage_limit(bodycustomer_id)
|
|
192
|
+
|
|
193
|
+
Create Usage Limit
|
|
194
|
+
|
|
195
|
+
Create Usage Limit for the custoemr
|
|
196
|
+
|
|
197
|
+
### Example
|
|
198
|
+
```ruby
|
|
199
|
+
# load the gem
|
|
200
|
+
require 'billabear'
|
|
201
|
+
# setup authorization
|
|
202
|
+
Billabear.configure do |config|
|
|
203
|
+
# Configure API key authorization: ApiKeyAuth
|
|
204
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
205
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
206
|
+
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
api_instance = Billabear::CustomersApi.new
|
|
210
|
+
body = Billabear::CustomerIdUasgelimitBody.new # CustomerIdUasgelimitBody |
|
|
211
|
+
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
begin
|
|
215
|
+
#Create Usage Limit
|
|
216
|
+
result = api_instance.create_customer_usage_limit(bodycustomer_id)
|
|
217
|
+
p result
|
|
218
|
+
rescue Billabear::ApiError => e
|
|
219
|
+
puts "Exception when calling CustomersApi->create_customer_usage_limit: #{e}"
|
|
220
|
+
end
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Parameters
|
|
224
|
+
|
|
225
|
+
Name | Type | Description | Notes
|
|
226
|
+
------------- | ------------- | ------------- | -------------
|
|
227
|
+
**body** | [**CustomerIdUasgelimitBody**](CustomerIdUasgelimitBody.md)| |
|
|
228
|
+
**customer_id** | **String**| The id of the customer to retrieve |
|
|
229
|
+
|
|
230
|
+
### Return type
|
|
231
|
+
|
|
232
|
+
[**UsageLimit**](UsageLimit.md)
|
|
233
|
+
|
|
234
|
+
### Authorization
|
|
235
|
+
|
|
236
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
237
|
+
|
|
238
|
+
### HTTP request headers
|
|
239
|
+
|
|
240
|
+
- **Content-Type**: application/json
|
|
241
|
+
- **Accept**: application/json
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
# **customer_customer_id_uasge_limit_limit_id_delete**
|
|
246
|
+
> customer_customer_id_uasge_limit_limit_id_delete(customer_id, usage_limit_id)
|
|
247
|
+
|
|
248
|
+
Delete Usage Limit
|
|
249
|
+
|
|
250
|
+
Delete Usage Limit for the custoemr
|
|
251
|
+
|
|
252
|
+
### Example
|
|
253
|
+
```ruby
|
|
254
|
+
# load the gem
|
|
255
|
+
require 'billabear'
|
|
256
|
+
# setup authorization
|
|
257
|
+
Billabear.configure do |config|
|
|
258
|
+
# Configure API key authorization: ApiKeyAuth
|
|
259
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
260
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
261
|
+
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
api_instance = Billabear::CustomersApi.new
|
|
265
|
+
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
266
|
+
usage_limit_id = 'usage_limit_id_example' # String | The id of the usage limit
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
begin
|
|
270
|
+
#Delete Usage Limit
|
|
271
|
+
api_instance.customer_customer_id_uasge_limit_limit_id_delete(customer_id, usage_limit_id)
|
|
272
|
+
rescue Billabear::ApiError => e
|
|
273
|
+
puts "Exception when calling CustomersApi->customer_customer_id_uasge_limit_limit_id_delete: #{e}"
|
|
274
|
+
end
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### Parameters
|
|
278
|
+
|
|
279
|
+
Name | Type | Description | Notes
|
|
280
|
+
------------- | ------------- | ------------- | -------------
|
|
281
|
+
**customer_id** | **String**| The id of the customer to retrieve |
|
|
282
|
+
**usage_limit_id** | **String**| The id of the usage limit |
|
|
283
|
+
|
|
284
|
+
### Return type
|
|
285
|
+
|
|
286
|
+
nil (empty response body)
|
|
287
|
+
|
|
288
|
+
### Authorization
|
|
289
|
+
|
|
290
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
291
|
+
|
|
292
|
+
### HTTP request headers
|
|
293
|
+
|
|
294
|
+
- **Content-Type**: Not defined
|
|
295
|
+
- **Accept**: Not defined
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
187
299
|
# **disable_customer**
|
|
188
|
-
>
|
|
300
|
+
> disable_customer(customer_id)
|
|
189
301
|
|
|
190
302
|
Disable Customer
|
|
191
303
|
|
|
@@ -194,24 +306,23 @@ Disable customer
|
|
|
194
306
|
### Example
|
|
195
307
|
```ruby
|
|
196
308
|
# load the gem
|
|
197
|
-
require '
|
|
309
|
+
require 'billabear'
|
|
198
310
|
# setup authorization
|
|
199
|
-
|
|
311
|
+
Billabear.configure do |config|
|
|
200
312
|
# Configure API key authorization: ApiKeyAuth
|
|
201
313
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
202
314
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
203
315
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
204
316
|
end
|
|
205
317
|
|
|
206
|
-
api_instance =
|
|
318
|
+
api_instance = Billabear::CustomersApi.new
|
|
207
319
|
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
208
320
|
|
|
209
321
|
|
|
210
322
|
begin
|
|
211
323
|
#Disable Customer
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
rescue SwaggerClient::ApiError => e
|
|
324
|
+
api_instance.disable_customer(customer_id)
|
|
325
|
+
rescue Billabear::ApiError => e
|
|
215
326
|
puts "Exception when calling CustomersApi->disable_customer: #{e}"
|
|
216
327
|
end
|
|
217
328
|
```
|
|
@@ -224,7 +335,7 @@ Name | Type | Description | Notes
|
|
|
224
335
|
|
|
225
336
|
### Return type
|
|
226
337
|
|
|
227
|
-
|
|
338
|
+
nil (empty response body)
|
|
228
339
|
|
|
229
340
|
### Authorization
|
|
230
341
|
|
|
@@ -238,7 +349,7 @@ Name | Type | Description | Notes
|
|
|
238
349
|
|
|
239
350
|
|
|
240
351
|
# **enable_customer**
|
|
241
|
-
>
|
|
352
|
+
> enable_customer(customer_id)
|
|
242
353
|
|
|
243
354
|
Enable Customer
|
|
244
355
|
|
|
@@ -247,24 +358,23 @@ Enable a customer
|
|
|
247
358
|
### Example
|
|
248
359
|
```ruby
|
|
249
360
|
# load the gem
|
|
250
|
-
require '
|
|
361
|
+
require 'billabear'
|
|
251
362
|
# setup authorization
|
|
252
|
-
|
|
363
|
+
Billabear.configure do |config|
|
|
253
364
|
# Configure API key authorization: ApiKeyAuth
|
|
254
365
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
255
366
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
256
367
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
257
368
|
end
|
|
258
369
|
|
|
259
|
-
api_instance =
|
|
370
|
+
api_instance = Billabear::CustomersApi.new
|
|
260
371
|
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
261
372
|
|
|
262
373
|
|
|
263
374
|
begin
|
|
264
375
|
#Enable Customer
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
rescue SwaggerClient::ApiError => e
|
|
376
|
+
api_instance.enable_customer(customer_id)
|
|
377
|
+
rescue Billabear::ApiError => e
|
|
268
378
|
puts "Exception when calling CustomersApi->enable_customer: #{e}"
|
|
269
379
|
end
|
|
270
380
|
```
|
|
@@ -277,7 +387,7 @@ Name | Type | Description | Notes
|
|
|
277
387
|
|
|
278
388
|
### Return type
|
|
279
389
|
|
|
280
|
-
|
|
390
|
+
nil (empty response body)
|
|
281
391
|
|
|
282
392
|
### Authorization
|
|
283
393
|
|
|
@@ -291,7 +401,7 @@ Name | Type | Description | Notes
|
|
|
291
401
|
|
|
292
402
|
|
|
293
403
|
# **get_active_for_customer**
|
|
294
|
-
>
|
|
404
|
+
> InlineResponse2008 get_active_for_customer(customer_id)
|
|
295
405
|
|
|
296
406
|
List Customer Active Subscriptions
|
|
297
407
|
|
|
@@ -300,16 +410,16 @@ List all Active customer subscriptions
|
|
|
300
410
|
### Example
|
|
301
411
|
```ruby
|
|
302
412
|
# load the gem
|
|
303
|
-
require '
|
|
413
|
+
require 'billabear'
|
|
304
414
|
# setup authorization
|
|
305
|
-
|
|
415
|
+
Billabear.configure do |config|
|
|
306
416
|
# Configure API key authorization: ApiKeyAuth
|
|
307
417
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
308
418
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
309
419
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
310
420
|
end
|
|
311
421
|
|
|
312
|
-
api_instance =
|
|
422
|
+
api_instance = Billabear::CustomersApi.new
|
|
313
423
|
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
314
424
|
|
|
315
425
|
|
|
@@ -317,7 +427,7 @@ begin
|
|
|
317
427
|
#List Customer Active Subscriptions
|
|
318
428
|
result = api_instance.get_active_for_customer(customer_id)
|
|
319
429
|
p result
|
|
320
|
-
rescue
|
|
430
|
+
rescue Billabear::ApiError => e
|
|
321
431
|
puts "Exception when calling CustomersApi->get_active_for_customer: #{e}"
|
|
322
432
|
end
|
|
323
433
|
```
|
|
@@ -330,7 +440,7 @@ Name | Type | Description | Notes
|
|
|
330
440
|
|
|
331
441
|
### Return type
|
|
332
442
|
|
|
333
|
-
[**
|
|
443
|
+
[**InlineResponse2008**](InlineResponse2008.md)
|
|
334
444
|
|
|
335
445
|
### Authorization
|
|
336
446
|
|
|
@@ -353,30 +463,31 @@ List all customers
|
|
|
353
463
|
### Example
|
|
354
464
|
```ruby
|
|
355
465
|
# load the gem
|
|
356
|
-
require '
|
|
466
|
+
require 'billabear'
|
|
357
467
|
# setup authorization
|
|
358
|
-
|
|
468
|
+
Billabear.configure do |config|
|
|
359
469
|
# Configure API key authorization: ApiKeyAuth
|
|
360
470
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
361
471
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
362
472
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
363
473
|
end
|
|
364
474
|
|
|
365
|
-
api_instance =
|
|
475
|
+
api_instance = Billabear::CustomersApi.new
|
|
366
476
|
opts = {
|
|
367
477
|
limit: 56, # Integer | How many items to return at one time (max 100)
|
|
368
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
|
|
369
479
|
email: 'email_example', # String | The email to search for
|
|
370
480
|
country: 'country_example', # String | The country code to search for
|
|
371
481
|
reference: 'reference_example', # String | The reference to search for
|
|
372
|
-
external_reference: 'external_reference_example' # String | The external reference to search for
|
|
482
|
+
external_reference: 'external_reference_example', # String | The external reference to search for
|
|
483
|
+
company_name: 'company_name_example' # String | The company name to search for
|
|
373
484
|
}
|
|
374
485
|
|
|
375
486
|
begin
|
|
376
487
|
#List
|
|
377
488
|
result = api_instance.get_all_customers(opts)
|
|
378
489
|
p result
|
|
379
|
-
rescue
|
|
490
|
+
rescue Billabear::ApiError => e
|
|
380
491
|
puts "Exception when calling CustomersApi->get_all_customers: #{e}"
|
|
381
492
|
end
|
|
382
493
|
```
|
|
@@ -391,6 +502,7 @@ Name | Type | Description | Notes
|
|
|
391
502
|
**country** | **String**| The country code to search for | [optional]
|
|
392
503
|
**reference** | **String**| The reference to search for | [optional]
|
|
393
504
|
**external_reference** | **String**| The external reference to search for | [optional]
|
|
505
|
+
**company_name** | **String**| The company name to search for | [optional]
|
|
394
506
|
|
|
395
507
|
### Return type
|
|
396
508
|
|
|
@@ -417,16 +529,16 @@ Info for a specific customer
|
|
|
417
529
|
### Example
|
|
418
530
|
```ruby
|
|
419
531
|
# load the gem
|
|
420
|
-
require '
|
|
532
|
+
require 'billabear'
|
|
421
533
|
# setup authorization
|
|
422
|
-
|
|
534
|
+
Billabear.configure do |config|
|
|
423
535
|
# Configure API key authorization: ApiKeyAuth
|
|
424
536
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
425
537
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
426
538
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
427
539
|
end
|
|
428
540
|
|
|
429
|
-
api_instance =
|
|
541
|
+
api_instance = Billabear::CustomersApi.new
|
|
430
542
|
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
431
543
|
|
|
432
544
|
|
|
@@ -434,7 +546,7 @@ begin
|
|
|
434
546
|
#Detail
|
|
435
547
|
result = api_instance.get_customer_by_id(customer_id)
|
|
436
548
|
p result
|
|
437
|
-
rescue
|
|
549
|
+
rescue Billabear::ApiError => e
|
|
438
550
|
puts "Exception when calling CustomersApi->get_customer_by_id: #{e}"
|
|
439
551
|
end
|
|
440
552
|
```
|
|
@@ -460,8 +572,61 @@ Name | Type | Description | Notes
|
|
|
460
572
|
|
|
461
573
|
|
|
462
574
|
|
|
575
|
+
# **get_customer_costs**
|
|
576
|
+
> InlineResponse2001 get_customer_costs(customer_id)
|
|
577
|
+
|
|
578
|
+
Usage Cost Estimate
|
|
579
|
+
|
|
580
|
+
The estimated costs from usage based billing for a customer
|
|
581
|
+
|
|
582
|
+
### Example
|
|
583
|
+
```ruby
|
|
584
|
+
# load the gem
|
|
585
|
+
require 'billabear'
|
|
586
|
+
# setup authorization
|
|
587
|
+
Billabear.configure do |config|
|
|
588
|
+
# Configure API key authorization: ApiKeyAuth
|
|
589
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
590
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
591
|
+
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
592
|
+
end
|
|
593
|
+
|
|
594
|
+
api_instance = Billabear::CustomersApi.new
|
|
595
|
+
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
begin
|
|
599
|
+
#Usage Cost Estimate
|
|
600
|
+
result = api_instance.get_customer_costs(customer_id)
|
|
601
|
+
p result
|
|
602
|
+
rescue Billabear::ApiError => e
|
|
603
|
+
puts "Exception when calling CustomersApi->get_customer_costs: #{e}"
|
|
604
|
+
end
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
### Parameters
|
|
608
|
+
|
|
609
|
+
Name | Type | Description | Notes
|
|
610
|
+
------------- | ------------- | ------------- | -------------
|
|
611
|
+
**customer_id** | **String**| The id of the customer to retrieve |
|
|
612
|
+
|
|
613
|
+
### Return type
|
|
614
|
+
|
|
615
|
+
[**InlineResponse2001**](InlineResponse2001.md)
|
|
616
|
+
|
|
617
|
+
### Authorization
|
|
618
|
+
|
|
619
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
620
|
+
|
|
621
|
+
### HTTP request headers
|
|
622
|
+
|
|
623
|
+
- **Content-Type**: Not defined
|
|
624
|
+
- **Accept**: application/json
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
|
|
463
628
|
# **get_customer_limits_by_id**
|
|
464
|
-
>
|
|
629
|
+
> InlineResponse2002 get_customer_limits_by_id(customer_id)
|
|
465
630
|
|
|
466
631
|
Fetch Customer Limits
|
|
467
632
|
|
|
@@ -470,16 +635,16 @@ Limits for a specific customer
|
|
|
470
635
|
### Example
|
|
471
636
|
```ruby
|
|
472
637
|
# load the gem
|
|
473
|
-
require '
|
|
638
|
+
require 'billabear'
|
|
474
639
|
# setup authorization
|
|
475
|
-
|
|
640
|
+
Billabear.configure do |config|
|
|
476
641
|
# Configure API key authorization: ApiKeyAuth
|
|
477
642
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
478
643
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
479
644
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
480
645
|
end
|
|
481
646
|
|
|
482
|
-
api_instance =
|
|
647
|
+
api_instance = Billabear::CustomersApi.new
|
|
483
648
|
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
484
649
|
|
|
485
650
|
|
|
@@ -487,7 +652,7 @@ begin
|
|
|
487
652
|
#Fetch Customer Limits
|
|
488
653
|
result = api_instance.get_customer_limits_by_id(customer_id)
|
|
489
654
|
p result
|
|
490
|
-
rescue
|
|
655
|
+
rescue Billabear::ApiError => e
|
|
491
656
|
puts "Exception when calling CustomersApi->get_customer_limits_by_id: #{e}"
|
|
492
657
|
end
|
|
493
658
|
```
|
|
@@ -500,7 +665,60 @@ Name | Type | Description | Notes
|
|
|
500
665
|
|
|
501
666
|
### Return type
|
|
502
667
|
|
|
503
|
-
[**
|
|
668
|
+
[**InlineResponse2002**](InlineResponse2002.md)
|
|
669
|
+
|
|
670
|
+
### Authorization
|
|
671
|
+
|
|
672
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
673
|
+
|
|
674
|
+
### HTTP request headers
|
|
675
|
+
|
|
676
|
+
- **Content-Type**: Not defined
|
|
677
|
+
- **Accept**: application/json
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
# **get_customer_usage_limits_by_id**
|
|
682
|
+
> InlineResponse2005 get_customer_usage_limits_by_id(customer_id)
|
|
683
|
+
|
|
684
|
+
Fetch Customer Usage Limits
|
|
685
|
+
|
|
686
|
+
Usage Limits for a specific customer
|
|
687
|
+
|
|
688
|
+
### Example
|
|
689
|
+
```ruby
|
|
690
|
+
# load the gem
|
|
691
|
+
require 'billabear'
|
|
692
|
+
# setup authorization
|
|
693
|
+
Billabear.configure do |config|
|
|
694
|
+
# Configure API key authorization: ApiKeyAuth
|
|
695
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
696
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
697
|
+
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
698
|
+
end
|
|
699
|
+
|
|
700
|
+
api_instance = Billabear::CustomersApi.new
|
|
701
|
+
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
begin
|
|
705
|
+
#Fetch Customer Usage Limits
|
|
706
|
+
result = api_instance.get_customer_usage_limits_by_id(customer_id)
|
|
707
|
+
p result
|
|
708
|
+
rescue Billabear::ApiError => e
|
|
709
|
+
puts "Exception when calling CustomersApi->get_customer_usage_limits_by_id: #{e}"
|
|
710
|
+
end
|
|
711
|
+
```
|
|
712
|
+
|
|
713
|
+
### Parameters
|
|
714
|
+
|
|
715
|
+
Name | Type | Description | Notes
|
|
716
|
+
------------- | ------------- | ------------- | -------------
|
|
717
|
+
**customer_id** | **String**| The id of the customer to retrieve |
|
|
718
|
+
|
|
719
|
+
### Return type
|
|
720
|
+
|
|
721
|
+
[**InlineResponse2005**](InlineResponse2005.md)
|
|
504
722
|
|
|
505
723
|
### Authorization
|
|
506
724
|
|
|
@@ -514,7 +732,7 @@ Name | Type | Description | Notes
|
|
|
514
732
|
|
|
515
733
|
|
|
516
734
|
# **get_for_customer**
|
|
517
|
-
>
|
|
735
|
+
> InlineResponse2008 get_for_customer(customer_id)
|
|
518
736
|
|
|
519
737
|
List Customer Subscriptions
|
|
520
738
|
|
|
@@ -523,16 +741,16 @@ List all customer subscriptions<br><br><strong>Since 1.1</strong>
|
|
|
523
741
|
### Example
|
|
524
742
|
```ruby
|
|
525
743
|
# load the gem
|
|
526
|
-
require '
|
|
744
|
+
require 'billabear'
|
|
527
745
|
# setup authorization
|
|
528
|
-
|
|
746
|
+
Billabear.configure do |config|
|
|
529
747
|
# Configure API key authorization: ApiKeyAuth
|
|
530
748
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
531
749
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
532
750
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
533
751
|
end
|
|
534
752
|
|
|
535
|
-
api_instance =
|
|
753
|
+
api_instance = Billabear::CustomersApi.new
|
|
536
754
|
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
537
755
|
|
|
538
756
|
|
|
@@ -540,7 +758,7 @@ begin
|
|
|
540
758
|
#List Customer Subscriptions
|
|
541
759
|
result = api_instance.get_for_customer(customer_id)
|
|
542
760
|
p result
|
|
543
|
-
rescue
|
|
761
|
+
rescue Billabear::ApiError => e
|
|
544
762
|
puts "Exception when calling CustomersApi->get_for_customer: #{e}"
|
|
545
763
|
end
|
|
546
764
|
```
|
|
@@ -553,7 +771,7 @@ Name | Type | Description | Notes
|
|
|
553
771
|
|
|
554
772
|
### Return type
|
|
555
773
|
|
|
556
|
-
[**
|
|
774
|
+
[**InlineResponse2008**](InlineResponse2008.md)
|
|
557
775
|
|
|
558
776
|
### Authorization
|
|
559
777
|
|
|
@@ -567,7 +785,7 @@ Name | Type | Description | Notes
|
|
|
567
785
|
|
|
568
786
|
|
|
569
787
|
# **get_invoices_for_customer**
|
|
570
|
-
>
|
|
788
|
+
> InlineResponse2006 get_invoices_for_customer(customer_id)
|
|
571
789
|
|
|
572
790
|
List Customer Invoices
|
|
573
791
|
|
|
@@ -576,16 +794,16 @@ List Customer Invoices
|
|
|
576
794
|
### Example
|
|
577
795
|
```ruby
|
|
578
796
|
# load the gem
|
|
579
|
-
require '
|
|
797
|
+
require 'billabear'
|
|
580
798
|
# setup authorization
|
|
581
|
-
|
|
799
|
+
Billabear.configure do |config|
|
|
582
800
|
# Configure API key authorization: ApiKeyAuth
|
|
583
801
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
584
802
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
585
803
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
586
804
|
end
|
|
587
805
|
|
|
588
|
-
api_instance =
|
|
806
|
+
api_instance = Billabear::CustomersApi.new
|
|
589
807
|
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
590
808
|
|
|
591
809
|
|
|
@@ -593,7 +811,7 @@ begin
|
|
|
593
811
|
#List Customer Invoices
|
|
594
812
|
result = api_instance.get_invoices_for_customer(customer_id)
|
|
595
813
|
p result
|
|
596
|
-
rescue
|
|
814
|
+
rescue Billabear::ApiError => e
|
|
597
815
|
puts "Exception when calling CustomersApi->get_invoices_for_customer: #{e}"
|
|
598
816
|
end
|
|
599
817
|
```
|
|
@@ -606,7 +824,7 @@ Name | Type | Description | Notes
|
|
|
606
824
|
|
|
607
825
|
### Return type
|
|
608
826
|
|
|
609
|
-
[**
|
|
827
|
+
[**InlineResponse2006**](InlineResponse2006.md)
|
|
610
828
|
|
|
611
829
|
### Authorization
|
|
612
830
|
|
|
@@ -620,7 +838,7 @@ Name | Type | Description | Notes
|
|
|
620
838
|
|
|
621
839
|
|
|
622
840
|
# **get_payments_for_customer**
|
|
623
|
-
>
|
|
841
|
+
> InlineResponse2004 get_payments_for_customer(customer_id, opts)
|
|
624
842
|
|
|
625
843
|
List Customer Payments
|
|
626
844
|
|
|
@@ -629,16 +847,16 @@ List Customer Payment
|
|
|
629
847
|
### Example
|
|
630
848
|
```ruby
|
|
631
849
|
# load the gem
|
|
632
|
-
require '
|
|
850
|
+
require 'billabear'
|
|
633
851
|
# setup authorization
|
|
634
|
-
|
|
852
|
+
Billabear.configure do |config|
|
|
635
853
|
# Configure API key authorization: ApiKeyAuth
|
|
636
854
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
637
855
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
638
856
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
639
857
|
end
|
|
640
858
|
|
|
641
|
-
api_instance =
|
|
859
|
+
api_instance = Billabear::CustomersApi.new
|
|
642
860
|
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
643
861
|
opts = {
|
|
644
862
|
limit: 56, # Integer | How many items to return at one time (max 100)
|
|
@@ -650,7 +868,7 @@ begin
|
|
|
650
868
|
#List Customer Payments
|
|
651
869
|
result = api_instance.get_payments_for_customer(customer_id, opts)
|
|
652
870
|
p result
|
|
653
|
-
rescue
|
|
871
|
+
rescue Billabear::ApiError => e
|
|
654
872
|
puts "Exception when calling CustomersApi->get_payments_for_customer: #{e}"
|
|
655
873
|
end
|
|
656
874
|
```
|
|
@@ -666,7 +884,7 @@ Name | Type | Description | Notes
|
|
|
666
884
|
|
|
667
885
|
### Return type
|
|
668
886
|
|
|
669
|
-
[**
|
|
887
|
+
[**InlineResponse2004**](InlineResponse2004.md)
|
|
670
888
|
|
|
671
889
|
### Authorization
|
|
672
890
|
|
|
@@ -680,7 +898,7 @@ Name | Type | Description | Notes
|
|
|
680
898
|
|
|
681
899
|
|
|
682
900
|
# **get_refunds_for_customer**
|
|
683
|
-
>
|
|
901
|
+
> InlineResponse2003 get_refunds_for_customer(customer_id, opts)
|
|
684
902
|
|
|
685
903
|
List Customer Refunds
|
|
686
904
|
|
|
@@ -689,16 +907,16 @@ List Customer Refund
|
|
|
689
907
|
### Example
|
|
690
908
|
```ruby
|
|
691
909
|
# load the gem
|
|
692
|
-
require '
|
|
910
|
+
require 'billabear'
|
|
693
911
|
# setup authorization
|
|
694
|
-
|
|
912
|
+
Billabear.configure do |config|
|
|
695
913
|
# Configure API key authorization: ApiKeyAuth
|
|
696
914
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
697
915
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
698
916
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
699
917
|
end
|
|
700
918
|
|
|
701
|
-
api_instance =
|
|
919
|
+
api_instance = Billabear::CustomersApi.new
|
|
702
920
|
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
703
921
|
opts = {
|
|
704
922
|
limit: 56, # Integer | How many items to return at one time (max 100)
|
|
@@ -710,7 +928,7 @@ begin
|
|
|
710
928
|
#List Customer Refunds
|
|
711
929
|
result = api_instance.get_refunds_for_customer(customer_id, opts)
|
|
712
930
|
p result
|
|
713
|
-
rescue
|
|
931
|
+
rescue Billabear::ApiError => e
|
|
714
932
|
puts "Exception when calling CustomersApi->get_refunds_for_customer: #{e}"
|
|
715
933
|
end
|
|
716
934
|
```
|
|
@@ -726,7 +944,7 @@ Name | Type | Description | Notes
|
|
|
726
944
|
|
|
727
945
|
### Return type
|
|
728
946
|
|
|
729
|
-
[**
|
|
947
|
+
[**InlineResponse2003**](InlineResponse2003.md)
|
|
730
948
|
|
|
731
949
|
### Authorization
|
|
732
950
|
|
|
@@ -740,7 +958,7 @@ Name | Type | Description | Notes
|
|
|
740
958
|
|
|
741
959
|
|
|
742
960
|
# **list_payment_details**
|
|
743
|
-
>
|
|
961
|
+
> InlineResponse2007 list_payment_details(customer_id)
|
|
744
962
|
|
|
745
963
|
List Customer's Payment Details
|
|
746
964
|
|
|
@@ -749,16 +967,16 @@ List all customers <br><br>Added in version 1.1
|
|
|
749
967
|
### Example
|
|
750
968
|
```ruby
|
|
751
969
|
# load the gem
|
|
752
|
-
require '
|
|
970
|
+
require 'billabear'
|
|
753
971
|
# setup authorization
|
|
754
|
-
|
|
972
|
+
Billabear.configure do |config|
|
|
755
973
|
# Configure API key authorization: ApiKeyAuth
|
|
756
974
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
757
975
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
758
976
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
759
977
|
end
|
|
760
978
|
|
|
761
|
-
api_instance =
|
|
979
|
+
api_instance = Billabear::CustomersApi.new
|
|
762
980
|
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
763
981
|
|
|
764
982
|
|
|
@@ -766,7 +984,7 @@ begin
|
|
|
766
984
|
#List Customer's Payment Details
|
|
767
985
|
result = api_instance.list_payment_details(customer_id)
|
|
768
986
|
p result
|
|
769
|
-
rescue
|
|
987
|
+
rescue Billabear::ApiError => e
|
|
770
988
|
puts "Exception when calling CustomersApi->list_payment_details: #{e}"
|
|
771
989
|
end
|
|
772
990
|
```
|
|
@@ -779,7 +997,7 @@ Name | Type | Description | Notes
|
|
|
779
997
|
|
|
780
998
|
### Return type
|
|
781
999
|
|
|
782
|
-
[**
|
|
1000
|
+
[**InlineResponse2007**](InlineResponse2007.md)
|
|
783
1001
|
|
|
784
1002
|
### Authorization
|
|
785
1003
|
|
|
@@ -793,7 +1011,7 @@ Name | Type | Description | Notes
|
|
|
793
1011
|
|
|
794
1012
|
|
|
795
1013
|
# **remove_seats_subscriptions**
|
|
796
|
-
>
|
|
1014
|
+
> InlineResponse20013 remove_seats_subscriptions(bodysubscription_id)
|
|
797
1015
|
|
|
798
1016
|
Remove Seats
|
|
799
1017
|
|
|
@@ -802,17 +1020,17 @@ Remove seats to a per seat subscription<br><br><strong>Since 1.1.4</strong>
|
|
|
802
1020
|
### Example
|
|
803
1021
|
```ruby
|
|
804
1022
|
# load the gem
|
|
805
|
-
require '
|
|
1023
|
+
require 'billabear'
|
|
806
1024
|
# setup authorization
|
|
807
|
-
|
|
1025
|
+
Billabear.configure do |config|
|
|
808
1026
|
# Configure API key authorization: ApiKeyAuth
|
|
809
1027
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
810
1028
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
811
1029
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
812
1030
|
end
|
|
813
1031
|
|
|
814
|
-
api_instance =
|
|
815
|
-
body =
|
|
1032
|
+
api_instance = Billabear::CustomersApi.new
|
|
1033
|
+
body = Billabear::SeatsRemoveBody.new # SeatsRemoveBody |
|
|
816
1034
|
subscription_id = 'subscription_id_example' # String | The id of the subscription to retrieve
|
|
817
1035
|
|
|
818
1036
|
|
|
@@ -820,7 +1038,7 @@ begin
|
|
|
820
1038
|
#Remove Seats
|
|
821
1039
|
result = api_instance.remove_seats_subscriptions(bodysubscription_id)
|
|
822
1040
|
p result
|
|
823
|
-
rescue
|
|
1041
|
+
rescue Billabear::ApiError => e
|
|
824
1042
|
puts "Exception when calling CustomersApi->remove_seats_subscriptions: #{e}"
|
|
825
1043
|
end
|
|
826
1044
|
```
|
|
@@ -834,7 +1052,7 @@ Name | Type | Description | Notes
|
|
|
834
1052
|
|
|
835
1053
|
### Return type
|
|
836
1054
|
|
|
837
|
-
[**
|
|
1055
|
+
[**InlineResponse20013**](InlineResponse20013.md)
|
|
838
1056
|
|
|
839
1057
|
### Authorization
|
|
840
1058
|
|
|
@@ -857,17 +1075,17 @@ Update a customer
|
|
|
857
1075
|
### Example
|
|
858
1076
|
```ruby
|
|
859
1077
|
# load the gem
|
|
860
|
-
require '
|
|
1078
|
+
require 'billabear'
|
|
861
1079
|
# setup authorization
|
|
862
|
-
|
|
1080
|
+
Billabear.configure do |config|
|
|
863
1081
|
# Configure API key authorization: ApiKeyAuth
|
|
864
1082
|
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
865
1083
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
866
1084
|
#config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
867
1085
|
end
|
|
868
1086
|
|
|
869
|
-
api_instance =
|
|
870
|
-
body =
|
|
1087
|
+
api_instance = Billabear::CustomersApi.new
|
|
1088
|
+
body = Billabear::Customer.new # Customer |
|
|
871
1089
|
customer_id = 'customer_id_example' # String | The id of the customer to retrieve
|
|
872
1090
|
|
|
873
1091
|
|
|
@@ -875,7 +1093,7 @@ begin
|
|
|
875
1093
|
#Update
|
|
876
1094
|
result = api_instance.update_customer(bodycustomer_id)
|
|
877
1095
|
p result
|
|
878
|
-
rescue
|
|
1096
|
+
rescue Billabear::ApiError => e
|
|
879
1097
|
puts "Exception when calling CustomersApi->update_customer: #{e}"
|
|
880
1098
|
end
|
|
881
1099
|
```
|