orb-billing 1.59.0 → 1.61.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 (420) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -0
  3. data/README.md +1 -1
  4. data/lib/orb/client.rb +4 -0
  5. data/lib/orb/models/account/billing_entity.rb +214 -0
  6. data/lib/orb/models/account/billing_entity_archive_by_external_id_params.rb +22 -0
  7. data/lib/orb/models/account/billing_entity_archive_params.rb +22 -0
  8. data/lib/orb/models/account/billing_entity_create_params.rb +117 -0
  9. data/lib/orb/models/account/billing_entity_fetch_by_external_id_params.rb +22 -0
  10. data/lib/orb/models/account/billing_entity_fetch_params.rb +22 -0
  11. data/lib/orb/models/account/billing_entity_list_params.rb +55 -0
  12. data/lib/orb/models/account/billing_entity_unarchive_by_external_id_params.rb +22 -0
  13. data/lib/orb/models/account/billing_entity_unarchive_params.rb +22 -0
  14. data/lib/orb/models/account/billing_entity_update_by_external_id_params.rb +177 -0
  15. data/lib/orb/models/account/billing_entity_update_params.rb +179 -0
  16. data/lib/orb/models/account/payment_gateway_connection.rb +75 -0
  17. data/lib/orb/models/account/payment_gateway_connection_fetch_params.rb +22 -0
  18. data/lib/orb/models/account/payment_gateway_connection_list_params.rb +65 -0
  19. data/lib/orb/models/alert.rb +9 -1
  20. data/lib/orb/models/changed_subscription_resources.rb +9 -1
  21. data/lib/orb/models/credit_note.rb +9 -1
  22. data/lib/orb/models/credit_note_list_params.rb +11 -1
  23. data/lib/orb/models/customer.rb +12 -3
  24. data/lib/orb/models/customer_create_params.rb +10 -1
  25. data/lib/orb/models/customer_credit_balance_depleted_webhook_event.rb +9 -1
  26. data/lib/orb/models/customer_credit_balance_dropped_webhook_event.rb +9 -1
  27. data/lib/orb/models/customer_credit_balance_recovered_webhook_event.rb +9 -1
  28. data/lib/orb/models/customer_edited_webhook_event.rb +8 -1
  29. data/lib/orb/models/customer_update_by_external_id_params.rb +10 -1
  30. data/lib/orb/models/customer_update_params.rb +10 -1
  31. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +7 -7
  32. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +7 -7
  33. data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +6 -4
  34. data/lib/orb/models/customers/credits/top_up_create_params.rb +6 -4
  35. data/lib/orb/models/customers/credits/top_up_invoice_settings.rb +6 -4
  36. data/lib/orb/models/customers/customer_payment_gateway_connection.rb +89 -0
  37. data/lib/orb/models/customers/payment_gateway_connection_create_by_external_id_params.rb +53 -0
  38. data/lib/orb/models/customers/payment_gateway_connection_create_params.rb +52 -0
  39. data/lib/orb/models/customers/payment_gateway_connection_delete_by_external_id_params.rb +28 -0
  40. data/lib/orb/models/customers/payment_gateway_connection_delete_params.rb +28 -0
  41. data/lib/orb/models/customers/payment_gateway_connection_list_by_external_id_params.rb +39 -0
  42. data/lib/orb/models/customers/payment_gateway_connection_list_by_external_id_response.rb +25 -0
  43. data/lib/orb/models/customers/payment_gateway_connection_list_params.rb +39 -0
  44. data/lib/orb/models/customers/payment_gateway_connection_list_response.rb +25 -0
  45. data/lib/orb/models/customers/payment_gateway_connection_update_by_external_id_params.rb +68 -0
  46. data/lib/orb/models/customers/payment_gateway_connection_update_params.rb +67 -0
  47. data/lib/orb/models/invoice.rb +9 -1
  48. data/lib/orb/models/invoice_create_params.rb +25 -7
  49. data/lib/orb/models/invoice_fetch_upcoming_response.rb +9 -1
  50. data/lib/orb/models/invoice_issue_summary_response.rb +9 -1
  51. data/lib/orb/models/invoice_issued_summary_webhook_event.rb +9 -1
  52. data/lib/orb/models/invoice_list_params.rb +11 -1
  53. data/lib/orb/models/invoice_list_summary_params.rb +11 -1
  54. data/lib/orb/models/invoice_list_summary_response.rb +9 -1
  55. data/lib/orb/models/invoice_update_params.rb +7 -6
  56. data/lib/orb/models/mutated_subscription.rb +16 -6
  57. data/lib/orb/models/payment_method_created_webhook_event.rb +3 -2
  58. data/lib/orb/models/payment_method_deleted_webhook_event.rb +3 -2
  59. data/lib/orb/models/plan.rb +26 -8
  60. data/lib/orb/models/plan_create_params.rb +15 -5
  61. data/lib/orb/models/plan_created_webhook_event.rb +9 -1
  62. data/lib/orb/models/plan_default_version_set_webhook_event.rb +9 -1
  63. data/lib/orb/models/plan_edited_webhook_event.rb +7 -1
  64. data/lib/orb/models/plan_update_params.rb +10 -1
  65. data/lib/orb/models/plan_version_created_webhook_event.rb +9 -1
  66. data/lib/orb/models/plans/external_plan_id_update_params.rb +10 -1
  67. data/lib/orb/models/subscription.rb +16 -6
  68. data/lib/orb/models/subscription_alert_disabled_webhook_event.rb +18 -2
  69. data/lib/orb/models/subscription_cost_exceeded_webhook_event.rb +9 -1
  70. data/lib/orb/models/subscription_create_params.rb +27 -5
  71. data/lib/orb/models/subscription_fetch_schedule_response.rb +9 -1
  72. data/lib/orb/models/subscription_grouped_cost_exceeded_webhook_event.rb +18 -2
  73. data/lib/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rb +9 -1
  74. data/lib/orb/models/subscription_license_allocation_reset_webhook_event.rb +9 -1
  75. data/lib/orb/models/subscription_license_balance_threshold_reached_webhook_event.rb +18 -2
  76. data/lib/orb/models/subscription_list_params.rb +11 -1
  77. data/lib/orb/models/subscription_list_summary_params.rb +11 -1
  78. data/lib/orb/models/subscription_list_summary_response.rb +9 -1
  79. data/lib/orb/models/subscription_schedule_plan_change_params.rb +7 -4
  80. data/lib/orb/models/subscription_spend_exceeded_webhook_event.rb +9 -1
  81. data/lib/orb/models/subscription_update_params.rb +7 -5
  82. data/lib/orb/models/subscription_usage_exceeded_webhook_event.rb +9 -1
  83. data/lib/orb/models/webhooks/customer_credit_balance_depleted_standard_webhook_event.rb +9 -1
  84. data/lib/orb/models/webhooks/customer_credit_balance_dropped_standard_webhook_event.rb +9 -1
  85. data/lib/orb/models/webhooks/customer_credit_balance_recovered_standard_webhook_event.rb +9 -1
  86. data/lib/orb/models/webhooks/customer_edited_standard_webhook_event.rb +8 -1
  87. data/lib/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rb +9 -1
  88. data/lib/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rb +9 -1
  89. data/lib/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rb +9 -1
  90. data/lib/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rb +9 -1
  91. data/lib/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rb +9 -1
  92. data/lib/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rb +9 -1
  93. data/lib/orb/models/webhooks/invoice_edited_standard_webhook_event.rb +9 -1
  94. data/lib/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rb +9 -1
  95. data/lib/orb/models/webhooks/invoice_issued_standard_webhook_event.rb +9 -1
  96. data/lib/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rb +9 -1
  97. data/lib/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rb +9 -1
  98. data/lib/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rb +9 -1
  99. data/lib/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rb +9 -1
  100. data/lib/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rb +9 -1
  101. data/lib/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rb +9 -1
  102. data/lib/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rb +9 -1
  103. data/lib/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rb +9 -1
  104. data/lib/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rb +9 -1
  105. data/lib/orb/models/webhooks/payment_method_created_standard_webhook_event.rb +3 -2
  106. data/lib/orb/models/webhooks/payment_method_deleted_standard_webhook_event.rb +3 -2
  107. data/lib/orb/models/webhooks/plan_created_standard_webhook_event.rb +9 -1
  108. data/lib/orb/models/webhooks/plan_default_version_set_standard_webhook_event.rb +9 -1
  109. data/lib/orb/models/webhooks/plan_edited_standard_webhook_event.rb +7 -1
  110. data/lib/orb/models/webhooks/plan_version_created_standard_webhook_event.rb +9 -1
  111. data/lib/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rb +9 -1
  112. data/lib/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rb +9 -1
  113. data/lib/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rb +9 -1
  114. data/lib/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rb +9 -1
  115. data/lib/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rb +18 -2
  116. data/lib/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rb +9 -1
  117. data/lib/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rb +9 -1
  118. data/lib/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rb +18 -2
  119. data/lib/orb/models/webhooks/subscription_created_standard_webhook_event.rb +9 -1
  120. data/lib/orb/models/webhooks/subscription_edited_standard_webhook_event.rb +9 -1
  121. data/lib/orb/models/webhooks/subscription_ended_standard_webhook_event.rb +9 -1
  122. data/lib/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rb +9 -1
  123. data/lib/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rb +18 -2
  124. data/lib/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rb +9 -1
  125. data/lib/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rb +9 -1
  126. data/lib/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rb +18 -2
  127. data/lib/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rb +9 -1
  128. data/lib/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rb +9 -1
  129. data/lib/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rb +9 -1
  130. data/lib/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rb +9 -1
  131. data/lib/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rb +18 -2
  132. data/lib/orb/models/webhooks/subscription_started_standard_webhook_event.rb +9 -1
  133. data/lib/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rb +9 -1
  134. data/lib/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rb +18 -2
  135. data/lib/orb/models.rb +2 -0
  136. data/lib/orb/resources/account/billing_entities.rb +321 -0
  137. data/lib/orb/resources/account/payment_gateway_connections.rb +71 -0
  138. data/lib/orb/resources/account.rb +26 -0
  139. data/lib/orb/resources/credit_notes.rb +4 -3
  140. data/lib/orb/resources/customers/payment_gateway_connections.rb +310 -0
  141. data/lib/orb/resources/customers.rb +31 -3
  142. data/lib/orb/resources/invoices.rb +13 -5
  143. data/lib/orb/resources/plans/external_plan_id.rb +3 -1
  144. data/lib/orb/resources/plans.rb +7 -3
  145. data/lib/orb/resources/subscriptions.rb +14 -6
  146. data/lib/orb/version.rb +1 -1
  147. data/lib/orb.rb +29 -0
  148. data/rbi/orb/client.rbi +3 -0
  149. data/rbi/orb/models/account/billing_entity.rbi +342 -0
  150. data/rbi/orb/models/account/billing_entity_archive_by_external_id_params.rbi +43 -0
  151. data/rbi/orb/models/account/billing_entity_archive_params.rbi +40 -0
  152. data/rbi/orb/models/account/billing_entity_create_params.rbi +208 -0
  153. data/rbi/orb/models/account/billing_entity_fetch_by_external_id_params.rbi +43 -0
  154. data/rbi/orb/models/account/billing_entity_fetch_params.rbi +40 -0
  155. data/rbi/orb/models/account/billing_entity_list_params.rbi +108 -0
  156. data/rbi/orb/models/account/billing_entity_unarchive_by_external_id_params.rbi +43 -0
  157. data/rbi/orb/models/account/billing_entity_unarchive_params.rbi +40 -0
  158. data/rbi/orb/models/account/billing_entity_update_by_external_id_params.rbi +335 -0
  159. data/rbi/orb/models/account/billing_entity_update_params.rbi +331 -0
  160. data/rbi/orb/models/account/payment_gateway_connection.rbi +125 -0
  161. data/rbi/orb/models/account/payment_gateway_connection_fetch_params.rbi +43 -0
  162. data/rbi/orb/models/account/payment_gateway_connection_list_params.rbi +124 -0
  163. data/rbi/orb/models/alert.rbi +11 -3
  164. data/rbi/orb/models/changed_subscription_resources.rbi +8 -0
  165. data/rbi/orb/models/credit_note.rbi +8 -0
  166. data/rbi/orb/models/credit_note_list_params.rbi +12 -0
  167. data/rbi/orb/models/customer.rbi +12 -2
  168. data/rbi/orb/models/customer_create_params.rbi +10 -0
  169. data/rbi/orb/models/customer_credit_balance_depleted_webhook_event.rbi +11 -3
  170. data/rbi/orb/models/customer_credit_balance_dropped_webhook_event.rbi +11 -3
  171. data/rbi/orb/models/customer_credit_balance_recovered_webhook_event.rbi +11 -3
  172. data/rbi/orb/models/customer_edited_webhook_event.rbi +6 -0
  173. data/rbi/orb/models/customer_update_by_external_id_params.rbi +10 -0
  174. data/rbi/orb/models/customer_update_params.rbi +10 -0
  175. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +12 -12
  176. data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +12 -12
  177. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +10 -6
  178. data/rbi/orb/models/customers/credits/top_up_create_params.rbi +10 -6
  179. data/rbi/orb/models/customers/credits/top_up_invoice_settings.rbi +10 -6
  180. data/rbi/orb/models/customers/customer_payment_gateway_connection.rbi +139 -0
  181. data/rbi/orb/models/customers/payment_gateway_connection_create_by_external_id_params.rbi +77 -0
  182. data/rbi/orb/models/customers/payment_gateway_connection_create_params.rbi +77 -0
  183. data/rbi/orb/models/customers/payment_gateway_connection_delete_by_external_id_params.rbi +52 -0
  184. data/rbi/orb/models/customers/payment_gateway_connection_delete_params.rbi +52 -0
  185. data/rbi/orb/models/customers/payment_gateway_connection_list_by_external_id_params.rbi +62 -0
  186. data/rbi/orb/models/customers/payment_gateway_connection_list_by_external_id_response.rbi +47 -0
  187. data/rbi/orb/models/customers/payment_gateway_connection_list_params.rbi +62 -0
  188. data/rbi/orb/models/customers/payment_gateway_connection_list_response.rbi +47 -0
  189. data/rbi/orb/models/customers/payment_gateway_connection_update_by_external_id_params.rbi +120 -0
  190. data/rbi/orb/models/customers/payment_gateway_connection_update_params.rbi +120 -0
  191. data/rbi/orb/models/invoice.rbi +8 -0
  192. data/rbi/orb/models/invoice_create_params.rbi +30 -10
  193. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +8 -0
  194. data/rbi/orb/models/invoice_issue_summary_response.rbi +8 -0
  195. data/rbi/orb/models/invoice_issued_summary_webhook_event.rbi +8 -0
  196. data/rbi/orb/models/invoice_list_params.rbi +12 -0
  197. data/rbi/orb/models/invoice_list_summary_params.rbi +12 -0
  198. data/rbi/orb/models/invoice_list_summary_response.rbi +8 -0
  199. data/rbi/orb/models/invoice_update_params.rbi +12 -10
  200. data/rbi/orb/models/mutated_subscription.rbi +20 -8
  201. data/rbi/orb/models/payment_method_created_webhook_event.rbi +4 -2
  202. data/rbi/orb/models/payment_method_deleted_webhook_event.rbi +4 -2
  203. data/rbi/orb/models/plan.rbi +33 -13
  204. data/rbi/orb/models/plan_create_params.rbi +18 -6
  205. data/rbi/orb/models/plan_created_webhook_event.rbi +11 -3
  206. data/rbi/orb/models/plan_default_version_set_webhook_event.rbi +11 -3
  207. data/rbi/orb/models/plan_edited_webhook_event.rbi +6 -0
  208. data/rbi/orb/models/plan_update_params.rbi +10 -0
  209. data/rbi/orb/models/plan_version_created_webhook_event.rbi +11 -3
  210. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +10 -0
  211. data/rbi/orb/models/subscription.rbi +20 -8
  212. data/rbi/orb/models/subscription_alert_disabled_webhook_event.rbi +22 -6
  213. data/rbi/orb/models/subscription_cost_exceeded_webhook_event.rbi +11 -3
  214. data/rbi/orb/models/subscription_create_params.rbi +34 -6
  215. data/rbi/orb/models/subscription_fetch_schedule_response.rbi +11 -3
  216. data/rbi/orb/models/subscription_grouped_cost_exceeded_webhook_event.rbi +22 -6
  217. data/rbi/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rbi +11 -3
  218. data/rbi/orb/models/subscription_license_allocation_reset_webhook_event.rbi +11 -3
  219. data/rbi/orb/models/subscription_license_balance_threshold_reached_webhook_event.rbi +22 -6
  220. data/rbi/orb/models/subscription_list_params.rbi +12 -0
  221. data/rbi/orb/models/subscription_list_summary_params.rbi +12 -0
  222. data/rbi/orb/models/subscription_list_summary_response.rbi +11 -3
  223. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +12 -6
  224. data/rbi/orb/models/subscription_spend_exceeded_webhook_event.rbi +11 -3
  225. data/rbi/orb/models/subscription_update_params.rbi +12 -8
  226. data/rbi/orb/models/subscription_usage_exceeded_webhook_event.rbi +11 -3
  227. data/rbi/orb/models/webhooks/customer_credit_balance_depleted_standard_webhook_event.rbi +11 -3
  228. data/rbi/orb/models/webhooks/customer_credit_balance_dropped_standard_webhook_event.rbi +11 -3
  229. data/rbi/orb/models/webhooks/customer_credit_balance_recovered_standard_webhook_event.rbi +11 -3
  230. data/rbi/orb/models/webhooks/customer_edited_standard_webhook_event.rbi +6 -0
  231. data/rbi/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rbi +8 -0
  232. data/rbi/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rbi +8 -0
  233. data/rbi/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rbi +8 -0
  234. data/rbi/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rbi +8 -0
  235. data/rbi/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rbi +8 -0
  236. data/rbi/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rbi +8 -0
  237. data/rbi/orb/models/webhooks/invoice_edited_standard_webhook_event.rbi +8 -0
  238. data/rbi/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rbi +8 -0
  239. data/rbi/orb/models/webhooks/invoice_issued_standard_webhook_event.rbi +8 -0
  240. data/rbi/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rbi +8 -0
  241. data/rbi/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rbi +8 -0
  242. data/rbi/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rbi +8 -0
  243. data/rbi/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rbi +8 -0
  244. data/rbi/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rbi +8 -0
  245. data/rbi/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rbi +8 -0
  246. data/rbi/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rbi +8 -0
  247. data/rbi/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rbi +8 -0
  248. data/rbi/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rbi +8 -0
  249. data/rbi/orb/models/webhooks/payment_method_created_standard_webhook_event.rbi +4 -2
  250. data/rbi/orb/models/webhooks/payment_method_deleted_standard_webhook_event.rbi +4 -2
  251. data/rbi/orb/models/webhooks/plan_created_standard_webhook_event.rbi +11 -3
  252. data/rbi/orb/models/webhooks/plan_default_version_set_standard_webhook_event.rbi +11 -3
  253. data/rbi/orb/models/webhooks/plan_edited_standard_webhook_event.rbi +6 -0
  254. data/rbi/orb/models/webhooks/plan_version_created_standard_webhook_event.rbi +11 -3
  255. data/rbi/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rbi +8 -0
  256. data/rbi/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rbi +8 -0
  257. data/rbi/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rbi +11 -3
  258. data/rbi/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rbi +11 -3
  259. data/rbi/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rbi +22 -6
  260. data/rbi/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rbi +11 -3
  261. data/rbi/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rbi +11 -3
  262. data/rbi/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rbi +22 -6
  263. data/rbi/orb/models/webhooks/subscription_created_standard_webhook_event.rbi +11 -3
  264. data/rbi/orb/models/webhooks/subscription_edited_standard_webhook_event.rbi +11 -3
  265. data/rbi/orb/models/webhooks/subscription_ended_standard_webhook_event.rbi +11 -3
  266. data/rbi/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rbi +11 -3
  267. data/rbi/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rbi +22 -6
  268. data/rbi/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rbi +11 -3
  269. data/rbi/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rbi +11 -3
  270. data/rbi/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rbi +22 -6
  271. data/rbi/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rbi +11 -3
  272. data/rbi/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rbi +11 -3
  273. data/rbi/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rbi +11 -3
  274. data/rbi/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rbi +11 -3
  275. data/rbi/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rbi +22 -6
  276. data/rbi/orb/models/webhooks/subscription_started_standard_webhook_event.rbi +11 -3
  277. data/rbi/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rbi +11 -3
  278. data/rbi/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rbi +22 -6
  279. data/rbi/orb/models.rbi +2 -0
  280. data/rbi/orb/resources/account/billing_entities.rbi +289 -0
  281. data/rbi/orb/resources/account/payment_gateway_connections.rbi +54 -0
  282. data/rbi/orb/resources/account.rbi +22 -0
  283. data/rbi/orb/resources/credit_notes.rbi +6 -2
  284. data/rbi/orb/resources/customers/payment_gateway_connections.rbi +234 -0
  285. data/rbi/orb/resources/customers.rbi +33 -0
  286. data/rbi/orb/resources/invoices.rbi +29 -10
  287. data/rbi/orb/resources/plans/external_plan_id.rbi +4 -0
  288. data/rbi/orb/resources/plans.rbi +12 -3
  289. data/rbi/orb/resources/subscriptions.rbi +37 -10
  290. data/sig/orb/client.rbs +2 -0
  291. data/sig/orb/models/account/billing_entity.rbs +155 -0
  292. data/sig/orb/models/account/billing_entity_archive_by_external_id_params.rbs +26 -0
  293. data/sig/orb/models/account/billing_entity_archive_params.rbs +25 -0
  294. data/sig/orb/models/account/billing_entity_create_params.rbs +86 -0
  295. data/sig/orb/models/account/billing_entity_fetch_by_external_id_params.rbs +26 -0
  296. data/sig/orb/models/account/billing_entity_fetch_params.rbs +25 -0
  297. data/sig/orb/models/account/billing_entity_list_params.rbs +51 -0
  298. data/sig/orb/models/account/billing_entity_unarchive_by_external_id_params.rbs +26 -0
  299. data/sig/orb/models/account/billing_entity_unarchive_params.rbs +25 -0
  300. data/sig/orb/models/account/billing_entity_update_by_external_id_params.rbs +125 -0
  301. data/sig/orb/models/account/billing_entity_update_params.rbs +125 -0
  302. data/sig/orb/models/account/payment_gateway_connection.rbs +58 -0
  303. data/sig/orb/models/account/payment_gateway_connection_fetch_params.rbs +26 -0
  304. data/sig/orb/models/account/payment_gateway_connection_list_params.rbs +56 -0
  305. data/sig/orb/models/alert.rbs +8 -3
  306. data/sig/orb/models/changed_subscription_resources.rbs +5 -0
  307. data/sig/orb/models/credit_note.rbs +5 -0
  308. data/sig/orb/models/credit_note_list_params.rbs +5 -0
  309. data/sig/orb/models/customer.rbs +5 -0
  310. data/sig/orb/models/customer_create_params.rbs +5 -0
  311. data/sig/orb/models/customer_credit_balance_depleted_webhook_event.rbs +8 -3
  312. data/sig/orb/models/customer_credit_balance_dropped_webhook_event.rbs +8 -3
  313. data/sig/orb/models/customer_credit_balance_recovered_webhook_event.rbs +8 -3
  314. data/sig/orb/models/customer_edited_webhook_event.rbs +5 -0
  315. data/sig/orb/models/customer_update_by_external_id_params.rbs +5 -0
  316. data/sig/orb/models/customer_update_params.rbs +5 -0
  317. data/sig/orb/models/customers/customer_payment_gateway_connection.rbs +65 -0
  318. data/sig/orb/models/customers/payment_gateway_connection_create_by_external_id_params.rbs +45 -0
  319. data/sig/orb/models/customers/payment_gateway_connection_create_params.rbs +45 -0
  320. data/sig/orb/models/customers/payment_gateway_connection_delete_by_external_id_params.rbs +30 -0
  321. data/sig/orb/models/customers/payment_gateway_connection_delete_params.rbs +30 -0
  322. data/sig/orb/models/customers/payment_gateway_connection_list_by_external_id_params.rbs +38 -0
  323. data/sig/orb/models/customers/payment_gateway_connection_list_by_external_id_response.rbs +27 -0
  324. data/sig/orb/models/customers/payment_gateway_connection_list_params.rbs +38 -0
  325. data/sig/orb/models/customers/payment_gateway_connection_list_response.rbs +27 -0
  326. data/sig/orb/models/customers/payment_gateway_connection_update_by_external_id_params.rbs +53 -0
  327. data/sig/orb/models/customers/payment_gateway_connection_update_params.rbs +53 -0
  328. data/sig/orb/models/invoice.rbs +5 -0
  329. data/sig/orb/models/invoice_create_params.rbs +10 -0
  330. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +5 -0
  331. data/sig/orb/models/invoice_issue_summary_response.rbs +5 -0
  332. data/sig/orb/models/invoice_issued_summary_webhook_event.rbs +5 -0
  333. data/sig/orb/models/invoice_list_params.rbs +5 -0
  334. data/sig/orb/models/invoice_list_summary_params.rbs +5 -0
  335. data/sig/orb/models/invoice_list_summary_response.rbs +5 -0
  336. data/sig/orb/models/mutated_subscription.rbs +5 -0
  337. data/sig/orb/models/plan.rbs +18 -3
  338. data/sig/orb/models/plan_create_params.rbs +5 -0
  339. data/sig/orb/models/plan_created_webhook_event.rbs +13 -3
  340. data/sig/orb/models/plan_default_version_set_webhook_event.rbs +13 -3
  341. data/sig/orb/models/plan_edited_webhook_event.rbs +5 -0
  342. data/sig/orb/models/plan_update_params.rbs +5 -0
  343. data/sig/orb/models/plan_version_created_webhook_event.rbs +13 -3
  344. data/sig/orb/models/plans/external_plan_id_update_params.rbs +5 -0
  345. data/sig/orb/models/subscription.rbs +5 -0
  346. data/sig/orb/models/subscription_alert_disabled_webhook_event.rbs +21 -6
  347. data/sig/orb/models/subscription_cost_exceeded_webhook_event.rbs +8 -3
  348. data/sig/orb/models/subscription_create_params.rbs +10 -0
  349. data/sig/orb/models/subscription_fetch_schedule_response.rbs +13 -3
  350. data/sig/orb/models/subscription_grouped_cost_exceeded_webhook_event.rbs +21 -6
  351. data/sig/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rbs +13 -3
  352. data/sig/orb/models/subscription_license_allocation_reset_webhook_event.rbs +13 -3
  353. data/sig/orb/models/subscription_license_balance_threshold_reached_webhook_event.rbs +21 -6
  354. data/sig/orb/models/subscription_list_params.rbs +5 -0
  355. data/sig/orb/models/subscription_list_summary_params.rbs +5 -0
  356. data/sig/orb/models/subscription_list_summary_response.rbs +13 -3
  357. data/sig/orb/models/subscription_spend_exceeded_webhook_event.rbs +8 -3
  358. data/sig/orb/models/subscription_usage_exceeded_webhook_event.rbs +8 -3
  359. data/sig/orb/models/webhooks/customer_credit_balance_depleted_standard_webhook_event.rbs +8 -3
  360. data/sig/orb/models/webhooks/customer_credit_balance_dropped_standard_webhook_event.rbs +8 -3
  361. data/sig/orb/models/webhooks/customer_credit_balance_recovered_standard_webhook_event.rbs +8 -3
  362. data/sig/orb/models/webhooks/customer_edited_standard_webhook_event.rbs +5 -0
  363. data/sig/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rbs +5 -0
  364. data/sig/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rbs +5 -0
  365. data/sig/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rbs +5 -0
  366. data/sig/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rbs +5 -0
  367. data/sig/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rbs +5 -0
  368. data/sig/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rbs +5 -0
  369. data/sig/orb/models/webhooks/invoice_edited_standard_webhook_event.rbs +5 -0
  370. data/sig/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rbs +5 -0
  371. data/sig/orb/models/webhooks/invoice_issued_standard_webhook_event.rbs +5 -0
  372. data/sig/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rbs +5 -0
  373. data/sig/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rbs +5 -0
  374. data/sig/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rbs +5 -0
  375. data/sig/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rbs +5 -0
  376. data/sig/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rbs +5 -0
  377. data/sig/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rbs +5 -0
  378. data/sig/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rbs +5 -0
  379. data/sig/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rbs +5 -0
  380. data/sig/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rbs +5 -0
  381. data/sig/orb/models/webhooks/plan_created_standard_webhook_event.rbs +13 -3
  382. data/sig/orb/models/webhooks/plan_default_version_set_standard_webhook_event.rbs +13 -3
  383. data/sig/orb/models/webhooks/plan_edited_standard_webhook_event.rbs +5 -0
  384. data/sig/orb/models/webhooks/plan_version_created_standard_webhook_event.rbs +13 -3
  385. data/sig/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rbs +5 -0
  386. data/sig/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rbs +5 -0
  387. data/sig/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rbs +13 -3
  388. data/sig/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rbs +13 -3
  389. data/sig/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rbs +21 -6
  390. data/sig/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rbs +13 -3
  391. data/sig/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rbs +13 -3
  392. data/sig/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rbs +21 -6
  393. data/sig/orb/models/webhooks/subscription_created_standard_webhook_event.rbs +13 -3
  394. data/sig/orb/models/webhooks/subscription_edited_standard_webhook_event.rbs +13 -3
  395. data/sig/orb/models/webhooks/subscription_ended_standard_webhook_event.rbs +13 -3
  396. data/sig/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rbs +13 -3
  397. data/sig/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rbs +21 -6
  398. data/sig/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rbs +13 -3
  399. data/sig/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rbs +13 -3
  400. data/sig/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rbs +21 -6
  401. data/sig/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rbs +13 -3
  402. data/sig/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rbs +13 -3
  403. data/sig/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rbs +13 -3
  404. data/sig/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rbs +13 -3
  405. data/sig/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rbs +21 -6
  406. data/sig/orb/models/webhooks/subscription_started_standard_webhook_event.rbs +13 -3
  407. data/sig/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rbs +13 -3
  408. data/sig/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rbs +21 -6
  409. data/sig/orb/models.rbs +2 -0
  410. data/sig/orb/resources/account/billing_entities.rbs +80 -0
  411. data/sig/orb/resources/account/payment_gateway_connections.rbs +22 -0
  412. data/sig/orb/resources/account.rbs +11 -0
  413. data/sig/orb/resources/credit_notes.rbs +1 -0
  414. data/sig/orb/resources/customers/payment_gateway_connections.rbs +67 -0
  415. data/sig/orb/resources/customers.rbs +5 -0
  416. data/sig/orb/resources/invoices.rbs +4 -0
  417. data/sig/orb/resources/plans/external_plan_id.rbs +1 -0
  418. data/sig/orb/resources/plans.rbs +2 -0
  419. data/sig/orb/resources/subscriptions.rbs +4 -0
  420. metadata +88 -1
