orb-billing 1.58.0 → 1.60.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 (338) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/README.md +1 -1
  4. data/lib/orb/models/alert.rb +9 -1
  5. data/lib/orb/models/changed_subscription_resources.rb +9 -1
  6. data/lib/orb/models/credit_note.rb +9 -1
  7. data/lib/orb/models/credit_note_list_params.rb +11 -1
  8. data/lib/orb/models/customer.rb +12 -3
  9. data/lib/orb/models/customer_create_params.rb +10 -1
  10. data/lib/orb/models/customer_credit_balance_depleted_webhook_event.rb +9 -1
  11. data/lib/orb/models/customer_credit_balance_dropped_webhook_event.rb +9 -1
  12. data/lib/orb/models/customer_credit_balance_recovered_webhook_event.rb +9 -1
  13. data/lib/orb/models/customer_edited_webhook_event.rb +8 -1
  14. data/lib/orb/models/customer_update_by_external_id_params.rb +10 -1
  15. data/lib/orb/models/customer_update_params.rb +10 -1
  16. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +7 -7
  17. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +7 -7
  18. data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +6 -4
  19. data/lib/orb/models/customers/credits/top_up_create_params.rb +6 -4
  20. data/lib/orb/models/customers/credits/top_up_invoice_settings.rb +6 -4
  21. data/lib/orb/models/invoice.rb +9 -1
  22. data/lib/orb/models/invoice_create_params.rb +25 -7
  23. data/lib/orb/models/invoice_fetch_upcoming_response.rb +9 -1
  24. data/lib/orb/models/invoice_issue_summary_response.rb +9 -1
  25. data/lib/orb/models/invoice_issued_summary_webhook_event.rb +9 -1
  26. data/lib/orb/models/invoice_list_params.rb +23 -12
  27. data/lib/orb/models/invoice_list_summary_params.rb +23 -12
  28. data/lib/orb/models/invoice_list_summary_response.rb +9 -1
  29. data/lib/orb/models/invoice_status_filter.rb +18 -0
  30. data/lib/orb/models/invoice_update_params.rb +7 -6
  31. data/lib/orb/models/mutated_subscription.rb +16 -6
  32. data/lib/orb/models/payment_method_created_webhook_event.rb +3 -2
  33. data/lib/orb/models/payment_method_deleted_webhook_event.rb +3 -2
  34. data/lib/orb/models/plan.rb +26 -8
  35. data/lib/orb/models/plan_create_params.rb +15 -5
  36. data/lib/orb/models/plan_created_webhook_event.rb +9 -1
  37. data/lib/orb/models/plan_default_version_set_webhook_event.rb +9 -1
  38. data/lib/orb/models/plan_edited_webhook_event.rb +7 -1
  39. data/lib/orb/models/plan_update_params.rb +10 -1
  40. data/lib/orb/models/plan_version_created_webhook_event.rb +9 -1
  41. data/lib/orb/models/plans/external_plan_id_update_params.rb +10 -1
  42. data/lib/orb/models/subscription.rb +16 -6
  43. data/lib/orb/models/subscription_alert_disabled_webhook_event.rb +18 -2
  44. data/lib/orb/models/subscription_cost_exceeded_webhook_event.rb +9 -1
  45. data/lib/orb/models/subscription_create_params.rb +27 -5
  46. data/lib/orb/models/subscription_fetch_schedule_response.rb +9 -1
  47. data/lib/orb/models/subscription_grouped_cost_exceeded_webhook_event.rb +18 -2
  48. data/lib/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rb +9 -1
  49. data/lib/orb/models/subscription_license_allocation_reset_webhook_event.rb +9 -1
  50. data/lib/orb/models/subscription_license_balance_threshold_reached_webhook_event.rb +18 -2
  51. data/lib/orb/models/subscription_list_params.rb +63 -16
  52. data/lib/orb/models/subscription_list_summary_params.rb +61 -16
  53. data/lib/orb/models/subscription_list_summary_response.rb +9 -1
  54. data/lib/orb/models/subscription_schedule_plan_change_params.rb +7 -4
  55. data/lib/orb/models/subscription_spend_exceeded_webhook_event.rb +9 -1
  56. data/lib/orb/models/subscription_status_filter.rb +16 -0
  57. data/lib/orb/models/subscription_update_params.rb +7 -5
  58. data/lib/orb/models/subscription_usage_exceeded_webhook_event.rb +9 -1
  59. data/lib/orb/models/webhooks/customer_credit_balance_depleted_standard_webhook_event.rb +9 -1
  60. data/lib/orb/models/webhooks/customer_credit_balance_dropped_standard_webhook_event.rb +9 -1
  61. data/lib/orb/models/webhooks/customer_credit_balance_recovered_standard_webhook_event.rb +9 -1
  62. data/lib/orb/models/webhooks/customer_edited_standard_webhook_event.rb +8 -1
  63. data/lib/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rb +9 -1
  64. data/lib/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rb +9 -1
  65. data/lib/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rb +9 -1
  66. data/lib/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rb +9 -1
  67. data/lib/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rb +9 -1
  68. data/lib/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rb +9 -1
  69. data/lib/orb/models/webhooks/invoice_edited_standard_webhook_event.rb +9 -1
  70. data/lib/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rb +9 -1
  71. data/lib/orb/models/webhooks/invoice_issued_standard_webhook_event.rb +9 -1
  72. data/lib/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rb +9 -1
  73. data/lib/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rb +9 -1
  74. data/lib/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rb +9 -1
  75. data/lib/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rb +9 -1
  76. data/lib/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rb +9 -1
  77. data/lib/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rb +9 -1
  78. data/lib/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rb +9 -1
  79. data/lib/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rb +9 -1
  80. data/lib/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rb +9 -1
  81. data/lib/orb/models/webhooks/payment_method_created_standard_webhook_event.rb +3 -2
  82. data/lib/orb/models/webhooks/payment_method_deleted_standard_webhook_event.rb +3 -2
  83. data/lib/orb/models/webhooks/plan_created_standard_webhook_event.rb +9 -1
  84. data/lib/orb/models/webhooks/plan_default_version_set_standard_webhook_event.rb +9 -1
  85. data/lib/orb/models/webhooks/plan_edited_standard_webhook_event.rb +7 -1
  86. data/lib/orb/models/webhooks/plan_version_created_standard_webhook_event.rb +9 -1
  87. data/lib/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rb +9 -1
  88. data/lib/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rb +9 -1
  89. data/lib/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rb +9 -1
  90. data/lib/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rb +9 -1
  91. data/lib/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rb +18 -2
  92. data/lib/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rb +9 -1
  93. data/lib/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rb +9 -1
  94. data/lib/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rb +18 -2
  95. data/lib/orb/models/webhooks/subscription_created_standard_webhook_event.rb +9 -1
  96. data/lib/orb/models/webhooks/subscription_edited_standard_webhook_event.rb +9 -1
  97. data/lib/orb/models/webhooks/subscription_ended_standard_webhook_event.rb +9 -1
  98. data/lib/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rb +9 -1
  99. data/lib/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rb +18 -2
  100. data/lib/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rb +9 -1
  101. data/lib/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rb +9 -1
  102. data/lib/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rb +18 -2
  103. data/lib/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rb +9 -1
  104. data/lib/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rb +9 -1
  105. data/lib/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rb +9 -1
  106. data/lib/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rb +9 -1
  107. data/lib/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rb +18 -2
  108. data/lib/orb/models/webhooks/subscription_started_standard_webhook_event.rb +9 -1
  109. data/lib/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rb +9 -1
  110. data/lib/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rb +18 -2
  111. data/lib/orb/models.rb +4 -0
  112. data/lib/orb/resources/credit_notes.rb +4 -3
  113. data/lib/orb/resources/customers/credits/ledger.rb +56 -0
  114. data/lib/orb/resources/customers.rb +9 -3
  115. data/lib/orb/resources/invoices.rb +29 -7
  116. data/lib/orb/resources/plans/external_plan_id.rb +3 -1
  117. data/lib/orb/resources/plans.rb +7 -3
  118. data/lib/orb/resources/subscriptions.rb +20 -12
  119. data/lib/orb/version.rb +1 -1
  120. data/lib/orb.rb +2 -0
  121. data/rbi/orb/models/alert.rbi +11 -3
  122. data/rbi/orb/models/changed_subscription_resources.rbi +8 -0
  123. data/rbi/orb/models/credit_note.rbi +8 -0
  124. data/rbi/orb/models/credit_note_list_params.rbi +12 -0
  125. data/rbi/orb/models/customer.rbi +12 -2
  126. data/rbi/orb/models/customer_create_params.rbi +10 -0
  127. data/rbi/orb/models/customer_credit_balance_depleted_webhook_event.rbi +11 -3
  128. data/rbi/orb/models/customer_credit_balance_dropped_webhook_event.rbi +11 -3
  129. data/rbi/orb/models/customer_credit_balance_recovered_webhook_event.rbi +11 -3
  130. data/rbi/orb/models/customer_edited_webhook_event.rbi +6 -0
  131. data/rbi/orb/models/customer_update_by_external_id_params.rbi +10 -0
  132. data/rbi/orb/models/customer_update_params.rbi +10 -0
  133. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +12 -12
  134. data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +12 -12
  135. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +10 -6
  136. data/rbi/orb/models/customers/credits/top_up_create_params.rbi +10 -6
  137. data/rbi/orb/models/customers/credits/top_up_invoice_settings.rbi +10 -6
  138. data/rbi/orb/models/invoice.rbi +8 -0
  139. data/rbi/orb/models/invoice_create_params.rbi +30 -10
  140. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +8 -0
  141. data/rbi/orb/models/invoice_issue_summary_response.rbi +8 -0
  142. data/rbi/orb/models/invoice_issued_summary_webhook_event.rbi +8 -0
  143. data/rbi/orb/models/invoice_list_params.rbi +49 -17
  144. data/rbi/orb/models/invoice_list_summary_params.rbi +50 -18
  145. data/rbi/orb/models/invoice_list_summary_response.rbi +8 -0
  146. data/rbi/orb/models/invoice_status_filter.rbi +22 -0
  147. data/rbi/orb/models/invoice_update_params.rbi +12 -10
  148. data/rbi/orb/models/mutated_subscription.rbi +20 -8
  149. data/rbi/orb/models/payment_method_created_webhook_event.rbi +4 -2
  150. data/rbi/orb/models/payment_method_deleted_webhook_event.rbi +4 -2
  151. data/rbi/orb/models/plan.rbi +33 -13
  152. data/rbi/orb/models/plan_create_params.rbi +18 -6
  153. data/rbi/orb/models/plan_created_webhook_event.rbi +11 -3
  154. data/rbi/orb/models/plan_default_version_set_webhook_event.rbi +11 -3
  155. data/rbi/orb/models/plan_edited_webhook_event.rbi +6 -0
  156. data/rbi/orb/models/plan_update_params.rbi +10 -0
  157. data/rbi/orb/models/plan_version_created_webhook_event.rbi +11 -3
  158. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +10 -0
  159. data/rbi/orb/models/subscription.rbi +20 -8
  160. data/rbi/orb/models/subscription_alert_disabled_webhook_event.rbi +22 -6
  161. data/rbi/orb/models/subscription_cost_exceeded_webhook_event.rbi +11 -3
  162. data/rbi/orb/models/subscription_create_params.rbi +34 -6
  163. data/rbi/orb/models/subscription_fetch_schedule_response.rbi +11 -3
  164. data/rbi/orb/models/subscription_grouped_cost_exceeded_webhook_event.rbi +22 -6
  165. data/rbi/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rbi +11 -3
  166. data/rbi/orb/models/subscription_license_allocation_reset_webhook_event.rbi +11 -3
  167. data/rbi/orb/models/subscription_license_balance_threshold_reached_webhook_event.rbi +22 -6
  168. data/rbi/orb/models/subscription_list_params.rbi +112 -21
  169. data/rbi/orb/models/subscription_list_summary_params.rbi +111 -28
  170. data/rbi/orb/models/subscription_list_summary_response.rbi +11 -3
  171. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +12 -6
  172. data/rbi/orb/models/subscription_spend_exceeded_webhook_event.rbi +11 -3
  173. data/rbi/orb/models/subscription_status_filter.rbi +23 -0
  174. data/rbi/orb/models/subscription_update_params.rbi +12 -8
  175. data/rbi/orb/models/subscription_usage_exceeded_webhook_event.rbi +11 -3
  176. data/rbi/orb/models/webhooks/customer_credit_balance_depleted_standard_webhook_event.rbi +11 -3
  177. data/rbi/orb/models/webhooks/customer_credit_balance_dropped_standard_webhook_event.rbi +11 -3
  178. data/rbi/orb/models/webhooks/customer_credit_balance_recovered_standard_webhook_event.rbi +11 -3
  179. data/rbi/orb/models/webhooks/customer_edited_standard_webhook_event.rbi +6 -0
  180. data/rbi/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rbi +8 -0
  181. data/rbi/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rbi +8 -0
  182. data/rbi/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rbi +8 -0
  183. data/rbi/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rbi +8 -0
  184. data/rbi/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rbi +8 -0
  185. data/rbi/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rbi +8 -0
  186. data/rbi/orb/models/webhooks/invoice_edited_standard_webhook_event.rbi +8 -0
  187. data/rbi/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rbi +8 -0
  188. data/rbi/orb/models/webhooks/invoice_issued_standard_webhook_event.rbi +8 -0
  189. data/rbi/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rbi +8 -0
  190. data/rbi/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rbi +8 -0
  191. data/rbi/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rbi +8 -0
  192. data/rbi/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rbi +8 -0
  193. data/rbi/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rbi +8 -0
  194. data/rbi/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rbi +8 -0
  195. data/rbi/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rbi +8 -0
  196. data/rbi/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rbi +8 -0
  197. data/rbi/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rbi +8 -0
  198. data/rbi/orb/models/webhooks/payment_method_created_standard_webhook_event.rbi +4 -2
  199. data/rbi/orb/models/webhooks/payment_method_deleted_standard_webhook_event.rbi +4 -2
  200. data/rbi/orb/models/webhooks/plan_created_standard_webhook_event.rbi +11 -3
  201. data/rbi/orb/models/webhooks/plan_default_version_set_standard_webhook_event.rbi +11 -3
  202. data/rbi/orb/models/webhooks/plan_edited_standard_webhook_event.rbi +6 -0
  203. data/rbi/orb/models/webhooks/plan_version_created_standard_webhook_event.rbi +11 -3
  204. data/rbi/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rbi +8 -0
  205. data/rbi/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rbi +8 -0
  206. data/rbi/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rbi +11 -3
  207. data/rbi/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rbi +11 -3
  208. data/rbi/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rbi +22 -6
  209. data/rbi/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rbi +11 -3
  210. data/rbi/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rbi +11 -3
  211. data/rbi/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rbi +22 -6
  212. data/rbi/orb/models/webhooks/subscription_created_standard_webhook_event.rbi +11 -3
  213. data/rbi/orb/models/webhooks/subscription_edited_standard_webhook_event.rbi +11 -3
  214. data/rbi/orb/models/webhooks/subscription_ended_standard_webhook_event.rbi +11 -3
  215. data/rbi/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rbi +11 -3
  216. data/rbi/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rbi +22 -6
  217. data/rbi/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rbi +11 -3
  218. data/rbi/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rbi +11 -3
  219. data/rbi/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rbi +22 -6
  220. data/rbi/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rbi +11 -3
  221. data/rbi/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rbi +11 -3
  222. data/rbi/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rbi +11 -3
  223. data/rbi/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rbi +11 -3
  224. data/rbi/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rbi +22 -6
  225. data/rbi/orb/models/webhooks/subscription_started_standard_webhook_event.rbi +11 -3
  226. data/rbi/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rbi +11 -3
  227. data/rbi/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rbi +22 -6
  228. data/rbi/orb/models.rbi +4 -0
  229. data/rbi/orb/resources/credit_notes.rbi +6 -2
  230. data/rbi/orb/resources/customers/credits/ledger.rbi +56 -0
  231. data/rbi/orb/resources/customers.rbi +12 -0
  232. data/rbi/orb/resources/invoices.rbi +57 -12
  233. data/rbi/orb/resources/plans/external_plan_id.rbi +4 -0
  234. data/rbi/orb/resources/plans.rbi +12 -3
  235. data/rbi/orb/resources/subscriptions.rbi +62 -16
  236. data/sig/orb/models/alert.rbs +8 -3
  237. data/sig/orb/models/changed_subscription_resources.rbs +5 -0
  238. data/sig/orb/models/credit_note.rbs +5 -0
  239. data/sig/orb/models/credit_note_list_params.rbs +5 -0
  240. data/sig/orb/models/customer.rbs +5 -0
  241. data/sig/orb/models/customer_create_params.rbs +5 -0
  242. data/sig/orb/models/customer_credit_balance_depleted_webhook_event.rbs +8 -3
  243. data/sig/orb/models/customer_credit_balance_dropped_webhook_event.rbs +8 -3
  244. data/sig/orb/models/customer_credit_balance_recovered_webhook_event.rbs +8 -3
  245. data/sig/orb/models/customer_edited_webhook_event.rbs +5 -0
  246. data/sig/orb/models/customer_update_by_external_id_params.rbs +5 -0
  247. data/sig/orb/models/customer_update_params.rbs +5 -0
  248. data/sig/orb/models/invoice.rbs +5 -0
  249. data/sig/orb/models/invoice_create_params.rbs +10 -0
  250. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +5 -0
  251. data/sig/orb/models/invoice_issue_summary_response.rbs +5 -0
  252. data/sig/orb/models/invoice_issued_summary_webhook_event.rbs +5 -0
  253. data/sig/orb/models/invoice_list_params.rbs +15 -12
  254. data/sig/orb/models/invoice_list_summary_params.rbs +11 -8
  255. data/sig/orb/models/invoice_list_summary_response.rbs +5 -0
  256. data/sig/orb/models/invoice_status_filter.rbs +17 -0
  257. data/sig/orb/models/mutated_subscription.rbs +5 -0
  258. data/sig/orb/models/plan.rbs +18 -3
  259. data/sig/orb/models/plan_create_params.rbs +5 -0
  260. data/sig/orb/models/plan_created_webhook_event.rbs +13 -3
  261. data/sig/orb/models/plan_default_version_set_webhook_event.rbs +13 -3
  262. data/sig/orb/models/plan_edited_webhook_event.rbs +5 -0
  263. data/sig/orb/models/plan_update_params.rbs +5 -0
  264. data/sig/orb/models/plan_version_created_webhook_event.rbs +13 -3
  265. data/sig/orb/models/plans/external_plan_id_update_params.rbs +5 -0
  266. data/sig/orb/models/subscription.rbs +5 -0
  267. data/sig/orb/models/subscription_alert_disabled_webhook_event.rbs +21 -6
  268. data/sig/orb/models/subscription_cost_exceeded_webhook_event.rbs +8 -3
  269. data/sig/orb/models/subscription_create_params.rbs +10 -0
  270. data/sig/orb/models/subscription_fetch_schedule_response.rbs +13 -3
  271. data/sig/orb/models/subscription_grouped_cost_exceeded_webhook_event.rbs +21 -6
  272. data/sig/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rbs +13 -3
  273. data/sig/orb/models/subscription_license_allocation_reset_webhook_event.rbs +13 -3
  274. data/sig/orb/models/subscription_license_balance_threshold_reached_webhook_event.rbs +21 -6
  275. data/sig/orb/models/subscription_list_params.rbs +39 -14
  276. data/sig/orb/models/subscription_list_summary_params.rbs +39 -14
  277. data/sig/orb/models/subscription_list_summary_response.rbs +13 -3
  278. data/sig/orb/models/subscription_spend_exceeded_webhook_event.rbs +8 -3
  279. data/sig/orb/models/subscription_status_filter.rbs +15 -0
  280. data/sig/orb/models/subscription_usage_exceeded_webhook_event.rbs +8 -3
  281. data/sig/orb/models/webhooks/customer_credit_balance_depleted_standard_webhook_event.rbs +8 -3
  282. data/sig/orb/models/webhooks/customer_credit_balance_dropped_standard_webhook_event.rbs +8 -3
  283. data/sig/orb/models/webhooks/customer_credit_balance_recovered_standard_webhook_event.rbs +8 -3
  284. data/sig/orb/models/webhooks/customer_edited_standard_webhook_event.rbs +5 -0
  285. data/sig/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rbs +5 -0
  286. data/sig/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rbs +5 -0
  287. data/sig/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rbs +5 -0
  288. data/sig/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rbs +5 -0
  289. data/sig/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rbs +5 -0
  290. data/sig/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rbs +5 -0
  291. data/sig/orb/models/webhooks/invoice_edited_standard_webhook_event.rbs +5 -0
  292. data/sig/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rbs +5 -0
  293. data/sig/orb/models/webhooks/invoice_issued_standard_webhook_event.rbs +5 -0
  294. data/sig/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rbs +5 -0
  295. data/sig/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rbs +5 -0
  296. data/sig/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rbs +5 -0
  297. data/sig/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rbs +5 -0
  298. data/sig/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rbs +5 -0
  299. data/sig/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rbs +5 -0
  300. data/sig/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rbs +5 -0
  301. data/sig/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rbs +5 -0
  302. data/sig/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rbs +5 -0
  303. data/sig/orb/models/webhooks/plan_created_standard_webhook_event.rbs +13 -3
  304. data/sig/orb/models/webhooks/plan_default_version_set_standard_webhook_event.rbs +13 -3
  305. data/sig/orb/models/webhooks/plan_edited_standard_webhook_event.rbs +5 -0
  306. data/sig/orb/models/webhooks/plan_version_created_standard_webhook_event.rbs +13 -3
  307. data/sig/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rbs +5 -0
  308. data/sig/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rbs +5 -0
  309. data/sig/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rbs +13 -3
  310. data/sig/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rbs +13 -3
  311. data/sig/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rbs +21 -6
  312. data/sig/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rbs +13 -3
  313. data/sig/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rbs +13 -3
  314. data/sig/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rbs +21 -6
  315. data/sig/orb/models/webhooks/subscription_created_standard_webhook_event.rbs +13 -3
  316. data/sig/orb/models/webhooks/subscription_edited_standard_webhook_event.rbs +13 -3
  317. data/sig/orb/models/webhooks/subscription_ended_standard_webhook_event.rbs +13 -3
  318. data/sig/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rbs +13 -3
  319. data/sig/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rbs +21 -6
  320. data/sig/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rbs +13 -3
  321. data/sig/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rbs +13 -3
  322. data/sig/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rbs +21 -6
  323. data/sig/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rbs +13 -3
  324. data/sig/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rbs +13 -3
  325. data/sig/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rbs +13 -3
  326. data/sig/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rbs +13 -3
  327. data/sig/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rbs +21 -6
  328. data/sig/orb/models/webhooks/subscription_started_standard_webhook_event.rbs +13 -3
  329. data/sig/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rbs +13 -3
  330. data/sig/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rbs +21 -6
  331. data/sig/orb/models.rbs +4 -0
  332. data/sig/orb/resources/credit_notes.rbs +1 -0
  333. data/sig/orb/resources/customers.rbs +3 -0
  334. data/sig/orb/resources/invoices.rbs +5 -1
  335. data/sig/orb/resources/plans/external_plan_id.rbs +1 -0
  336. data/sig/orb/resources/plans.rbs +2 -0
  337. data/sig/orb/resources/subscriptions.rbs +8 -4
  338. metadata +7 -1
