subskribe_sandbox 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (417) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -7
  3. data/docs/AccountsApi.md +2 -2
  4. data/docs/AutomatedInvoiceRule.md +3 -3
  5. data/docs/BulkInvoiceRunItem.md +2 -2
  6. data/docs/BulkPaymentUploadData.md +5 -5
  7. data/docs/ChargeJson.md +2 -2
  8. data/docs/PaginatedAccountsResponse.md +10 -0
  9. data/docs/PaginatedSubscriptionsResponse.md +10 -0
  10. data/docs/RevenueRecognitionApi.md +20 -20
  11. data/docs/SubscriptionsApi.md +2 -2
  12. data/docs/TaxJarIntegration.md +2 -2
  13. data/lib/subskribe_sandbox/api/accounts_api.rb +3 -3
  14. data/lib/subskribe_sandbox/api/revenue_recognition_api.rb +22 -22
  15. data/lib/subskribe_sandbox/api/subscriptions_api.rb +3 -3
  16. data/lib/subskribe_sandbox/models/automated_invoice_rule.rb +31 -31
  17. data/lib/subskribe_sandbox/models/bulk_invoice_run_item.rb +22 -22
  18. data/lib/subskribe_sandbox/models/bulk_payment_upload_data.rb +46 -46
  19. data/lib/subskribe_sandbox/models/charge_json.rb +16 -16
  20. data/lib/{subskribe_dev/models/payment_json_pagination_response.rb → subskribe_sandbox/models/paginated_accounts_response.rb} +4 -4
  21. data/lib/{subskribe_dev/models/credit_memo_pagination_response_json.rb → subskribe_sandbox/models/paginated_subscriptions_response.rb} +4 -4
  22. data/lib/subskribe_sandbox/models/tax_jar_integration.rb +16 -16
  23. data/lib/subskribe_sandbox/version.rb +1 -1
  24. data/lib/subskribe_sandbox.rb +2 -1
  25. data/spec/api/accounting_api_spec.rb +3 -3
  26. data/spec/api/accounts_api_spec.rb +4 -4
  27. data/spec/api/approvals_api_spec.rb +3 -3
  28. data/spec/api/attachments_api_spec.rb +3 -3
  29. data/spec/api/authentication_api_spec.rb +3 -3
  30. data/spec/api/billing_api_spec.rb +3 -3
  31. data/spec/api/credit_memo_api_spec.rb +3 -3
  32. data/spec/api/custom_field_api_spec.rb +3 -3
  33. data/spec/api/customization_api_spec.rb +3 -3
  34. data/spec/api/default_api_spec.rb +3 -3
  35. data/spec/api/discounts_api_spec.rb +3 -3
  36. data/spec/api/entities_api_spec.rb +42 -3
  37. data/spec/api/erp_api_spec.rb +13 -13
  38. data/spec/api/import_api_spec.rb +3 -3
  39. data/spec/api/integrations_api_spec.rb +3 -3
  40. data/spec/api/metrics_reporting_api_spec.rb +3 -3
  41. data/spec/api/notifications_api_spec.rb +3 -3
  42. data/spec/api/opportunity_api_spec.rb +3 -3
  43. data/spec/api/orders_api_spec.rb +3 -3
  44. data/spec/api/payments_api_spec.rb +3 -3
  45. data/spec/api/product_catalog_api_spec.rb +16 -3
  46. data/spec/api/rate_card_api_spec.rb +3 -3
  47. data/spec/api/refunds_api_spec.rb +3 -3
  48. data/spec/api/reports_api_spec.rb +3 -3
  49. data/spec/api/revenue_recognition_api_spec.rb +8 -8
  50. data/spec/api/sales_room_api_spec.rb +3 -3
  51. data/spec/api/settings_api_spec.rb +240 -3
  52. data/spec/api/subscriptions_api_spec.rb +4 -4
  53. data/spec/api/usage_api_spec.rb +3 -3
  54. data/spec/api/users_api_spec.rb +3 -3
  55. data/spec/api_client_spec.rb +31 -31
  56. data/spec/configuration_spec.rb +6 -6
  57. data/spec/models/account_address_json_spec.rb +3 -3
  58. data/spec/models/account_address_spec.rb +3 -3
  59. data/spec/models/account_contact_json_spec.rb +3 -3
  60. data/spec/models/account_contact_spec.rb +3 -3
  61. data/spec/models/account_json_spec.rb +3 -3
  62. data/spec/models/account_payment_method_json_spec.rb +3 -3
  63. data/spec/models/account_receivable_contact_json_spec.rb +3 -3
  64. data/spec/models/accounting_event_paginated_response_spec.rb +3 -3
  65. data/spec/models/accounting_event_spec.rb +3 -3
  66. data/spec/models/accounting_period_calculation_spec.rb +3 -3
  67. data/spec/models/accounting_period_spec.rb +3 -3
  68. data/spec/models/add_and_apply_payment_application_json_spec.rb +3 -3
  69. data/spec/models/anrok_integration_input_spec.rb +3 -3
  70. data/spec/models/approval_matrix_import_data_json_spec.rb +3 -3
  71. data/spec/models/approval_matrix_import_preview_spec.rb +3 -3
  72. data/spec/models/approval_role_json_spec.rb +3 -3
  73. data/spec/models/approval_role_segment_change_spec.rb +3 -3
  74. data/spec/models/approval_segment_json_spec.rb +3 -3
  75. data/spec/models/attachment_spec.rb +3 -3
  76. data/spec/models/attribute_reference_spec.rb +3 -3
  77. data/spec/models/auth_saml_integration_json_spec.rb +3 -3
  78. data/spec/models/automated_invoice_rule_request_json_spec.rb +3 -3
  79. data/spec/models/automated_invoice_rule_spec.rb +15 -15
  80. data/spec/models/avalara_integration_input_spec.rb +3 -3
  81. data/spec/models/avalara_integration_spec.rb +3 -3
  82. data/spec/models/billing_event_entry_spec.rb +3 -3
  83. data/spec/models/billing_event_input_spec.rb +3 -3
  84. data/spec/models/bulk_invoice_run_exclusions_spec.rb +3 -3
  85. data/spec/models/bulk_invoice_run_input_spec.rb +3 -3
  86. data/spec/models/bulk_invoice_run_item_spec.rb +9 -9
  87. data/spec/models/bulk_invoice_run_selector_spec.rb +3 -3
  88. data/spec/models/bulk_invoice_run_spec.rb +3 -3
  89. data/spec/models/bulk_payment_upload_data_spec.rb +13 -13
  90. data/spec/models/bulk_payment_upload_result_spec.rb +6 -6
  91. data/spec/models/byte_buffer_spec.rb +3 -3
  92. data/spec/models/catalog_relationship_spec.rb +3 -3
  93. data/spec/models/charge_json_spec.rb +6 -6
  94. data/spec/models/charge_partial_json_spec.rb +3 -3
  95. data/spec/models/company_contact_json_spec.rb +3 -3
  96. data/spec/models/credit_memo_application_json_spec.rb +3 -3
  97. data/spec/models/credit_memo_balance_json_spec.rb +3 -3
  98. data/spec/models/credit_memo_json_spec.rb +3 -3
  99. data/spec/models/credit_memo_line_item_json_spec.rb +3 -3
  100. data/spec/models/credit_memo_line_item_request_json_spec.rb +3 -3
  101. data/spec/models/credit_memo_pagination_response_json_spec.rb +3 -3
  102. data/spec/models/crm_account_import_response_spec.rb +3 -3
  103. data/spec/models/custom_field_default_spec.rb +3 -3
  104. data/spec/models/custom_field_definition_create_input_spec.rb +3 -3
  105. data/spec/models/custom_field_definition_json_spec.rb +3 -3
  106. data/spec/models/custom_field_definition_update_input_spec.rb +3 -3
  107. data/spec/models/custom_field_entry_spec.rb +3 -3
  108. data/spec/models/custom_field_update_input_spec.rb +3 -3
  109. data/spec/models/custom_field_value_spec.rb +3 -3
  110. data/spec/models/data_import_spec.rb +3 -3
  111. data/spec/models/discount_detail_json_spec.rb +3 -3
  112. data/spec/models/discount_json_spec.rb +3 -3
  113. data/spec/models/docu_sign_integration_request_json_spec.rb +3 -3
  114. data/spec/models/docu_sign_integration_response_json_spec.rb +3 -3
  115. data/spec/models/document_custom_content_spec.rb +3 -3
  116. data/spec/models/document_section_spec.rb +3 -3
  117. data/spec/models/document_template_json_spec.rb +3 -3
  118. data/spec/models/dunning_setting_json_spec.rb +3 -3
  119. data/spec/models/email_notifiers_list_spec.rb +3 -3
  120. data/spec/models/entity_json_spec.rb +3 -3
  121. data/spec/models/entity_ref_spec.rb +3 -3
  122. data/spec/models/entity_spec.rb +3 -3
  123. data/spec/models/entry_spec.rb +3 -3
  124. data/spec/models/external_arr_schedule_json_spec.rb +3 -3
  125. data/spec/models/flatfile_workbook_response_data_spec.rb +3 -3
  126. data/spec/models/flatfile_workbook_response_spec.rb +3 -3
  127. data/spec/models/input_stream_spec.rb +3 -3
  128. data/spec/models/integration_spec.rb +3 -3
  129. data/spec/models/invoice_balance_json_spec.rb +3 -3
  130. data/spec/models/invoice_item_json_spec.rb +3 -3
  131. data/spec/models/invoice_item_preview_json_spec.rb +3 -3
  132. data/spec/models/invoice_json_pagination_response_spec.rb +3 -3
  133. data/spec/models/invoice_json_spec.rb +3 -3
  134. data/spec/models/invoice_number_prefix_spec.rb +3 -3
  135. data/spec/models/invoice_preview_json_spec.rb +3 -3
  136. data/spec/models/ledger_account_mapping_spec.rb +3 -3
  137. data/spec/models/ledger_account_spec.rb +3 -3
  138. data/spec/models/metrics_json_spec.rb +3 -3
  139. data/spec/models/notification_target_and_subscriptions_spec.rb +3 -3
  140. data/spec/models/number_config_spec.rb +3 -3
  141. data/spec/models/opportunity_json_spec.rb +3 -3
  142. data/spec/models/opportunity_pagination_response_spec.rb +3 -3
  143. data/spec/models/opportunity_rest_json_spec.rb +3 -3
  144. data/spec/models/opportunity_spec.rb +3 -3
  145. data/spec/models/order_json_pagination_response_spec.rb +3 -3
  146. data/spec/models/order_json_spec.rb +3 -3
  147. data/spec/models/order_line_item_json_spec.rb +9 -3
  148. data/spec/models/order_line_item_request_json_spec.rb +9 -3
  149. data/spec/models/order_request_json_spec.rb +3 -3
  150. data/spec/models/order_terms_spec.rb +3 -3
  151. data/spec/models/{paginated_response_spec.rb → paginated_accounts_response_spec.rb} +8 -8
  152. data/spec/models/paginated_subscriptions_response_spec.rb +53 -0
  153. data/spec/models/payment_balance_json_spec.rb +3 -3
  154. data/spec/models/payment_configuration_spec.rb +3 -3
  155. data/spec/models/payment_json_pagination_response_spec.rb +3 -3
  156. data/spec/models/payment_json_spec.rb +3 -3
  157. data/spec/models/payment_term_settings_json_spec.rb +3 -3
  158. data/spec/models/plan_json_pagination_response_spec.rb +3 -3
  159. data/spec/models/plan_json_spec.rb +3 -3
  160. data/spec/models/predefined_report_def_chart_json_spec.rb +3 -3
  161. data/spec/models/predefined_report_def_json_spec.rb +3 -3
  162. data/spec/models/predefined_report_defs_json_spec.rb +3 -3
  163. data/spec/models/predefined_report_json_spec.rb +3 -3
  164. data/spec/models/predefined_report_param_object_spec.rb +3 -3
  165. data/spec/models/predefined_report_param_spec.rb +3 -3
  166. data/spec/models/prepaid_stats_spec.rb +3 -3
  167. data/spec/models/price_tier_json_spec.rb +3 -3
  168. data/spec/models/product_category_pagination_response_spec.rb +3 -3
  169. data/spec/models/product_category_spec.rb +3 -3
  170. data/spec/models/product_input_json_spec.rb +3 -3
  171. data/spec/models/product_json_pagination_response_spec.rb +3 -3
  172. data/spec/models/product_json_spec.rb +3 -3
  173. data/spec/models/purchase_order_spec.rb +3 -3
  174. data/spec/models/raw_usage_spec.rb +3 -3
  175. data/spec/models/raw_usages_data_spec.rb +3 -3
  176. data/spec/models/recognition_event_completion_spec.rb +3 -3
  177. data/spec/models/recognition_rule_spec.rb +3 -3
  178. data/spec/models/recurrence_json_spec.rb +3 -3
  179. data/spec/models/refund_detail_spec.rb +3 -3
  180. data/spec/models/refund_request_json_spec.rb +3 -3
  181. data/spec/models/refund_spec.rb +3 -3
  182. data/spec/models/report_duration_spec.rb +3 -3
  183. data/spec/models/report_job_response_spec.rb +3 -3
  184. data/spec/models/salesforce_account_billing_address_spec.rb +3 -3
  185. data/spec/models/salesforce_account_spec.rb +3 -3
  186. data/spec/models/salesforce_client_integration_request_json_spec.rb +3 -3
  187. data/spec/models/settlement_application_spec.rb +3 -3
  188. data/spec/models/standalone_credit_memo_request_spec.rb +3 -3
  189. data/spec/models/subscription_charge_alias_spec.rb +3 -3
  190. data/spec/models/subscription_charge_json_spec.rb +3 -3
  191. data/spec/models/subscription_json_spec.rb +3 -3
  192. data/spec/models/subscription_update_json_spec.rb +3 -3
  193. data/spec/models/tax_jar_integration_input_spec.rb +3 -3
  194. data/spec/models/tax_jar_integration_spec.rb +7 -7
  195. data/spec/models/tax_rate_json_spec.rb +3 -3
  196. data/spec/models/tax_rate_pagination_response_json_spec.rb +3 -3
  197. data/spec/models/tenant_credit_memo_configuration_json_spec.rb +3 -3
  198. data/spec/models/tenant_discount_json_spec.rb +3 -3
  199. data/spec/models/tenant_discount_line_item_json_spec.rb +3 -3
  200. data/spec/models/tenant_invoice_config_spec.rb +3 -3
  201. data/spec/models/tenant_json_spec.rb +3 -3
  202. data/spec/models/tenant_setting_json_spec.rb +3 -3
  203. data/spec/models/time_series_amount_json_spec.rb +3 -3
  204. data/spec/models/time_zone_spec.rb +3 -3
  205. data/spec/models/unit_of_measure_json_spec.rb +3 -3
  206. data/spec/models/unit_of_measure_pagination_response_json_spec.rb +3 -3
  207. data/spec/models/update_invoice_request_spec.rb +3 -3
  208. data/spec/models/usage_aggregate_output_spec.rb +3 -3
  209. data/spec/models/usage_batch_insert_result_spec.rb +3 -3
  210. data/spec/models/user_group_json_spec.rb +3 -3
  211. data/spec/models/user_group_request_json_spec.rb +3 -3
  212. data/spec/models/user_input_spec.rb +3 -3
  213. data/spec/models/user_json_spec.rb +3 -3
  214. data/spec/models/user_pagination_response_json_spec.rb +3 -3
  215. data/spec/models/void_invoice_request_spec.rb +3 -3
  216. data/spec/models/void_payment_json_spec.rb +3 -3
  217. data/spec/spec_helper.rb +1 -1
  218. data/subskribe_sandbox.gemspec +3 -3
  219. metadata +193 -388
  220. data/docs/EntityApi.md +0 -66
  221. data/docs/PaginatedResponse.md +0 -10
  222. data/lib/subskribe_dev/api/accounting_api.rb +0 -193
  223. data/lib/subskribe_dev/api/accounts_api.rb +0 -858
  224. data/lib/subskribe_dev/api/approvals_api.rb +0 -965
  225. data/lib/subskribe_dev/api/attachments_api.rb +0 -299
  226. data/lib/subskribe_dev/api/authentication_api.rb +0 -335
  227. data/lib/subskribe_dev/api/billing_api.rb +0 -2098
  228. data/lib/subskribe_dev/api/credit_memo_api.rb +0 -636
  229. data/lib/subskribe_dev/api/custom_field_api.rb +0 -434
  230. data/lib/subskribe_dev/api/customization_api.rb +0 -269
  231. data/lib/subskribe_dev/api/default_api.rb +0 -223
  232. data/lib/subskribe_dev/api/discounts_api.rb +0 -340
  233. data/lib/subskribe_dev/api/entities_api.rb +0 -374
  234. data/lib/subskribe_dev/api/entity_api.rb +0 -79
  235. data/lib/subskribe_dev/api/erp_api.rb +0 -278
  236. data/lib/subskribe_dev/api/import_api.rb +0 -568
  237. data/lib/subskribe_dev/api/integrations_api.rb +0 -1678
  238. data/lib/subskribe_dev/api/metrics_reporting_api.rb +0 -223
  239. data/lib/subskribe_dev/api/notifications_api.rb +0 -245
  240. data/lib/subskribe_dev/api/opportunity_api.rb +0 -177
  241. data/lib/subskribe_dev/api/orders_api.rb +0 -1381
  242. data/lib/subskribe_dev/api/payments_api.rb +0 -431
  243. data/lib/subskribe_dev/api/product_catalog_api.rb +0 -1828
  244. data/lib/subskribe_dev/api/rate_card_api.rb +0 -68
  245. data/lib/subskribe_dev/api/refunds_api.rb +0 -189
  246. data/lib/subskribe_dev/api/reports_api.rb +0 -227
  247. data/lib/subskribe_dev/api/revenue_recognition_api.rb +0 -484
  248. data/lib/subskribe_dev/api/sales_room_api.rb +0 -74
  249. data/lib/subskribe_dev/api/settings_api.rb +0 -1321
  250. data/lib/subskribe_dev/api/subscriptions_api.rb +0 -576
  251. data/lib/subskribe_dev/api/usage_api.rb +0 -604
  252. data/lib/subskribe_dev/api/users_api.rb +0 -728
  253. data/lib/subskribe_dev/api_client.rb +0 -391
  254. data/lib/subskribe_dev/api_error.rb +0 -38
  255. data/lib/subskribe_dev/configuration.rb +0 -209
  256. data/lib/subskribe_dev/models/account_address.rb +0 -265
  257. data/lib/subskribe_dev/models/account_address_json.rb +0 -229
  258. data/lib/subskribe_dev/models/account_contact.rb +0 -530
  259. data/lib/subskribe_dev/models/account_contact_json.rb +0 -274
  260. data/lib/subskribe_dev/models/account_json.rb +0 -395
  261. data/lib/subskribe_dev/models/account_payment_method_json.rb +0 -268
  262. data/lib/subskribe_dev/models/account_receivable_contact_json.rb +0 -225
  263. data/lib/subskribe_dev/models/accounting_event.rb +0 -319
  264. data/lib/subskribe_dev/models/accounting_event_paginated_response.rb +0 -204
  265. data/lib/subskribe_dev/models/accounting_period.rb +0 -356
  266. data/lib/subskribe_dev/models/accounting_period_calculation.rb +0 -229
  267. data/lib/subskribe_dev/models/add_and_apply_payment_application_json.rb +0 -344
  268. data/lib/subskribe_dev/models/anrok_integration_input.rb +0 -184
  269. data/lib/subskribe_dev/models/approval_matrix_import_data_json.rb +0 -229
  270. data/lib/subskribe_dev/models/approval_matrix_import_preview.rb +0 -226
  271. data/lib/subskribe_dev/models/approval_role_json.rb +0 -220
  272. data/lib/subskribe_dev/models/approval_role_segment_change.rb +0 -211
  273. data/lib/subskribe_dev/models/approval_segment_json.rb +0 -220
  274. data/lib/subskribe_dev/models/attachment.rb +0 -326
  275. data/lib/subskribe_dev/models/attribute_reference.rb +0 -193
  276. data/lib/subskribe_dev/models/auth_saml_integration_json.rb +0 -204
  277. data/lib/subskribe_dev/models/automated_invoice_rule.rb +0 -328
  278. data/lib/subskribe_dev/models/automated_invoice_rule_request_json.rb +0 -307
  279. data/lib/subskribe_dev/models/avalara_integration.rb +0 -238
  280. data/lib/subskribe_dev/models/avalara_integration_input.rb +0 -268
  281. data/lib/subskribe_dev/models/billing_event_entry.rb +0 -211
  282. data/lib/subskribe_dev/models/billing_event_input.rb +0 -216
  283. data/lib/subskribe_dev/models/bulk_invoice_run.rb +0 -350
  284. data/lib/subskribe_dev/models/bulk_invoice_run_exclusions.rb +0 -197
  285. data/lib/subskribe_dev/models/bulk_invoice_run_input.rb +0 -263
  286. data/lib/subskribe_dev/models/bulk_invoice_run_item.rb +0 -364
  287. data/lib/subskribe_dev/models/bulk_invoice_run_selector.rb +0 -184
  288. data/lib/subskribe_dev/models/bulk_payment_upload_data.rb +0 -274
  289. data/lib/subskribe_dev/models/bulk_payment_upload_result.rb +0 -204
  290. data/lib/subskribe_dev/models/byte_buffer.rb +0 -247
  291. data/lib/subskribe_dev/models/catalog_relationship.rb +0 -364
  292. data/lib/subskribe_dev/models/charge_json.rb +0 -631
  293. data/lib/subskribe_dev/models/charge_partial_json.rb +0 -310
  294. data/lib/subskribe_dev/models/company_contact_json.rb +0 -225
  295. data/lib/subskribe_dev/models/credit_memo_application_json.rb +0 -239
  296. data/lib/subskribe_dev/models/credit_memo_balance_json.rb +0 -211
  297. data/lib/subskribe_dev/models/credit_memo_json.rb +0 -363
  298. data/lib/subskribe_dev/models/credit_memo_line_item_json.rb +0 -252
  299. data/lib/subskribe_dev/models/credit_memo_line_item_request_json.rb +0 -211
  300. data/lib/subskribe_dev/models/crm_account_import_response.rb +0 -193
  301. data/lib/subskribe_dev/models/custom_field_default.rb +0 -195
  302. data/lib/subskribe_dev/models/custom_field_definition_create_input.rb +0 -317
  303. data/lib/subskribe_dev/models/custom_field_definition_json.rb +0 -313
  304. data/lib/subskribe_dev/models/custom_field_definition_update_input.rb +0 -256
  305. data/lib/subskribe_dev/models/custom_field_entry.rb +0 -325
  306. data/lib/subskribe_dev/models/custom_field_update_input.rb +0 -195
  307. data/lib/subskribe_dev/models/custom_field_value.rb +0 -316
  308. data/lib/subskribe_dev/models/data_import.rb +0 -355
  309. data/lib/subskribe_dev/models/discount_detail_json.rb +0 -263
  310. data/lib/subskribe_dev/models/discount_json.rb +0 -254
  311. data/lib/subskribe_dev/models/docu_sign_integration_request_json.rb +0 -236
  312. data/lib/subskribe_dev/models/docu_sign_integration_response_json.rb +0 -245
  313. data/lib/subskribe_dev/models/document_custom_content.rb +0 -211
  314. data/lib/subskribe_dev/models/document_section.rb +0 -265
  315. data/lib/subskribe_dev/models/document_template_json.rb +0 -300
  316. data/lib/subskribe_dev/models/dunning_setting_json.rb +0 -200
  317. data/lib/subskribe_dev/models/email_notifiers_list.rb +0 -208
  318. data/lib/subskribe_dev/models/entity.rb +0 -356
  319. data/lib/subskribe_dev/models/entity_json.rb +0 -347
  320. data/lib/subskribe_dev/models/entity_ref.rb +0 -202
  321. data/lib/subskribe_dev/models/entry.rb +0 -202
  322. data/lib/subskribe_dev/models/external_arr_schedule_json.rb +0 -319
  323. data/lib/subskribe_dev/models/flatfile_workbook_response.rb +0 -184
  324. data/lib/subskribe_dev/models/flatfile_workbook_response_data.rb +0 -193
  325. data/lib/subskribe_dev/models/input_stream.rb +0 -175
  326. data/lib/subskribe_dev/models/integration.rb +0 -311
  327. data/lib/subskribe_dev/models/invoice_balance_json.rb +0 -211
  328. data/lib/subskribe_dev/models/invoice_item_json.rb +0 -355
  329. data/lib/subskribe_dev/models/invoice_item_preview_json.rb +0 -229
  330. data/lib/subskribe_dev/models/invoice_json.rb +0 -439
  331. data/lib/subskribe_dev/models/invoice_json_pagination_response.rb +0 -204
  332. data/lib/subskribe_dev/models/invoice_number_prefix.rb +0 -184
  333. data/lib/subskribe_dev/models/invoice_preview_json.rb +0 -222
  334. data/lib/subskribe_dev/models/ledger_account.rb +0 -316
  335. data/lib/subskribe_dev/models/ledger_account_mapping.rb +0 -222
  336. data/lib/subskribe_dev/models/metrics_json.rb +0 -267
  337. data/lib/subskribe_dev/models/notification_target_and_subscriptions.rb +0 -265
  338. data/lib/subskribe_dev/models/number_config.rb +0 -254
  339. data/lib/subskribe_dev/models/opportunity.rb +0 -326
  340. data/lib/subskribe_dev/models/opportunity_json.rb +0 -326
  341. data/lib/subskribe_dev/models/opportunity_pagination_response.rb +0 -204
  342. data/lib/subskribe_dev/models/opportunity_rest_json.rb +0 -317
  343. data/lib/subskribe_dev/models/order_json.rb +0 -754
  344. data/lib/subskribe_dev/models/order_json_pagination_response.rb +0 -204
  345. data/lib/subskribe_dev/models/order_line_item_json.rb +0 -465
  346. data/lib/subskribe_dev/models/order_line_item_request_json.rb +0 -375
  347. data/lib/subskribe_dev/models/order_request_json.rb +0 -616
  348. data/lib/subskribe_dev/models/order_terms.rb +0 -265
  349. data/lib/subskribe_dev/models/paginated_response.rb +0 -204
  350. data/lib/subskribe_dev/models/payment_balance_json.rb +0 -211
  351. data/lib/subskribe_dev/models/payment_configuration.rb +0 -208
  352. data/lib/subskribe_dev/models/payment_json.rb +0 -300
  353. data/lib/subskribe_dev/models/payment_term_settings_json.rb +0 -219
  354. data/lib/subskribe_dev/models/plan_json.rb +0 -339
  355. data/lib/subskribe_dev/models/plan_json_pagination_response.rb +0 -204
  356. data/lib/subskribe_dev/models/predefined_report_def_chart_json.rb +0 -265
  357. data/lib/subskribe_dev/models/predefined_report_def_json.rb +0 -222
  358. data/lib/subskribe_dev/models/predefined_report_defs_json.rb +0 -186
  359. data/lib/subskribe_dev/models/predefined_report_json.rb +0 -213
  360. data/lib/subskribe_dev/models/predefined_report_param.rb +0 -296
  361. data/lib/subskribe_dev/models/predefined_report_param_object.rb +0 -296
  362. data/lib/subskribe_dev/models/prepaid_stats.rb +0 -310
  363. data/lib/subskribe_dev/models/price_tier_json.rb +0 -212
  364. data/lib/subskribe_dev/models/product_category.rb +0 -264
  365. data/lib/subskribe_dev/models/product_category_pagination_response.rb +0 -204
  366. data/lib/subskribe_dev/models/product_input_json.rb +0 -249
  367. data/lib/subskribe_dev/models/product_json.rb +0 -276
  368. data/lib/subskribe_dev/models/product_json_pagination_response.rb +0 -204
  369. data/lib/subskribe_dev/models/purchase_order.rb +0 -226
  370. data/lib/subskribe_dev/models/raw_usage.rb +0 -247
  371. data/lib/subskribe_dev/models/raw_usages_data.rb +0 -192
  372. data/lib/subskribe_dev/models/recognition_event_completion.rb +0 -322
  373. data/lib/subskribe_dev/models/recognition_rule.rb +0 -376
  374. data/lib/subskribe_dev/models/recurrence_json.rb +0 -256
  375. data/lib/subskribe_dev/models/refund.rb +0 -301
  376. data/lib/subskribe_dev/models/refund_detail.rb +0 -322
  377. data/lib/subskribe_dev/models/refund_request_json.rb +0 -272
  378. data/lib/subskribe_dev/models/report_duration.rb +0 -193
  379. data/lib/subskribe_dev/models/report_job_response.rb +0 -245
  380. data/lib/subskribe_dev/models/salesforce_account.rb +0 -229
  381. data/lib/subskribe_dev/models/salesforce_account_billing_address.rb +0 -220
  382. data/lib/subskribe_dev/models/salesforce_client_integration_request_json.rb +0 -211
  383. data/lib/subskribe_dev/models/settlement_application.rb +0 -329
  384. data/lib/subskribe_dev/models/standalone_credit_memo_request.rb +0 -353
  385. data/lib/subskribe_dev/models/subscription_charge_alias.rb +0 -283
  386. data/lib/subskribe_dev/models/subscription_charge_json.rb +0 -362
  387. data/lib/subskribe_dev/models/subscription_json.rb +0 -583
  388. data/lib/subskribe_dev/models/subscription_update_json.rb +0 -280
  389. data/lib/subskribe_dev/models/tax_jar_integration.rb +0 -238
  390. data/lib/subskribe_dev/models/tax_jar_integration_input.rb +0 -193
  391. data/lib/subskribe_dev/models/tax_rate_json.rb +0 -286
  392. data/lib/subskribe_dev/models/tax_rate_pagination_response_json.rb +0 -204
  393. data/lib/subskribe_dev/models/tenant_credit_memo_configuration_json.rb +0 -211
  394. data/lib/subskribe_dev/models/tenant_discount_json.rb +0 -193
  395. data/lib/subskribe_dev/models/tenant_discount_line_item_json.rb +0 -202
  396. data/lib/subskribe_dev/models/tenant_invoice_config.rb +0 -254
  397. data/lib/subskribe_dev/models/tenant_json.rb +0 -283
  398. data/lib/subskribe_dev/models/tenant_setting_json.rb +0 -307
  399. data/lib/subskribe_dev/models/time_series_amount_json.rb +0 -193
  400. data/lib/subskribe_dev/models/time_zone.rb +0 -211
  401. data/lib/subskribe_dev/models/unit_of_measure_json.rb +0 -250
  402. data/lib/subskribe_dev/models/unit_of_measure_pagination_response_json.rb +0 -204
  403. data/lib/subskribe_dev/models/update_invoice_request.rb +0 -282
  404. data/lib/subskribe_dev/models/usage_aggregate_output.rb +0 -258
  405. data/lib/subskribe_dev/models/usage_batch_insert_result.rb +0 -213
  406. data/lib/subskribe_dev/models/user_group_json.rb +0 -224
  407. data/lib/subskribe_dev/models/user_group_request_json.rb +0 -224
  408. data/lib/subskribe_dev/models/user_input.rb +0 -304
  409. data/lib/subskribe_dev/models/user_json.rb +0 -376
  410. data/lib/subskribe_dev/models/user_pagination_response_json.rb +0 -204
  411. data/lib/subskribe_dev/models/void_invoice_request.rb +0 -203
  412. data/lib/subskribe_dev/models/void_payment_json.rb +0 -235
  413. data/lib/subskribe_dev/version.rb +0 -15
  414. data/lib/subskribe_dev.rb +0 -229
  415. data/lib/subskribe_sandbox/models/paginated_response.rb +0 -204
  416. data/spec/api/entity_api_spec.rb +0 -48
  417. data/subskribe_dev.gemspec +0 -46