@@ -608,13 +608,18 @@ module Orb
608
608
  sig { returns(String) }
609
609
  attr_accessor :plan_version
610
610
 
611
+ # The id of the default billing entity of this plan.
612
+ sig { returns(T.nilable(String)) }
613
+ attr_accessor :billing_entity_id
614
+
611
615
  # The plan the alert applies to.
612
616
  sig do
613
617
  params(
614
618
  id: T.nilable(String),
615
619
  external_plan_id: T.nilable(String),
616
620
  name: T.nilable(String),
617
- plan_version: String
621
+ plan_version: String,
622
+ billing_entity_id: T.nilable(String)
618
623
  ).returns(T.attached_class)
619
624
  end
620
625
  def self.new(
@@ -624,7 +629,9 @@ module Orb
624
629
  # identifier in your system.
625
630
  external_plan_id:,
626
631
  name:,
627
- plan_version:
632
+ plan_version:,
633
+ # The id of the default billing entity of this plan.
634
+ billing_entity_id: nil
628
635
  )
629
636
  end
630
637
 
@@ -634,7 +641,8 @@ module Orb
634
641
  id: T.nilable(String),
635
642
  external_plan_id: T.nilable(String),
636
643
  name: T.nilable(String),
637
- plan_version: String
644
+ plan_version: String,
645
+ billing_entity_id: T.nilable(String)
638
646
  }
