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,812 @@
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 SubscriptionsApi
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: SubscriptionsApi.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 SubscriptionsApi.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 SubscriptionsApi.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: SubscriptionsApi#add_seats_subscriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
+ end
81
+ return data, status_code, headers
82
+ end
83
+ # Cancel Subscription
84
+ # Info for a specific subscription
85
+ # @param body
86
+ # @param subscription_id The id of the subscription to retrieve
87
+ # @param [Hash] opts the optional parameters
88
+ # @return [String]
89
+ def cancel_subscription(body, subscription_id, opts = {})
90
+ data, _status_code, _headers = cancel_subscription_with_http_info(body, subscription_id, opts)
91
+ data
92
+ end
93
+
94
+ # Cancel Subscription
95
+ # Info for a specific subscription
96
+ # @param body
97
+ # @param subscription_id The id of the subscription 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 cancel_subscription_with_http_info(body, subscription_id, opts = {})
101
+ if @api_client.config.debugging
102
+ @api_client.config.logger.debug 'Calling API: SubscriptionsApi.cancel_subscription ...'
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 SubscriptionsApi.cancel_subscription"
107
+ end
108
+ # verify the required parameter 'subscription_id' is set
109
+ if @api_client.config.client_side_validation && subscription_id.nil?
110
+ fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.cancel_subscription"
111
+ end
112
+ # resource path
113
+ local_var_path = '/subscription/{subscriptionId}/cancel'.sub('{' + 'subscriptionId' + '}', subscription_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: SubscriptionsApi#cancel_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+ # Change Price
148
+ # Changes the price being used for a price. Useful for changing pricing schedule or just price.
149
+ # @param body
150
+ # @param subscription_id The id of the subscription to retrieve
151
+ # @param [Hash] opts the optional parameters
152
+ # @return [InlineResponse20011]
153
+ def change_subscription_price(body, subscription_id, opts = {})
154
+ data, _status_code, _headers = change_subscription_price_with_http_info(body, subscription_id, opts)
155
+ data
156
+ end
157
+
158
+ # Change Price
159
+ # Changes the price being used for a price. Useful for changing pricing schedule or just price.
160
+ # @param body
161
+ # @param subscription_id The id of the subscription to retrieve
162
+ # @param [Hash] opts the optional parameters
163
+ # @return [Array<(InlineResponse20011, Integer, Hash)>] InlineResponse20011 data, response status code and response headers
164
+ def change_subscription_price_with_http_info(body, subscription_id, opts = {})
165
+ if @api_client.config.debugging
166
+ @api_client.config.logger.debug 'Calling API: SubscriptionsApi.change_subscription_price ...'
167
+ end
168
+ # verify the required parameter 'body' is set
169
+ if @api_client.config.client_side_validation && body.nil?
170
+ fail ArgumentError, "Missing the required parameter 'body' when calling SubscriptionsApi.change_subscription_price"
171
+ end
172
+ # verify the required parameter 'subscription_id' is set
173
+ if @api_client.config.client_side_validation && subscription_id.nil?
174
+ fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.change_subscription_price"
175
+ end
176
+ # resource path
177
+ local_var_path = '/subscription/{subscriptionId}/price'.sub('{' + 'subscriptionId' + '}', subscription_id.to_s)
178
+
179
+ # query parameters
180
+ query_params = opts[:query_params] || {}
181
+
182
+ # header parameters
183
+ header_params = opts[:header_params] || {}
184
+ # HTTP header 'Accept' (if needed)
185
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
186
+ # HTTP header 'Content-Type'
187
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
188
+
189
+ # form parameters
190
+ form_params = opts[:form_params] || {}
191
+
192
+ # http body (model)
193
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
194
+
195
+ return_type = opts[:return_type] || 'InlineResponse20011'
196
+
197
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
198
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
199
+ :header_params => header_params,
200
+ :query_params => query_params,
201
+ :form_params => form_params,
202
+ :body => post_body,
203
+ :auth_names => auth_names,
204
+ :return_type => return_type)
205
+
206
+ if @api_client.config.debugging
207
+ @api_client.config.logger.debug "API called: SubscriptionsApi#change_subscription_price\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
208
+ end
209
+ return data, status_code, headers
210
+ end
211
+ # Create Subscription
212
+ # Create subscription for a customer
213
+ # @param body
214
+ # @param customer_id The id of the customer to retrieve
215
+ # @param [Hash] opts the optional parameters
216
+ # @return [Subscription]
217
+ def create_subscription(body, customer_id, opts = {})
218
+ data, _status_code, _headers = create_subscription_with_http_info(body, customer_id, opts)
219
+ data
220
+ end
221
+
222
+ # Create Subscription
223
+ # Create subscription for a customer
224
+ # @param body
225
+ # @param customer_id The id of the customer to retrieve
226
+ # @param [Hash] opts the optional parameters
227
+ # @return [Array<(Subscription, Integer, Hash)>] Subscription data, response status code and response headers
228
+ def create_subscription_with_http_info(body, customer_id, opts = {})
229
+ if @api_client.config.debugging
230
+ @api_client.config.logger.debug 'Calling API: SubscriptionsApi.create_subscription ...'
231
+ end
232
+ # verify the required parameter 'body' is set
233
+ if @api_client.config.client_side_validation && body.nil?
234
+ fail ArgumentError, "Missing the required parameter 'body' when calling SubscriptionsApi.create_subscription"
235
+ end
236
+ # verify the required parameter 'customer_id' is set
237
+ if @api_client.config.client_side_validation && customer_id.nil?
238
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling SubscriptionsApi.create_subscription"
239
+ end
240
+ # resource path
241
+ local_var_path = '/customer/{customerId}/subscription/start'.sub('{' + 'customerId' + '}', customer_id.to_s)
242
+
243
+ # query parameters
244
+ query_params = opts[:query_params] || {}
245
+
246
+ # header parameters
247
+ header_params = opts[:header_params] || {}
248
+ # HTTP header 'Accept' (if needed)
249
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
250
+ # HTTP header 'Content-Type'
251
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
252
+
253
+ # form parameters
254
+ form_params = opts[:form_params] || {}
255
+
256
+ # http body (model)
257
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
258
+
259
+ return_type = opts[:return_type] || 'Subscription'
260
+
261
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
262
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
263
+ :header_params => header_params,
264
+ :query_params => query_params,
265
+ :form_params => form_params,
266
+ :body => post_body,
267
+ :auth_names => auth_names,
268
+ :return_type => return_type)
269
+
270
+ if @api_client.config.debugging
271
+ @api_client.config.logger.debug "API called: SubscriptionsApi#create_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
272
+ end
273
+ return data, status_code, headers
274
+ end
275
+ # Change Subscription Plan
276
+ # Change the subscription plan for a customer
277
+ # @param body
278
+ # @param subscription_id The id of the subscription to retrieve
279
+ # @param [Hash] opts the optional parameters
280
+ # @return [Subscription]
281
+ def customer_change_subscription_plan(body, subscription_id, opts = {})
282
+ data, _status_code, _headers = customer_change_subscription_plan_with_http_info(body, subscription_id, opts)
283
+ data
284
+ end
285
+
286
+ # Change Subscription Plan
287
+ # Change the subscription plan for a customer
288
+ # @param body
289
+ # @param subscription_id The id of the subscription to retrieve
290
+ # @param [Hash] opts the optional parameters
291
+ # @return [Array<(Subscription, Integer, Hash)>] Subscription data, response status code and response headers
292
+ def customer_change_subscription_plan_with_http_info(body, subscription_id, opts = {})
293
+ if @api_client.config.debugging
294
+ @api_client.config.logger.debug 'Calling API: SubscriptionsApi.customer_change_subscription_plan ...'
295
+ end
296
+ # verify the required parameter 'body' is set
297
+ if @api_client.config.client_side_validation && body.nil?
298
+ fail ArgumentError, "Missing the required parameter 'body' when calling SubscriptionsApi.customer_change_subscription_plan"
299
+ end
300
+ # verify the required parameter 'subscription_id' is set
301
+ if @api_client.config.client_side_validation && subscription_id.nil?
302
+ fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.customer_change_subscription_plan"
303
+ end
304
+ # resource path
305
+ local_var_path = '/subscription/{subscriptionId}/plan'.sub('{' + 'subscriptionId' + '}', subscription_id.to_s)
306
+
307
+ # query parameters
308
+ query_params = opts[:query_params] || {}
309
+
310
+ # header parameters
311
+ header_params = opts[:header_params] || {}
312
+ # HTTP header 'Accept' (if needed)
313
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
314
+ # HTTP header 'Content-Type'
315
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
316
+
317
+ # form parameters
318
+ form_params = opts[:form_params] || {}
319
+
320
+ # http body (model)
321
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
322
+
323
+ return_type = opts[:return_type] || 'Subscription'
324
+
325
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
326
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
327
+ :header_params => header_params,
328
+ :query_params => query_params,
329
+ :form_params => form_params,
330
+ :body => post_body,
331
+ :auth_names => auth_names,
332
+ :return_type => return_type)
333
+
334
+ if @api_client.config.debugging
335
+ @api_client.config.logger.debug "API called: SubscriptionsApi#customer_change_subscription_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
336
+ end
337
+ return data, status_code, headers
338
+ end
339
+ # Extend Trial Subscription
340
+ # Extend a trial subscription so it's converted from a trial to a normal subscription.
341
+ # @param body
342
+ # @param subscription_id The id of the subscription to retrieve
343
+ # @param [Hash] opts the optional parameters
344
+ # @return [Subscription]
345
+ def extend_trial(body, subscription_id, opts = {})
346
+ data, _status_code, _headers = extend_trial_with_http_info(body, subscription_id, opts)
347
+ data
348
+ end
349
+
350
+ # Extend Trial Subscription
351
+ # Extend a trial subscription so it&#x27;s converted from a trial to a normal subscription.
352
+ # @param body
353
+ # @param subscription_id The id of the subscription to retrieve
354
+ # @param [Hash] opts the optional parameters
355
+ # @return [Array<(Subscription, Integer, Hash)>] Subscription data, response status code and response headers
356
+ def extend_trial_with_http_info(body, subscription_id, opts = {})
357
+ if @api_client.config.debugging
358
+ @api_client.config.logger.debug 'Calling API: SubscriptionsApi.extend_trial ...'
359
+ end
360
+ # verify the required parameter 'body' is set
361
+ if @api_client.config.client_side_validation && body.nil?
362
+ fail ArgumentError, "Missing the required parameter 'body' when calling SubscriptionsApi.extend_trial"
363
+ end
364
+ # verify the required parameter 'subscription_id' is set
365
+ if @api_client.config.client_side_validation && subscription_id.nil?
366
+ fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.extend_trial"
367
+ end
368
+ # resource path
369
+ local_var_path = '/subscription/{subscriptionId}/extend'.sub('{' + 'subscriptionId' + '}', subscription_id.to_s)
370
+
371
+ # query parameters
372
+ query_params = opts[:query_params] || {}
373
+
374
+ # header parameters
375
+ header_params = opts[:header_params] || {}
376
+ # HTTP header 'Accept' (if needed)
377
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
378
+ # HTTP header 'Content-Type'
379
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
380
+
381
+ # form parameters
382
+ form_params = opts[:form_params] || {}
383
+
384
+ # http body (model)
385
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
386
+
387
+ return_type = opts[:return_type] || 'Subscription'
388
+
389
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
390
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
391
+ :header_params => header_params,
392
+ :query_params => query_params,
393
+ :form_params => form_params,
394
+ :body => post_body,
395
+ :auth_names => auth_names,
396
+ :return_type => return_type)
397
+
398
+ if @api_client.config.debugging
399
+ @api_client.config.logger.debug "API called: SubscriptionsApi#extend_trial\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
400
+ end
401
+ return data, status_code, headers
402
+ end
403
+ # List Customer Active Subscriptions
404
+ # List all Active customer subscriptions
405
+ # @param customer_id The id of the customer to retrieve
406
+ # @param [Hash] opts the optional parameters
407
+ # @return [InlineResponse2006]
408
+ def get_active_for_customer(customer_id, opts = {})
409
+ data, _status_code, _headers = get_active_for_customer_with_http_info(customer_id, opts)
410
+ data
411
+ end
412
+
413
+ # List Customer Active Subscriptions
414
+ # List all Active customer subscriptions
415
+ # @param customer_id The id of the customer to retrieve
416
+ # @param [Hash] opts the optional parameters
417
+ # @return [Array<(InlineResponse2006, Integer, Hash)>] InlineResponse2006 data, response status code and response headers
418
+ def get_active_for_customer_with_http_info(customer_id, opts = {})
419
+ if @api_client.config.debugging
420
+ @api_client.config.logger.debug 'Calling API: SubscriptionsApi.get_active_for_customer ...'
421
+ end
422
+ # verify the required parameter 'customer_id' is set
423
+ if @api_client.config.client_side_validation && customer_id.nil?
424
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling SubscriptionsApi.get_active_for_customer"
425
+ end
426
+ # resource path
427
+ local_var_path = '/customer/{customerId}/subscription/active'.sub('{' + 'customerId' + '}', customer_id.to_s)
428
+
429
+ # query parameters
430
+ query_params = opts[:query_params] || {}
431
+
432
+ # header parameters
433
+ header_params = opts[:header_params] || {}
434
+ # HTTP header 'Accept' (if needed)
435
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
436
+
437
+ # form parameters
438
+ form_params = opts[:form_params] || {}
439
+
440
+ # http body (model)
441
+ post_body = opts[:body]
442
+
443
+ return_type = opts[:return_type] || 'InlineResponse2006'
444
+
445
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
446
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
447
+ :header_params => header_params,
448
+ :query_params => query_params,
449
+ :form_params => form_params,
450
+ :body => post_body,
451
+ :auth_names => auth_names,
452
+ :return_type => return_type)
453
+
454
+ if @api_client.config.debugging
455
+ @api_client.config.logger.debug "API called: SubscriptionsApi#get_active_for_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
456
+ end
457
+ return data, status_code, headers
458
+ end
459
+ # List Customer Subscriptions
460
+ # List all customer subscriptions<br><br><strong>Since 1.1</strong>
461
+ # @param customer_id The id of the customer to retrieve
462
+ # @param [Hash] opts the optional parameters
463
+ # @return [InlineResponse2006]
464
+ def get_for_customer(customer_id, opts = {})
465
+ data, _status_code, _headers = get_for_customer_with_http_info(customer_id, opts)
466
+ data
467
+ end
468
+
469
+ # List Customer Subscriptions
470
+ # List all customer subscriptions&lt;br&gt;&lt;br&gt;&lt;strong&gt;Since 1.1&lt;/strong&gt;
471
+ # @param customer_id The id of the customer to retrieve
472
+ # @param [Hash] opts the optional parameters
473
+ # @return [Array<(InlineResponse2006, Integer, Hash)>] InlineResponse2006 data, response status code and response headers
474
+ def get_for_customer_with_http_info(customer_id, opts = {})
475
+ if @api_client.config.debugging
476
+ @api_client.config.logger.debug 'Calling API: SubscriptionsApi.get_for_customer ...'
477
+ end
478
+ # verify the required parameter 'customer_id' is set
479
+ if @api_client.config.client_side_validation && customer_id.nil?
480
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling SubscriptionsApi.get_for_customer"
481
+ end
482
+ # resource path
483
+ local_var_path = '/customer/{customerId}/subscription'.sub('{' + 'customerId' + '}', customer_id.to_s)
484
+
485
+ # query parameters
486
+ query_params = opts[:query_params] || {}
487
+
488
+ # header parameters
489
+ header_params = opts[:header_params] || {}
490
+ # HTTP header 'Accept' (if needed)
491
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
492
+
493
+ # form parameters
494
+ form_params = opts[:form_params] || {}
495
+
496
+ # http body (model)
497
+ post_body = opts[:body]
498
+
499
+ return_type = opts[:return_type] || 'InlineResponse2006'
500
+
501
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
502
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
503
+ :header_params => header_params,
504
+ :query_params => query_params,
505
+ :form_params => form_params,
506
+ :body => post_body,
507
+ :auth_names => auth_names,
508
+ :return_type => return_type)
509
+
510
+ if @api_client.config.debugging
511
+ @api_client.config.logger.debug "API called: SubscriptionsApi#get_for_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
512
+ end
513
+ return data, status_code, headers
514
+ end
515
+ # List Subscription Plans
516
+ # List all subscriptions plans
517
+ # @param [Hash] opts the optional parameters
518
+ # @option opts [Integer] :limit How many items to return at one time (max 100)
519
+ # @option opts [String] :last_key The key to be used in pagination to say what the last key of the previous page was
520
+ # @return [InlineResponse20010]
521
+ def list_subscription_plans(opts = {})
522
+ data, _status_code, _headers = list_subscription_plans_with_http_info(opts)
523
+ data
524
+ end
525
+
526
+ # List Subscription Plans
527
+ # List all subscriptions plans
528
+ # @param [Hash] opts the optional parameters
529
+ # @option opts [Integer] :limit How many items to return at one time (max 100)
530
+ # @option opts [String] :last_key The key to be used in pagination to say what the last key of the previous page was
531
+ # @return [Array<(InlineResponse20010, Integer, Hash)>] InlineResponse20010 data, response status code and response headers
532
+ def list_subscription_plans_with_http_info(opts = {})
533
+ if @api_client.config.debugging
534
+ @api_client.config.logger.debug 'Calling API: SubscriptionsApi.list_subscription_plans ...'
535
+ end
536
+ # resource path
537
+ local_var_path = '/subscription/plans'
538
+
539
+ # query parameters
540
+ query_params = opts[:query_params] || {}
541
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
542
+ query_params[:'last_key'] = opts[:'last_key'] if !opts[:'last_key'].nil?
543
+
544
+ # header parameters
545
+ header_params = opts[:header_params] || {}
546
+ # HTTP header 'Accept' (if needed)
547
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
548
+
549
+ # form parameters
550
+ form_params = opts[:form_params] || {}
551
+
552
+ # http body (model)
553
+ post_body = opts[:body]
554
+
555
+ return_type = opts[:return_type] || 'InlineResponse20010'
556
+
557
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
558
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
559
+ :header_params => header_params,
560
+ :query_params => query_params,
561
+ :form_params => form_params,
562
+ :body => post_body,
563
+ :auth_names => auth_names,
564
+ :return_type => return_type)
565
+
566
+ if @api_client.config.debugging
567
+ @api_client.config.logger.debug "API called: SubscriptionsApi#list_subscription_plans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
568
+ end
569
+ return data, status_code, headers
570
+ end
571
+ # List
572
+ # List all subscriptions
573
+ # @param [Hash] opts the optional parameters
574
+ # @option opts [Integer] :limit How many items to return at one time (max 100)
575
+ # @option opts [String] :last_key The key to be used in pagination to say what the last key of the previous page was
576
+ # @return [InlineResponse2006]
577
+ def list_subscriptions(opts = {})
578
+ data, _status_code, _headers = list_subscriptions_with_http_info(opts)
579
+ data
580
+ end
581
+
582
+ # List
583
+ # List all subscriptions
584
+ # @param [Hash] opts the optional parameters
585
+ # @option opts [Integer] :limit How many items to return at one time (max 100)
586
+ # @option opts [String] :last_key The key to be used in pagination to say what the last key of the previous page was
587
+ # @return [Array<(InlineResponse2006, Integer, Hash)>] InlineResponse2006 data, response status code and response headers
588
+ def list_subscriptions_with_http_info(opts = {})
589
+ if @api_client.config.debugging
590
+ @api_client.config.logger.debug 'Calling API: SubscriptionsApi.list_subscriptions ...'
591
+ end
592
+ # resource path
593
+ local_var_path = '/subscription'
594
+
595
+ # query parameters
596
+ query_params = opts[:query_params] || {}
597
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
598
+ query_params[:'last_key'] = opts[:'last_key'] if !opts[:'last_key'].nil?
599
+
600
+ # header parameters
601
+ header_params = opts[:header_params] || {}
602
+ # HTTP header 'Accept' (if needed)
603
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
604
+
605
+ # form parameters
606
+ form_params = opts[:form_params] || {}
607
+
608
+ # http body (model)
609
+ post_body = opts[:body]
610
+
611
+ return_type = opts[:return_type] || 'InlineResponse2006'
612
+
613
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
614
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
615
+ :header_params => header_params,
616
+ :query_params => query_params,
617
+ :form_params => form_params,
618
+ :body => post_body,
619
+ :auth_names => auth_names,
620
+ :return_type => return_type)
621
+
622
+ if @api_client.config.debugging
623
+ @api_client.config.logger.debug "API called: SubscriptionsApi#list_subscriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
624
+ end
625
+ return data, status_code, headers
626
+ end
627
+ # Remove Seats
628
+ # Remove seats to a per seat subscription<br><br><strong>Since 1.1.4</strong>
629
+ # @param body
630
+ # @param subscription_id The id of the subscription to retrieve
631
+ # @param [Hash] opts the optional parameters
632
+ # @return [InlineResponse20011]
633
+ def remove_seats_subscriptions(body, subscription_id, opts = {})
634
+ data, _status_code, _headers = remove_seats_subscriptions_with_http_info(body, subscription_id, opts)
635
+ data
636
+ end
637
+
638
+ # Remove Seats
639
+ # Remove seats to a per seat subscription&lt;br&gt;&lt;br&gt;&lt;strong&gt;Since 1.1.4&lt;/strong&gt;
640
+ # @param body
641
+ # @param subscription_id The id of the subscription to retrieve
642
+ # @param [Hash] opts the optional parameters
643
+ # @return [Array<(InlineResponse20011, Integer, Hash)>] InlineResponse20011 data, response status code and response headers
644
+ def remove_seats_subscriptions_with_http_info(body, subscription_id, opts = {})
645
+ if @api_client.config.debugging
646
+ @api_client.config.logger.debug 'Calling API: SubscriptionsApi.remove_seats_subscriptions ...'
647
+ end
648
+ # verify the required parameter 'body' is set
649
+ if @api_client.config.client_side_validation && body.nil?
650
+ fail ArgumentError, "Missing the required parameter 'body' when calling SubscriptionsApi.remove_seats_subscriptions"
651
+ end
652
+ # verify the required parameter 'subscription_id' is set
653
+ if @api_client.config.client_side_validation && subscription_id.nil?
654
+ fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.remove_seats_subscriptions"
655
+ end
656
+ # resource path
657
+ local_var_path = '/subscription/{subscriptionId}/seats/remove'.sub('{' + 'subscriptionId' + '}', subscription_id.to_s)
658
+
659
+ # query parameters
660
+ query_params = opts[:query_params] || {}
661
+
662
+ # header parameters
663
+ header_params = opts[:header_params] || {}
664
+ # HTTP header 'Accept' (if needed)
665
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
666
+ # HTTP header 'Content-Type'
667
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
668
+
669
+ # form parameters
670
+ form_params = opts[:form_params] || {}
671
+
672
+ # http body (model)
673
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
674
+
675
+ return_type = opts[:return_type] || 'InlineResponse20011'
676
+
677
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
678
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
679
+ :header_params => header_params,
680
+ :query_params => query_params,
681
+ :form_params => form_params,
682
+ :body => post_body,
683
+ :auth_names => auth_names,
684
+ :return_type => return_type)
685
+
686
+ if @api_client.config.debugging
687
+ @api_client.config.logger.debug "API called: SubscriptionsApi#remove_seats_subscriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
688
+ end
689
+ return data, status_code, headers
690
+ end
691
+ # Detail
692
+ # Info for a specific subscription
693
+ # @param subscription_id The id of the subscription to retrieve
694
+ # @param [Hash] opts the optional parameters
695
+ # @return [Subscription]
696
+ def show_subscription_by_id(subscription_id, opts = {})
697
+ data, _status_code, _headers = show_subscription_by_id_with_http_info(subscription_id, opts)
698
+ data
699
+ end
700
+
701
+ # Detail
702
+ # Info for a specific subscription
703
+ # @param subscription_id The id of the subscription to retrieve
704
+ # @param [Hash] opts the optional parameters
705
+ # @return [Array<(Subscription, Integer, Hash)>] Subscription data, response status code and response headers
706
+ def show_subscription_by_id_with_http_info(subscription_id, opts = {})
707
+ if @api_client.config.debugging
708
+ @api_client.config.logger.debug 'Calling API: SubscriptionsApi.show_subscription_by_id ...'
709
+ end
710
+ # verify the required parameter 'subscription_id' is set
711
+ if @api_client.config.client_side_validation && subscription_id.nil?
712
+ fail ArgumentError, "Missing the required parameter 'subscription_id' when calling SubscriptionsApi.show_subscription_by_id"
713
+ end
714
+ # resource path
715
+ local_var_path = '/subscription/{subscriptionId}'.sub('{' + 'subscriptionId' + '}', subscription_id.to_s)
716
+
717
+ # query parameters
718
+ query_params = opts[:query_params] || {}
719
+
720
+ # header parameters
721
+ header_params = opts[:header_params] || {}
722
+ # HTTP header 'Accept' (if needed)
723
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
724
+
725
+ # form parameters
726
+ form_params = opts[:form_params] || {}
727
+
728
+ # http body (model)
729
+ post_body = opts[:body]
730
+
731
+ return_type = opts[:return_type] || 'Subscription'
732
+
733
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
734
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
735
+ :header_params => header_params,
736
+ :query_params => query_params,
737
+ :form_params => form_params,
738
+ :body => post_body,
739
+ :auth_names => auth_names,
740
+ :return_type => return_type)
741
+
742
+ if @api_client.config.debugging
743
+ @api_client.config.logger.debug "API called: SubscriptionsApi#show_subscription_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
744
+ end
745
+ return data, status_code, headers
746
+ end
747
+ # Start Trial Subscription For Customer
748
+ # Start subscription for a customer
749
+ # @param body
750
+ # @param customer_id The id of the customer to retrieve
751
+ # @param [Hash] opts the optional parameters
752
+ # @return [Subscription]
753
+ def start_trial(body, customer_id, opts = {})
754
+ data, _status_code, _headers = start_trial_with_http_info(body, customer_id, opts)
755
+ data
756
+ end
757
+
758
+ # Start Trial Subscription For Customer
759
+ # Start subscription for a customer
760
+ # @param body
761
+ # @param customer_id The id of the customer to retrieve
762
+ # @param [Hash] opts the optional parameters
763
+ # @return [Array<(Subscription, Integer, Hash)>] Subscription data, response status code and response headers
764
+ def start_trial_with_http_info(body, customer_id, opts = {})
765
+ if @api_client.config.debugging
766
+ @api_client.config.logger.debug 'Calling API: SubscriptionsApi.start_trial ...'
767
+ end
768
+ # verify the required parameter 'body' is set
769
+ if @api_client.config.client_side_validation && body.nil?
770
+ fail ArgumentError, "Missing the required parameter 'body' when calling SubscriptionsApi.start_trial"
771
+ end
772
+ # verify the required parameter 'customer_id' is set
773
+ if @api_client.config.client_side_validation && customer_id.nil?
774
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling SubscriptionsApi.start_trial"
775
+ end
776
+ # resource path
777
+ local_var_path = '/customer/{customerId}/subscription/trial'.sub('{' + 'customerId' + '}', customer_id.to_s)
778
+
779
+ # query parameters
780
+ query_params = opts[:query_params] || {}
781
+
782
+ # header parameters
783
+ header_params = opts[:header_params] || {}
784
+ # HTTP header 'Accept' (if needed)
785
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
786
+ # HTTP header 'Content-Type'
787
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
788
+
789
+ # form parameters
790
+ form_params = opts[:form_params] || {}
791
+
792
+ # http body (model)
793
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
794
+
795
+ return_type = opts[:return_type] || 'Subscription'
796
+
797
+ auth_names = opts[:auth_names] || ['ApiKeyAuth']
798
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
799
+ :header_params => header_params,
800
+ :query_params => query_params,
801
+ :form_params => form_params,
802
+ :body => post_body,
803
+ :auth_names => auth_names,
804
+ :return_type => return_type)
805
+
806
+ if @api_client.config.debugging
807
+ @api_client.config.logger.debug "API called: SubscriptionsApi#start_trial\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
808
+ end
809
+ return data, status_code, headers
810
+ end
811
+ end
812
+ end