orb-billing 1.13.0 → 1.15.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 (624) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +55 -0
  3. data/README.md +1 -1
  4. data/lib/orb/client.rb +21 -0
  5. data/lib/orb/internal/transport/base_client.rb +5 -0
  6. data/lib/orb/internal/type/union.rb +13 -27
  7. data/lib/orb/internal/util.rb +22 -7
  8. data/lib/orb/models/accounting_provider_config.rb +14 -3
  9. data/lib/orb/models/adjustment_interval.rb +185 -3
  10. data/lib/orb/models/alert.rb +114 -1
  11. data/lib/orb/models/alert_create_for_customer_params.rb +8 -1
  12. data/lib/orb/models/alert_create_for_external_customer_params.rb +8 -1
  13. data/lib/orb/models/alert_create_for_subscription_params.rb +142 -1
  14. data/lib/orb/models/alert_disable_params.rb +8 -1
  15. data/lib/orb/models/alert_enable_params.rb +8 -1
  16. data/lib/orb/models/alert_retrieve_params.rb +7 -1
  17. data/lib/orb/models/alert_update_params.rb +120 -1
  18. data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +3296 -631
  19. data/lib/orb/models/beta/external_plan_id_fetch_plan_version_params.rb +7 -1
  20. data/lib/orb/models/beta/external_plan_id_set_default_plan_version_params.rb +8 -1
  21. data/lib/orb/models/beta_create_plan_version_params.rb +3263 -622
  22. data/lib/orb/models/beta_fetch_plan_version_params.rb +7 -1
  23. data/lib/orb/models/beta_set_default_plan_version_params.rb +8 -1
  24. data/lib/orb/models/changed_subscription_resources.rb +200 -10
  25. data/lib/orb/models/conversion_rate_config.rb +18 -0
  26. data/lib/orb/models/coupon_archive_params.rb +7 -1
  27. data/lib/orb/models/coupon_fetch_params.rb +7 -1
  28. data/lib/orb/models/coupons/subscription_list_params.rb +8 -1
  29. data/lib/orb/models/credit_block_delete_params.rb +7 -1
  30. data/lib/orb/models/credit_block_list_invoices_params.rb +7 -1
  31. data/lib/orb/models/credit_block_list_invoices_response.rb +155 -1
  32. data/lib/orb/models/credit_block_retrieve_params.rb +7 -1
  33. data/lib/orb/models/credit_block_retrieve_response.rb +150 -1
  34. data/lib/orb/models/credit_note_fetch_params.rb +7 -1
  35. data/lib/orb/models/customer.rb +122 -3
  36. data/lib/orb/models/customer_create_params.rb +17 -1
  37. data/lib/orb/models/customer_delete_params.rb +7 -1
  38. data/lib/orb/models/customer_fetch_by_external_id_params.rb +7 -1
  39. data/lib/orb/models/customer_fetch_params.rb +7 -1
  40. data/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rb +7 -1
  41. data/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rb +7 -1
  42. data/lib/orb/models/customer_tax_id.rb +15 -1
  43. data/lib/orb/models/customer_update_by_external_id_params.rb +39 -5
  44. data/lib/orb/models/customer_update_params.rb +39 -5
  45. data/lib/orb/models/customers/balance_transaction_create_params.rb +8 -1
  46. data/lib/orb/models/customers/balance_transaction_list_params.rb +8 -1
  47. data/lib/orb/models/customers/cost_list_by_external_id_params.rb +8 -1
  48. data/lib/orb/models/customers/cost_list_params.rb +8 -1
  49. data/lib/orb/models/customers/credit_list_by_external_id_params.rb +8 -1
  50. data/lib/orb/models/customers/credit_list_by_external_id_response.rb +155 -1
  51. data/lib/orb/models/customers/credit_list_params.rb +8 -1
  52. data/lib/orb/models/customers/credit_list_response.rb +152 -1
  53. data/lib/orb/models/customers/credits/decrement_ledger_entry.rb +5 -1
  54. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +582 -315
  55. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +580 -313
  56. data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +8 -1
  57. data/lib/orb/models/customers/credits/ledger_list_params.rb +8 -1
  58. data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +8 -1
  59. data/lib/orb/models/customers/credits/top_up_create_params.rb +8 -1
  60. data/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rb +7 -1
  61. data/lib/orb/models/customers/credits/top_up_delete_params.rb +7 -1
  62. data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +8 -1
  63. data/lib/orb/models/customers/credits/top_up_list_params.rb +8 -1
  64. data/lib/orb/models/dimensional_price_group.rb +1 -1
  65. data/lib/orb/models/dimensional_price_group_retrieve_params.rb +7 -1
  66. data/lib/orb/models/dimensional_price_group_update_params.rb +8 -1
  67. data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rb +7 -1
  68. data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rb +8 -1
  69. data/lib/orb/models/discount.rb +145 -1
  70. data/lib/orb/models/event_deprecate_params.rb +7 -1
  71. data/lib/orb/models/event_ingest_params.rb +5 -2
  72. data/lib/orb/models/event_update_params.rb +8 -1
  73. data/lib/orb/models/events/backfill_close_params.rb +7 -1
  74. data/lib/orb/models/events/backfill_fetch_params.rb +7 -1
  75. data/lib/orb/models/events/backfill_revert_params.rb +7 -1
  76. data/lib/orb/models/invoice.rb +198 -10
  77. data/lib/orb/models/invoice_create_params.rb +6 -5
  78. data/lib/orb/models/invoice_delete_line_item_params.rb +7 -1
  79. data/lib/orb/models/invoice_fetch_params.rb +7 -1
  80. data/lib/orb/models/invoice_fetch_upcoming_response.rb +200 -10
  81. data/lib/orb/models/invoice_issue_params.rb +8 -1
  82. data/lib/orb/models/invoice_issue_summary_params.rb +8 -1
  83. data/lib/orb/models/invoice_issue_summary_response.rb +9 -3
  84. data/lib/orb/models/invoice_level_discount.rb +145 -1
  85. data/lib/orb/models/invoice_line_item_create_response.rb +189 -5
  86. data/lib/orb/models/invoice_list_summary_response.rb +9 -3
  87. data/lib/orb/models/invoice_mark_paid_params.rb +8 -1
  88. data/lib/orb/models/invoice_pay_params.rb +16 -1
  89. data/lib/orb/models/invoice_update_params.rb +8 -1
  90. data/lib/orb/models/invoice_void_params.rb +7 -1
  91. data/lib/orb/models/item_archive_params.rb +7 -1
  92. data/lib/orb/models/item_fetch_params.rb +7 -1
  93. data/lib/orb/models/item_update_params.rb +8 -1
  94. data/lib/orb/models/license_deactivate_params.rb +8 -1
  95. data/lib/orb/models/license_retrieve_by_external_id_params.rb +8 -1
  96. data/lib/orb/models/license_retrieve_params.rb +7 -1
  97. data/lib/orb/models/license_type_retrieve_params.rb +7 -1
  98. data/lib/orb/models/licenses/external_license_get_usage_params.rb +11 -4
  99. data/lib/orb/models/licenses/usage_get_all_usage_params.rb +3 -3
  100. data/lib/orb/models/licenses/usage_get_usage_params.rb +11 -4
  101. data/lib/orb/models/metric_fetch_params.rb +7 -1
  102. data/lib/orb/models/metric_update_params.rb +8 -1
  103. data/lib/orb/models/mutated_subscription.rb +169 -4
  104. data/lib/orb/models/new_allocation_price.rb +11 -1
  105. data/lib/orb/models/new_floating_bulk_price.rb +1 -3
  106. data/lib/orb/models/new_floating_bulk_with_proration_price.rb +1 -3
  107. data/lib/orb/models/new_floating_cumulative_grouped_bulk_price.rb +1 -3
  108. data/lib/orb/models/new_floating_grouped_allocation_price.rb +1 -3
  109. data/lib/orb/models/new_floating_grouped_tiered_package_price.rb +1 -3
  110. data/lib/orb/models/new_floating_grouped_tiered_price.rb +1 -3
  111. data/lib/orb/models/new_floating_grouped_with_metered_minimum_price.rb +1 -3
  112. data/lib/orb/models/new_floating_grouped_with_prorated_minimum_price.rb +1 -3
  113. data/lib/orb/models/new_floating_matrix_price.rb +1 -3
  114. data/lib/orb/models/new_floating_matrix_with_allocation_price.rb +1 -3
  115. data/lib/orb/models/new_floating_matrix_with_display_name_price.rb +1 -3
  116. data/lib/orb/models/new_floating_max_group_tiered_package_price.rb +1 -3
  117. data/lib/orb/models/new_floating_minimum_composite_price.rb +1 -3
  118. data/lib/orb/models/new_floating_package_price.rb +1 -3
  119. data/lib/orb/models/new_floating_package_with_allocation_price.rb +1 -3
  120. data/lib/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  121. data/lib/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rb +1 -3
  122. data/lib/orb/models/new_floating_threshold_total_amount_price.rb +1 -3
  123. data/lib/orb/models/new_floating_tiered_package_price.rb +1 -3
  124. data/lib/orb/models/new_floating_tiered_package_with_minimum_price.rb +1 -3
  125. data/lib/orb/models/new_floating_tiered_price.rb +1 -3
  126. data/lib/orb/models/new_floating_tiered_with_minimum_price.rb +1 -3
  127. data/lib/orb/models/new_floating_tiered_with_proration_price.rb +1 -3
  128. data/lib/orb/models/new_floating_unit_price.rb +1 -3
  129. data/lib/orb/models/new_floating_unit_with_percent_price.rb +1 -3
  130. data/lib/orb/models/new_floating_unit_with_proration_price.rb +1 -3
  131. data/lib/orb/models/new_plan_bulk_price.rb +1 -1
  132. data/lib/orb/models/new_plan_bulk_with_proration_price.rb +1 -3
  133. data/lib/orb/models/new_plan_cumulative_grouped_bulk_price.rb +1 -3
  134. data/lib/orb/models/new_plan_grouped_allocation_price.rb +1 -3
  135. data/lib/orb/models/new_plan_grouped_tiered_package_price.rb +1 -3
  136. data/lib/orb/models/new_plan_grouped_tiered_price.rb +1 -3
  137. data/lib/orb/models/new_plan_grouped_with_metered_minimum_price.rb +1 -3
  138. data/lib/orb/models/new_plan_grouped_with_prorated_minimum_price.rb +1 -3
  139. data/lib/orb/models/new_plan_matrix_price.rb +1 -5
  140. data/lib/orb/models/new_plan_matrix_with_allocation_price.rb +1 -3
  141. data/lib/orb/models/new_plan_matrix_with_display_name_price.rb +1 -3
  142. data/lib/orb/models/new_plan_max_group_tiered_package_price.rb +1 -3
  143. data/lib/orb/models/new_plan_minimum_composite_price.rb +1 -3
  144. data/lib/orb/models/new_plan_package_price.rb +1 -5
  145. data/lib/orb/models/new_plan_package_with_allocation_price.rb +1 -3
  146. data/lib/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  147. data/lib/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rb +1 -3
  148. data/lib/orb/models/new_plan_threshold_total_amount_price.rb +1 -3
  149. data/lib/orb/models/new_plan_tiered_package_price.rb +1 -3
  150. data/lib/orb/models/new_plan_tiered_package_with_minimum_price.rb +1 -3
  151. data/lib/orb/models/new_plan_tiered_price.rb +1 -5
  152. data/lib/orb/models/new_plan_tiered_with_minimum_price.rb +1 -3
  153. data/lib/orb/models/new_plan_unit_price.rb +1 -1
  154. data/lib/orb/models/new_plan_unit_with_percent_price.rb +1 -3
  155. data/lib/orb/models/new_plan_unit_with_proration_price.rb +1 -3
  156. data/lib/orb/models/new_subscription_bulk_price.rb +1 -3
  157. data/lib/orb/models/new_subscription_bulk_with_proration_price.rb +1 -3
  158. data/lib/orb/models/new_subscription_cumulative_grouped_bulk_price.rb +1 -3
  159. data/lib/orb/models/new_subscription_grouped_allocation_price.rb +1 -3
  160. data/lib/orb/models/new_subscription_grouped_tiered_package_price.rb +1 -3
  161. data/lib/orb/models/new_subscription_grouped_tiered_price.rb +1 -3
  162. data/lib/orb/models/new_subscription_grouped_with_metered_minimum_price.rb +1 -3
  163. data/lib/orb/models/new_subscription_grouped_with_prorated_minimum_price.rb +1 -3
  164. data/lib/orb/models/new_subscription_matrix_price.rb +1 -3
  165. data/lib/orb/models/new_subscription_matrix_with_allocation_price.rb +1 -3
  166. data/lib/orb/models/new_subscription_matrix_with_display_name_price.rb +1 -3
  167. data/lib/orb/models/new_subscription_max_group_tiered_package_price.rb +1 -3
  168. data/lib/orb/models/new_subscription_minimum_composite_price.rb +1 -3
  169. data/lib/orb/models/new_subscription_package_price.rb +1 -3
  170. data/lib/orb/models/new_subscription_package_with_allocation_price.rb +1 -3
  171. data/lib/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  172. data/lib/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rb +1 -3
  173. data/lib/orb/models/new_subscription_threshold_total_amount_price.rb +1 -3
  174. data/lib/orb/models/new_subscription_tiered_package_price.rb +1 -3
  175. data/lib/orb/models/new_subscription_tiered_package_with_minimum_price.rb +1 -3
  176. data/lib/orb/models/new_subscription_tiered_price.rb +1 -3
  177. data/lib/orb/models/new_subscription_tiered_with_minimum_price.rb +1 -3
  178. data/lib/orb/models/new_subscription_unit_price.rb +1 -3
  179. data/lib/orb/models/new_subscription_unit_with_percent_price.rb +1 -3
  180. data/lib/orb/models/new_subscription_unit_with_proration_price.rb +1 -3
  181. data/lib/orb/models/per_price_cost.rb +2 -2
  182. data/lib/orb/models/plan.rb +189 -9
  183. data/lib/orb/models/plan_create_params.rb +1478 -158
  184. data/lib/orb/models/plan_fetch_params.rb +7 -1
  185. data/lib/orb/models/plan_update_params.rb +16 -1
  186. data/lib/orb/models/plan_version.rb +186 -5
  187. data/lib/orb/models/plans/external_plan_id_fetch_params.rb +7 -1
  188. data/lib/orb/models/plans/external_plan_id_update_params.rb +16 -1
  189. data/lib/orb/models/plans/migration_cancel_params.rb +7 -1
  190. data/lib/orb/models/plans/migration_cancel_response.rb +22 -4
  191. data/lib/orb/models/plans/migration_list_params.rb +8 -1
  192. data/lib/orb/models/plans/migration_list_response.rb +22 -4
  193. data/lib/orb/models/plans/migration_retrieve_params.rb +7 -1
  194. data/lib/orb/models/plans/migration_retrieve_response.rb +22 -4
  195. data/lib/orb/models/price.rb +2807 -1244
  196. data/lib/orb/models/price_create_params.rb +1800 -1355
  197. data/lib/orb/models/price_evaluate_multiple_params.rb +889 -54
  198. data/lib/orb/models/price_evaluate_params.rb +8 -1
  199. data/lib/orb/models/price_evaluate_preview_events_params.rb +881 -46
  200. data/lib/orb/models/price_fetch_params.rb +7 -1
  201. data/lib/orb/models/price_interval.rb +2 -2
  202. data/lib/orb/models/price_update_params.rb +8 -1
  203. data/lib/orb/models/prices/external_price_id_fetch_params.rb +7 -1
  204. data/lib/orb/models/prices/external_price_id_update_params.rb +8 -1
  205. data/lib/orb/models/subscription.rb +168 -4
  206. data/lib/orb/models/subscription_cancel_params.rb +8 -1
  207. data/lib/orb/models/subscription_change_apply_params.rb +8 -1
  208. data/lib/orb/models/subscription_change_cancel_params.rb +7 -1
  209. data/lib/orb/models/subscription_change_retrieve_params.rb +7 -1
  210. data/lib/orb/models/subscription_create_params.rb +2818 -674
  211. data/lib/orb/models/subscription_fetch_costs_params.rb +8 -1
  212. data/lib/orb/models/subscription_fetch_params.rb +7 -1
  213. data/lib/orb/models/subscription_fetch_schedule_params.rb +8 -1
  214. data/lib/orb/models/subscription_fetch_usage_params.rb +8 -1
  215. data/lib/orb/models/subscription_price_intervals_params.rb +1103 -55
  216. data/lib/orb/models/subscription_redeem_coupon_params.rb +8 -1
  217. data/lib/orb/models/subscription_schedule_plan_change_params.rb +2839 -685
  218. data/lib/orb/models/subscription_trigger_phase_params.rb +8 -1
  219. data/lib/orb/models/subscription_unschedule_cancellation_params.rb +7 -1
  220. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rb +8 -1
  221. data/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb +7 -1
  222. data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +8 -1
  223. data/lib/orb/models/subscription_update_params.rb +19 -1
  224. data/lib/orb/models/subscription_update_trial_params.rb +8 -1
  225. data/lib/orb/models.rb +2 -0
  226. data/lib/orb/resources/alerts.rb +20 -2
  227. data/lib/orb/resources/coupons.rb +1 -2
  228. data/lib/orb/resources/credit_blocks.rb +11 -8
  229. data/lib/orb/resources/customers/credits/ledger.rb +40 -81
  230. data/lib/orb/resources/customers.rb +12 -7
  231. data/lib/orb/resources/events/backfills.rb +3 -4
  232. data/lib/orb/resources/events.rb +7 -34
  233. data/lib/orb/resources/invoices.rb +18 -7
  234. data/lib/orb/resources/licenses/external_licenses.rb +1 -1
  235. data/lib/orb/resources/licenses/usage.rb +2 -2
  236. data/lib/orb/resources/metrics.rb +5 -5
  237. data/lib/orb/resources/plans/external_plan_id.rb +5 -3
  238. data/lib/orb/resources/plans.rb +9 -5
  239. data/lib/orb/resources/prices/external_price_id.rb +2 -2
  240. data/lib/orb/resources/prices.rb +13 -104
  241. data/lib/orb/resources/subscriptions.rb +24 -7
  242. data/lib/orb/version.rb +1 -1
  243. data/lib/orb.rb +1 -0
  244. data/rbi/orb/client.rbi +6 -0
  245. data/rbi/orb/internal/util.rbi +8 -0
  246. data/rbi/orb/models/accounting_provider_config.rbi +38 -5
  247. data/rbi/orb/models/adjustment_interval.rbi +336 -0
  248. data/rbi/orb/models/alert.rbi +182 -3
  249. data/rbi/orb/models/alert_create_for_customer_params.rbi +6 -0
  250. data/rbi/orb/models/alert_create_for_external_customer_params.rbi +6 -0
  251. data/rbi/orb/models/alert_create_for_subscription_params.rbi +285 -0
  252. data/rbi/orb/models/alert_disable_params.rbi +6 -0
  253. data/rbi/orb/models/alert_enable_params.rbi +6 -0
  254. data/rbi/orb/models/alert_retrieve_params.rbi +13 -5
  255. data/rbi/orb/models/alert_update_params.rbi +214 -0
  256. data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +5873 -1161
  257. data/rbi/orb/models/beta/external_plan_id_fetch_plan_version_params.rbi +10 -2
  258. data/rbi/orb/models/beta/external_plan_id_set_default_plan_version_params.rbi +10 -1
  259. data/rbi/orb/models/beta_create_plan_version_params.rbi +5877 -1165
  260. data/rbi/orb/models/beta_fetch_plan_version_params.rbi +10 -2
  261. data/rbi/orb/models/beta_set_default_plan_version_params.rbi +10 -1
  262. data/rbi/orb/models/changed_subscription_resources.rbi +360 -5
  263. data/rbi/orb/models/conversion_rate_config.rbi +18 -0
  264. data/rbi/orb/models/coupon_archive_params.rbi +13 -5
  265. data/rbi/orb/models/coupon_fetch_params.rbi +13 -5
  266. data/rbi/orb/models/coupons/subscription_list_params.rbi +6 -0
  267. data/rbi/orb/models/credit_block_delete_params.rbi +13 -5
  268. data/rbi/orb/models/credit_block_list_invoices_params.rbi +13 -5
  269. data/rbi/orb/models/credit_block_list_invoices_response.rbi +346 -3
  270. data/rbi/orb/models/credit_block_retrieve_params.rbi +13 -5
  271. data/rbi/orb/models/credit_block_retrieve_response.rbi +344 -3
  272. data/rbi/orb/models/credit_note_fetch_params.rbi +13 -5
  273. data/rbi/orb/models/customer.rbi +202 -0
  274. data/rbi/orb/models/customer_create_params.rbi +27 -0
  275. data/rbi/orb/models/customer_delete_params.rbi +13 -5
  276. data/rbi/orb/models/customer_fetch_by_external_id_params.rbi +13 -5
  277. data/rbi/orb/models/customer_fetch_params.rbi +13 -5
  278. data/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +13 -5
  279. data/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +13 -5
  280. data/rbi/orb/models/customer_tax_id.rbi +15 -1
  281. data/rbi/orb/models/customer_update_by_external_id_params.rbi +51 -4
  282. data/rbi/orb/models/customer_update_params.rbi +51 -4
  283. data/rbi/orb/models/customers/balance_transaction_create_params.rbi +6 -0
  284. data/rbi/orb/models/customers/balance_transaction_list_params.rbi +6 -0
  285. data/rbi/orb/models/customers/cost_list_by_external_id_params.rbi +6 -0
  286. data/rbi/orb/models/customers/cost_list_params.rbi +6 -0
  287. data/rbi/orb/models/customers/credit_list_by_external_id_params.rbi +6 -0
  288. data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +346 -3
  289. data/rbi/orb/models/customers/credit_list_params.rbi +6 -0
  290. data/rbi/orb/models/customers/credit_list_response.rbi +347 -3
  291. data/rbi/orb/models/customers/credits/decrement_ledger_entry.rbi +4 -0
  292. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +861 -478
  293. data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +861 -478
  294. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +6 -0
  295. data/rbi/orb/models/customers/credits/ledger_list_params.rbi +6 -0
  296. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +6 -0
  297. data/rbi/orb/models/customers/credits/top_up_create_params.rbi +6 -0
  298. data/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +6 -1
  299. data/rbi/orb/models/customers/credits/top_up_delete_params.rbi +10 -2
  300. data/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +6 -0
  301. data/rbi/orb/models/customers/credits/top_up_list_params.rbi +6 -0
  302. data/rbi/orb/models/dimensional_price_group.rbi +1 -1
  303. data/rbi/orb/models/dimensional_price_group_retrieve_params.rbi +16 -5
  304. data/rbi/orb/models/dimensional_price_group_update_params.rbi +6 -0
  305. data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +16 -5
  306. data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbi +6 -0
  307. data/rbi/orb/models/discount.rbi +269 -1
  308. data/rbi/orb/models/event_deprecate_params.rbi +13 -5
  309. data/rbi/orb/models/event_ingest_params.rbi +4 -2
  310. data/rbi/orb/models/event_update_params.rbi +6 -0
  311. data/rbi/orb/models/events/backfill_close_params.rbi +13 -5
  312. data/rbi/orb/models/events/backfill_fetch_params.rbi +13 -5
  313. data/rbi/orb/models/events/backfill_revert_params.rbi +13 -5
  314. data/rbi/orb/models/invoice.rbi +360 -5
  315. data/rbi/orb/models/invoice_create_params.rbi +12 -7
  316. data/rbi/orb/models/invoice_delete_line_item_params.rbi +10 -2
  317. data/rbi/orb/models/invoice_fetch_params.rbi +13 -5
  318. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +360 -5
  319. data/rbi/orb/models/invoice_issue_params.rbi +10 -1
  320. data/rbi/orb/models/invoice_issue_summary_params.rbi +10 -1
  321. data/rbi/orb/models/invoice_issue_summary_response.rbi +19 -4
  322. data/rbi/orb/models/invoice_level_discount.rbi +298 -1
  323. data/rbi/orb/models/invoice_line_item_create_response.rbi +339 -0
  324. data/rbi/orb/models/invoice_list_summary_response.rbi +19 -4
  325. data/rbi/orb/models/invoice_mark_paid_params.rbi +6 -0
  326. data/rbi/orb/models/invoice_pay_params.rbi +27 -5
  327. data/rbi/orb/models/invoice_update_params.rbi +6 -0
  328. data/rbi/orb/models/invoice_void_params.rbi +13 -5
  329. data/rbi/orb/models/item_archive_params.rbi +13 -5
  330. data/rbi/orb/models/item_fetch_params.rbi +13 -5
  331. data/rbi/orb/models/item_update_params.rbi +6 -0
  332. data/rbi/orb/models/license_deactivate_params.rbi +10 -1
  333. data/rbi/orb/models/license_retrieve_by_external_id_params.rbi +6 -0
  334. data/rbi/orb/models/license_retrieve_params.rbi +13 -5
  335. data/rbi/orb/models/license_type_retrieve_params.rbi +13 -5
  336. data/rbi/orb/models/licenses/external_license_get_usage_params.rbi +9 -3
  337. data/rbi/orb/models/licenses/usage_get_all_usage_params.rbi +3 -3
  338. data/rbi/orb/models/licenses/usage_get_usage_params.rbi +9 -3
  339. data/rbi/orb/models/metric_fetch_params.rbi +13 -5
  340. data/rbi/orb/models/metric_update_params.rbi +6 -0
  341. data/rbi/orb/models/mutated_subscription.rbi +324 -2
  342. data/rbi/orb/models/new_allocation_price.rbi +12 -0
  343. data/rbi/orb/models/per_price_cost.rbi +3 -0
  344. data/rbi/orb/models/plan.rbi +339 -2
  345. data/rbi/orb/models/plan_create_params.rbi +2566 -209
  346. data/rbi/orb/models/plan_fetch_params.rbi +13 -5
  347. data/rbi/orb/models/plan_update_params.rbi +14 -0
  348. data/rbi/orb/models/plan_version.rbi +339 -0
  349. data/rbi/orb/models/plans/external_plan_id_fetch_params.rbi +13 -5
  350. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +14 -0
  351. data/rbi/orb/models/plans/migration_cancel_params.rbi +10 -2
  352. data/rbi/orb/models/plans/migration_cancel_response.rbi +22 -1
  353. data/rbi/orb/models/plans/migration_list_params.rbi +6 -0
  354. data/rbi/orb/models/plans/migration_list_response.rbi +22 -1
  355. data/rbi/orb/models/plans/migration_retrieve_params.rbi +10 -2
  356. data/rbi/orb/models/plans/migration_retrieve_response.rbi +22 -1
  357. data/rbi/orb/models/price.rbi +4733 -2280
  358. data/rbi/orb/models/price_create_params.rbi +3022 -2408
  359. data/rbi/orb/models/price_evaluate_multiple_params.rbi +1540 -114
  360. data/rbi/orb/models/price_evaluate_params.rbi +6 -0
  361. data/rbi/orb/models/price_evaluate_preview_events_params.rbi +1540 -114
  362. data/rbi/orb/models/price_fetch_params.rbi +13 -5
  363. data/rbi/orb/models/price_interval.rbi +3 -0
  364. data/rbi/orb/models/price_update_params.rbi +6 -0
  365. data/rbi/orb/models/prices/external_price_id_fetch_params.rbi +13 -5
  366. data/rbi/orb/models/prices/external_price_id_update_params.rbi +6 -0
  367. data/rbi/orb/models/subscription.rbi +324 -2
  368. data/rbi/orb/models/subscription_cancel_params.rbi +6 -0
  369. data/rbi/orb/models/subscription_change_apply_params.rbi +6 -0
  370. data/rbi/orb/models/subscription_change_cancel_params.rbi +16 -5
  371. data/rbi/orb/models/subscription_change_retrieve_params.rbi +16 -5
  372. data/rbi/orb/models/subscription_create_params.rbi +4998 -1186
  373. data/rbi/orb/models/subscription_fetch_costs_params.rbi +6 -0
  374. data/rbi/orb/models/subscription_fetch_params.rbi +13 -5
  375. data/rbi/orb/models/subscription_fetch_schedule_params.rbi +6 -0
  376. data/rbi/orb/models/subscription_fetch_usage_params.rbi +6 -0
  377. data/rbi/orb/models/subscription_price_intervals_params.rbi +2133 -264
  378. data/rbi/orb/models/subscription_redeem_coupon_params.rbi +6 -0
  379. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +5001 -1183
  380. data/rbi/orb/models/subscription_trigger_phase_params.rbi +6 -0
  381. data/rbi/orb/models/subscription_unschedule_cancellation_params.rbi +13 -5
  382. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +10 -1
  383. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +13 -5
  384. data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +6 -0
  385. data/rbi/orb/models/subscription_update_params.rbi +20 -0
  386. data/rbi/orb/models/subscription_update_trial_params.rbi +6 -0
  387. data/rbi/orb/models.rbi +2 -0
  388. data/rbi/orb/resources/alerts.rbi +43 -0
  389. data/rbi/orb/resources/coupons.rbi +1 -2
  390. data/rbi/orb/resources/credit_blocks.rbi +10 -7
  391. data/rbi/orb/resources/customers/credits/ledger.rbi +50 -146
  392. data/rbi/orb/resources/customers.rbi +35 -7
  393. data/rbi/orb/resources/events/backfills.rbi +3 -4
  394. data/rbi/orb/resources/events.rbi +8 -35
  395. data/rbi/orb/resources/invoices.rbi +20 -6
  396. data/rbi/orb/resources/licenses/external_licenses.rbi +1 -1
  397. data/rbi/orb/resources/licenses/usage.rbi +2 -2
  398. data/rbi/orb/resources/metrics.rbi +5 -5
  399. data/rbi/orb/resources/plans/external_plan_id.rbi +5 -2
  400. data/rbi/orb/resources/plans.rbi +9 -3
  401. data/rbi/orb/resources/prices.rbi +38 -184
  402. data/rbi/orb/resources/subscriptions.rbi +33 -4
  403. data/sig/orb/client.rbs +3 -0
  404. data/sig/orb/internal/util.rbs +4 -0
  405. data/sig/orb/models/accounting_provider_config.rbs +21 -4
  406. data/sig/orb/models/adjustment_interval.rbs +134 -0
  407. data/sig/orb/models/alert.rbs +90 -3
  408. data/sig/orb/models/alert_create_for_customer_params.rbs +5 -0
  409. data/sig/orb/models/alert_create_for_external_customer_params.rbs +5 -0
  410. data/sig/orb/models/alert_create_for_subscription_params.rbs +98 -1
  411. data/sig/orb/models/alert_disable_params.rbs +6 -1
  412. data/sig/orb/models/alert_enable_params.rbs +6 -1
  413. data/sig/orb/models/alert_retrieve_params.rbs +9 -3
  414. data/sig/orb/models/alert_update_params.rbs +90 -1
  415. data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +2318 -397
  416. data/sig/orb/models/beta/external_plan_id_fetch_plan_version_params.rbs +6 -1
  417. data/sig/orb/models/beta/external_plan_id_set_default_plan_version_params.rbs +6 -1
  418. data/sig/orb/models/beta_create_plan_version_params.rbs +2300 -389
  419. data/sig/orb/models/beta_fetch_plan_version_params.rbs +10 -2
  420. data/sig/orb/models/beta_set_default_plan_version_params.rbs +10 -2
  421. data/sig/orb/models/changed_subscription_resources.rbs +140 -1
  422. data/sig/orb/models/conversion_rate_config.rbs +12 -0
  423. data/sig/orb/models/coupon_archive_params.rbs +12 -3
  424. data/sig/orb/models/coupon_fetch_params.rbs +12 -3
  425. data/sig/orb/models/coupons/subscription_list_params.rbs +5 -1
  426. data/sig/orb/models/credit_block_delete_params.rbs +8 -3
  427. data/sig/orb/models/credit_block_list_invoices_params.rbs +8 -3
  428. data/sig/orb/models/credit_block_list_invoices_response.rbs +124 -3
  429. data/sig/orb/models/credit_block_retrieve_params.rbs +8 -3
  430. data/sig/orb/models/credit_block_retrieve_response.rbs +124 -3
  431. data/sig/orb/models/credit_note_fetch_params.rbs +11 -3
  432. data/sig/orb/models/customer.rbs +79 -1
  433. data/sig/orb/models/customer_create_params.rbs +12 -1
  434. data/sig/orb/models/customer_delete_params.rbs +12 -3
  435. data/sig/orb/models/customer_fetch_by_external_id_params.rbs +11 -3
  436. data/sig/orb/models/customer_fetch_params.rbs +12 -3
  437. data/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs +11 -3
  438. data/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs +11 -3
  439. data/sig/orb/models/customer_tax_id.rbs +20 -2
  440. data/sig/orb/models/customer_update_by_external_id_params.rbs +22 -1
  441. data/sig/orb/models/customer_update_params.rbs +22 -1
  442. data/sig/orb/models/customers/balance_transaction_create_params.rbs +5 -0
  443. data/sig/orb/models/customers/balance_transaction_list_params.rbs +5 -0
  444. data/sig/orb/models/customers/cost_list_by_external_id_params.rbs +5 -0
  445. data/sig/orb/models/customers/cost_list_params.rbs +5 -0
  446. data/sig/orb/models/customers/credit_list_by_external_id_params.rbs +5 -0
  447. data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +124 -3
  448. data/sig/orb/models/customers/credit_list_params.rbs +5 -0
  449. data/sig/orb/models/customers/credit_list_response.rbs +124 -3
  450. data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +345 -157
  451. data/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +345 -157
  452. data/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs +5 -0
  453. data/sig/orb/models/customers/credits/ledger_list_params.rbs +5 -0
  454. data/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs +5 -0
  455. data/sig/orb/models/customers/credits/top_up_create_params.rbs +5 -0
  456. data/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs +5 -1
  457. data/sig/orb/models/customers/credits/top_up_delete_params.rbs +6 -1
  458. data/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs +5 -1
  459. data/sig/orb/models/customers/credits/top_up_list_params.rbs +5 -1
  460. data/sig/orb/models/dimensional_price_group_retrieve_params.rbs +12 -3
  461. data/sig/orb/models/dimensional_price_group_update_params.rbs +5 -0
  462. data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs +12 -3
  463. data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbs +5 -0
  464. data/sig/orb/models/discount.rbs +114 -0
  465. data/sig/orb/models/event_deprecate_params.rbs +9 -3
  466. data/sig/orb/models/event_update_params.rbs +5 -0
  467. data/sig/orb/models/events/backfill_close_params.rbs +11 -3
  468. data/sig/orb/models/events/backfill_fetch_params.rbs +11 -3
  469. data/sig/orb/models/events/backfill_revert_params.rbs +11 -3
  470. data/sig/orb/models/invoice.rbs +140 -1
  471. data/sig/orb/models/invoice_delete_line_item_params.rbs +6 -1
  472. data/sig/orb/models/invoice_fetch_params.rbs +12 -3
  473. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +140 -1
  474. data/sig/orb/models/invoice_issue_params.rbs +6 -1
  475. data/sig/orb/models/invoice_issue_summary_params.rbs +6 -1
  476. data/sig/orb/models/invoice_issue_summary_response.rbs +2 -1
  477. data/sig/orb/models/invoice_level_discount.rbs +117 -1
  478. data/sig/orb/models/invoice_line_item_create_response.rbs +134 -0
  479. data/sig/orb/models/invoice_list_summary_response.rbs +2 -1
  480. data/sig/orb/models/invoice_mark_paid_params.rbs +10 -1
  481. data/sig/orb/models/invoice_pay_params.rbs +17 -3
  482. data/sig/orb/models/invoice_update_params.rbs +5 -0
  483. data/sig/orb/models/invoice_void_params.rbs +12 -3
  484. data/sig/orb/models/item_archive_params.rbs +9 -3
  485. data/sig/orb/models/item_fetch_params.rbs +9 -3
  486. data/sig/orb/models/item_update_params.rbs +5 -0
  487. data/sig/orb/models/license_deactivate_params.rbs +10 -2
  488. data/sig/orb/models/license_retrieve_by_external_id_params.rbs +9 -1
  489. data/sig/orb/models/license_retrieve_params.rbs +11 -3
  490. data/sig/orb/models/license_type_retrieve_params.rbs +11 -3
  491. data/sig/orb/models/licenses/external_license_get_usage_params.rbs +9 -4
  492. data/sig/orb/models/licenses/usage_get_all_usage_params.rbs +4 -4
  493. data/sig/orb/models/licenses/usage_get_usage_params.rbs +9 -4
  494. data/sig/orb/models/metric_fetch_params.rbs +12 -3
  495. data/sig/orb/models/metric_update_params.rbs +5 -1
  496. data/sig/orb/models/mutated_subscription.rbs +124 -0
  497. data/sig/orb/models/new_allocation_price.rbs +5 -0
  498. data/sig/orb/models/new_floating_bulk_price.rbs +4 -4
  499. data/sig/orb/models/new_floating_bulk_with_proration_price.rbs +4 -4
  500. data/sig/orb/models/new_floating_cumulative_grouped_bulk_price.rbs +4 -4
  501. data/sig/orb/models/new_floating_grouped_allocation_price.rbs +4 -4
  502. data/sig/orb/models/new_floating_grouped_tiered_package_price.rbs +4 -4
  503. data/sig/orb/models/new_floating_grouped_tiered_price.rbs +4 -4
  504. data/sig/orb/models/new_floating_grouped_with_metered_minimum_price.rbs +4 -4
  505. data/sig/orb/models/new_floating_grouped_with_prorated_minimum_price.rbs +4 -4
  506. data/sig/orb/models/new_floating_matrix_price.rbs +4 -4
  507. data/sig/orb/models/new_floating_matrix_with_allocation_price.rbs +4 -4
  508. data/sig/orb/models/new_floating_matrix_with_display_name_price.rbs +4 -4
  509. data/sig/orb/models/new_floating_max_group_tiered_package_price.rbs +4 -4
  510. data/sig/orb/models/new_floating_minimum_composite_price.rbs +4 -4
  511. data/sig/orb/models/new_floating_package_price.rbs +4 -4
  512. data/sig/orb/models/new_floating_package_with_allocation_price.rbs +4 -4
  513. data/sig/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  514. data/sig/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  515. data/sig/orb/models/new_floating_threshold_total_amount_price.rbs +4 -4
  516. data/sig/orb/models/new_floating_tiered_package_price.rbs +4 -4
  517. data/sig/orb/models/new_floating_tiered_package_with_minimum_price.rbs +4 -4
  518. data/sig/orb/models/new_floating_tiered_price.rbs +4 -4
  519. data/sig/orb/models/new_floating_tiered_with_minimum_price.rbs +4 -4
  520. data/sig/orb/models/new_floating_tiered_with_proration_price.rbs +4 -4
  521. data/sig/orb/models/new_floating_unit_price.rbs +4 -4
  522. data/sig/orb/models/new_floating_unit_with_percent_price.rbs +4 -4
  523. data/sig/orb/models/new_floating_unit_with_proration_price.rbs +4 -4
  524. data/sig/orb/models/new_plan_bulk_price.rbs +4 -4
  525. data/sig/orb/models/new_plan_bulk_with_proration_price.rbs +4 -4
  526. data/sig/orb/models/new_plan_cumulative_grouped_bulk_price.rbs +4 -4
  527. data/sig/orb/models/new_plan_grouped_allocation_price.rbs +4 -4
  528. data/sig/orb/models/new_plan_grouped_tiered_package_price.rbs +4 -4
  529. data/sig/orb/models/new_plan_grouped_tiered_price.rbs +4 -4
  530. data/sig/orb/models/new_plan_grouped_with_metered_minimum_price.rbs +4 -4
  531. data/sig/orb/models/new_plan_grouped_with_prorated_minimum_price.rbs +4 -4
  532. data/sig/orb/models/new_plan_matrix_price.rbs +4 -4
  533. data/sig/orb/models/new_plan_matrix_with_allocation_price.rbs +4 -4
  534. data/sig/orb/models/new_plan_matrix_with_display_name_price.rbs +4 -4
  535. data/sig/orb/models/new_plan_max_group_tiered_package_price.rbs +4 -4
  536. data/sig/orb/models/new_plan_minimum_composite_price.rbs +4 -4
  537. data/sig/orb/models/new_plan_package_price.rbs +4 -4
  538. data/sig/orb/models/new_plan_package_with_allocation_price.rbs +4 -4
  539. data/sig/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  540. data/sig/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  541. data/sig/orb/models/new_plan_threshold_total_amount_price.rbs +4 -4
  542. data/sig/orb/models/new_plan_tiered_package_price.rbs +4 -4
  543. data/sig/orb/models/new_plan_tiered_package_with_minimum_price.rbs +4 -4
  544. data/sig/orb/models/new_plan_tiered_price.rbs +4 -4
  545. data/sig/orb/models/new_plan_tiered_with_minimum_price.rbs +4 -4
  546. data/sig/orb/models/new_plan_unit_price.rbs +4 -4
  547. data/sig/orb/models/new_plan_unit_with_percent_price.rbs +4 -4
  548. data/sig/orb/models/new_plan_unit_with_proration_price.rbs +4 -4
  549. data/sig/orb/models/new_subscription_bulk_price.rbs +4 -4
  550. data/sig/orb/models/new_subscription_bulk_with_proration_price.rbs +4 -4
  551. data/sig/orb/models/new_subscription_cumulative_grouped_bulk_price.rbs +4 -4
  552. data/sig/orb/models/new_subscription_grouped_allocation_price.rbs +4 -4
  553. data/sig/orb/models/new_subscription_grouped_tiered_package_price.rbs +4 -4
  554. data/sig/orb/models/new_subscription_grouped_tiered_price.rbs +4 -4
  555. data/sig/orb/models/new_subscription_grouped_with_metered_minimum_price.rbs +4 -4
  556. data/sig/orb/models/new_subscription_grouped_with_prorated_minimum_price.rbs +4 -4
  557. data/sig/orb/models/new_subscription_matrix_price.rbs +4 -4
  558. data/sig/orb/models/new_subscription_matrix_with_allocation_price.rbs +4 -4
  559. data/sig/orb/models/new_subscription_matrix_with_display_name_price.rbs +4 -4
  560. data/sig/orb/models/new_subscription_max_group_tiered_package_price.rbs +4 -4
  561. data/sig/orb/models/new_subscription_minimum_composite_price.rbs +4 -4
  562. data/sig/orb/models/new_subscription_package_price.rbs +4 -4
  563. data/sig/orb/models/new_subscription_package_with_allocation_price.rbs +4 -4
  564. data/sig/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  565. data/sig/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  566. data/sig/orb/models/new_subscription_threshold_total_amount_price.rbs +4 -4
  567. data/sig/orb/models/new_subscription_tiered_package_price.rbs +4 -4
  568. data/sig/orb/models/new_subscription_tiered_package_with_minimum_price.rbs +4 -4
  569. data/sig/orb/models/new_subscription_tiered_price.rbs +4 -4
  570. data/sig/orb/models/new_subscription_tiered_with_minimum_price.rbs +4 -4
  571. data/sig/orb/models/new_subscription_unit_price.rbs +4 -4
  572. data/sig/orb/models/new_subscription_unit_with_percent_price.rbs +4 -4
  573. data/sig/orb/models/new_subscription_unit_with_proration_price.rbs +4 -4
  574. data/sig/orb/models/plan.rbs +134 -0
  575. data/sig/orb/models/plan_create_params.rbs +1030 -72
  576. data/sig/orb/models/plan_fetch_params.rbs +9 -3
  577. data/sig/orb/models/plan_update_params.rbs +14 -1
  578. data/sig/orb/models/plan_version.rbs +134 -0
  579. data/sig/orb/models/plans/external_plan_id_fetch_params.rbs +11 -3
  580. data/sig/orb/models/plans/external_plan_id_update_params.rbs +14 -1
  581. data/sig/orb/models/plans/migration_cancel_params.rbs +6 -1
  582. data/sig/orb/models/plans/migration_list_params.rbs +5 -1
  583. data/sig/orb/models/plans/migration_retrieve_params.rbs +6 -1
  584. data/sig/orb/models/price.rbs +2361 -1156
  585. data/sig/orb/models/price_create_params.rbs +1124 -931
  586. data/sig/orb/models/price_evaluate_multiple_params.rbs +626 -23
  587. data/sig/orb/models/price_evaluate_params.rbs +5 -0
  588. data/sig/orb/models/price_evaluate_preview_events_params.rbs +626 -23
  589. data/sig/orb/models/price_fetch_params.rbs +9 -3
  590. data/sig/orb/models/price_update_params.rbs +5 -1
  591. data/sig/orb/models/prices/external_price_id_fetch_params.rbs +11 -3
  592. data/sig/orb/models/prices/external_price_id_update_params.rbs +5 -1
  593. data/sig/orb/models/subscription.rbs +124 -0
  594. data/sig/orb/models/subscription_cancel_params.rbs +5 -0
  595. data/sig/orb/models/subscription_change_apply_params.rbs +5 -0
  596. data/sig/orb/models/subscription_change_cancel_params.rbs +12 -3
  597. data/sig/orb/models/subscription_change_retrieve_params.rbs +12 -3
  598. data/sig/orb/models/subscription_create_params.rbs +2009 -430
  599. data/sig/orb/models/subscription_fetch_costs_params.rbs +5 -0
  600. data/sig/orb/models/subscription_fetch_params.rbs +11 -3
  601. data/sig/orb/models/subscription_fetch_schedule_params.rbs +5 -0
  602. data/sig/orb/models/subscription_fetch_usage_params.rbs +5 -0
  603. data/sig/orb/models/subscription_price_intervals_params.rbs +800 -23
  604. data/sig/orb/models/subscription_redeem_coupon_params.rbs +5 -0
  605. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +2014 -430
  606. data/sig/orb/models/subscription_trigger_phase_params.rbs +9 -1
  607. data/sig/orb/models/subscription_unschedule_cancellation_params.rbs +11 -3
  608. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs +10 -2
  609. data/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs +11 -3
  610. data/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs +5 -0
  611. data/sig/orb/models/subscription_update_params.rbs +10 -0
  612. data/sig/orb/models/subscription_update_trial_params.rbs +5 -0
  613. data/sig/orb/models.rbs +2 -0
  614. data/sig/orb/resources/alerts.rbs +6 -0
  615. data/sig/orb/resources/customers/credits/ledger.rbs +2 -26
  616. data/sig/orb/resources/customers.rbs +2 -0
  617. data/sig/orb/resources/invoices.rbs +1 -0
  618. data/sig/orb/resources/licenses/external_licenses.rbs +1 -1
  619. data/sig/orb/resources/licenses/usage.rbs +2 -2
  620. data/sig/orb/resources/plans/external_plan_id.rbs +1 -0
  621. data/sig/orb/resources/plans.rbs +2 -0
  622. data/sig/orb/resources/prices.rbs +1 -48
  623. data/sig/orb/resources/subscriptions.rbs +3 -0
  624. metadata +6 -7