639
647
  )
640
648
  end
@@ -1197,11 +1205,16 @@ module Orb
1197
1205
  sig { returns(T.nilable(String)) }
1198
1206
  attr_accessor :name
1199
1207
 
1208
+ # The id of the default billing entity of this plan.
1209
+ sig { returns(T.nilable(String)) }
1210
+ attr_accessor :billing_entity_id
1211
+
1200
1212
  sig do
1201
1213
  params(
1202
1214
  id: T.nilable(String),
1203
1215
  external_plan_id: T.nilable(String),
1204
- name: T.nilable(String)
1216
+ name: T.nilable(String),
1217
+ billing_entity_id: T.nilable(String)
1205
1218
  ).returns(T.attached_class)
1206
1219
  end
1207
1220
  def self.new(
@@ -1210,7 +1223,9 @@ module Orb
1210
1223
  # as an alias for this Plan. Use this field to identify a plan by an existing
1211
1224
  # identifier in your system.
1212
1225
  external_plan_id:,
1213
- name:
1226
+ name:,
1227
+ # The id of the default billing entity of this plan.
1228
+ billing_entity_id: nil
1214
1229
  )
1215
1230
  end
1216
1231
 
@@ -1219,7 +1234,8 @@ module Orb
1219
1234
  {
1220
1235
  id: T.nilable(String),
1221
1236
  external_plan_id: T.nilable(String),
1222
- name: T.nilable(String)
1237
+ name: T.nilable(String),
1238
+ billing_entity_id: T.nilable(String)
1223
1239
  }