@@ -182,7 +182,13 @@ module Orb
182
182
  # @return [String, nil]
183
183
  required :name, String, nil?: true
184
184
 
185
- # @!method initialize(id:, external_plan_id:, name:)
185
+ # @!attribute billing_entity_id
186
+ # The id of the default billing entity of this plan.
187
+ #
188
+ # @return [String, nil]
189
+ optional :billing_entity_id, String, nil?: true
190
+
191
+ # @!method initialize(id:, external_plan_id:, name:, billing_entity_id: nil)
186
192
  # Some parameter documentations has been truncated, see
187
193
  # {Orb::Models::Webhooks::SubscriptionTrialEndedStandardWebhookEvent::Subscription::Plan}
188
194
  # for more details.
@@ -192,6 +198,8 @@ module Orb
192
198
  # @param external_plan_id [String, nil] An optional user-defined ID for this plan resource, used throughout the system a
193
199
  #
194
200
  # @param name [String, nil]
201
+ #
202
+ # @param billing_entity_id [String, nil] The id of the default billing entity of this plan.
195
203
  end
196
204
 
197
205
  # @see Orb::Models::Webhooks::SubscriptionTrialEndedStandardWebhookEvent::Subscription#status
@@ -344,7 +344,13 @@ module Orb
344
344
  # @return [String]
