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.
Files changed (215) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +509 -364
  3. data/billabear.gemspec +4 -4
  4. data/docs/Address.md +1 -1
  5. data/docs/BillingAdmin.md +1 -1
  6. data/docs/CheckoutApi.md +6 -6
  7. data/docs/CheckoutBody.md +1 -1
  8. data/docs/CheckoutItems.md +1 -1
  9. data/docs/CheckoutSubscriptions.md +1 -1
  10. data/docs/Cost.md +8 -0
  11. data/docs/Customer.md +3 -1
  12. data/docs/CustomerIdUasgelimitBody.md +8 -0
  13. data/docs/CustomersApi.md +319 -101
  14. data/docs/Error.md +1 -1
  15. data/docs/Event.md +11 -0
  16. data/docs/Feature.md +1 -1
  17. data/docs/FrontendToken.md +1 -1
  18. data/docs/InlineResponse200.md +1 -1
  19. data/docs/InlineResponse2001.md +3 -4
  20. data/docs/InlineResponse20010.md +2 -2
  21. data/docs/InlineResponse20011.md +4 -2
  22. data/docs/InlineResponse20012.md +4 -3
  23. data/docs/InlineResponse20013.md +7 -0
  24. data/docs/InlineResponse20014.md +8 -0
  25. data/docs/InlineResponse2002.md +4 -4
  26. data/docs/InlineResponse2003.md +2 -2
  27. data/docs/InlineResponse2004.md +2 -2
  28. data/docs/InlineResponse2005.md +2 -2
  29. data/docs/InlineResponse2006.md +2 -2
  30. data/docs/InlineResponse2007.md +2 -2
  31. data/docs/InlineResponse2008.md +2 -2
  32. data/docs/InlineResponse2009.md +2 -2
  33. data/docs/{InlineResponse2007Data.md → InlineResponse2009Data.md} +2 -2
  34. data/docs/{InlineResponse2007Receipts.md → InlineResponse2009Receipts.md} +1 -1
  35. data/docs/InlineResponse201.md +1 -1
  36. data/docs/InlineResponse201Lines.md +1 -1
  37. data/docs/InlineResponse400.md +1 -1
  38. data/docs/Invoice.md +1 -1
  39. data/docs/InvoiceLines.md +1 -1
  40. data/docs/InvoicesApi.md +17 -17
  41. data/docs/IssueRefundPayment.md +1 -1
  42. data/docs/Limit.md +1 -1
  43. data/docs/Metric.md +12 -0
  44. data/docs/MetricCost.md +10 -0
  45. data/docs/MetricFilter.md +11 -0
  46. data/docs/PaymentDetails.md +1 -1
  47. data/docs/PaymentDetailsApi.md +48 -52
  48. data/docs/PaymentsApi.md +41 -42
  49. data/docs/Price.md +2 -1
  50. data/docs/PricesApi.md +15 -16
  51. data/docs/Product.md +1 -1
  52. data/docs/ProductTaxType.md +1 -1
  53. data/docs/ProductsApi.md +23 -24
  54. data/docs/ReceiptApi.md +5 -5
  55. data/docs/Refund.md +1 -1
  56. data/docs/RefundsApi.md +17 -17
  57. data/docs/SeatsAddBody.md +1 -1
  58. data/docs/SeatsRemoveBody.md +1 -1
  59. data/docs/Subscription.md +2 -1
  60. data/docs/SubscriptionIdCancelBody.md +1 -1
  61. data/docs/SubscriptionIdExtendBody.md +1 -1
  62. data/docs/SubscriptionIdPlanBody.md +2 -2
  63. data/docs/SubscriptionIdPriceBody.md +1 -1
  64. data/docs/SubscriptionPlan.md +1 -1
  65. data/docs/SubscriptionStartBody.md +2 -1
  66. data/docs/SubscriptionTrialBody.md +1 -1
  67. data/docs/SubscriptionsApi.md +78 -79
  68. data/docs/UsageApi.md +279 -0
  69. data/docs/UsageLimit.md +9 -0
  70. data/docs/VoucherCode.md +1 -1
  71. data/git_push.sh +2 -2
  72. data/lib/{swagger_client → billabear}/api/checkout_api.rb +3 -3
  73. data/lib/{swagger_client → billabear}/api/customers_api.rb +284 -45
  74. data/lib/{swagger_client → billabear}/api/invoices_api.rb +9 -9
  75. data/lib/{swagger_client → billabear}/api/payment_details_api.rb +26 -26
  76. data/lib/{swagger_client → billabear}/api/payments_api.rb +20 -20
  77. data/lib/{swagger_client → billabear}/api/prices_api.rb +11 -11
  78. data/lib/{swagger_client → billabear}/api/products_api.rb +11 -11
  79. data/lib/{swagger_client → billabear}/api/receipt_api.rb +3 -3
  80. data/lib/{swagger_client → billabear}/api/refunds_api.rb +9 -9
  81. data/lib/{swagger_client → billabear}/api/subscriptions_api.rb +29 -29
  82. data/lib/billabear/api/usage_api.rb +314 -0
  83. data/lib/{swagger_client → billabear}/api_client.rb +4 -4
  84. data/lib/{swagger_client → billabear}/api_error.rb +3 -3
  85. data/lib/{swagger_client → billabear}/configuration.rb +3 -3
  86. data/lib/{swagger_client → billabear}/models/address.rb +6 -6
  87. data/lib/{swagger_client → billabear}/models/billing_admin.rb +6 -6
  88. data/lib/{swagger_client → billabear}/models/checkout_body.rb +6 -6
  89. data/lib/{swagger_client → billabear}/models/checkout_items.rb +6 -6
  90. data/lib/{swagger_client → billabear}/models/checkout_subscriptions.rb +6 -6
  91. data/lib/billabear/models/cost.rb +215 -0
  92. data/lib/{swagger_client → billabear}/models/customer.rb +45 -11
  93. data/lib/billabear/models/customer_id_uasgelimit_body.rb +259 -0
  94. data/lib/{swagger_client → billabear}/models/error.rb +6 -6
  95. data/lib/billabear/models/event.rb +262 -0
  96. data/lib/{swagger_client → billabear}/models/feature.rb +6 -6
  97. data/lib/{swagger_client → billabear}/models/frontend_token.rb +6 -6
  98. data/lib/{swagger_client → billabear}/models/inline_response_200.rb +6 -6
  99. data/lib/billabear/models/inline_response_200_1.rb +217 -0
  100. data/lib/{swagger_client → billabear}/models/inline_response_200_10.rb +6 -6
  101. data/lib/{swagger_client/models/inline_response_200_2.rb → billabear/models/inline_response_200_11.rb} +7 -7
  102. data/lib/billabear/models/inline_response_200_12.rb +226 -0
  103. data/lib/{swagger_client/models/inline_response_200_11.rb → billabear/models/inline_response_200_13.rb} +7 -7
  104. data/lib/{swagger_client/models/inline_response_200_12.rb → billabear/models/inline_response_200_14.rb} +7 -7
  105. data/lib/{swagger_client/models/inline_response_200_1.rb → billabear/models/inline_response_200_2.rb} +7 -7
  106. data/lib/{swagger_client → billabear}/models/inline_response_200_3.rb +6 -6
  107. data/lib/{swagger_client → billabear}/models/inline_response_200_4.rb +6 -6
  108. data/lib/{swagger_client → billabear}/models/inline_response_200_5.rb +6 -6
  109. data/lib/{swagger_client → billabear}/models/inline_response_200_6.rb +6 -6
  110. data/lib/{swagger_client → billabear}/models/inline_response_200_7.rb +6 -6
  111. data/lib/{swagger_client → billabear}/models/inline_response_200_8.rb +6 -6
  112. data/lib/{swagger_client → billabear}/models/inline_response_200_9.rb +6 -6
  113. data/lib/{swagger_client/models/inline_response_200_7_data.rb → billabear/models/inline_response_200_9_data.rb} +7 -7
  114. data/lib/{swagger_client/models/inline_response_200_7_receipts.rb → billabear/models/inline_response_200_9_receipts.rb} +7 -7
  115. data/lib/{swagger_client → billabear}/models/inline_response_201.rb +6 -6
  116. data/lib/{swagger_client → billabear}/models/inline_response_201_lines.rb +6 -6
  117. data/lib/{swagger_client → billabear}/models/inline_response_400.rb +6 -6
  118. data/lib/{swagger_client → billabear}/models/invoice.rb +6 -6
  119. data/lib/{swagger_client → billabear}/models/invoice_lines.rb +6 -6
  120. data/lib/{swagger_client → billabear}/models/issue_refund_payment.rb +6 -6
  121. data/lib/{swagger_client → billabear}/models/limit.rb +6 -6
  122. data/lib/billabear/models/metric.rb +288 -0
  123. data/lib/billabear/models/metric_cost.rb +234 -0
  124. data/lib/billabear/models/metric_filter.rb +276 -0
  125. data/lib/{swagger_client → billabear}/models/payment_details.rb +6 -6
  126. data/lib/{swagger_client → billabear}/models/price.rb +20 -11
  127. data/lib/{swagger_client → billabear}/models/product.rb +6 -6
  128. data/lib/{swagger_client → billabear}/models/product_tax_type.rb +6 -6
  129. data/lib/{swagger_client → billabear}/models/refund.rb +6 -6
  130. data/lib/{swagger_client → billabear}/models/seats_add_body.rb +6 -6
  131. data/lib/{swagger_client → billabear}/models/seats_remove_body.rb +6 -6
  132. data/lib/{swagger_client → billabear}/models/subscription.rb +16 -7
  133. data/lib/{swagger_client → billabear}/models/subscription_id_cancel_body.rb +6 -6
  134. data/lib/{swagger_client → billabear}/models/subscription_id_extend_body.rb +6 -6
  135. data/lib/{swagger_client → billabear}/models/subscription_id_plan_body.rb +11 -6
  136. data/lib/{swagger_client → billabear}/models/subscription_id_price_body.rb +6 -6
  137. data/lib/{swagger_client → billabear}/models/subscription_plan.rb +6 -6
  138. data/lib/{swagger_client → billabear}/models/subscription_start_body.rb +20 -10
  139. data/lib/{swagger_client → billabear}/models/subscription_trial_body.rb +6 -6
  140. data/lib/billabear/models/usage_limit.rb +258 -0
  141. data/lib/{swagger_client → billabear}/models/voucher_code.rb +6 -6
  142. data/lib/{swagger_client → billabear}/version.rb +4 -4
  143. data/lib/billabear.rb +105 -0
  144. data/spec/api/checkout_api_spec.rb +5 -5
  145. data/spec/api/customers_api_spec.rb +68 -17
  146. data/spec/api/invoices_api_spec.rb +7 -7
  147. data/spec/api/payment_details_api_spec.rb +10 -10
  148. data/spec/api/payments_api_spec.rb +10 -10
  149. data/spec/api/prices_api_spec.rb +7 -7
  150. data/spec/api/products_api_spec.rb +7 -7
  151. data/spec/api/receipt_api_spec.rb +5 -5
  152. data/spec/api/refunds_api_spec.rb +7 -7
  153. data/spec/api/subscriptions_api_spec.rb +13 -13
  154. data/spec/api/usage_api_spec.rb +96 -0
  155. data/spec/api_client_spec.rb +31 -31
  156. data/spec/configuration_spec.rb +5 -5
  157. data/spec/models/address_spec.rb +5 -5
  158. data/spec/models/billing_admin_spec.rb +5 -5
  159. data/spec/models/checkout_body_spec.rb +5 -5
  160. data/spec/models/checkout_items_spec.rb +5 -5
  161. data/spec/models/checkout_subscriptions_spec.rb +5 -5
  162. data/spec/models/cost_spec.rb +46 -0
  163. data/spec/models/customer_id_uasgelimit_body_spec.rb +50 -0
  164. data/spec/models/customer_spec.rb +21 -5
  165. data/spec/models/error_spec.rb +5 -5
  166. data/spec/models/event_spec.rb +64 -0
  167. data/spec/models/feature_spec.rb +5 -5
  168. data/spec/models/frontend_token_spec.rb +5 -5
  169. data/spec/models/inline_response_200_10_spec.rb +5 -5
  170. data/spec/models/inline_response_200_11_spec.rb +18 -6
  171. data/spec/models/inline_response_200_12_spec.rb +13 -11
  172. data/spec/models/inline_response_200_13_spec.rb +40 -0
  173. data/spec/models/inline_response_200_14_spec.rb +50 -0
  174. data/spec/models/inline_response_200_1_spec.rb +7 -13
  175. data/spec/models/inline_response_200_2_spec.rb +8 -8
  176. data/spec/models/inline_response_200_3_spec.rb +5 -5
  177. data/spec/models/inline_response_200_4_spec.rb +5 -5
  178. data/spec/models/inline_response_200_5_spec.rb +5 -5
  179. data/spec/models/inline_response_200_6_spec.rb +5 -5
  180. data/spec/models/inline_response_200_7_spec.rb +5 -5
  181. data/spec/models/inline_response_200_8_spec.rb +5 -5
  182. data/spec/models/{inline_response_200_7_data_spec.rb → inline_response_200_9_data_spec.rb} +8 -8
  183. data/spec/models/{inline_response_200_7_receipts_spec.rb → inline_response_200_9_receipts_spec.rb} +8 -8
  184. data/spec/models/inline_response_200_9_spec.rb +5 -5
  185. data/spec/models/inline_response_200_spec.rb +5 -5
  186. data/spec/models/inline_response_201_lines_spec.rb +5 -5
  187. data/spec/models/inline_response_201_spec.rb +5 -5
  188. data/spec/models/inline_response_400_spec.rb +5 -5
  189. data/spec/models/invoice_lines_spec.rb +5 -5
  190. data/spec/models/invoice_spec.rb +5 -5
  191. data/spec/models/issue_refund_payment_spec.rb +5 -5
  192. data/spec/models/limit_spec.rb +5 -5
  193. data/spec/models/metric_cost_spec.rb +58 -0
  194. data/spec/models/metric_filter_spec.rb +68 -0
  195. data/spec/models/metric_spec.rb +74 -0
  196. data/spec/models/payment_details_spec.rb +5 -5
  197. data/spec/models/price_spec.rb +11 -5
  198. data/spec/models/product_spec.rb +5 -5
  199. data/spec/models/product_tax_type_spec.rb +5 -5
  200. data/spec/models/refund_spec.rb +5 -5
  201. data/spec/models/seats_add_body_spec.rb +5 -5
  202. data/spec/models/seats_remove_body_spec.rb +5 -5
  203. data/spec/models/subscription_id_cancel_body_spec.rb +5 -5
  204. data/spec/models/subscription_id_extend_body_spec.rb +5 -5
  205. data/spec/models/subscription_id_plan_body_spec.rb +5 -5
  206. data/spec/models/subscription_id_price_body_spec.rb +5 -5
  207. data/spec/models/subscription_plan_spec.rb +5 -5
  208. data/spec/models/subscription_spec.rb +11 -5
  209. data/spec/models/subscription_start_body_spec.rb +11 -5
  210. data/spec/models/subscription_trial_body_spec.rb +5 -5
  211. data/spec/models/usage_limit_spec.rb +56 -0
  212. data/spec/models/voucher_code_spec.rb +5 -5
  213. data/spec/spec_helper.rb +3 -3
  214. metadata +110 -70
  215. data/lib/swagger_client.rb +0 -95