1224
1240
  )
1225
1241
  end
@@ -296,11 +296,16 @@ module Orb
296
296
  sig { returns(T.nilable(String)) }
297
297
  attr_accessor :name
298
298
 
299
+ # The id of the default billing entity of this plan.
300
+ sig { returns(T.nilable(String)) }
301
+ attr_accessor :billing_entity_id
302
+
299
303
  sig do
300
304
  params(
301
305
  id: T.nilable(String),
302
306
  external_plan_id: T.nilable(String),
303
- name: T.nilable(String)
307
+ name: T.nilable(String),
308
+ billing_entity_id: T.nilable(String)
304
309
  ).returns(T.attached_class)
305
310
  end
306
311
  def self.new(
@@ -309,7 +314,9 @@ module Orb
309
314
  # as an alias for this Plan. Use this field to identify a plan by an existing
310
315
  # identifier in your system.
311
316
  external_plan_id:,
312
- name:
317
+ name:,
318
+ # The id of the default billing entity of this plan.
319
+ billing_entity_id: nil
313
320
  )
314
321
  end
315
322
 
@@ -318,7 +325,8 @@ module Orb
318
325
  {
319
326
  id: T.nilable(String),
320
327
  external_plan_id: T.nilable(String),
321
- name: T.nilable(String)
328
+ name: T.nilable(String),
329
+ billing_entity_id: T.nilable(String)
322
330
  }
