cbox_billing 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (736) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +215 -0
  3. data/cbox_billing.gemspec +26 -0
  4. data/lib/cbox_billing/api/accounting_api.rb +1893 -0
  5. data/lib/cbox_billing/api/affiliates_api.rb +2009 -0
  6. data/lib/cbox_billing/api/agreements_api.rb +552 -0
  7. data/lib/cbox_billing/api/bank_reconciliation_api.rb +505 -0
  8. data/lib/cbox_billing/api/catalog_api.rb +361 -0
  9. data/lib/cbox_billing/api/checkout_portal_api.rb +696 -0
  10. data/lib/cbox_billing/api/coupons_api.rb +538 -0
  11. data/lib/cbox_billing/api/credit_notes_api.rb +403 -0
  12. data/lib/cbox_billing/api/disputes_api.rb +540 -0
  13. data/lib/cbox_billing/api/dunning_api.rb +902 -0
  14. data/lib/cbox_billing/api/enforcement_api.rb +746 -0
  15. data/lib/cbox_billing/api/environments_api.rb +343 -0
  16. data/lib/cbox_billing/api/invoices_api.rb +1662 -0
  17. data/lib/cbox_billing/api/licence_data_api.rb +619 -0
  18. data/lib/cbox_billing/api/licenses_api.rb +293 -0
  19. data/lib/cbox_billing/api/management_api.rb +253 -0
  20. data/lib/cbox_billing/api/meters_api.rb +538 -0
  21. data/lib/cbox_billing/api/orders_and_delivery_api.rb +1745 -0
  22. data/lib/cbox_billing/api/organizations_api.rb +1110 -0
  23. data/lib/cbox_billing/api/payment_gateways_api.rb +227 -0
  24. data/lib/cbox_billing/api/payment_intents_api.rb +376 -0
  25. data/lib/cbox_billing/api/payment_methods_api.rb +96 -0
  26. data/lib/cbox_billing/api/plans_api.rb +654 -0
  27. data/lib/cbox_billing/api/product_access_api.rb +2033 -0
  28. data/lib/cbox_billing/api/quotes_api.rb +1062 -0
  29. data/lib/cbox_billing/api/seats_api.rb +938 -0
  30. data/lib/cbox_billing/api/service_connections_api.rb +245 -0
  31. data/lib/cbox_billing/api/subscriptions_api.rb +4697 -0
  32. data/lib/cbox_billing/api/tax_returns_api.rb +453 -0
  33. data/lib/cbox_billing/api/test_mode_api.rb +96 -0
  34. data/lib/cbox_billing/api/usage_api.rb +1116 -0
  35. data/lib/cbox_billing/api/webhook_endpoints_api.rb +835 -0
  36. data/lib/cbox_billing/api_client.rb +441 -0
  37. data/lib/cbox_billing/api_error.rb +58 -0
  38. data/lib/cbox_billing/api_model_base.rb +88 -0
  39. data/lib/cbox_billing/client.rb +49 -0
  40. data/lib/cbox_billing/configuration.rb +408 -0
  41. data/lib/cbox_billing/enforcement/client.rb +665 -0
  42. data/lib/cbox_billing/enforcement/errors.rb +48 -0
  43. data/lib/cbox_billing/enforcement/stores.rb +129 -0
  44. data/lib/cbox_billing/enforcement/transport.rb +79 -0
  45. data/lib/cbox_billing/enforcement/types.rb +63 -0
  46. data/lib/cbox_billing/enforcement.rb +9 -0
  47. data/lib/cbox_billing/errors.rb +110 -0
  48. data/lib/cbox_billing/idempotency.rb +16 -0
  49. data/lib/cbox_billing/models/accept_agreement201_response.rb +177 -0
  50. data/lib/cbox_billing/models/accept_agreement_request.rb +294 -0
  51. data/lib/cbox_billing/models/accept_agreement_request_user.rb +202 -0
  52. data/lib/cbox_billing/models/access_balance.rb +276 -0
  53. data/lib/cbox_billing/models/access_balance_request.rb +309 -0
  54. data/lib/cbox_billing/models/access_batch.rb +321 -0
  55. data/lib/cbox_billing/models/access_batch_filters.rb +183 -0
  56. data/lib/cbox_billing/models/access_cancel_request.rb +207 -0
  57. data/lib/cbox_billing/models/access_commit_request.rb +207 -0
  58. data/lib/cbox_billing/models/access_entry.rb +383 -0
  59. data/lib/cbox_billing/models/access_grant.rb +287 -0
  60. data/lib/cbox_billing/models/access_grant_request.rb +310 -0
  61. data/lib/cbox_billing/models/access_invitation.rb +404 -0
  62. data/lib/cbox_billing/models/access_invite_request.rb +337 -0
  63. data/lib/cbox_billing/models/access_join_request.rb +369 -0
  64. data/lib/cbox_billing/models/access_program.rb +511 -0
  65. data/lib/cbox_billing/models/access_program_input.rb +433 -0
  66. data/lib/cbox_billing/models/access_redeem_request.rb +335 -0
  67. data/lib/cbox_billing/models/access_redemption.rb +394 -0
  68. data/lib/cbox_billing/models/access_report.rb +250 -0
  69. data/lib/cbox_billing/models/access_report_balances.rb +252 -0
  70. data/lib/cbox_billing/models/access_report_batches.rb +252 -0
  71. data/lib/cbox_billing/models/access_report_entries.rb +252 -0
  72. data/lib/cbox_billing/models/access_report_grants.rb +252 -0
  73. data/lib/cbox_billing/models/access_report_invitations.rb +252 -0
  74. data/lib/cbox_billing/models/access_report_redemptions.rb +252 -0
  75. data/lib/cbox_billing/models/access_restore_grant_request.rb +207 -0
  76. data/lib/cbox_billing/models/access_retry_delivery_request.rb +207 -0
  77. data/lib/cbox_billing/models/access_revoke_grant_request.rb +207 -0
  78. data/lib/cbox_billing/models/access_revoke_invitation200_response.rb +195 -0
  79. data/lib/cbox_billing/models/access_revoke_invitation_request.rb +207 -0
  80. data/lib/cbox_billing/models/access_select200_response.rb +356 -0
  81. data/lib/cbox_billing/models/access_select_request.rb +323 -0
  82. data/lib/cbox_billing/models/account_credit.rb +258 -0
  83. data/lib/cbox_billing/models/account_credit_movements_inner.rb +255 -0
  84. data/lib/cbox_billing/models/account_entitlement.rb +240 -0
  85. data/lib/cbox_billing/models/accounting_connection.rb +336 -0
  86. data/lib/cbox_billing/models/accounting_connection_company.rb +170 -0
  87. data/lib/cbox_billing/models/accounting_contact_conflict.rb +308 -0
  88. data/lib/cbox_billing/models/accounting_contact_import.rb +397 -0
  89. data/lib/cbox_billing/models/accounting_contact_import_counts.rb +308 -0
  90. data/lib/cbox_billing/models/accounting_contact_import_row.rb +363 -0
  91. data/lib/cbox_billing/models/accounting_contact_import_row_candidates_inner.rb +227 -0
  92. data/lib/cbox_billing/models/accounting_contact_sync.rb +351 -0
  93. data/lib/cbox_billing/models/accounting_contact_sync_failure.rb +266 -0
  94. data/lib/cbox_billing/models/accounting_customer_document.rb +318 -0
  95. data/lib/cbox_billing/models/accounting_customer_link.rb +354 -0
  96. data/lib/cbox_billing/models/accounting_customer_link_company.rb +180 -0
  97. data/lib/cbox_billing/models/accounting_customer_link_contact.rb +292 -0
  98. data/lib/cbox_billing/models/accounting_customer_link_contact_sync.rb +291 -0
  99. data/lib/cbox_billing/models/accounting_customer_link_contact_sync_conflicts_inner.rb +237 -0
  100. data/lib/cbox_billing/models/accounting_customer_link_several_contacts_inner.rb +227 -0
  101. data/lib/cbox_billing/models/accounting_customer_link_shared_with_inner.rb +203 -0
  102. data/lib/cbox_billing/models/accounting_invoice.rb +532 -0
  103. data/lib/cbox_billing/models/accounting_invoice_contact.rb +189 -0
  104. data/lib/cbox_billing/models/accounting_sync.rb +356 -0
  105. data/lib/cbox_billing/models/accounting_vendor_contact.rb +307 -0
  106. data/lib/cbox_billing/models/accounting_vendor_link.rb +216 -0
  107. data/lib/cbox_billing/models/activation_bundle.rb +293 -0
  108. data/lib/cbox_billing/models/add_dispute_evidence_file201_response.rb +177 -0
  109. data/lib/cbox_billing/models/add_dispute_evidence_file422_response.rb +104 -0
  110. data/lib/cbox_billing/models/add_dispute_evidence_file_request.rb +261 -0
  111. data/lib/cbox_billing/models/add_invoice_item201_response.rb +177 -0
  112. data/lib/cbox_billing/models/add_invoice_item202_response.rb +228 -0
  113. data/lib/cbox_billing/models/add_invoice_item_request.rb +248 -0
  114. data/lib/cbox_billing/models/add_on.rb +305 -0
  115. data/lib/cbox_billing/models/add_on_preview.rb +170 -0
  116. data/lib/cbox_billing/models/add_on_request.rb +434 -0
  117. data/lib/cbox_billing/models/add_on_result.rb +203 -0
  118. data/lib/cbox_billing/models/add_product_file_request1.rb +233 -0
  119. data/lib/cbox_billing/models/add_subscription_phase201_response.rb +177 -0
  120. data/lib/cbox_billing/models/adjust_affiliate_balance_request.rb +257 -0
  121. data/lib/cbox_billing/models/admit_service_organization200_response.rb +169 -0
  122. data/lib/cbox_billing/models/affiliate.rb +505 -0
  123. data/lib/cbox_billing/models/affiliate_commission.rb +520 -0
  124. data/lib/cbox_billing/models/affiliate_detail.rb +523 -0
  125. data/lib/cbox_billing/models/affiliate_payout.rb +443 -0
  126. data/lib/cbox_billing/models/affiliate_payout_run.rb +446 -0
  127. data/lib/cbox_billing/models/affiliate_payout_run_list.rb +229 -0
  128. data/lib/cbox_billing/models/affiliate_payout_settings.rb +356 -0
  129. data/lib/cbox_billing/models/affiliate_portal_link.rb +203 -0
  130. data/lib/cbox_billing/models/affiliate_program.rb +556 -0
  131. data/lib/cbox_billing/models/affiliate_program_commission.rb +269 -0
  132. data/lib/cbox_billing/models/affiliate_rate_plan.rb +273 -0
  133. data/lib/cbox_billing/models/affiliate_rate_plan_phases_inner.rb +316 -0
  134. data/lib/cbox_billing/models/affiliate_rate_rule.rb +233 -0
  135. data/lib/cbox_billing/models/affiliate_referral.rb +325 -0
  136. data/lib/cbox_billing/models/agreement_block.rb +337 -0
  137. data/lib/cbox_billing/models/agreement_error.rb +227 -0
  138. data/lib/cbox_billing/models/agreement_status.rb +453 -0
  139. data/lib/cbox_billing/models/agreement_status_requires_inner.rb +202 -0
  140. data/lib/cbox_billing/models/align_renewals_request.rb +264 -0
  141. data/lib/cbox_billing/models/allowance_window.rb +269 -0
  142. data/lib/cbox_billing/models/appendix.rb +293 -0
  143. data/lib/cbox_billing/models/appendix_column.rb +257 -0
  144. data/lib/cbox_billing/models/apply_catalog409_response.rb +369 -0
  145. data/lib/cbox_billing/models/apply_subscription_coupon200_response.rb +177 -0
  146. data/lib/cbox_billing/models/apply_subscription_coupon_request.rb +197 -0
  147. data/lib/cbox_billing/models/archive_affiliate_program_request.rb +162 -0
  148. data/lib/cbox_billing/models/auto_top_up.rb +462 -0
  149. data/lib/cbox_billing/models/auto_top_up_attempts_inner.rb +290 -0
  150. data/lib/cbox_billing/models/auto_top_up_limits.rb +230 -0
  151. data/lib/cbox_billing/models/bank_csv_mapping.rb +467 -0
  152. data/lib/cbox_billing/models/bank_import_result.rb +285 -0
  153. data/lib/cbox_billing/models/bank_line.rb +486 -0
  154. data/lib/cbox_billing/models/bank_line_detail.rb +233 -0
  155. data/lib/cbox_billing/models/bank_line_detail_payments_inner.rb +280 -0
  156. data/lib/cbox_billing/models/bank_line_detail_suggestions_inner.rb +267 -0
  157. data/lib/cbox_billing/models/bank_statement.rb +412 -0
  158. data/lib/cbox_billing/models/bank_statement_import.rb +258 -0
  159. data/lib/cbox_billing/models/billing_parent.rb +219 -0
  160. data/lib/cbox_billing/models/billing_policy.rb +299 -0
  161. data/lib/cbox_billing/models/billing_policy_policy.rb +228 -0
  162. data/lib/cbox_billing/models/billing_policy_request.rb +323 -0
  163. data/lib/cbox_billing/models/bundle_benefit.rb +597 -0
  164. data/lib/cbox_billing/models/bundle_benefit_tiers_inner.rb +230 -0
  165. data/lib/cbox_billing/models/bundle_consequence.rb +450 -0
  166. data/lib/cbox_billing/models/bundle_offer.rb +508 -0
  167. data/lib/cbox_billing/models/bundle_offer_plan.rb +398 -0
  168. data/lib/cbox_billing/models/bundle_offer_products_to_add_inner.rb +169 -0
  169. data/lib/cbox_billing/models/bundle_offer_saves.rb +226 -0
  170. data/lib/cbox_billing/models/cancel_preview.rb +264 -0
  171. data/lib/cbox_billing/models/cancel_request.rb +256 -0
  172. data/lib/cbox_billing/models/cancel_subscription200_response.rb +652 -0
  173. data/lib/cbox_billing/models/catalog_changes.rb +286 -0
  174. data/lib/cbox_billing/models/catalog_changes_changes_inner.rb +264 -0
  175. data/lib/cbox_billing/models/catalog_changes_diff_inner.rb +303 -0
  176. data/lib/cbox_billing/models/catalog_changes_diff_inner_fields_inner.rb +180 -0
  177. data/lib/cbox_billing/models/catalog_changes_diff_inner_fields_inner_from.rb +105 -0
  178. data/lib/cbox_billing/models/catalog_changes_impact.rb +215 -0
  179. data/lib/cbox_billing/models/catalog_changes_impact_bundle_repriced_inner.rb +224 -0
  180. data/lib/cbox_billing/models/catalog_changes_impact_sample_inner.rb +169 -0
  181. data/lib/cbox_billing/models/catalog_changes_summary.rb +178 -0
  182. data/lib/cbox_billing/models/catalog_manifest.rb +215 -0
  183. data/lib/cbox_billing/models/catalog_manifest_bundles_inner.rb +344 -0
  184. data/lib/cbox_billing/models/catalog_manifest_bundles_inner_applies_to.rb +199 -0
  185. data/lib/cbox_billing/models/catalog_manifest_bundles_inner_copy_value.rb +263 -0
  186. data/lib/cbox_billing/models/catalog_manifest_bundles_inner_discount.rb +286 -0
  187. data/lib/cbox_billing/models/catalog_manifest_bundles_inner_requires.rb +254 -0
  188. data/lib/cbox_billing/models/catalog_manifest_existing.rb +242 -0
  189. data/lib/cbox_billing/models/catalog_manifest_products_inner.rb +246 -0
  190. data/lib/cbox_billing/models/catalog_manifest_products_inner_features_inner.rb +269 -0
  191. data/lib/cbox_billing/models/catalog_manifest_products_inner_meters_inner.rb +410 -0
  192. data/lib/cbox_billing/models/catalog_manifest_products_inner_plans_inner.rb +258 -0
  193. data/lib/cbox_billing/models/catalog_manifest_products_inner_plans_inner_meters_value.rb +356 -0
  194. data/lib/cbox_billing/models/catalog_manifest_products_inner_plans_inner_meters_value_price_value.rb +471 -0
  195. data/lib/cbox_billing/models/catalog_manifest_products_inner_plans_inner_meters_value_price_value_matrix_inner.rb +274 -0
  196. data/lib/cbox_billing/models/catalog_manifest_products_inner_plans_inner_meters_value_price_value_rates_inner.rb +216 -0
  197. data/lib/cbox_billing/models/change_subscription_dates200_response.rb +187 -0
  198. data/lib/cbox_billing/models/change_subscription_dates_request.rb +325 -0
  199. data/lib/cbox_billing/models/charged_invoice.rb +322 -0
  200. data/lib/cbox_billing/models/check_service_admission200_response.rb +178 -0
  201. data/lib/cbox_billing/models/checkout_session_request.rb +354 -0
  202. data/lib/cbox_billing/models/checkout_session_request_items_inner.rb +217 -0
  203. data/lib/cbox_billing/models/choose_accounting_contact_import_row200_response.rb +177 -0
  204. data/lib/cbox_billing/models/clear_subscription_end_date200_response.rb +162 -0
  205. data/lib/cbox_billing/models/commit_request.rb +214 -0
  206. data/lib/cbox_billing/models/commit_request_actuals_inner.rb +212 -0
  207. data/lib/cbox_billing/models/commitment.rb +499 -0
  208. data/lib/cbox_billing/models/commitment_ramp_step.rb +221 -0
  209. data/lib/cbox_billing/models/commitment_refusal.rb +239 -0
  210. data/lib/cbox_billing/models/commitment_request.rb +409 -0
  211. data/lib/cbox_billing/models/commitment_response.rb +203 -0
  212. data/lib/cbox_billing/models/commitment_term.rb +227 -0
  213. data/lib/cbox_billing/models/confirm_accounting_contact_import200_response.rb +177 -0
  214. data/lib/cbox_billing/models/confirm_accounting_contact_import_request.rb +190 -0
  215. data/lib/cbox_billing/models/connect_engage_service200_response.rb +212 -0
  216. data/lib/cbox_billing/models/connect_engage_service_request.rb +267 -0
  217. data/lib/cbox_billing/models/contract_cap_discount.rb +284 -0
  218. data/lib/cbox_billing/models/contract_price_cap.rb +332 -0
  219. data/lib/cbox_billing/models/contract_price_cap_basis.rb +216 -0
  220. data/lib/cbox_billing/models/coupon.rb +307 -0
  221. data/lib/cbox_billing/models/coupon_definition.rb +520 -0
  222. data/lib/cbox_billing/models/coupon_definition_detail.rb +555 -0
  223. data/lib/cbox_billing/models/coupon_definition_detail_all_of_redemptions.rb +216 -0
  224. data/lib/cbox_billing/models/coupon_definition_list.rb +226 -0
  225. data/lib/cbox_billing/models/coupon_deleted.rb +227 -0
  226. data/lib/cbox_billing/models/coupon_request.rb +537 -0
  227. data/lib/cbox_billing/models/create_affiliate_payout_request.rb +247 -0
  228. data/lib/cbox_billing/models/create_affiliate_program_request.rb +423 -0
  229. data/lib/cbox_billing/models/create_affiliate_program_request_commission.rb +348 -0
  230. data/lib/cbox_billing/models/create_affiliate_referral_request.rb +178 -0
  231. data/lib/cbox_billing/models/create_affiliate_request.rb +415 -0
  232. data/lib/cbox_billing/models/create_credit_purchase422_response.rb +104 -0
  233. data/lib/cbox_billing/models/create_customers_from_accounting_contact_import200_response.rb +207 -0
  234. data/lib/cbox_billing/models/create_customers_from_accounting_contact_import200_response_created_inner.rb +204 -0
  235. data/lib/cbox_billing/models/create_customers_from_accounting_contact_import200_response_refused_inner.rb +204 -0
  236. data/lib/cbox_billing/models/create_customers_from_accounting_contact_import_request.rb +197 -0
  237. data/lib/cbox_billing/models/create_download_grant_request.rb +248 -0
  238. data/lib/cbox_billing/models/create_download_links200_response.rb +205 -0
  239. data/lib/cbox_billing/models/create_download_links200_response_data_inner.rb +227 -0
  240. data/lib/cbox_billing/models/create_download_links_request.rb +190 -0
  241. data/lib/cbox_billing/models/create_environment_request.rb +270 -0
  242. data/lib/cbox_billing/models/create_license_key_request.rb +273 -0
  243. data/lib/cbox_billing/models/create_order_request.rb +420 -0
  244. data/lib/cbox_billing/models/create_order_request_lines_inner.rb +262 -0
  245. data/lib/cbox_billing/models/create_private_plan_request.rb +318 -0
  246. data/lib/cbox_billing/models/create_spend_alert_request.rb +295 -0
  247. data/lib/cbox_billing/models/created_access_invitation.rb +464 -0
  248. data/lib/cbox_billing/models/created_environment.rb +214 -0
  249. data/lib/cbox_billing/models/credit_adjustment_applied.rb +247 -0
  250. data/lib/cbox_billing/models/credit_adjustment_pending.rb +228 -0
  251. data/lib/cbox_billing/models/credit_adjustment_request.rb +375 -0
  252. data/lib/cbox_billing/models/credit_delta.rb +229 -0
  253. data/lib/cbox_billing/models/credit_movement.rb +364 -0
  254. data/lib/cbox_billing/models/credit_movement_list.rb +226 -0
  255. data/lib/cbox_billing/models/credit_note.rb +455 -0
  256. data/lib/cbox_billing/models/credit_note_detail.rb +517 -0
  257. data/lib/cbox_billing/models/credit_note_detail_all_of_lines.rb +294 -0
  258. data/lib/cbox_billing/models/credit_note_list.rb +226 -0
  259. data/lib/cbox_billing/models/credit_pool.rb +567 -0
  260. data/lib/cbox_billing/models/credit_pool_expiries_inner.rb +241 -0
  261. data/lib/cbox_billing/models/credit_pool_label.rb +204 -0
  262. data/lib/cbox_billing/models/credit_pool_list.rb +205 -0
  263. data/lib/cbox_billing/models/credit_pool_pay_as_you_go.rb +218 -0
  264. data/lib/cbox_billing/models/credit_pool_period.rb +175 -0
  265. data/lib/cbox_billing/models/credit_pool_scope.rb +207 -0
  266. data/lib/cbox_billing/models/credit_pool_scope_conditions_inner.rb +256 -0
  267. data/lib/cbox_billing/models/credit_purchase.rb +306 -0
  268. data/lib/cbox_billing/models/credit_purchase_credit.rb +203 -0
  269. data/lib/cbox_billing/models/customer_contract.rb +227 -0
  270. data/lib/cbox_billing/models/customer_overage_cap_row.rb +345 -0
  271. data/lib/cbox_billing/models/customer_overage_cap_row_customer.rb +202 -0
  272. data/lib/cbox_billing/models/date_change_preview.rb +370 -0
  273. data/lib/cbox_billing/models/date_change_request.rb +272 -0
  274. data/lib/cbox_billing/models/delete_entitlement_override200_response.rb +204 -0
  275. data/lib/cbox_billing/models/delete_overage_cap200_response.rb +203 -0
  276. data/lib/cbox_billing/models/delete_spend_alert200_response.rb +203 -0
  277. data/lib/cbox_billing/models/delete_webhook_endpoint200_response.rb +239 -0
  278. data/lib/cbox_billing/models/delivery.rb +339 -0
  279. data/lib/cbox_billing/models/destroy_environment200_response.rb +178 -0
  280. data/lib/cbox_billing/models/detach_payment_method422_response.rb +253 -0
  281. data/lib/cbox_billing/models/detach_payment_method422_response_errors.rb +162 -0
  282. data/lib/cbox_billing/models/directory_registration.rb +244 -0
  283. data/lib/cbox_billing/models/directory_service.rb +472 -0
  284. data/lib/cbox_billing/models/disable_license_key_request.rb +161 -0
  285. data/lib/cbox_billing/models/dispute.rb +471 -0
  286. data/lib/cbox_billing/models/dispute_detail.rb +229 -0
  287. data/lib/cbox_billing/models/dispute_detail_evidence.rb +205 -0
  288. data/lib/cbox_billing/models/dispute_detail_evidence_text.rb +200 -0
  289. data/lib/cbox_billing/models/dispute_detail_pack.rb +193 -0
  290. data/lib/cbox_billing/models/dispute_detail_pack_sections_inner.rb +269 -0
  291. data/lib/cbox_billing/models/dispute_evidence.rb +312 -0
  292. data/lib/cbox_billing/models/dispute_evidence_file.rb +357 -0
  293. data/lib/cbox_billing/models/dispute_evidence_slot.rb +43 -0
  294. data/lib/cbox_billing/models/dispute_refusal.rb +256 -0
  295. data/lib/cbox_billing/models/dispute_status.rb +46 -0
  296. data/lib/cbox_billing/models/download_grant.rb +401 -0
  297. data/lib/cbox_billing/models/dunning_hold.rb +344 -0
  298. data/lib/cbox_billing/models/dunning_state.rb +217 -0
  299. data/lib/cbox_billing/models/dunning_state_invoice.rb +281 -0
  300. data/lib/cbox_billing/models/dunning_state_retry.rb +232 -0
  301. data/lib/cbox_billing/models/e_invoice_refusal.rb +229 -0
  302. data/lib/cbox_billing/models/effective_billing_policy.rb +298 -0
  303. data/lib/cbox_billing/models/effective_entitlement.rb +271 -0
  304. data/lib/cbox_billing/models/effective_usage_threshold.rb +280 -0
  305. data/lib/cbox_billing/models/entitlement.rb +366 -0
  306. data/lib/cbox_billing/models/entitlement_override.rb +557 -0
  307. data/lib/cbox_billing/models/entitlement_override_input.rb +353 -0
  308. data/lib/cbox_billing/models/entitlement_override_result.rb +591 -0
  309. data/lib/cbox_billing/models/entitlement_terms.rb +293 -0
  310. data/lib/cbox_billing/models/entitlements_response.rb +200 -0
  311. data/lib/cbox_billing/models/environment.rb +379 -0
  312. data/lib/cbox_billing/models/error_body.rb +242 -0
  313. data/lib/cbox_billing/models/export_catalog200_response.rb +232 -0
  314. data/lib/cbox_billing/models/extend_invoice_due_date_request.rb +213 -0
  315. data/lib/cbox_billing/models/feature.rb +277 -0
  316. data/lib/cbox_billing/models/feature_check.rb +310 -0
  317. data/lib/cbox_billing/models/feature_set.rb +179 -0
  318. data/lib/cbox_billing/models/feature_value.rb +105 -0
  319. data/lib/cbox_billing/models/first_period.rb +461 -0
  320. data/lib/cbox_billing/models/gateway_intent.rb +254 -0
  321. data/lib/cbox_billing/models/get_accounting_connection200_response.rb +163 -0
  322. data/lib/cbox_billing/models/get_accounting_contact200_response.rb +227 -0
  323. data/lib/cbox_billing/models/get_accounting_contact_sync200_response.rb +229 -0
  324. data/lib/cbox_billing/models/get_accounting_invoice_sync200_response.rb +293 -0
  325. data/lib/cbox_billing/models/get_accounting_invoice_sync200_response_settings.rb +241 -0
  326. data/lib/cbox_billing/models/get_accounting_invoice_sync200_response_sync.rb +318 -0
  327. data/lib/cbox_billing/models/get_accounting_organization200_response.rb +231 -0
  328. data/lib/cbox_billing/models/get_bank_statement200_response.rb +205 -0
  329. data/lib/cbox_billing/models/get_customer_statement200_response.rb +339 -0
  330. data/lib/cbox_billing/models/get_customer_statement200_response_account_credit.rb +169 -0
  331. data/lib/cbox_billing/models/get_customer_statement200_response_activity_inner.rb +334 -0
  332. data/lib/cbox_billing/models/get_customer_statement200_response_balances_inner.rb +229 -0
  333. data/lib/cbox_billing/models/get_customer_statement200_response_subscriptions_inner.rb +281 -0
  334. data/lib/cbox_billing/models/get_customer_statement200_response_subscriptions_inner_next.rb +200 -0
  335. data/lib/cbox_billing/models/get_latest_accounting_contact_import200_response.rb +163 -0
  336. data/lib/cbox_billing/models/get_product_delivery200_response.rb +217 -0
  337. data/lib/cbox_billing/models/get_resource_limits200_response.rb +257 -0
  338. data/lib/cbox_billing/models/get_service_admission_policy200_response.rb +160 -0
  339. data/lib/cbox_billing/models/get_service_registrations200_response.rb +179 -0
  340. data/lib/cbox_billing/models/get_service_registrations200_response_data_inner.rb +190 -0
  341. data/lib/cbox_billing/models/get_service_registrations_request.rb +284 -0
  342. data/lib/cbox_billing/models/grandfathered_subscriber.rb +356 -0
  343. data/lib/cbox_billing/models/grandfathered_subscriber_contract_cap.rb +230 -0
  344. data/lib/cbox_billing/models/guest_waitlist_input.rb +271 -0
  345. data/lib/cbox_billing/models/hold_invoice_dunning_request.rb +249 -0
  346. data/lib/cbox_billing/models/hold_invoice_for_review200_response.rb +177 -0
  347. data/lib/cbox_billing/models/hosted_session.rb +204 -0
  348. data/lib/cbox_billing/models/import_bank_statement201_response.rb +203 -0
  349. data/lib/cbox_billing/models/inline_object.rb +227 -0
  350. data/lib/cbox_billing/models/inline_object1.rb +255 -0
  351. data/lib/cbox_billing/models/inline_object2.rb +255 -0
  352. data/lib/cbox_billing/models/invoice.rb +523 -0
  353. data/lib/cbox_billing/models/invoice_balance.rb +281 -0
  354. data/lib/cbox_billing/models/invoice_detail.rb +655 -0
  355. data/lib/cbox_billing/models/invoice_draft.rb +452 -0
  356. data/lib/cbox_billing/models/invoice_draft_lines_inner.rb +199 -0
  357. data/lib/cbox_billing/models/invoice_item.rb +354 -0
  358. data/lib/cbox_billing/models/invoice_line.rb +295 -0
  359. data/lib/cbox_billing/models/invoice_list.rb +226 -0
  360. data/lib/cbox_billing/models/invoice_payment.rb +292 -0
  361. data/lib/cbox_billing/models/invoice_payment_result.rb +203 -0
  362. data/lib/cbox_billing/models/join_service_waitlist200_response.rb +163 -0
  363. data/lib/cbox_billing/models/join_service_waitlist_as_guest200_response.rb +194 -0
  364. data/lib/cbox_billing/models/join_service_waitlist_request.rb +378 -0
  365. data/lib/cbox_billing/models/keep_accounting_contact200_response.rb +231 -0
  366. data/lib/cbox_billing/models/keep_accounting_contact_request.rb +186 -0
  367. data/lib/cbox_billing/models/lease.rb +266 -0
  368. data/lib/cbox_billing/models/lease_request.rb +341 -0
  369. data/lib/cbox_billing/models/leave_feature_waitlist200_response.rb +201 -0
  370. data/lib/cbox_billing/models/leave_feature_waitlist_request.rb +249 -0
  371. data/lib/cbox_billing/models/licence_period_document.rb +408 -0
  372. data/lib/cbox_billing/models/licence_period_document_usage_measures_inner.rb +170 -0
  373. data/lib/cbox_billing/models/licence_period_list.rb +230 -0
  374. data/lib/cbox_billing/models/licence_period_summary.rb +344 -0
  375. data/lib/cbox_billing/models/licence_reportable.rb +204 -0
  376. data/lib/cbox_billing/models/licence_row_list.rb +244 -0
  377. data/lib/cbox_billing/models/licence_seat_count.rb +355 -0
  378. data/lib/cbox_billing/models/licence_seat_ledger_entry.rb +578 -0
  379. data/lib/cbox_billing/models/licence_seat_ledger_list.rb +217 -0
  380. data/lib/cbox_billing/models/licence_seat_snapshot_list.rb +243 -0
  381. data/lib/cbox_billing/models/license.rb +407 -0
  382. data/lib/cbox_billing/models/license_issue_request.rb +232 -0
  383. data/lib/cbox_billing/models/license_key.rb +503 -0
  384. data/lib/cbox_billing/models/license_key_detail.rb +537 -0
  385. data/lib/cbox_billing/models/license_key_detail_all_of_instances.rb +277 -0
  386. data/lib/cbox_billing/models/license_renew_request.rb +160 -0
  387. data/lib/cbox_billing/models/license_revoke_request.rb +160 -0
  388. data/lib/cbox_billing/models/license_revoke_result.rb +227 -0
  389. data/lib/cbox_billing/models/limit_increase_decision.rb +368 -0
  390. data/lib/cbox_billing/models/limit_increase_input.rb +300 -0
  391. data/lib/cbox_billing/models/limit_increase_request.rb +516 -0
  392. data/lib/cbox_billing/models/link_accounting_contact200_response.rb +177 -0
  393. data/lib/cbox_billing/models/link_accounting_contact_request.rb +187 -0
  394. data/lib/cbox_billing/models/list_access_programs200_response.rb +252 -0
  395. data/lib/cbox_billing/models/list_accounting_contact_duplicates200_response.rb +205 -0
  396. data/lib/cbox_billing/models/list_accounting_contact_duplicates200_response_duplicates_inner.rb +205 -0
  397. data/lib/cbox_billing/models/list_accounting_contact_duplicates200_response_duplicates_inner_organizations_inner.rb +203 -0
  398. data/lib/cbox_billing/models/list_accounting_contact_import_rows200_response.rb +192 -0
  399. data/lib/cbox_billing/models/list_accounting_contact_sync_failures200_response.rb +217 -0
  400. data/lib/cbox_billing/models/list_accounting_contacts200_response.rb +282 -0
  401. data/lib/cbox_billing/models/list_accounting_organization_invoices200_response.rb +191 -0
  402. data/lib/cbox_billing/models/list_accounting_syncs200_response.rb +179 -0
  403. data/lib/cbox_billing/models/list_affiliate_commissions200_response.rb +226 -0
  404. data/lib/cbox_billing/models/list_affiliate_payout_runs200_response.rb +226 -0
  405. data/lib/cbox_billing/models/list_affiliate_payouts200_response.rb +226 -0
  406. data/lib/cbox_billing/models/list_affiliate_programs200_response.rb +226 -0
  407. data/lib/cbox_billing/models/list_affiliates200_response.rb +226 -0
  408. data/lib/cbox_billing/models/list_agreements200_response.rb +179 -0
  409. data/lib/cbox_billing/models/list_all_invoices400_response.rb +177 -0
  410. data/lib/cbox_billing/models/list_bank_lines200_response.rb +215 -0
  411. data/lib/cbox_billing/models/list_bank_statements200_response.rb +215 -0
  412. data/lib/cbox_billing/models/list_connected_financial_events200_response.rb +292 -0
  413. data/lib/cbox_billing/models/list_connected_production_environments200_response.rb +205 -0
  414. data/lib/cbox_billing/models/list_connected_production_environments200_response_data_inner.rb +203 -0
  415. data/lib/cbox_billing/models/list_customer_dunning_holds200_response.rb +179 -0
  416. data/lib/cbox_billing/models/list_disputes200_response.rb +217 -0
  417. data/lib/cbox_billing/models/list_download_grants200_response.rb +226 -0
  418. data/lib/cbox_billing/models/list_entitlement_overrides200_response.rb +207 -0
  419. data/lib/cbox_billing/models/list_environments200_response.rb +162 -0
  420. data/lib/cbox_billing/models/list_financial_events200_response.rb +240 -0
  421. data/lib/cbox_billing/models/list_financial_events200_response_data_inner.rb +342 -0
  422. data/lib/cbox_billing/models/list_financial_events200_response_data_inner_data.rb +408 -0
  423. data/lib/cbox_billing/models/list_grandfathered_subscribers200_response.rb +244 -0
  424. data/lib/cbox_billing/models/list_invoice_drafts200_response.rb +215 -0
  425. data/lib/cbox_billing/models/list_invoice_items200_response.rb +179 -0
  426. data/lib/cbox_billing/models/list_invoice_payments200_response.rb +205 -0
  427. data/lib/cbox_billing/models/list_license_keys200_response.rb +226 -0
  428. data/lib/cbox_billing/models/list_limit_increase_requests200_response.rb +231 -0
  429. data/lib/cbox_billing/models/list_one_off_products200_response.rb +179 -0
  430. data/lib/cbox_billing/models/list_orders200_response.rb +226 -0
  431. data/lib/cbox_billing/models/list_organization_purchases200_response.rb +205 -0
  432. data/lib/cbox_billing/models/list_organization_subscriptions200_response.rb +179 -0
  433. data/lib/cbox_billing/models/list_overage_caps200_response.rb +179 -0
  434. data/lib/cbox_billing/models/list_plan_moves200_response.rb +179 -0
  435. data/lib/cbox_billing/models/list_private_plans200_response.rb +179 -0
  436. data/lib/cbox_billing/models/list_product_files200_response.rb +179 -0
  437. data/lib/cbox_billing/models/list_scheduled_catalog_changes200_response.rb +179 -0
  438. data/lib/cbox_billing/models/list_service_directory200_response.rb +249 -0
  439. data/lib/cbox_billing/models/list_signed_agreements200_response.rb +226 -0
  440. data/lib/cbox_billing/models/list_spend_alerts200_response.rb +218 -0
  441. data/lib/cbox_billing/models/list_spend_alerts200_response_spend.rb +222 -0
  442. data/lib/cbox_billing/models/list_subscription_date_moves200_response.rb +179 -0
  443. data/lib/cbox_billing/models/list_subscription_schedule200_response.rb +179 -0
  444. data/lib/cbox_billing/models/list_tax_return_lines200_response.rb +215 -0
  445. data/lib/cbox_billing/models/list_tax_returns200_response.rb +215 -0
  446. data/lib/cbox_billing/models/list_unmatched_accounting_invoices200_response.rb +192 -0
  447. data/lib/cbox_billing/models/lock_subscription_price_request.rb +162 -0
  448. data/lib/cbox_billing/models/mark_affiliate_payout_paid_request.rb +176 -0
  449. data/lib/cbox_billing/models/mark_invoice_paid_request.rb +176 -0
  450. data/lib/cbox_billing/models/match_bank_line_request.rb +197 -0
  451. data/lib/cbox_billing/models/match_bank_line_request_allocations_inner.rb +221 -0
  452. data/lib/cbox_billing/models/meter.rb +524 -0
  453. data/lib/cbox_billing/models/meter_detail.rb +587 -0
  454. data/lib/cbox_billing/models/meter_detail_all_of_entitlements.rb +260 -0
  455. data/lib/cbox_billing/models/meter_list.rb +226 -0
  456. data/lib/cbox_billing/models/meter_request.rb +463 -0
  457. data/lib/cbox_billing/models/meter_request_resets.rb +237 -0
  458. data/lib/cbox_billing/models/meter_resets.rb +279 -0
  459. data/lib/cbox_billing/models/meter_staged.rb +309 -0
  460. data/lib/cbox_billing/models/meter_staged_changeset.rb +265 -0
  461. data/lib/cbox_billing/models/money.rb +222 -0
  462. data/lib/cbox_billing/models/money_amount.rb +203 -0
  463. data/lib/cbox_billing/models/move_affiliate_referral_request.rb +213 -0
  464. data/lib/cbox_billing/models/move_affiliate_request.rb +188 -0
  465. data/lib/cbox_billing/models/negotiated_price.rb +277 -0
  466. data/lib/cbox_billing/models/new_auto_top_up.rb +277 -0
  467. data/lib/cbox_billing/models/new_credit_purchase.rb +271 -0
  468. data/lib/cbox_billing/models/new_invoice.rb +264 -0
  469. data/lib/cbox_billing/models/new_invoice_line.rb +295 -0
  470. data/lib/cbox_billing/models/ok.rb +201 -0
  471. data/lib/cbox_billing/models/one_off_product.rb +359 -0
  472. data/lib/cbox_billing/models/one_off_purchase.rb +396 -0
  473. data/lib/cbox_billing/models/one_off_purchase_items_inner.rb +255 -0
  474. data/lib/cbox_billing/models/one_off_quote.rb +527 -0
  475. data/lib/cbox_billing/models/one_off_quote_organization.rb +177 -0
  476. data/lib/cbox_billing/models/one_off_quote_request.rb +324 -0
  477. data/lib/cbox_billing/models/order.rb +573 -0
  478. data/lib/cbox_billing/models/order_items_inner.rb +311 -0
  479. data/lib/cbox_billing/models/organization.rb +545 -0
  480. data/lib/cbox_billing/models/organization_accounting_contact.rb +255 -0
  481. data/lib/cbox_billing/models/organization_bundles.rb +310 -0
  482. data/lib/cbox_billing/models/organization_bundles_active_inner.rb +242 -0
  483. data/lib/cbox_billing/models/organization_response.rb +177 -0
  484. data/lib/cbox_billing/models/organization_upsert_request.rb +666 -0
  485. data/lib/cbox_billing/models/overage_cap.rb +105 -0
  486. data/lib/cbox_billing/models/overage_cap_binding.rb +263 -0
  487. data/lib/cbox_billing/models/overage_cap_one_of.rb +186 -0
  488. data/lib/cbox_billing/models/overage_cap_one_of1.rb +231 -0
  489. data/lib/cbox_billing/models/overage_cap_state.rb +380 -0
  490. data/lib/cbox_billing/models/page.rb +192 -0
  491. data/lib/cbox_billing/models/payment_gateway_failover.rb +233 -0
  492. data/lib/cbox_billing/models/payment_gateway_failover_failovers_inner.rb +348 -0
  493. data/lib/cbox_billing/models/payment_gateway_failover_failovers_inner_hops_inner.rb +190 -0
  494. data/lib/cbox_billing/models/payment_gateway_failover_gateways_inner.rb +230 -0
  495. data/lib/cbox_billing/models/payment_gateway_failover_gateways_inner_circuit.rb +288 -0
  496. data/lib/cbox_billing/models/payment_gateway_failover_routing.rb +235 -0
  497. data/lib/cbox_billing/models/payment_intent_request.rb +254 -0
  498. data/lib/cbox_billing/models/payment_mandate.rb +253 -0
  499. data/lib/cbox_billing/models/payment_method.rb +374 -0
  500. data/lib/cbox_billing/models/payment_method_id_request.rb +177 -0
  501. data/lib/cbox_billing/models/payment_method_list.rb +226 -0
  502. data/lib/cbox_billing/models/payment_method_set.rb +180 -0
  503. data/lib/cbox_billing/models/payment_terms.rb +281 -0
  504. data/lib/cbox_billing/models/payment_terms_request.rb +235 -0
  505. data/lib/cbox_billing/models/pending_approval.rb +229 -0
  506. data/lib/cbox_billing/models/pending_price_change.rb +257 -0
  507. data/lib/cbox_billing/models/per_value_entitlements.rb +206 -0
  508. data/lib/cbox_billing/models/per_value_entitlements_values_value.rb +263 -0
  509. data/lib/cbox_billing/models/plan.rb +425 -0
  510. data/lib/cbox_billing/models/plan_change_input.rb +224 -0
  511. data/lib/cbox_billing/models/plan_change_preview.rb +478 -0
  512. data/lib/cbox_billing/models/plan_change_preview_seat_types_inner.rb +356 -0
  513. data/lib/cbox_billing/models/plan_change_price_options.rb +280 -0
  514. data/lib/cbox_billing/models/plan_change_price_options_keep_negotiated.rb +230 -0
  515. data/lib/cbox_billing/models/plan_change_request.rb +256 -0
  516. data/lib/cbox_billing/models/plan_change_result.rb +543 -0
  517. data/lib/cbox_billing/models/plan_features_value.rb +105 -0
  518. data/lib/cbox_billing/models/plan_list.rb +253 -0
  519. data/lib/cbox_billing/models/plan_meter_entitlement.rb +250 -0
  520. data/lib/cbox_billing/models/plan_move.rb +386 -0
  521. data/lib/cbox_billing/models/plan_move_subscribers.rb +188 -0
  522. data/lib/cbox_billing/models/plan_price.rb +256 -0
  523. data/lib/cbox_billing/models/plan_prices_inner.rb +241 -0
  524. data/lib/cbox_billing/models/plane_invoice_list.rb +226 -0
  525. data/lib/cbox_billing/models/plane_invoice_list_all_of_data.rb +557 -0
  526. data/lib/cbox_billing/models/portal_session_request.rb +309 -0
  527. data/lib/cbox_billing/models/prepare_tax_return200_response.rb +177 -0
  528. data/lib/cbox_billing/models/prepare_tax_return_request.rb +237 -0
  529. data/lib/cbox_billing/models/preview_renewal_alignment_request.rb +201 -0
  530. data/lib/cbox_billing/models/preview_service_invitation200_response.rb +161 -0
  531. data/lib/cbox_billing/models/preview_service_invitation200_response_invitation.rb +189 -0
  532. data/lib/cbox_billing/models/preview_service_invitation_request.rb +186 -0
  533. data/lib/cbox_billing/models/preview_subscription_cancel_request.rb +216 -0
  534. data/lib/cbox_billing/models/preview_subscription_coupon200_response.rb +205 -0
  535. data/lib/cbox_billing/models/preview_subscription_coupon_request.rb +186 -0
  536. data/lib/cbox_billing/models/price_lock.rb +215 -0
  537. data/lib/cbox_billing/models/price_lock_state.rb +190 -0
  538. data/lib/cbox_billing/models/price_tax.rb +348 -0
  539. data/lib/cbox_billing/models/private_plan.rb +380 -0
  540. data/lib/cbox_billing/models/product_definition_manifest.rb +269 -0
  541. data/lib/cbox_billing/models/product_definition_manifest_features_inner.rb +333 -0
  542. data/lib/cbox_billing/models/product_definition_manifest_meters_inner.rb +434 -0
  543. data/lib/cbox_billing/models/product_file.rb +420 -0
  544. data/lib/cbox_billing/models/proration_line.rb +203 -0
  545. data/lib/cbox_billing/models/quantity_preview.rb +321 -0
  546. data/lib/cbox_billing/models/quantity_request.rb +196 -0
  547. data/lib/cbox_billing/models/quote.rb +700 -0
  548. data/lib/cbox_billing/models/quote_all_of_acceptance.rb +206 -0
  549. data/lib/cbox_billing/models/quote_all_of_approval.rb +201 -0
  550. data/lib/cbox_billing/models/quote_all_of_grants.rb +205 -0
  551. data/lib/cbox_billing/models/quote_all_of_lines.rb +284 -0
  552. data/lib/cbox_billing/models/quote_all_of_terms.rb +285 -0
  553. data/lib/cbox_billing/models/quote_all_of_terms_ramp.rb +169 -0
  554. data/lib/cbox_billing/models/quote_all_of_totals.rb +255 -0
  555. data/lib/cbox_billing/models/quote_all_of_totals_lines.rb +223 -0
  556. data/lib/cbox_billing/models/quote_line_grants.rb +212 -0
  557. data/lib/cbox_billing/models/quote_line_grants_features_inner.rb +204 -0
  558. data/lib/cbox_billing/models/quote_line_grants_meters_inner.rb +260 -0
  559. data/lib/cbox_billing/models/quote_line_request.rb +368 -0
  560. data/lib/cbox_billing/models/quote_list.rb +226 -0
  561. data/lib/cbox_billing/models/quote_request.rb +650 -0
  562. data/lib/cbox_billing/models/quote_request_ramp_inner.rb +221 -0
  563. data/lib/cbox_billing/models/quote_signer.rb +434 -0
  564. data/lib/cbox_billing/models/quote_signer_request.rb +247 -0
  565. data/lib/cbox_billing/models/quote_signer_signature.rb +296 -0
  566. data/lib/cbox_billing/models/quote_signing.rb +384 -0
  567. data/lib/cbox_billing/models/quote_signing_request.rb +278 -0
  568. data/lib/cbox_billing/models/quote_signing_signed_document.rb +240 -0
  569. data/lib/cbox_billing/models/quote_summary.rb +440 -0
  570. data/lib/cbox_billing/models/rate_limit_error_body.rb +177 -0
  571. data/lib/cbox_billing/models/reconcile_id_signals_inclusion200_response.rb +211 -0
  572. data/lib/cbox_billing/models/reconcile_id_signals_inclusion_request.rb +162 -0
  573. data/lib/cbox_billing/models/record_invoice_payment_request.rb +223 -0
  574. data/lib/cbox_billing/models/recurring_price.rb +230 -0
  575. data/lib/cbox_billing/models/refund.rb +493 -0
  576. data/lib/cbox_billing/models/refund_list.rb +179 -0
  577. data/lib/cbox_billing/models/refund_order_request.rb +223 -0
  578. data/lib/cbox_billing/models/refund_request.rb +227 -0
  579. data/lib/cbox_billing/models/refund_result.rb +239 -0
  580. data/lib/cbox_billing/models/refusal.rb +205 -0
  581. data/lib/cbox_billing/models/release_invoice_from_review200_response.rb +205 -0
  582. data/lib/cbox_billing/models/remove_billing_parent_request.rb +186 -0
  583. data/lib/cbox_billing/models/remove_subscription_coupon200_response.rb +177 -0
  584. data/lib/cbox_billing/models/remove_subscription_coupon_request.rb +177 -0
  585. data/lib/cbox_billing/models/reserve_outcome.rb +251 -0
  586. data/lib/cbox_billing/models/reserve_request.rb +225 -0
  587. data/lib/cbox_billing/models/reserve_request_meters_inner.rb +212 -0
  588. data/lib/cbox_billing/models/reset_environment200_response.rb +187 -0
  589. data/lib/cbox_billing/models/reset_environment_request.rb +162 -0
  590. data/lib/cbox_billing/models/reset_period.rb +247 -0
  591. data/lib/cbox_billing/models/resource_limit.rb +392 -0
  592. data/lib/cbox_billing/models/retry_accounting_sync202_response.rb +177 -0
  593. data/lib/cbox_billing/models/retry_invoice_dunning_request.rb +176 -0
  594. data/lib/cbox_billing/models/reverse_invoice_payment_request.rb +186 -0
  595. data/lib/cbox_billing/models/revoke_limit_increase_request.rb +195 -0
  596. data/lib/cbox_billing/models/schedule_phase.rb +486 -0
  597. data/lib/cbox_billing/models/schedule_phase_request.rb +396 -0
  598. data/lib/cbox_billing/models/schedule_plan_move_request.rb +231 -0
  599. data/lib/cbox_billing/models/scheduled_catalog_change.rb +331 -0
  600. data/lib/cbox_billing/models/scheduled_catalog_change_existing.rb +215 -0
  601. data/lib/cbox_billing/models/seat_breakdown.rb +404 -0
  602. data/lib/cbox_billing/models/seat_entitlement.rb +267 -0
  603. data/lib/cbox_billing/models/seat_ledger_entry.rb +440 -0
  604. data/lib/cbox_billing/models/seat_ledger_page.rb +205 -0
  605. data/lib/cbox_billing/models/seat_ledger_page_meta.rb +255 -0
  606. data/lib/cbox_billing/models/seat_reassign_request.rb +187 -0
  607. data/lib/cbox_billing/models/seat_subject_request.rb +178 -0
  608. data/lib/cbox_billing/models/seat_type_change.rb +384 -0
  609. data/lib/cbox_billing/models/seat_type_entitlement.rb +269 -0
  610. data/lib/cbox_billing/models/seat_type_quantity_request.rb +205 -0
  611. data/lib/cbox_billing/models/seat_type_response.rb +177 -0
  612. data/lib/cbox_billing/models/seat_type_state.rb +565 -0
  613. data/lib/cbox_billing/models/seat_type_state_holders_inner.rb +189 -0
  614. data/lib/cbox_billing/models/seats_set_request.rb +186 -0
  615. data/lib/cbox_billing/models/service_admission_identity.rb +237 -0
  616. data/lib/cbox_billing/models/service_admission_input.rb +388 -0
  617. data/lib/cbox_billing/models/set_backup_card_consent200_response.rb +189 -0
  618. data/lib/cbox_billing/models/set_backup_card_consent_request.rb +177 -0
  619. data/lib/cbox_billing/models/set_billing_parent409_response.rb +227 -0
  620. data/lib/cbox_billing/models/set_billing_parent_request.rb +212 -0
  621. data/lib/cbox_billing/models/set_customer_contract_request.rb +197 -0
  622. data/lib/cbox_billing/models/set_invoice_consolidation_request.rb +177 -0
  623. data/lib/cbox_billing/models/set_overage_cap422_response.rb +227 -0
  624. data/lib/cbox_billing/models/set_product_delivery_request.rb +342 -0
  625. data/lib/cbox_billing/models/set_subscription_purchase_order200_response.rb +189 -0
  626. data/lib/cbox_billing/models/set_subscription_purchase_order_request.rb +176 -0
  627. data/lib/cbox_billing/models/setup_intent.rb +302 -0
  628. data/lib/cbox_billing/models/setup_intent_request.rb +177 -0
  629. data/lib/cbox_billing/models/show_environment200_response.rb +160 -0
  630. data/lib/cbox_billing/models/signals_source200_response.rb +214 -0
  631. data/lib/cbox_billing/models/signals_source200_response_meta.rb +471 -0
  632. data/lib/cbox_billing/models/signals_source_erasures200_response.rb +214 -0
  633. data/lib/cbox_billing/models/signals_source_erasures200_response_meta.rb +329 -0
  634. data/lib/cbox_billing/models/signed_agreement.rb +498 -0
  635. data/lib/cbox_billing/models/signed_agreement_document.rb +252 -0
  636. data/lib/cbox_billing/models/skip_accounting_contact_import_rows200_response.rb +177 -0
  637. data/lib/cbox_billing/models/skip_accounting_contact_import_rows_request.rb +188 -0
  638. data/lib/cbox_billing/models/skip_invoice_dunning_step_request.rb +186 -0
  639. data/lib/cbox_billing/models/spend_alert.rb +395 -0
  640. data/lib/cbox_billing/models/start_accounting_contact_import202_response.rb +177 -0
  641. data/lib/cbox_billing/models/stop_invoice_dunning_request.rb +247 -0
  642. data/lib/cbox_billing/models/submit_dispute_evidence_request.rb +178 -0
  643. data/lib/cbox_billing/models/subscribe_request.rb +373 -0
  644. data/lib/cbox_billing/models/subscribe_result.rb +215 -0
  645. data/lib/cbox_billing/models/subscription.rb +617 -0
  646. data/lib/cbox_billing/models/subscription_bundle.rb +200 -0
  647. data/lib/cbox_billing/models/subscription_change.rb +505 -0
  648. data/lib/cbox_billing/models/subscription_change_list.rb +226 -0
  649. data/lib/cbox_billing/models/subscription_contract.rb +188 -0
  650. data/lib/cbox_billing/models/subscription_contract_term.rb +385 -0
  651. data/lib/cbox_billing/models/subscription_date_move.rb +295 -0
  652. data/lib/cbox_billing/models/subscription_discount.rb +315 -0
  653. data/lib/cbox_billing/models/subscription_pending_change.rb +171 -0
  654. data/lib/cbox_billing/models/subscription_standing.rb +230 -0
  655. data/lib/cbox_billing/models/subscription_terms.rb +459 -0
  656. data/lib/cbox_billing/models/subscription_terms_price.rb +178 -0
  657. data/lib/cbox_billing/models/sync_product_definitions200_response.rb +179 -0
  658. data/lib/cbox_billing/models/sync_product_definitions200_response_data_inner.rb +335 -0
  659. data/lib/cbox_billing/models/tax_return.rb +663 -0
  660. data/lib/cbox_billing/models/tax_return_boxes_inner.rb +307 -0
  661. data/lib/cbox_billing/models/tax_return_corrections_inner.rb +178 -0
  662. data/lib/cbox_billing/models/tax_return_issues_inner.rb +227 -0
  663. data/lib/cbox_billing/models/tax_return_line.rb +550 -0
  664. data/lib/cbox_billing/models/tax_return_line_document.rb +214 -0
  665. data/lib/cbox_billing/models/tax_return_line_fx.rb +212 -0
  666. data/lib/cbox_billing/models/tax_return_member_states_inner.rb +250 -0
  667. data/lib/cbox_billing/models/tax_return_not_from_billing_inner.rb +229 -0
  668. data/lib/cbox_billing/models/test_clock_advance_request.rb +178 -0
  669. data/lib/cbox_billing/models/test_clock_advance_result.rb +334 -0
  670. data/lib/cbox_billing/models/test_clock_advance_result_clock.rb +230 -0
  671. data/lib/cbox_billing/models/upcoming_invoice.rb +440 -0
  672. data/lib/cbox_billing/models/upcoming_invoice_first_period.rb +251 -0
  673. data/lib/cbox_billing/models/upcoming_invoice_interim.rb +245 -0
  674. data/lib/cbox_billing/models/upcoming_invoice_interim_invoices_inner.rb +286 -0
  675. data/lib/cbox_billing/models/upcoming_invoice_interim_reconciliation.rb +270 -0
  676. data/lib/cbox_billing/models/upcoming_invoice_interim_reconciliation_credit_notes_inner.rb +282 -0
  677. data/lib/cbox_billing/models/upcoming_invoice_lines_inner.rb +282 -0
  678. data/lib/cbox_billing/models/update_affiliate_program_request.rb +398 -0
  679. data/lib/cbox_billing/models/update_affiliate_request.rb +321 -0
  680. data/lib/cbox_billing/models/update_dispute_evidence_request.rb +177 -0
  681. data/lib/cbox_billing/models/update_dispute_evidence_request_evidence.rb +251 -0
  682. data/lib/cbox_billing/models/update_entitlement_override_request.rb +309 -0
  683. data/lib/cbox_billing/models/update_invoice_draft_request.rb +214 -0
  684. data/lib/cbox_billing/models/update_invoice_draft_request_lines_inner.rb +224 -0
  685. data/lib/cbox_billing/models/update_license_key_request.rb +186 -0
  686. data/lib/cbox_billing/models/update_payment_gateway_routing_request.rb +234 -0
  687. data/lib/cbox_billing/models/update_product_file_request.rb +208 -0
  688. data/lib/cbox_billing/models/update_spend_alert_request.rb +296 -0
  689. data/lib/cbox_billing/models/upgrade_offer.rb +189 -0
  690. data/lib/cbox_billing/models/usage_correction.rb +471 -0
  691. data/lib/cbox_billing/models/usage_correction_actor.rb +211 -0
  692. data/lib/cbox_billing/models/usage_correction_adjustment.rb +411 -0
  693. data/lib/cbox_billing/models/usage_correction_list.rb +226 -0
  694. data/lib/cbox_billing/models/usage_correction_list_all_of_data.rb +506 -0
  695. data/lib/cbox_billing/models/usage_corrections_request.rb +246 -0
  696. data/lib/cbox_billing/models/usage_corrections_request_corrections_inner.rb +413 -0
  697. data/lib/cbox_billing/models/usage_corrections_result.rb +395 -0
  698. data/lib/cbox_billing/models/usage_corrections_result_rejected_inner.rb +262 -0
  699. data/lib/cbox_billing/models/usage_event_values.rb +252 -0
  700. data/lib/cbox_billing/models/usage_events_request.rb +234 -0
  701. data/lib/cbox_billing/models/usage_events_request_events_inner.rb +385 -0
  702. data/lib/cbox_billing/models/usage_events_request_events_inner_dimensions_value.rb +104 -0
  703. data/lib/cbox_billing/models/usage_events_result.rb +301 -0
  704. data/lib/cbox_billing/models/usage_events_result_rejected_inner.rb +263 -0
  705. data/lib/cbox_billing/models/usage_ingest_request.rb +225 -0
  706. data/lib/cbox_billing/models/usage_ingest_request_entries_inner.rb +290 -0
  707. data/lib/cbox_billing/models/usage_ingest_result.rb +374 -0
  708. data/lib/cbox_billing/models/usage_ingest_result_unsupported_meters_inner.rb +203 -0
  709. data/lib/cbox_billing/models/usage_price.rb +258 -0
  710. data/lib/cbox_billing/models/usage_summary.rb +205 -0
  711. data/lib/cbox_billing/models/usage_summary_meters_value.rb +289 -0
  712. data/lib/cbox_billing/models/usage_summary_meters_value_breakdown_inner.rb +205 -0
  713. data/lib/cbox_billing/models/usage_summary_period.rb +247 -0
  714. data/lib/cbox_billing/models/usage_threshold.rb +275 -0
  715. data/lib/cbox_billing/models/usage_threshold_level.rb +217 -0
  716. data/lib/cbox_billing/models/usage_threshold_request.rb +248 -0
  717. data/lib/cbox_billing/models/usage_threshold_subscriptions_inner.rb +201 -0
  718. data/lib/cbox_billing/models/validation_error_body.rb +206 -0
  719. data/lib/cbox_billing/models/value_rule.rb +291 -0
  720. data/lib/cbox_billing/models/value_rules.rb +235 -0
  721. data/lib/cbox_billing/models/waitlist_answer.rb +105 -0
  722. data/lib/cbox_billing/models/waitlist_question.rb +411 -0
  723. data/lib/cbox_billing/models/webhook_delivery.rb +435 -0
  724. data/lib/cbox_billing/models/webhook_delivery_list.rb +226 -0
  725. data/lib/cbox_billing/models/webhook_endpoint.rb +347 -0
  726. data/lib/cbox_billing/models/webhook_endpoint_list.rb +226 -0
  727. data/lib/cbox_billing/models/webhook_endpoint_request.rb +270 -0
  728. data/lib/cbox_billing/models/webhook_endpoint_with_secret.rb +367 -0
  729. data/lib/cbox_billing/models/withdraw_agreement_request.rb +220 -0
  730. data/lib/cbox_billing/models/withdraw_agreement_request_user.rb +177 -0
  731. data/lib/cbox_billing/pagination.rb +28 -0
  732. data/lib/cbox_billing/retry.rb +96 -0
  733. data/lib/cbox_billing/version.rb +15 -0
  734. data/lib/cbox_billing/webhook.rb +77 -0
  735. data/lib/cbox_billing.rb +765 -0
  736. metadata +824 -0