@@ -1,4 +1,4 @@
1
- # SwaggerClient::PaymentDetailsApi
1
+ # Billabear::PaymentDetailsApi
2
2
 
3
3
  All URIs are relative to *https://{customerId}.billabear.cloud/api/v1*
4
4
 
@@ -23,17 +23,17 @@ Complete frontend payment details
23
23
  ### Example
24
24
  ```ruby
25
25
  # load the gem
26
- require 'swagger_client'
26
+ require 'billabear'
27
27
  # setup authorization
28
- SwaggerClient.configure do |config|
28
+ Billabear.configure do |config|
29
29
  # Configure API key authorization: ApiKeyAuth
30
30
  config.api_key['X-API-Key'] = 'YOUR API KEY'
31
31
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
32
32
  #config.api_key_prefix['X-API-Key'] = 'Bearer'
33
33
  end
34
34
 
35
- api_instance = SwaggerClient::PaymentDetailsApi.new
36
- body = SwaggerClient::FrontendToken.new # FrontendToken |
35
+ api_instance = Billabear::PaymentDetailsApi.new
36
+ body = Billabear::FrontendToken.new # FrontendToken |
37
37
  customer_id = 'customer_id_example' # String | The id of the customer to retrieve
38
38
 
39
39
 
@@ -41,7 +41,7 @@ begin
41
41
  #Complete Frontend Detail Collection
42
42
  result = api_instance.complete_frontend_payment_details(bodycustomer_id)
43
43
  p result
44
- rescue SwaggerClient::ApiError => e
44
+ rescue Billabear::ApiError => e
45
45
  puts "Exception when calling PaymentDetailsApi->complete_frontend_payment_details: #{e}"
46
46
  end
47
47
  ```