@@ -1,2098 +0,0 @@
1
- =begin
2
- #Subskribe API
3
-
4
- #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
-
6
- OpenAPI spec version: 1.0.0
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.4.41
10
-
11
- =end
12
-
13
- require 'uri'
14
-
15
- module SubskribeDevClient
16
- class BillingApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Create an automated invoice rule
23
- # Creates an automated invoice rule with the specified parameters
24
- # @param body automated invoice rule
25
- # @param [Hash] opts the optional parameters
26
- # @return [AutomatedInvoiceRule]
27
- def add_automated_invoice_rule(body, opts = {})
28
- data, _status_code, _headers = add_automated_invoice_rule_with_http_info(body, opts)
29
- data
30
- end
31
-
32
- # Create an automated invoice rule
33
- # Creates an automated invoice rule with the specified parameters
34
- # @param body automated invoice rule
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(AutomatedInvoiceRule, Fixnum, Hash)>] AutomatedInvoiceRule data, response status code and response headers
37
- def add_automated_invoice_rule_with_http_info(body, opts = {})
38
- if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: BillingApi.add_automated_invoice_rule ...'
40
- end
41
- # verify the required parameter 'body' is set
42
- if @api_client.config.client_side_validation && body.nil?
43
- fail ArgumentError, "Missing the required parameter 'body' when calling BillingApi.add_automated_invoice_rule"
44
- end
45
- # resource path
46
- local_var_path = '/automatedInvoiceRules'
47
-
48
- # query parameters
49
- query_params = {}
50
-
51
- # header parameters
52
- header_params = {}
53
- # HTTP header 'Accept' (if needed)
54
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
- # HTTP header 'Content-Type'
56
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
-
58
- # form parameters
59
- form_params = {}
60
-
61
- # http body (model)
62
- post_body = @api_client.object_to_http_body(body)
63
- auth_names = ['ApiKeyAuth']
64
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
65
- :header_params => header_params,
66
- :query_params => query_params,
67
- :form_params => form_params,
68
- :body => post_body,
69
- :auth_names => auth_names,
70
- :return_type => 'AutomatedInvoiceRule')
71
- if @api_client.config.debugging
72
- @api_client.config.logger.debug "API called: BillingApi#add_automated_invoice_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
- end
74
- return data, status_code, headers
75
- end
76
- # Add a new billing schedule for subscription line item
77
- # Creates a new billing schedule entry for an event based charge
78
- # @param body new billing event
79
- # @param [Hash] opts the optional parameters
80
- # @return [String]
81
- def add_billing_schedule(body, opts = {})
82
- data, _status_code, _headers = add_billing_schedule_with_http_info(body, opts)
83
- data
84
- end
85
-
86
- # Add a new billing schedule for subscription line item
87
- # Creates a new billing schedule entry for an event based charge
88
- # @param body new billing event
89
- # @param [Hash] opts the optional parameters
90
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
91
- def add_billing_schedule_with_http_info(body, opts = {})
92
- if @api_client.config.debugging
93
- @api_client.config.logger.debug 'Calling API: BillingApi.add_billing_schedule ...'
94
- end
95
- # verify the required parameter 'body' is set
96
- if @api_client.config.client_side_validation && body.nil?
97
- fail ArgumentError, "Missing the required parameter 'body' when calling BillingApi.add_billing_schedule"
98
- end
99
- # resource path
100
- local_var_path = '/invoices/schedule'
101
-
102
- # query parameters
103
- query_params = {}
104
-
105
- # header parameters
106
- header_params = {}
107
- # HTTP header 'Accept' (if needed)
108
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
109
-
110
- # form parameters
111
- form_params = {}
112
-
113
- # http body (model)
114
- post_body = @api_client.object_to_http_body(body)
115
- auth_names = ['ApiKeyAuth']
116
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
117
- :header_params => header_params,
118
- :query_params => query_params,
119
- :form_params => form_params,
120
- :body => post_body,
121
- :auth_names => auth_names,
122
- :return_type => 'String')
123
- if @api_client.config.debugging
124
- @api_client.config.logger.debug "API called: BillingApi#add_billing_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
125
- end
126
- return data, status_code, headers
127
- end
128
- # Create an alias for a subscription id/charge id pair
129
- # This allows you to specify a string alias for a subscription id and a charge id. This can be useful when, for example, you want to upload usage statistics and would rather specify your own id (or another external id), rather than referring to Subskribe's internal ids.
130
- # @param alias_id alias to map to create the mapping for
131
- # @param [Hash] opts the optional parameters
132
- # @option opts [String] :subscription_id the subscription id
133
- # @option opts [String] :charge_id the charge id
134
- # @return [nil]
135
- def add_subscription_charge_alias(alias_id, opts = {})
136
- add_subscription_charge_alias_with_http_info(alias_id, opts)
137
- nil
138
- end
139
-
140
- # Create an alias for a subscription id/charge id pair
141
- # This allows you to specify a string alias for a subscription id and a charge id. This can be useful when, for example, you want to upload usage statistics and would rather specify your own id (or another external id), rather than referring to Subskribe&#39;s internal ids.
142
- # @param alias_id alias to map to create the mapping for
143
- # @param [Hash] opts the optional parameters
144
- # @option opts [String] :subscription_id the subscription id
145
- # @option opts [String] :charge_id the charge id
146
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
147
- def add_subscription_charge_alias_with_http_info(alias_id, opts = {})
148
- if @api_client.config.debugging
149
- @api_client.config.logger.debug 'Calling API: BillingApi.add_subscription_charge_alias ...'
150
- end
151
- # verify the required parameter 'alias_id' is set
152
- if @api_client.config.client_side_validation && alias_id.nil?
153
- fail ArgumentError, "Missing the required parameter 'alias_id' when calling BillingApi.add_subscription_charge_alias"
154
- end
155
- # resource path
156
- local_var_path = '/alias/subscriptionCharge/{aliasId}'.sub('{' + 'aliasId' + '}', alias_id.to_s)
157
-
158
- # query parameters
159
- query_params = {}
160
- query_params[:'subscriptionId'] = opts[:'subscription_id'] if !opts[:'subscription_id'].nil?
161
- query_params[:'chargeId'] = opts[:'charge_id'] if !opts[:'charge_id'].nil?
162
-
163
- # header parameters
164
- header_params = {}
165
- # HTTP header 'Accept' (if needed)
166
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
167
-
168
- # form parameters
169
- form_params = {}
170
-
171
- # http body (model)
172
- post_body = nil
173
- auth_names = ['ApiKeyAuth']
174
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
175
- :header_params => header_params,
176
- :query_params => query_params,
177
- :form_params => form_params,
178
- :body => post_body,
179
- :auth_names => auth_names)
180
- if @api_client.config.debugging
181
- @api_client.config.logger.debug "API called: BillingApi#add_subscription_charge_alias\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
182
- end
183
- return data, status_code, headers
184
- end
185
- # Apply a credit memo
186
- # Applies a credit memo per the specified parameters
187
- # @param body application details in json
188
- # @param [Hash] opts the optional parameters
189
- # @return [nil]
190
- def apply_credit_memo(body, opts = {})
191
- apply_credit_memo_with_http_info(body, opts)
192
- nil
193
- end
194
-
195
- # Apply a credit memo
196
- # Applies a credit memo per the specified parameters
197
- # @param body application details in json
198
- # @param [Hash] opts the optional parameters
199
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
200
- def apply_credit_memo_with_http_info(body, opts = {})
201
- if @api_client.config.debugging
202
- @api_client.config.logger.debug 'Calling API: BillingApi.apply_credit_memo ...'
203
- end
204
- # verify the required parameter 'body' is set
205
- if @api_client.config.client_side_validation && body.nil?
206
- fail ArgumentError, "Missing the required parameter 'body' when calling BillingApi.apply_credit_memo"
207
- end
208
- # resource path
209
- local_var_path = '/settlements/applyCreditMemo'
210
-
211
- # query parameters
212
- query_params = {}
213
-
214
- # header parameters
215
- header_params = {}
216
- # HTTP header 'Accept' (if needed)
217
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
218
- # HTTP header 'Content-Type'
219
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
220
-
221
- # form parameters
222
- form_params = {}
223
-
224
- # http body (model)
225
- post_body = @api_client.object_to_http_body(body)
226
- auth_names = ['ApiKeyAuth']
227
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
228
- :header_params => header_params,
229
- :query_params => query_params,
230
- :form_params => form_params,
231
- :body => post_body,
232
- :auth_names => auth_names)
233
- if @api_client.config.debugging
234
- @api_client.config.logger.debug "API called: BillingApi#apply_credit_memo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
235
- end
236
- return data, status_code, headers
237
- end
238
- # Create a bulk invoice run
239
- # Creates a bulk invoice run as specified by the input parameters. On success the id of the run is returned.
240
- # @param body json representing the run parameters
241
- # @param [Hash] opts the optional parameters
242
- # @return [String]
243
- def create_bulk_invoice_run(body, opts = {})
244
- data, _status_code, _headers = create_bulk_invoice_run_with_http_info(body, opts)
245
- data
246
- end
247
-
248
- # Create a bulk invoice run
249
- # Creates a bulk invoice run as specified by the input parameters. On success the id of the run is returned.
250
- # @param body json representing the run parameters
251
- # @param [Hash] opts the optional parameters
252
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
253
- def create_bulk_invoice_run_with_http_info(body, opts = {})
254
- if @api_client.config.debugging
255
- @api_client.config.logger.debug 'Calling API: BillingApi.create_bulk_invoice_run ...'
256
- end
257
- # verify the required parameter 'body' is set
258
- if @api_client.config.client_side_validation && body.nil?
259
- fail ArgumentError, "Missing the required parameter 'body' when calling BillingApi.create_bulk_invoice_run"
260
- end
261
- # resource path
262
- local_var_path = '/invoices/bulk'
263
-
264
- # query parameters
265
- query_params = {}
266
-
267
- # header parameters
268
- header_params = {}
269
- # HTTP header 'Accept' (if needed)
270
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
271
-
272
- # form parameters
273
- form_params = {}
274
-
275
- # http body (model)
276
- post_body = @api_client.object_to_http_body(body)
277
- auth_names = ['ApiKeyAuth']
278
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
279
- :header_params => header_params,
280
- :query_params => query_params,
281
- :form_params => form_params,
282
- :body => post_body,
283
- :auth_names => auth_names,
284
- :return_type => 'String')
285
- if @api_client.config.debugging
286
- @api_client.config.logger.debug "API called: BillingApi#create_bulk_invoice_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
287
- end
288
- return data, status_code, headers
289
- end
290
- # Generate invoice PDF
291
- # Generates a PDF version of the specified invoice. Once generated, PDF can be later fetched via a call to /{invoiceNumber}/pdf.
292
- # @param invoice_number
293
- # @param [Hash] opts the optional parameters
294
- # @return [nil]
295
- def create_invoice_document(invoice_number, opts = {})
296
- create_invoice_document_with_http_info(invoice_number, opts)
297
- nil
298
- end
299
-
300
- # Generate invoice PDF
301
- # Generates a PDF version of the specified invoice. Once generated, PDF can be later fetched via a call to /{invoiceNumber}/pdf.
302
- # @param invoice_number
303
- # @param [Hash] opts the optional parameters
304
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
305
- def create_invoice_document_with_http_info(invoice_number, opts = {})
306
- if @api_client.config.debugging
307
- @api_client.config.logger.debug 'Calling API: BillingApi.create_invoice_document ...'
308
- end
309
- # verify the required parameter 'invoice_number' is set
310
- if @api_client.config.client_side_validation && invoice_number.nil?
311
- fail ArgumentError, "Missing the required parameter 'invoice_number' when calling BillingApi.create_invoice_document"
312
- end
313
- # resource path
314
- local_var_path = '/invoices/{invoiceNumber}/pdf'.sub('{' + 'invoiceNumber' + '}', invoice_number.to_s)
315
-
316
- # query parameters
317
- query_params = {}
318
-
319
- # header parameters
320
- header_params = {}
321
- # HTTP header 'Accept' (if needed)
322
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
323
-
324
- # form parameters
325
- form_params = {}
326
-
327
- # http body (model)
328
- post_body = nil
329
- auth_names = ['ApiKeyAuth']
330
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
331
- :header_params => header_params,
332
- :query_params => query_params,
333
- :form_params => form_params,
334
- :body => post_body,
335
- :auth_names => auth_names)
336
- if @api_client.config.debugging
337
- @api_client.config.logger.debug "API called: BillingApi#create_invoice_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
338
- end
339
- return data, status_code, headers
340
- end
341
- # Delete an existing billing schedule
342
- # Billing schedules must be deleted in reverse chronological order.
343
- # @param id billing schedule entry id
344
- # @param [Hash] opts the optional parameters
345
- # @return [nil]
346
- def delete_billing_schedule(id, opts = {})
347
- delete_billing_schedule_with_http_info(id, opts)
348
- nil
349
- end
350
-
351
- # Delete an existing billing schedule
352
- # Billing schedules must be deleted in reverse chronological order.
353
- # @param id billing schedule entry id
354
- # @param [Hash] opts the optional parameters
355
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
356
- def delete_billing_schedule_with_http_info(id, opts = {})
357
- if @api_client.config.debugging
358
- @api_client.config.logger.debug 'Calling API: BillingApi.delete_billing_schedule ...'
359
- end
360
- # verify the required parameter 'id' is set
361
- if @api_client.config.client_side_validation && id.nil?
362
- fail ArgumentError, "Missing the required parameter 'id' when calling BillingApi.delete_billing_schedule"
363
- end
364
- # resource path
365
- local_var_path = '/invoices/schedule/{id}'.sub('{' + 'id' + '}', id.to_s)
366
-
367
- # query parameters
368
- query_params = {}
369
-
370
- # header parameters
371
- header_params = {}
372
- # HTTP header 'Accept' (if needed)
373
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
374
-
375
- # form parameters
376
- form_params = {}
377
-
378
- # http body (model)
379
- post_body = nil
380
- auth_names = ['ApiKeyAuth']
381
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
382
- :header_params => header_params,
383
- :query_params => query_params,
384
- :form_params => form_params,
385
- :body => post_body,
386
- :auth_names => auth_names)
387
- if @api_client.config.debugging
388
- @api_client.config.logger.debug "API called: BillingApi#delete_billing_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
389
- end
390
- return data, status_code, headers
391
- end
392
- # Delete invoice
393
- # Deletes the specified invoice
394
- # @param number number of the invoice
395
- # @param [Hash] opts the optional parameters
396
- # @return [InvoiceJson]
397
- def delete_invoice(number, opts = {})
398
- data, _status_code, _headers = delete_invoice_with_http_info(number, opts)
399
- data
400
- end
401
-
402
- # Delete invoice
403
- # Deletes the specified invoice
404
- # @param number number of the invoice
405
- # @param [Hash] opts the optional parameters
406
- # @return [Array<(InvoiceJson, Fixnum, Hash)>] InvoiceJson data, response status code and response headers
407
- def delete_invoice_with_http_info(number, opts = {})
408
- if @api_client.config.debugging
409
- @api_client.config.logger.debug 'Calling API: BillingApi.delete_invoice ...'
410
- end
411
- # verify the required parameter 'number' is set
412
- if @api_client.config.client_side_validation && number.nil?
413
- fail ArgumentError, "Missing the required parameter 'number' when calling BillingApi.delete_invoice"
414
- end
415
- # resource path
416
- local_var_path = '/invoices/{number}'.sub('{' + 'number' + '}', number.to_s)
417
-
418
- # query parameters
419
- query_params = {}
420
-
421
- # header parameters
422
- header_params = {}
423
- # HTTP header 'Accept' (if needed)
424
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
425
-
426
- # form parameters
427
- form_params = {}
428
-
429
- # http body (model)
430
- post_body = nil
431
- auth_names = ['ApiKeyAuth']
432
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
433
- :header_params => header_params,
434
- :query_params => query_params,
435
- :form_params => form_params,
436
- :body => post_body,
437
- :auth_names => auth_names,
438
- :return_type => 'InvoiceJson')
439
- if @api_client.config.debugging
440
- @api_client.config.logger.debug "API called: BillingApi#delete_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
441
- end
442
- return data, status_code, headers
443
- end
444
- # Delete the specified alias
445
- # Deletes the specified alias mapping
446
- # @param alias_id
447
- # @param [Hash] opts the optional parameters
448
- # @return [nil]
449
- def delete_subscription_charge_alias(alias_id, opts = {})
450
- delete_subscription_charge_alias_with_http_info(alias_id, opts)
451
- nil
452
- end
453
-
454
- # Delete the specified alias
455
- # Deletes the specified alias mapping
456
- # @param alias_id
457
- # @param [Hash] opts the optional parameters
458
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
459
- def delete_subscription_charge_alias_with_http_info(alias_id, opts = {})
460
- if @api_client.config.debugging
461
- @api_client.config.logger.debug 'Calling API: BillingApi.delete_subscription_charge_alias ...'
462
- end
463
- # verify the required parameter 'alias_id' is set
464
- if @api_client.config.client_side_validation && alias_id.nil?
465
- fail ArgumentError, "Missing the required parameter 'alias_id' when calling BillingApi.delete_subscription_charge_alias"
466
- end
467
- # resource path
468
- local_var_path = '/alias/subscriptionCharge/{aliasId}'.sub('{' + 'aliasId' + '}', alias_id.to_s)
469
-
470
- # query parameters
471
- query_params = {}
472
-
473
- # header parameters
474
- header_params = {}
475
- # HTTP header 'Accept' (if needed)
476
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
477
-
478
- # form parameters
479
- form_params = {}
480
-
481
- # http body (model)
482
- post_body = nil
483
- auth_names = ['ApiKeyAuth']
484
- data, status_code, headers = @api_client.call_api(:DELETE, 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
- if @api_client.config.debugging
491
- @api_client.config.logger.debug "API called: BillingApi#delete_subscription_charge_alias\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
492
- end
493
- return data, status_code, headers
494
- end
495
- # Generate subscription invoices
496
- # Generates the invoices for the given subscription
497
- # @param subscription_id id of the subscription
498
- # @param target_date Time in seconds since Epoch (GMT) to generate invoice from
499
- # @param invoice_charge_inclusion_option types of charges to include
500
- # @param [Hash] opts the optional parameters
501
- # @option opts [Integer] :invoice_date Time in seconds since Epoch (GMT) to set invoice date to
502
- # @return [Array<InvoiceJson>]
503
- def generate_invoice(subscription_id, target_date, invoice_charge_inclusion_option, opts = {})
504
- data, _status_code, _headers = generate_invoice_with_http_info(subscription_id, target_date, invoice_charge_inclusion_option, opts)
505
- data
506
- end
507
-
508
- # Generate subscription invoices
509
- # Generates the invoices for the given subscription
510
- # @param subscription_id id of the subscription
511
- # @param target_date Time in seconds since Epoch (GMT) to generate invoice from
512
- # @param invoice_charge_inclusion_option types of charges to include
513
- # @param [Hash] opts the optional parameters
514
- # @option opts [Integer] :invoice_date Time in seconds since Epoch (GMT) to set invoice date to
515
- # @return [Array<(Array<InvoiceJson>, Fixnum, Hash)>] Array<InvoiceJson> data, response status code and response headers
516
- def generate_invoice_with_http_info(subscription_id, target_date, invoice_charge_inclusion_option, opts = {})
517
- if @api_client.config.debugging
518
- @api_client.config.logger.debug 'Calling API: BillingApi.generate_invoice ...'
519
- end
520
- # verify the required parameter 'subscription_id' is set
521
- if @api_client.config.client_side_validation && subscription_id.nil?
522
- fail ArgumentError, "Missing the required parameter 'subscription_id' when calling BillingApi.generate_invoice"
523
- end
524
- # verify the required parameter 'target_date' is set
525
- if @api_client.config.client_side_validation && target_date.nil?
526
- fail ArgumentError, "Missing the required parameter 'target_date' when calling BillingApi.generate_invoice"
527
- end
528
- # verify the required parameter 'invoice_charge_inclusion_option' is set
529
- if @api_client.config.client_side_validation && invoice_charge_inclusion_option.nil?
530
- fail ArgumentError, "Missing the required parameter 'invoice_charge_inclusion_option' when calling BillingApi.generate_invoice"
531
- end
532
- # verify enum value
533
- if @api_client.config.client_side_validation && !['INCLUDE_USAGE', 'EXCLUDE_USAGE', 'ONLY_USAGE'].include?(invoice_charge_inclusion_option)
534
- fail ArgumentError, "invalid value for 'invoice_charge_inclusion_option', must be one of INCLUDE_USAGE, EXCLUDE_USAGE, ONLY_USAGE"
535
- end
536
- # resource path
537
- local_var_path = '/invoices/generate'
538
-
539
- # query parameters
540
- query_params = {}
541
- query_params[:'subscriptionId'] = subscription_id
542
- query_params[:'targetDate'] = target_date
543
- query_params[:'invoiceChargeInclusionOption'] = invoice_charge_inclusion_option
544
- query_params[:'invoiceDate'] = opts[:'invoice_date'] if !opts[:'invoice_date'].nil?
545
-
546
- # header parameters
547
- header_params = {}
548
- # HTTP header 'Accept' (if needed)
549
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
550
-
551
- # form parameters
552
- form_params = {}
553
-
554
- # http body (model)
555
- post_body = nil
556
- auth_names = ['ApiKeyAuth']
557
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
558
- :header_params => header_params,
559
- :query_params => query_params,
560
- :form_params => form_params,
561
- :body => post_body,
562
- :auth_names => auth_names,
563
- :return_type => 'Array<InvoiceJson>')
564
- if @api_client.config.debugging
565
- @api_client.config.logger.debug "API called: BillingApi#generate_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
566
- end
567
- return data, status_code, headers
568
- end
569
- # Get the contact for accounts receivable
570
- # Returns the details of the account receivable contact for your tenant
571
- # @param [Hash] opts the optional parameters
572
- # @return [AccountReceivableContactJson]
573
- def get_account_receivable_contact(opts = {})
574
- data, _status_code, _headers = get_account_receivable_contact_with_http_info(opts)
575
- data
576
- end
577
-
578
- # Get the contact for accounts receivable
579
- # Returns the details of the account receivable contact for your tenant
580
- # @param [Hash] opts the optional parameters
581
- # @return [Array<(AccountReceivableContactJson, Fixnum, Hash)>] AccountReceivableContactJson data, response status code and response headers
582
- def get_account_receivable_contact_with_http_info(opts = {})
583
- if @api_client.config.debugging
584
- @api_client.config.logger.debug 'Calling API: BillingApi.get_account_receivable_contact ...'
585
- end
586
- # resource path
587
- local_var_path = '/accountReceivableContact'
588
-
589
- # query parameters
590
- query_params = {}
591
-
592
- # header parameters
593
- header_params = {}
594
- # HTTP header 'Accept' (if needed)
595
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
596
-
597
- # form parameters
598
- form_params = {}
599
-
600
- # http body (model)
601
- post_body = nil
602
- auth_names = ['ApiKeyAuth']
603
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
604
- :header_params => header_params,
605
- :query_params => query_params,
606
- :form_params => form_params,
607
- :body => post_body,
608
- :auth_names => auth_names,
609
- :return_type => 'AccountReceivableContactJson')
610
- if @api_client.config.debugging
611
- @api_client.config.logger.debug "API called: BillingApi#get_account_receivable_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
612
- end
613
- return data, status_code, headers
614
- end
615
- # Get automated invoice rule details
616
- # Returns the details of the specified automated invoice rule
617
- # @param id id of the automated invoice rule
618
- # @param [Hash] opts the optional parameters
619
- # @return [nil]
620
- def get_automated_invoice_rule(id, opts = {})
621
- get_automated_invoice_rule_with_http_info(id, opts)
622
- nil
623
- end
624
-
625
- # Get automated invoice rule details
626
- # Returns the details of the specified automated invoice rule
627
- # @param id id of the automated invoice rule
628
- # @param [Hash] opts the optional parameters
629
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
630
- def get_automated_invoice_rule_with_http_info(id, opts = {})
631
- if @api_client.config.debugging
632
- @api_client.config.logger.debug 'Calling API: BillingApi.get_automated_invoice_rule ...'
633
- end
634
- # verify the required parameter 'id' is set
635
- if @api_client.config.client_side_validation && id.nil?
636
- fail ArgumentError, "Missing the required parameter 'id' when calling BillingApi.get_automated_invoice_rule"
637
- end
638
- # resource path
639
- local_var_path = '/automatedInvoiceRules/{id}'.sub('{' + 'id' + '}', id.to_s)
640
-
641
- # query parameters
642
- query_params = {}
643
-
644
- # header parameters
645
- header_params = {}
646
- # HTTP header 'Accept' (if needed)
647
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
648
-
649
- # form parameters
650
- form_params = {}
651
-
652
- # http body (model)
653
- post_body = nil
654
- auth_names = ['ApiKeyAuth']
655
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
656
- :header_params => header_params,
657
- :query_params => query_params,
658
- :form_params => form_params,
659
- :body => post_body,
660
- :auth_names => auth_names)
661
- if @api_client.config.debugging
662
- @api_client.config.logger.debug "API called: BillingApi#get_automated_invoice_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
663
- end
664
- return data, status_code, headers
665
- end
666
- # Get automated invoice rules for a tenant
667
- # Returns all the configured automated invoice rules for the tenant
668
- # @param [Hash] opts the optional parameters
669
- # @return [nil]
670
- def get_automated_invoice_rules(opts = {})
671
- get_automated_invoice_rules_with_http_info(opts)
672
- nil
673
- end
674
-
675
- # Get automated invoice rules for a tenant
676
- # Returns all the configured automated invoice rules for the tenant
677
- # @param [Hash] opts the optional parameters
678
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
679
- def get_automated_invoice_rules_with_http_info(opts = {})
680
- if @api_client.config.debugging
681
- @api_client.config.logger.debug 'Calling API: BillingApi.get_automated_invoice_rules ...'
682
- end
683
- # resource path
684
- local_var_path = '/automatedInvoiceRules'
685
-
686
- # query parameters
687
- query_params = {}
688
-
689
- # header parameters
690
- header_params = {}
691
- # HTTP header 'Accept' (if needed)
692
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
693
-
694
- # form parameters
695
- form_params = {}
696
-
697
- # http body (model)
698
- post_body = nil
699
- auth_names = ['ApiKeyAuth']
700
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
701
- :header_params => header_params,
702
- :query_params => query_params,
703
- :form_params => form_params,
704
- :body => post_body,
705
- :auth_names => auth_names)
706
- if @api_client.config.debugging
707
- @api_client.config.logger.debug "API called: BillingApi#get_automated_invoice_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
708
- end
709
- return data, status_code, headers
710
- end
711
- # Get billing schedules for a subscription line item
712
- # Retrieve all billing schedules for a subscription line item
713
- # @param subscription_id
714
- # @param subscription_charge_id
715
- # @param [Hash] opts the optional parameters
716
- # @return [Array<BillingEventEntry>]
717
- def get_billing_schedules(subscription_id, subscription_charge_id, opts = {})
718
- data, _status_code, _headers = get_billing_schedules_with_http_info(subscription_id, subscription_charge_id, opts)
719
- data
720
- end
721
-
722
- # Get billing schedules for a subscription line item
723
- # Retrieve all billing schedules for a subscription line item
724
- # @param subscription_id
725
- # @param subscription_charge_id
726
- # @param [Hash] opts the optional parameters
727
- # @return [Array<(Array<BillingEventEntry>, Fixnum, Hash)>] Array<BillingEventEntry> data, response status code and response headers
728
- def get_billing_schedules_with_http_info(subscription_id, subscription_charge_id, opts = {})
729
- if @api_client.config.debugging
730
- @api_client.config.logger.debug 'Calling API: BillingApi.get_billing_schedules ...'
731
- end
732
- # verify the required parameter 'subscription_id' is set
733
- if @api_client.config.client_side_validation && subscription_id.nil?
734
- fail ArgumentError, "Missing the required parameter 'subscription_id' when calling BillingApi.get_billing_schedules"
735
- end
736
- # verify the required parameter 'subscription_charge_id' is set
737
- if @api_client.config.client_side_validation && subscription_charge_id.nil?
738
- fail ArgumentError, "Missing the required parameter 'subscription_charge_id' when calling BillingApi.get_billing_schedules"
739
- end
740
- # resource path
741
- local_var_path = '/invoices/schedule'
742
-
743
- # query parameters
744
- query_params = {}
745
- query_params[:'subscriptionId'] = subscription_id
746
- query_params[:'subscriptionChargeId'] = subscription_charge_id
747
-
748
- # header parameters
749
- header_params = {}
750
- # HTTP header 'Accept' (if needed)
751
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
752
-
753
- # form parameters
754
- form_params = {}
755
-
756
- # http body (model)
757
- post_body = nil
758
- auth_names = ['ApiKeyAuth']
759
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
760
- :header_params => header_params,
761
- :query_params => query_params,
762
- :form_params => form_params,
763
- :body => post_body,
764
- :auth_names => auth_names,
765
- :return_type => 'Array<BillingEventEntry>')
766
- if @api_client.config.debugging
767
- @api_client.config.logger.debug "API called: BillingApi#get_billing_schedules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
768
- end
769
- return data, status_code, headers
770
- end
771
- # Get bulk invoice run details
772
- # Returns the details of the specified bulk invoice run
773
- # @param bulk_invoice_run_id id of the run
774
- # @param [Hash] opts the optional parameters
775
- # @return [BulkInvoiceRun]
776
- def get_bulk_invoice_run(bulk_invoice_run_id, opts = {})
777
- data, _status_code, _headers = get_bulk_invoice_run_with_http_info(bulk_invoice_run_id, opts)
778
- data
779
- end
780
-
781
- # Get bulk invoice run details
782
- # Returns the details of the specified bulk invoice run
783
- # @param bulk_invoice_run_id id of the run
784
- # @param [Hash] opts the optional parameters
785
- # @return [Array<(BulkInvoiceRun, Fixnum, Hash)>] BulkInvoiceRun data, response status code and response headers
786
- def get_bulk_invoice_run_with_http_info(bulk_invoice_run_id, opts = {})
787
- if @api_client.config.debugging
788
- @api_client.config.logger.debug 'Calling API: BillingApi.get_bulk_invoice_run ...'
789
- end
790
- # verify the required parameter 'bulk_invoice_run_id' is set
791
- if @api_client.config.client_side_validation && bulk_invoice_run_id.nil?
792
- fail ArgumentError, "Missing the required parameter 'bulk_invoice_run_id' when calling BillingApi.get_bulk_invoice_run"
793
- end
794
- # resource path
795
- local_var_path = '/invoices/bulk/{bulkInvoiceRunId}'.sub('{' + 'bulkInvoiceRunId' + '}', bulk_invoice_run_id.to_s)
796
-
797
- # query parameters
798
- query_params = {}
799
-
800
- # header parameters
801
- header_params = {}
802
- # HTTP header 'Accept' (if needed)
803
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
804
-
805
- # form parameters
806
- form_params = {}
807
-
808
- # http body (model)
809
- post_body = nil
810
- auth_names = ['ApiKeyAuth']
811
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
812
- :header_params => header_params,
813
- :query_params => query_params,
814
- :form_params => form_params,
815
- :body => post_body,
816
- :auth_names => auth_names,
817
- :return_type => 'BulkInvoiceRun')
818
- if @api_client.config.debugging
819
- @api_client.config.logger.debug "API called: BillingApi#get_bulk_invoice_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
820
- end
821
- return data, status_code, headers
822
- end
823
- # Get items for bulk invoice run
824
- # Returns the items associated with the specified bulk invoice run
825
- # @param bulk_invoice_run_id id of the run
826
- # @param [Hash] opts the optional parameters
827
- # @return [Array<BulkInvoiceRunItem>]
828
- def get_bulk_invoice_run_items(bulk_invoice_run_id, opts = {})
829
- data, _status_code, _headers = get_bulk_invoice_run_items_with_http_info(bulk_invoice_run_id, opts)
830
- data
831
- end
832
-
833
- # Get items for bulk invoice run
834
- # Returns the items associated with the specified bulk invoice run
835
- # @param bulk_invoice_run_id id of the run
836
- # @param [Hash] opts the optional parameters
837
- # @return [Array<(Array<BulkInvoiceRunItem>, Fixnum, Hash)>] Array<BulkInvoiceRunItem> data, response status code and response headers
838
- def get_bulk_invoice_run_items_with_http_info(bulk_invoice_run_id, opts = {})
839
- if @api_client.config.debugging
840
- @api_client.config.logger.debug 'Calling API: BillingApi.get_bulk_invoice_run_items ...'
841
- end
842
- # verify the required parameter 'bulk_invoice_run_id' is set
843
- if @api_client.config.client_side_validation && bulk_invoice_run_id.nil?
844
- fail ArgumentError, "Missing the required parameter 'bulk_invoice_run_id' when calling BillingApi.get_bulk_invoice_run_items"
845
- end
846
- # resource path
847
- local_var_path = '/invoices/bulk/{bulkInvoiceRunId}/runItems'.sub('{' + 'bulkInvoiceRunId' + '}', bulk_invoice_run_id.to_s)
848
-
849
- # query parameters
850
- query_params = {}
851
-
852
- # header parameters
853
- header_params = {}
854
- # HTTP header 'Accept' (if needed)
855
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
856
-
857
- # form parameters
858
- form_params = {}
859
-
860
- # http body (model)
861
- post_body = nil
862
- auth_names = ['ApiKeyAuth']
863
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
864
- :header_params => header_params,
865
- :query_params => query_params,
866
- :form_params => form_params,
867
- :body => post_body,
868
- :auth_names => auth_names,
869
- :return_type => 'Array<BulkInvoiceRunItem>')
870
- if @api_client.config.debugging
871
- @api_client.config.logger.debug "API called: BillingApi#get_bulk_invoice_run_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
872
- end
873
- return data, status_code, headers
874
- end
875
- # Get dunning settings
876
- # Returns the dunning settings for your tenant
877
- # @param [Hash] opts the optional parameters
878
- # @return [DunningSettingJson]
879
- def get_dunning_setting(opts = {})
880
- data, _status_code, _headers = get_dunning_setting_with_http_info(opts)
881
- data
882
- end
883
-
884
- # Get dunning settings
885
- # Returns the dunning settings for your tenant
886
- # @param [Hash] opts the optional parameters
887
- # @return [Array<(DunningSettingJson, Fixnum, Hash)>] DunningSettingJson data, response status code and response headers
888
- def get_dunning_setting_with_http_info(opts = {})
889
- if @api_client.config.debugging
890
- @api_client.config.logger.debug 'Calling API: BillingApi.get_dunning_setting ...'
891
- end
892
- # resource path
893
- local_var_path = '/dunningSetting'
894
-
895
- # query parameters
896
- query_params = {}
897
-
898
- # header parameters
899
- header_params = {}
900
- # HTTP header 'Accept' (if needed)
901
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
902
-
903
- # form parameters
904
- form_params = {}
905
-
906
- # http body (model)
907
- post_body = nil
908
- auth_names = ['ApiKeyAuth']
909
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
910
- :header_params => header_params,
911
- :query_params => query_params,
912
- :form_params => form_params,
913
- :body => post_body,
914
- :auth_names => auth_names,
915
- :return_type => 'DunningSettingJson')
916
- if @api_client.config.debugging
917
- @api_client.config.logger.debug "API called: BillingApi#get_dunning_setting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
918
- end
919
- return data, status_code, headers
920
- end
921
- # Get invoice details
922
- # Returns the details of the specified invoice number
923
- # @param number number of the invoice
924
- # @param [Hash] opts the optional parameters
925
- # @return [InvoiceJson]
926
- def get_invoice(number, opts = {})
927
- data, _status_code, _headers = get_invoice_with_http_info(number, opts)
928
- data
929
- end
930
-
931
- # Get invoice details
932
- # Returns the details of the specified invoice number
933
- # @param number number of the invoice
934
- # @param [Hash] opts the optional parameters
935
- # @return [Array<(InvoiceJson, Fixnum, Hash)>] InvoiceJson data, response status code and response headers
936
- def get_invoice_with_http_info(number, opts = {})
937
- if @api_client.config.debugging
938
- @api_client.config.logger.debug 'Calling API: BillingApi.get_invoice ...'
939
- end
940
- # verify the required parameter 'number' is set
941
- if @api_client.config.client_side_validation && number.nil?
942
- fail ArgumentError, "Missing the required parameter 'number' when calling BillingApi.get_invoice"
943
- end
944
- # resource path
945
- local_var_path = '/invoices/{number}'.sub('{' + 'number' + '}', number.to_s)
946
-
947
- # query parameters
948
- query_params = {}
949
-
950
- # header parameters
951
- header_params = {}
952
- # HTTP header 'Accept' (if needed)
953
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
954
-
955
- # form parameters
956
- form_params = {}
957
-
958
- # http body (model)
959
- post_body = nil
960
- auth_names = ['ApiKeyAuth']
961
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
962
- :header_params => header_params,
963
- :query_params => query_params,
964
- :form_params => form_params,
965
- :body => post_body,
966
- :auth_names => auth_names,
967
- :return_type => 'InvoiceJson')
968
- if @api_client.config.debugging
969
- @api_client.config.logger.debug "API called: BillingApi#get_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
970
- end
971
- return data, status_code, headers
972
- end
973
- # Get invoice balance
974
- # Returns the balance of the specified invoice number
975
- # @param number number of the invoice
976
- # @param [Hash] opts the optional parameters
977
- # @return [InvoiceBalanceJson]
978
- def get_invoice_balance(number, opts = {})
979
- data, _status_code, _headers = get_invoice_balance_with_http_info(number, opts)
980
- data
981
- end
982
-
983
- # Get invoice balance
984
- # Returns the balance of the specified invoice number
985
- # @param number number of the invoice
986
- # @param [Hash] opts the optional parameters
987
- # @return [Array<(InvoiceBalanceJson, Fixnum, Hash)>] InvoiceBalanceJson data, response status code and response headers
988
- def get_invoice_balance_with_http_info(number, opts = {})
989
- if @api_client.config.debugging
990
- @api_client.config.logger.debug 'Calling API: BillingApi.get_invoice_balance ...'
991
- end
992
- # verify the required parameter 'number' is set
993
- if @api_client.config.client_side_validation && number.nil?
994
- fail ArgumentError, "Missing the required parameter 'number' when calling BillingApi.get_invoice_balance"
995
- end
996
- # resource path
997
- local_var_path = '/invoices/{number}/balance'.sub('{' + 'number' + '}', number.to_s)
998
-
999
- # query parameters
1000
- query_params = {}
1001
-
1002
- # header parameters
1003
- header_params = {}
1004
- # HTTP header 'Accept' (if needed)
1005
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1006
-
1007
- # form parameters
1008
- form_params = {}
1009
-
1010
- # http body (model)
1011
- post_body = nil
1012
- auth_names = ['ApiKeyAuth']
1013
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1014
- :header_params => header_params,
1015
- :query_params => query_params,
1016
- :form_params => form_params,
1017
- :body => post_body,
1018
- :auth_names => auth_names,
1019
- :return_type => 'InvoiceBalanceJson')
1020
- if @api_client.config.debugging
1021
- @api_client.config.logger.debug "API called: BillingApi#get_invoice_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1022
- end
1023
- return data, status_code, headers
1024
- end
1025
- # Download invoice PDF
1026
- # Downloads the PDF for an invoice after it has been generated via a POST to /{invoiceNumber}/pdf. The data return will be the PDF document contents.
1027
- # @param invoice_number number of the invoice
1028
- # @param [Hash] opts the optional parameters
1029
- # @return [nil]
1030
- def get_invoice_document_pdf(invoice_number, opts = {})
1031
- get_invoice_document_pdf_with_http_info(invoice_number, opts)
1032
- nil
1033
- end
1034
-
1035
- # Download invoice PDF
1036
- # Downloads the PDF for an invoice after it has been generated via a POST to /{invoiceNumber}/pdf. The data return will be the PDF document contents.
1037
- # @param invoice_number number of the invoice
1038
- # @param [Hash] opts the optional parameters
1039
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1040
- def get_invoice_document_pdf_with_http_info(invoice_number, opts = {})
1041
- if @api_client.config.debugging
1042
- @api_client.config.logger.debug 'Calling API: BillingApi.get_invoice_document_pdf ...'
1043
- end
1044
- # verify the required parameter 'invoice_number' is set
1045
- if @api_client.config.client_side_validation && invoice_number.nil?
1046
- fail ArgumentError, "Missing the required parameter 'invoice_number' when calling BillingApi.get_invoice_document_pdf"
1047
- end
1048
- # resource path
1049
- local_var_path = '/invoices/{invoiceNumber}/pdf'.sub('{' + 'invoiceNumber' + '}', invoice_number.to_s)
1050
-
1051
- # query parameters
1052
- query_params = {}
1053
-
1054
- # header parameters
1055
- header_params = {}
1056
- # HTTP header 'Accept' (if needed)
1057
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1058
-
1059
- # form parameters
1060
- form_params = {}
1061
-
1062
- # http body (model)
1063
- post_body = nil
1064
- auth_names = ['ApiKeyAuth']
1065
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1066
- :header_params => header_params,
1067
- :query_params => query_params,
1068
- :form_params => form_params,
1069
- :body => post_body,
1070
- :auth_names => auth_names)
1071
- if @api_client.config.debugging
1072
- @api_client.config.logger.debug "API called: BillingApi#get_invoice_document_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1073
- end
1074
- return data, status_code, headers
1075
- end
1076
- # Get all invoices for a subscription
1077
- # Returns all invoices for a subscription. The result is paginated. Use the cursor returned from a request in subsequent calls to retrieve all results.
1078
- # @param [Hash] opts the optional parameters
1079
- # @option opts [String] :subscription_id
1080
- # @option opts [String] :status status filter for invoices
1081
- # @option opts [String] :cursor used to iterate through all results
1082
- # @option opts [Integer] :limit number of items per page
1083
- # @return [InvoiceJsonPaginationResponse]
1084
- def get_invoices(opts = {})
1085
- data, _status_code, _headers = get_invoices_with_http_info(opts)
1086
- data
1087
- end
1088
-
1089
- # Get all invoices for a subscription
1090
- # Returns all invoices for a subscription. The result is paginated. Use the cursor returned from a request in subsequent calls to retrieve all results.
1091
- # @param [Hash] opts the optional parameters
1092
- # @option opts [String] :subscription_id
1093
- # @option opts [String] :status status filter for invoices
1094
- # @option opts [String] :cursor used to iterate through all results
1095
- # @option opts [Integer] :limit number of items per page
1096
- # @return [Array<(InvoiceJsonPaginationResponse, Fixnum, Hash)>] InvoiceJsonPaginationResponse data, response status code and response headers
1097
- def get_invoices_with_http_info(opts = {})
1098
- if @api_client.config.debugging
1099
- @api_client.config.logger.debug 'Calling API: BillingApi.get_invoices ...'
1100
- end
1101
- if @api_client.config.client_side_validation && opts[:'status'] && !['DRAFT', 'POSTED', 'PAID', 'CONVERTED', 'VOIDED'].include?(opts[:'status'])
1102
- fail ArgumentError, 'invalid value for "status", must be one of DRAFT, POSTED, PAID, CONVERTED, VOIDED'
1103
- end
1104
- # resource path
1105
- local_var_path = '/invoices'
1106
-
1107
- # query parameters
1108
- query_params = {}
1109
- query_params[:'subscriptionId'] = opts[:'subscription_id'] if !opts[:'subscription_id'].nil?
1110
- query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
1111
- query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1112
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1113
-
1114
- # header parameters
1115
- header_params = {}
1116
- # HTTP header 'Accept' (if needed)
1117
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1118
-
1119
- # form parameters
1120
- form_params = {}
1121
-
1122
- # http body (model)
1123
- post_body = nil
1124
- auth_names = ['ApiKeyAuth']
1125
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1126
- :header_params => header_params,
1127
- :query_params => query_params,
1128
- :form_params => form_params,
1129
- :body => post_body,
1130
- :auth_names => auth_names,
1131
- :return_type => 'InvoiceJsonPaginationResponse')
1132
- if @api_client.config.debugging
1133
- @api_client.config.logger.debug "API called: BillingApi#get_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1134
- end
1135
- return data, status_code, headers
1136
- end
1137
- # Get the invoice document JSON that is used to render invoice PDF
1138
- # Invoice document JSON that contains all details required to render full Invoice document
1139
- # @param invoice_number number of the invoice
1140
- # @param [Hash] opts the optional parameters
1141
- # @return [nil]
1142
- def get_raw_invoice_document_json(invoice_number, opts = {})
1143
- get_raw_invoice_document_json_with_http_info(invoice_number, opts)
1144
- nil
1145
- end
1146
-
1147
- # Get the invoice document JSON that is used to render invoice PDF
1148
- # Invoice document JSON that contains all details required to render full Invoice document
1149
- # @param invoice_number number of the invoice
1150
- # @param [Hash] opts the optional parameters
1151
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1152
- def get_raw_invoice_document_json_with_http_info(invoice_number, opts = {})
1153
- if @api_client.config.debugging
1154
- @api_client.config.logger.debug 'Calling API: BillingApi.get_raw_invoice_document_json ...'
1155
- end
1156
- # verify the required parameter 'invoice_number' is set
1157
- if @api_client.config.client_side_validation && invoice_number.nil?
1158
- fail ArgumentError, "Missing the required parameter 'invoice_number' when calling BillingApi.get_raw_invoice_document_json"
1159
- end
1160
- # resource path
1161
- local_var_path = '/invoices/{invoiceNumber}/documentJson'.sub('{' + 'invoiceNumber' + '}', invoice_number.to_s)
1162
-
1163
- # query parameters
1164
- query_params = {}
1165
-
1166
- # header parameters
1167
- header_params = {}
1168
- # HTTP header 'Accept' (if needed)
1169
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1170
-
1171
- # form parameters
1172
- form_params = {}
1173
-
1174
- # http body (model)
1175
- post_body = nil
1176
- auth_names = ['ApiKeyAuth']
1177
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1178
- :header_params => header_params,
1179
- :query_params => query_params,
1180
- :form_params => form_params,
1181
- :body => post_body,
1182
- :auth_names => auth_names)
1183
- if @api_client.config.debugging
1184
- @api_client.config.logger.debug "API called: BillingApi#get_raw_invoice_document_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1185
- end
1186
- return data, status_code, headers
1187
- end
1188
- # Get settlement application details
1189
- # Gets the details of specified settlement application.
1190
- # @param id id of the settlement application
1191
- # @param [Hash] opts the optional parameters
1192
- # @return [SettlementApplication]
1193
- def get_settlement_application(id, opts = {})
1194
- data, _status_code, _headers = get_settlement_application_with_http_info(id, opts)
1195
- data
1196
- end
1197
-
1198
- # Get settlement application details
1199
- # Gets the details of specified settlement application.
1200
- # @param id id of the settlement application
1201
- # @param [Hash] opts the optional parameters
1202
- # @return [Array<(SettlementApplication, Fixnum, Hash)>] SettlementApplication data, response status code and response headers
1203
- def get_settlement_application_with_http_info(id, opts = {})
1204
- if @api_client.config.debugging
1205
- @api_client.config.logger.debug 'Calling API: BillingApi.get_settlement_application ...'
1206
- end
1207
- # verify the required parameter 'id' is set
1208
- if @api_client.config.client_side_validation && id.nil?
1209
- fail ArgumentError, "Missing the required parameter 'id' when calling BillingApi.get_settlement_application"
1210
- end
1211
- # resource path
1212
- local_var_path = '/settlements/{id}'.sub('{' + 'id' + '}', id.to_s)
1213
-
1214
- # query parameters
1215
- query_params = {}
1216
-
1217
- # header parameters
1218
- header_params = {}
1219
- # HTTP header 'Accept' (if needed)
1220
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1221
-
1222
- # form parameters
1223
- form_params = {}
1224
-
1225
- # http body (model)
1226
- post_body = nil
1227
- auth_names = ['ApiKeyAuth']
1228
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1229
- :header_params => header_params,
1230
- :query_params => query_params,
1231
- :form_params => form_params,
1232
- :body => post_body,
1233
- :auth_names => auth_names,
1234
- :return_type => 'SettlementApplication')
1235
- if @api_client.config.debugging
1236
- @api_client.config.logger.debug "API called: BillingApi#get_settlement_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1237
- end
1238
- return data, status_code, headers
1239
- end
1240
- # Get settlement applications
1241
- # Returns the settlement applications for the specified invoice number.
1242
- # @param invoice_number number of the invoice
1243
- # @param [Hash] opts the optional parameters
1244
- # @return [Array<SettlementApplication>]
1245
- def get_settlement_applications(invoice_number, opts = {})
1246
- data, _status_code, _headers = get_settlement_applications_with_http_info(invoice_number, opts)
1247
- data
1248
- end
1249
-
1250
- # Get settlement applications
1251
- # Returns the settlement applications for the specified invoice number.
1252
- # @param invoice_number number of the invoice
1253
- # @param [Hash] opts the optional parameters
1254
- # @return [Array<(Array<SettlementApplication>, Fixnum, Hash)>] Array<SettlementApplication> data, response status code and response headers
1255
- def get_settlement_applications_with_http_info(invoice_number, opts = {})
1256
- if @api_client.config.debugging
1257
- @api_client.config.logger.debug 'Calling API: BillingApi.get_settlement_applications ...'
1258
- end
1259
- # verify the required parameter 'invoice_number' is set
1260
- if @api_client.config.client_side_validation && invoice_number.nil?
1261
- fail ArgumentError, "Missing the required parameter 'invoice_number' when calling BillingApi.get_settlement_applications"
1262
- end
1263
- # resource path
1264
- local_var_path = '/settlements'
1265
-
1266
- # query parameters
1267
- query_params = {}
1268
- query_params[:'invoiceNumber'] = invoice_number
1269
-
1270
- # header parameters
1271
- header_params = {}
1272
- # HTTP header 'Accept' (if needed)
1273
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1274
-
1275
- # form parameters
1276
- form_params = {}
1277
-
1278
- # http body (model)
1279
- post_body = nil
1280
- auth_names = ['ApiKeyAuth']
1281
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1282
- :header_params => header_params,
1283
- :query_params => query_params,
1284
- :form_params => form_params,
1285
- :body => post_body,
1286
- :auth_names => auth_names,
1287
- :return_type => 'Array<SettlementApplication>')
1288
- if @api_client.config.debugging
1289
- @api_client.config.logger.debug "API called: BillingApi#get_settlement_applications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1290
- end
1291
- return data, status_code, headers
1292
- end
1293
- # Get the details of an alias
1294
- # Returns the details of the specified alias id including the subscription id and the charge id it is mapped to.
1295
- # @param alias_id
1296
- # @param [Hash] opts the optional parameters
1297
- # @return [SubscriptionChargeAlias]
1298
- def get_subscription_charge_alias(alias_id, opts = {})
1299
- data, _status_code, _headers = get_subscription_charge_alias_with_http_info(alias_id, opts)
1300
- data
1301
- end
1302
-
1303
- # Get the details of an alias
1304
- # Returns the details of the specified alias id including the subscription id and the charge id it is mapped to.
1305
- # @param alias_id
1306
- # @param [Hash] opts the optional parameters
1307
- # @return [Array<(SubscriptionChargeAlias, Fixnum, Hash)>] SubscriptionChargeAlias data, response status code and response headers
1308
- def get_subscription_charge_alias_with_http_info(alias_id, opts = {})
1309
- if @api_client.config.debugging
1310
- @api_client.config.logger.debug 'Calling API: BillingApi.get_subscription_charge_alias ...'
1311
- end
1312
- # verify the required parameter 'alias_id' is set
1313
- if @api_client.config.client_side_validation && alias_id.nil?
1314
- fail ArgumentError, "Missing the required parameter 'alias_id' when calling BillingApi.get_subscription_charge_alias"
1315
- end
1316
- # resource path
1317
- local_var_path = '/alias/subscriptionCharge/{aliasId}'.sub('{' + 'aliasId' + '}', alias_id.to_s)
1318
-
1319
- # query parameters
1320
- query_params = {}
1321
-
1322
- # header parameters
1323
- header_params = {}
1324
- # HTTP header 'Accept' (if needed)
1325
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1326
-
1327
- # form parameters
1328
- form_params = {}
1329
-
1330
- # http body (model)
1331
- post_body = nil
1332
- auth_names = ['ApiKeyAuth']
1333
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1334
- :header_params => header_params,
1335
- :query_params => query_params,
1336
- :form_params => form_params,
1337
- :body => post_body,
1338
- :auth_names => auth_names,
1339
- :return_type => 'SubscriptionChargeAlias')
1340
- if @api_client.config.debugging
1341
- @api_client.config.logger.debug "API called: BillingApi#get_subscription_charge_alias\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1342
- end
1343
- return data, status_code, headers
1344
- end
1345
- # Get usage
1346
- # Returns the usage invoice items for the specified subscription and charge
1347
- # @param subscription_id id of the subscription
1348
- # @param charge_id id of the charge
1349
- # @param [Hash] opts the optional parameters
1350
- # @return [Array<InvoiceItemJson>]
1351
- def get_usage_for_subscription_charge(subscription_id, charge_id, opts = {})
1352
- data, _status_code, _headers = get_usage_for_subscription_charge_with_http_info(subscription_id, charge_id, opts)
1353
- data
1354
- end
1355
-
1356
- # Get usage
1357
- # Returns the usage invoice items for the specified subscription and charge
1358
- # @param subscription_id id of the subscription
1359
- # @param charge_id id of the charge
1360
- # @param [Hash] opts the optional parameters
1361
- # @return [Array<(Array<InvoiceItemJson>, Fixnum, Hash)>] Array<InvoiceItemJson> data, response status code and response headers
1362
- def get_usage_for_subscription_charge_with_http_info(subscription_id, charge_id, opts = {})
1363
- if @api_client.config.debugging
1364
- @api_client.config.logger.debug 'Calling API: BillingApi.get_usage_for_subscription_charge ...'
1365
- end
1366
- # verify the required parameter 'subscription_id' is set
1367
- if @api_client.config.client_side_validation && subscription_id.nil?
1368
- fail ArgumentError, "Missing the required parameter 'subscription_id' when calling BillingApi.get_usage_for_subscription_charge"
1369
- end
1370
- # verify the required parameter 'charge_id' is set
1371
- if @api_client.config.client_side_validation && charge_id.nil?
1372
- fail ArgumentError, "Missing the required parameter 'charge_id' when calling BillingApi.get_usage_for_subscription_charge"
1373
- end
1374
- # resource path
1375
- local_var_path = '/invoices/usage'
1376
-
1377
- # query parameters
1378
- query_params = {}
1379
- query_params[:'subscriptionId'] = subscription_id
1380
- query_params[:'chargeId'] = charge_id
1381
-
1382
- # header parameters
1383
- header_params = {}
1384
- # HTTP header 'Accept' (if needed)
1385
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1386
-
1387
- # form parameters
1388
- form_params = {}
1389
-
1390
- # http body (model)
1391
- post_body = nil
1392
- auth_names = ['ApiKeyAuth']
1393
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1394
- :header_params => header_params,
1395
- :query_params => query_params,
1396
- :form_params => form_params,
1397
- :body => post_body,
1398
- :auth_names => auth_names,
1399
- :return_type => 'Array<InvoiceItemJson>')
1400
- if @api_client.config.debugging
1401
- @api_client.config.logger.debug "API called: BillingApi#get_usage_for_subscription_charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1402
- end
1403
- return data, status_code, headers
1404
- end
1405
- # Get aliases for a subscription
1406
- # Returns all aliases for the specified subscription id.
1407
- # @param [Hash] opts the optional parameters
1408
- # @option opts [String] :subscription_id id of the subscription
1409
- # @return [Array<SubscriptionChargeAlias>]
1410
- def list_aliases_for_subscription(opts = {})
1411
- data, _status_code, _headers = list_aliases_for_subscription_with_http_info(opts)
1412
- data
1413
- end
1414
-
1415
- # Get aliases for a subscription
1416
- # Returns all aliases for the specified subscription id.
1417
- # @param [Hash] opts the optional parameters
1418
- # @option opts [String] :subscription_id id of the subscription
1419
- # @return [Array<(Array<SubscriptionChargeAlias>, Fixnum, Hash)>] Array<SubscriptionChargeAlias> data, response status code and response headers
1420
- def list_aliases_for_subscription_with_http_info(opts = {})
1421
- if @api_client.config.debugging
1422
- @api_client.config.logger.debug 'Calling API: BillingApi.list_aliases_for_subscription ...'
1423
- end
1424
- # resource path
1425
- local_var_path = '/alias/subscriptionCharge'
1426
-
1427
- # query parameters
1428
- query_params = {}
1429
- query_params[:'subscriptionId'] = opts[:'subscription_id'] if !opts[:'subscription_id'].nil?
1430
-
1431
- # header parameters
1432
- header_params = {}
1433
- # HTTP header 'Accept' (if needed)
1434
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1435
-
1436
- # form parameters
1437
- form_params = {}
1438
-
1439
- # http body (model)
1440
- post_body = nil
1441
- auth_names = ['ApiKeyAuth']
1442
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1443
- :header_params => header_params,
1444
- :query_params => query_params,
1445
- :form_params => form_params,
1446
- :body => post_body,
1447
- :auth_names => auth_names,
1448
- :return_type => 'Array<SubscriptionChargeAlias>')
1449
- if @api_client.config.debugging
1450
- @api_client.config.logger.debug "API called: BillingApi#list_aliases_for_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1451
- end
1452
- return data, status_code, headers
1453
- end
1454
- # Mark invoice as posted
1455
- # Marks the specified invoice as posted
1456
- # @param number number of the invoice
1457
- # @param [Hash] opts the optional parameters
1458
- # @return [InvoiceJson]
1459
- def post_invoice(number, opts = {})
1460
- data, _status_code, _headers = post_invoice_with_http_info(number, opts)
1461
- data
1462
- end
1463
-
1464
- # Mark invoice as posted
1465
- # Marks the specified invoice as posted
1466
- # @param number number of the invoice
1467
- # @param [Hash] opts the optional parameters
1468
- # @return [Array<(InvoiceJson, Fixnum, Hash)>] InvoiceJson data, response status code and response headers
1469
- def post_invoice_with_http_info(number, opts = {})
1470
- if @api_client.config.debugging
1471
- @api_client.config.logger.debug 'Calling API: BillingApi.post_invoice ...'
1472
- end
1473
- # verify the required parameter 'number' is set
1474
- if @api_client.config.client_side_validation && number.nil?
1475
- fail ArgumentError, "Missing the required parameter 'number' when calling BillingApi.post_invoice"
1476
- end
1477
- # resource path
1478
- local_var_path = '/invoices/{number}/post'.sub('{' + 'number' + '}', number.to_s)
1479
-
1480
- # query parameters
1481
- query_params = {}
1482
-
1483
- # header parameters
1484
- header_params = {}
1485
- # HTTP header 'Accept' (if needed)
1486
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1487
-
1488
- # form parameters
1489
- form_params = {}
1490
-
1491
- # http body (model)
1492
- post_body = nil
1493
- auth_names = ['ApiKeyAuth']
1494
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1495
- :header_params => header_params,
1496
- :query_params => query_params,
1497
- :form_params => form_params,
1498
- :body => post_body,
1499
- :auth_names => auth_names,
1500
- :return_type => 'InvoiceJson')
1501
- if @api_client.config.debugging
1502
- @api_client.config.logger.debug "API called: BillingApi#post_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1503
- end
1504
- return data, status_code, headers
1505
- end
1506
- # Posts invoices for a bulk run
1507
- # Marks all invoices associated with the specified bulk run as posted
1508
- # @param bulk_invoice_run_id id of the run
1509
- # @param [Hash] opts the optional parameters
1510
- # @option opts [Array<String>] :body
1511
- # @return [BulkInvoiceRun]
1512
- def post_invoices_for_bulk_invoice_run(bulk_invoice_run_id, opts = {})
1513
- data, _status_code, _headers = post_invoices_for_bulk_invoice_run_with_http_info(bulk_invoice_run_id, opts)
1514
- data
1515
- end
1516
-
1517
- # Posts invoices for a bulk run
1518
- # Marks all invoices associated with the specified bulk run as posted
1519
- # @param bulk_invoice_run_id id of the run
1520
- # @param [Hash] opts the optional parameters
1521
- # @option opts [Array<String>] :body
1522
- # @return [Array<(BulkInvoiceRun, Fixnum, Hash)>] BulkInvoiceRun data, response status code and response headers
1523
- def post_invoices_for_bulk_invoice_run_with_http_info(bulk_invoice_run_id, opts = {})
1524
- if @api_client.config.debugging
1525
- @api_client.config.logger.debug 'Calling API: BillingApi.post_invoices_for_bulk_invoice_run ...'
1526
- end
1527
- # verify the required parameter 'bulk_invoice_run_id' is set
1528
- if @api_client.config.client_side_validation && bulk_invoice_run_id.nil?
1529
- fail ArgumentError, "Missing the required parameter 'bulk_invoice_run_id' when calling BillingApi.post_invoices_for_bulk_invoice_run"
1530
- end
1531
- # resource path
1532
- local_var_path = '/invoices/bulk/{bulkInvoiceRunId}/post'.sub('{' + 'bulkInvoiceRunId' + '}', bulk_invoice_run_id.to_s)
1533
-
1534
- # query parameters
1535
- query_params = {}
1536
-
1537
- # header parameters
1538
- header_params = {}
1539
- # HTTP header 'Accept' (if needed)
1540
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1541
-
1542
- # form parameters
1543
- form_params = {}
1544
-
1545
- # http body (model)
1546
- post_body = @api_client.object_to_http_body(opts[:'body'])
1547
- auth_names = ['ApiKeyAuth']
1548
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1549
- :header_params => header_params,
1550
- :query_params => query_params,
1551
- :form_params => form_params,
1552
- :body => post_body,
1553
- :auth_names => auth_names,
1554
- :return_type => 'BulkInvoiceRun')
1555
- if @api_client.config.debugging
1556
- @api_client.config.logger.debug "API called: BillingApi#post_invoices_for_bulk_invoice_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1557
- end
1558
- return data, status_code, headers
1559
- end
1560
- # Get unbilled usage
1561
- # Returns the unbilled usage invoice items for the specified subscription
1562
- # @param subscription_id id of the subscription
1563
- # @param [Hash] opts the optional parameters
1564
- # @return [Array<InvoiceItemJson>]
1565
- def preview_invoice_by_order_period(subscription_id, opts = {})
1566
- data, _status_code, _headers = preview_invoice_by_order_period_with_http_info(subscription_id, opts)
1567
- data
1568
- end
1569
-
1570
- # Get unbilled usage
1571
- # Returns the unbilled usage invoice items for the specified subscription
1572
- # @param subscription_id id of the subscription
1573
- # @param [Hash] opts the optional parameters
1574
- # @return [Array<(Array<InvoiceItemJson>, Fixnum, Hash)>] Array<InvoiceItemJson> data, response status code and response headers
1575
- def preview_invoice_by_order_period_with_http_info(subscription_id, opts = {})
1576
- if @api_client.config.debugging
1577
- @api_client.config.logger.debug 'Calling API: BillingApi.preview_invoice_by_order_period ...'
1578
- end
1579
- # verify the required parameter 'subscription_id' is set
1580
- if @api_client.config.client_side_validation && subscription_id.nil?
1581
- fail ArgumentError, "Missing the required parameter 'subscription_id' when calling BillingApi.preview_invoice_by_order_period"
1582
- end
1583
- # resource path
1584
- local_var_path = '/invoices/unbilledUsage'
1585
-
1586
- # query parameters
1587
- query_params = {}
1588
- query_params[:'subscriptionId'] = subscription_id
1589
-
1590
- # header parameters
1591
- header_params = {}
1592
- # HTTP header 'Accept' (if needed)
1593
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1594
-
1595
- # form parameters
1596
- form_params = {}
1597
-
1598
- # http body (model)
1599
- post_body = nil
1600
- auth_names = ['ApiKeyAuth']
1601
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1602
- :header_params => header_params,
1603
- :query_params => query_params,
1604
- :form_params => form_params,
1605
- :body => post_body,
1606
- :auth_names => auth_names,
1607
- :return_type => 'Array<InvoiceItemJson>')
1608
- if @api_client.config.debugging
1609
- @api_client.config.logger.debug "API called: BillingApi#preview_invoice_by_order_period\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1610
- end
1611
- return data, status_code, headers
1612
- end
1613
- # Preview invoices
1614
- # Returns a preview of invoice for the specified order id OR subscription id
1615
- # @param [Hash] opts the optional parameters
1616
- # @option opts [String] :order_id id of order
1617
- # @option opts [String] :subscription_id id of subscription
1618
- # @return [Array<InvoicePreviewJson>]
1619
- def preview_invoice_by_order_period1(opts = {})
1620
- data, _status_code, _headers = preview_invoice_by_order_period1_with_http_info(opts)
1621
- data
1622
- end
1623
-
1624
- # Preview invoices
1625
- # Returns a preview of invoice for the specified order id OR subscription id
1626
- # @param [Hash] opts the optional parameters
1627
- # @option opts [String] :order_id id of order
1628
- # @option opts [String] :subscription_id id of subscription
1629
- # @return [Array<(Array<InvoicePreviewJson>, Fixnum, Hash)>] Array<InvoicePreviewJson> data, response status code and response headers
1630
- def preview_invoice_by_order_period1_with_http_info(opts = {})
1631
- if @api_client.config.debugging
1632
- @api_client.config.logger.debug 'Calling API: BillingApi.preview_invoice_by_order_period1 ...'
1633
- end
1634
- # resource path
1635
- local_var_path = '/invoices/preview'
1636
-
1637
- # query parameters
1638
- query_params = {}
1639
- query_params[:'orderId'] = opts[:'order_id'] if !opts[:'order_id'].nil?
1640
- query_params[:'subscriptionId'] = opts[:'subscription_id'] if !opts[:'subscription_id'].nil?
1641
-
1642
- # header parameters
1643
- header_params = {}
1644
- # HTTP header 'Accept' (if needed)
1645
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1646
-
1647
- # form parameters
1648
- form_params = {}
1649
-
1650
- # http body (model)
1651
- post_body = nil
1652
- auth_names = ['ApiKeyAuth']
1653
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1654
- :header_params => header_params,
1655
- :query_params => query_params,
1656
- :form_params => form_params,
1657
- :body => post_body,
1658
- :auth_names => auth_names,
1659
- :return_type => 'Array<InvoicePreviewJson>')
1660
- if @api_client.config.debugging
1661
- @api_client.config.logger.debug "API called: BillingApi#preview_invoice_by_order_period1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1662
- end
1663
- return data, status_code, headers
1664
- end
1665
- # Set the contact for accounts receivable
1666
- # Sets the details of the account receivable contact for your tenant
1667
- # @param [Hash] opts the optional parameters
1668
- # @option opts [AccountReceivableContactJson] :account_receivable_contact_json contact details
1669
- # @return [nil]
1670
- def put_account_receivable_contact(opts = {})
1671
- put_account_receivable_contact_with_http_info(opts)
1672
- nil
1673
- end
1674
-
1675
- # Set the contact for accounts receivable
1676
- # Sets the details of the account receivable contact for your tenant
1677
- # @param [Hash] opts the optional parameters
1678
- # @option opts [AccountReceivableContactJson] :account_receivable_contact_json contact details
1679
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1680
- def put_account_receivable_contact_with_http_info(opts = {})
1681
- if @api_client.config.debugging
1682
- @api_client.config.logger.debug 'Calling API: BillingApi.put_account_receivable_contact ...'
1683
- end
1684
- # resource path
1685
- local_var_path = '/accountReceivableContact'
1686
-
1687
- # query parameters
1688
- query_params = {}
1689
-
1690
- # header parameters
1691
- header_params = {}
1692
- # HTTP header 'Accept' (if needed)
1693
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1694
-
1695
- # form parameters
1696
- form_params = {}
1697
-
1698
- # http body (model)
1699
- post_body = @api_client.object_to_http_body(opts[:'account_receivable_contact_json'])
1700
- auth_names = ['ApiKeyAuth']
1701
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1702
- :header_params => header_params,
1703
- :query_params => query_params,
1704
- :form_params => form_params,
1705
- :body => post_body,
1706
- :auth_names => auth_names)
1707
- if @api_client.config.debugging
1708
- @api_client.config.logger.debug "API called: BillingApi#put_account_receivable_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1709
- end
1710
- return data, status_code, headers
1711
- end
1712
- # Send an Invoice Reminder
1713
- # Sends a reminder email for the specified invoice
1714
- # @param invoice_number number of the invoice
1715
- # @param [Hash] opts the optional parameters
1716
- # @return [nil]
1717
- def send_invoice_reminder(invoice_number, opts = {})
1718
- send_invoice_reminder_with_http_info(invoice_number, opts)
1719
- nil
1720
- end
1721
-
1722
- # Send an Invoice Reminder
1723
- # Sends a reminder email for the specified invoice
1724
- # @param invoice_number number of the invoice
1725
- # @param [Hash] opts the optional parameters
1726
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1727
- def send_invoice_reminder_with_http_info(invoice_number, opts = {})
1728
- if @api_client.config.debugging
1729
- @api_client.config.logger.debug 'Calling API: BillingApi.send_invoice_reminder ...'
1730
- end
1731
- # verify the required parameter 'invoice_number' is set
1732
- if @api_client.config.client_side_validation && invoice_number.nil?
1733
- fail ArgumentError, "Missing the required parameter 'invoice_number' when calling BillingApi.send_invoice_reminder"
1734
- end
1735
- # resource path
1736
- local_var_path = '/dunning/sendInvoiceReminder/{invoiceNumber}'.sub('{' + 'invoiceNumber' + '}', invoice_number.to_s)
1737
-
1738
- # query parameters
1739
- query_params = {}
1740
-
1741
- # header parameters
1742
- header_params = {}
1743
- # HTTP header 'Accept' (if needed)
1744
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1745
- # HTTP header 'Content-Type'
1746
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1747
-
1748
- # form parameters
1749
- form_params = {}
1750
-
1751
- # http body (model)
1752
- post_body = nil
1753
- auth_names = ['ApiKeyAuth']
1754
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1755
- :header_params => header_params,
1756
- :query_params => query_params,
1757
- :form_params => form_params,
1758
- :body => post_body,
1759
- :auth_names => auth_names)
1760
- if @api_client.config.debugging
1761
- @api_client.config.logger.debug "API called: BillingApi#send_invoice_reminder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1762
- end
1763
- return data, status_code, headers
1764
- end
1765
- # Send a test email
1766
- # Sends a test email for dunning to the use associated with this API call. Note A user bound api key is required for this operation.
1767
- # @param reminder_type type of the reminder
1768
- # @param [Hash] opts the optional parameters
1769
- # @return [nil]
1770
- def send_test_dunning_email(reminder_type, opts = {})
1771
- send_test_dunning_email_with_http_info(reminder_type, opts)
1772
- nil
1773
- end
1774
-
1775
- # Send a test email
1776
- # Sends a test email for dunning to the use associated with this API call. Note A user bound api key is required for this operation.
1777
- # @param reminder_type type of the reminder
1778
- # @param [Hash] opts the optional parameters
1779
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1780
- def send_test_dunning_email_with_http_info(reminder_type, opts = {})
1781
- if @api_client.config.debugging
1782
- @api_client.config.logger.debug 'Calling API: BillingApi.send_test_dunning_email ...'
1783
- end
1784
- # verify the required parameter 'reminder_type' is set
1785
- if @api_client.config.client_side_validation && reminder_type.nil?
1786
- fail ArgumentError, "Missing the required parameter 'reminder_type' when calling BillingApi.send_test_dunning_email"
1787
- end
1788
- # verify enum value
1789
- if @api_client.config.client_side_validation && !['WEEK_BEFORE_DUE_DATE', 'DUE_DATE', 'WEEK_AFTER_DUE_DATE', 'TWO_WEEKS_AFTER_DUE_DATE', 'MONTH_AFTER_DUE_DATE', 'TWO_MONTHS_AFTER_DUE_DATE'].include?(reminder_type)
1790
- fail ArgumentError, "invalid value for 'reminder_type', must be one of WEEK_BEFORE_DUE_DATE, DUE_DATE, WEEK_AFTER_DUE_DATE, TWO_WEEKS_AFTER_DUE_DATE, MONTH_AFTER_DUE_DATE, TWO_MONTHS_AFTER_DUE_DATE"
1791
- end
1792
- # resource path
1793
- local_var_path = '/dunning/sendTestEmail/{reminderType}'.sub('{' + 'reminderType' + '}', reminder_type.to_s)
1794
-
1795
- # query parameters
1796
- query_params = {}
1797
-
1798
- # header parameters
1799
- header_params = {}
1800
- # HTTP header 'Accept' (if needed)
1801
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1802
- # HTTP header 'Content-Type'
1803
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1804
-
1805
- # form parameters
1806
- form_params = {}
1807
-
1808
- # http body (model)
1809
- post_body = nil
1810
- auth_names = ['ApiKeyAuth']
1811
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1812
- :header_params => header_params,
1813
- :query_params => query_params,
1814
- :form_params => form_params,
1815
- :body => post_body,
1816
- :auth_names => auth_names)
1817
- if @api_client.config.debugging
1818
- @api_client.config.logger.debug "API called: BillingApi#send_test_dunning_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1819
- end
1820
- return data, status_code, headers
1821
- end
1822
- # Update automated invoice rule details
1823
- # Updates the details of the specified automated invoice rule
1824
- # @param id id of the automated invoice rule
1825
- # @param body automated invoice rule
1826
- # @param [Hash] opts the optional parameters
1827
- # @return [nil]
1828
- def update_automated_invoice_rule(id, body, opts = {})
1829
- update_automated_invoice_rule_with_http_info(id, body, opts)
1830
- nil
1831
- end
1832
-
1833
- # Update automated invoice rule details
1834
- # Updates the details of the specified automated invoice rule
1835
- # @param id id of the automated invoice rule
1836
- # @param body automated invoice rule
1837
- # @param [Hash] opts the optional parameters
1838
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1839
- def update_automated_invoice_rule_with_http_info(id, body, opts = {})
1840
- if @api_client.config.debugging
1841
- @api_client.config.logger.debug 'Calling API: BillingApi.update_automated_invoice_rule ...'
1842
- end
1843
- # verify the required parameter 'id' is set
1844
- if @api_client.config.client_side_validation && id.nil?
1845
- fail ArgumentError, "Missing the required parameter 'id' when calling BillingApi.update_automated_invoice_rule"
1846
- end
1847
- # verify the required parameter 'body' is set
1848
- if @api_client.config.client_side_validation && body.nil?
1849
- fail ArgumentError, "Missing the required parameter 'body' when calling BillingApi.update_automated_invoice_rule"
1850
- end
1851
- # resource path
1852
- local_var_path = '/automatedInvoiceRules/{id}'.sub('{' + 'id' + '}', id.to_s)
1853
-
1854
- # query parameters
1855
- query_params = {}
1856
-
1857
- # header parameters
1858
- header_params = {}
1859
- # HTTP header 'Accept' (if needed)
1860
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1861
-
1862
- # form parameters
1863
- form_params = {}
1864
-
1865
- # http body (model)
1866
- post_body = @api_client.object_to_http_body(body)
1867
- auth_names = ['ApiKeyAuth']
1868
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1869
- :header_params => header_params,
1870
- :query_params => query_params,
1871
- :form_params => form_params,
1872
- :body => post_body,
1873
- :auth_names => auth_names)
1874
- if @api_client.config.debugging
1875
- @api_client.config.logger.debug "API called: BillingApi#update_automated_invoice_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1876
- end
1877
- return data, status_code, headers
1878
- end
1879
- # Update dunning settings
1880
- # Updates the dunning settings for your tenant
1881
- # @param [Hash] opts the optional parameters
1882
- # @option opts [DunningSettingJson] :body json representing the dunning settings
1883
- # @return [nil]
1884
- def update_dunning_setting(opts = {})
1885
- update_dunning_setting_with_http_info(opts)
1886
- nil
1887
- end
1888
-
1889
- # Update dunning settings
1890
- # Updates the dunning settings for your tenant
1891
- # @param [Hash] opts the optional parameters
1892
- # @option opts [DunningSettingJson] :body json representing the dunning settings
1893
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1894
- def update_dunning_setting_with_http_info(opts = {})
1895
- if @api_client.config.debugging
1896
- @api_client.config.logger.debug 'Calling API: BillingApi.update_dunning_setting ...'
1897
- end
1898
- # resource path
1899
- local_var_path = '/dunningSetting'
1900
-
1901
- # query parameters
1902
- query_params = {}
1903
-
1904
- # header parameters
1905
- header_params = {}
1906
- # HTTP header 'Accept' (if needed)
1907
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1908
-
1909
- # form parameters
1910
- form_params = {}
1911
-
1912
- # http body (model)
1913
- post_body = @api_client.object_to_http_body(opts[:'body'])
1914
- auth_names = ['ApiKeyAuth']
1915
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1916
- :header_params => header_params,
1917
- :query_params => query_params,
1918
- :form_params => form_params,
1919
- :body => post_body,
1920
- :auth_names => auth_names)
1921
- if @api_client.config.debugging
1922
- @api_client.config.logger.debug "API called: BillingApi#update_dunning_setting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1923
- end
1924
- return data, status_code, headers
1925
- end
1926
- # Update invoice details
1927
- # Updates the details of the specified invoice.
1928
- # @param number number of the invoice
1929
- # @param body json representing invoice details
1930
- # @param [Hash] opts the optional parameters
1931
- # @return [InvoiceJson]
1932
- def update_invoice(number, body, opts = {})
1933
- data, _status_code, _headers = update_invoice_with_http_info(number, body, opts)
1934
- data
1935
- end
1936
-
1937
- # Update invoice details
1938
- # Updates the details of the specified invoice.
1939
- # @param number number of the invoice
1940
- # @param body json representing invoice details
1941
- # @param [Hash] opts the optional parameters
1942
- # @return [Array<(InvoiceJson, Fixnum, Hash)>] InvoiceJson data, response status code and response headers
1943
- def update_invoice_with_http_info(number, body, opts = {})
1944
- if @api_client.config.debugging
1945
- @api_client.config.logger.debug 'Calling API: BillingApi.update_invoice ...'
1946
- end
1947
- # verify the required parameter 'number' is set
1948
- if @api_client.config.client_side_validation && number.nil?
1949
- fail ArgumentError, "Missing the required parameter 'number' when calling BillingApi.update_invoice"
1950
- end
1951
- # verify the required parameter 'body' is set
1952
- if @api_client.config.client_side_validation && body.nil?
1953
- fail ArgumentError, "Missing the required parameter 'body' when calling BillingApi.update_invoice"
1954
- end
1955
- # resource path
1956
- local_var_path = '/invoices/{number}'.sub('{' + 'number' + '}', number.to_s)
1957
-
1958
- # query parameters
1959
- query_params = {}
1960
-
1961
- # header parameters
1962
- header_params = {}
1963
- # HTTP header 'Accept' (if needed)
1964
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1965
-
1966
- # form parameters
1967
- form_params = {}
1968
-
1969
- # http body (model)
1970
- post_body = @api_client.object_to_http_body(body)
1971
- auth_names = ['ApiKeyAuth']
1972
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1973
- :header_params => header_params,
1974
- :query_params => query_params,
1975
- :form_params => form_params,
1976
- :body => post_body,
1977
- :auth_names => auth_names,
1978
- :return_type => 'InvoiceJson')
1979
- if @api_client.config.debugging
1980
- @api_client.config.logger.debug "API called: BillingApi#update_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1981
- end
1982
- return data, status_code, headers
1983
- end
1984
- # Update invoice sequence
1985
- # Updates the invoice sequence by invoice config id.
1986
- # @param invoice_config_id invoice config id
1987
- # @param [Hash] opts the optional parameters
1988
- # @option opts [Integer] :next_invoice_number long integer value
1989
- # @return [TenantInvoiceConfig]
1990
- def update_invoice_sequence(invoice_config_id, opts = {})
1991
- data, _status_code, _headers = update_invoice_sequence_with_http_info(invoice_config_id, opts)
1992
- data
1993
- end
1994
-
1995
- # Update invoice sequence
1996
- # Updates the invoice sequence by invoice config id.
1997
- # @param invoice_config_id invoice config id
1998
- # @param [Hash] opts the optional parameters
1999
- # @option opts [Integer] :next_invoice_number long integer value
2000
- # @return [Array<(TenantInvoiceConfig, Fixnum, Hash)>] TenantInvoiceConfig data, response status code and response headers
2001
- def update_invoice_sequence_with_http_info(invoice_config_id, opts = {})
2002
- if @api_client.config.debugging
2003
- @api_client.config.logger.debug 'Calling API: BillingApi.update_invoice_sequence ...'
2004
- end
2005
- # verify the required parameter 'invoice_config_id' is set
2006
- if @api_client.config.client_side_validation && invoice_config_id.nil?
2007
- fail ArgumentError, "Missing the required parameter 'invoice_config_id' when calling BillingApi.update_invoice_sequence"
2008
- end
2009
- # resource path
2010
- local_var_path = '/invoices/sequence/{invoiceConfigId}'.sub('{' + 'invoiceConfigId' + '}', invoice_config_id.to_s)
2011
-
2012
- # query parameters
2013
- query_params = {}
2014
- query_params[:'next invoice number'] = opts[:'next_invoice_number'] if !opts[:'next_invoice_number'].nil?
2015
-
2016
- # header parameters
2017
- header_params = {}
2018
- # HTTP header 'Accept' (if needed)
2019
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2020
-
2021
- # form parameters
2022
- form_params = {}
2023
-
2024
- # http body (model)
2025
- post_body = nil
2026
- auth_names = ['ApiKeyAuth']
2027
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2028
- :header_params => header_params,
2029
- :query_params => query_params,
2030
- :form_params => form_params,
2031
- :body => post_body,
2032
- :auth_names => auth_names,
2033
- :return_type => 'TenantInvoiceConfig')
2034
- if @api_client.config.debugging
2035
- @api_client.config.logger.debug "API called: BillingApi#update_invoice_sequence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2036
- end
2037
- return data, status_code, headers
2038
- end
2039
- # Mark invoice as voided
2040
- # Marks the specified invoice as voided
2041
- # @param number number of the invoice
2042
- # @param body json representing invoice details
2043
- # @param [Hash] opts the optional parameters
2044
- # @return [InvoiceJson]
2045
- def void_invoice(number, body, opts = {})
2046
- data, _status_code, _headers = void_invoice_with_http_info(number, body, opts)
2047
- data
2048
- end
2049
-
2050
- # Mark invoice as voided
2051
- # Marks the specified invoice as voided
2052
- # @param number number of the invoice
2053
- # @param body json representing invoice details
2054
- # @param [Hash] opts the optional parameters
2055
- # @return [Array<(InvoiceJson, Fixnum, Hash)>] InvoiceJson data, response status code and response headers
2056
- def void_invoice_with_http_info(number, body, opts = {})
2057
- if @api_client.config.debugging
2058
- @api_client.config.logger.debug 'Calling API: BillingApi.void_invoice ...'
2059
- end
2060
- # verify the required parameter 'number' is set
2061
- if @api_client.config.client_side_validation && number.nil?
2062
- fail ArgumentError, "Missing the required parameter 'number' when calling BillingApi.void_invoice"
2063
- end
2064
- # verify the required parameter 'body' is set
2065
- if @api_client.config.client_side_validation && body.nil?
2066
- fail ArgumentError, "Missing the required parameter 'body' when calling BillingApi.void_invoice"
2067
- end
2068
- # resource path
2069
- local_var_path = '/invoices/{number}/void'.sub('{' + 'number' + '}', number.to_s)
2070
-
2071
- # query parameters
2072
- query_params = {}
2073
-
2074
- # header parameters
2075
- header_params = {}
2076
- # HTTP header 'Accept' (if needed)
2077
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2078
-
2079
- # form parameters
2080
- form_params = {}
2081
-
2082
- # http body (model)
2083
- post_body = @api_client.object_to_http_body(body)
2084
- auth_names = ['ApiKeyAuth']
2085
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
2086
- :header_params => header_params,
2087
- :query_params => query_params,
2088
- :form_params => form_params,
2089
- :body => post_body,
2090
- :auth_names => auth_names,
2091
- :return_type => 'InvoiceJson')
2092
- if @api_client.config.debugging
2093
- @api_client.config.logger.debug "API called: BillingApi#void_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2094
- end
2095
- return data, status_code, headers
2096
- end
2097
- end
2098
- end