345
345
  required :plan_version, String
346
346
 
347
- # @!method initialize(id:, external_plan_id:, name:, plan_version:)
347
+ # @!attribute billing_entity_id
348
+ # The id of the default billing entity of this plan.
349
+ #
350
+ # @return [String, nil]
351
+ optional :billing_entity_id, String, nil?: true
352
+
353
+ # @!method initialize(id:, external_plan_id:, name:, plan_version:, billing_entity_id: nil)
348
354
  # Some parameter documentations has been truncated, see
349
355
  # {Orb::Models::Webhooks::SubscriptionUsageExceededStandardWebhookEvent::Properties::AlertConfiguration::Plan}
350
356
  # for more details.
@@ -358,6 +364,8 @@ module Orb
358
364
  # @param name [String, nil]
359
365
  #
360
366
  # @param plan_version [String]
367
+ #
368
+ # @param billing_entity_id [String, nil] The id of the default billing entity of this plan.
361
369
  end
362
370
 
363
371
  class Threshold < Orb::Internal::Type::BaseModel
@@ -660,7 +668,13 @@ module Orb
660
668
  # @return [String, nil]
661
669
  required :name, String, nil?: true
662
670
 
663
- # @!method initialize(id:, external_plan_id:, name:)
671
+ # @!attribute billing_entity_id
672
+ # The id of the default billing entity of this plan.
673
+ #
674
+ # @return [String, nil]
675
+ optional :billing_entity_id, String, nil?: true
676
+
677
+ # @!method initialize(id:, external_plan_id:, name:, billing_entity_id: nil)
664
678
  # Some parameter documentations has been truncated, see