@@ -7,6 +7,11 @@ module Orb
7
7
  extend Orb::Internal::Type::RequestParameters::Converter
8
8
  include Orb::Internal::Type::RequestParameters
9
9
 
10
+ # @!attribute subscription_id
11
+ #
12
+ # @return [String]
13
+ required :subscription_id, String
14
+
10
15
  # @!attribute allow_invoice_credit_or_void
11
16
  # If false, this request will fail if it would void an issued invoice or create a
12
17
  # credit note. Consider using this as a safety mechanism if you do not expect
@@ -22,10 +27,12 @@ module Orb
22
27
  # @return [Date, nil]
23
28
  optional :effective_date, Date, nil?: true
24
29
 
25
- # @!method initialize(allow_invoice_credit_or_void: nil, effective_date: nil, request_options: {})
30
+ # @!method initialize(subscription_id:, allow_invoice_credit_or_void: nil, effective_date: nil, request_options: {})
26
31
  # Some parameter documentations has been truncated, see
27
32
  # {Orb::Models::SubscriptionTriggerPhaseParams} for more details.
28
33
  #
34
+ # @param subscription_id [String]
35
+ #
29
36
  # @param allow_invoice_credit_or_void [Boolean, nil] If false, this request will fail if it would void an issued invoice or create a
