billabear 1.0.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 (187) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +1340 -0
  4. data/Rakefile +8 -0
  5. data/billabear.gemspec +38 -0
  6. data/docs/Address.md +13 -0
  7. data/docs/BillingAdmin.md +8 -0
  8. data/docs/CheckoutApi.md +61 -0
  9. data/docs/CheckoutBody.md +12 -0
  10. data/docs/CheckoutItems.md +11 -0
  11. data/docs/CheckoutSubscriptions.md +9 -0
  12. data/docs/Customer.md +18 -0
  13. data/docs/CustomersApi.md +904 -0
  14. data/docs/Error.md +8 -0
  15. data/docs/Feature.md +10 -0
  16. data/docs/FrontendToken.md +7 -0
  17. data/docs/InlineResponse200.md +9 -0
  18. data/docs/InlineResponse2001.md +9 -0
  19. data/docs/InlineResponse20010.md +9 -0
  20. data/docs/InlineResponse20011.md +7 -0
  21. data/docs/InlineResponse20012.md +8 -0
  22. data/docs/InlineResponse2002.md +9 -0
  23. data/docs/InlineResponse2003.md +9 -0
  24. data/docs/InlineResponse2004.md +9 -0
  25. data/docs/InlineResponse2005.md +9 -0
  26. data/docs/InlineResponse2006.md +9 -0
  27. data/docs/InlineResponse2007.md +9 -0
  28. data/docs/InlineResponse2007Data.md +14 -0
  29. data/docs/InlineResponse2007Receipts.md +9 -0
  30. data/docs/InlineResponse2008.md +9 -0
  31. data/docs/InlineResponse2009.md +9 -0
  32. data/docs/InlineResponse201.md +15 -0
  33. data/docs/InlineResponse201Lines.md +14 -0
  34. data/docs/InlineResponse400.md +7 -0
  35. data/docs/Invoice.md +21 -0
  36. data/docs/InvoiceLines.md +12 -0
  37. data/docs/InvoicesApi.md +169 -0
  38. data/docs/IssueRefundPayment.md +9 -0
  39. data/docs/Limit.md +8 -0
  40. data/docs/PaymentDetails.md +14 -0
  41. data/docs/PaymentDetailsApi.md +447 -0
  42. data/docs/PaymentsApi.md +399 -0
  43. data/docs/Price.md +14 -0
  44. data/docs/PricesApi.md +122 -0
  45. data/docs/Product.md +10 -0
  46. data/docs/ProductTaxType.md +9 -0
  47. data/docs/ProductsApi.md +228 -0
  48. data/docs/ReceiptApi.md +61 -0
  49. data/docs/Refund.md +16 -0
  50. data/docs/RefundsApi.md +181 -0
  51. data/docs/SeatsAddBody.md +7 -0
  52. data/docs/SeatsRemoveBody.md +7 -0
  53. data/docs/Subscription.md +18 -0
  54. data/docs/SubscriptionIdCancelBody.md +10 -0
  55. data/docs/SubscriptionIdExtendBody.md +7 -0
  56. data/docs/SubscriptionIdPlanBody.md +9 -0
  57. data/docs/SubscriptionIdPriceBody.md +8 -0
  58. data/docs/SubscriptionPlan.md +20 -0
  59. data/docs/SubscriptionStartBody.md +14 -0
  60. data/docs/SubscriptionTrialBody.md +10 -0
  61. data/docs/SubscriptionsApi.md +731 -0
  62. data/docs/VoucherCode.md +7 -0
  63. data/git_push.sh +55 -0
  64. data/lib/swagger_client/api/checkout_api.rb +78 -0
  65. data/lib/swagger_client/api/customers_api.rb +980 -0
  66. data/lib/swagger_client/api/invoices_api.rb +188 -0
  67. data/lib/swagger_client/api/payment_details_api.rb +494 -0
  68. data/lib/swagger_client/api/payments_api.rb +432 -0
  69. data/lib/swagger_client/api/prices_api.rb +146 -0
  70. data/lib/swagger_client/api/products_api.rb +249 -0
  71. data/lib/swagger_client/api/receipt_api.rb +76 -0
  72. data/lib/swagger_client/api/refunds_api.rb +200 -0
  73. data/lib/swagger_client/api/subscriptions_api.rb +812 -0
  74. data/lib/swagger_client/api_client.rb +388 -0
  75. data/lib/swagger_client/api_error.rb +57 -0
  76. data/lib/swagger_client/configuration.rb +205 -0
  77. data/lib/swagger_client/models/address.rb +265 -0
  78. data/lib/swagger_client/models/billing_admin.rb +215 -0
  79. data/lib/swagger_client/models/checkout_body.rb +265 -0
  80. data/lib/swagger_client/models/checkout_items.rb +242 -0
  81. data/lib/swagger_client/models/checkout_subscriptions.rb +224 -0
  82. data/lib/swagger_client/models/customer.rb +370 -0
  83. data/lib/swagger_client/models/error.rb +225 -0
  84. data/lib/swagger_client/models/feature.rb +240 -0
  85. data/lib/swagger_client/models/frontend_token.rb +211 -0
  86. data/lib/swagger_client/models/inline_response_200.rb +226 -0
  87. data/lib/swagger_client/models/inline_response_200_1.rb +228 -0
  88. data/lib/swagger_client/models/inline_response_200_10.rb +226 -0
  89. data/lib/swagger_client/models/inline_response_200_11.rb +206 -0
  90. data/lib/swagger_client/models/inline_response_200_12.rb +250 -0
  91. data/lib/swagger_client/models/inline_response_200_2.rb +226 -0
  92. data/lib/swagger_client/models/inline_response_200_3.rb +226 -0
  93. data/lib/swagger_client/models/inline_response_200_4.rb +226 -0
  94. data/lib/swagger_client/models/inline_response_200_5.rb +226 -0
  95. data/lib/swagger_client/models/inline_response_200_6.rb +226 -0
  96. data/lib/swagger_client/models/inline_response_200_7.rb +226 -0
  97. data/lib/swagger_client/models/inline_response_200_7_data.rb +307 -0
  98. data/lib/swagger_client/models/inline_response_200_7_receipts.rb +224 -0
  99. data/lib/swagger_client/models/inline_response_200_8.rb +226 -0
  100. data/lib/swagger_client/models/inline_response_200_9.rb +226 -0
  101. data/lib/swagger_client/models/inline_response_201.rb +285 -0
  102. data/lib/swagger_client/models/inline_response_201_lines.rb +269 -0
  103. data/lib/swagger_client/models/inline_response_400.rb +213 -0
  104. data/lib/swagger_client/models/invoice.rb +334 -0
  105. data/lib/swagger_client/models/invoice_lines.rb +251 -0
  106. data/lib/swagger_client/models/issue_refund_payment.rb +232 -0
  107. data/lib/swagger_client/models/limit.rb +215 -0
  108. data/lib/swagger_client/models/payment_details.rb +271 -0
  109. data/lib/swagger_client/models/price.rb +325 -0
  110. data/lib/swagger_client/models/product.rb +240 -0
  111. data/lib/swagger_client/models/product_tax_type.rb +229 -0
  112. data/lib/swagger_client/models/refund.rb +324 -0
  113. data/lib/swagger_client/models/seats_add_body.rb +211 -0
  114. data/lib/swagger_client/models/seats_remove_body.rb +211 -0
  115. data/lib/swagger_client/models/subscription.rb +305 -0
  116. data/lib/swagger_client/models/subscription_id_cancel_body.rb +294 -0
  117. data/lib/swagger_client/models/subscription_id_extend_body.rb +211 -0
  118. data/lib/swagger_client/models/subscription_id_plan_body.rb +270 -0
  119. data/lib/swagger_client/models/subscription_id_price_body.rb +259 -0
  120. data/lib/swagger_client/models/subscription_plan.rb +330 -0
  121. data/lib/swagger_client/models/subscription_start_body.rb +314 -0
  122. data/lib/swagger_client/models/subscription_trial_body.rb +242 -0
  123. data/lib/swagger_client/models/voucher_code.rb +211 -0
  124. data/lib/swagger_client/version.rb +14 -0
  125. data/lib/swagger_client.rb +95 -0
  126. data/spec/api/checkout_api_spec.rb +46 -0
  127. data/spec/api/customers_api_spec.rb +241 -0
  128. data/spec/api/invoices_api_spec.rb +70 -0
  129. data/spec/api/payment_details_api_spec.rb +134 -0
  130. data/spec/api/payments_api_spec.rb +124 -0
  131. data/spec/api/prices_api_spec.rb +61 -0
  132. data/spec/api/products_api_spec.rb +84 -0
  133. data/spec/api/receipt_api_spec.rb +46 -0
  134. data/spec/api/refunds_api_spec.rb +75 -0
  135. data/spec/api/subscriptions_api_spec.rb +200 -0
  136. data/spec/api_client_spec.rb +225 -0
  137. data/spec/base_object_spec.rb +109 -0
  138. data/spec/configuration_spec.rb +41 -0
  139. data/spec/models/address_spec.rb +76 -0
  140. data/spec/models/billing_admin_spec.rb +46 -0
  141. data/spec/models/checkout_body_spec.rb +70 -0
  142. data/spec/models/checkout_items_spec.rb +64 -0
  143. data/spec/models/checkout_subscriptions_spec.rb +52 -0
  144. data/spec/models/customer_spec.rb +114 -0
  145. data/spec/models/error_spec.rb +46 -0
  146. data/spec/models/feature_spec.rb +58 -0
  147. data/spec/models/frontend_token_spec.rb +40 -0
  148. data/spec/models/inline_response_200_10_spec.rb +52 -0
  149. data/spec/models/inline_response_200_11_spec.rb +40 -0
  150. data/spec/models/inline_response_200_12_spec.rb +50 -0
  151. data/spec/models/inline_response_200_1_spec.rb +52 -0
  152. data/spec/models/inline_response_200_2_spec.rb +52 -0
  153. data/spec/models/inline_response_200_3_spec.rb +52 -0
  154. data/spec/models/inline_response_200_4_spec.rb +52 -0
  155. data/spec/models/inline_response_200_5_spec.rb +52 -0
  156. data/spec/models/inline_response_200_6_spec.rb +52 -0
  157. data/spec/models/inline_response_200_7_data_spec.rb +86 -0
  158. data/spec/models/inline_response_200_7_receipts_spec.rb +52 -0
  159. data/spec/models/inline_response_200_7_spec.rb +52 -0
  160. data/spec/models/inline_response_200_8_spec.rb +52 -0
  161. data/spec/models/inline_response_200_9_spec.rb +52 -0
  162. data/spec/models/inline_response_200_spec.rb +52 -0
  163. data/spec/models/inline_response_201_lines_spec.rb +82 -0
  164. data/spec/models/inline_response_201_spec.rb +88 -0
  165. data/spec/models/inline_response_400_spec.rb +40 -0
  166. data/spec/models/invoice_lines_spec.rb +70 -0
  167. data/spec/models/invoice_spec.rb +124 -0
  168. data/spec/models/issue_refund_payment_spec.rb +52 -0
  169. data/spec/models/limit_spec.rb +46 -0
  170. data/spec/models/payment_details_spec.rb +82 -0
  171. data/spec/models/price_spec.rb +86 -0
  172. data/spec/models/product_spec.rb +58 -0
  173. data/spec/models/product_tax_type_spec.rb +52 -0
  174. data/spec/models/refund_spec.rb +98 -0
  175. data/spec/models/seats_add_body_spec.rb +40 -0
  176. data/spec/models/seats_remove_body_spec.rb +40 -0
  177. data/spec/models/subscription_id_cancel_body_spec.rb +66 -0
  178. data/spec/models/subscription_id_extend_body_spec.rb +40 -0
  179. data/spec/models/subscription_id_plan_body_spec.rb +56 -0
  180. data/spec/models/subscription_id_price_body_spec.rb +50 -0
  181. data/spec/models/subscription_plan_spec.rb +118 -0
  182. data/spec/models/subscription_spec.rb +106 -0
  183. data/spec/models/subscription_start_body_spec.rb +86 -0
  184. data/spec/models/subscription_trial_body_spec.rb +58 -0
  185. data/spec/models/voucher_code_spec.rb +40 -0
  186. data/spec/spec_helper.rb +110 -0
  187. metadata +349 -0