665
679
  # {Orb::Models::Webhooks::SubscriptionUsageExceededStandardWebhookEvent::Subscription::Plan}
666
680
  # for more details.
@@ -670,6 +684,8 @@ module Orb
670
684
  # @param external_plan_id [String, nil] An optional user-defined ID for this plan resource, used throughout the system a
671
685
  #
672
686
  # @param name [String, nil]
687
+ #
688
+ # @param billing_entity_id [String, nil] The id of the default billing entity of this plan.
673
689
  end
674
690
 
675
691
  # @see Orb::Models::Webhooks::SubscriptionUsageExceededStandardWebhookEvent::Subscription#status
data/lib/orb/models.rb CHANGED
@@ -329,6 +329,8 @@ module Orb
329
329
 
330
330
  InvoiceRegenerateReceiptPdfParams = Orb::Models::InvoiceRegenerateReceiptPdfParams
331
331
 
332
+ InvoiceStatusFilter = Orb::Models::InvoiceStatusFilter
333
+
332
334
  InvoiceSyncFailedWebhookEvent = Orb::Models::InvoiceSyncFailedWebhookEvent
333
335
 
334
336
  InvoiceSyncSucceededWebhookEvent = Orb::Models::InvoiceSyncSucceededWebhookEvent
@@ -788,6 +790,8 @@ module Orb
788
790
 
789
791
  SubscriptionStartedWebhookEvent = Orb::Models::SubscriptionStartedWebhookEvent
790
792
 
793
+ SubscriptionStatusFilter = Orb::Models::SubscriptionStatusFilter
794
+
791
795
  SubscriptionTrialEndedWebhookEvent = Orb::Models::SubscriptionTrialEndedWebhookEvent
792
796
 
793
797
  SubscriptionTrialInfo = Orb::Models::SubscriptionTrialInfo
@@ -67,11 +67,12 @@ module Orb
67
67
  # Some parameter documentations has been truncated, see
68
68
  # {Orb::Models::CreditNoteListParams} for more details.
69
69
  #
70
- # Get a paginated list of CreditNotes. Users can also filter by customer_id,
71
- # subscription_id, or external_customer_id. The credit notes will be returned in
70
+ # Get a paginated list of CreditNotes. The credit notes will be returned in
72
71
  # reverse chronological order by `creation_time`.
73
72
  #
74
- # @overload list(created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, cursor: nil, limit: nil, request_options: {})
73
+ # @overload list(billing_entity_id: nil, created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, cursor: nil, limit: nil, request_options: {})
74
+ #
75
+ # @param billing_entity_id [String, nil] Filters to objects issued by this billing entity. Filtering on the account's def
75
76
  #
76
77
  # @param created_at_gt [Time, nil]
77
78
  #
@@ -155,6 +155,17 @@ module Orb
155
155
  # 3. If `invoice_settings` is specified, an invoice will be created that reflects
156
156
  # the cost of the credits (based on `amount` and `per_unit_cost_basis`).
157
157
  #
158
+ # ## Currency
159
+ #
160
+ # `currency` sets which currency or custom pricing unit ledger the entry applies
161
+ # to. It is optional: if it is omitted, Orb uses the customer's default ledger
162
+ # pricing unit, which may not be the one you intend. We recommend passing
163
+ # `currency` explicitly on every ledger entry.
164
+ #
165
+ # For entries that act on an existing block (`void`, `amendment`, and
166
+ # `expiration_change`), `currency` must match the block's pricing unit. Otherwise
167
+ # the request fails with a currency mismatch error.
168
+ #
158
169
  # ## Adding credits