323
331
  )
324
332
  end
@@ -296,11 +296,16 @@ module Orb
296
296
  sig { returns(T.nilable(String)) }
297
297
  attr_accessor :name
298
298
 
299
+ # The id of the default billing entity of this plan.
300
+ sig { returns(T.nilable(String)) }
301
+ attr_accessor :billing_entity_id
302
+
299
303
  sig do
300
304
  params(
301
305
  id: T.nilable(String),
302
306
  external_plan_id: T.nilable(String),
303
- name: T.nilable(String)
307
+ name: T.nilable(String),
308
+ billing_entity_id: T.nilable(String)
304
309
  ).returns(T.attached_class)
305
310
  end
306
311
  def self.new(
@@ -309,7 +314,9 @@ module Orb
309
314
  # as an alias for this Plan. Use this field to identify a plan by an existing
310
315
  # identifier in your system.
311
316
  external_plan_id:,
312
- name:
317
+ name:,
318
+ # The id of the default billing entity of this plan.
319
+ billing_entity_id: nil
313
320
  )
314
321
  end
315
322
 
@@ -318,7 +325,8 @@ module Orb
318
325
  {
319
326
  id: T.nilable(String),
320
327
  external_plan_id: T.nilable(String),
321
- name: T.nilable(String)
328
+ name: T.nilable(String),
329
+ billing_entity_id: T.nilable(String)
322
330
  }