@@ -69,7 +69,7 @@ Name | Type | Description | Notes
69
69
 
70
70
 
71
71
  # **delete_payment_details**
72
- > String delete_payment_details(payment_details_id)
72
+ > delete_payment_details(payment_details_id)
73
73
 
74
74
  Delete
75
75
 
@@ -78,24 +78,23 @@ Delete Payment Details
78
78
  ### Example
79
79
  ```ruby
80
80
  # load the gem
81
- require 'swagger_client'
81
+ require 'billabear'
82
82
  # setup authorization
83
- SwaggerClient.configure do |config|
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 = SwaggerClient::PaymentDetailsApi.new
90
+ api_instance = Billabear::PaymentDetailsApi.new
91
91
  payment_details_id = 'payment_details_id_example' # String | The id of the payment details
92
92
 
93
93
 
94
94
  begin
95
95
  #Delete
96
- result = api_instance.delete_payment_details(payment_details_id)
97
- p result
98
- rescue SwaggerClient::ApiError => e
96
+ api_instance.delete_payment_details(payment_details_id)
97
+ rescue Billabear::ApiError => e
99
98
  puts "Exception when calling PaymentDetailsApi->delete_payment_details: #{e}"
100
99
  end
101
100
  ```
@@ -108,7 +107,7 @@ Name | Type | Description | Notes
108
107
 