30
37
  #
31
38
  # @param effective_date [Date, nil] The date on which the phase change should take effect. If not provided, defaults
@@ -7,7 +7,13 @@ module Orb
7
7
  extend Orb::Internal::Type::RequestParameters::Converter
8
8
  include Orb::Internal::Type::RequestParameters
9
9
 
10
- # @!method initialize(request_options: {})
10
+ # @!attribute subscription_id
11
+ #
12
+ # @return [String]
13
+ required :subscription_id, String
14
+
15
+ # @!method initialize(subscription_id:, request_options: {})
16
+ # @param subscription_id [String]
11
17
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
12
18
  end
13
19
  end
@@ -7,13 +7,20 @@ module Orb
7
7
  extend Orb::Internal::Type::RequestParameters::Converter
8
8
  include Orb::Internal::Type::RequestParameters
9
9
 
10
+ # @!attribute subscription_id
11
+ #
12
+ # @return [String]
13
+ required :subscription_id, String
14
+
10
15
  # @!attribute price_id
11
16
  # Price for which the updates should be cleared. Must be a fixed fee.
12
17
  #
13
18
  # @return [String]
14
19
  required :price_id, String
15
20
 
16
- # @!method initialize(price_id:, request_options: {})
21
+ # @!method initialize(subscription_id:, price_id:, request_options: {})
22
+ # @param subscription_id [String]
23
+ #
17
24
  # @param price_id [String] Price for which the updates should be cleared. Must be a fixed fee.