159
170
  #
160
171
  # Adding credits is done by creating an entry of type `increment`. This requires
@@ -255,6 +266,23 @@ module Orb
255
266
  # how many credits to void, up to the block's initial balance. Pass in a
256
267
  # `void_reason` of `refund` if the void is due to a refund.
257
268
  #
269
+ # Pass `currency` set to the block's currency or custom pricing unit. If it is
270
+ # omitted and the block is not in the customer's default ledger pricing unit, the
271
+ # request fails with a currency mismatch error.
272
+ #
273
+ # The following snippet illustrates a sample request body to void 50 credits from
274
+ # a block that uses a custom pricing unit named `tokens`:
275
+ #
276
+ # ```json
277
+ # {
278
+ # "entry_type": "void",
279
+ # "block_id": "UiUhFWeLHPrBY4Ad",
280
+ # "amount": 50,
281
+ # "currency": "tokens",
282
+ # "void_reason": "refund"
283
+ # }
284
+ # ```
285
+ #
258
286
  # ## Amendment
259
287
  #
260
288
  # If you'd like to undo a decrement on a credit block, create a ledger entry of
@@ -300,6 +328,17 @@ module Orb
300
328
  # 3. If `invoice_settings` is specified, an invoice will be created that reflects
301
329
  # the cost of the credits (based on `amount` and `per_unit_cost_basis`).
302
330
  #
331
+ # ## Currency
332
+ #
333
+ # `currency` sets which currency or custom pricing unit ledger the entry applies
334
+ # to. It is optional: if it is omitted, Orb uses the customer's default ledger
335
+ # pricing unit, which may not be the one you intend. We recommend passing
336
+ # `currency` explicitly on every ledger entry.
337
+ #
338
+ # For entries that act on an existing block (`void`, `amendment`, and
339
+ # `expiration_change`), `currency` must match the block's pricing unit. Otherwise
340
+ # the request fails with a currency mismatch error.
341
+ #
303
342
  # ## Adding credits
304
343
  #
305
344
  # Adding credits is done by creating an entry of type `increment`. This requires
@@ -400,6 +439,23 @@ module Orb
400
439
  # how many credits to void, up to the block's initial balance. Pass in a
401
440
  # `void_reason` of `refund` if the void is due to a refund.
402
441
  #
442
+ # Pass `currency` set to the block's currency or custom pricing unit. If it is
443
+ # omitted and the block is not in the customer's default ledger pricing unit, the
444
+ # request fails with a currency mismatch error.
445
+ #
446
+ # The following snippet illustrates a sample request body to void 50 credits from
447
+ # a block that uses a custom pricing unit named `tokens`:
448
+ #
449
+ # ```json
450
+ # {
451
+ # "entry_type": "void",
452
+ # "block_id": "UiUhFWeLHPrBY4Ad",
453
+ # "amount": 50,
454
+ # "currency": "tokens",
455
+ # "void_reason": "refund"
456
+ # }
457
+ # ```
458
+ #
403
459
  # ## Amendment
404
460
  #
405
461
  # If you'd like to undo a decrement on a credit block, create a ledger entry of
@@ -84,7 +84,7 @@ module Orb
84
84
  # - [Timezone localization](/essentials/timezones) can be configured on a
85
85
  # per-customer basis by setting the `timezone` parameter
86
86
  #
87
- # @overload create(email:, name:, accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, billing_address: nil, currency: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, payment_configuration: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, timezone: nil, request_options: {})
87
+ # @overload create(email:, name:, accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, billing_address: nil, billing_entity_id: nil, currency: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, payment_configuration: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, timezone: nil, request_options: {})
88
88
  #
89
89
  # @param email [String] A valid customer email, to be used for notifications. When Orb triggers payment
90
90
  #
@@ -100,6 +100,8 @@ module Orb
100
100
  #
101
101
  # @param billing_address [Orb::Models::AddressInput, nil]
102
102
  #
103
+ # @param billing_entity_id [String, nil] The Orb ID of the active billing entity to set as this customer's default entity
104
+ #
103
105
  # @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. If not
104
106
  #
105
107
  # @param email_delivery [Boolean, nil]
@@ -152,7 +154,7 @@ module Orb
152
154
  # be set if it has not already been set on the customer. Other fields on a
153
155
  # customer are currently immutable.
154
156
  #
155
- # @overload update(customer_id, accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, billing_address: nil, currency: nil, default_payment_method_id: nil, email: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, name: nil, payment_configuration: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, request_options: {})
157
+ # @overload update(customer_id, accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, billing_address: nil, billing_entity_id: nil, currency: nil, default_payment_method_id: nil, email: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, name: nil, payment_configuration: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, request_options: {})
156
158
  #
157
159
  # @param customer_id [String]
158
160
  #
@@ -166,6 +168,8 @@ module Orb
166
168
  #
167
169
  # @param billing_address [Orb::Models::AddressInput, nil]
168
170
  #
171
+ # @param billing_entity_id [String, nil] The Orb ID of the active billing entity to set as this customer's default entity
172
+ #
169
173
  # @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. This c
170
174
  #
171
175
  # @param default_payment_method_id [String, nil] The Orb ID of the payment method to set as this customer's default. Pass `null`
@@ -461,7 +465,7 @@ module Orb
461
465
  # resource and semantics of this endpoint exactly mirror
462
466
  # [Update Customer](update-customer).
463
467
  #
464
- # @overload update_by_external_id(id, accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, billing_address: nil, currency: nil, default_payment_method_id: nil, email: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, name: nil, payment_configuration: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, request_options: {})
468
+ # @overload update_by_external_id(id, accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, billing_address: nil, billing_entity_id: nil, currency: nil, default_payment_method_id: nil, email: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, name: nil, payment_configuration: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, request_options: {})
465
469
  #
466
470
  # @param id [String]
467
471
  #
@@ -475,6 +479,8 @@ module Orb
475
479
  #
476
480
  # @param billing_address [Orb::Models::AddressInput, nil]
477
481
  #
482
+ # @param billing_entity_id [String, nil] The Orb ID of the active billing entity to set as this customer's default entity
483
+ #
478
484
  # @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. This c
479
485
  #
480
486
  # @param default_payment_method_id [String, nil] The Orb ID of the payment method to set as this customer's default. Pass `null`
@@ -13,7 +13,7 @@ module Orb
13
13
  #
14
14
  # This endpoint is used to create a one-off invoice for a customer.
15
15
  #
16
- # @overload create(currency:, invoice_date:, line_items:, auto_collection: nil, customer_id: nil, discount: nil, due_date: nil, external_customer_id: nil, memo: nil, metadata: nil, net_terms: nil, will_auto_issue: nil, request_options: {})
16
+ # @overload create(currency:, invoice_date:, line_items:, auto_collection: nil, billing_entity_id: nil, customer_id: nil, discount: nil, due_date: nil, external_billing_entity_id: nil, external_customer_id: nil, memo: nil, metadata: nil, net_terms: nil, will_auto_issue: nil, request_options: {})
17
17
  #
18
18
  # @param currency [String] An ISO 4217 currency string. Must be the same as the customer's currency if it i
19
19
  #
@@ -23,19 +23,23 @@ module Orb
23
23
  #
24
24
  # @param auto_collection [Boolean, nil] Determines whether this invoice will automatically attempt to charge a saved pay
25
25
  #
26
+ # @param billing_entity_id [String, nil] The id of the active billing entity that issues this invoice. If not specified,
27
+ #
26
28
  # @param customer_id [String, nil] The id of the `Customer` to create this invoice for. One of `customer_id` and `e