323
331
  )
324
332
  end
@@ -614,13 +614,18 @@ module Orb
614
614
  sig { returns(String) }
615
615
  attr_accessor :plan_version
616
616
 
617
+ # The id of the default billing entity of this plan.
618
+ sig { returns(T.nilable(String)) }
619
+ attr_accessor :billing_entity_id
620
+
617
621
  # The plan the alert applies to.
618
622
  sig do
619
623
  params(
620
624
  id: T.nilable(String),
621
625
  external_plan_id: T.nilable(String),
622
626
  name: T.nilable(String),
623
- plan_version: String
627
+ plan_version: String,
628
+ billing_entity_id: T.nilable(String)
624
629
  ).returns(T.attached_class)
625
630
  end
626
631
  def self.new(
@@ -630,7 +635,9 @@ module Orb
630
635
  # identifier in your system.
631
636
  external_plan_id:,
632
637
  name:,
633
- plan_version:
638
+ plan_version:,
639
+ # The id of the default billing entity of this plan.
640
+ billing_entity_id: nil
634
641
  )
635
642
  end
636
643
 
@@ -640,7 +647,8 @@ module Orb
640
647
  id: T.nilable(String),
641
648
  external_plan_id: T.nilable(String),
642
649
  name: T.nilable(String),
643
- plan_version: String
650
+ plan_version: String,
651
+ billing_entity_id: T.nilable(String)
644
652
  }
645
653
  )
646
654
  end
@@ -1203,11 +1211,16 @@ module Orb
1203
1211
  sig { returns(T.nilable(String)) }
1204
1212
  attr_accessor :name
1205
1213
 
1214
+ # The id of the default billing entity of this plan.
1215
+ sig { returns(T.nilable(String)) }
1216
+ attr_accessor :billing_entity_id
1217
+
1206
1218
  sig do
1207
1219
  params(
1208
1220
  id: T.nilable(String),
1209
1221
  external_plan_id: T.nilable(String),
1210
- name: T.nilable(String)
1222
+ name: T.nilable(String),
1223
+ billing_entity_id: T.nilable(String)
1211
1224
  ).returns(T.attached_class)
1212
1225
  end
1213
1226
  def self.new(
@@ -1216,7 +1229,9 @@ module Orb
1216
1229
  # as an alias for this Plan. Use this field to identify a plan by an existing
1217
1230
  # identifier in your system.
1218
1231
  external_plan_id:,
1219
- name:
1232
+ name:,
1233
+ # The id of the default billing entity of this plan.
1234
+ billing_entity_id: nil
1220
1235
  )
1221
1236
  end
1222
1237
 
@@ -1225,7 +1240,8 @@ module Orb
1225
1240
  {
1226
1241
  id: T.nilable(String),
1227
1242
  external_plan_id: T.nilable(String),
1228
- name: T.nilable(String)
1243
+ name: T.nilable(String),
1244
+ billing_entity_id: T.nilable(String)
1229
1245
  }
1230
1246
  )
1231
1247
  end
data/rbi/orb/models.rbi CHANGED
@@ -1,6 +1,8 @@
1
1
  # typed: strong
2
2
 
3
3
  module Orb
4
+ Account = Orb::Models::Account
5
+
4
6
  AccountingProviderConfig = Orb::Models::AccountingProviderConfig
5
7
 
6
8
  Address = Orb::Models::Address