@@ -0,0 +1,980 @@
1
+ =begin
2
+ #BillaBear
3
+
4
+ #The REST API provided by BillaBear
5
+
6
+ OpenAPI spec version: 1.0.0
7
+ Contact: support@billabear.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.56
10
+ =end
11
+
12
+ module SwaggerClient
13
+ class CustomersApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(api_client = ApiClient.default)
17
+ @api_client = api_client
18
+ end
19
+ # Add Seats
20
+ # Adds seats to a per seat subscription<br><br><strong>Since 1.1.4</strong>
21
+ # @param body
22
+ # @param subscription_id The id of the subscription to retrieve
23
+ # @param [Hash] opts the optional parameters
24
+ # @return [InlineResponse20011]
25
+ def add_seats_subscriptions(body, subscription_id, opts = {})
26
+ data, _status_code, _headers = add_seats_subscriptions_with_http_info(body, subscription_id, opts)
27
+ data
28
+ end
29
+
30
+ # Add Seats
31
+ # Adds seats to a per seat subscription&lt;br&gt;&lt;br&gt;&lt;strong&gt;Since 1.1.4&lt;/strong&gt;
32
+ # @param body
33
+ # @param subscription_id The id of the subscription to retrieve
34
+ # @param [Hash] opts the optional parameters
35
+ # @return [Array<(InlineResponse20011, Integer, Hash)>] InlineResponse20011 data, response status code and response headers
36
+ def add_seats_subscriptions_with_http_info(body, subscription_id, opts = {})
37
+ if @api_client.config.debugging
38
+ @api_client.config.logger.debug 'Calling API: CustomersApi.add_seats_subscriptions ...'
39
+ end
40
+ # verify the required parameter 'body' is set
41
+ if @api_client.config.client_side_validation && body.nil?
42
+ fail ArgumentError, "Missing the required parameter 'body' when calling CustomersApi.add_seats_subscriptions"
43
+ end
44
+ # verify the required parameter 'subscription_id' is set
45
+ if @api_client.config.client_side_validation && subscription_id.nil?
46
+ fail ArgumentError, "Missing the required parameter 'subscription_id' when calling CustomersApi.add_seats_subscriptions"
47
+ end
48
+ # resource path
49
+ local_var_path = '/subscription/{subscriptionId}/seats/add'.sub('{' + 'subscriptionId' + '}', subscription_id.to_s)
50
+
51
+ # query parameters
52
+ query_params = opts[:query_params] || {}
53
+
54
+ # header parameters
55
+ header_params = opts[:header_params] || {}
56
+ # HTTP header 'Accept' (if needed)
57
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
58
+ # HTTP header 'Content-Type'
59
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
66
+
67
+ return_type = opts[:return_type] || 'InlineResponse20011'
68
+
69
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
70
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type)
77
+
78
+ if @api_client.config.debugging
79
+ @api_client.config.logger.debug "API called: CustomersApi#add_seats_subscriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
+ end
81
+ return data, status_code, headers
82
+ end
83
+ # Apply voucher
84
+ # Apply Voucher to Customer
85
+ # @param body
86
+ # @param customer_id The id of the customer to retrieve
87
+ # @param [Hash] opts the optional parameters
88
+ # @return [String]
89
+ def apply_voucher_to_customer(body, customer_id, opts = {})
90
+ data, _status_code, _headers = apply_voucher_to_customer_with_http_info(body, customer_id, opts)
91
+ data
92
+ end
93
+
94
+ # Apply voucher
95
+ # Apply Voucher to Customer
96
+ # @param body
97
+ # @param customer_id The id of the customer to retrieve
98
+ # @param [Hash] opts the optional parameters
99
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
100
+ def apply_voucher_to_customer_with_http_info(body, customer_id, opts = {})
101
+ if @api_client.config.debugging
102
+ @api_client.config.logger.debug 'Calling API: CustomersApi.apply_voucher_to_customer ...'
103
+ end
104
+ # verify the required parameter 'body' is set
105
+ if @api_client.config.client_side_validation && body.nil?
106
+ fail ArgumentError, "Missing the required parameter 'body' when calling CustomersApi.apply_voucher_to_customer"
107
+ end
108
+ # verify the required parameter 'customer_id' is set
109
+ if @api_client.config.client_side_validation && customer_id.nil?
110
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.apply_voucher_to_customer"
111
+ end
112
+ # resource path
113
+ local_var_path = '/customer/{customerId}/voucher'.sub('{' + 'customerId' + '}', customer_id.to_s)
114
+
115
+ # query parameters
116
+ query_params = opts[:query_params] || {}
117
+
118
+ # header parameters
119
+ header_params = opts[:header_params] || {}
120
+ # HTTP header 'Accept' (if needed)
121
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
122
+ # HTTP header 'Content-Type'
123
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
124
+
125
+ # form parameters
126
+ form_params = opts[:form_params] || {}
127
+
128
+ # http body (model)
129
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
130
+
131
+ return_type = opts[:return_type] || 'String'
132
+
133
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
134
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
135
+ :header_params => header_params,
136
+ :query_params => query_params,
137
+ :form_params => form_params,
138
+ :body => post_body,
139
+ :auth_names => auth_names,
140
+ :return_type => return_type)
141
+
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: CustomersApi#apply_voucher_to_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+ # Create
148
+ # Create a customer
149
+ # @param body
150
+ # @param [Hash] opts the optional parameters
151
+ # @return [Customer]
152
+ def create_customer(body, opts = {})
153
+ data, _status_code, _headers = create_customer_with_http_info(body, opts)
154
+ data
155
+ end
156
+
157
+ # Create
158
+ # Create a customer
159
+ # @param body
160
+ # @param [Hash] opts the optional parameters
161
+ # @return [Array<(Customer, Integer, Hash)>] Customer data, response status code and response headers
162
+ def create_customer_with_http_info(body, opts = {})
163
+ if @api_client.config.debugging
164
+ @api_client.config.logger.debug 'Calling API: CustomersApi.create_customer ...'
165
+ end
166
+ # verify the required parameter 'body' is set
167
+ if @api_client.config.client_side_validation && body.nil?
168
+ fail ArgumentError, "Missing the required parameter 'body' when calling CustomersApi.create_customer"
169
+ end
170
+ # resource path
171
+ local_var_path = '/customer'
172
+
173
+ # query parameters
174
+ query_params = opts[:query_params] || {}
175
+
176
+ # header parameters
177
+ header_params = opts[:header_params] || {}
178
+ # HTTP header 'Accept' (if needed)
179
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
180
+ # HTTP header 'Content-Type'
181
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
182
+
183
+ # form parameters
184
+ form_params = opts[:form_params] || {}
185
+
186
+ # http body (model)
187
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
188
+
189
+ return_type = opts[:return_type] || 'Customer'
190
+
191
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
192
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
193
+ :header_params => header_params,
194
+ :query_params => query_params,
195
+ :form_params => form_params,
196
+ :body => post_body,
197
+ :auth_names => auth_names,
198
+ :return_type => return_type)
199
+
200
+ if @api_client.config.debugging
201
+ @api_client.config.logger.debug "API called: CustomersApi#create_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
202
+ end
203
+ return data, status_code, headers
204
+ end
205
+ # Disable Customer
206
+ # Disable customer
207
+ # @param customer_id The id of the customer to retrieve
208
+ # @param [Hash] opts the optional parameters
209
+ # @return [String]
210
+ def disable_customer(customer_id, opts = {})
211
+ data, _status_code, _headers = disable_customer_with_http_info(customer_id, opts)
212
+ data
213
+ end
214
+
215
+ # Disable Customer
216
+ # Disable customer
217
+ # @param customer_id The id of the customer to retrieve
218
+ # @param [Hash] opts the optional parameters
219
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
220
+ def disable_customer_with_http_info(customer_id, opts = {})
221
+ if @api_client.config.debugging
222
+ @api_client.config.logger.debug 'Calling API: CustomersApi.disable_customer ...'
223
+ end
224
+ # verify the required parameter 'customer_id' is set
225
+ if @api_client.config.client_side_validation && customer_id.nil?
226
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.disable_customer"
227
+ end
228
+ # resource path
229
+ local_var_path = '/customer/{customerId}/disable'.sub('{' + 'customerId' + '}', customer_id.to_s)
230
+
231
+ # query parameters
232
+ query_params = opts[:query_params] || {}
233
+
234
+ # header parameters
235
+ header_params = opts[:header_params] || {}
236
+ # HTTP header 'Accept' (if needed)
237
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
238
+
239
+ # form parameters
240
+ form_params = opts[:form_params] || {}
241
+
242
+ # http body (model)
243
+ post_body = opts[:body]
244
+
245
+ return_type = opts[:return_type] || 'String'
246
+
247
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
248
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
249
+ :header_params => header_params,
250
+ :query_params => query_params,
251
+ :form_params => form_params,
252
+ :body => post_body,
253
+ :auth_names => auth_names,
254
+ :return_type => return_type)
255
+
256
+ if @api_client.config.debugging
257
+ @api_client.config.logger.debug "API called: CustomersApi#disable_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
258
+ end
259
+ return data, status_code, headers
260
+ end
261
+ # Enable Customer
262
+ # Enable a customer
263
+ # @param customer_id The id of the customer to retrieve
264
+ # @param [Hash] opts the optional parameters
265
+ # @return [String]
266
+ def enable_customer(customer_id, opts = {})
267
+ data, _status_code, _headers = enable_customer_with_http_info(customer_id, opts)
268
+ data
269
+ end
270
+
271
+ # Enable Customer
272
+ # Enable a customer
273
+ # @param customer_id The id of the customer to retrieve
274
+ # @param [Hash] opts the optional parameters
275
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
276
+ def enable_customer_with_http_info(customer_id, opts = {})
277
+ if @api_client.config.debugging
278
+ @api_client.config.logger.debug 'Calling API: CustomersApi.enable_customer ...'
279
+ end
280
+ # verify the required parameter 'customer_id' is set
281
+ if @api_client.config.client_side_validation && customer_id.nil?
282
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.enable_customer"
283
+ end
284
+ # resource path
285
+ local_var_path = '/customer/{customerId}/enable'.sub('{' + 'customerId' + '}', customer_id.to_s)
286
+
287
+ # query parameters
288
+ query_params = opts[:query_params] || {}
289
+
290
+ # header parameters
291
+ header_params = opts[:header_params] || {}
292
+ # HTTP header 'Accept' (if needed)
293
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
294
+
295
+ # form parameters
296
+ form_params = opts[:form_params] || {}
297
+
298
+ # http body (model)
299
+ post_body = opts[:body]
300
+
301
+ return_type = opts[:return_type] || 'String'
302
+
303
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
304
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
305
+ :header_params => header_params,
306
+ :query_params => query_params,
307
+ :form_params => form_params,
308
+ :body => post_body,
309
+ :auth_names => auth_names,
310
+ :return_type => return_type)
311
+
312
+ if @api_client.config.debugging
313
+ @api_client.config.logger.debug "API called: CustomersApi#enable_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
314
+ end
315
+ return data, status_code, headers
316
+ end
317
+ # List Customer Active Subscriptions
318
+ # List all Active customer subscriptions
319
+ # @param customer_id The id of the customer to retrieve
320
+ # @param [Hash] opts the optional parameters
321
+ # @return [InlineResponse2006]
322
+ def get_active_for_customer(customer_id, opts = {})
323
+ data, _status_code, _headers = get_active_for_customer_with_http_info(customer_id, opts)
324
+ data
325
+ end
326
+
327
+ # List Customer Active Subscriptions
328
+ # List all Active customer subscriptions
329
+ # @param customer_id The id of the customer to retrieve
330
+ # @param [Hash] opts the optional parameters
331
+ # @return [Array<(InlineResponse2006, Integer, Hash)>] InlineResponse2006 data, response status code and response headers
332
+ def get_active_for_customer_with_http_info(customer_id, opts = {})
333
+ if @api_client.config.debugging
334
+ @api_client.config.logger.debug 'Calling API: CustomersApi.get_active_for_customer ...'
335
+ end
336
+ # verify the required parameter 'customer_id' is set
337
+ if @api_client.config.client_side_validation && customer_id.nil?
338
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.get_active_for_customer"
339
+ end
340
+ # resource path
341
+ local_var_path = '/customer/{customerId}/subscription/active'.sub('{' + 'customerId' + '}', customer_id.to_s)
342
+
343
+ # query parameters
344
+ query_params = opts[:query_params] || {}
345
+
346
+ # header parameters
347
+ header_params = opts[:header_params] || {}
348
+ # HTTP header 'Accept' (if needed)
349
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
350
+
351
+ # form parameters
352
+ form_params = opts[:form_params] || {}
353
+
354
+ # http body (model)
355
+ post_body = opts[:body]
356
+
357
+ return_type = opts[:return_type] || 'InlineResponse2006'
358
+
359
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
360
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
361
+ :header_params => header_params,
362
+ :query_params => query_params,
363
+ :form_params => form_params,
364
+ :body => post_body,
365
+ :auth_names => auth_names,
366
+ :return_type => return_type)
367
+
368
+ if @api_client.config.debugging
369
+ @api_client.config.logger.debug "API called: CustomersApi#get_active_for_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
370
+ end
371
+ return data, status_code, headers
372
+ end
373
+ # List
374
+ # List all customers
375
+ # @param [Hash] opts the optional parameters
376
+ # @option opts [Integer] :limit How many items to return at one time (max 100)
377
+ # @option opts [String] :last_key The key to be used in pagination to say what the last key of the previous page was
378
+ # @option opts [String] :email The email to search for
379
+ # @option opts [String] :country The country code to search for
380
+ # @option opts [String] :reference The reference to search for
381
+ # @option opts [String] :external_reference The external reference to search for
382
+ # @return [InlineResponse200]
383
+ def get_all_customers(opts = {})
384
+ data, _status_code, _headers = get_all_customers_with_http_info(opts)
385
+ data
386
+ end
387
+
388
+ # List
389
+ # List all customers
390
+ # @param [Hash] opts the optional parameters
391
+ # @option opts [Integer] :limit How many items to return at one time (max 100)
392
+ # @option opts [String] :last_key The key to be used in pagination to say what the last key of the previous page was
393
+ # @option opts [String] :email The email to search for
394
+ # @option opts [String] :country The country code to search for
395
+ # @option opts [String] :reference The reference to search for
396
+ # @option opts [String] :external_reference The external reference to search for
397
+ # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
398
+ def get_all_customers_with_http_info(opts = {})
399
+ if @api_client.config.debugging
400
+ @api_client.config.logger.debug 'Calling API: CustomersApi.get_all_customers ...'
401
+ end
402
+ # resource path
403
+ local_var_path = '/customer'
404
+
405
+ # query parameters
406
+ query_params = opts[:query_params] || {}
407
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
408
+ query_params[:'last_key'] = opts[:'last_key'] if !opts[:'last_key'].nil?
409
+ query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil?
410
+ query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil?
411
+ query_params[:'reference'] = opts[:'reference'] if !opts[:'reference'].nil?
412
+ query_params[:'external_reference'] = opts[:'external_reference'] if !opts[:'external_reference'].nil?
413
+
414
+ # header parameters
415
+ header_params = opts[:header_params] || {}
416
+ # HTTP header 'Accept' (if needed)
417
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
418
+
419
+ # form parameters
420
+ form_params = opts[:form_params] || {}
421
+
422
+ # http body (model)
423
+ post_body = opts[:body]
424
+
425
+ return_type = opts[:return_type] || 'InlineResponse200'
426
+
427
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
428
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
429
+ :header_params => header_params,
430
+ :query_params => query_params,
431
+ :form_params => form_params,
432
+ :body => post_body,
433
+ :auth_names => auth_names,
434
+ :return_type => return_type)
435
+
436
+ if @api_client.config.debugging
437
+ @api_client.config.logger.debug "API called: CustomersApi#get_all_customers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
438
+ end
439
+ return data, status_code, headers
440
+ end
441
+ # Detail
442
+ # Info for a specific customer
443
+ # @param customer_id The id of the customer to retrieve
444
+ # @param [Hash] opts the optional parameters
445
+ # @return [Customer]
446
+ def get_customer_by_id(customer_id, opts = {})
447
+ data, _status_code, _headers = get_customer_by_id_with_http_info(customer_id, opts)
448
+ data
449
+ end
450
+
451
+ # Detail
452
+ # Info for a specific customer
453
+ # @param customer_id The id of the customer to retrieve
454
+ # @param [Hash] opts the optional parameters
455
+ # @return [Array<(Customer, Integer, Hash)>] Customer data, response status code and response headers
456
+ def get_customer_by_id_with_http_info(customer_id, opts = {})
457
+ if @api_client.config.debugging
458
+ @api_client.config.logger.debug 'Calling API: CustomersApi.get_customer_by_id ...'
459
+ end
460
+ # verify the required parameter 'customer_id' is set
461
+ if @api_client.config.client_side_validation && customer_id.nil?
462
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.get_customer_by_id"
463
+ end
464
+ # resource path
465
+ local_var_path = '/customer/{customerId}'.sub('{' + 'customerId' + '}', customer_id.to_s)
466
+
467
+ # query parameters
468
+ query_params = opts[:query_params] || {}
469
+
470
+ # header parameters
471
+ header_params = opts[:header_params] || {}
472
+ # HTTP header 'Accept' (if needed)
473
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
474
+
475
+ # form parameters
476
+ form_params = opts[:form_params] || {}
477
+
478
+ # http body (model)
479
+ post_body = opts[:body]
480
+
481
+ return_type = opts[:return_type] || 'Customer'
482
+
483
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
484
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
485
+ :header_params => header_params,
486
+ :query_params => query_params,
487
+ :form_params => form_params,
488
+ :body => post_body,
489
+ :auth_names => auth_names,
490
+ :return_type => return_type)
491
+
492
+ if @api_client.config.debugging
493
+ @api_client.config.logger.debug "API called: CustomersApi#get_customer_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
494
+ end
495
+ return data, status_code, headers
496
+ end
497
+ # Fetch Customer Limits
498
+ # Limits for a specific customer
499
+ # @param customer_id The id of the customer to retrieve
500
+ # @param [Hash] opts the optional parameters
501
+ # @return [InlineResponse2001]
502
+ def get_customer_limits_by_id(customer_id, opts = {})
503
+ data, _status_code, _headers = get_customer_limits_by_id_with_http_info(customer_id, opts)
504
+ data
505
+ end
506
+
507
+ # Fetch Customer Limits
508
+ # Limits for a specific customer
509
+ # @param customer_id The id of the customer to retrieve
510
+ # @param [Hash] opts the optional parameters
511
+ # @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
512
+ def get_customer_limits_by_id_with_http_info(customer_id, opts = {})
513
+ if @api_client.config.debugging
514
+ @api_client.config.logger.debug 'Calling API: CustomersApi.get_customer_limits_by_id ...'
515
+ end
516
+ # verify the required parameter 'customer_id' is set
517
+ if @api_client.config.client_side_validation && customer_id.nil?
518
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.get_customer_limits_by_id"
519
+ end
520
+ # resource path
521
+ local_var_path = '/customer/{customerId}/limits'.sub('{' + 'customerId' + '}', customer_id.to_s)
522
+
523
+ # query parameters
524
+ query_params = opts[:query_params] || {}
525
+
526
+ # header parameters
527
+ header_params = opts[:header_params] || {}
528
+ # HTTP header 'Accept' (if needed)
529
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
530
+
531
+ # form parameters
532
+ form_params = opts[:form_params] || {}
533
+
534
+ # http body (model)
535
+ post_body = opts[:body]
536
+
537
+ return_type = opts[:return_type] || 'InlineResponse2001'
538
+
539
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
540
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
541
+ :header_params => header_params,
542
+ :query_params => query_params,
543
+ :form_params => form_params,
544
+ :body => post_body,
545
+ :auth_names => auth_names,
546
+ :return_type => return_type)
547
+
548
+ if @api_client.config.debugging
549
+ @api_client.config.logger.debug "API called: CustomersApi#get_customer_limits_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
550
+ end
551
+ return data, status_code, headers
552
+ end
553
+ # List Customer Subscriptions
554
+ # List all customer subscriptions<br><br><strong>Since 1.1</strong>
555
+ # @param customer_id The id of the customer to retrieve
556
+ # @param [Hash] opts the optional parameters
557
+ # @return [InlineResponse2006]
558
+ def get_for_customer(customer_id, opts = {})
559
+ data, _status_code, _headers = get_for_customer_with_http_info(customer_id, opts)
560
+ data
561
+ end
562
+
563
+ # List Customer Subscriptions
564
+ # List all customer subscriptions&lt;br&gt;&lt;br&gt;&lt;strong&gt;Since 1.1&lt;/strong&gt;
565
+ # @param customer_id The id of the customer to retrieve
566
+ # @param [Hash] opts the optional parameters
567
+ # @return [Array<(InlineResponse2006, Integer, Hash)>] InlineResponse2006 data, response status code and response headers
568
+ def get_for_customer_with_http_info(customer_id, opts = {})
569
+ if @api_client.config.debugging
570
+ @api_client.config.logger.debug 'Calling API: CustomersApi.get_for_customer ...'
571
+ end
572
+ # verify the required parameter 'customer_id' is set
573
+ if @api_client.config.client_side_validation && customer_id.nil?
574
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.get_for_customer"
575
+ end
576
+ # resource path
577
+ local_var_path = '/customer/{customerId}/subscription'.sub('{' + 'customerId' + '}', customer_id.to_s)
578
+
579
+ # query parameters
580
+ query_params = opts[:query_params] || {}
581
+
582
+ # header parameters
583
+ header_params = opts[:header_params] || {}
584
+ # HTTP header 'Accept' (if needed)
585
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
586
+
587
+ # form parameters
588
+ form_params = opts[:form_params] || {}
589
+
590
+ # http body (model)
591
+ post_body = opts[:body]
592
+
593
+ return_type = opts[:return_type] || 'InlineResponse2006'
594
+
595
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
596
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
597
+ :header_params => header_params,
598
+ :query_params => query_params,
599
+ :form_params => form_params,
600
+ :body => post_body,
601
+ :auth_names => auth_names,
602
+ :return_type => return_type)
603
+
604
+ if @api_client.config.debugging
605
+ @api_client.config.logger.debug "API called: CustomersApi#get_for_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
606
+ end
607
+ return data, status_code, headers
608
+ end
609
+ # List Customer Invoices
610
+ # List Customer Invoices
611
+ # @param customer_id The id of the customer to retrieve
612
+ # @param [Hash] opts the optional parameters
613
+ # @return [InlineResponse2004]
614
+ def get_invoices_for_customer(customer_id, opts = {})
615
+ data, _status_code, _headers = get_invoices_for_customer_with_http_info(customer_id, opts)
616
+ data
617
+ end
618
+
619
+ # List Customer Invoices
620
+ # List Customer Invoices
621
+ # @param customer_id The id of the customer to retrieve
622
+ # @param [Hash] opts the optional parameters
623
+ # @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers
624
+ def get_invoices_for_customer_with_http_info(customer_id, opts = {})
625
+ if @api_client.config.debugging
626
+ @api_client.config.logger.debug 'Calling API: CustomersApi.get_invoices_for_customer ...'
627
+ end
628
+ # verify the required parameter 'customer_id' is set
629
+ if @api_client.config.client_side_validation && customer_id.nil?
630
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.get_invoices_for_customer"
631
+ end
632
+ # resource path
633
+ local_var_path = '/customer/{customerId}/invoices'.sub('{' + 'customerId' + '}', customer_id.to_s)
634
+
635
+ # query parameters
636
+ query_params = opts[:query_params] || {}
637
+
638
+ # header parameters
639
+ header_params = opts[:header_params] || {}
640
+ # HTTP header 'Accept' (if needed)
641
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
642
+
643
+ # form parameters
644
+ form_params = opts[:form_params] || {}
645
+
646
+ # http body (model)
647
+ post_body = opts[:body]
648
+
649
+ return_type = opts[:return_type] || 'InlineResponse2004'
650
+
651
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
652
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
653
+ :header_params => header_params,
654
+ :query_params => query_params,
655
+ :form_params => form_params,
656
+ :body => post_body,
657
+ :auth_names => auth_names,
658
+ :return_type => return_type)
659
+
660
+ if @api_client.config.debugging
661
+ @api_client.config.logger.debug "API called: CustomersApi#get_invoices_for_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
662
+ end
663
+ return data, status_code, headers
664
+ end
665
+ # List Customer Payments
666
+ # List Customer Payment
667
+ # @param customer_id The id of the customer to retrieve
668
+ # @param [Hash] opts the optional parameters
669
+ # @option opts [Integer] :limit How many items to return at one time (max 100)
670
+ # @option opts [String] :last_key The key to be used in pagination to say what the last key of the previous page was
671
+ # @option opts [String] :name The name to search for
672
+ # @return [InlineResponse2003]
673
+ def get_payments_for_customer(customer_id, opts = {})
674
+ data, _status_code, _headers = get_payments_for_customer_with_http_info(customer_id, opts)
675
+ data
676
+ end
677
+
678
+ # List Customer Payments
679
+ # List Customer Payment
680
+ # @param customer_id The id of the customer to retrieve
681
+ # @param [Hash] opts the optional parameters
682
+ # @option opts [Integer] :limit How many items to return at one time (max 100)
683
+ # @option opts [String] :last_key The key to be used in pagination to say what the last key of the previous page was
684
+ # @option opts [String] :name The name to search for
685
+ # @return [Array<(InlineResponse2003, Integer, Hash)>] InlineResponse2003 data, response status code and response headers
686
+ def get_payments_for_customer_with_http_info(customer_id, opts = {})
687
+ if @api_client.config.debugging
688
+ @api_client.config.logger.debug 'Calling API: CustomersApi.get_payments_for_customer ...'
689
+ end
690
+ # verify the required parameter 'customer_id' is set
691
+ if @api_client.config.client_side_validation && customer_id.nil?
692
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.get_payments_for_customer"
693
+ end
694
+ # resource path
695
+ local_var_path = '/customer/{customerId}/payment'.sub('{' + 'customerId' + '}', customer_id.to_s)
696
+
697
+ # query parameters
698
+ query_params = opts[:query_params] || {}
699
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
700
+ query_params[:'last_key'] = opts[:'last_key'] if !opts[:'last_key'].nil?
701
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
702
+
703
+ # header parameters
704
+ header_params = opts[:header_params] || {}
705
+ # HTTP header 'Accept' (if needed)
706
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
707
+
708
+ # form parameters
709
+ form_params = opts[:form_params] || {}
710
+
711
+ # http body (model)
712
+ post_body = opts[:body]
713
+
714
+ return_type = opts[:return_type] || 'InlineResponse2003'
715
+
716
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
717
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
718
+ :header_params => header_params,
719
+ :query_params => query_params,
720
+ :form_params => form_params,
721
+ :body => post_body,
722
+ :auth_names => auth_names,
723
+ :return_type => return_type)
724
+
725
+ if @api_client.config.debugging
726
+ @api_client.config.logger.debug "API called: CustomersApi#get_payments_for_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
727
+ end
728
+ return data, status_code, headers
729
+ end
730
+ # List Customer Refunds
731
+ # List Customer Refund
732
+ # @param customer_id The id of the customer to retrieve
733
+ # @param [Hash] opts the optional parameters
734
+ # @option opts [Integer] :limit How many items to return at one time (max 100)
735
+ # @option opts [String] :last_key The key to be used in pagination to say what the last key of the previous page was
736
+ # @option opts [String] :name The name to search for
737
+ # @return [InlineResponse2002]
738
+ def get_refunds_for_customer(customer_id, opts = {})
739
+ data, _status_code, _headers = get_refunds_for_customer_with_http_info(customer_id, opts)
740
+ data
741
+ end
742
+
743
+ # List Customer Refunds
744
+ # List Customer Refund
745
+ # @param customer_id The id of the customer to retrieve
746
+ # @param [Hash] opts the optional parameters
747
+ # @option opts [Integer] :limit How many items to return at one time (max 100)
748
+ # @option opts [String] :last_key The key to be used in pagination to say what the last key of the previous page was
749
+ # @option opts [String] :name The name to search for
750
+ # @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers
751
+ def get_refunds_for_customer_with_http_info(customer_id, opts = {})
752
+ if @api_client.config.debugging
753
+ @api_client.config.logger.debug 'Calling API: CustomersApi.get_refunds_for_customer ...'
754
+ end
755
+ # verify the required parameter 'customer_id' is set
756
+ if @api_client.config.client_side_validation && customer_id.nil?
757
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.get_refunds_for_customer"
758
+ end
759
+ # resource path
760
+ local_var_path = '/customer/{customerId}/refund'.sub('{' + 'customerId' + '}', customer_id.to_s)
761
+
762
+ # query parameters
763
+ query_params = opts[:query_params] || {}
764
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
765
+ query_params[:'last_key'] = opts[:'last_key'] if !opts[:'last_key'].nil?
766
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
767
+
768
+ # header parameters
769
+ header_params = opts[:header_params] || {}
770
+ # HTTP header 'Accept' (if needed)
771
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
772
+
773
+ # form parameters
774
+ form_params = opts[:form_params] || {}
775
+
776
+ # http body (model)
777
+ post_body = opts[:body]
778
+
779
+ return_type = opts[:return_type] || 'InlineResponse2002'
780
+
781
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
782
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
783
+ :header_params => header_params,
784
+ :query_params => query_params,
785
+ :form_params => form_params,
786
+ :body => post_body,
787
+ :auth_names => auth_names,
788
+ :return_type => return_type)
789
+
790
+ if @api_client.config.debugging
791
+ @api_client.config.logger.debug "API called: CustomersApi#get_refunds_for_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
792
+ end
793
+ return data, status_code, headers
794
+ end
795
+ # List Customer's Payment Details
796
+ # List all customers <br><br>Added in version 1.1
797
+ # @param customer_id The id of the customer to retrieve
798
+ # @param [Hash] opts the optional parameters
799
+ # @return [InlineResponse2005]
800
+ def list_payment_details(customer_id, opts = {})
801
+ data, _status_code, _headers = list_payment_details_with_http_info(customer_id, opts)
802
+ data
803
+ end
804
+
805
+ # List Customer&#x27;s Payment Details
806
+ # List all customers &lt;br&gt;&lt;br&gt;Added in version 1.1
807
+ # @param customer_id The id of the customer to retrieve
808
+ # @param [Hash] opts the optional parameters
809
+ # @return [Array<(InlineResponse2005, Integer, Hash)>] InlineResponse2005 data, response status code and response headers
810
+ def list_payment_details_with_http_info(customer_id, opts = {})
811
+ if @api_client.config.debugging
812
+ @api_client.config.logger.debug 'Calling API: CustomersApi.list_payment_details ...'
813
+ end
814
+ # verify the required parameter 'customer_id' is set
815
+ if @api_client.config.client_side_validation && customer_id.nil?
816
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.list_payment_details"
817
+ end
818
+ # resource path
819
+ local_var_path = '/customer/{customerId}/payment-methods'.sub('{' + 'customerId' + '}', customer_id.to_s)
820
+
821
+ # query parameters
822
+ query_params = opts[:query_params] || {}
823
+
824
+ # header parameters
825
+ header_params = opts[:header_params] || {}
826
+ # HTTP header 'Accept' (if needed)
827
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
828
+
829
+ # form parameters
830
+ form_params = opts[:form_params] || {}
831
+
832
+ # http body (model)
833
+ post_body = opts[:body]
834
+
835
+ return_type = opts[:return_type] || 'InlineResponse2005'
836
+
837
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
838
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
839
+ :header_params => header_params,
840
+ :query_params => query_params,
841
+ :form_params => form_params,
842
+ :body => post_body,
843
+ :auth_names => auth_names,
844
+ :return_type => return_type)
845
+
846
+ if @api_client.config.debugging
847
+ @api_client.config.logger.debug "API called: CustomersApi#list_payment_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
848
+ end
849
+ return data, status_code, headers
850
+ end
851
+ # Remove Seats
852
+ # Remove seats to a per seat subscription<br><br><strong>Since 1.1.4</strong>
853
+ # @param body
854
+ # @param subscription_id The id of the subscription to retrieve
855
+ # @param [Hash] opts the optional parameters
856
+ # @return [InlineResponse20011]
857
+ def remove_seats_subscriptions(body, subscription_id, opts = {})
858
+ data, _status_code, _headers = remove_seats_subscriptions_with_http_info(body, subscription_id, opts)
859
+ data
860
+ end
861
+
862
+ # Remove Seats
863
+ # Remove seats to a per seat subscription&lt;br&gt;&lt;br&gt;&lt;strong&gt;Since 1.1.4&lt;/strong&gt;
864
+ # @param body
865
+ # @param subscription_id The id of the subscription to retrieve
866
+ # @param [Hash] opts the optional parameters
867
+ # @return [Array<(InlineResponse20011, Integer, Hash)>] InlineResponse20011 data, response status code and response headers
868
+ def remove_seats_subscriptions_with_http_info(body, subscription_id, opts = {})
869
+ if @api_client.config.debugging
870
+ @api_client.config.logger.debug 'Calling API: CustomersApi.remove_seats_subscriptions ...'
871
+ end
872
+ # verify the required parameter 'body' is set
873
+ if @api_client.config.client_side_validation && body.nil?
874
+ fail ArgumentError, "Missing the required parameter 'body' when calling CustomersApi.remove_seats_subscriptions"
875
+ end
876
+ # verify the required parameter 'subscription_id' is set
877
+ if @api_client.config.client_side_validation && subscription_id.nil?
878
+ fail ArgumentError, "Missing the required parameter 'subscription_id' when calling CustomersApi.remove_seats_subscriptions"
879
+ end
880
+ # resource path
881
+ local_var_path = '/subscription/{subscriptionId}/seats/remove'.sub('{' + 'subscriptionId' + '}', subscription_id.to_s)
882
+
883
+ # query parameters
884
+ query_params = opts[:query_params] || {}
885
+
886
+ # header parameters
887
+ header_params = opts[:header_params] || {}
888
+ # HTTP header 'Accept' (if needed)
889
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
890
+ # HTTP header 'Content-Type'
891
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
892
+
893
+ # form parameters
894
+ form_params = opts[:form_params] || {}
895
+
896
+ # http body (model)
897
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
898
+
899
+ return_type = opts[:return_type] || 'InlineResponse20011'
900
+
901
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
902
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
903
+ :header_params => header_params,
904
+ :query_params => query_params,
905
+ :form_params => form_params,
906
+ :body => post_body,
907
+ :auth_names => auth_names,
908
+ :return_type => return_type)
909
+
910
+ if @api_client.config.debugging
911
+ @api_client.config.logger.debug "API called: CustomersApi#remove_seats_subscriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
912
+ end
913
+ return data, status_code, headers
914
+ end
915
+ # Update
916
+ # Update a customer
917
+ # @param body
918
+ # @param customer_id The id of the customer to retrieve
919
+ # @param [Hash] opts the optional parameters
920
+ # @return [Customer]
921
+ def update_customer(body, customer_id, opts = {})
922
+ data, _status_code, _headers = update_customer_with_http_info(body, customer_id, opts)
923
+ data
924
+ end
925
+
926
+ # Update
927
+ # Update a customer
928
+ # @param body
929
+ # @param customer_id The id of the customer to retrieve
930
+ # @param [Hash] opts the optional parameters
931
+ # @return [Array<(Customer, Integer, Hash)>] Customer data, response status code and response headers
932
+ def update_customer_with_http_info(body, customer_id, opts = {})
933
+ if @api_client.config.debugging
934
+ @api_client.config.logger.debug 'Calling API: CustomersApi.update_customer ...'
935
+ end
936
+ # verify the required parameter 'body' is set
937
+ if @api_client.config.client_side_validation && body.nil?
938
+ fail ArgumentError, "Missing the required parameter 'body' when calling CustomersApi.update_customer"
939
+ end
940
+ # verify the required parameter 'customer_id' is set
941
+ if @api_client.config.client_side_validation && customer_id.nil?
942
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.update_customer"
943
+ end
944
+ # resource path
945
+ local_var_path = '/customer/{customerId}'.sub('{' + 'customerId' + '}', customer_id.to_s)
946
+
947
+ # query parameters
948
+ query_params = opts[:query_params] || {}
949
+
950
+ # header parameters
951
+ header_params = opts[:header_params] || {}
952
+ # HTTP header 'Accept' (if needed)
953
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
954
+ # HTTP header 'Content-Type'
955
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
956
+
957
+ # form parameters
958
+ form_params = opts[:form_params] || {}
959
+
960
+ # http body (model)
961
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
962
+
963
+ return_type = opts[:return_type] || 'Customer'
964
+
965
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
966
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
967
+ :header_params => header_params,
968
+ :query_params => query_params,
969
+ :form_params => form_params,
970
+ :body => post_body,
971
+ :auth_names => auth_names,
972
+ :return_type => return_type)
973
+
974
+ if @api_client.config.debugging
975
+ @api_client.config.logger.debug "API called: CustomersApi#update_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
976
+ end
977
+ return data, status_code, headers
978
+ end
979
+ end
980
+ end