27
29
  #
28
30
  # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, Orb::Models::Discount::TieredPercentage, nil] An optional discount to attach to the invoice.
29
31
  #
30
32
  # @param due_date [Date, Time, nil] An optional custom due date for the invoice. If not set, the due date will be ca
31
33
  #
34
+ # @param external_billing_entity_id [String, nil] The external id of the active billing entity that issues this invoice.
35
+ #
32
36
  # @param external_customer_id [String, nil] The `external_customer_id` of the `Customer` to create this invoice for. One of
33
37
  #
34
38
  # @param memo [String, nil] An optional memo to attach to the invoice. If no memo is provided, we will attac
35
39
  #
36
40
  # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
37
41
  #
38
- # @param net_terms [Integer, nil] The net terms determines the due date of the invoice. Due date is calculated bas
42
+ # @param net_terms [Integer, nil] The number of days until the invoice is due, counting the start date as day 1, s
39
43
  #
40
44
  # @param will_auto_issue [Boolean] When true, auto-issues the invoice on the invoice date. If the invoice date is t
41
45
  #
@@ -73,7 +77,7 @@ module Orb
73
77
  #
74
78
  # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
75
79
  #
76
- # @param net_terms [Integer, nil] The net terms determines the due date of the invoice. Due date is calculated bas
80
+ # @param net_terms [Integer, nil] The number of days until the invoice is due, counting the start date as day 1, s
77
81
  #
78
82
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
79
83
  #
@@ -112,7 +116,7 @@ module Orb
112
116
  # the [list invoices summary](/api-reference/invoice/list-invoices-summary)
113
117
  # endpoint for better performance.
114
118
  #
115
- # @overload list(amount: nil, amount_gt: nil, amount_lt: nil, cursor: nil, customer_id: nil, date_type: nil, due_date: nil, due_date_window: nil, due_date_gt: nil, due_date_lt: nil, external_customer_id: nil, include_zero_quantity_line_items: nil, invoice_date_gt: nil, invoice_date_gte: nil, invoice_date_lt: nil, invoice_date_lte: nil, is_recurring: nil, limit: nil, status: nil, subscription_id: nil, request_options: {})
119
+ # @overload list(amount: nil, amount_gt: nil, amount_lt: nil, billing_entity_id: nil, cursor: nil, customer_id: nil, date_type: nil, due_date: nil, due_date_window: nil, due_date_gt: nil, due_date_lt: nil, external_customer_id: nil, include_zero_quantity_line_items: nil, invoice_date_gt: nil, invoice_date_gte: nil, invoice_date_lt: nil, invoice_date_lte: nil, is_recurring: nil, limit: nil, status: nil, subscription_id: nil, request_options: {})
116
120
  #
117
121
  # @param amount [String, nil]
118
122
  #
@@ -120,6 +124,8 @@ module Orb
120
124
  #
121
125
  # @param amount_lt [String, nil]
122
126
  #
127
+ # @param billing_entity_id [String, nil] Filters to objects issued by this billing entity. Filtering on the account's def
128
+ #
123
129
  # @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned
124
130
  #
125
131
  # @param customer_id [String, nil]
@@ -150,7 +156,7 @@ module Orb
150
156
  #
151
157
  # @param limit [Integer] The number of items to fetch. Defaults to 20.
152
158
  #
153
- # @param status [Array<Symbol, Orb::Models::InvoiceListParams::Status>, nil]
159
+ # @param status [Symbol, Orb::Models::InvoiceStatusFilter, Array<Symbol, Orb::Models::InvoiceStatusFilter>, nil]
154
160
  #
155
161
  # @param subscription_id [String, nil]
156
162
  #
@@ -356,7 +362,7 @@ module Orb
356
362
  # values for each draft invoice, which may not always be up-to-date since Orb
357
363
  # regularly refreshes invoices asynchronously.
358
364
  #
359
- # @overload list_summary(amount: nil, amount_gt: nil, amount_lt: nil, cursor: nil, customer_id: nil, date_type: nil, due_date: nil, due_date_window: nil, due_date_gt: nil, due_date_lt: nil, external_customer_id: nil, invoice_date_gt: nil, invoice_date_gte: nil, invoice_date_lt: nil, invoice_date_lte: nil, is_recurring: nil, limit: nil, status: nil, subscription_id: nil, request_options: {})
365
+ # @overload list_summary(amount: nil, amount_gt: nil, amount_lt: nil, billing_entity_id: nil, cursor: nil, customer_id: nil, date_type: nil, due_date: nil, due_date_window: nil, due_date_gt: nil, due_date_lt: nil, external_customer_id: nil, invoice_date_gt: nil, invoice_date_gte: nil, invoice_date_lt: nil, invoice_date_lte: nil, is_recurring: nil, limit: nil, status: nil, subscription_id: nil, request_options: {})
360
366
  #
361
367
  # @param amount [String, nil]
362
368
  #
@@ -364,6 +370,8 @@ module Orb
364
370
  #
365
371
  # @param amount_lt [String, nil]
366
372
  #
373
+ # @param billing_entity_id [String, nil] Filters to objects issued by this billing entity. Filtering on the account's def
374
+ #
367
375
  # @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned
368
376
  #
369
377
  # @param customer_id [String, nil]
@@ -392,7 +400,7 @@ module Orb
392
400
  #
393
401
  # @param limit [Integer] The number of items to fetch. Defaults to 20.
394
402
  #
395
- # @param status [Symbol, Orb::Models::InvoiceListSummaryParams::Status, nil]
403
+ # @param status [Symbol, Orb::Models::InvoiceStatusFilter, Array<Symbol, Orb::Models::InvoiceStatusFilter>, nil]
396
404
  #
397
405
  # @param subscription_id [String, nil]
398
406
  #
@@ -457,6 +465,20 @@ module Orb
457
465
  # be provided to pay using agent-granted credentials instead. This action can only
458
466
  # be taken on invoices with status "issued".
459
467
  #
468
+ # A `200` response means Orb attempted the charge, not that the payment succeeded.
469
+ # A declined card still returns `200`. To check the outcome, read the returned
470
+ # invoice:
471
+ #
472
+ # - `status` is `paid` if the payment succeeded. It stays `issued` if the payment
473
+ # failed or is still processing.
474
+ # - The newest entry in `payment_attempts` has `succeeded: true` only if the
475
+ # charge went through.
476
+ #
477
+ # Some payment methods (such as ACH debits) settle asynchronously, so the outcome
478
+ # may not be known when this endpoint returns. Listen for the
479
+ # `invoice.payment_succeeded` and `invoice.payment_failed` webhooks to get the
480
+ # final result.
481
+ #
460
482
  # @overload pay(invoice_id, shared_payment_token_id: nil, request_options: {})
461
483
  #
462
484
  # @param invoice_id [String]
@@ -24,10 +24,12 @@ module Orb
24
24
  #
25
25
  # Other fields on a plan are currently immutable.
26
26
  #
27
- # @overload update(other_external_plan_id, description: nil, external_plan_id: nil, metadata: nil, name: nil, request_options: {})
27
+ # @overload update(other_external_plan_id, billing_entity_id: nil, description: nil, external_plan_id: nil, metadata: nil, name: nil, request_options: {})
28
28
  #
29
29
  # @param other_external_plan_id [String]
30
30
  #
31
+ # @param billing_entity_id [String, nil] The Orb ID of the active billing entity to set as this plan's default entity. Pa
32
+ #
31
33
  # @param description [String, nil] An optional user-defined description of the plan.
32
34
  #
33
35
  # @param external_plan_id [String, nil] An optional user-defined ID for this plan resource, used throughout the system a