18
25
  #
19
26
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
@@ -7,7 +7,13 @@ module Orb
7
7
  extend Orb::Internal::Type::RequestParameters::Converter
8
8
  include Orb::Internal::Type::RequestParameters
9
9
 
10
- # @!method initialize(request_options: {})
10
+ # @!attribute subscription_id
11
+ #
12
+ # @return [String]
13
+ required :subscription_id, String
14
+
15
+ # @!method initialize(subscription_id:, request_options: {})
16
+ # @param subscription_id [String]
11
17
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
12
18
  end
13
19
  end
@@ -7,6 +7,11 @@ module Orb
7
7
  extend Orb::Internal::Type::RequestParameters::Converter
8
8
  include Orb::Internal::Type::RequestParameters
9
9
 
10
+ # @!attribute subscription_id
11
+ #
12
+ # @return [String]
13
+ required :subscription_id, String
14
+
10
15
  # @!attribute price_id
11
16
  # Price for which the quantity should be updated. Must be a fixed fee.
12
17
  #
@@ -42,10 +47,12 @@ module Orb
42
47
  # @return [Date, nil]
43
48
  optional :effective_date, Date, nil?: true
44
49
 
45
- # @!method initialize(price_id:, quantity:, allow_invoice_credit_or_void: nil, change_option: nil, effective_date: nil, request_options: {})
50
+ # @!method initialize(subscription_id:, price_id:, quantity:, allow_invoice_credit_or_void: nil, change_option: nil, effective_date: nil, request_options: {})
46
51
  # Some parameter documentations has been truncated, see