@@ -0,0 +1,1893 @@
1
+ =begin
2
+ #Cbox Billing API
3
+
4
+ #The HTTP API of Cbox Billing. Reference: https://github.com/cboxdk/cbox-billing/tree/main/docs/api
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module CboxBilling
16
+ class AccountingApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Settle an imported contact by naming its customer
23
+ # Links `organization` to this row's contact: one of the row's candidates, or any organization in the plane. This is how an ambiguous row is settled, and how you choose which link wins. **Operator token only.**
24
+ # @param import [String] The import's public id (`cimp_`).
25
+ # @param row [String] The row's public id (`cirw_`).
26
+ # @param keep_accounting_contact_request [KeepAccountingContactRequest]
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [ChooseAccountingContactImportRow200Response]
29
+ def choose_accounting_contact_import_row(import, row, keep_accounting_contact_request, opts = {})
30
+ data, _status_code, _headers = choose_accounting_contact_import_row_with_http_info(import, row, keep_accounting_contact_request, opts)
31
+ data
32
+ end
33
+
34
+ # Settle an imported contact by naming its customer
35
+ # Links `organization` to this row's contact: one of the row's candidates, or any organization in the plane. This is how an ambiguous row is settled, and how you choose which link wins. **Operator token only.**
36
+ # @param import [String] The import's public id (`cimp_`).
37
+ # @param row [String] The row's public id (`cirw_`).
38
+ # @param keep_accounting_contact_request [KeepAccountingContactRequest]
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [Array<(ChooseAccountingContactImportRow200Response, Integer, Hash)>] ChooseAccountingContactImportRow200Response data, response status code and response headers
41
+ def choose_accounting_contact_import_row_with_http_info(import, row, keep_accounting_contact_request, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: AccountingApi.choose_accounting_contact_import_row ...'
44
+ end
45
+ # verify the required parameter 'import' is set
46
+ if @api_client.config.client_side_validation && import.nil?
47
+ fail ArgumentError, "Missing the required parameter 'import' when calling AccountingApi.choose_accounting_contact_import_row"
48
+ end
49
+ # verify the required parameter 'row' is set
50
+ if @api_client.config.client_side_validation && row.nil?
51
+ fail ArgumentError, "Missing the required parameter 'row' when calling AccountingApi.choose_accounting_contact_import_row"
52
+ end
53
+ # verify the required parameter 'keep_accounting_contact_request' is set
54
+ if @api_client.config.client_side_validation && keep_accounting_contact_request.nil?
55
+ fail ArgumentError, "Missing the required parameter 'keep_accounting_contact_request' when calling AccountingApi.choose_accounting_contact_import_row"
56
+ end
57
+ # resource path
58
+ local_var_path = '/accounting/contact-imports/{import}/rows/{row}/choose'.sub('{import}', CGI.escape(import.to_s)).sub('{row}', CGI.escape(row.to_s))
59
+
60
+ # query parameters
61
+ query_params = opts[:query_params] || {}
62
+
63
+ # header parameters
64
+ header_params = opts[:header_params] || {}
65
+ # HTTP header 'Accept' (if needed)
66
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
67
+ # HTTP header 'Content-Type'
68
+ content_type = @api_client.select_header_content_type(['application/json'])
69
+ if !content_type.nil?
70
+ header_params['Content-Type'] = content_type
71
+ end
72
+
73
+ # form parameters
74
+ form_params = opts[:form_params] || {}
75
+
76
+ # http body (model)
77
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(keep_accounting_contact_request)
78
+
79
+ # return_type
80
+ return_type = opts[:debug_return_type] || 'ChooseAccountingContactImportRow200Response'
81
+
82
+ # auth_names
83
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
84
+
85
+ new_options = opts.merge(
86
+ :operation => :"AccountingApi.choose_accounting_contact_import_row",
87
+ :header_params => header_params,
88
+ :query_params => query_params,
89
+ :form_params => form_params,
90
+ :body => post_body,
91
+ :auth_names => auth_names,
92
+ :return_type => return_type
93
+ )
94
+
95
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
96
+ if @api_client.config.debugging
97
+ @api_client.config.logger.debug "API called: AccountingApi#choose_accounting_contact_import_row\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
98
+ end
99
+ return data, status_code, headers
100
+ end
101
+
102
+ # Confirm matched contacts, which writes the links
103
+ # Links each named `matched` row's organization to its contact; any other row is passed over, and a row already confirmed is not linked twice. `all: true` confirms every open match in the background (202). A link affects what syncs from now on only. **Operator token only.**
104
+ # @param import [String] The import&#39;s public id (&#x60;cimp_&#x60;).
105
+ # @param confirm_accounting_contact_import_request [ConfirmAccountingContactImportRequest]
106
+ # @param [Hash] opts the optional parameters
107
+ # @return [ConfirmAccountingContactImport200Response]
108
+ def confirm_accounting_contact_import(import, confirm_accounting_contact_import_request, opts = {})
109
+ data, _status_code, _headers = confirm_accounting_contact_import_with_http_info(import, confirm_accounting_contact_import_request, opts)
110
+ data
111
+ end
112
+
113
+ # Confirm matched contacts, which writes the links
114
+ # Links each named &#x60;matched&#x60; row&#39;s organization to its contact; any other row is passed over, and a row already confirmed is not linked twice. &#x60;all: true&#x60; confirms every open match in the background (202). A link affects what syncs from now on only. **Operator token only.**
115
+ # @param import [String] The import&#39;s public id (&#x60;cimp_&#x60;).
116
+ # @param confirm_accounting_contact_import_request [ConfirmAccountingContactImportRequest]
117
+ # @param [Hash] opts the optional parameters
118
+ # @return [Array<(ConfirmAccountingContactImport200Response, Integer, Hash)>] ConfirmAccountingContactImport200Response data, response status code and response headers
119
+ def confirm_accounting_contact_import_with_http_info(import, confirm_accounting_contact_import_request, opts = {})
120
+ if @api_client.config.debugging
121
+ @api_client.config.logger.debug 'Calling API: AccountingApi.confirm_accounting_contact_import ...'
122
+ end
123
+ # verify the required parameter 'import' is set
124
+ if @api_client.config.client_side_validation && import.nil?
125
+ fail ArgumentError, "Missing the required parameter 'import' when calling AccountingApi.confirm_accounting_contact_import"
126
+ end
127
+ # verify the required parameter 'confirm_accounting_contact_import_request' is set
128
+ if @api_client.config.client_side_validation && confirm_accounting_contact_import_request.nil?
129
+ fail ArgumentError, "Missing the required parameter 'confirm_accounting_contact_import_request' when calling AccountingApi.confirm_accounting_contact_import"
130
+ end
131
+ # resource path
132
+ local_var_path = '/accounting/contact-imports/{import}/confirm'.sub('{import}', CGI.escape(import.to_s))
133
+
134
+ # query parameters
135
+ query_params = opts[:query_params] || {}
136
+
137
+ # header parameters
138
+ header_params = opts[:header_params] || {}
139
+ # HTTP header 'Accept' (if needed)
140
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
141
+ # HTTP header 'Content-Type'
142
+ content_type = @api_client.select_header_content_type(['application/json'])
143
+ if !content_type.nil?
144
+ header_params['Content-Type'] = content_type
145
+ end
146
+
147
+ # form parameters
148
+ form_params = opts[:form_params] || {}
149
+
150
+ # http body (model)
151
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(confirm_accounting_contact_import_request)
152
+
153
+ # return_type
154
+ return_type = opts[:debug_return_type] || 'ConfirmAccountingContactImport200Response'
155
+
156
+ # auth_names
157
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
158
+
159
+ new_options = opts.merge(
160
+ :operation => :"AccountingApi.confirm_accounting_contact_import",
161
+ :header_params => header_params,
162
+ :query_params => query_params,
163
+ :form_params => form_params,
164
+ :body => post_body,
165
+ :auth_names => auth_names,
166
+ :return_type => return_type
167
+ )
168
+
169
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
170
+ if @api_client.config.debugging
171
+ @api_client.config.logger.debug "API called: AccountingApi#confirm_accounting_contact_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
172
+ end
173
+ return data, status_code, headers
174
+ end
175
+
176
+ # Create the customer as a new contact in the accounting system now
177
+ # Pushes the organization's current profile to the vendor as a new contact, the way its first invoice would, and links it. **This writes to the accounting system.** If Billing made a contact for this organization before, the vendor's search by Billing's reference finds that one instead of making a second. **Operator token only.**
178
+ # @param org [String]
179
+ # @param [Hash] opts the optional parameters
180
+ # @return [LinkAccountingContact200Response]
181
+ def create_accounting_contact(org, opts = {})
182
+ data, _status_code, _headers = create_accounting_contact_with_http_info(org, opts)
183
+ data
184
+ end
185
+
186
+ # Create the customer as a new contact in the accounting system now
187
+ # Pushes the organization&#39;s current profile to the vendor as a new contact, the way its first invoice would, and links it. **This writes to the accounting system.** If Billing made a contact for this organization before, the vendor&#39;s search by Billing&#39;s reference finds that one instead of making a second. **Operator token only.**
188
+ # @param org [String]
189
+ # @param [Hash] opts the optional parameters
190
+ # @return [Array<(LinkAccountingContact200Response, Integer, Hash)>] LinkAccountingContact200Response data, response status code and response headers
191
+ def create_accounting_contact_with_http_info(org, opts = {})
192
+ if @api_client.config.debugging
193
+ @api_client.config.logger.debug 'Calling API: AccountingApi.create_accounting_contact ...'
194
+ end
195
+ # verify the required parameter 'org' is set
196
+ if @api_client.config.client_side_validation && org.nil?
197
+ fail ArgumentError, "Missing the required parameter 'org' when calling AccountingApi.create_accounting_contact"
198
+ end
199
+ # resource path
200
+ local_var_path = '/accounting/organizations/{org}/contact'.sub('{org}', CGI.escape(org.to_s))
201
+
202
+ # query parameters
203
+ query_params = opts[:query_params] || {}
204
+
205
+ # header parameters
206
+ header_params = opts[:header_params] || {}
207
+ # HTTP header 'Accept' (if needed)
208
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
209
+
210
+ # form parameters
211
+ form_params = opts[:form_params] || {}
212
+
213
+ # http body (model)
214
+ post_body = opts[:debug_body]
215
+
216
+ # return_type
217
+ return_type = opts[:debug_return_type] || 'LinkAccountingContact200Response'
218
+
219
+ # auth_names
220
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
221
+
222
+ new_options = opts.merge(
223
+ :operation => :"AccountingApi.create_accounting_contact",
224
+ :header_params => header_params,
225
+ :query_params => query_params,
226
+ :form_params => form_params,
227
+ :body => post_body,
228
+ :auth_names => auth_names,
229
+ :return_type => return_type
230
+ )
231
+
232
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
233
+ if @api_client.config.debugging
234
+ @api_client.config.logger.debug "API called: AccountingApi#create_accounting_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
235
+ end
236
+ return data, status_code, headers
237
+ end
238
+
239
+ # Create Billing customers from unmatched contacts
240
+ # Makes a Billing organization of each named `unmatched` row (its name, email, country, city and CVR/VAT number, checked with the register as on the customer's page) and links it. At most 25 per call; each call is one confirmation. A row without a valid email or country is refused with the reason, and a row already dealt with is passed over, so the same call twice creates nothing twice. Needs the `organizations:write` scope as well. **Operator token only.**
241
+ # @param import [String] The import&#39;s public id (&#x60;cimp_&#x60;).
242
+ # @param create_customers_from_accounting_contact_import_request [CreateCustomersFromAccountingContactImportRequest]
243
+ # @param [Hash] opts the optional parameters
244
+ # @return [CreateCustomersFromAccountingContactImport200Response]
245
+ def create_customers_from_accounting_contact_import(import, create_customers_from_accounting_contact_import_request, opts = {})
246
+ data, _status_code, _headers = create_customers_from_accounting_contact_import_with_http_info(import, create_customers_from_accounting_contact_import_request, opts)
247
+ data
248
+ end
249
+
250
+ # Create Billing customers from unmatched contacts
251
+ # Makes a Billing organization of each named &#x60;unmatched&#x60; row (its name, email, country, city and CVR/VAT number, checked with the register as on the customer&#39;s page) and links it. At most 25 per call; each call is one confirmation. A row without a valid email or country is refused with the reason, and a row already dealt with is passed over, so the same call twice creates nothing twice. Needs the &#x60;organizations:write&#x60; scope as well. **Operator token only.**
252
+ # @param import [String] The import&#39;s public id (&#x60;cimp_&#x60;).
253
+ # @param create_customers_from_accounting_contact_import_request [CreateCustomersFromAccountingContactImportRequest]
254
+ # @param [Hash] opts the optional parameters
255
+ # @return [Array<(CreateCustomersFromAccountingContactImport200Response, Integer, Hash)>] CreateCustomersFromAccountingContactImport200Response data, response status code and response headers
256
+ def create_customers_from_accounting_contact_import_with_http_info(import, create_customers_from_accounting_contact_import_request, opts = {})
257
+ if @api_client.config.debugging
258
+ @api_client.config.logger.debug 'Calling API: AccountingApi.create_customers_from_accounting_contact_import ...'
259
+ end
260
+ # verify the required parameter 'import' is set
261
+ if @api_client.config.client_side_validation && import.nil?
262
+ fail ArgumentError, "Missing the required parameter 'import' when calling AccountingApi.create_customers_from_accounting_contact_import"
263
+ end
264
+ # verify the required parameter 'create_customers_from_accounting_contact_import_request' is set
265
+ if @api_client.config.client_side_validation && create_customers_from_accounting_contact_import_request.nil?
266
+ fail ArgumentError, "Missing the required parameter 'create_customers_from_accounting_contact_import_request' when calling AccountingApi.create_customers_from_accounting_contact_import"
267
+ end
268
+ # resource path
269
+ local_var_path = '/accounting/contact-imports/{import}/customers'.sub('{import}', CGI.escape(import.to_s))
270
+
271
+ # query parameters
272
+ query_params = opts[:query_params] || {}
273
+
274
+ # header parameters
275
+ header_params = opts[:header_params] || {}
276
+ # HTTP header 'Accept' (if needed)
277
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
278
+ # HTTP header 'Content-Type'
279
+ content_type = @api_client.select_header_content_type(['application/json'])
280
+ if !content_type.nil?
281
+ header_params['Content-Type'] = content_type
282
+ end
283
+
284
+ # form parameters
285
+ form_params = opts[:form_params] || {}
286
+
287
+ # http body (model)
288
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_customers_from_accounting_contact_import_request)
289
+
290
+ # return_type
291
+ return_type = opts[:debug_return_type] || 'CreateCustomersFromAccountingContactImport200Response'
292
+
293
+ # auth_names
294
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
295
+
296
+ new_options = opts.merge(
297
+ :operation => :"AccountingApi.create_customers_from_accounting_contact_import",
298
+ :header_params => header_params,
299
+ :query_params => query_params,
300
+ :form_params => form_params,
301
+ :body => post_body,
302
+ :auth_names => auth_names,
303
+ :return_type => return_type
304
+ )
305
+
306
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
307
+ if @api_client.config.debugging
308
+ @api_client.config.logger.debug "API called: AccountingApi#create_customers_from_accounting_contact_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
309
+ end
310
+ return data, status_code, headers
311
+ end
312
+
313
+ # Discard a contact import
314
+ # Drops the import and the contacts it read. Links already confirmed and customers already created stay. **Operator token only.**
315
+ # @param import [String] The import&#39;s public id (&#x60;cimp_&#x60;).
316
+ # @param [Hash] opts the optional parameters
317
+ # @return [nil]
318
+ def discard_accounting_contact_import(import, opts = {})
319
+ discard_accounting_contact_import_with_http_info(import, opts)
320
+ nil
321
+ end
322
+
323
+ # Discard a contact import
324
+ # Drops the import and the contacts it read. Links already confirmed and customers already created stay. **Operator token only.**
325
+ # @param import [String] The import&#39;s public id (&#x60;cimp_&#x60;).
326
+ # @param [Hash] opts the optional parameters
327
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
328
+ def discard_accounting_contact_import_with_http_info(import, opts = {})
329
+ if @api_client.config.debugging
330
+ @api_client.config.logger.debug 'Calling API: AccountingApi.discard_accounting_contact_import ...'
331
+ end
332
+ # verify the required parameter 'import' is set
333
+ if @api_client.config.client_side_validation && import.nil?
334
+ fail ArgumentError, "Missing the required parameter 'import' when calling AccountingApi.discard_accounting_contact_import"
335
+ end
336
+ # resource path
337
+ local_var_path = '/accounting/contact-imports/{import}'.sub('{import}', CGI.escape(import.to_s))
338
+
339
+ # query parameters
340
+ query_params = opts[:query_params] || {}
341
+
342
+ # header parameters
343
+ header_params = opts[:header_params] || {}
344
+ # HTTP header 'Accept' (if needed)
345
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
346
+
347
+ # form parameters
348
+ form_params = opts[:form_params] || {}
349
+
350
+ # http body (model)
351
+ post_body = opts[:debug_body]
352
+
353
+ # return_type
354
+ return_type = opts[:debug_return_type]
355
+
356
+ # auth_names
357
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
358
+
359
+ new_options = opts.merge(
360
+ :operation => :"AccountingApi.discard_accounting_contact_import",
361
+ :header_params => header_params,
362
+ :query_params => query_params,
363
+ :form_params => form_params,
364
+ :body => post_body,
365
+ :auth_names => auth_names,
366
+ :return_type => return_type
367
+ )
368
+
369
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
370
+ if @api_client.config.debugging
371
+ @api_client.config.logger.debug "API called: AccountingApi#discard_accounting_contact_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
372
+ end
373
+ return data, status_code, headers
374
+ end
375
+
376
+ # Show the accounting connection
377
+ # The token's plane's connection, or `null` if it has none. **Operator token only.** Connecting happens in the console, and credentials are never returned.
378
+ # @param [Hash] opts the optional parameters
379
+ # @return [GetAccountingConnection200Response]
380
+ def get_accounting_connection(opts = {})
381
+ data, _status_code, _headers = get_accounting_connection_with_http_info(opts)
382
+ data
383
+ end
384
+
385
+ # Show the accounting connection
386
+ # The token&#39;s plane&#39;s connection, or &#x60;null&#x60; if it has none. **Operator token only.** Connecting happens in the console, and credentials are never returned.
387
+ # @param [Hash] opts the optional parameters
388
+ # @return [Array<(GetAccountingConnection200Response, Integer, Hash)>] GetAccountingConnection200Response data, response status code and response headers
389
+ def get_accounting_connection_with_http_info(opts = {})
390
+ if @api_client.config.debugging
391
+ @api_client.config.logger.debug 'Calling API: AccountingApi.get_accounting_connection ...'
392
+ end
393
+ # resource path
394
+ local_var_path = '/accounting/connection'
395
+
396
+ # query parameters
397
+ query_params = opts[:query_params] || {}
398
+
399
+ # header parameters
400
+ header_params = opts[:header_params] || {}
401
+ # HTTP header 'Accept' (if needed)
402
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
403
+
404
+ # form parameters
405
+ form_params = opts[:form_params] || {}
406
+
407
+ # http body (model)
408
+ post_body = opts[:debug_body]
409
+
410
+ # return_type
411
+ return_type = opts[:debug_return_type] || 'GetAccountingConnection200Response'
412
+
413
+ # auth_names
414
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
415
+
416
+ new_options = opts.merge(
417
+ :operation => :"AccountingApi.get_accounting_connection",
418
+ :header_params => header_params,
419
+ :query_params => query_params,
420
+ :form_params => form_params,
421
+ :body => post_body,
422
+ :auth_names => auth_names,
423
+ :return_type => return_type
424
+ )
425
+
426
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
427
+ if @api_client.config.debugging
428
+ @api_client.config.logger.debug "API called: AccountingApi#get_accounting_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
429
+ end
430
+ return data, status_code, headers
431
+ end
432
+
433
+ # Read one customer as the connected accounting system has it now
434
+ # For an app to refresh what it copied from the contact an organization is linked to (name, address, VAT number, email), from the accounting system rather than from its own copy. Read live. **Operator token only.**
435
+ # @param contact [String] The vendor&#39;s id, as &#x60;GET /accounting/contacts&#x60; lists it.
436
+ # @param [Hash] opts the optional parameters
437
+ # @return [GetAccountingContact200Response]
438
+ def get_accounting_contact(contact, opts = {})
439
+ data, _status_code, _headers = get_accounting_contact_with_http_info(contact, opts)
440
+ data
441
+ end
442
+
443
+ # Read one customer as the connected accounting system has it now
444
+ # For an app to refresh what it copied from the contact an organization is linked to (name, address, VAT number, email), from the accounting system rather than from its own copy. Read live. **Operator token only.**
445
+ # @param contact [String] The vendor&#39;s id, as &#x60;GET /accounting/contacts&#x60; lists it.
446
+ # @param [Hash] opts the optional parameters
447
+ # @return [Array<(GetAccountingContact200Response, Integer, Hash)>] GetAccountingContact200Response data, response status code and response headers
448
+ def get_accounting_contact_with_http_info(contact, opts = {})
449
+ if @api_client.config.debugging
450
+ @api_client.config.logger.debug 'Calling API: AccountingApi.get_accounting_contact ...'
451
+ end
452
+ # verify the required parameter 'contact' is set
453
+ if @api_client.config.client_side_validation && contact.nil?
454
+ fail ArgumentError, "Missing the required parameter 'contact' when calling AccountingApi.get_accounting_contact"
455
+ end
456
+ if @api_client.config.client_side_validation && contact.to_s.length > 120
457
+ fail ArgumentError, 'invalid value for "contact" when calling AccountingApi.get_accounting_contact, the character length must be smaller than or equal to 120.'
458
+ end
459
+
460
+ # resource path
461
+ local_var_path = '/accounting/contacts/{contact}'.sub('{contact}', CGI.escape(contact.to_s))
462
+
463
+ # query parameters
464
+ query_params = opts[:query_params] || {}
465
+
466
+ # header parameters
467
+ header_params = opts[:header_params] || {}
468
+ # HTTP header 'Accept' (if needed)
469
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
470
+
471
+ # form parameters
472
+ form_params = opts[:form_params] || {}
473
+
474
+ # http body (model)
475
+ post_body = opts[:debug_body]
476
+
477
+ # return_type
478
+ return_type = opts[:debug_return_type] || 'GetAccountingContact200Response'
479
+
480
+ # auth_names
481
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
482
+
483
+ new_options = opts.merge(
484
+ :operation => :"AccountingApi.get_accounting_contact",
485
+ :header_params => header_params,
486
+ :query_params => query_params,
487
+ :form_params => form_params,
488
+ :body => post_body,
489
+ :auth_names => auth_names,
490
+ :return_type => return_type
491
+ )
492
+
493
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
494
+ if @api_client.config.debugging
495
+ @api_client.config.logger.debug "API called: AccountingApi#get_accounting_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
496
+ end
497
+ return data, status_code, headers
498
+ end
499
+
500
+ # Read a contact import's progress and counts
501
+ # `status` is `running`, `review` (read and matched: waiting for you) or `failed` (resume it). **Operator token only.**
502
+ # @param import [String] The import&#39;s public id (&#x60;cimp_&#x60;).
503
+ # @param [Hash] opts the optional parameters
504
+ # @return [StartAccountingContactImport202Response]
505
+ def get_accounting_contact_import(import, opts = {})
506
+ data, _status_code, _headers = get_accounting_contact_import_with_http_info(import, opts)
507
+ data
508
+ end
509
+
510
+ # Read a contact import&#39;s progress and counts
511
+ # &#x60;status&#x60; is &#x60;running&#x60;, &#x60;review&#x60; (read and matched: waiting for you) or &#x60;failed&#x60; (resume it). **Operator token only.**
512
+ # @param import [String] The import&#39;s public id (&#x60;cimp_&#x60;).
513
+ # @param [Hash] opts the optional parameters
514
+ # @return [Array<(StartAccountingContactImport202Response, Integer, Hash)>] StartAccountingContactImport202Response data, response status code and response headers
515
+ def get_accounting_contact_import_with_http_info(import, opts = {})
516
+ if @api_client.config.debugging
517
+ @api_client.config.logger.debug 'Calling API: AccountingApi.get_accounting_contact_import ...'
518
+ end
519
+ # verify the required parameter 'import' is set
520
+ if @api_client.config.client_side_validation && import.nil?
521
+ fail ArgumentError, "Missing the required parameter 'import' when calling AccountingApi.get_accounting_contact_import"
522
+ end
523
+ # resource path
524
+ local_var_path = '/accounting/contact-imports/{import}'.sub('{import}', CGI.escape(import.to_s))
525
+
526
+ # query parameters
527
+ query_params = opts[:query_params] || {}
528
+
529
+ # header parameters
530
+ header_params = opts[:header_params] || {}
531
+ # HTTP header 'Accept' (if needed)
532
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
533
+
534
+ # form parameters
535
+ form_params = opts[:form_params] || {}
536
+
537
+ # http body (model)
538
+ post_body = opts[:debug_body]
539
+
540
+ # return_type
541
+ return_type = opts[:debug_return_type] || 'StartAccountingContactImport202Response'
542
+
543
+ # auth_names
544
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
545
+
546
+ new_options = opts.merge(
547
+ :operation => :"AccountingApi.get_accounting_contact_import",
548
+ :header_params => header_params,
549
+ :query_params => query_params,
550
+ :form_params => form_params,
551
+ :body => post_body,
552
+ :auth_names => auth_names,
553
+ :return_type => return_type
554
+ )
555
+
556
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
557
+ if @api_client.config.debugging
558
+ @api_client.config.logger.debug "API called: AccountingApi#get_accounting_contact_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
559
+ end
560
+ return data, status_code, headers
561
+ end
562
+
563
+ # Contact sync for the whole connection, with its conflicts
564
+ # What the console's Contact sync page shows: which way customer details flow (`direction`), whether sync runs (`state`, and the scope the vendor has not approved when `missing_scope`), when the last full pull from the accounting system finished (`last_pull_at`) and the last write to it (`last_push_at`), the last error, how many customers failed their last sync, and one cursor page of the fields both sides changed where a person picks the value to keep, newest first. `contact_sync` is `null` and the page empty when the plane has no connection. **Operator token only.** Settling a conflict stays in the console. For one customer, read `contact_sync` on `GET /accounting/organizations/{org}`.
565
+ # @param [Hash] opts the optional parameters
566
+ # @option opts [String] :cursor The opaque &#x60;next_cursor&#x60; from a previous page. Treat it as a black box — echo it back verbatim to fetch the following page. Omit it for the first page. A malformed cursor is a &#x60;400&#x60;.
567
+ # @option opts [Integer] :limit Maximum items per page (1–100). Defaults to 20. (default to 20)
568
+ # @return [GetAccountingContactSync200Response]
569
+ def get_accounting_contact_sync(opts = {})
570
+ data, _status_code, _headers = get_accounting_contact_sync_with_http_info(opts)
571
+ data
572
+ end
573
+
574
+ # Contact sync for the whole connection, with its conflicts
575
+ # What the console&#39;s Contact sync page shows: which way customer details flow (&#x60;direction&#x60;), whether sync runs (&#x60;state&#x60;, and the scope the vendor has not approved when &#x60;missing_scope&#x60;), when the last full pull from the accounting system finished (&#x60;last_pull_at&#x60;) and the last write to it (&#x60;last_push_at&#x60;), the last error, how many customers failed their last sync, and one cursor page of the fields both sides changed where a person picks the value to keep, newest first. &#x60;contact_sync&#x60; is &#x60;null&#x60; and the page empty when the plane has no connection. **Operator token only.** Settling a conflict stays in the console. For one customer, read &#x60;contact_sync&#x60; on &#x60;GET /accounting/organizations/{org}&#x60;.
576
+ # @param [Hash] opts the optional parameters
577
+ # @option opts [String] :cursor The opaque &#x60;next_cursor&#x60; from a previous page. Treat it as a black box — echo it back verbatim to fetch the following page. Omit it for the first page. A malformed cursor is a &#x60;400&#x60;.
578
+ # @option opts [Integer] :limit Maximum items per page (1–100). Defaults to 20. (default to 20)
579
+ # @return [Array<(GetAccountingContactSync200Response, Integer, Hash)>] GetAccountingContactSync200Response data, response status code and response headers
580
+ def get_accounting_contact_sync_with_http_info(opts = {})
581
+ if @api_client.config.debugging
582
+ @api_client.config.logger.debug 'Calling API: AccountingApi.get_accounting_contact_sync ...'
583
+ end
584
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
585
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountingApi.get_accounting_contact_sync, must be smaller than or equal to 100.'
586
+ end
587
+
588
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
589
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountingApi.get_accounting_contact_sync, must be greater than or equal to 1.'
590
+ end
591
+
592
+ # resource path
593
+ local_var_path = '/accounting/contact-sync'
594
+
595
+ # query parameters
596
+ query_params = opts[:query_params] || {}
597
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
598
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
599
+
600
+ # header parameters
601
+ header_params = opts[:header_params] || {}
602
+ # HTTP header 'Accept' (if needed)
603
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
604
+
605
+ # form parameters
606
+ form_params = opts[:form_params] || {}
607
+
608
+ # http body (model)
609
+ post_body = opts[:debug_body]
610
+
611
+ # return_type
612
+ return_type = opts[:debug_return_type] || 'GetAccountingContactSync200Response'
613
+
614
+ # auth_names
615
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
616
+
617
+ new_options = opts.merge(
618
+ :operation => :"AccountingApi.get_accounting_contact_sync",
619
+ :header_params => header_params,
620
+ :query_params => query_params,
621
+ :form_params => form_params,
622
+ :body => post_body,
623
+ :auth_names => auth_names,
624
+ :return_type => return_type
625
+ )
626
+
627
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
628
+ if @api_client.config.debugging
629
+ @api_client.config.logger.debug "API called: AccountingApi#get_accounting_contact_sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
630
+ end
631
+ return data, status_code, headers
632
+ end
633
+
634
+ # Download the PDF of an invoice read from the accounting system
635
+ # The PDF as it was fetched from the accounting system when the invoice was read. Never rendered by Billing. **Operator token only.**
636
+ # @param invoice [String] The document&#39;s public id (&#x60;xinv_&#x60;).
637
+ # @param [Hash] opts the optional parameters
638
+ # @return [File]
639
+ def get_accounting_invoice_pdf(invoice, opts = {})
640
+ data, _status_code, _headers = get_accounting_invoice_pdf_with_http_info(invoice, opts)
641
+ data
642
+ end
643
+
644
+ # Download the PDF of an invoice read from the accounting system
645
+ # The PDF as it was fetched from the accounting system when the invoice was read. Never rendered by Billing. **Operator token only.**
646
+ # @param invoice [String] The document&#39;s public id (&#x60;xinv_&#x60;).
647
+ # @param [Hash] opts the optional parameters
648
+ # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
649
+ def get_accounting_invoice_pdf_with_http_info(invoice, opts = {})
650
+ if @api_client.config.debugging
651
+ @api_client.config.logger.debug 'Calling API: AccountingApi.get_accounting_invoice_pdf ...'
652
+ end
653
+ # verify the required parameter 'invoice' is set
654
+ if @api_client.config.client_side_validation && invoice.nil?
655
+ fail ArgumentError, "Missing the required parameter 'invoice' when calling AccountingApi.get_accounting_invoice_pdf"
656
+ end
657
+ # resource path
658
+ local_var_path = '/accounting/invoices/{invoice}/pdf'.sub('{invoice}', CGI.escape(invoice.to_s))
659
+
660
+ # query parameters
661
+ query_params = opts[:query_params] || {}
662
+
663
+ # header parameters
664
+ header_params = opts[:header_params] || {}
665
+ # HTTP header 'Accept' (if needed)
666
+ header_params['Accept'] = @api_client.select_header_accept(['application/pdf', 'application/json']) unless header_params['Accept']
667
+
668
+ # form parameters
669
+ form_params = opts[:form_params] || {}
670
+
671
+ # http body (model)
672
+ post_body = opts[:debug_body]
673
+
674
+ # return_type
675
+ return_type = opts[:debug_return_type] || 'File'
676
+
677
+ # auth_names
678
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
679
+
680
+ new_options = opts.merge(
681
+ :operation => :"AccountingApi.get_accounting_invoice_pdf",
682
+ :header_params => header_params,
683
+ :query_params => query_params,
684
+ :form_params => form_params,
685
+ :body => post_body,
686
+ :auth_names => auth_names,
687
+ :return_type => return_type
688
+ )
689
+
690
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
691
+ if @api_client.config.debugging
692
+ @api_client.config.logger.debug "API called: AccountingApi#get_accounting_invoice_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
693
+ end
694
+ return data, status_code, headers
695
+ end
696
+
697
+ # Read the setting and sync status of invoices from the accounting system
698
+ # Whether the plane shows its accounting system's invoices in the customer portal (off by default, turned on in the console), how reading them goes, the scope the vendor needs for it, and how many read invoices are on a contact no customer is linked to (counted to 1000 at most). Read only: these invoices are external documents, never Billing invoices, and never part of numbering, VAT returns, revenue or dunning. **Operator token only.**
699
+ # @param [Hash] opts the optional parameters
700
+ # @return [GetAccountingInvoiceSync200Response]
701
+ def get_accounting_invoice_sync(opts = {})
702
+ data, _status_code, _headers = get_accounting_invoice_sync_with_http_info(opts)
703
+ data
704
+ end
705
+
706
+ # Read the setting and sync status of invoices from the accounting system
707
+ # Whether the plane shows its accounting system&#39;s invoices in the customer portal (off by default, turned on in the console), how reading them goes, the scope the vendor needs for it, and how many read invoices are on a contact no customer is linked to (counted to 1000 at most). Read only: these invoices are external documents, never Billing invoices, and never part of numbering, VAT returns, revenue or dunning. **Operator token only.**
708
+ # @param [Hash] opts the optional parameters
709
+ # @return [Array<(GetAccountingInvoiceSync200Response, Integer, Hash)>] GetAccountingInvoiceSync200Response data, response status code and response headers
710
+ def get_accounting_invoice_sync_with_http_info(opts = {})
711
+ if @api_client.config.debugging
712
+ @api_client.config.logger.debug 'Calling API: AccountingApi.get_accounting_invoice_sync ...'
713
+ end
714
+ # resource path
715
+ local_var_path = '/accounting/invoices/sync'
716
+
717
+ # query parameters
718
+ query_params = opts[:query_params] || {}
719
+
720
+ # header parameters
721
+ header_params = opts[:header_params] || {}
722
+ # HTTP header 'Accept' (if needed)
723
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
724
+
725
+ # form parameters
726
+ form_params = opts[:form_params] || {}
727
+
728
+ # http body (model)
729
+ post_body = opts[:debug_body]
730
+
731
+ # return_type
732
+ return_type = opts[:debug_return_type] || 'GetAccountingInvoiceSync200Response'
733
+
734
+ # auth_names
735
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
736
+
737
+ new_options = opts.merge(
738
+ :operation => :"AccountingApi.get_accounting_invoice_sync",
739
+ :header_params => header_params,
740
+ :query_params => query_params,
741
+ :form_params => form_params,
742
+ :body => post_body,
743
+ :auth_names => auth_names,
744
+ :return_type => return_type
745
+ )
746
+
747
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
748
+ if @api_client.config.debugging
749
+ @api_client.config.logger.debug "API called: AccountingApi#get_accounting_invoice_sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
750
+ end
751
+ return data, status_code, headers
752
+ end
753
+
754
+ # Read a customer's accounting contact and synced documents
755
+ # What the console's Accounting tab shows: the contact in the connected accounting system this organization books on, read live from the vendor (a vendor that does not answer leaves `contact.error` set, not an error), the other organizations on the same contact, the contacts the last import matched to this one organization, and its documents at the vendor, newest attempt first, 20 per page. **Operator token only.**
756
+ # @param org [String] The organization&#39;s id or external reference.
757
+ # @param [Hash] opts the optional parameters
758
+ # @option opts [Integer] :page (default to 1)
759
+ # @return [GetAccountingOrganization200Response]
760
+ def get_accounting_organization(org, opts = {})
761
+ data, _status_code, _headers = get_accounting_organization_with_http_info(org, opts)
762
+ data
763
+ end
764
+
765
+ # Read a customer&#39;s accounting contact and synced documents
766
+ # What the console&#39;s Accounting tab shows: the contact in the connected accounting system this organization books on, read live from the vendor (a vendor that does not answer leaves &#x60;contact.error&#x60; set, not an error), the other organizations on the same contact, the contacts the last import matched to this one organization, and its documents at the vendor, newest attempt first, 20 per page. **Operator token only.**
767
+ # @param org [String] The organization&#39;s id or external reference.
768
+ # @param [Hash] opts the optional parameters
769
+ # @option opts [Integer] :page (default to 1)
770
+ # @return [Array<(GetAccountingOrganization200Response, Integer, Hash)>] GetAccountingOrganization200Response data, response status code and response headers
771
+ def get_accounting_organization_with_http_info(org, opts = {})
772
+ if @api_client.config.debugging
773
+ @api_client.config.logger.debug 'Calling API: AccountingApi.get_accounting_organization ...'
774
+ end
775
+ # verify the required parameter 'org' is set
776
+ if @api_client.config.client_side_validation && org.nil?
777
+ fail ArgumentError, "Missing the required parameter 'org' when calling AccountingApi.get_accounting_organization"
778
+ end
779
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
780
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AccountingApi.get_accounting_organization, must be greater than or equal to 1.'
781
+ end
782
+
783
+ # resource path
784
+ local_var_path = '/accounting/organizations/{org}'.sub('{org}', CGI.escape(org.to_s))
785
+
786
+ # query parameters
787
+ query_params = opts[:query_params] || {}
788
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
789
+
790
+ # header parameters
791
+ header_params = opts[:header_params] || {}
792
+ # HTTP header 'Accept' (if needed)
793
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
794
+
795
+ # form parameters
796
+ form_params = opts[:form_params] || {}
797
+
798
+ # http body (model)
799
+ post_body = opts[:debug_body]
800
+
801
+ # return_type
802
+ return_type = opts[:debug_return_type] || 'GetAccountingOrganization200Response'
803
+
804
+ # auth_names
805
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
806
+
807
+ new_options = opts.merge(
808
+ :operation => :"AccountingApi.get_accounting_organization",
809
+ :header_params => header_params,
810
+ :query_params => query_params,
811
+ :form_params => form_params,
812
+ :body => post_body,
813
+ :auth_names => auth_names,
814
+ :return_type => return_type
815
+ )
816
+
817
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
818
+ if @api_client.config.debugging
819
+ @api_client.config.logger.debug "API called: AccountingApi#get_accounting_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
820
+ end
821
+ return data, status_code, headers
822
+ end
823
+
824
+ # Read the newest contact import
825
+ # The newest import of the plane's connection and company, or `null`. **Operator token only.**
826
+ # @param [Hash] opts the optional parameters
827
+ # @return [GetLatestAccountingContactImport200Response]
828
+ def get_latest_accounting_contact_import(opts = {})
829
+ data, _status_code, _headers = get_latest_accounting_contact_import_with_http_info(opts)
830
+ data
831
+ end
832
+
833
+ # Read the newest contact import
834
+ # The newest import of the plane&#39;s connection and company, or &#x60;null&#x60;. **Operator token only.**
835
+ # @param [Hash] opts the optional parameters
836
+ # @return [Array<(GetLatestAccountingContactImport200Response, Integer, Hash)>] GetLatestAccountingContactImport200Response data, response status code and response headers
837
+ def get_latest_accounting_contact_import_with_http_info(opts = {})
838
+ if @api_client.config.debugging
839
+ @api_client.config.logger.debug 'Calling API: AccountingApi.get_latest_accounting_contact_import ...'
840
+ end
841
+ # resource path
842
+ local_var_path = '/accounting/contact-imports/latest'
843
+
844
+ # query parameters
845
+ query_params = opts[:query_params] || {}
846
+
847
+ # header parameters
848
+ header_params = opts[:header_params] || {}
849
+ # HTTP header 'Accept' (if needed)
850
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
851
+
852
+ # form parameters
853
+ form_params = opts[:form_params] || {}
854
+
855
+ # http body (model)
856
+ post_body = opts[:debug_body]
857
+
858
+ # return_type
859
+ return_type = opts[:debug_return_type] || 'GetLatestAccountingContactImport200Response'
860
+
861
+ # auth_names
862
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
863
+
864
+ new_options = opts.merge(
865
+ :operation => :"AccountingApi.get_latest_accounting_contact_import",
866
+ :header_params => header_params,
867
+ :query_params => query_params,
868
+ :form_params => form_params,
869
+ :body => post_body,
870
+ :auth_names => auth_names,
871
+ :return_type => return_type
872
+ )
873
+
874
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
875
+ if @api_client.config.debugging
876
+ @api_client.config.logger.debug "API called: AccountingApi#get_latest_accounting_contact_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
877
+ end
878
+ return data, status_code, headers
879
+ end
880
+
881
+ # Choose which customer keeps a shared contact
882
+ # `organization` keeps the contact; every other organization on it lets go, and finds or makes its own contact with its next document. Documents already synced stay where they are. Nothing changes at the vendor. **Operator token only.**
883
+ # @param contact [String]
884
+ # @param keep_accounting_contact_request [KeepAccountingContactRequest]
885
+ # @param [Hash] opts the optional parameters
886
+ # @return [KeepAccountingContact200Response]
887
+ def keep_accounting_contact(contact, keep_accounting_contact_request, opts = {})
888
+ data, _status_code, _headers = keep_accounting_contact_with_http_info(contact, keep_accounting_contact_request, opts)
889
+ data
890
+ end
891
+
892
+ # Choose which customer keeps a shared contact
893
+ # &#x60;organization&#x60; keeps the contact; every other organization on it lets go, and finds or makes its own contact with its next document. Documents already synced stay where they are. Nothing changes at the vendor. **Operator token only.**
894
+ # @param contact [String]
895
+ # @param keep_accounting_contact_request [KeepAccountingContactRequest]
896
+ # @param [Hash] opts the optional parameters
897
+ # @return [Array<(KeepAccountingContact200Response, Integer, Hash)>] KeepAccountingContact200Response data, response status code and response headers
898
+ def keep_accounting_contact_with_http_info(contact, keep_accounting_contact_request, opts = {})
899
+ if @api_client.config.debugging
900
+ @api_client.config.logger.debug 'Calling API: AccountingApi.keep_accounting_contact ...'
901
+ end
902
+ # verify the required parameter 'contact' is set
903
+ if @api_client.config.client_side_validation && contact.nil?
904
+ fail ArgumentError, "Missing the required parameter 'contact' when calling AccountingApi.keep_accounting_contact"
905
+ end
906
+ # verify the required parameter 'keep_accounting_contact_request' is set
907
+ if @api_client.config.client_side_validation && keep_accounting_contact_request.nil?
908
+ fail ArgumentError, "Missing the required parameter 'keep_accounting_contact_request' when calling AccountingApi.keep_accounting_contact"
909
+ end
910
+ # resource path
911
+ local_var_path = '/accounting/contacts/{contact}/keep'.sub('{contact}', CGI.escape(contact.to_s))
912
+
913
+ # query parameters
914
+ query_params = opts[:query_params] || {}
915
+
916
+ # header parameters
917
+ header_params = opts[:header_params] || {}
918
+ # HTTP header 'Accept' (if needed)
919
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
920
+ # HTTP header 'Content-Type'
921
+ content_type = @api_client.select_header_content_type(['application/json'])
922
+ if !content_type.nil?
923
+ header_params['Content-Type'] = content_type
924
+ end
925
+
926
+ # form parameters
927
+ form_params = opts[:form_params] || {}
928
+
929
+ # http body (model)
930
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(keep_accounting_contact_request)
931
+
932
+ # return_type
933
+ return_type = opts[:debug_return_type] || 'KeepAccountingContact200Response'
934
+
935
+ # auth_names
936
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
937
+
938
+ new_options = opts.merge(
939
+ :operation => :"AccountingApi.keep_accounting_contact",
940
+ :header_params => header_params,
941
+ :query_params => query_params,
942
+ :form_params => form_params,
943
+ :body => post_body,
944
+ :auth_names => auth_names,
945
+ :return_type => return_type
946
+ )
947
+
948
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
949
+ if @api_client.config.debugging
950
+ @api_client.config.logger.debug "API called: AccountingApi#keep_accounting_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
951
+ end
952
+ return data, status_code, headers
953
+ end
954
+
955
+ # Link a customer to a contact the accounting system already has
956
+ # The vendor confirms the contact before anything is saved. Replaces the contact the organization booked on; documents already synced keep the contact they were booked on, and no issued invoice changes. The same as `accounting_contact` on `PUT /organizations/{org}`, and audited on the organization. **Operator token only.**
957
+ # @param org [String]
958
+ # @param link_accounting_contact_request [LinkAccountingContactRequest]
959
+ # @param [Hash] opts the optional parameters
960
+ # @return [LinkAccountingContact200Response]
961
+ def link_accounting_contact(org, link_accounting_contact_request, opts = {})
962
+ data, _status_code, _headers = link_accounting_contact_with_http_info(org, link_accounting_contact_request, opts)
963
+ data
964
+ end
965
+
966
+ # Link a customer to a contact the accounting system already has
967
+ # The vendor confirms the contact before anything is saved. Replaces the contact the organization booked on; documents already synced keep the contact they were booked on, and no issued invoice changes. The same as &#x60;accounting_contact&#x60; on &#x60;PUT /organizations/{org}&#x60;, and audited on the organization. **Operator token only.**
968
+ # @param org [String]
969
+ # @param link_accounting_contact_request [LinkAccountingContactRequest]
970
+ # @param [Hash] opts the optional parameters
971
+ # @return [Array<(LinkAccountingContact200Response, Integer, Hash)>] LinkAccountingContact200Response data, response status code and response headers
972
+ def link_accounting_contact_with_http_info(org, link_accounting_contact_request, opts = {})
973
+ if @api_client.config.debugging
974
+ @api_client.config.logger.debug 'Calling API: AccountingApi.link_accounting_contact ...'
975
+ end
976
+ # verify the required parameter 'org' is set
977
+ if @api_client.config.client_side_validation && org.nil?
978
+ fail ArgumentError, "Missing the required parameter 'org' when calling AccountingApi.link_accounting_contact"
979
+ end
980
+ # verify the required parameter 'link_accounting_contact_request' is set
981
+ if @api_client.config.client_side_validation && link_accounting_contact_request.nil?
982
+ fail ArgumentError, "Missing the required parameter 'link_accounting_contact_request' when calling AccountingApi.link_accounting_contact"
983
+ end
984
+ # resource path
985
+ local_var_path = '/accounting/organizations/{org}/contact'.sub('{org}', CGI.escape(org.to_s))
986
+
987
+ # query parameters
988
+ query_params = opts[:query_params] || {}
989
+
990
+ # header parameters
991
+ header_params = opts[:header_params] || {}
992
+ # HTTP header 'Accept' (if needed)
993
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
994
+ # HTTP header 'Content-Type'
995
+ content_type = @api_client.select_header_content_type(['application/json'])
996
+ if !content_type.nil?
997
+ header_params['Content-Type'] = content_type
998
+ end
999
+
1000
+ # form parameters
1001
+ form_params = opts[:form_params] || {}
1002
+
1003
+ # http body (model)
1004
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(link_accounting_contact_request)
1005
+
1006
+ # return_type
1007
+ return_type = opts[:debug_return_type] || 'LinkAccountingContact200Response'
1008
+
1009
+ # auth_names
1010
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1011
+
1012
+ new_options = opts.merge(
1013
+ :operation => :"AccountingApi.link_accounting_contact",
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 => return_type
1020
+ )
1021
+
1022
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1023
+ if @api_client.config.debugging
1024
+ @api_client.config.logger.debug "API called: AccountingApi#link_accounting_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1025
+ end
1026
+ return data, status_code, headers
1027
+ end
1028
+
1029
+ # List contacts two or more customers book on
1030
+ # The \"Needs attention\" list: each vendor contact more than one organization books on, with those organizations, a page at a time. Settle one with `POST /accounting/contacts/{contact}/keep`. Two contacts for one company in the vendor are merged in the vendor, never from Billing. **Operator token only.**
1031
+ # @param [Hash] opts the optional parameters
1032
+ # @option opts [Integer] :page (default to 1)
1033
+ # @option opts [Integer] :limit (default to 20)
1034
+ # @return [ListAccountingContactDuplicates200Response]
1035
+ def list_accounting_contact_duplicates(opts = {})
1036
+ data, _status_code, _headers = list_accounting_contact_duplicates_with_http_info(opts)
1037
+ data
1038
+ end
1039
+
1040
+ # List contacts two or more customers book on
1041
+ # The \&quot;Needs attention\&quot; list: each vendor contact more than one organization books on, with those organizations, a page at a time. Settle one with &#x60;POST /accounting/contacts/{contact}/keep&#x60;. Two contacts for one company in the vendor are merged in the vendor, never from Billing. **Operator token only.**
1042
+ # @param [Hash] opts the optional parameters
1043
+ # @option opts [Integer] :page (default to 1)
1044
+ # @option opts [Integer] :limit (default to 20)
1045
+ # @return [Array<(ListAccountingContactDuplicates200Response, Integer, Hash)>] ListAccountingContactDuplicates200Response data, response status code and response headers
1046
+ def list_accounting_contact_duplicates_with_http_info(opts = {})
1047
+ if @api_client.config.debugging
1048
+ @api_client.config.logger.debug 'Calling API: AccountingApi.list_accounting_contact_duplicates ...'
1049
+ end
1050
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
1051
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AccountingApi.list_accounting_contact_duplicates, must be greater than or equal to 1.'
1052
+ end
1053
+
1054
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
1055
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountingApi.list_accounting_contact_duplicates, must be smaller than or equal to 100.'
1056
+ end
1057
+
1058
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1059
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountingApi.list_accounting_contact_duplicates, must be greater than or equal to 1.'
1060
+ end
1061
+
1062
+ # resource path
1063
+ local_var_path = '/accounting/contacts/duplicates'
1064
+
1065
+ # query parameters
1066
+ query_params = opts[:query_params] || {}
1067
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1068
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1069
+
1070
+ # header parameters
1071
+ header_params = opts[:header_params] || {}
1072
+ # HTTP header 'Accept' (if needed)
1073
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1074
+
1075
+ # form parameters
1076
+ form_params = opts[:form_params] || {}
1077
+
1078
+ # http body (model)
1079
+ post_body = opts[:debug_body]
1080
+
1081
+ # return_type
1082
+ return_type = opts[:debug_return_type] || 'ListAccountingContactDuplicates200Response'
1083
+
1084
+ # auth_names
1085
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1086
+
1087
+ new_options = opts.merge(
1088
+ :operation => :"AccountingApi.list_accounting_contact_duplicates",
1089
+ :header_params => header_params,
1090
+ :query_params => query_params,
1091
+ :form_params => form_params,
1092
+ :body => post_body,
1093
+ :auth_names => auth_names,
1094
+ :return_type => return_type
1095
+ )
1096
+
1097
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1098
+ if @api_client.config.debugging
1099
+ @api_client.config.logger.debug "API called: AccountingApi#list_accounting_contact_duplicates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1100
+ end
1101
+ return data, status_code, headers
1102
+ end
1103
+
1104
+ # Review one group of an import's contacts
1105
+ # The contacts nobody has acted on yet in one group: `matched` (one organization, ready to confirm), `ambiguous` (`reason` says why: `several_customers`, `several_contacts`, `linked_elsewhere`), `unmatched` (no organization: you may create one) or `linked` (an organization books on it already). Paged by cursor: pass `next` as `after`. **Operator token only.**
1106
+ # @param import [String] The import&#39;s public id (&#x60;cimp_&#x60;).
1107
+ # @param state [String]
1108
+ # @param [Hash] opts the optional parameters
1109
+ # @option opts [String] :after The last row&#39;s public id (&#x60;cirw_&#x60;), from &#x60;next&#x60;.
1110
+ # @option opts [Integer] :limit (default to 100)
1111
+ # @return [ListAccountingContactImportRows200Response]
1112
+ def list_accounting_contact_import_rows(import, state, opts = {})
1113
+ data, _status_code, _headers = list_accounting_contact_import_rows_with_http_info(import, state, opts)
1114
+ data
1115
+ end
1116
+
1117
+ # Review one group of an import&#39;s contacts
1118
+ # The contacts nobody has acted on yet in one group: &#x60;matched&#x60; (one organization, ready to confirm), &#x60;ambiguous&#x60; (&#x60;reason&#x60; says why: &#x60;several_customers&#x60;, &#x60;several_contacts&#x60;, &#x60;linked_elsewhere&#x60;), &#x60;unmatched&#x60; (no organization: you may create one) or &#x60;linked&#x60; (an organization books on it already). Paged by cursor: pass &#x60;next&#x60; as &#x60;after&#x60;. **Operator token only.**
1119
+ # @param import [String] The import&#39;s public id (&#x60;cimp_&#x60;).
1120
+ # @param state [String]
1121
+ # @param [Hash] opts the optional parameters
1122
+ # @option opts [String] :after The last row&#39;s public id (&#x60;cirw_&#x60;), from &#x60;next&#x60;.
1123
+ # @option opts [Integer] :limit (default to 100)
1124
+ # @return [Array<(ListAccountingContactImportRows200Response, Integer, Hash)>] ListAccountingContactImportRows200Response data, response status code and response headers
1125
+ def list_accounting_contact_import_rows_with_http_info(import, state, opts = {})
1126
+ if @api_client.config.debugging
1127
+ @api_client.config.logger.debug 'Calling API: AccountingApi.list_accounting_contact_import_rows ...'
1128
+ end
1129
+ # verify the required parameter 'import' is set
1130
+ if @api_client.config.client_side_validation && import.nil?
1131
+ fail ArgumentError, "Missing the required parameter 'import' when calling AccountingApi.list_accounting_contact_import_rows"
1132
+ end
1133
+ # verify the required parameter 'state' is set
1134
+ if @api_client.config.client_side_validation && state.nil?
1135
+ fail ArgumentError, "Missing the required parameter 'state' when calling AccountingApi.list_accounting_contact_import_rows"
1136
+ end
1137
+ # verify enum value
1138
+ allowable_values = ["matched", "ambiguous", "unmatched", "linked"]
1139
+ if @api_client.config.client_side_validation && !allowable_values.include?(state)
1140
+ fail ArgumentError, "invalid value for \"state\", must be one of #{allowable_values}"
1141
+ end
1142
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
1143
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountingApi.list_accounting_contact_import_rows, must be smaller than or equal to 500.'
1144
+ end
1145
+
1146
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1147
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountingApi.list_accounting_contact_import_rows, must be greater than or equal to 1.'
1148
+ end
1149
+
1150
+ # resource path
1151
+ local_var_path = '/accounting/contact-imports/{import}/rows'.sub('{import}', CGI.escape(import.to_s))
1152
+
1153
+ # query parameters
1154
+ query_params = opts[:query_params] || {}
1155
+ query_params[:'state'] = state
1156
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
1157
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1158
+
1159
+ # header parameters
1160
+ header_params = opts[:header_params] || {}
1161
+ # HTTP header 'Accept' (if needed)
1162
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1163
+
1164
+ # form parameters
1165
+ form_params = opts[:form_params] || {}
1166
+
1167
+ # http body (model)
1168
+ post_body = opts[:debug_body]
1169
+
1170
+ # return_type
1171
+ return_type = opts[:debug_return_type] || 'ListAccountingContactImportRows200Response'
1172
+
1173
+ # auth_names
1174
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1175
+
1176
+ new_options = opts.merge(
1177
+ :operation => :"AccountingApi.list_accounting_contact_import_rows",
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
+ :return_type => return_type
1184
+ )
1185
+
1186
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1187
+ if @api_client.config.debugging
1188
+ @api_client.config.logger.debug "API called: AccountingApi#list_accounting_contact_import_rows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1189
+ end
1190
+ return data, status_code, headers
1191
+ end
1192
+
1193
+ # The customers whose last contact sync failed
1194
+ # Newest first, as one cursor page, with the reason each one failed. Empty when the plane has no connection. **Operator token only.**
1195
+ # @param [Hash] opts the optional parameters
1196
+ # @option opts [String] :cursor The opaque &#x60;next_cursor&#x60; from a previous page. Treat it as a black box — echo it back verbatim to fetch the following page. Omit it for the first page. A malformed cursor is a &#x60;400&#x60;.
1197
+ # @option opts [Integer] :limit Maximum items per page (1–100). Defaults to 20. (default to 20)
1198
+ # @return [ListAccountingContactSyncFailures200Response]
1199
+ def list_accounting_contact_sync_failures(opts = {})
1200
+ data, _status_code, _headers = list_accounting_contact_sync_failures_with_http_info(opts)
1201
+ data
1202
+ end
1203
+
1204
+ # The customers whose last contact sync failed
1205
+ # Newest first, as one cursor page, with the reason each one failed. Empty when the plane has no connection. **Operator token only.**
1206
+ # @param [Hash] opts the optional parameters
1207
+ # @option opts [String] :cursor The opaque &#x60;next_cursor&#x60; from a previous page. Treat it as a black box — echo it back verbatim to fetch the following page. Omit it for the first page. A malformed cursor is a &#x60;400&#x60;.
1208
+ # @option opts [Integer] :limit Maximum items per page (1–100). Defaults to 20. (default to 20)
1209
+ # @return [Array<(ListAccountingContactSyncFailures200Response, Integer, Hash)>] ListAccountingContactSyncFailures200Response data, response status code and response headers
1210
+ def list_accounting_contact_sync_failures_with_http_info(opts = {})
1211
+ if @api_client.config.debugging
1212
+ @api_client.config.logger.debug 'Calling API: AccountingApi.list_accounting_contact_sync_failures ...'
1213
+ end
1214
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
1215
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountingApi.list_accounting_contact_sync_failures, must be smaller than or equal to 100.'
1216
+ end
1217
+
1218
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1219
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountingApi.list_accounting_contact_sync_failures, must be greater than or equal to 1.'
1220
+ end
1221
+
1222
+ # resource path
1223
+ local_var_path = '/accounting/contact-sync/failed'
1224
+
1225
+ # query parameters
1226
+ query_params = opts[:query_params] || {}
1227
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1228
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1229
+
1230
+ # header parameters
1231
+ header_params = opts[:header_params] || {}
1232
+ # HTTP header 'Accept' (if needed)
1233
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1234
+
1235
+ # form parameters
1236
+ form_params = opts[:form_params] || {}
1237
+
1238
+ # http body (model)
1239
+ post_body = opts[:debug_body]
1240
+
1241
+ # return_type
1242
+ return_type = opts[:debug_return_type] || 'ListAccountingContactSyncFailures200Response'
1243
+
1244
+ # auth_names
1245
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1246
+
1247
+ new_options = opts.merge(
1248
+ :operation => :"AccountingApi.list_accounting_contact_sync_failures",
1249
+ :header_params => header_params,
1250
+ :query_params => query_params,
1251
+ :form_params => form_params,
1252
+ :body => post_body,
1253
+ :auth_names => auth_names,
1254
+ :return_type => return_type
1255
+ )
1256
+
1257
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1258
+ if @api_client.config.debugging
1259
+ @api_client.config.logger.debug "API called: AccountingApi#list_accounting_contact_sync_failures\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1260
+ end
1261
+ return data, status_code, headers
1262
+ end
1263
+
1264
+ # List the customers the connected accounting system already has
1265
+ # For an app to let a person pick the customer they already invoice in Dinero or e-conomic, and link an organization to it with `accounting_contact` on `PUT /organizations/{org}`. Read live from the accounting system, in the vendor's order. **Operator token only.**
1266
+ # @param [Hash] opts the optional parameters
1267
+ # @option opts [String] :search Only customers whose name holds this; blank lists every customer.
1268
+ # @option opts [Integer] :limit The page size. (default to 200)
1269
+ # @option opts [Integer] :page Zero-based. Ask for the next page while &#x60;has_more&#x60; is true; no call reads every contact. (default to 0)
1270
+ # @return [ListAccountingContacts200Response]
1271
+ def list_accounting_contacts(opts = {})
1272
+ data, _status_code, _headers = list_accounting_contacts_with_http_info(opts)
1273
+ data
1274
+ end
1275
+
1276
+ # List the customers the connected accounting system already has
1277
+ # For an app to let a person pick the customer they already invoice in Dinero or e-conomic, and link an organization to it with &#x60;accounting_contact&#x60; on &#x60;PUT /organizations/{org}&#x60;. Read live from the accounting system, in the vendor&#39;s order. **Operator token only.**
1278
+ # @param [Hash] opts the optional parameters
1279
+ # @option opts [String] :search Only customers whose name holds this; blank lists every customer.
1280
+ # @option opts [Integer] :limit The page size. (default to 200)
1281
+ # @option opts [Integer] :page Zero-based. Ask for the next page while &#x60;has_more&#x60; is true; no call reads every contact. (default to 0)
1282
+ # @return [Array<(ListAccountingContacts200Response, Integer, Hash)>] ListAccountingContacts200Response data, response status code and response headers
1283
+ def list_accounting_contacts_with_http_info(opts = {})
1284
+ if @api_client.config.debugging
1285
+ @api_client.config.logger.debug 'Calling API: AccountingApi.list_accounting_contacts ...'
1286
+ end
1287
+ if @api_client.config.client_side_validation && !opts[:'search'].nil? && opts[:'search'].to_s.length > 120
1288
+ fail ArgumentError, 'invalid value for "opts[:"search"]" when calling AccountingApi.list_accounting_contacts, the character length must be smaller than or equal to 120.'
1289
+ end
1290
+
1291
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
1292
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountingApi.list_accounting_contacts, must be smaller than or equal to 1000.'
1293
+ end
1294
+
1295
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1296
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountingApi.list_accounting_contacts, must be greater than or equal to 1.'
1297
+ end
1298
+
1299
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
1300
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AccountingApi.list_accounting_contacts, must be greater than or equal to 0.'
1301
+ end
1302
+
1303
+ # resource path
1304
+ local_var_path = '/accounting/contacts'
1305
+
1306
+ # query parameters
1307
+ query_params = opts[:query_params] || {}
1308
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
1309
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1310
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1311
+
1312
+ # header parameters
1313
+ header_params = opts[:header_params] || {}
1314
+ # HTTP header 'Accept' (if needed)
1315
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1316
+
1317
+ # form parameters
1318
+ form_params = opts[:form_params] || {}
1319
+
1320
+ # http body (model)
1321
+ post_body = opts[:debug_body]
1322
+
1323
+ # return_type
1324
+ return_type = opts[:debug_return_type] || 'ListAccountingContacts200Response'
1325
+
1326
+ # auth_names
1327
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1328
+
1329
+ new_options = opts.merge(
1330
+ :operation => :"AccountingApi.list_accounting_contacts",
1331
+ :header_params => header_params,
1332
+ :query_params => query_params,
1333
+ :form_params => form_params,
1334
+ :body => post_body,
1335
+ :auth_names => auth_names,
1336
+ :return_type => return_type
1337
+ )
1338
+
1339
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1340
+ if @api_client.config.debugging
1341
+ @api_client.config.logger.debug "API called: AccountingApi#list_accounting_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1342
+ end
1343
+ return data, status_code, headers
1344
+ end
1345
+
1346
+ # List a customer's invoices from the accounting system
1347
+ # What the organization sees in its portal as \"From accounting\": the invoices (and credit notes, where the setting includes them) of the accounting contact it is linked to, newest first, keyset paged with `next_cursor`. Empty while the setting is off, while the organization has no link, and while its contact is shared with another organization. These are not Billing invoices: `GET /invoices` never lists them. **Operator token only.**
1348
+ # @param org [String] The organization&#39;s id or external reference.
1349
+ # @param [Hash] opts the optional parameters
1350
+ # @option opts [String] :cursor
1351
+ # @option opts [Integer] :limit (default to 20)
1352
+ # @return [ListAccountingOrganizationInvoices200Response]
1353
+ def list_accounting_organization_invoices(org, opts = {})
1354
+ data, _status_code, _headers = list_accounting_organization_invoices_with_http_info(org, opts)
1355
+ data
1356
+ end
1357
+
1358
+ # List a customer&#39;s invoices from the accounting system
1359
+ # What the organization sees in its portal as \&quot;From accounting\&quot;: the invoices (and credit notes, where the setting includes them) of the accounting contact it is linked to, newest first, keyset paged with &#x60;next_cursor&#x60;. Empty while the setting is off, while the organization has no link, and while its contact is shared with another organization. These are not Billing invoices: &#x60;GET /invoices&#x60; never lists them. **Operator token only.**
1360
+ # @param org [String] The organization&#39;s id or external reference.
1361
+ # @param [Hash] opts the optional parameters
1362
+ # @option opts [String] :cursor
1363
+ # @option opts [Integer] :limit (default to 20)
1364
+ # @return [Array<(ListAccountingOrganizationInvoices200Response, Integer, Hash)>] ListAccountingOrganizationInvoices200Response data, response status code and response headers
1365
+ def list_accounting_organization_invoices_with_http_info(org, opts = {})
1366
+ if @api_client.config.debugging
1367
+ @api_client.config.logger.debug 'Calling API: AccountingApi.list_accounting_organization_invoices ...'
1368
+ end
1369
+ # verify the required parameter 'org' is set
1370
+ if @api_client.config.client_side_validation && org.nil?
1371
+ fail ArgumentError, "Missing the required parameter 'org' when calling AccountingApi.list_accounting_organization_invoices"
1372
+ end
1373
+ if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'].to_s.length > 200
1374
+ fail ArgumentError, 'invalid value for "opts[:"cursor"]" when calling AccountingApi.list_accounting_organization_invoices, the character length must be smaller than or equal to 200.'
1375
+ end
1376
+
1377
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
1378
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountingApi.list_accounting_organization_invoices, must be smaller than or equal to 100.'
1379
+ end
1380
+
1381
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1382
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountingApi.list_accounting_organization_invoices, must be greater than or equal to 1.'
1383
+ end
1384
+
1385
+ # resource path
1386
+ local_var_path = '/accounting/organizations/{org}/invoices'.sub('{org}', CGI.escape(org.to_s))
1387
+
1388
+ # query parameters
1389
+ query_params = opts[:query_params] || {}
1390
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1391
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1392
+
1393
+ # header parameters
1394
+ header_params = opts[:header_params] || {}
1395
+ # HTTP header 'Accept' (if needed)
1396
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1397
+
1398
+ # form parameters
1399
+ form_params = opts[:form_params] || {}
1400
+
1401
+ # http body (model)
1402
+ post_body = opts[:debug_body]
1403
+
1404
+ # return_type
1405
+ return_type = opts[:debug_return_type] || 'ListAccountingOrganizationInvoices200Response'
1406
+
1407
+ # auth_names
1408
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1409
+
1410
+ new_options = opts.merge(
1411
+ :operation => :"AccountingApi.list_accounting_organization_invoices",
1412
+ :header_params => header_params,
1413
+ :query_params => query_params,
1414
+ :form_params => form_params,
1415
+ :body => post_body,
1416
+ :auth_names => auth_names,
1417
+ :return_type => return_type
1418
+ )
1419
+
1420
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1421
+ if @api_client.config.debugging
1422
+ @api_client.config.logger.debug "API called: AccountingApi#list_accounting_organization_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1423
+ end
1424
+ return data, status_code, headers
1425
+ end
1426
+
1427
+ # List accounting syncs
1428
+ # Documents sent to the accounting system, newest attempt first. **Operator token only.**
1429
+ # @param [Hash] opts the optional parameters
1430
+ # @option opts [String] :status
1431
+ # @option opts [Integer] :limit (default to 50)
1432
+ # @return [ListAccountingSyncs200Response]
1433
+ def list_accounting_syncs(opts = {})
1434
+ data, _status_code, _headers = list_accounting_syncs_with_http_info(opts)
1435
+ data
1436
+ end
1437
+
1438
+ # List accounting syncs
1439
+ # Documents sent to the accounting system, newest attempt first. **Operator token only.**
1440
+ # @param [Hash] opts the optional parameters
1441
+ # @option opts [String] :status
1442
+ # @option opts [Integer] :limit (default to 50)
1443
+ # @return [Array<(ListAccountingSyncs200Response, Integer, Hash)>] ListAccountingSyncs200Response data, response status code and response headers
1444
+ def list_accounting_syncs_with_http_info(opts = {})
1445
+ if @api_client.config.debugging
1446
+ @api_client.config.logger.debug 'Calling API: AccountingApi.list_accounting_syncs ...'
1447
+ end
1448
+ allowable_values = ["pending", "sent", "failed", "waiting"]
1449
+ if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
1450
+ fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
1451
+ end
1452
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
1453
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountingApi.list_accounting_syncs, must be smaller than or equal to 200.'
1454
+ end
1455
+
1456
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1457
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountingApi.list_accounting_syncs, must be greater than or equal to 1.'
1458
+ end
1459
+
1460
+ # resource path
1461
+ local_var_path = '/accounting/syncs'
1462
+
1463
+ # query parameters
1464
+ query_params = opts[:query_params] || {}
1465
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
1466
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1467
+
1468
+ # header parameters
1469
+ header_params = opts[:header_params] || {}
1470
+ # HTTP header 'Accept' (if needed)
1471
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1472
+
1473
+ # form parameters
1474
+ form_params = opts[:form_params] || {}
1475
+
1476
+ # http body (model)
1477
+ post_body = opts[:debug_body]
1478
+
1479
+ # return_type
1480
+ return_type = opts[:debug_return_type] || 'ListAccountingSyncs200Response'
1481
+
1482
+ # auth_names
1483
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1484
+
1485
+ new_options = opts.merge(
1486
+ :operation => :"AccountingApi.list_accounting_syncs",
1487
+ :header_params => header_params,
1488
+ :query_params => query_params,
1489
+ :form_params => form_params,
1490
+ :body => post_body,
1491
+ :auth_names => auth_names,
1492
+ :return_type => return_type
1493
+ )
1494
+
1495
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1496
+ if @api_client.config.debugging
1497
+ @api_client.config.logger.debug "API called: AccountingApi#list_accounting_syncs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1498
+ end
1499
+ return data, status_code, headers
1500
+ end
1501
+
1502
+ # List invoices from the accounting system that no customer is linked to
1503
+ # Invoices read from the accounting system whose contact no organization is linked to, so no customer sees them. Link the contact with `PUT /accounting/organizations/{org}/contact` and that organization sees them at once. Newest read first; pass `next` as `after` for the next page. Empty while the setting is off. **Operator token only.**
1504
+ # @param [Hash] opts the optional parameters
1505
+ # @option opts [String] :after The last document&#39;s public id (&#x60;xinv_&#x60;), from &#x60;next&#x60;.
1506
+ # @option opts [Integer] :limit (default to 50)
1507
+ # @return [ListUnmatchedAccountingInvoices200Response]
1508
+ def list_unmatched_accounting_invoices(opts = {})
1509
+ data, _status_code, _headers = list_unmatched_accounting_invoices_with_http_info(opts)
1510
+ data
1511
+ end
1512
+
1513
+ # List invoices from the accounting system that no customer is linked to
1514
+ # Invoices read from the accounting system whose contact no organization is linked to, so no customer sees them. Link the contact with &#x60;PUT /accounting/organizations/{org}/contact&#x60; and that organization sees them at once. Newest read first; pass &#x60;next&#x60; as &#x60;after&#x60; for the next page. Empty while the setting is off. **Operator token only.**
1515
+ # @param [Hash] opts the optional parameters
1516
+ # @option opts [String] :after The last document&#39;s public id (&#x60;xinv_&#x60;), from &#x60;next&#x60;.
1517
+ # @option opts [Integer] :limit (default to 50)
1518
+ # @return [Array<(ListUnmatchedAccountingInvoices200Response, Integer, Hash)>] ListUnmatchedAccountingInvoices200Response data, response status code and response headers
1519
+ def list_unmatched_accounting_invoices_with_http_info(opts = {})
1520
+ if @api_client.config.debugging
1521
+ @api_client.config.logger.debug 'Calling API: AccountingApi.list_unmatched_accounting_invoices ...'
1522
+ end
1523
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
1524
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountingApi.list_unmatched_accounting_invoices, must be smaller than or equal to 100.'
1525
+ end
1526
+
1527
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1528
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AccountingApi.list_unmatched_accounting_invoices, must be greater than or equal to 1.'
1529
+ end
1530
+
1531
+ # resource path
1532
+ local_var_path = '/accounting/invoices/unmatched'
1533
+
1534
+ # query parameters
1535
+ query_params = opts[:query_params] || {}
1536
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
1537
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1538
+
1539
+ # header parameters
1540
+ header_params = opts[:header_params] || {}
1541
+ # HTTP header 'Accept' (if needed)
1542
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1543
+
1544
+ # form parameters
1545
+ form_params = opts[:form_params] || {}
1546
+
1547
+ # http body (model)
1548
+ post_body = opts[:debug_body]
1549
+
1550
+ # return_type
1551
+ return_type = opts[:debug_return_type] || 'ListUnmatchedAccountingInvoices200Response'
1552
+
1553
+ # auth_names
1554
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1555
+
1556
+ new_options = opts.merge(
1557
+ :operation => :"AccountingApi.list_unmatched_accounting_invoices",
1558
+ :header_params => header_params,
1559
+ :query_params => query_params,
1560
+ :form_params => form_params,
1561
+ :body => post_body,
1562
+ :auth_names => auth_names,
1563
+ :return_type => return_type
1564
+ )
1565
+
1566
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1567
+ if @api_client.config.debugging
1568
+ @api_client.config.logger.debug "API called: AccountingApi#list_unmatched_accounting_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1569
+ end
1570
+ return data, status_code, headers
1571
+ end
1572
+
1573
+ # Resume a stopped contact import
1574
+ # Continues a `failed` import from the page and customer it stopped at; nothing is read twice. **Operator token only.**
1575
+ # @param import [String] The import&#39;s public id (&#x60;cimp_&#x60;).
1576
+ # @param [Hash] opts the optional parameters
1577
+ # @return [StartAccountingContactImport202Response]
1578
+ def resume_accounting_contact_import(import, opts = {})
1579
+ data, _status_code, _headers = resume_accounting_contact_import_with_http_info(import, opts)
1580
+ data
1581
+ end
1582
+
1583
+ # Resume a stopped contact import
1584
+ # Continues a &#x60;failed&#x60; import from the page and customer it stopped at; nothing is read twice. **Operator token only.**
1585
+ # @param import [String] The import&#39;s public id (&#x60;cimp_&#x60;).
1586
+ # @param [Hash] opts the optional parameters
1587
+ # @return [Array<(StartAccountingContactImport202Response, Integer, Hash)>] StartAccountingContactImport202Response data, response status code and response headers
1588
+ def resume_accounting_contact_import_with_http_info(import, opts = {})
1589
+ if @api_client.config.debugging
1590
+ @api_client.config.logger.debug 'Calling API: AccountingApi.resume_accounting_contact_import ...'
1591
+ end
1592
+ # verify the required parameter 'import' is set
1593
+ if @api_client.config.client_side_validation && import.nil?
1594
+ fail ArgumentError, "Missing the required parameter 'import' when calling AccountingApi.resume_accounting_contact_import"
1595
+ end
1596
+ # resource path
1597
+ local_var_path = '/accounting/contact-imports/{import}/resume'.sub('{import}', CGI.escape(import.to_s))
1598
+
1599
+ # query parameters
1600
+ query_params = opts[:query_params] || {}
1601
+
1602
+ # header parameters
1603
+ header_params = opts[:header_params] || {}
1604
+ # HTTP header 'Accept' (if needed)
1605
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1606
+
1607
+ # form parameters
1608
+ form_params = opts[:form_params] || {}
1609
+
1610
+ # http body (model)
1611
+ post_body = opts[:debug_body]
1612
+
1613
+ # return_type
1614
+ return_type = opts[:debug_return_type] || 'StartAccountingContactImport202Response'
1615
+
1616
+ # auth_names
1617
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1618
+
1619
+ new_options = opts.merge(
1620
+ :operation => :"AccountingApi.resume_accounting_contact_import",
1621
+ :header_params => header_params,
1622
+ :query_params => query_params,
1623
+ :form_params => form_params,
1624
+ :body => post_body,
1625
+ :auth_names => auth_names,
1626
+ :return_type => return_type
1627
+ )
1628
+
1629
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1630
+ if @api_client.config.debugging
1631
+ @api_client.config.logger.debug "API called: AccountingApi#resume_accounting_contact_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1632
+ end
1633
+ return data, status_code, headers
1634
+ end
1635
+
1636
+ # Retry an accounting sync
1637
+ # Send a document again. **Operator token only.** A sent document cannot be retried, and a customer goes with the document that names it.
1638
+ # @param sync [String] The sync&#39;s public id (&#x60;csyn_&#x60;).
1639
+ # @param [Hash] opts the optional parameters
1640
+ # @return [RetryAccountingSync202Response]
1641
+ def retry_accounting_sync(sync, opts = {})
1642
+ data, _status_code, _headers = retry_accounting_sync_with_http_info(sync, opts)
1643
+ data
1644
+ end
1645
+
1646
+ # Retry an accounting sync
1647
+ # Send a document again. **Operator token only.** A sent document cannot be retried, and a customer goes with the document that names it.
1648
+ # @param sync [String] The sync&#39;s public id (&#x60;csyn_&#x60;).
1649
+ # @param [Hash] opts the optional parameters
1650
+ # @return [Array<(RetryAccountingSync202Response, Integer, Hash)>] RetryAccountingSync202Response data, response status code and response headers
1651
+ def retry_accounting_sync_with_http_info(sync, opts = {})
1652
+ if @api_client.config.debugging
1653
+ @api_client.config.logger.debug 'Calling API: AccountingApi.retry_accounting_sync ...'
1654
+ end
1655
+ # verify the required parameter 'sync' is set
1656
+ if @api_client.config.client_side_validation && sync.nil?
1657
+ fail ArgumentError, "Missing the required parameter 'sync' when calling AccountingApi.retry_accounting_sync"
1658
+ end
1659
+ # resource path
1660
+ local_var_path = '/accounting/syncs/{sync}/retry'.sub('{sync}', CGI.escape(sync.to_s))
1661
+
1662
+ # query parameters
1663
+ query_params = opts[:query_params] || {}
1664
+
1665
+ # header parameters
1666
+ header_params = opts[:header_params] || {}
1667
+ # HTTP header 'Accept' (if needed)
1668
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1669
+
1670
+ # form parameters
1671
+ form_params = opts[:form_params] || {}
1672
+
1673
+ # http body (model)
1674
+ post_body = opts[:debug_body]
1675
+
1676
+ # return_type
1677
+ return_type = opts[:debug_return_type] || 'RetryAccountingSync202Response'
1678
+
1679
+ # auth_names
1680
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1681
+
1682
+ new_options = opts.merge(
1683
+ :operation => :"AccountingApi.retry_accounting_sync",
1684
+ :header_params => header_params,
1685
+ :query_params => query_params,
1686
+ :form_params => form_params,
1687
+ :body => post_body,
1688
+ :auth_names => auth_names,
1689
+ :return_type => return_type
1690
+ )
1691
+
1692
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1693
+ if @api_client.config.debugging
1694
+ @api_client.config.logger.debug "API called: AccountingApi#retry_accounting_sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1695
+ end
1696
+ return data, status_code, headers
1697
+ end
1698
+
1699
+ # Leave imported contacts alone
1700
+ # The named rows drop out of the review. Nothing is linked or created. **Operator token only.**
1701
+ # @param import [String] The import&#39;s public id (&#x60;cimp_&#x60;).
1702
+ # @param skip_accounting_contact_import_rows_request [SkipAccountingContactImportRowsRequest]
1703
+ # @param [Hash] opts the optional parameters
1704
+ # @return [SkipAccountingContactImportRows200Response]
1705
+ def skip_accounting_contact_import_rows(import, skip_accounting_contact_import_rows_request, opts = {})
1706
+ data, _status_code, _headers = skip_accounting_contact_import_rows_with_http_info(import, skip_accounting_contact_import_rows_request, opts)
1707
+ data
1708
+ end
1709
+
1710
+ # Leave imported contacts alone
1711
+ # The named rows drop out of the review. Nothing is linked or created. **Operator token only.**
1712
+ # @param import [String] The import&#39;s public id (&#x60;cimp_&#x60;).
1713
+ # @param skip_accounting_contact_import_rows_request [SkipAccountingContactImportRowsRequest]
1714
+ # @param [Hash] opts the optional parameters
1715
+ # @return [Array<(SkipAccountingContactImportRows200Response, Integer, Hash)>] SkipAccountingContactImportRows200Response data, response status code and response headers
1716
+ def skip_accounting_contact_import_rows_with_http_info(import, skip_accounting_contact_import_rows_request, opts = {})
1717
+ if @api_client.config.debugging
1718
+ @api_client.config.logger.debug 'Calling API: AccountingApi.skip_accounting_contact_import_rows ...'
1719
+ end
1720
+ # verify the required parameter 'import' is set
1721
+ if @api_client.config.client_side_validation && import.nil?
1722
+ fail ArgumentError, "Missing the required parameter 'import' when calling AccountingApi.skip_accounting_contact_import_rows"
1723
+ end
1724
+ # verify the required parameter 'skip_accounting_contact_import_rows_request' is set
1725
+ if @api_client.config.client_side_validation && skip_accounting_contact_import_rows_request.nil?
1726
+ fail ArgumentError, "Missing the required parameter 'skip_accounting_contact_import_rows_request' when calling AccountingApi.skip_accounting_contact_import_rows"
1727
+ end
1728
+ # resource path
1729
+ local_var_path = '/accounting/contact-imports/{import}/skip'.sub('{import}', CGI.escape(import.to_s))
1730
+
1731
+ # query parameters
1732
+ query_params = opts[:query_params] || {}
1733
+
1734
+ # header parameters
1735
+ header_params = opts[:header_params] || {}
1736
+ # HTTP header 'Accept' (if needed)
1737
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1738
+ # HTTP header 'Content-Type'
1739
+ content_type = @api_client.select_header_content_type(['application/json'])
1740
+ if !content_type.nil?
1741
+ header_params['Content-Type'] = content_type
1742
+ end
1743
+
1744
+ # form parameters
1745
+ form_params = opts[:form_params] || {}
1746
+
1747
+ # http body (model)
1748
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(skip_accounting_contact_import_rows_request)
1749
+
1750
+ # return_type
1751
+ return_type = opts[:debug_return_type] || 'SkipAccountingContactImportRows200Response'
1752
+
1753
+ # auth_names
1754
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1755
+
1756
+ new_options = opts.merge(
1757
+ :operation => :"AccountingApi.skip_accounting_contact_import_rows",
1758
+ :header_params => header_params,
1759
+ :query_params => query_params,
1760
+ :form_params => form_params,
1761
+ :body => post_body,
1762
+ :auth_names => auth_names,
1763
+ :return_type => return_type
1764
+ )
1765
+
1766
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1767
+ if @api_client.config.debugging
1768
+ @api_client.config.logger.debug "API called: AccountingApi#skip_accounting_contact_import_rows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1769
+ end
1770
+ return data, status_code, headers
1771
+ end
1772
+
1773
+ # Import the accounting system's contacts and match them to customers
1774
+ # Starts a queued import: the vendor's contacts are read a page at a time and matched to the plane's organizations by CVR/VAT number, then email, then exact name (lower case, punctuation and spacing ignored). Two different CVR/VAT numbers are never a match. Nothing is written anywhere until you confirm; nothing is ever written to the vendor. One import runs at a time: asking again while one runs answers that one. **Operator token only.**
1775
+ # @param [Hash] opts the optional parameters
1776
+ # @return [StartAccountingContactImport202Response]
1777
+ def start_accounting_contact_import(opts = {})
1778
+ data, _status_code, _headers = start_accounting_contact_import_with_http_info(opts)
1779
+ data
1780
+ end
1781
+
1782
+ # Import the accounting system&#39;s contacts and match them to customers
1783
+ # Starts a queued import: the vendor&#39;s contacts are read a page at a time and matched to the plane&#39;s organizations by CVR/VAT number, then email, then exact name (lower case, punctuation and spacing ignored). Two different CVR/VAT numbers are never a match. Nothing is written anywhere until you confirm; nothing is ever written to the vendor. One import runs at a time: asking again while one runs answers that one. **Operator token only.**
1784
+ # @param [Hash] opts the optional parameters
1785
+ # @return [Array<(StartAccountingContactImport202Response, Integer, Hash)>] StartAccountingContactImport202Response data, response status code and response headers
1786
+ def start_accounting_contact_import_with_http_info(opts = {})
1787
+ if @api_client.config.debugging
1788
+ @api_client.config.logger.debug 'Calling API: AccountingApi.start_accounting_contact_import ...'
1789
+ end
1790
+ # resource path
1791
+ local_var_path = '/accounting/contact-imports'
1792
+
1793
+ # query parameters
1794
+ query_params = opts[:query_params] || {}
1795
+
1796
+ # header parameters
1797
+ header_params = opts[:header_params] || {}
1798
+ # HTTP header 'Accept' (if needed)
1799
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1800
+
1801
+ # form parameters
1802
+ form_params = opts[:form_params] || {}
1803
+
1804
+ # http body (model)
1805
+ post_body = opts[:debug_body]
1806
+
1807
+ # return_type
1808
+ return_type = opts[:debug_return_type] || 'StartAccountingContactImport202Response'
1809
+
1810
+ # auth_names
1811
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1812
+
1813
+ new_options = opts.merge(
1814
+ :operation => :"AccountingApi.start_accounting_contact_import",
1815
+ :header_params => header_params,
1816
+ :query_params => query_params,
1817
+ :form_params => form_params,
1818
+ :body => post_body,
1819
+ :auth_names => auth_names,
1820
+ :return_type => return_type
1821
+ )
1822
+
1823
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1824
+ if @api_client.config.debugging
1825
+ @api_client.config.logger.debug "API called: AccountingApi#start_accounting_contact_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1826
+ end
1827
+ return data, status_code, headers
1828
+ end
1829
+
1830
+ # Unlink a customer from the contact a person linked
1831
+ # Takes back a link made through the console or the API. A contact the sync itself created for this organization is its own record and stays (`409 accounting_contact_not_linked`): link another contact to replace it. Nothing changes at the vendor. **Operator token only.**
1832
+ # @param org [String]
1833
+ # @param [Hash] opts the optional parameters
1834
+ # @return [LinkAccountingContact200Response]
1835
+ def unlink_accounting_contact(org, opts = {})
1836
+ data, _status_code, _headers = unlink_accounting_contact_with_http_info(org, opts)
1837
+ data
1838
+ end
1839
+
1840
+ # Unlink a customer from the contact a person linked
1841
+ # Takes back a link made through the console or the API. A contact the sync itself created for this organization is its own record and stays (&#x60;409 accounting_contact_not_linked&#x60;): link another contact to replace it. Nothing changes at the vendor. **Operator token only.**
1842
+ # @param org [String]
1843
+ # @param [Hash] opts the optional parameters
1844
+ # @return [Array<(LinkAccountingContact200Response, Integer, Hash)>] LinkAccountingContact200Response data, response status code and response headers
1845
+ def unlink_accounting_contact_with_http_info(org, opts = {})
1846
+ if @api_client.config.debugging
1847
+ @api_client.config.logger.debug 'Calling API: AccountingApi.unlink_accounting_contact ...'
1848
+ end
1849
+ # verify the required parameter 'org' is set
1850
+ if @api_client.config.client_side_validation && org.nil?
1851
+ fail ArgumentError, "Missing the required parameter 'org' when calling AccountingApi.unlink_accounting_contact"
1852
+ end
1853
+ # resource path
1854
+ local_var_path = '/accounting/organizations/{org}/contact'.sub('{org}', CGI.escape(org.to_s))
1855
+
1856
+ # query parameters
1857
+ query_params = opts[:query_params] || {}
1858
+
1859
+ # header parameters
1860
+ header_params = opts[:header_params] || {}
1861
+ # HTTP header 'Accept' (if needed)
1862
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1863
+
1864
+ # form parameters
1865
+ form_params = opts[:form_params] || {}
1866
+
1867
+ # http body (model)
1868
+ post_body = opts[:debug_body]
1869
+
1870
+ # return_type
1871
+ return_type = opts[:debug_return_type] || 'LinkAccountingContact200Response'
1872
+
1873
+ # auth_names
1874
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1875
+
1876
+ new_options = opts.merge(
1877
+ :operation => :"AccountingApi.unlink_accounting_contact",
1878
+ :header_params => header_params,
1879
+ :query_params => query_params,
1880
+ :form_params => form_params,
1881
+ :body => post_body,
1882
+ :auth_names => auth_names,
1883
+ :return_type => return_type
1884
+ )
1885
+
1886
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1887
+ if @api_client.config.debugging
1888
+ @api_client.config.logger.debug "API called: AccountingApi#unlink_accounting_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1889
+ end
1890
+ return data, status_code, headers
1891
+ end
1892
+ end
1893
+ end