@@ -0,0 +1,289 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Resources
5
+ class Account
6
+ # A billing entity is a legal entity an account invoices from, with its own legal
7
+ # name, address and tax registrations.
8
+ class BillingEntities
9
+ # This endpoint creates a billing entity: a legal entity the account invoices
10
+ # from, with its own legal name, address, tax registrations, and invoice settings.
11
+ # `external_billing_entity_id` cannot be changed after creation. This endpoint
12
+ # requires an admin API key.
13
+ sig do
14
+ params(
15
+ address: Orb::AddressInput::OrHash,
16
+ legal_name: String,
17
+ name: String,
18
+ external_billing_entity_id: T.nilable(String),
19
+ invoice_settings:
20
+ T.nilable(
21
+ Orb::Account::BillingEntityCreateParams::InvoiceSettings::OrHash
22
+ ),
23
+ tax_registrations:
24
+ T::Array[
25
+ Orb::Account::BillingEntityCreateParams::TaxRegistration::OrHash
26
+ ],
27
+ request_options: Orb::RequestOptions::OrHash
28
+ ).returns(Orb::Account::BillingEntity)
29
+ end
30
+ def create(
31
+ # The address printed on invoices.
32
+ address:,
33
+ # The legal name printed on invoices.
34
+ legal_name:,
35
+ # An internal name for the billing entity.
36
+ name:,
37
+ # An optional user-defined ID for this billing entity, unique within the account.
38
+ # This cannot be changed after creation.
39
+ external_billing_entity_id: nil,
40
+ # Settings that override the account's for this billing entity.
41
+ invoice_settings: nil,
42
+ tax_registrations: nil,
43
+ request_options: {}
44
+ )
45
+ end
46
+
47
+ # This endpoint updates a billing entity, including the default one. Omitted
48
+ # fields keep their value. A change to the name, legal name, address, or tax
49
+ # registrations writes a new version of the billing entity; invoices already
50
+ # issued keep the version they were issued with. In `invoice_settings`, a null
51
+ # `memo` clears it so the billing entity uses the account's memo. An archived
52
+ # billing entity cannot be updated until it is unarchived. This endpoint requires
53
+ # an admin API key.
54
+ #
55
+ # `payment_gateway_connections` is the full set of connections the billing entity
56
+ # collects payments through; a connection left out is disconnected from the
57
+ # billing entity. If a payment through a connection left out is still in progress,
58
+ # the whole update is rejected and can be retried once the payment finishes.
59
+ sig do
60
+ params(
61
+ billing_entity_id: String,
62
+ address: T.nilable(Orb::AddressInput::OrHash),
63
+ default_payment_gateway_connection_id: T.nilable(String),
64
+ invoice_settings:
65
+ T.nilable(
66
+ Orb::Account::BillingEntityUpdateParams::InvoiceSettings::OrHash
67
+ ),
68
+ legal_name: T.nilable(String),
69
+ name: T.nilable(String),
70
+ payment_gateway_connections:
71
+ T.nilable(
72
+ T::Array[
73
+ Orb::Account::BillingEntityUpdateParams::PaymentGatewayConnection::OrHash
74
+ ]
75
+ ),
76
+ tax_registrations:
77
+ T.nilable(
78
+ T::Array[
79
+ Orb::Account::BillingEntityUpdateParams::TaxRegistration::OrHash
80
+ ]
81
+ ),
82
+ request_options: Orb::RequestOptions::OrHash
83
+ ).returns(Orb::Account::BillingEntity)
84
+ end
85
+ def update(
86
+ billing_entity_id,
87
+ # Replaces the whole address. Omit it to keep the current one.
88
+ address: nil,
89
+ # The ID of the connection Orb charges when the customer is not mapped to any of
90
+ # the billing entity's connections. Required when `payment_gateway_connections`
91
+ # has more than one entry.
92
+ default_payment_gateway_connection_id: nil,
93
+ # The invoice settings to change. Omitted fields keep their value; null clears a
94
+ # field so it inherits the account's setting.
95
+ invoice_settings: nil,
96
+ # The legal name printed on invoices.
97
+ legal_name: nil,
98
+ # An internal name for the billing entity.
99
+ name: nil,
100
+ # The full set of payment gateway connections the billing entity collects payments
101
+ # through. Omit it to keep the current ones. Naming another billing entity's
102
+ # connection gives this billing entity a connection of its own through the same
103
+ # Stripe account or Adyen merchant account.
104
+ payment_gateway_connections: nil,
105
+ # The full list of registrations. Omit it to keep the current ones.
106
+ tax_registrations: nil,
107
+ request_options: {}
108
+ )
109
+ end
110
+
111
+ # This endpoint returns the account's billing entities, including the default
112
+ # billing entity (`is_default: true`), ordered in descending order by creation
113
+ # time.
114
+ sig do
115
+ params(
116
+ cursor: T.nilable(String),
117
+ limit: Integer,
118
+ status:
119
+ T.nilable(
120
+ Orb::Account::BillingEntityListParams::Status::OrSymbol
121
+ ),
122
+ request_options: Orb::RequestOptions::OrHash
123
+ ).returns(Orb::Internal::Page[Orb::Account::BillingEntity])
124
+ end
125
+ def list(
126
+ # Cursor for pagination. This can be populated by the `next_cursor` value returned
127
+ # from the initial request.
128
+ cursor: nil,
129
+ # The number of items to fetch. Defaults to 20.
130
+ limit: nil,
131
+ # Only return billing entities with this status. Omit to return both.
132
+ status: nil,
133
+ request_options: {}
134
+ )
135
+ end
136
+
137
+ # This endpoint archives a billing entity. An archived billing entity cannot be
138
+ # updated; invoices already issued keep it. The default billing entity cannot be
139
+ # archived. Archiving a billing entity that is already archived returns it
140
+ # unchanged. This endpoint requires an admin API key.
141
+ sig do
142
+ params(
143
+ billing_entity_id: String,
144
+ request_options: Orb::RequestOptions::OrHash
145
+ ).returns(Orb::Account::BillingEntity)
146
+ end
147
+ def archive(billing_entity_id, request_options: {})
148
+ end
149
+
150
+ # This endpoint archives a billing entity. An archived billing entity cannot be
151
+ # updated; invoices already issued keep it. The default billing entity cannot be
152
+ # archived. Archiving a billing entity that is already archived returns it
153
+ # unchanged. This endpoint requires an admin API key.
154
+ sig do
155
+ params(
156
+ external_billing_entity_id: String,
157
+ request_options: Orb::RequestOptions::OrHash
158
+ ).returns(Orb::Account::BillingEntity)
159
+ end
160
+ def archive_by_external_id(
161
+ external_billing_entity_id,
162
+ request_options: {}
163
+ )
164
+ end
165
+
166
+ # This endpoint returns a billing entity identified by its ID, or by the
167
+ # `external_billing_entity_id` set when it was created.
168
+ sig do
169
+ params(
170
+ billing_entity_id: String,
171
+ request_options: Orb::RequestOptions::OrHash
172
+ ).returns(Orb::Account::BillingEntity)
173
+ end
174
+ def fetch(billing_entity_id, request_options: {})
175
+ end
176
+
177
+ # This endpoint returns a billing entity identified by its ID, or by the
178
+ # `external_billing_entity_id` set when it was created.
179
+ sig do
180
+ params(
181
+ external_billing_entity_id: String,
182
+ request_options: Orb::RequestOptions::OrHash
183
+ ).returns(Orb::Account::BillingEntity)
184
+ end
185
+ def fetch_by_external_id(
186
+ external_billing_entity_id,
187
+ request_options: {}
188
+ )
189
+ end
190
+
191
+ # This endpoint restores an archived billing entity to active. Unarchiving an
192
+ # active billing entity returns it unchanged. This endpoint requires an admin API
193
+ # key.
194
+ sig do
195
+ params(
196
+ billing_entity_id: String,
197
+ request_options: Orb::RequestOptions::OrHash
198
+ ).returns(Orb::Account::BillingEntity)
199
+ end
200
+ def unarchive(billing_entity_id, request_options: {})
201
+ end
202
+
203
+ # This endpoint restores an archived billing entity to active. Unarchiving an
204
+ # active billing entity returns it unchanged. This endpoint requires an admin API
205
+ # key.
206
+ sig do
207
+ params(
208
+ external_billing_entity_id: String,
209
+ request_options: Orb::RequestOptions::OrHash
210
+ ).returns(Orb::Account::BillingEntity)
211
+ end
212
+ def unarchive_by_external_id(
213
+ external_billing_entity_id,
214
+ request_options: {}
215
+ )
216
+ end
217
+
218
+ # This endpoint updates a billing entity, including the default one. Omitted
219
+ # fields keep their value. A change to the name, legal name, address, or tax
220
+ # registrations writes a new version of the billing entity; invoices already
221
+ # issued keep the version they were issued with. In `invoice_settings`, a null
222
+ # `memo` clears it so the billing entity uses the account's memo. An archived
223
+ # billing entity cannot be updated until it is unarchived. This endpoint requires
224
+ # an admin API key.
225
+ #
226
+ # `payment_gateway_connections` is the full set of connections the billing entity
227
+ # collects payments through; a connection left out is disconnected from the
228
+ # billing entity. If a payment through a connection left out is still in progress,
229
+ # the whole update is rejected and can be retried once the payment finishes.
230
+ sig do
231
+ params(
232
+ external_billing_entity_id: String,
233
+ address: T.nilable(Orb::AddressInput::OrHash),
234
+ default_payment_gateway_connection_id: T.nilable(String),
235
+ invoice_settings:
236
+ T.nilable(
237
+ Orb::Account::BillingEntityUpdateByExternalIDParams::InvoiceSettings::OrHash
238
+ ),
239
+ legal_name: T.nilable(String),
240
+ name: T.nilable(String),
241
+ payment_gateway_connections:
242
+ T.nilable(
243
+ T::Array[
244
+ Orb::Account::BillingEntityUpdateByExternalIDParams::PaymentGatewayConnection::OrHash
245
+ ]
246
+ ),
247
+ tax_registrations:
248
+ T.nilable(
249
+ T::Array[
250
+ Orb::Account::BillingEntityUpdateByExternalIDParams::TaxRegistration::OrHash
251
+ ]
252
+ ),
253
+ request_options: Orb::RequestOptions::OrHash
254
+ ).returns(Orb::Account::BillingEntity)
255
+ end
256
+ def update_by_external_id(
257
+ external_billing_entity_id,
258
+ # Replaces the whole address. Omit it to keep the current one.
259
+ address: nil,
260
+ # The ID of the connection Orb charges when the customer is not mapped to any of
261
+ # the billing entity's connections. Required when `payment_gateway_connections`
262
+ # has more than one entry.
263
+ default_payment_gateway_connection_id: nil,
264
+ # The invoice settings to change. Omitted fields keep their value; null clears a
265
+ # field so it inherits the account's setting.
266
+ invoice_settings: nil,
267
+ # The legal name printed on invoices.
268
+ legal_name: nil,
269
+ # An internal name for the billing entity.
270
+ name: nil,
271
+ # The full set of payment gateway connections the billing entity collects payments
272
+ # through. Omit it to keep the current ones. Naming another billing entity's
273
+ # connection gives this billing entity a connection of its own through the same
274
+ # Stripe account or Adyen merchant account.
275
+ payment_gateway_connections: nil,
276
+ # The full list of registrations. Omit it to keep the current ones.
277
+ tax_registrations: nil,
278
+ request_options: {}
279
+ )
280
+ end
281
+
282
+ # @api private
283
+ sig { params(client: Orb::Client).returns(T.attached_class) }
284
+ def self.new(client:)
285
+ end
286
+ end
287
+ end
288
+ end
289
+ end
@@ -0,0 +1,54 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Resources
5
+ class Account
6
+ # A payment gateway connection is one Stripe account or one Adyen merchant account
7
+ # that a billing entity collects payments through.
8
+ class PaymentGatewayConnections
9
+ # This endpoint returns the account's payment gateway connections with the billing
10
+ # entity each one collects for, ordered in descending order by creation time.
11
+ sig do
12
+ params(
13
+ billing_entity_id: T.nilable(String),
14
+ cursor: T.nilable(String),
15
+ limit: Integer,
16
+ provider_type:
17
+ T.nilable(
18
+ Orb::Account::PaymentGatewayConnectionListParams::ProviderType::OrSymbol
19
+ ),
20
+ request_options: Orb::RequestOptions::OrHash
21
+ ).returns(Orb::Internal::Page[Orb::Account::PaymentGatewayConnection])
22
+ end
23
+ def list(
24
+ # Only return connections of this billing entity.
25
+ billing_entity_id: nil,
26
+ # Cursor for pagination. This can be populated by the `next_cursor` value returned
27
+ # from the initial request.
28
+ cursor: nil,
29
+ # The number of items to fetch. Defaults to 20.
30
+ limit: nil,
31
+ # Only return connections of this payment provider.
32
+ provider_type: nil,
33
+ request_options: {}
34
+ )
35
+ end
36
+
37
+ # This endpoint returns a payment gateway connection identified by its ID.
38
+ sig do
39
+ params(
40
+ payment_gateway_connection_id: String,
41
+ request_options: Orb::RequestOptions::OrHash
42
+ ).returns(Orb::Account::PaymentGatewayConnection)
43
+ end
44
+ def fetch(payment_gateway_connection_id, request_options: {})
45
+ end
46
+
47
+ # @api private
48
+ sig { params(client: Orb::Client).returns(T.attached_class) }
49
+ def self.new(client:)
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,22 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Resources
5
+ class Account
6
+ # A billing entity is a legal entity an account invoices from, with its own legal
7
+ # name, address and tax registrations.
8
+ sig { returns(Orb::Resources::Account::BillingEntities) }
9
+ attr_reader :billing_entities
10
+
11
+ # A payment gateway connection is one Stripe account or one Adyen merchant account
12
+ # that a billing entity collects payments through.
13
+ sig { returns(Orb::Resources::Account::PaymentGatewayConnections) }
14
+ attr_reader :payment_gateway_connections
15
+
16
+ # @api private
17
+ sig { params(client: Orb::Client).returns(T.attached_class) }
18
+ def self.new(client:)
19
+ end
20
+ end
21
+ end
22
+ end
@@ -62,11 +62,11 @@ module Orb
62
62
  )
63
63
  end
64
64
 
65
- # Get a paginated list of CreditNotes. Users can also filter by customer_id,
66
- # subscription_id, or external_customer_id. The credit notes will be returned in
65
+ # Get a paginated list of CreditNotes. The credit notes will be returned in
67
66
  # reverse chronological order by `creation_time`.
68
67
  sig do
69
68
  params(
69
+ billing_entity_id: T.nilable(String),
70
70
  created_at_gt: T.nilable(Time),
71
71
  created_at_gte: T.nilable(Time),
72
72
  created_at_lt: T.nilable(Time),
@@ -77,6 +77,10 @@ module Orb
77
77
  ).returns(Orb::Internal::Page[Orb::CreditNote])
78
78
  end
79
79
  def list(
80
+ # Filters to objects issued by this billing entity. Filtering on the account's
81
+ # default billing entity also matches objects created before the account had
82
+ # billing entities.
83
+ billing_entity_id: nil,
80
84
  created_at_gt: nil,
81
85
  created_at_gte: nil,
82
86
  created_at_lt: nil,