47
52
  # {Orb::Models::SubscriptionUpdateFixedFeeQuantityParams} for more details.
48
53
  #
54
+ # @param subscription_id [String]
55
+ #
49
56
  # @param price_id [String] Price for which the quantity should be updated. Must be a fixed fee.
50
57
  #
51
58
  # @param quantity [Float]
@@ -7,6 +7,11 @@ module Orb
7
7
  extend Orb::Internal::Type::RequestParameters::Converter
8
8
  include Orb::Internal::Type::RequestParameters
9
9
 
10
+ # @!attribute subscription_id
11
+ #
12
+ # @return [String]
13
+ required :subscription_id, String
14
+
10
15
  # @!attribute auto_collection
11
16
  # Determines whether issued invoices for this subscription will automatically be
12
17
  # charged with the saved payment method on the due date. This property defaults to
@@ -15,6 +20,15 @@ module Orb
15
20
  # @return [Boolean, nil]
16
21
  optional :auto_collection, Orb::Internal::Type::Boolean, nil?: true
17
22
 
23
+ # @!attribute auto_issuance
24
+ # Used to determine if invoices for this subscription will be automatically
25
+ # issued. If true, invoices will be automatically issued. If false, invoices will
26
+ # require manual approval. If `null` is specified, this defaults to the behavior
27
+ # configured for this customer.
28
+ #
29
+ # @return [Boolean, nil]
30
+ optional :auto_issuance, Orb::Internal::Type::Boolean, nil?: true
31
+
18
32
  # @!attribute default_invoice_memo