@@ -33,7 +33,7 @@ module Orb
33
33
  #
34
34
  # This endpoint allows creation of plans including their prices.
35
35
  #
36
- # @overload create(currency:, name:, prices:, adjustments: nil, default_invoice_memo: nil, description: nil, external_plan_id: nil, metadata: nil, net_terms: nil, plan_phases: nil, status: nil, request_options: {})
36
+ # @overload create(currency:, name:, prices:, adjustments: nil, billing_entity_id: nil, default_invoice_memo: nil, description: nil, external_plan_id: nil, metadata: nil, net_terms: nil, plan_phases: nil, status: nil, request_options: {})
37
37
  #
38
38
  # @param currency [String] An ISO 4217 currency string for invoices generated by subscriptions on this plan
39
39
  #
@@ -43,6 +43,8 @@ module Orb
43
43
  #
44
44
  # @param adjustments [Array<Orb::Models::PlanCreateParams::Adjustment>, nil] Adjustments for this plan. If the plan has phases, this includes adjustments acr
45
45
  #
46
+ # @param billing_entity_id [String, nil] The Orb ID of the active billing entity to set as this plan's default entity.
47
+ #
46
48
  # @param default_invoice_memo [String, nil] Free-form text which is available on the invoice PDF and the Orb invoice portal.
47
49
  #
48
50
  # @param description [String, nil] An optional user-defined description of the plan.
@@ -51,7 +53,7 @@ module Orb
51
53
  #
52
54
  # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
53
55
  #
54
- # @param net_terms [Integer, nil] The net terms determines the difference between the invoice date and the issue d
56
+ # @param net_terms [Integer, nil] The number of days until the invoice is due, counting the start date as day 1, s
55
57
  #
56
58
  # @param plan_phases [Array<Orb::Models::PlanCreateParams::PlanPhase>, nil] Configuration of pre-defined phases, each with their own prices and adjustments.
57
59
  #
@@ -76,10 +78,12 @@ module Orb
76
78
  #
77
79
  # Other fields on a plan are currently immutable.
78
80
  #
79
- # @overload update(plan_id, description: nil, external_plan_id: nil, metadata: nil, name: nil, request_options: {})
81
+ # @overload update(plan_id, billing_entity_id: nil, description: nil, external_plan_id: nil, metadata: nil, name: nil, request_options: {})
80
82
  #
81
83
  # @param plan_id [String]
82
84
  #
85
+ # @param billing_entity_id [String, nil] The Orb ID of the active billing entity to set as this plan's default entity. Pa
86
+ #
83
87
  # @param description [String, nil] An optional user-defined description of the plan.
84
88
  #
85
89
  # @param external_plan_id [String, nil] An optional user-defined ID for this plan resource, used throughout the system a
@@ -267,7 +267,7 @@ module Orb
267
267
  #
268
268
  # By default, Orb limits the number of subscriptions per customer to 100.
269
269
  #
270
- # @overload create(add_adjustments: nil, add_prices: nil, align_billing_with_subscription_start_date: nil, auto_collection: nil, auto_issuance: nil, aws_region: nil, billing_cycle_anchor_configuration: nil, coupon_redemption_code: nil, credits_overage_rate: nil, currency: nil, customer_id: nil, default_invoice_memo: nil, end_date: nil, external_customer_id: nil, external_marketplace: nil, external_marketplace_reporting_id: nil, external_plan_id: nil, filter: nil, initial_phase_order: nil, invoicing_threshold: nil, metadata: nil, name: nil, net_terms: nil, per_credit_overage_amount: nil, plan_id: nil, plan_version_number: nil, price_overrides: nil, remove_adjustments: nil, remove_prices: nil, replace_adjustments: nil, replace_prices: nil, start_date: nil, trial_duration_days: nil, usage_customer_ids: nil, request_options: {})
270
+ # @overload create(add_adjustments: nil, add_prices: nil, align_billing_with_subscription_start_date: nil, auto_collection: nil, auto_issuance: nil, aws_region: nil, billing_cycle_anchor_configuration: nil, billing_entity_id: nil, coupon_redemption_code: nil, credits_overage_rate: nil, currency: nil, customer_id: nil, default_invoice_memo: nil, end_date: nil, external_billing_entity_id: nil, external_customer_id: nil, external_marketplace: nil, external_marketplace_reporting_id: nil, external_plan_id: nil, filter: nil, initial_phase_order: nil, invoicing_threshold: nil, metadata: nil, name: nil, net_terms: nil, per_credit_overage_amount: nil, plan_id: nil, plan_version_number: nil, price_overrides: nil, remove_adjustments: nil, remove_prices: nil, replace_adjustments: nil, replace_prices: nil, start_date: nil, trial_duration_days: nil, usage_customer_ids: nil, request_options: {})
271
271
  #
272
272
  # @param add_adjustments [Array<Orb::Models::SubscriptionCreateParams::AddAdjustment>, nil] Additional adjustments to be added to the subscription. (Only available for acco
273
273
  #
@@ -283,6 +283,8 @@ module Orb
283
283
  #
284
284
  # @param billing_cycle_anchor_configuration [Orb::Models::BillingCycleAnchorConfiguration, nil]
285
285
  #
286
+ # @param billing_entity_id [String, nil] The id of the active billing entity that issues this subscription's invoices. If
287
+ #
286
288
  # @param coupon_redemption_code [String, nil] Redemption code to be used for this subscription. If the coupon cannot be found
287
289
  #
288
290
  # @param credits_overage_rate [Float, nil]
@@ -295,6 +297,8 @@ module Orb
295
297
  #
296
298
  # @param end_date [Time, nil]
297
299
  #
300
+ # @param external_billing_entity_id [String, nil] The external id of the active billing entity that issues this subscription's inv
301
+ #
298
302
  # @param external_customer_id [String, nil]
299
303
  #
300
304
  # @param external_marketplace [Symbol, Orb::Models::SubscriptionCreateParams::ExternalMarketplace, nil]
@@ -313,7 +317,7 @@ module Orb
313
317
  #
314
318
  # @param name [String, nil] The name to use for the subscription. If not specified, the plan name will be us
315
319
  #
316
- # @param net_terms [Integer, nil] The net terms determines the difference between the invoice date and the issue d
320
+ # @param net_terms [Integer, nil] The number of days until the invoice is due, counting the start date as day 1, s
317
321
  #
318
322
  # @param per_credit_overage_amount [Float, nil]
319
323
  #
@@ -374,7 +378,7 @@ module Orb
374
378
  #
375
379
  # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
376
380
  #
377
- # @param net_terms [Integer, nil] Determines the difference between the invoice issue date for subscription invoic
381
+ # @param net_terms [Integer, nil] The number of days until subscription invoices are due, counting the start date
378
382
  #
379
383
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
380
384
  #
@@ -410,7 +414,9 @@ module Orb
410
414
  # request, use the status[] query parameter, e.g.
411
415
  # `status[]=active&status[]=ended`.
412
416
  #
413
- # @overload list(created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, cursor: nil, customer_id: nil, external_customer_id: nil, external_plan_id: nil, limit: nil, plan_id: nil, status: nil, request_options: {})
417
+ # @overload list(billing_entity_id: nil, created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, cursor: nil, customer_id: nil, external_customer_id: nil, external_plan_id: nil, limit: nil, plan_id: nil, status: nil, request_options: {})
418
+ #
419
+ # @param billing_entity_id [String, nil] Filters to objects issued by this billing entity. Filtering on the account's def
414
420
  #
415
421
  # @param created_at_gt [Time, nil]
416
422
  #