109
108
  ### Return type
110
109
 
111
- **String**
110
+ nil (empty response body)
112
111
 
113
112
  ### Authorization
114
113
 
@@ -122,7 +121,7 @@ Name | Type | Description | Notes
122
121
 
123
122
 
124
123
  # **delete_payment_details_customer**
125
- > String delete_payment_details_customer(customer_id, payment_details_id)
124
+ > delete_payment_details_customer(customer_id, payment_details_id)
126
125
 
127
126
  Delete With Customer
128
127
 
@@ -131,25 +130,24 @@ Delete Payment Details
131
130
  ### Example
132
131
  ```ruby
133
132
  # load the gem
134
- require 'swagger_client'
133
+ require 'billabear'
135
134
  # setup authorization
136
- SwaggerClient.configure do |config|
135
+ Billabear.configure do |config|
137
136
  # Configure API key authorization: ApiKeyAuth
138
137
  config.api_key['X-API-Key'] = 'YOUR API KEY'
139
138
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
140
139
  #config.api_key_prefix['X-API-Key'] = 'Bearer'
141
140
  end
142
141
 
143
- api_instance = SwaggerClient::PaymentDetailsApi.new
142
+ api_instance = Billabear::PaymentDetailsApi.new
144
143
  customer_id = 'customer_id_example' # String | The id of the customer to retrieve
145
144
  payment_details_id = 'payment_details_id_example' # String | The id of the payment details
146
145
 
147
146
 
148
147
  begin
149
148
  #Delete With Customer
150
- result = api_instance.delete_payment_details_customer(customer_id, payment_details_id)
151
- p result
152
- rescue SwaggerClient::ApiError => e
149
+ api_instance.delete_payment_details_customer(customer_id, payment_details_id)
150
+ rescue Billabear::ApiError => e
153
151
  puts "Exception when calling PaymentDetailsApi->delete_payment_details_customer: #{e}"
154
152
  end
155
153
  ```
@@ -163,7 +161,7 @@ Name | Type | Description | Notes
163
161
 
164
162
  ### Return type
165
163
 
166
- **String**
164
+ nil (empty response body)
167
165
 
168
166
  ### Authorization
169
167
 
@@ -186,16 +184,16 @@ Fetch the payment cards
186
184
  ### Example