19
33
  # Determines the default memo on this subscription's invoices. Note that if this
20
34
  # is not provided, it is determined by the plan configuration.
@@ -47,12 +61,16 @@ module Orb
47
61
  # @return [Integer, nil]
48
62
  optional :net_terms, Integer, nil?: true
49
63
 
50
- # @!method initialize(auto_collection: nil, default_invoice_memo: nil, invoicing_threshold: nil, metadata: nil, net_terms: nil, request_options: {})
64
+ # @!method initialize(subscription_id:, auto_collection: nil, auto_issuance: nil, default_invoice_memo: nil, invoicing_threshold: nil, metadata: nil, net_terms: nil, request_options: {})
51
65
  # Some parameter documentations has been truncated, see
52
66
  # {Orb::Models::SubscriptionUpdateParams} for more details.
53
67
  #
68
+ # @param subscription_id [String]
69
+ #
54
70
  # @param auto_collection [Boolean, nil] Determines whether issued invoices for this subscription will automatically be c
55
71
  #
72
+ # @param auto_issuance [Boolean, nil] Used to determine if invoices for this subscription will be automatically issued
73
+ #
56
74
  # @param default_invoice_memo [String, nil] Determines the default memo on this subscription's invoices. Note that if this i
57
75
  #
58
76
  # @param invoicing_threshold [String, nil] When this subscription's accrued usage reaches this threshold, an invoice will b
@@ -7,6 +7,11 @@ module Orb
7
7
  extend Orb::Internal::Type::RequestParameters::Converter
8
8
  include Orb::Internal::Type::RequestParameters
9
9
 
10
+ # @!attribute subscription_id
11
+ #
12
+ # @return [String]
13
+ required :subscription_id, String
14
+
10
15
  # @!attribute trial_end_date
11
16
  # The new date that the trial should end, or the literal string `immediate` to end
12
17
  # the trial immediately.
@@ -21,10 +26,12 @@ module Orb
21
26
  # @return [Boolean, nil]
22
27
  optional :shift, Orb::Internal::Type::Boolean
23
28
 
24
- # @!method initialize(trial_end_date:, shift: nil, request_options: {})
29
+ # @!method initialize(subscription_id:, trial_end_date:, shift: nil, request_options: {})
25
30
  # Some parameter documentations has been truncated, see
26
31
  # {Orb::Models::SubscriptionUpdateTrialParams} for more details.
27
32
  #
33
+ # @param subscription_id [String]
34
+ #
28
35
  # @param trial_end_date [Time, Symbol, Orb::Models::SubscriptionUpdateTrialParams::TrialEndDate] The new date that the trial should end, or the literal string `immediate` to end
29
36
  #
30
37
  # @param shift [Boolean] If true, shifts subsequent price and adjustment intervals (preserving their dura
data/lib/orb/models.rb CHANGED
@@ -97,6 +97,8 @@ module Orb
97
97
 
98
98
  ChangedSubscriptionResources = Orb::Models::ChangedSubscriptionResources
99
99
 
100
+ ConversionRateConfig = Orb::Models::ConversionRateConfig
101
+
100
102
  ConversionRateTier = Orb::Models::ConversionRateTier
101
103
 
102
104
  ConversionRateTieredConfig = Orb::Models::ConversionRateTieredConfig
@@ -27,14 +27,21 @@ module Orb
27
27
  )
28
28
  end
29
29
 
30
+ # Some parameter documentations has been truncated, see
31
+ # {Orb::Models::AlertUpdateParams} for more details.
32
+ #
30
33
  # This endpoint updates the thresholds of an alert.
31
34
  #
32
- # @overload update(alert_configuration_id, thresholds:, request_options: {})
35
+ # @overload update(alert_configuration_id, thresholds:, price_filters: nil, threshold_overrides: nil, request_options: {})
33
36
  #
34
37
  # @param alert_configuration_id [String]
35
38
  #
36
39
  # @param thresholds [Array<Orb::Models::Threshold>] The thresholds that define the values at which the alert will be triggered.
37
40
  #
41
+ # @param price_filters [Array<Orb::Models::AlertUpdateParams::PriceFilter>, nil] Replaces the price filters on a grouped cost alert; an empty list clears them. O
42
+ #
43
+ # @param threshold_overrides [Array<Orb::Models::AlertUpdateParams::ThresholdOverride>, nil] Replaces the per-group threshold overrides on a grouped cost alert; an empty lis
44
+ #
38
45
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
39
46
  #
40
47
  # @return [Orb::Models::Alert]
@@ -179,6 +186,9 @@ module Orb
179
186
  )
180
187
  end
181
188
 
189
+ # Some parameter documentations has been truncated, see
190
+ # {Orb::Models::AlertCreateForSubscriptionParams} for more details.
191
+ #
182
192
  # This endpoint is used to create alerts at the subscription level.
183
193
  #
184
194
  # Subscription level alerts can be one of two types: `usage_exceeded` or
@@ -191,7 +201,7 @@ module Orb
191
201
  # per metric that is a part of the subscription. Alerts are triggered based on
192
202
  # usage or cost conditions met during the current billing cycle.
193
203
  #
194
- # @overload create_for_subscription(subscription_id, thresholds:, type:, metric_id: nil, request_options: {})
204
+ # @overload create_for_subscription(subscription_id, thresholds:, type:, currency: nil, grouping_keys: nil, metric_id: nil, price_filters: nil, threshold_overrides: nil, request_options: {})
195
205
  #