@@ -422,9 +428,9 @@ module Orb
422
428
  #
423
429
  # @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned
424
430
  #
425
- # @param customer_id [Array<String>, nil]
431
+ # @param customer_id [String, Array<String>, nil]
426
432
  #
427
- # @param external_customer_id [Array<String>, nil]
433
+ # @param external_customer_id [String, Array<String>, nil]
428
434
  #
429
435
  # @param external_plan_id [String, nil]
430
436
  #
@@ -432,7 +438,7 @@ module Orb
432
438
  #
433
439
  # @param plan_id [String, nil]
434
440
  #
435
- # @param status [Symbol, Orb::Models::SubscriptionListParams::Status, nil]
441
+ # @param status [Symbol, Orb::Models::SubscriptionStatusFilter, Array<Symbol, Orb::Models::SubscriptionStatusFilter>, nil]
436
442
  #
437
443
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
438
444
  #
@@ -910,7 +916,9 @@ module Orb
910
916
  # This is the same summary of a subscription that standard
911
917
  # [webhook payloads](/integrations-and-exports/webhook-payload-styles) carry.
912
918
  #
913
- # @overload list_summary(created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, cursor: nil, customer_id: nil, external_customer_id: nil, external_plan_id: nil, limit: nil, plan_id: nil, status: nil, request_options: {})
919
+ # @overload list_summary(billing_entity_id: nil, created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, cursor: nil, customer_id: nil, external_customer_id: nil, external_plan_id: nil, limit: nil, plan_id: nil, status: nil, request_options: {})
920
+ #
921
+ # @param billing_entity_id [String, nil] Filters to objects issued by this billing entity. Filtering on the account's def
914
922
  #
915
923
  # @param created_at_gt [Time, nil]
916
924
  #
@@ -922,9 +930,9 @@ module Orb
922
930
  #
923
931
  # @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned
924
932
  #
925
- # @param customer_id [String, nil]
933
+ # @param customer_id [String, Array<String>, nil]
926
934
  #
927
- # @param external_customer_id [String, nil]
935
+ # @param external_customer_id [String, Array<String>, nil]
928
936
  #
929
937
  # @param external_plan_id [String, nil]
930
938
  #
@@ -932,7 +940,7 @@ module Orb
932
940
  #
933
941
  # @param plan_id [String, nil]
934
942
  #
935
- # @param status [Symbol, Orb::Models::SubscriptionListSummaryParams::Status, nil]
943
+ # @param status [Symbol, Orb::Models::SubscriptionStatusFilter, Array<Symbol, Orb::Models::SubscriptionStatusFilter>, nil]
936
944
  #
937
945
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
938
946
  #
@@ -1347,7 +1355,7 @@ module Orb
1347
1355
  #
1348
1356
  # @param invoicing_threshold [String, nil] When this subscription's accrued usage reaches this threshold, an invoice will b
1349
1357
  #
1350
- # @param net_terms [Integer, nil] The net terms determines the difference between the invoice date and the issue d
1358
+ # @param net_terms [Integer, nil] The number of days until the invoice is due, counting the start date as day 1, s
1351
1359
  #
1352
1360
  # @param per_credit_overage_amount [Float, nil]
1353
1361
  #
data/lib/orb/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Orb
4
- VERSION = "1.58.0"
4
+ VERSION = "1.60.0"
5
5
  end
data/lib/orb.rb CHANGED
@@ -263,6 +263,7 @@ require_relative "orb/models/invoice_payment_succeeded_webhook_event"
263
263
  require_relative "orb/models/invoice_pay_params"
264
264
  require_relative "orb/models/invoice_regenerate_invoice_pdf_params"
265
265
  require_relative "orb/models/invoice_regenerate_receipt_pdf_params"
266
+ require_relative "orb/models/invoice_status_filter"
266
267
  require_relative "orb/models/invoice_sync_failed_webhook_event"
267
268
  require_relative "orb/models/invoice_sync_succeeded_webhook_event"
268
269
  require_relative "orb/models/invoice_tiny"
@@ -532,6 +533,7 @@ require_relative "orb/models/subscriptions"
532
533
  require_relative "orb/models/subscription_schedule_plan_change_params"
533
534
  require_relative "orb/models/subscription_spend_exceeded_webhook_event"
534
535
  require_relative "orb/models/subscription_started_webhook_event"
536
+ require_relative "orb/models/subscription_status_filter"
535
537
  require_relative "orb/models/subscription_trial_ended_webhook_event"
536
538
  require_relative "orb/models/subscription_trial_info"
537
539
  require_relative "orb/models/subscription_trigger_phase_params"
@@ -220,13 +220,18 @@ module Orb
220
220
  sig { returns(String) }
221
221
  attr_accessor :plan_version
222
222
 
223
+ # The id of the default billing entity of this plan.
224
+ sig { returns(T.nilable(String)) }
225
+ attr_accessor :billing_entity_id
226
+
223
227
  # The plan the alert applies to.
224
228
  sig do
225
229
  params(
226
230
  id: T.nilable(String),
227
231
  external_plan_id: T.nilable(String),
228
232
  name: T.nilable(String),
229
- plan_version: String
233
+ plan_version: String,
234
+ billing_entity_id: T.nilable(String)
230
235
  ).returns(T.attached_class)
231
236
  end
232
237
  def self.new(
@@ -236,7 +241,9 @@ module Orb
236
241
  # identifier in your system.
237
242
  external_plan_id:,
238
243
  name:,
239
- plan_version:
244
+ plan_version:,
245
+ # The id of the default billing entity of this plan.
246
+ billing_entity_id: nil
240
247
  )
241
248
  end
242
249
 
@@ -246,7 +253,8 @@ module Orb
246
253
  id: T.nilable(String),
247
254
  external_plan_id: T.nilable(String),
248
255
  name: T.nilable(String),
249
- plan_version: String
256
+ plan_version: String,
257
+ billing_entity_id: T.nilable(String)
250
258
  }
251
259
  )
252
260
  end
@@ -99,6 +99,10 @@ module Orb
99
99
  sig { params(billing_address: T.nilable(Orb::Address::OrHash)).void }
100
100
  attr_writer :billing_address
101
101
 
102
+ # The id of the billing entity that issues this invoice.
103
+ sig { returns(T.nilable(String)) }
104
+ attr_accessor :billing_entity_id
105
+
102
106
  # The creation time of the resource in Orb.
103
107
  sig { returns(Time) }
104
108
  attr_accessor :created_at
@@ -502,6 +506,7 @@ module Orb
502
506
  auto_collection:
503
507
  Orb::ChangedSubscriptionResources::CreatedInvoice::AutoCollection::OrHash,
504
508
  billing_address: T.nilable(Orb::Address::OrHash),
509
+ billing_entity_id: T.nilable(String),
505
510
  created_at: Time,
506
511
  credit_notes:
507
512
  T::Array[
@@ -575,6 +580,8 @@ module Orb
575
580
  amount_due:,
576
581
  auto_collection:,
577
582
  billing_address:,
583
+ # The id of the billing entity that issues this invoice.
584
+ billing_entity_id:,
578
585
  # The creation time of the resource in Orb.
579
586
  created_at:,
580
587
  # A list of credit notes associated with the invoice
@@ -842,6 +849,7 @@ module Orb
842
849
  auto_collection:
843
850
  Orb::ChangedSubscriptionResources::CreatedInvoice::AutoCollection,
844
851
  billing_address: T.nilable(Orb::Address),
852
+ billing_entity_id: T.nilable(String),
845
853
  created_at: Time,
846
854
  credit_notes:
847
855
  T::Array[