187
185
  ```ruby
188
186
  # load the gem
189
- require 'swagger_client'
187
+ require 'billabear'
190
188
  # setup authorization
191
- SwaggerClient.configure do |config|
189
+ Billabear.configure do |config|
192
190
  # Configure API key authorization: ApiKeyAuth
193
191
  config.api_key['X-API-Key'] = 'YOUR API KEY'
194
192
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
195
193
  #config.api_key_prefix['X-API-Key'] = 'Bearer'
196
194
  end
197
195
 
198
- api_instance = SwaggerClient::PaymentDetailsApi.new
196
+ api_instance = Billabear::PaymentDetailsApi.new
199
197
  payment_details_id = 'payment_details_id_example' # String | The id of the payment details
200
198
 
201
199
 
@@ -203,7 +201,7 @@ begin
203
201
  #Fetch
204
202
  result = api_instance.get_payment_details(payment_details_id)
205
203
  p result
206
- rescue SwaggerClient::ApiError => e
204
+ rescue Billabear::ApiError => e
207
205
  puts "Exception when calling PaymentDetailsApi->get_payment_details: #{e}"
208
206
  end
209
207
  ```
@@ -230,7 +228,7 @@ Name | Type | Description | Notes
230
228
 
231
229
 
232
230
  # **list_payment_details**
233
- > InlineResponse2005 list_payment_details(customer_id)
231
+ > InlineResponse2007 list_payment_details(customer_id)
234
232
 
235
233
  List Customer's Payment Details
236
234
 
@@ -239,16 +237,16 @@ List all customers <br><br>Added in version 1.1
239
237
  ### Example
240
238
  ```ruby
241
239
  # load the gem
242
- require 'swagger_client'
240
+ require 'billabear'
243
241
  # setup authorization
244
- SwaggerClient.configure do |config|
242
+ Billabear.configure do |config|
245
243
  # Configure API key authorization: ApiKeyAuth
246
244
  config.api_key['X-API-Key'] = 'YOUR API KEY'
247
245
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
248
246
  #config.api_key_prefix['X-API-Key'] = 'Bearer'
249
247
  end
250
248
 
251
- api_instance = SwaggerClient::PaymentDetailsApi.new
249
+ api_instance = Billabear::PaymentDetailsApi.new
252
250
  customer_id = 'customer_id_example' # String | The id of the customer to retrieve
253
251
 
254
252
 
@@ -256,7 +254,7 @@ begin
256
254
  #List Customer's Payment Details
257
255
  result = api_instance.list_payment_details(customer_id)
258
256
  p result
259
- rescue SwaggerClient::ApiError => e
257
+ rescue Billabear::ApiError => e
260
258
  puts "Exception when calling PaymentDetailsApi->list_payment_details: #{e}"
261
259
  end
262
260
  ```
@@ -269,7 +267,7 @@ Name | Type | Description | Notes
269
267
 
270
268
  ### Return type
271
269
 
272
- [**InlineResponse2005**](InlineResponse2005.md)
270
+ [**InlineResponse2007**](InlineResponse2007.md)
273
271
 
274
272
  ### Authorization
275
273
 
@@ -283,7 +281,7 @@ Name | Type | Description | Notes
283
281
 
284
282
 
285
283
  # **make_default_payment_details**
286
- > String make_default_payment_details(customer_id, payment_details_id)
284
+ > make_default_payment_details(customer_id, payment_details_id)
287
285
 
288
286
  Make Default
289
287
 
@@ -292,25 +290,24 @@ Delete Payment Details
292
290
  ### Example
293
291
  ```ruby
294
292
  # load the gem
295
- require 'swagger_client'
293
+ require 'billabear'
296
294
  # setup authorization
297
- SwaggerClient.configure do |config|
295
+ Billabear.configure do |config|
298
296
  # Configure API key authorization: ApiKeyAuth
299
297
  config.api_key['X-API-Key'] = 'YOUR API KEY'
300
298
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
301
299
  #config.api_key_prefix['X-API-Key'] = 'Bearer'
302
300
  end
303
301
 
304
- api_instance = SwaggerClient::PaymentDetailsApi.new
302
+ api_instance = Billabear::PaymentDetailsApi.new
305
303
  customer_id = 'customer_id_example' # String | The id of the customer to retrieve
306
304
  payment_details_id = 'payment_details_id_example' # String | The id of the payment details
307
305
 
308
306
 
309
307
  begin
310
308
  #Make Default
311
- result = api_instance.make_default_payment_details(customer_id, payment_details_id)
312
- p result
313
- rescue SwaggerClient::ApiError => e
309
+ api_instance.make_default_payment_details(customer_id, payment_details_id)
310
+ rescue Billabear::ApiError => e
314
311
  puts "Exception when calling PaymentDetailsApi->make_default_payment_details: #{e}"
315
312
  end
316
313
  ```
@@ -324,7 +321,7 @@ Name | Type | Description | Notes
324
321
 
325
322
  ### Return type
326
323
 
327
- **String**
324
+ nil (empty response body)
328
325
 
329
326
  ### Authorization
330
327
 
@@ -338,7 +335,7 @@ Name | Type | Description | Notes
338
335
 
339
336
 
340
337
  # **make_default_payment_details_customer**
341
- > String make_default_payment_details_customer(customer_id, payment_details_id)
338
+ > make_default_payment_details_customer(customer_id, payment_details_id)
342
339
 
343
340
  Make Default With Customer
344
341
 
@@ -347,25 +344,24 @@ Delete Payment Details
347
344
  ### Example