196
206
  # @param subscription_id [String]
197
207
  #
@@ -199,8 +209,16 @@ module Orb
199
209
  #
200
210
  # @param type [Symbol, Orb::Models::AlertCreateForSubscriptionParams::Type] The type of alert to create. This must be a valid alert type.
201
211
  #
212
+ # @param currency [String, nil] The case sensitive currency or custom pricing unit to use for grouped cost alert
213
+ #
214
+ # @param grouping_keys [Array<String>, nil] The property keys to group cost alerts by. Only applicable for cost_exceeded ale
215
+ #
202
216
  # @param metric_id [String, nil] The metric to track usage for.
203
217
  #
218
+ # @param price_filters [Array<Orb::Models::AlertCreateForSubscriptionParams::PriceFilter>, nil] Filters to scope which prices are included in grouped cost alert evaluation. Sup
219
+ #
220
+ # @param threshold_overrides [Array<Orb::Models::AlertCreateForSubscriptionParams::ThresholdOverride>, nil] Per-group threshold overrides. Each override maps a specific combination of grou
221
+ #
204
222
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
205
223
  #
206
224
  # @return [Orb::Models::Alert]
@@ -49,8 +49,7 @@ module Orb
49
49
  #
50
50
  # The list of coupons is ordered starting from the most recently created coupon.
51
51
  # The response also includes `pagination_metadata`, which lets the caller retrieve
52
- # the next page of results if they exist. More information about pagination can be
53
- # found in the Pagination-metadata schema.
52
+ # the next page of results if they exist.
54
53
  #
55
54
  # @overload list(cursor: nil, limit: nil, redemption_code: nil, show_archived: nil, request_options: {})
56
55
  #
@@ -59,14 +59,17 @@ module Orb
59
59
 
60
60
  # This endpoint returns the credit block and its associated purchasing invoices.
61
61
  #
62
- # If a credit block was purchased (as opposed to being manually added or allocated
63
- # from a subscription), this endpoint returns the invoices that were created to
64
- # charge the customer for the credit block. For credit blocks with payment
65
- # schedules spanning multiple periods (e.g., monthly payments over 12 months),
66
- # multiple invoices will be returned.
67
- #
68
- # If the credit block was not purchased (e.g., manual increment, allocation), an
69
- # empty invoices list is returned.
62
+ # If a credit block was purchased (as opposed to being manually added), this
63
+ # endpoint returns the invoices that were created to charge the customer for the
64
+ # credit block. For credit blocks with payment schedules spanning multiple periods
65
+ # (e.g., monthly payments over 12 months), multiple invoices will be returned.
66
+ #
67
+ # For credit blocks created by subscription allocation prices, this endpoint
68
+ # returns the subscription invoice containing the allocation line item that
69
+ # created the block.
70
+ #
71
+ # If the credit block was not purchased (e.g., manual increment), an empty
72
+ # invoices list is returned.
70
73
  #
71
74
  # **Note: This endpoint is currently experimental and its interface may change in
72
75
  # future releases. Please contact support before building production integrations
@@ -137,9 +137,6 @@ module Orb
137
137
  )
138
138
  end
139
139
 
140
- # Some parameter documentations has been truncated, see
141
- # {Orb::Models::Customers::Credits::LedgerCreateEntryParams} for more details.
142
- #
143
140
  # This endpoint allows you to create a new ledger entry for a specified customer's
144
141
  # balance. This can be used to increment balance, deduct credits, and change the
145
142
  # expiry date of existing credits.
@@ -180,8 +177,9 @@ module Orb
180
177
  # }
181
178
  # ```
182
179
  #
183
- # Note that by default, Orb will always first increment any _negative_ balance in
184
- # existing blocks before adding the remaining amount to the desired credit block.
180
+ # Note that an `increment` entry always creates a new credit block (defined by the
181
+ # optional `effective_date` and `expiry_date`); it never modifies an existing
182
+ # block.
185
183
  #
186
184
  # ### Invoicing for credits
187
185
  #
@@ -190,7 +188,9 @@ module Orb
190
188
  # also generate a one-off invoice for the customer for the credits pre-purchase.
191
189
  # Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
192
190
  # on the invoice are calculated by multiplying the cost basis with the number of
193
- # credit units added.
191
+ # credit units added. If you invoice or handle payment of credits outside of Orb
192
+ # (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to
193
+ # `true` to prevent duplicate invoicing effects.
194
194
  #
195
195
  # - if `per_unit_cost_basis` is greater than zero, an invoice will be generated
196
196
  # and `invoice_settings` must be included
@@ -200,11 +200,17 @@ module Orb
200
200
  # ## Deducting Credits
201
201
  #
202
202
  # Orb allows you to deduct credits from a customer by creating an entry of type
203
- # `decrement`. Orb matches the algorithm for automatic deductions for determining
204
- # which credit blocks to decrement from. In the case that the deduction leads to
205
- # multiple ledger entries, the response from this endpoint will be the final
206
- # deduction. Orb also optionally allows specifying a description to assist with
207
- # auditing.
203
+ # `decrement`. A `decrement` entry records credits as usage and immediately
204
+ # recognizes revenue at the block's `per_unit_cost_basis`.
205
+ #
206
+ # For most credit removals, use `void` (no revenue impact) or `expiration_change`
207
+ # (revenue recognized on expiration) instead. Only use `decrement` when credits
208
+ # were genuinely consumed outside of normal event ingestion.
209
+ #
210
+ # Orb matches the algorithm for automatic deductions for determining which credit
211
+ # blocks to decrement from. In the case that the deduction leads to multiple
212
+ # ledger entries, the response from this endpoint will be the final deduction. Orb
213
+ # also optionally allows specifying a description to assist with auditing.
208
214
  #
209
215
  # The following snippet illustrates a sample request body to decrement credits.
210
216
  #
@@ -256,36 +262,10 @@ module Orb
256
262
  # that was originally decremented from, and `amount` indicates how many credits to
257
263
  # return to the customer, up to the block's initial balance.
258
264
  #
259
- # @overload create_entry(customer_id, amount:, entry_type:, target_expiry_date:, block_id:, currency: nil, description: nil, effective_date: nil, expiry_date: nil, filters: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, void_reason: nil, request_options: {})
265
+ # @overload create_entry(customer_id, body:, request_options: {})
260
266
  #
261
267
  # @param customer_id [String]
262
- #
263
- # @param amount [Float] The number of credits to effect. Note that this is required for increment, decre
264
- #
265
- # @param entry_type [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::EntryType]
266
- #
267
- # @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot
268
- #
269
- # @param block_id [String] The ID of the block to reverse a decrement from.
270
- #
271
- # @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r
272
- #
273
- # @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API.
274
- #
275
- # @param effective_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should become avai
276
- #
277
- # @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire
278
- #
279
- # @param filters [Array<Orb::Models::Customers::Credits::LedgerCreateEntryParams::Filter>, nil] Optional filter to specify which items this credit block applies to. If not spec
280
- #
281
- # @param invoice_settings [Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings, nil] Passing `invoice_settings` automatically generates an invoice for the newly adde
282
- #
283
- # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
284
- #
285
- # @param per_unit_cost_basis [String, nil] Can only be specified when entry_type=increment. How much, in the customer's cur
286
- #
287
- # @param void_reason [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::VoidReason, nil] Can only be specified when `entry_type=void`. The reason for the void.
288
- #
268
+ # @param body [Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Decrement, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Amendment]
289
269
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
290
270
  #
291
271
  # @return [Orb::Models::Customers::Credits::IncrementLedgerEntry, Orb::Models::Customers::Credits::DecrementLedgerEntry, Orb::Models::Customers::Credits::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::VoidLedgerEntry, Orb::Models::Customers::Credits::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::AmendmentLedgerEntry]
@@ -296,16 +276,12 @@ module Orb
296
276
  @client.request(
297
277
  method: :post,
298
278
  path: ["customers/%1$s/credits/ledger_entry", customer_id],
299
- body: parsed,
279
+ body: parsed[:body],
300
280
  model: Orb::Models::Customers::Credits::LedgerCreateEntryResponse,
301
281
  options: options
302
282
  )
303
283
  end
304
284
 
305
- # Some parameter documentations has been truncated, see
306
- # {Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams} for more
307
- # details.
308
- #
309
285
  # This endpoint allows you to create a new ledger entry for a specified customer's
310
286
  # balance. This can be used to increment balance, deduct credits, and change the
311
287
  # expiry date of existing credits.
@@ -346,8 +322,9 @@ module Orb
346
322
  # }
347
323
  # ```
348
324
  #
349
- # Note that by default, Orb will always first increment any _negative_ balance in
350
- # existing blocks before adding the remaining amount to the desired credit block.
325
+ # Note that an `increment` entry always creates a new credit block (defined by the
326
+ # optional `effective_date` and `expiry_date`); it never modifies an existing
327
+ # block.
351
328
  #
352
329
  # ### Invoicing for credits
353
330
  #
@@ -356,7 +333,9 @@ module Orb
356
333
  # also generate a one-off invoice for the customer for the credits pre-purchase.
357
334
  # Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
358
335
  # on the invoice are calculated by multiplying the cost basis with the number of
359
- # credit units added.
336
+ # credit units added. If you invoice or handle payment of credits outside of Orb
337
+ # (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to
338
+ # `true` to prevent duplicate invoicing effects.
360
339
  #
361
340
  # - if `per_unit_cost_basis` is greater than zero, an invoice will be generated
362
341
  # and `invoice_settings` must be included
@@ -366,11 +345,17 @@ module Orb
366
345
  # ## Deducting Credits
367
346
  #
368
347
  # Orb allows you to deduct credits from a customer by creating an entry of type