348
345
  ```ruby
349
346
  # load the gem
350
- require 'swagger_client'
347
+ require 'billabear'
351
348
  # setup authorization
352
- SwaggerClient.configure do |config|
349
+ Billabear.configure do |config|
353
350
  # Configure API key authorization: ApiKeyAuth
354
351
  config.api_key['X-API-Key'] = 'YOUR API KEY'
355
352
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
356
353
  #config.api_key_prefix['X-API-Key'] = 'Bearer'
357
354
  end
358
355
 
359
- api_instance = SwaggerClient::PaymentDetailsApi.new
356
+ api_instance = Billabear::PaymentDetailsApi.new
360
357
  customer_id = 'customer_id_example' # String | The id of the customer to retrieve
361
358
  payment_details_id = 'payment_details_id_example' # String | The id of the payment details
362
359
 
363
360
 
364
361
  begin
365
362
  #Make Default With Customer
366
- result = api_instance.make_default_payment_details_customer(customer_id, payment_details_id)
367
- p result
368
- rescue SwaggerClient::ApiError => e
363
+ api_instance.make_default_payment_details_customer(customer_id, payment_details_id)
364
+ rescue Billabear::ApiError => e
369
365
  puts "Exception when calling PaymentDetailsApi->make_default_payment_details_customer: #{e}"
370
366
  end
371
367
  ```
@@ -379,7 +375,7 @@ Name | Type | Description | Notes
379
375
 
380
376
  ### Return type
381
377
 
382
- **String**
378
+ nil (empty response body)
383
379
 
384
380
  ### Authorization
385
381
 
@@ -402,16 +398,16 @@ Start frontend payment details
402
398
  ### Example
403
399
  ```ruby
404
400
  # load the gem
405
- require 'swagger_client'
401
+ require 'billabear'
406
402
  # setup authorization
407
- SwaggerClient.configure do |config|
403
+ Billabear.configure do |config|
408
404
  # Configure API key authorization: ApiKeyAuth
409
405
  config.api_key['X-API-Key'] = 'YOUR API KEY'
410
406
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
411
407
  #config.api_key_prefix['X-API-Key'] = 'Bearer'
412
408
  end
413
409
 
414
- api_instance = SwaggerClient::PaymentDetailsApi.new
410
+ api_instance = Billabear::PaymentDetailsApi.new
415
411
  customer_id = 'customer_id_example' # String | The id of the customer to retrieve
416
412
 
417
413
 
@@ -419,7 +415,7 @@ begin
419
415
  #Start Frontend Detail Collection
420
416
  result = api_instance.start_frontend_payment_details(customer_id)
421
417
  p result
422
- rescue SwaggerClient::ApiError => e
418
+ rescue Billabear::ApiError => e
423
419
  puts "Exception when calling PaymentDetailsApi->start_frontend_payment_details: #{e}"
424
420
  end
425
421
  ```
data/docs/PaymentsApi.md CHANGED
@@ -1,4 +1,4 @@
1
- # SwaggerClient::PaymentsApi
1
+ # Billabear::PaymentsApi
2
2
 
3
3
  All URIs are relative to *https://{customerId}.billabear.cloud/api/v1*
4
4
 