369
- # `decrement`. Orb matches the algorithm for automatic deductions for determining
370
- # which credit blocks to decrement from. In the case that the deduction leads to
371
- # multiple ledger entries, the response from this endpoint will be the final
372
- # deduction. Orb also optionally allows specifying a description to assist with
373
- # auditing.
348
+ # `decrement`. A `decrement` entry records credits as usage and immediately
349
+ # recognizes revenue at the block's `per_unit_cost_basis`.
350
+ #
351
+ # For most credit removals, use `void` (no revenue impact) or `expiration_change`
352
+ # (revenue recognized on expiration) instead. Only use `decrement` when credits
353
+ # were genuinely consumed outside of normal event ingestion.
354
+ #
355
+ # Orb matches the algorithm for automatic deductions for determining which credit
356
+ # blocks to decrement from. In the case that the deduction leads to multiple
357
+ # ledger entries, the response from this endpoint will be the final deduction. Orb
358
+ # also optionally allows specifying a description to assist with auditing.
374
359
  #
375
360
  # The following snippet illustrates a sample request body to decrement credits.
376
361
  #
@@ -422,36 +407,10 @@ module Orb
422
407
  # that was originally decremented from, and `amount` indicates how many credits to
423
408
  # return to the customer, up to the block's initial balance.
424
409
  #
425
- # @overload create_entry_by_external_id(external_customer_id, amount:, entry_type:, target_expiry_date:, block_id:, currency: nil, description: nil, effective_date: nil, expiry_date: nil, filters: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, void_reason: nil, request_options: {})
410
+ # @overload create_entry_by_external_id(external_customer_id, body:, request_options: {})
426
411
  #
427
412
  # @param external_customer_id [String]
428
- #
429
- # @param amount [Float] The number of credits to effect. Note that this is required for increment, decre
430
- #
431
- # @param entry_type [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::EntryType]
432
- #
433
- # @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot
434
- #
435
- # @param block_id [String] The ID of the block to reverse a decrement from.
436
- #
437
- # @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r
438
- #
439
- # @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API.
440
- #
441
- # @param effective_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should become avai
442
- #
443
- # @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire
444
- #
445
- # @param filters [Array<Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter>, nil] Optional filter to specify which items this credit block applies to. If not spec
446
- #
447
- # @param invoice_settings [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings, nil] Passing `invoice_settings` automatically generates an invoice for the newly adde
448
- #
449
- # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
450
- #
451
- # @param per_unit_cost_basis [String, nil] Can only be specified when entry_type=increment. How much, in the customer's cur
452
- #
453
- # @param void_reason [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::VoidReason, nil] Can only be specified when `entry_type=void`. The reason for the void.
454
- #
413
+ # @param body [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Decrement, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::ExpirationChange, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Amendment]
455
414
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
456
415
  #
457
416
  # @return [Orb::Models::Customers::Credits::IncrementLedgerEntry, Orb::Models::Customers::Credits::DecrementLedgerEntry, Orb::Models::Customers::Credits::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::VoidLedgerEntry, Orb::Models::Customers::Credits::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::AmendmentLedgerEntry]
@@ -462,7 +421,7 @@ module Orb
462
421
  @client.request(
463
422
  method: :post,
464
423
  path: ["customers/external_customer_id/%1$s/credits/ledger_entry", external_customer_id],
465
- body: parsed,
424
+ body: parsed[:body],
466
425
  model: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse,
467
426
  options: options
468
427
  )
@@ -147,11 +147,12 @@ module Orb
147
147
  #
148
148
  # This endpoint can be used to update the `payment_provider`,
149
149
  # `payment_provider_id`, `name`, `email`, `email_delivery`, `tax_id`,
150
- # `auto_collection`, `metadata`, `shipping_address`, `billing_address`, and
151
- # `additional_emails` of an existing customer. Other fields on a customer are
152
- # currently immutable.
150
+ # `auto_collection`, `metadata`, `shipping_address`, `billing_address`,
151
+ # `additional_emails`, and `currency` of an existing customer. `currency` can only
152
+ # be set if it has not already been set on the customer. Other fields on a
153
+ # customer are currently immutable.
153
154
  #
154
- # @overload update(customer_id, accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, billing_address: nil, currency: 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: {})
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: {})
155
156
  #
156
157
  # @param customer_id [String]
157
158
  #
@@ -165,7 +166,9 @@ module Orb
165
166
  #
166
167
  # @param billing_address [Orb::Models::AddressInput, nil]
167
168
  #
168
- # @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. If not
169
+ # @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. This c
170
+ #
171
+ # @param default_payment_method_id [String, nil] The Orb ID of the payment method to set as this customer's default. Pass `null`
169
172
  #
170
173
  # @param email [String, nil] A valid customer email, to be used for invoicing and notifications.
171
174
  #
@@ -392,7 +395,7 @@ module Orb
392
395
  # resource and semantics of this endpoint exactly mirror
393
396
  # [Update Customer](update-customer).
394
397
  #
395
- # @overload update_by_external_id(id, accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, billing_address: nil, currency: 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: {})
398
+ # @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: {})
396
399
  #
397
400
  # @param id [String]
398
401
  #
@@ -406,7 +409,9 @@ module Orb
406
409
  #
407
410
  # @param billing_address [Orb::Models::AddressInput, nil]
408
411
  #
409
- # @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. If not
412
+ # @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. This c
413
+ #
414
+ # @param default_payment_method_id [String, nil] The Orb ID of the payment method to set as this customer's default. Pass `null`
410
415
  #
411
416
  # @param email [String, nil] A valid customer email, to be used for invoicing and notifications.
412
417
  #
@@ -15,8 +15,8 @@ module Orb
15
15
  # 3 steps:
16
16
  #
17
17
  # 1. Create the backfill, specifying its parameters.
18
- # 2. [Ingest](ingest) usage events, referencing the backfill (query parameter
19
- # `backfill_id`).
18
+ # 2. [Ingest](/api-reference/event/ingest-events) usage events, referencing the
19
+ # backfill (query parameter `backfill_id`).
20
20
  # 3. [Close](close-backfill) the backfill, propagating the update in past usage
21
21
  # throughout Orb.
22
22
  #
@@ -91,8 +91,7 @@ module Orb
91
91
  # The list of backfills is ordered starting from the most recently created
92
92
  # backfill. The response also includes
93
93
  # [`pagination_metadata`](/api-reference/pagination), which lets the caller
94
- # retrieve the next page of results if they exist. More information about
95
- # pagination can be found in the [Pagination-metadata schema](pagination).
94
+ # retrieve the next page of results if they exist.
96
95
  #
97
96
  # @overload list(cursor: nil, limit: nil, request_options: {})
98
97
  #
@@ -273,8 +273,8 @@ module Orb
273
273
  # billed for in the corresponding billing period.
274
274
  #
275
275
  # In general, Orb does not expect events with future dated timestamps. In cases
276
- # where the timestamp is at least 24 hours ahead of the current time, the event
277
- # will not be accepted as a valid event, and will throw validation errors.
276
+ # where the timestamp is 5 minutes ahead of the current time, the event will not
277
+ # be accepted as a valid event, and will throw validation errors.
278
278
  #
279
279
  # ## Event validation
280
280
  #
@@ -289,9 +289,9 @@ module Orb
289
289
  # - If the `external_customer_id` is specified, the customer in Orb does not need
290
290
  # to exist. Events will be attributed to any future customers with the
291
291
  # `external_customer_id` on subscription creation.
292
- # - `timestamp` must conform to ISO 8601 and represent a timestamp at most 1 hour
293
- # in the future. This timestamp should be sent in UTC timezone (no timezone
294
- # offset).
292
+ # - `timestamp` must conform to ISO 8601 and represent a timestamp at most 5
293
+ # minutes in the future. This timestamp should be sent in UTC timezone (no
294
+ # timezone offset).
295
295
  #
296
296
  # ## Idempotency and retry semantics
297
297
  #
@@ -328,34 +328,7 @@ module Orb
328
328
  # request payload size, but please give us a heads up if you’re changing either of
329
329
  # these factors by an order of magnitude from initial setup.
330
330
  #
331
- # ## Testing in debug mode
332
- #
333
- # The ingestion API supports a debug mode, which returns additional verbose output
334
- # to indicate which event idempotency keys were newly ingested or duplicates from
335
- # previous requests. To enable this mode, mark `debug=true` as a query parameter.
336
- #
337
- # If `debug=true` is not specified, the response will only contain
338
- # `validation_failed`. Orb will still honor the idempotency guarantees set
339
- # [here](/events-and-metrics/event-ingestion#event-volume-and-concurrency) in all
340
- # cases.
341
- #
342
- # We strongly recommend that you only use debug mode as part of testing your
343
- # initial Orb integration. Once you're ready to switch to production, disable
344
- # debug mode to take advantage of improved performance and maximal throughput.
345
- #
346
- # #### Example: ingestion response with `debug=true`
347
- #
348
- # ```json
349
- # {
350
- # "debug": {
351
- # "duplicate": [],
352
- # "ingested": ["B7E83HDMfJPAunXW", "SJs5DQJ3TnwSqEZE", "8SivfDsNKwCeAXim"]
353
- # },
354
- # "validation_failed": []
355
- # }
356
- # ```
357
- #
358
- # #### Example: ingestion response with `debug=false`
331
+ # #### Example: ingestion response
359
332
  #
360
333
  # ```json
361
334
  # {
@@ -369,7 +342,7 @@ module Orb
369
342
  #
370
343
  # @param backfill_id [String, nil] Query param: If this ingestion request is part of a backfill, this parameter tie
371
344
  #
372
- # @param debug [Boolean] Query param: Flag to enable additional debug information in the endpoint respons
345
+ # @param debug [Boolean] Query param: Pending Deprecation: Flag to enable additional debug information in
373
346
  #
374
347
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
375
348
  #