@@ -13,7 +13,7 @@ Method | HTTP request | Description
13
13
  [**refund_payment**](PaymentsApi.md#refund_payment) | **POST** /payment/{paymentId}/refund | Refund Payment
14
14
 
15
15
  # **charge_invoice**
16
- > InlineResponse20012 charge_invoice(invoice_id)
16
+ > InlineResponse20014 charge_invoice(invoice_id)
17
17
 
18
18
  Charge Invoice
19
19
 
@@ -22,16 +22,16 @@ Attempts to charge a card that is on file for the invoice amount
22
22
  ### Example
23
23
  ```ruby
24
24
  # load the gem
25
- require 'swagger_client'
25
+ require 'billabear'
26
26
  # setup authorization
27
- SwaggerClient.configure do |config|
27
+ Billabear.configure do |config|
28
28
  # Configure API key authorization: ApiKeyAuth
29
29
  config.api_key['X-API-Key'] = 'YOUR API KEY'
30
30
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
31
31
  #config.api_key_prefix['X-API-Key'] = 'Bearer'
32
32
  end
33
33
 
34
- api_instance = SwaggerClient::PaymentsApi.new
34
+ api_instance = Billabear::PaymentsApi.new
35
35
  invoice_id = 'invoice_id_example' # String | The id of the invoice
36
36
 
37
37
 
@@ -39,7 +39,7 @@ begin
39
39
  #Charge Invoice
40
40
  result = api_instance.charge_invoice(invoice_id)
41
41
  p result
42
- rescue SwaggerClient::ApiError => e
42
+ rescue Billabear::ApiError => e
43
43
  puts "Exception when calling PaymentsApi->charge_invoice: #{e}"
44
44
  end
45
45
  ```
@@ -52,7 +52,7 @@ Name | Type | Description | Notes
52
52
 
53
53
  ### Return type
54
54
 
55
- [**InlineResponse20012**](InlineResponse20012.md)
55
+ [**InlineResponse20014**](InlineResponse20014.md)
56
56
 
57
57
  ### Authorization
58
58
 
@@ -75,16 +75,16 @@ Returns the pdf blob for the invoice
75
75
  ### Example
76
76
  ```ruby
77
77
  # load the gem
78
- require 'swagger_client'
78
+ require 'billabear'
79
79
  # setup authorization
80
- SwaggerClient.configure do |config|
80
+ Billabear.configure do |config|
81
81
  # Configure API key authorization: ApiKeyAuth
82
82
  config.api_key['X-API-Key'] = 'YOUR API KEY'
83
83
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
84
84
  #config.api_key_prefix['X-API-Key'] = 'Bearer'
85
85
  end
86
86
 
87
- api_instance = SwaggerClient::PaymentsApi.new
87
+ api_instance = Billabear::PaymentsApi.new
88
88
  invoice_id = 'invoice_id_example' # String | The id of the invoice
89
89
 
90
90
 
@@ -92,7 +92,7 @@ begin
92
92
  #Download Invoice
93
93
  result = api_instance.download_invoice(invoice_id)
94
94
  p result
95
- rescue SwaggerClient::ApiError => e
95
+ rescue Billabear::ApiError => e
96
96
  puts "Exception when calling PaymentsApi->download_invoice: #{e}"
97
97
  end
98
98
  ```
@@ -128,16 +128,16 @@ Returns the pdf blob for the Receipt
128
128
  ### Example
129
129
  ```ruby
130
130
  # load the gem
131
- require 'swagger_client'
131
+ require 'billabear'
132
132
  # setup authorization
133
- SwaggerClient.configure do |config|
133
+ Billabear.configure do |config|
134
134
  # Configure API key authorization: ApiKeyAuth
135
135
  config.api_key['X-API-Key'] = 'YOUR API KEY'
136
136
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
137
137
  #config.api_key_prefix['X-API-Key'] = 'Bearer'
138
138
  end
139
139
 
140
- api_instance = SwaggerClient::PaymentsApi.new
140
+ api_instance = Billabear::PaymentsApi.new
141
141
  receipt = 'receipt_example' # String | The id of the receipt
142
142
 
143
143
 
@@ -145,7 +145,7 @@ begin
145
145
  #Download Receipt
146
146
  result = api_instance.download_receipt(receipt)
147
147
  p result
148
- rescue SwaggerClient::ApiError => e
148
+ rescue Billabear::ApiError => e
149
149
  puts "Exception when calling PaymentsApi->download_receipt: #{e}"
150
150
  end
151
151
  ```
@@ -172,7 +172,7 @@ Name | Type | Description | Notes
172
172
 
173
173
 
174
174
  # **get_invoices_for_customer**
175
- > InlineResponse2004 get_invoices_for_customer(customer_id)
175
+ > InlineResponse2006 get_invoices_for_customer(customer_id)
176
176
 
177
177
  List Customer Invoices
178
178
 
@@ -181,16 +181,16 @@ List Customer Invoices
181
181
  ### Example
182
182
  ```ruby
183
183
  # load the gem
184
- require 'swagger_client'
184
+ require 'billabear'
185
185
  # setup authorization
186
- SwaggerClient.configure do |config|
186
+ Billabear.configure do |config|
187
187
  # Configure API key authorization: ApiKeyAuth
188
188
  config.api_key['X-API-Key'] = 'YOUR API KEY'
189
189
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
190
190
  #config.api_key_prefix['X-API-Key'] = 'Bearer'
191
191
  end
192
192
 
193
- api_instance = SwaggerClient::PaymentsApi.new
193
+ api_instance = Billabear::PaymentsApi.new
194
194
  customer_id = 'customer_id_example' # String | The id of the customer to retrieve
195
195
 
196
196
 
@@ -198,7 +198,7 @@ begin
198
198
  #List Customer Invoices
199
199
  result = api_instance.get_invoices_for_customer(customer_id)
200
200
  p result
201
- rescue SwaggerClient::ApiError => e
201
+ rescue Billabear::ApiError => e
202
202
  puts "Exception when calling PaymentsApi->get_invoices_for_customer: #{e}"
203
203
  end
204
204
  ```
@@ -211,7 +211,7 @@ Name | Type | Description | Notes
211
211
 
212
212
  ### Return type
213
213
 
214
- [**InlineResponse2004**](InlineResponse2004.md)
214
+ [**InlineResponse2006**](InlineResponse2006.md)
215
215
 
216
216
  ### Authorization
217
217
 
@@ -225,7 +225,7 @@ Name | Type | Description | Notes
225
225
 
226
226
 
227
227
  # **get_payments_for_customer**
228
- > InlineResponse2003 get_payments_for_customer(customer_id, opts)
228
+ > InlineResponse2004 get_payments_for_customer(customer_id, opts)
229
229
 
230
230
  List Customer Payments
231
231
 
@@ -234,16 +234,16 @@ List Customer Payment
234
234
  ### Example
235
235
  ```ruby
236
236
  # load the gem
237
- require 'swagger_client'
237
+ require 'billabear'
238
238
  # setup authorization
239
- SwaggerClient.configure do |config|
239
+ Billabear.configure do |config|
240
240
  # Configure API key authorization: ApiKeyAuth
241
241
  config.api_key['X-API-Key'] = 'YOUR API KEY'
242
242
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
243
243
  #config.api_key_prefix['X-API-Key'] = 'Bearer'
244
244
  end
245
245
 
246
- api_instance = SwaggerClient::PaymentsApi.new
246
+ api_instance = Billabear::PaymentsApi.new
247
247
  customer_id = 'customer_id_example' # String | The id of the customer to retrieve
248
248
  opts = {
249
249
  limit: 56, # Integer | How many items to return at one time (max 100)
@@ -255,7 +255,7 @@ begin
255
255
  #List Customer Payments
256
256
  result = api_instance.get_payments_for_customer(customer_id, opts)
257
257
  p result
258
- rescue SwaggerClient::ApiError => e
258
+ rescue Billabear::ApiError => e
259
259
  puts "Exception when calling PaymentsApi->get_payments_for_customer: #{e}"
260
260
  end
261
261
  ```
@@ -271,7 +271,7 @@ Name | Type | Description | Notes
271
271
 
272
272
  ### Return type
273
273
 
274
- [**InlineResponse2003**](InlineResponse2003.md)
274
+ [**InlineResponse2004**](InlineResponse2004.md)
275
275
 
276
276
  ### Authorization
277
277
 
@@ -285,7 +285,7 @@ Name | Type | Description | Notes
285
285
 
286
286
 
287
287
  # **list_payment**
288
- > InlineResponse2007 list_payment(opts)
288
+ > InlineResponse2009 list_payment(opts)
289
289
 
290
290
  List
291
291
 
@@ -294,16 +294,16 @@ List all payment
294
294
  ### Example
295
295
  ```ruby
296
296
  # load the gem
297
- require 'swagger_client'
297
+ require 'billabear'
298
298
  # setup authorization
299
- SwaggerClient.configure do |config|
299
+ Billabear.configure do |config|
300
300
  # Configure API key authorization: ApiKeyAuth
301
301
  config.api_key['X-API-Key'] = 'YOUR API KEY'
302
302
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
303
303
  #config.api_key_prefix['X-API-Key'] = 'Bearer'
304
304
  end
305
305
 
306
- api_instance = SwaggerClient::PaymentsApi.new
306
+ api_instance = Billabear::PaymentsApi.new
307
307
  opts = {
308
308
  limit: 56, # Integer | How many items to return at one time (max 100)
309
309
  last_key: 'last_key_example', # String | The key to be used in pagination to say what the last key of the previous page was
@@ -314,7 +314,7 @@ begin
314
314
  #List
315
315
  result = api_instance.list_payment(opts)
316
316
  p result
317
- rescue SwaggerClient::ApiError => e
317
+ rescue Billabear::ApiError => e
318
318
  puts "Exception when calling PaymentsApi->list_payment: #{e}"
319
319
  end
320
320
  ```
@@ -329,7 +329,7 @@ Name | Type | Description | Notes
329
329
 
330
330
  ### Return type
331
331
 
332
- [**InlineResponse2007**](InlineResponse2007.md)
332
+ [**InlineResponse2009**](InlineResponse2009.md)
333
333
 
334
334
  ### Authorization
335
335
 
@@ -343,7 +343,7 @@ Name | Type | Description | Notes
343
343
 
344
344
 
345
345
  # **refund_payment**
346
- > String refund_payment(bodypayment_id)
346
+ > refund_payment(bodypayment_id)
347
347
 
348
348
  Refund Payment
349
349
 
@@ -352,25 +352,24 @@ Issue a refund for payment
352
352
  ### Example
353
353
  ```ruby
354
354
  # load the gem
355
- require 'swagger_client'
355
+ require 'billabear'
356
356
  # setup authorization
357
- SwaggerClient.configure do |config|
357
+ Billabear.configure do |config|
358
358
  # Configure API key authorization: ApiKeyAuth
359
359
  config.api_key['X-API-Key'] = 'YOUR API KEY'
360
360
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
361
361
  #config.api_key_prefix['X-API-Key'] = 'Bearer'
362
362
  end
363
363
 
364
- api_instance = SwaggerClient::PaymentsApi.new
365
- body = SwaggerClient::IssueRefundPayment.new # IssueRefundPayment |
364
+ api_instance = Billabear::PaymentsApi.new
365
+ body = Billabear::IssueRefundPayment.new # IssueRefundPayment |
366
366
  payment_id = 'payment_id_example' # String | The id of the payment
367
367
 
368
368
 
369
369
  begin
370
370
  #Refund Payment
371
- result = api_instance.refund_payment(bodypayment_id)
372
- p result
373
- rescue SwaggerClient::ApiError => e
371
+ api_instance.refund_payment(bodypayment_id)
372
+ rescue Billabear::ApiError => e
374
373
  puts "Exception when calling PaymentsApi->refund_payment: #{e}"
375
374
  end
376
375
  ```
@@ -384,7 +383,7 @@ Name | Type | Description | Notes
384
383
 
385
384
  ### Return type
386
385
 
387
- **String**
386
+ nil (empty response body)
388
387
 
389
388
  ### Authorization
390
389
 
data/docs/Price.md CHANGED
@@ -1,4 +1,4 @@
1
- # SwaggerClient::Price
1
+ # Billabear::Price
2
2
 
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
@@ -11,4 +11,5 @@ Name | Type | Description | Notes
11
11
  **schedule** | **String** | Required if recurring is true | [optional]
12
12
  **including_tax** | **BOOLEAN** | If the price is including tax. If false tax will be added on top of the price. | [optional]
13
13
  **public** | **BOOLEAN** | | [optional]
14
+ **metric** | [**Metric**](Metric.md) | | [optional]
14
15