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 change_option
11
16
  #
12
17
  # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ChangeOption]
@@ -45,6 +50,15 @@ module Orb
45
50
  # @return [Boolean, nil]
46
51
  optional :auto_collection, Orb::Internal::Type::Boolean, nil?: true
47
52
 
53
+ # @!attribute auto_issuance
54
+ # Used to determine if invoices for this subscription will be automatically
55
+ # issued. If true, invoices will be automatically issued. If false, invoices will
56
+ # require manual approval. If `null` is specified, this defaults to the behavior
57
+ # configured for this customer.
58
+ #
59
+ # @return [Boolean, nil]
60
+ optional :auto_issuance, Orb::Internal::Type::Boolean, nil?: true
61
+
48
62
  # @!attribute billing_cycle_alignment
49
63
  # Reset billing periods to be aligned with the plan change's effective date or
50
64
  # start of the month. Defaults to `unchanged` which keeps subscription's existing
@@ -215,10 +229,12 @@ module Orb
215
229
  # @return [Array<String>, nil]
216
230
  optional :usage_customer_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
217
231
 
218
- # @!method initialize(change_option:, add_adjustments: nil, add_prices: nil, align_billing_with_plan_change_date: nil, auto_collection: nil, billing_cycle_alignment: nil, billing_cycle_anchor_configuration: nil, change_date: nil, coupon_redemption_code: nil, credits_overage_rate: nil, default_invoice_memo: nil, external_plan_id: nil, filter: nil, initial_phase_order: nil, invoicing_threshold: 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, trial_duration_days: nil, usage_customer_ids: nil, request_options: {})
232
+ # @!method initialize(subscription_id:, change_option:, add_adjustments: nil, add_prices: nil, align_billing_with_plan_change_date: nil, auto_collection: nil, auto_issuance: nil, billing_cycle_alignment: nil, billing_cycle_anchor_configuration: nil, change_date: nil, coupon_redemption_code: nil, credits_overage_rate: nil, default_invoice_memo: nil, external_plan_id: nil, filter: nil, initial_phase_order: nil, invoicing_threshold: 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, trial_duration_days: nil, usage_customer_ids: nil, request_options: {})
219
233
  # Some parameter documentations has been truncated, see
220
234
  # {Orb::Models::SubscriptionSchedulePlanChangeParams} for more details.
221
235
  #
236
+ # @param subscription_id [String]
237
+ #
222
238
  # @param change_option [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ChangeOption]
223
239
  #
224
240
  # @param add_adjustments [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment>, nil] Additional adjustments to be added to the subscription. (Only available for acco
@@ -229,6 +245,8 @@ module Orb
229
245
  #
230
246
  # @param auto_collection [Boolean, nil] Determines whether issued invoices for this subscription will automatically be c
231
247
  #
248
+ # @param auto_issuance [Boolean, nil] Used to determine if invoices for this subscription will be automatically issued
249
+ #
232
250
  # @param billing_cycle_alignment [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::BillingCycleAlignment, nil] Reset billing periods to be aligned with the plan change's effective date or sta
233
251
  #
234
252
  # @param billing_cycle_anchor_configuration [Orb::Models::BillingCycleAnchorConfiguration, nil]
@@ -288,7 +306,7 @@ module Orb
288
306
  # @!attribute adjustment
289
307
  # The definition of a new adjustment to create and add to the subscription.
290
308
  #
291
- # @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum]
309
+ # @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount]
292
310
  required :adjustment, union: -> { Orb::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment }
293
311
 
294
312
  # @!attribute end_date
@@ -317,7 +335,7 @@ module Orb
317
335
  # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment} for more
318
336
  # details.
319
337
  #
320
- # @param adjustment [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] The definition of a new adjustment to create and add to the subscription.
338
+ # @param adjustment [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount] The definition of a new adjustment to create and add to the subscription.
321
339
  #
322
340
  # @param end_date [Time, nil] The end date of the adjustment interval. This is the date that the adjustment wi
323
341
  #
@@ -343,8 +361,215 @@ module Orb
343
361
 
344
362
  variant :maximum, -> { Orb::NewMaximum }
345
363
 
364
+ variant :tiered_percentage_discount,
365
+ -> { Orb::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount }
366
+
367
+ class TieredPercentageDiscount < Orb::Internal::Type::BaseModel
368
+ # @!attribute adjustment_type
369
+ #
370
+ # @return [Symbol, :tiered_percentage_discount]
371
+ required :adjustment_type, const: :tiered_percentage_discount
372
+
373
+ # @!attribute tiers
374
+ #
375
+ # @return [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Tier>]
376
+ required :tiers,
377
+ -> { Orb::Internal::Type::ArrayOf[Orb::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Tier] }
378
+
379
+ # @!attribute applies_to_all
380
+ # If set, the adjustment will apply to every price on the subscription.
381
+ #
382
+ # @return [Boolean, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount::AppliesToAll, nil]
383
+ optional :applies_to_all,
384
+ enum: -> {
385
+ Orb::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount::AppliesToAll
386
+ },
387
+ nil?: true
388
+
389
+ # @!attribute applies_to_item_ids
390
+ # The set of item IDs to which this adjustment applies.
391
+ #
392
+ # @return [Array<String>, nil]
393
+ optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
394
+
395
+ # @!attribute applies_to_price_ids
396
+ # The set of price IDs to which this adjustment applies.
397
+ #
398
+ # @return [Array<String>, nil]
399
+ optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
400
+
401
+ # @!attribute currency
402
+ # If set, only prices in the specified currency will have the adjustment applied.
403
+ #
404
+ # @return [String, nil]
405
+ optional :currency, String, nil?: true
406
+
407
+ # @!attribute filters
408
+ # A list of filters that determine which prices this adjustment will apply to.
409
+ #
410
+ # @return [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter>, nil]
411
+ optional :filters,
412
+ -> {
413
+ Orb::Internal::Type::ArrayOf[Orb::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter]
414
+ },
415
+ nil?: true
416
+
417
+ # @!attribute is_invoice_level
418
+ # When false, this adjustment will be applied to a single price. Otherwise, it
419
+ # will be applied at the invoice level, possibly to multiple prices.
420
+ #
421
+ # @return [Boolean, nil]
422
+ optional :is_invoice_level, Orb::Internal::Type::Boolean
423
+
424
+ # @!attribute price_type
425
+ # If set, only prices of the specified type will have the adjustment applied.
426
+ #
427
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount::PriceType, nil]
428
+ optional :price_type,
429
+ enum: -> {
430
+ Orb::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount::PriceType
431
+ },
432
+ nil?: true
433
+
434
+ # @!method initialize(tiers:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :tiered_percentage_discount)
435
+ # Some parameter documentations has been truncated, see
436
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount}
437
+ # for more details.
438
+ #
439
+ # @param tiers [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Tier>]
440
+ #
441
+ # @param applies_to_all [Boolean, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
442
+ #
443
+ # @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
444
+ #
445
+ # @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
446
+ #
447
+ # @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
448
+ #
449
+ # @param filters [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
450
+ #
451
+ # @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
452
+ #
453
+ # @param price_type [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
454
+ #
455
+ # @param adjustment_type [Symbol, :tiered_percentage_discount]
456
+
457
+ class Tier < Orb::Internal::Type::BaseModel
458
+ # @!attribute lower_bound
459
+ # Exclusive lower bound of cumulative spend for this tier.
460
+ #
461
+ # @return [Float]
462
+ required :lower_bound, Float
463
+
464
+ # @!attribute percentage
465
+ # The percentage (0-1) discounted from spend in this tier.
466
+ #
467
+ # @return [Float]
468
+ required :percentage, Float
469
+
470
+ # @!attribute upper_bound
471
+ # Inclusive upper bound of cumulative spend; null for the final open-ended tier.
472
+ #
473
+ # @return [Float, nil]
474
+ optional :upper_bound, Float, nil?: true
475
+
476
+ # @!method initialize(lower_bound:, percentage:, upper_bound: nil)
477
+ # @param lower_bound [Float] Exclusive lower bound of cumulative spend for this tier.
478
+ #
479
+ # @param percentage [Float] The percentage (0-1) discounted from spend in this tier.
480
+ #
481
+ # @param upper_bound [Float, nil] Inclusive upper bound of cumulative spend; null for the final open-ended tier.
482
+ end
483
+
484
+ # If set, the adjustment will apply to every price on the subscription.
485
+ #
486
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount#applies_to_all
487
+ module AppliesToAll
488
+ extend Orb::Internal::Type::Enum
489
+
490
+ TRUE = true
491
+
492
+ # @!method self.values
493
+ # @return [Array<Boolean>]
494
+ end
495
+
496
+ class Filter < Orb::Internal::Type::BaseModel
497
+ # @!attribute field
498
+ # The property of the price to filter on.
499
+ #
500
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter::Field]
501
+ required :field,
502
+ enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter::Field }
503
+
504
+ # @!attribute operator
505
+ # Should prices that match the filter be included or excluded.
506
+ #
507
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter::Operator]
508
+ required :operator,
509
+ enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter::Operator }
510
+
511
+ # @!attribute values
512
+ # The IDs or values that match this filter.
513
+ #
514
+ # @return [Array<String>]
515
+ required :values, Orb::Internal::Type::ArrayOf[String]
516
+
517
+ # @!method initialize(field:, operator:, values:)
518
+ # @param field [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter::Field] The property of the price to filter on.
519
+ #
520
+ # @param operator [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
521
+ #
522
+ # @param values [Array<String>] The IDs or values that match this filter.
523
+
524
+ # The property of the price to filter on.
525
+ #
526
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter#field
527
+ module Field
528
+ extend Orb::Internal::Type::Enum
529
+
530
+ PRICE_ID = :price_id
531
+ ITEM_ID = :item_id
532
+ PRICE_TYPE = :price_type
533
+ CURRENCY = :currency
534
+ PRICING_UNIT_ID = :pricing_unit_id
535
+
536
+ # @!method self.values
537
+ # @return [Array<Symbol>]
538
+ end
539
+
540
+ # Should prices that match the filter be included or excluded.
541
+ #
542
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter#operator
543
+ module Operator
544
+ extend Orb::Internal::Type::Enum
545
+
546
+ INCLUDES = :includes
547
+ EXCLUDES = :excludes
548
+
549
+ # @!method self.values
550
+ # @return [Array<Symbol>]
551
+ end
552
+ end
553
+
554
+ # If set, only prices of the specified type will have the adjustment applied.
555
+ #
556
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount#price_type
557
+ module PriceType
558
+ extend Orb::Internal::Type::Enum
559
+
560
+ USAGE = :usage
561
+ FIXED_IN_ADVANCE = :fixed_in_advance
562
+ FIXED_IN_ARREARS = :fixed_in_arrears
563
+ FIXED = :fixed
564
+ IN_ARREARS = :in_arrears
565
+
566
+ # @!method self.values
567
+ # @return [Array<Symbol>]
568
+ end
569
+ end
570
+
346
571
  # @!method self.variants
347
- # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)]
572
+ # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::TieredPercentageDiscount)]
348
573
  end
349
574
  end
350
575
 
@@ -414,7 +639,7 @@ module Orb
414
639
  # @!attribute price
415
640
  # New subscription price request body params.
416
641
  #
417
- # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil]
642
+ # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil]
418
643
  optional :price, union: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price }, nil?: true
419
644
 
420
645
  # @!attribute price_id
@@ -451,7 +676,7 @@ module Orb
451
676
  #
452
677
  # @param plan_phase_order [Integer, nil] The phase to add this price to.
453
678
  #
454
- # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil] New subscription price request body params.
679
+ # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput, nil] New subscription price request body params.
455
680
  #
456
681
  # @param price_id [String, nil] The id of the price to add to the subscription.
457
682
  #
@@ -494,6 +719,9 @@ module Orb
494
719
 
495
720
  variant :matrix_with_allocation, -> { Orb::NewSubscriptionMatrixWithAllocationPrice }
496
721
 
722
+ variant :matrix_with_threshold_discounts,
723
+ -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts }
724
+
497
725
  variant :tiered_with_proration,
498
726
  -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration }
499
727
 
@@ -526,6 +754,12 @@ module Orb
526
754
  variant :cumulative_grouped_allocation,
527
755
  -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation }
528
756
 
757
+ variant :daily_credit_allowance,
758
+ -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance }
759
+
760
+ variant :metered_allowance,
761
+ -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance }
762
+
529
763
  variant :minimum_composite, -> { Orb::NewSubscriptionMinimumCompositePrice }
530
764
 
531
765
  variant :percent, -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent }
@@ -596,11 +830,7 @@ module Orb
596
830
  # The configuration for the rate of the price currency to the invoicing currency.
597
831
  #
598
832
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
599
- optional :conversion_rate_config,
600
- union: -> {
601
- Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters::ConversionRateConfig
602
- },
603
- nil?: true
833
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
604
834
 
605
835
  # @!attribute currency
606
836
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -793,13 +1023,13 @@ module Orb
793
1023
  end
794
1024
  end
795
1025
 
796
- class TieredWithProration < Orb::Internal::Type::BaseModel
1026
+ class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel
797
1027
  # @!attribute cadence
798
1028
  # The cadence to bill for this price on.
799
1029
  #
800
- # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence]
1030
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence]
801
1031
  required :cadence,
802
- enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence }
1032
+ enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence }
803
1033
 
804
1034
  # @!attribute item_id
805
1035
  # The id of the item the price will be associated with.
@@ -807,11 +1037,18 @@ module Orb
807
1037
  # @return [String]
808
1038
  required :item_id, String
809
1039
 
1040
+ # @!attribute matrix_with_threshold_discounts_config
1041
+ # Configuration for matrix_with_threshold_discounts pricing
1042
+ #
1043
+ # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig]
1044
+ required :matrix_with_threshold_discounts_config,
1045
+ -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig }
1046
+
810
1047
  # @!attribute model_type
811
1048
  # The pricing model type
812
1049
  #
813
- # @return [Symbol, :tiered_with_proration]
814
- required :model_type, const: :tiered_with_proration
1050
+ # @return [Symbol, :matrix_with_threshold_discounts]
1051
+ required :model_type, const: :matrix_with_threshold_discounts
815
1052
 
816
1053
  # @!attribute name
817
1054
  # The name of the price.
@@ -819,13 +1056,6 @@ module Orb
819
1056
  # @return [String]
820
1057
  required :name, String
821
1058
 
822
- # @!attribute tiered_with_proration_config
823
- # Configuration for tiered_with_proration pricing
824
- #
825
- # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig]
826
- required :tiered_with_proration_config,
827
- -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig }
828
-
829
1059
  # @!attribute billable_metric_id
830
1060
  # The id of the billable metric for the price. Only needed if the price is
831
1061
  # usage-based.
@@ -857,11 +1087,7 @@ module Orb
857
1087
  # The configuration for the rate of the price currency to the invoicing currency.
858
1088
  #
859
1089
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
860
- optional :conversion_rate_config,
861
- union: -> {
862
- Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::ConversionRateConfig
863
- },
864
- nil?: true
1090
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
865
1091
 
866
1092
  # @!attribute currency
867
1093
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -927,18 +1153,18 @@ module Orb
927
1153
  # @return [String, nil]
928
1154
  optional :reference_id, String, nil?: true
929
1155
 
930
- # @!method initialize(cadence:, item_id:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration)
1156
+ # @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts)
931
1157
  # Some parameter documentations has been truncated, see
932
- # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration}
1158
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts}
933
1159
  # for more details.
934
1160
  #
935
- # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on.
1161
+ # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on.
936
1162
  #
937
1163
  # @param item_id [String] The id of the item the price will be associated with.
938
1164
  #
939
- # @param name [String] The name of the price.
1165
+ # @param matrix_with_threshold_discounts_config [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing
940
1166
  #
941
- # @param tiered_with_proration_config [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing
1167
+ # @param name [String] The name of the price.
942
1168
  #
943
1169
  # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
944
1170
  #
@@ -968,11 +1194,11 @@ module Orb
968
1194
  #
969
1195
  # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
970
1196
  #
971
- # @param model_type [Symbol, :tiered_with_proration] The pricing model type
1197
+ # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type
972
1198
 
973
1199
  # The cadence to bill for this price on.
974
1200
  #
975
- # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration#cadence
1201
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts#cadence
976
1202
  module Cadence
977
1203
  extend Orb::Internal::Type::Enum
978
1204
 
@@ -987,66 +1213,139 @@ module Orb
987
1213
  # @return [Array<Symbol>]
988
1214
  end
989
1215
 
990
- # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration#tiered_with_proration_config
991
- class TieredWithProrationConfig < Orb::Internal::Type::BaseModel
992
- # @!attribute tiers
993
- # Tiers for rating based on total usage quantities into the specified tier with
994
- # proration
1216
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config
1217
+ class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel
1218
+ # @!attribute default_unit_amount
1219
+ # Unit price used for usage that does not match any defined matrix cell.
995
1220
  #
996
- # @return [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier>]
997
- required :tiers,
1221
+ # @return [String]
1222
+ required :default_unit_amount, String
1223
+
1224
+ # @!attribute first_dimension
1225
+ # First matrix dimension key.
1226
+ #
1227
+ # @return [String]
1228
+ required :first_dimension, String
1229
+
1230
+ # @!attribute matrix_values
1231
+ # Per-cell unit prices.
1232
+ #
1233
+ # @return [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue>]
1234
+ required :matrix_values,
998
1235
  -> do
999
1236
  Orb::Internal::Type::ArrayOf[
1000
- Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier
1237
+ Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue
1001
1238
  ]
1002
1239
  end
1003
1240
 
1004
- # @!method initialize(tiers:)
1005
- # Some parameter documentations has been truncated, see
1006
- # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig}
1007
- # for more details.
1241
+ # @!attribute second_dimension
1242
+ # Optional second matrix dimension key.
1008
1243
  #
1009
- # Configuration for tiered_with_proration pricing
1244
+ # @return [String, nil]
1245
+ optional :second_dimension, String, nil?: true
1246
+
1247
+ # @!attribute threshold_discount_groups
1010
1248
  #
1011
- # @param tiers [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier>] Tiers for rating based on total usage quantities into the specified tier with pr
1249
+ # @return [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup>, nil]
1250
+ optional :threshold_discount_groups,
1251
+ -> do
1252
+ Orb::Internal::Type::ArrayOf[
1253
+ Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup
1254
+ ]
1255
+ end
1012
1256
 
1013
- class Tier < Orb::Internal::Type::BaseModel
1014
- # @!attribute tier_lower_bound
1015
- # Inclusive tier starting value
1257
+ # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil)
1258
+ # Configuration for matrix_with_threshold_discounts pricing
1259
+ #
1260
+ # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell.
1261
+ #
1262
+ # @param first_dimension [String] First matrix dimension key.
1263
+ #
1264
+ # @param matrix_values [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue>] Per-cell unit prices.
1265
+ #
1266
+ # @param second_dimension [String, nil] Optional second matrix dimension key.
1267
+ #
1268
+ # @param threshold_discount_groups [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup>]
1269
+
1270
+ class MatrixValue < Orb::Internal::Type::BaseModel
1271
+ # @!attribute first_dimension_value
1016
1272
  #
1017
1273
  # @return [String]
1018
- required :tier_lower_bound, String
1274
+ required :first_dimension_value, String
1019
1275
 
1020
1276
  # @!attribute unit_amount
1021
- # Amount per unit
1022
1277
  #
1023
1278
  # @return [String]
1024
1279
  required :unit_amount, String
1025
1280
 
1026
- # @!method initialize(tier_lower_bound:, unit_amount:)
1027
- # Configuration for a single tiered with proration tier
1281
+ # @!attribute second_dimension_value
1028
1282
  #
1029
- # @param tier_lower_bound [String] Inclusive tier starting value
1283
+ # @return [String, nil]
1284
+ optional :second_dimension_value, String, nil?: true
1285
+
1286
+ # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil)
1287
+ # @param first_dimension_value [String]
1288
+ # @param unit_amount [String]
1289
+ # @param second_dimension_value [String, nil]
1290
+ end
1291
+
1292
+ class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel
1293
+ # @!attribute above_threshold_discount_percentage
1294
+ # Discount rate applied to spend above the threshold.
1030
1295
  #
1031
- # @param unit_amount [String] Amount per unit
1296
+ # @return [String]
1297
+ required :above_threshold_discount_percentage, String
1298
+
1299
+ # @!attribute below_threshold_discount_percentage
1300
+ # Discount rate applied to spend at or below the threshold. Set to 0 for no
1301
+ # baseline discount.
1302
+ #
1303
+ # @return [String]
1304
+ required :below_threshold_discount_percentage, String
1305
+
1306
+ # @!attribute cell_coordinates
1307
+ # Semicolon-separated list of matrix cell coordinates targeted by this group. Each
1308
+ # coordinate is `first,second` when the matrix has two dimensions, or just `first`
1309
+ # for a single-dimension matrix. Example: `blue,circle;green,triangle`.
1310
+ #
1311
+ # @return [String]
1312
+ required :cell_coordinates, String
1313
+
1314
+ # @!attribute threshold_amount
1315
+ #
1316
+ # @return [String]
1317
+ required :threshold_amount, String
1318
+
1319
+ # @!attribute description
1320
+ #
1321
+ # @return [String, nil]
1322
+ optional :description, String, nil?: true
1323
+
1324
+ # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil)
1325
+ # Some parameter documentations has been truncated, see
1326
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup}
1327
+ # for more details.
1328
+ #
1329
+ # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold.
1330
+ #
1331
+ # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli
1332
+ #
1333
+ # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each
1334
+ #
1335
+ # @param threshold_amount [String]
1336
+ #
1337
+ # @param description [String, nil]
1032
1338
  end
1033
1339
  end
1034
1340
  end
1035
1341
 
1036
- class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel
1342
+ class TieredWithProration < Orb::Internal::Type::BaseModel
1037
1343
  # @!attribute cadence
1038
1344
  # The cadence to bill for this price on.
1039
1345
  #
1040
- # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence]
1346
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence]
1041
1347
  required :cadence,
1042
- enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence }
1043
-
1044
- # @!attribute grouped_with_min_max_thresholds_config
1045
- # Configuration for grouped_with_min_max_thresholds pricing
1046
- #
1047
- # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig]
1048
- required :grouped_with_min_max_thresholds_config,
1049
- -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig }
1348
+ enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence }
1050
1349
 
1051
1350
  # @!attribute item_id
1052
1351
  # The id of the item the price will be associated with.
@@ -1057,8 +1356,8 @@ module Orb
1057
1356
  # @!attribute model_type
1058
1357
  # The pricing model type
1059
1358
  #
1060
- # @return [Symbol, :grouped_with_min_max_thresholds]
1061
- required :model_type, const: :grouped_with_min_max_thresholds
1359
+ # @return [Symbol, :tiered_with_proration]
1360
+ required :model_type, const: :tiered_with_proration
1062
1361
 
1063
1362
  # @!attribute name
1064
1363
  # The name of the price.
@@ -1066,6 +1365,13 @@ module Orb
1066
1365
  # @return [String]
1067
1366
  required :name, String
1068
1367
 
1368
+ # @!attribute tiered_with_proration_config
1369
+ # Configuration for tiered_with_proration pricing
1370
+ #
1371
+ # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig]
1372
+ required :tiered_with_proration_config,
1373
+ -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig }
1374
+
1069
1375
  # @!attribute billable_metric_id
1070
1376
  # The id of the billable metric for the price. Only needed if the price is
1071
1377
  # usage-based.
@@ -1097,11 +1403,7 @@ module Orb
1097
1403
  # The configuration for the rate of the price currency to the invoicing currency.
1098
1404
  #
1099
1405
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
1100
- optional :conversion_rate_config,
1101
- union: -> {
1102
- Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig
1103
- },
1104
- nil?: true
1406
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1105
1407
 
1106
1408
  # @!attribute currency
1107
1409
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -1167,19 +1469,19 @@ module Orb
1167
1469
  # @return [String, nil]
1168
1470
  optional :reference_id, String, nil?: true
1169
1471
 
1170
- # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds)
1472
+ # @!method initialize(cadence:, item_id:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration)
1171
1473
  # Some parameter documentations has been truncated, see
1172
- # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds}
1474
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration}
1173
1475
  # for more details.
1174
1476
  #
1175
- # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on.
1176
- #
1177
- # @param grouped_with_min_max_thresholds_config [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing
1477
+ # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on.
1178
1478
  #
1179
1479
  # @param item_id [String] The id of the item the price will be associated with.
1180
1480
  #
1181
1481
  # @param name [String] The name of the price.
1182
1482
  #
1483
+ # @param tiered_with_proration_config [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing
1484
+ #
1183
1485
  # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
1184
1486
  #
1185
1487
  # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
@@ -1208,11 +1510,11 @@ module Orb
1208
1510
  #
1209
1511
  # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
1210
1512
  #
1211
- # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type
1513
+ # @param model_type [Symbol, :tiered_with_proration] The pricing model type
1212
1514
 
1213
1515
  # The cadence to bill for this price on.
1214
1516
  #
1215
- # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds#cadence
1517
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration#cadence
1216
1518
  module Cadence
1217
1519
  extend Orb::Internal::Type::Enum
1218
1520
 
@@ -1227,59 +1529,66 @@ module Orb
1227
1529
  # @return [Array<Symbol>]
1228
1530
  end
1229
1531
 
1230
- # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config
1231
- class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel
1232
- # @!attribute grouping_key
1233
- # The event property used to group before applying thresholds
1532
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration#tiered_with_proration_config
1533
+ class TieredWithProrationConfig < Orb::Internal::Type::BaseModel
1534
+ # @!attribute tiers
1535
+ # Tiers for rating based on total usage quantities into the specified tier with
1536
+ # proration
1234
1537
  #
1235
- # @return [String]
1236
- required :grouping_key, String
1538
+ # @return [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier>]
1539
+ required :tiers,
1540
+ -> do
1541
+ Orb::Internal::Type::ArrayOf[
1542
+ Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier
1543
+ ]
1544
+ end
1237
1545
 
1238
- # @!attribute maximum_charge
1239
- # The maximum amount to charge each group
1546
+ # @!method initialize(tiers:)
1547
+ # Some parameter documentations has been truncated, see
1548
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig}
1549
+ # for more details.
1240
1550
  #
1241
- # @return [String]
1242
- required :maximum_charge, String
1243
-
1244
- # @!attribute minimum_charge
1245
- # The minimum amount to charge each group, regardless of usage
1551
+ # Configuration for tiered_with_proration pricing
1246
1552
  #
1247
- # @return [String]
1248
- required :minimum_charge, String
1553
+ # @param tiers [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier>] Tiers for rating based on total usage quantities into the specified tier with pr
1249
1554
 
1250
- # @!attribute per_unit_rate
1251
- # The base price charged per group
1252
- #
1253
- # @return [String]
1254
- required :per_unit_rate, String
1555
+ class Tier < Orb::Internal::Type::BaseModel
1556
+ # @!attribute tier_lower_bound
1557
+ # Inclusive tier starting value
1558
+ #
1559
+ # @return [String]
1560
+ required :tier_lower_bound, String
1255
1561
 
1256
- # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:)
1257
- # Configuration for grouped_with_min_max_thresholds pricing
1258
- #
1259
- # @param grouping_key [String] The event property used to group before applying thresholds
1260
- #
1261
- # @param maximum_charge [String] The maximum amount to charge each group
1262
- #
1263
- # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage
1264
- #
1265
- # @param per_unit_rate [String] The base price charged per group
1562
+ # @!attribute unit_amount
1563
+ # Amount per unit
1564
+ #
1565
+ # @return [String]
1566
+ required :unit_amount, String
1567
+
1568
+ # @!method initialize(tier_lower_bound:, unit_amount:)
1569
+ # Configuration for a single tiered with proration tier
1570
+ #
1571
+ # @param tier_lower_bound [String] Inclusive tier starting value
1572
+ #
1573
+ # @param unit_amount [String] Amount per unit
1574
+ end
1266
1575
  end
1267
1576
  end
1268
1577
 
1269
- class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel
1578
+ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel
1270
1579
  # @!attribute cadence
1271
1580
  # The cadence to bill for this price on.
1272
1581
  #
1273
- # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence]
1582
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence]
1274
1583
  required :cadence,
1275
- enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence }
1584
+ enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence }
1276
1585
 
1277
- # @!attribute cumulative_grouped_allocation_config
1278
- # Configuration for cumulative_grouped_allocation pricing
1586
+ # @!attribute grouped_with_min_max_thresholds_config
1587
+ # Configuration for grouped_with_min_max_thresholds pricing
1279
1588
  #
1280
- # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig]
1281
- required :cumulative_grouped_allocation_config,
1282
- -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig }
1589
+ # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig]
1590
+ required :grouped_with_min_max_thresholds_config,
1591
+ -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig }
1283
1592
 
1284
1593
  # @!attribute item_id
1285
1594
  # The id of the item the price will be associated with.
@@ -1290,8 +1599,8 @@ module Orb
1290
1599
  # @!attribute model_type
1291
1600
  # The pricing model type
1292
1601
  #
1293
- # @return [Symbol, :cumulative_grouped_allocation]
1294
- required :model_type, const: :cumulative_grouped_allocation
1602
+ # @return [Symbol, :grouped_with_min_max_thresholds]
1603
+ required :model_type, const: :grouped_with_min_max_thresholds
1295
1604
 
1296
1605
  # @!attribute name
1297
1606
  # The name of the price.
@@ -1330,11 +1639,7 @@ module Orb
1330
1639
  # The configuration for the rate of the price currency to the invoicing currency.
1331
1640
  #
1332
1641
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
1333
- optional :conversion_rate_config,
1334
- union: -> {
1335
- Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::ConversionRateConfig
1336
- },
1337
- nil?: true
1642
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1338
1643
 
1339
1644
  # @!attribute currency
1340
1645
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -1400,14 +1705,14 @@ module Orb
1400
1705
  # @return [String, nil]
1401
1706
  optional :reference_id, String, nil?: true
1402
1707
 
1403
- # @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation)
1708
+ # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds)
1404
1709
  # Some parameter documentations has been truncated, see
1405
- # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation}
1710
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds}
1406
1711
  # for more details.
1407
1712
  #
1408
- # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on.
1713
+ # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on.
1409
1714
  #
1410
- # @param cumulative_grouped_allocation_config [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing
1715
+ # @param grouped_with_min_max_thresholds_config [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing
1411
1716
  #
1412
1717
  # @param item_id [String] The id of the item the price will be associated with.
1413
1718
  #
@@ -1441,11 +1746,11 @@ module Orb
1441
1746
  #
1442
1747
  # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
1443
1748
  #
1444
- # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type
1749
+ # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type
1445
1750
 
1446
1751
  # The cadence to bill for this price on.
1447
1752
  #
1448
- # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation#cadence
1753
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds#cadence
1449
1754
  module Cadence
1450
1755
  extend Orb::Internal::Type::Enum
1451
1756
 
@@ -1460,52 +1765,59 @@ module Orb
1460
1765
  # @return [Array<Symbol>]
1461
1766
  end
1462
1767
 
1463
- # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config
1464
- class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel
1465
- # @!attribute cumulative_allocation
1466
- # The overall allocation across all groups
1768
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config
1769
+ class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel
1770
+ # @!attribute grouping_key
1771
+ # The event property used to group before applying thresholds
1467
1772
  #
1468
1773
  # @return [String]
1469
- required :cumulative_allocation, String
1774
+ required :grouping_key, String
1470
1775
 
1471
- # @!attribute group_allocation
1472
- # The allocation per individual group
1776
+ # @!attribute maximum_charge
1777
+ # The maximum amount to charge each group
1473
1778
  #
1474
1779
  # @return [String]
1475
- required :group_allocation, String
1780
+ required :maximum_charge, String
1476
1781
 
1477
- # @!attribute grouping_key
1478
- # The event property used to group usage before applying allocations
1782
+ # @!attribute minimum_charge
1783
+ # The minimum amount to charge each group, regardless of usage
1479
1784
  #
1480
1785
  # @return [String]
1481
- required :grouping_key, String
1786
+ required :minimum_charge, String
1482
1787
 
1483
- # @!attribute unit_amount
1484
- # The amount to charge for each unit outside of the allocation
1788
+ # @!attribute per_unit_rate
1789
+ # The base price charged per group
1485
1790
  #
1486
1791
  # @return [String]
1487
- required :unit_amount, String
1792
+ required :per_unit_rate, String
1488
1793
 
1489
- # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:)
1490
- # Configuration for cumulative_grouped_allocation pricing
1794
+ # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:)
1795
+ # Configuration for grouped_with_min_max_thresholds pricing
1491
1796
  #
1492
- # @param cumulative_allocation [String] The overall allocation across all groups
1797
+ # @param grouping_key [String] The event property used to group before applying thresholds
1493
1798
  #
1494
- # @param group_allocation [String] The allocation per individual group
1799
+ # @param maximum_charge [String] The maximum amount to charge each group
1495
1800
  #
1496
- # @param grouping_key [String] The event property used to group usage before applying allocations
1801
+ # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage
1497
1802
  #
1498
- # @param unit_amount [String] The amount to charge for each unit outside of the allocation
1803
+ # @param per_unit_rate [String] The base price charged per group
1499
1804
  end
1500
1805
  end
1501
1806
 
1502
- class Percent < Orb::Internal::Type::BaseModel
1807
+ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel
1503
1808
  # @!attribute cadence
1504
1809
  # The cadence to bill for this price on.
1505
1810
  #
1506
- # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence]
1811
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence]
1507
1812
  required :cadence,
1508
- enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence }
1813
+ enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence }
1814
+
1815
+ # @!attribute cumulative_grouped_allocation_config
1816
+ # Configuration for cumulative_grouped_allocation pricing
1817
+ #
1818
+ # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig]
1819
+ required :cumulative_grouped_allocation_config,
1820
+ -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig }
1509
1821
 
1510
1822
  # @!attribute item_id
1511
1823
  # The id of the item the price will be associated with.
@@ -1516,8 +1828,8 @@ module Orb
1516
1828
  # @!attribute model_type
1517
1829
  # The pricing model type
1518
1830
  #
1519
- # @return [Symbol, :percent]
1520
- required :model_type, const: :percent
1831
+ # @return [Symbol, :cumulative_grouped_allocation]
1832
+ required :model_type, const: :cumulative_grouped_allocation
1521
1833
 
1522
1834
  # @!attribute name
1523
1835
  # The name of the price.
@@ -1525,13 +1837,6 @@ module Orb
1525
1837
  # @return [String]
1526
1838
  required :name, String
1527
1839
 
1528
- # @!attribute percent_config
1529
- # Configuration for percent pricing
1530
- #
1531
- # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig]
1532
- required :percent_config,
1533
- -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig }
1534
-
1535
1840
  # @!attribute billable_metric_id
1536
1841
  # The id of the billable metric for the price. Only needed if the price is
1537
1842
  # usage-based.
@@ -1563,11 +1868,7 @@ module Orb
1563
1868
  # The configuration for the rate of the price currency to the invoicing currency.
1564
1869
  #
1565
1870
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
1566
- optional :conversion_rate_config,
1567
- union: -> {
1568
- Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::ConversionRateConfig
1569
- },
1570
- nil?: true
1871
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1571
1872
 
1572
1873
  # @!attribute currency
1573
1874
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -1633,19 +1934,19 @@ module Orb
1633
1934
  # @return [String, nil]
1634
1935
  optional :reference_id, String, nil?: true
1635
1936
 
1636
- # @!method initialize(cadence:, item_id:, name:, percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :percent)
1937
+ # @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation)
1637
1938
  # Some parameter documentations has been truncated, see
1638
- # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent}
1939
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation}
1639
1940
  # for more details.
1640
1941
  #
1641
- # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence] The cadence to bill for this price on.
1942
+ # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on.
1943
+ #
1944
+ # @param cumulative_grouped_allocation_config [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing
1642
1945
  #
1643
1946
  # @param item_id [String] The id of the item the price will be associated with.
1644
1947
  #
1645
1948
  # @param name [String] The name of the price.
1646
1949
  #
1647
- # @param percent_config [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig] Configuration for percent pricing
1648
- #
1649
1950
  # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
1650
1951
  #
1651
1952
  # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
@@ -1674,11 +1975,11 @@ module Orb
1674
1975
  #
1675
1976
  # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
1676
1977
  #
1677
- # @param model_type [Symbol, :percent] The pricing model type
1978
+ # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type
1678
1979
 
1679
1980
  # The cadence to bill for this price on.
1680
1981
  #
1681
- # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent#cadence
1982
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation#cadence
1682
1983
  module Cadence
1683
1984
  extend Orb::Internal::Type::Enum
1684
1985
 
@@ -1693,35 +1994,59 @@ module Orb
1693
1994
  # @return [Array<Symbol>]
1694
1995
  end
1695
1996
 
1696
- # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent#percent_config
1697
- class PercentConfig < Orb::Internal::Type::BaseModel
1698
- # @!attribute percent
1699
- # What percent of the component subtotals to charge
1997
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config
1998
+ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel
1999
+ # @!attribute cumulative_allocation
2000
+ # The overall allocation across all groups
1700
2001
  #
1701
- # @return [Float]
1702
- required :percent, Float
2002
+ # @return [String]
2003
+ required :cumulative_allocation, String
1703
2004
 
1704
- # @!method initialize(percent:)
1705
- # Configuration for percent pricing
2005
+ # @!attribute group_allocation
2006
+ # The allocation per individual group
2007
+ #
2008
+ # @return [String]
2009
+ required :group_allocation, String
2010
+
2011
+ # @!attribute grouping_key
2012
+ # The event property used to group usage before applying allocations
2013
+ #
2014
+ # @return [String]
2015
+ required :grouping_key, String
2016
+
2017
+ # @!attribute unit_amount
2018
+ # The amount to charge for each unit outside of the allocation
2019
+ #
2020
+ # @return [String]
2021
+ required :unit_amount, String
2022
+
2023
+ # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:)
2024
+ # Configuration for cumulative_grouped_allocation pricing
2025
+ #
2026
+ # @param cumulative_allocation [String] The overall allocation across all groups
2027
+ #
2028
+ # @param group_allocation [String] The allocation per individual group
2029
+ #
2030
+ # @param grouping_key [String] The event property used to group usage before applying allocations
1706
2031
  #
1707
- # @param percent [Float] What percent of the component subtotals to charge
2032
+ # @param unit_amount [String] The amount to charge for each unit outside of the allocation
1708
2033
  end
1709
2034
  end
1710
2035
 
1711
- class EventOutput < Orb::Internal::Type::BaseModel
2036
+ class DailyCreditAllowance < Orb::Internal::Type::BaseModel
1712
2037
  # @!attribute cadence
1713
2038
  # The cadence to bill for this price on.
1714
2039
  #
1715
- # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence]
2040
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence]
1716
2041
  required :cadence,
1717
- enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence }
2042
+ enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence }
1718
2043
 
1719
- # @!attribute event_output_config
1720
- # Configuration for event_output pricing
2044
+ # @!attribute daily_credit_allowance_config
2045
+ # Configuration for daily_credit_allowance pricing
1721
2046
  #
1722
- # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig]
1723
- required :event_output_config,
1724
- -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig }
2047
+ # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig]
2048
+ required :daily_credit_allowance_config,
2049
+ -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig }
1725
2050
 
1726
2051
  # @!attribute item_id
1727
2052
  # The id of the item the price will be associated with.
@@ -1732,8 +2057,8 @@ module Orb
1732
2057
  # @!attribute model_type
1733
2058
  # The pricing model type
1734
2059
  #
1735
- # @return [Symbol, :event_output]
1736
- required :model_type, const: :event_output
2060
+ # @return [Symbol, :daily_credit_allowance]
2061
+ required :model_type, const: :daily_credit_allowance
1737
2062
 
1738
2063
  # @!attribute name
1739
2064
  # The name of the price.
@@ -1772,11 +2097,7 @@ module Orb
1772
2097
  # The configuration for the rate of the price currency to the invoicing currency.
1773
2098
  #
1774
2099
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
1775
- optional :conversion_rate_config,
1776
- union: -> {
1777
- Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::ConversionRateConfig
1778
- },
1779
- nil?: true
2100
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1780
2101
 
1781
2102
  # @!attribute currency
1782
2103
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -1842,14 +2163,14 @@ module Orb
1842
2163
  # @return [String, nil]
1843
2164
  optional :reference_id, String, nil?: true
1844
2165
 
1845
- # @!method initialize(cadence:, event_output_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :event_output)
2166
+ # @!method initialize(cadence:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance)
1846
2167
  # Some parameter documentations has been truncated, see
1847
- # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput}
2168
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance}
1848
2169
  # for more details.
1849
2170
  #
1850
- # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence] The cadence to bill for this price on.
2171
+ # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on.
1851
2172
  #
1852
- # @param event_output_config [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig] Configuration for event_output pricing
2173
+ # @param daily_credit_allowance_config [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing
1853
2174
  #
1854
2175
  # @param item_id [String] The id of the item the price will be associated with.
1855
2176
  #
@@ -1883,11 +2204,11 @@ module Orb
1883
2204
  #
1884
2205
  # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
1885
2206
  #
1886
- # @param model_type [Symbol, :event_output] The pricing model type
2207
+ # @param model_type [Symbol, :daily_credit_allowance] The pricing model type
1887
2208
 
1888
2209
  # The cadence to bill for this price on.
1889
2210
  #
1890
- # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput#cadence
2211
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance#cadence
1891
2212
  module Cadence
1892
2213
  extend Orb::Internal::Type::Enum
1893
2214
 
@@ -1902,326 +2223,2124 @@ module Orb
1902
2223
  # @return [Array<Symbol>]
1903
2224
  end
1904
2225
 
1905
- # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput#event_output_config
1906
- class EventOutputConfig < Orb::Internal::Type::BaseModel
1907
- # @!attribute unit_rating_key
1908
- # The key in the event data to extract the unit rate from.
2226
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance#daily_credit_allowance_config
2227
+ class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel
2228
+ # @!attribute daily_allowance
2229
+ # Credits granted per day. Lose-it-or-use-it; does not roll over.
1909
2230
  #
1910
2231
  # @return [String]
1911
- required :unit_rating_key, String
2232
+ required :daily_allowance, String
1912
2233
 
1913
- # @!attribute default_unit_rate
1914
- # If provided, this amount will be used as the unit rate when an event does not
1915
- # have a value for the `unit_rating_key`. If not provided, events missing a unit
1916
- # rate will be ignored.
2234
+ # @!attribute default_unit_amount
2235
+ # Default per-unit credit rate for any usage not bucketed into a specified
2236
+ # matrix_value
1917
2237
  #
1918
- # @return [String, nil]
1919
- optional :default_unit_rate, String, nil?: true
2238
+ # @return [String]
2239
+ required :default_unit_amount, String
1920
2240
 
1921
- # @!attribute grouping_key
1922
- # An optional key in the event data to group by (e.g., event ID). All events will
1923
- # also be grouped by their unit rate.
2241
+ # @!attribute dimensions
2242
+ # One or two event property values to evaluate matrix groups by
1924
2243
  #
1925
- # @return [String, nil]
1926
- optional :grouping_key, String, nil?: true
2244
+ # @return [Array<String, nil>]
2245
+ required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true]
1927
2246
 
1928
- # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil)
2247
+ # @!attribute event_day_property
2248
+ # Event property whose value identifies the day bucket the event belongs to (e.g.
2249
+ # 'event_day' set to an ISO date string in the customer's timezone). The allowance
2250
+ # resets per distinct value of this property.
2251
+ #
2252
+ # @return [String]
2253
+ required :event_day_property, String
2254
+
2255
+ # @!attribute matrix_values
2256
+ # Per-dimension credit rates
2257
+ #
2258
+ # @return [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue>]
2259
+ required :matrix_values,
2260
+ -> do
2261
+ Orb::Internal::Type::ArrayOf[
2262
+ Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue
2263
+ ]
2264
+ end
2265
+
2266
+ # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:)
1929
2267
  # Some parameter documentations has been truncated, see
1930
- # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig}
2268
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig}
1931
2269
  # for more details.
1932
2270
  #
1933
- # Configuration for event_output pricing
2271
+ # Configuration for daily_credit_allowance pricing
1934
2272
  #
1935
- # @param unit_rating_key [String] The key in the event data to extract the unit rate from.
2273
+ # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over.
1936
2274
  #
1937
- # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha
2275
+ # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified
2276
+ # matrix\_
1938
2277
  #
1939
- # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will
2278
+ # @param dimensions [Array<String, nil>] One or two event property values to evaluate matrix groups by
2279
+ #
2280
+ # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g.
2281
+ #
2282
+ # @param matrix_values [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue>] Per-dimension credit rates
2283
+
2284
+ class MatrixValue < Orb::Internal::Type::BaseModel
2285
+ # @!attribute dimension_values
2286
+ # One or two matrix keys to filter usage to this value by. For example, ["model"]
2287
+ # could be used to apply a different credit rate to each AI model.
2288
+ #
2289
+ # @return [Array<String, nil>]
2290
+ required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true]
2291
+
2292
+ # @!attribute unit_amount
2293
+ # Credits charged per unit of usage matching the specified dimension_values
2294
+ #
2295
+ # @return [String]
2296
+ required :unit_amount, String
2297
+
2298
+ # @!method initialize(dimension_values:, unit_amount:)
2299
+ # Some parameter documentations has been truncated, see
2300
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue}
2301
+ # for more details.
2302
+ #
2303
+ # Per-dimension credit price for the daily credit allowance model.
2304
+ #
2305
+ # @param dimension_values [Array<String, nil>] One or two matrix keys to filter usage to this value by. For example, ["model"]
2306
+ #
2307
+ # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values
2308
+ end
2309
+ end
2310
+ end
2311
+
2312
+ class MeteredAllowance < Orb::Internal::Type::BaseModel
2313
+ # @!attribute cadence
2314
+ # The cadence to bill for this price on.
2315
+ #
2316
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence]
2317
+ required :cadence,
2318
+ enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence }
2319
+
2320
+ # @!attribute item_id
2321
+ # The id of the item the price will be associated with.
2322
+ #
2323
+ # @return [String]
2324
+ required :item_id, String
2325
+
2326
+ # @!attribute metered_allowance_config
2327
+ # Configuration for metered_allowance pricing
2328
+ #
2329
+ # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig]
2330
+ required :metered_allowance_config,
2331
+ -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig }
2332
+
2333
+ # @!attribute model_type
2334
+ # The pricing model type
2335
+ #
2336
+ # @return [Symbol, :metered_allowance]
2337
+ required :model_type, const: :metered_allowance
2338
+
2339
+ # @!attribute name
2340
+ # The name of the price.
2341
+ #
2342
+ # @return [String]
2343
+ required :name, String
2344
+
2345
+ # @!attribute billable_metric_id
2346
+ # The id of the billable metric for the price. Only needed if the price is
2347
+ # usage-based.
2348
+ #
2349
+ # @return [String, nil]
2350
+ optional :billable_metric_id, String, nil?: true
2351
+
2352
+ # @!attribute billed_in_advance
2353
+ # If the Price represents a fixed cost, the price will be billed in-advance if
2354
+ # this is true, and in-arrears if this is false.
2355
+ #
2356
+ # @return [Boolean, nil]
2357
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
2358
+
2359
+ # @!attribute billing_cycle_configuration
2360
+ # For custom cadence: specifies the duration of the billing period in days or
2361
+ # months.
2362
+ #
2363
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
2364
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
2365
+
2366
+ # @!attribute conversion_rate
2367
+ # The per unit conversion rate of the price currency to the invoicing currency.
2368
+ #
2369
+ # @return [Float, nil]
2370
+ optional :conversion_rate, Float, nil?: true
2371
+
2372
+ # @!attribute conversion_rate_config
2373
+ # The configuration for the rate of the price currency to the invoicing currency.
2374
+ #
2375
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
2376
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
2377
+
2378
+ # @!attribute currency
2379
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
2380
+ # price is billed.
2381
+ #
2382
+ # @return [String, nil]
2383
+ optional :currency, String, nil?: true
2384
+
2385
+ # @!attribute dimensional_price_configuration
2386
+ # For dimensional price: specifies a price group and dimension values
2387
+ #
2388
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
2389
+ optional :dimensional_price_configuration,
2390
+ -> {
2391
+ Orb::NewDimensionalPriceConfiguration
2392
+ },
2393
+ nil?: true
2394
+
2395
+ # @!attribute external_price_id
2396
+ # An alias for the price.
2397
+ #
2398
+ # @return [String, nil]
2399
+ optional :external_price_id, String, nil?: true
2400
+
2401
+ # @!attribute fixed_price_quantity
2402
+ # If the Price represents a fixed cost, this represents the quantity of units
2403
+ # applied.
2404
+ #
2405
+ # @return [Float, nil]
2406
+ optional :fixed_price_quantity, Float, nil?: true
2407
+
2408
+ # @!attribute invoice_grouping_key
2409
+ # The property used to group this price on an invoice
2410
+ #
2411
+ # @return [String, nil]
2412
+ optional :invoice_grouping_key, String, nil?: true
2413
+
2414
+ # @!attribute invoicing_cycle_configuration
2415
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
2416
+ # If unspecified, a single invoice is produced per billing cycle.
2417
+ #
2418
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
2419
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
2420
+
2421
+ # @!attribute license_type_id
2422
+ # The ID of the license type to associate with this price.
2423
+ #
2424
+ # @return [String, nil]
2425
+ optional :license_type_id, String, nil?: true
2426
+
2427
+ # @!attribute metadata
2428
+ # User-specified key/value pairs for the resource. Individual keys can be removed
2429
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
2430
+ # by setting `metadata` to `null`.
2431
+ #
2432
+ # @return [Hash{Symbol=>String, nil}, nil]
2433
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
2434
+
2435
+ # @!attribute reference_id
2436
+ # A transient ID that can be used to reference this price when adding adjustments
2437
+ # in the same API call.
2438
+ #
2439
+ # @return [String, nil]
2440
+ optional :reference_id, String, nil?: true
2441
+
2442
+ # @!method initialize(cadence:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance)
2443
+ # Some parameter documentations has been truncated, see
2444
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance}
2445
+ # for more details.
2446
+ #
2447
+ # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::Cadence] The cadence to bill for this price on.
2448
+ #
2449
+ # @param item_id [String] The id of the item the price will be associated with.
2450
+ #
2451
+ # @param metered_allowance_config [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing
2452
+ #
2453
+ # @param name [String] The name of the price.
2454
+ #
2455
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
2456
+ #
2457
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
2458
+ #
2459
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
2460
+ #
2461
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
2462
+ #
2463
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
2464
+ #
2465
+ # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr
2466
+ #
2467
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
2468
+ #
2469
+ # @param external_price_id [String, nil] An alias for the price.
2470
+ #
2471
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
2472
+ #
2473
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
2474
+ #
2475
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
2476
+ #
2477
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
2478
+ #
2479
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
2480
+ #
2481
+ # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
2482
+ #
2483
+ # @param model_type [Symbol, :metered_allowance] The pricing model type
2484
+
2485
+ # The cadence to bill for this price on.
2486
+ #
2487
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance#cadence
2488
+ module Cadence
2489
+ extend Orb::Internal::Type::Enum
2490
+
2491
+ ANNUAL = :annual
2492
+ SEMI_ANNUAL = :semi_annual
2493
+ MONTHLY = :monthly
2494
+ QUARTERLY = :quarterly
2495
+ ONE_TIME = :one_time
2496
+ CUSTOM = :custom
2497
+
2498
+ # @!method self.values
2499
+ # @return [Array<Symbol>]
2500
+ end
2501
+
2502
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance#metered_allowance_config
2503
+ class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel
2504
+ # @!attribute allowance_grouping_value
2505
+ # The grouping_key value whose summed quantity represents the allowance for this
2506
+ # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
2507
+ # — credit can never exceed actual usage.
2508
+ #
2509
+ # @return [String]
2510
+ required :allowance_grouping_value, String
2511
+
2512
+ # @!attribute consumption_grouping_value
2513
+ # The grouping_key value whose summed quantity represents consumption (e.g.
2514
+ # 'download'). Charged at unit_amount.
2515
+ #
2516
+ # @return [String]
2517
+ required :consumption_grouping_value, String
2518
+
2519
+ # @!attribute grouping_key
2520
+ # Event property used to partition the metric into consumption and allowance
2521
+ # quantities (e.g. 'event_name'). The metric is queried with this key and the two
2522
+ # values below select which partition is which.
2523
+ #
2524
+ # @return [String]
2525
+ required :grouping_key, String
2526
+
2527
+ # @!attribute unit_amount
2528
+ # Per-unit price applied to gross consumption and to the allowance credit.
2529
+ #
2530
+ # @return [String]
2531
+ required :unit_amount, String
2532
+
2533
+ # @!attribute allowance_display_name
2534
+ # Sub-line label for the credit row (e.g. 'Up to 3x free egress').
2535
+ #
2536
+ # @return [String, nil]
2537
+ optional :allowance_display_name, String
2538
+
2539
+ # @!attribute consumption_display_name
2540
+ # Sub-line label for the gross consumption row (e.g. 'bytes gotten').
2541
+ #
2542
+ # @return [String, nil]
2543
+ optional :consumption_display_name, String
2544
+
2545
+ # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil)
2546
+ # Some parameter documentations has been truncated, see
2547
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig}
2548
+ # for more details.
2549
+ #
2550
+ # Configuration for metered_allowance pricing
2551
+ #
2552
+ # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p
2553
+ #
2554
+ # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl
2555
+ #
2556
+ # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant
2557
+ #
2558
+ # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit.
2559
+ #
2560
+ # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress').
2561
+ #
2562
+ # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten').
2563
+ end
2564
+ end
2565
+
2566
+ class Percent < Orb::Internal::Type::BaseModel
2567
+ # @!attribute cadence
2568
+ # The cadence to bill for this price on.
2569
+ #
2570
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence]
2571
+ required :cadence,
2572
+ enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence }
2573
+
2574
+ # @!attribute item_id
2575
+ # The id of the item the price will be associated with.
2576
+ #
2577
+ # @return [String]
2578
+ required :item_id, String
2579
+
2580
+ # @!attribute model_type
2581
+ # The pricing model type
2582
+ #
2583
+ # @return [Symbol, :percent]
2584
+ required :model_type, const: :percent
2585
+
2586
+ # @!attribute name
2587
+ # The name of the price.
2588
+ #
2589
+ # @return [String]
2590
+ required :name, String
2591
+
2592
+ # @!attribute percent_config
2593
+ # Configuration for percent pricing
2594
+ #
2595
+ # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig]
2596
+ required :percent_config,
2597
+ -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig }
2598
+
2599
+ # @!attribute billable_metric_id
2600
+ # The id of the billable metric for the price. Only needed if the price is
2601
+ # usage-based.
2602
+ #
2603
+ # @return [String, nil]
2604
+ optional :billable_metric_id, String, nil?: true
2605
+
2606
+ # @!attribute billed_in_advance
2607
+ # If the Price represents a fixed cost, the price will be billed in-advance if
2608
+ # this is true, and in-arrears if this is false.
2609
+ #
2610
+ # @return [Boolean, nil]
2611
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
2612
+
2613
+ # @!attribute billing_cycle_configuration
2614
+ # For custom cadence: specifies the duration of the billing period in days or
2615
+ # months.
2616
+ #
2617
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
2618
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
2619
+
2620
+ # @!attribute conversion_rate
2621
+ # The per unit conversion rate of the price currency to the invoicing currency.
2622
+ #
2623
+ # @return [Float, nil]
2624
+ optional :conversion_rate, Float, nil?: true
2625
+
2626
+ # @!attribute conversion_rate_config
2627
+ # The configuration for the rate of the price currency to the invoicing currency.
2628
+ #
2629
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
2630
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
2631
+
2632
+ # @!attribute currency
2633
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
2634
+ # price is billed.
2635
+ #
2636
+ # @return [String, nil]
2637
+ optional :currency, String, nil?: true
2638
+
2639
+ # @!attribute dimensional_price_configuration
2640
+ # For dimensional price: specifies a price group and dimension values
2641
+ #
2642
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
2643
+ optional :dimensional_price_configuration,
2644
+ -> {
2645
+ Orb::NewDimensionalPriceConfiguration
2646
+ },
2647
+ nil?: true
2648
+
2649
+ # @!attribute external_price_id
2650
+ # An alias for the price.
2651
+ #
2652
+ # @return [String, nil]
2653
+ optional :external_price_id, String, nil?: true
2654
+
2655
+ # @!attribute fixed_price_quantity
2656
+ # If the Price represents a fixed cost, this represents the quantity of units
2657
+ # applied.
2658
+ #
2659
+ # @return [Float, nil]
2660
+ optional :fixed_price_quantity, Float, nil?: true
2661
+
2662
+ # @!attribute invoice_grouping_key
2663
+ # The property used to group this price on an invoice
2664
+ #
2665
+ # @return [String, nil]
2666
+ optional :invoice_grouping_key, String, nil?: true
2667
+
2668
+ # @!attribute invoicing_cycle_configuration
2669
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
2670
+ # If unspecified, a single invoice is produced per billing cycle.
2671
+ #
2672
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
2673
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
2674
+
2675
+ # @!attribute license_type_id
2676
+ # The ID of the license type to associate with this price.
2677
+ #
2678
+ # @return [String, nil]
2679
+ optional :license_type_id, String, nil?: true
2680
+
2681
+ # @!attribute metadata
2682
+ # User-specified key/value pairs for the resource. Individual keys can be removed
2683
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
2684
+ # by setting `metadata` to `null`.
2685
+ #
2686
+ # @return [Hash{Symbol=>String, nil}, nil]
2687
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
2688
+
2689
+ # @!attribute reference_id
2690
+ # A transient ID that can be used to reference this price when adding adjustments
2691
+ # in the same API call.
2692
+ #
2693
+ # @return [String, nil]
2694
+ optional :reference_id, String, nil?: true
2695
+
2696
+ # @!method initialize(cadence:, item_id:, name:, percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :percent)
2697
+ # Some parameter documentations has been truncated, see
2698
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent}
2699
+ # for more details.
2700
+ #
2701
+ # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::Cadence] The cadence to bill for this price on.
2702
+ #
2703
+ # @param item_id [String] The id of the item the price will be associated with.
2704
+ #
2705
+ # @param name [String] The name of the price.
2706
+ #
2707
+ # @param percent_config [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig] Configuration for percent pricing
2708
+ #
2709
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
2710
+ #
2711
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
2712
+ #
2713
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
2714
+ #
2715
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
2716
+ #
2717
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
2718
+ #
2719
+ # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr
2720
+ #
2721
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
2722
+ #
2723
+ # @param external_price_id [String, nil] An alias for the price.
2724
+ #
2725
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
2726
+ #
2727
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
2728
+ #
2729
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
2730
+ #
2731
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
2732
+ #
2733
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
2734
+ #
2735
+ # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
2736
+ #
2737
+ # @param model_type [Symbol, :percent] The pricing model type
2738
+
2739
+ # The cadence to bill for this price on.
2740
+ #
2741
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent#cadence
2742
+ module Cadence
2743
+ extend Orb::Internal::Type::Enum
2744
+
2745
+ ANNUAL = :annual
2746
+ SEMI_ANNUAL = :semi_annual
2747
+ MONTHLY = :monthly
2748
+ QUARTERLY = :quarterly
2749
+ ONE_TIME = :one_time
2750
+ CUSTOM = :custom
2751
+
2752
+ # @!method self.values
2753
+ # @return [Array<Symbol>]
2754
+ end
2755
+
2756
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent#percent_config
2757
+ class PercentConfig < Orb::Internal::Type::BaseModel
2758
+ # @!attribute percent
2759
+ # Fraction of the component subtotals to charge (0 < percent <= 1).
2760
+ #
2761
+ # @return [Float]
2762
+ required :percent, Float
2763
+
2764
+ # @!attribute maximum_amount
2765
+ # Maximum amount to charge. If unset, the fee has no upper bound.
2766
+ #
2767
+ # @return [String, nil]
2768
+ optional :maximum_amount, String, nil?: true
2769
+
2770
+ # @!attribute minimum_amount
2771
+ # Minimum amount to charge. If unset, the fee is bounded below by 0.
2772
+ #
2773
+ # @return [String, nil]
2774
+ optional :minimum_amount, String, nil?: true
2775
+
2776
+ # @!attribute prorated
2777
+ # If true, the minimum_amount is prorated based on the service period. The
2778
+ # maximum_amount is an absolute cap (never prorated), and the percent applied to
2779
+ # upstream subtotals is never prorated either.
2780
+ #
2781
+ # @return [Boolean, nil]
2782
+ optional :prorated, Orb::Internal::Type::Boolean
2783
+
2784
+ # @!method initialize(percent:, maximum_amount: nil, minimum_amount: nil, prorated: nil)
2785
+ # Some parameter documentations has been truncated, see
2786
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent::PercentConfig}
2787
+ # for more details.
2788
+ #
2789
+ # Configuration for percent pricing
2790
+ #
2791
+ # @param percent [Float] Fraction of the component subtotals to charge (0 < percent <= 1).
2792
+ #
2793
+ # @param maximum_amount [String, nil] Maximum amount to charge. If unset, the fee has no upper bound.
2794
+ #
2795
+ # @param minimum_amount [String, nil] Minimum amount to charge. If unset, the fee is bounded below by 0.
2796
+ #
2797
+ # @param prorated [Boolean] If true, the minimum_amount is prorated based on the service period. The maximum
2798
+ end
2799
+ end
2800
+
2801
+ class EventOutput < Orb::Internal::Type::BaseModel
2802
+ # @!attribute cadence
2803
+ # The cadence to bill for this price on.
2804
+ #
2805
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence]
2806
+ required :cadence,
2807
+ enum: -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence }
2808
+
2809
+ # @!attribute event_output_config
2810
+ # Configuration for event_output pricing
2811
+ #
2812
+ # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig]
2813
+ required :event_output_config,
2814
+ -> { Orb::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig }
2815
+
2816
+ # @!attribute item_id
2817
+ # The id of the item the price will be associated with.
2818
+ #
2819
+ # @return [String]
2820
+ required :item_id, String
2821
+
2822
+ # @!attribute model_type
2823
+ # The pricing model type
2824
+ #
2825
+ # @return [Symbol, :event_output]
2826
+ required :model_type, const: :event_output
2827
+
2828
+ # @!attribute name
2829
+ # The name of the price.
2830
+ #
2831
+ # @return [String]
2832
+ required :name, String
2833
+
2834
+ # @!attribute billable_metric_id
2835
+ # The id of the billable metric for the price. Only needed if the price is
2836
+ # usage-based.
2837
+ #
2838
+ # @return [String, nil]
2839
+ optional :billable_metric_id, String, nil?: true
2840
+
2841
+ # @!attribute billed_in_advance
2842
+ # If the Price represents a fixed cost, the price will be billed in-advance if
2843
+ # this is true, and in-arrears if this is false.
2844
+ #
2845
+ # @return [Boolean, nil]
2846
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
2847
+
2848
+ # @!attribute billing_cycle_configuration
2849
+ # For custom cadence: specifies the duration of the billing period in days or
2850
+ # months.
2851
+ #
2852
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
2853
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
2854
+
2855
+ # @!attribute conversion_rate
2856
+ # The per unit conversion rate of the price currency to the invoicing currency.
2857
+ #
2858
+ # @return [Float, nil]
2859
+ optional :conversion_rate, Float, nil?: true
2860
+
2861
+ # @!attribute conversion_rate_config
2862
+ # The configuration for the rate of the price currency to the invoicing currency.
2863
+ #
2864
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
2865
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
2866
+
2867
+ # @!attribute currency
2868
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
2869
+ # price is billed.
2870
+ #
2871
+ # @return [String, nil]
2872
+ optional :currency, String, nil?: true
2873
+
2874
+ # @!attribute dimensional_price_configuration
2875
+ # For dimensional price: specifies a price group and dimension values
2876
+ #
2877
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
2878
+ optional :dimensional_price_configuration,
2879
+ -> {
2880
+ Orb::NewDimensionalPriceConfiguration
2881
+ },
2882
+ nil?: true
2883
+
2884
+ # @!attribute external_price_id
2885
+ # An alias for the price.
2886
+ #
2887
+ # @return [String, nil]
2888
+ optional :external_price_id, String, nil?: true
2889
+
2890
+ # @!attribute fixed_price_quantity
2891
+ # If the Price represents a fixed cost, this represents the quantity of units
2892
+ # applied.
2893
+ #
2894
+ # @return [Float, nil]
2895
+ optional :fixed_price_quantity, Float, nil?: true
2896
+
2897
+ # @!attribute invoice_grouping_key
2898
+ # The property used to group this price on an invoice
2899
+ #
2900
+ # @return [String, nil]
2901
+ optional :invoice_grouping_key, String, nil?: true
2902
+
2903
+ # @!attribute invoicing_cycle_configuration
2904
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
2905
+ # If unspecified, a single invoice is produced per billing cycle.
2906
+ #
2907
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
2908
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
2909
+
2910
+ # @!attribute license_type_id
2911
+ # The ID of the license type to associate with this price.
2912
+ #
2913
+ # @return [String, nil]
2914
+ optional :license_type_id, String, nil?: true
2915
+
2916
+ # @!attribute metadata
2917
+ # User-specified key/value pairs for the resource. Individual keys can be removed
2918
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
2919
+ # by setting `metadata` to `null`.
2920
+ #
2921
+ # @return [Hash{Symbol=>String, nil}, nil]
2922
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
2923
+
2924
+ # @!attribute reference_id
2925
+ # A transient ID that can be used to reference this price when adding adjustments
2926
+ # in the same API call.
2927
+ #
2928
+ # @return [String, nil]
2929
+ optional :reference_id, String, nil?: true
2930
+
2931
+ # @!method initialize(cadence:, event_output_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :event_output)
2932
+ # Some parameter documentations has been truncated, see
2933
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput}
2934
+ # for more details.
2935
+ #
2936
+ # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::Cadence] The cadence to bill for this price on.
2937
+ #
2938
+ # @param event_output_config [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig] Configuration for event_output pricing
2939
+ #
2940
+ # @param item_id [String] The id of the item the price will be associated with.
2941
+ #
2942
+ # @param name [String] The name of the price.
2943
+ #
2944
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
2945
+ #
2946
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
2947
+ #
2948
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
2949
+ #
2950
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
2951
+ #
2952
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
2953
+ #
2954
+ # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr
2955
+ #
2956
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
2957
+ #
2958
+ # @param external_price_id [String, nil] An alias for the price.
2959
+ #
2960
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
2961
+ #
2962
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
2963
+ #
2964
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
2965
+ #
2966
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
2967
+ #
2968
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
2969
+ #
2970
+ # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
2971
+ #
2972
+ # @param model_type [Symbol, :event_output] The pricing model type
2973
+
2974
+ # The cadence to bill for this price on.
2975
+ #
2976
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput#cadence
2977
+ module Cadence
2978
+ extend Orb::Internal::Type::Enum
2979
+
2980
+ ANNUAL = :annual
2981
+ SEMI_ANNUAL = :semi_annual
2982
+ MONTHLY = :monthly
2983
+ QUARTERLY = :quarterly
2984
+ ONE_TIME = :one_time
2985
+ CUSTOM = :custom
2986
+
2987
+ # @!method self.values
2988
+ # @return [Array<Symbol>]
2989
+ end
2990
+
2991
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput#event_output_config
2992
+ class EventOutputConfig < Orb::Internal::Type::BaseModel
2993
+ # @!attribute unit_rating_key
2994
+ # The key in the event data to extract the unit rate from.
2995
+ #
2996
+ # @return [String]
2997
+ required :unit_rating_key, String
2998
+
2999
+ # @!attribute default_unit_rate
3000
+ # If provided, this amount will be used as the unit rate when an event does not
3001
+ # have a value for the `unit_rating_key`. If not provided, events missing a unit
3002
+ # rate will be ignored.
3003
+ #
3004
+ # @return [String, nil]
3005
+ optional :default_unit_rate, String, nil?: true
3006
+
3007
+ # @!attribute grouping_key
3008
+ # An optional key in the event data to group by (e.g., event ID). All events will
3009
+ # also be grouped by their unit rate.
3010
+ #
3011
+ # @return [String, nil]
3012
+ optional :grouping_key, String, nil?: true
3013
+
3014
+ # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil)
3015
+ # Some parameter documentations has been truncated, see
3016
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput::EventOutputConfig}
3017
+ # for more details.
3018
+ #
3019
+ # Configuration for event_output pricing
3020
+ #
3021
+ # @param unit_rating_key [String] The key in the event data to extract the unit rate from.
3022
+ #
3023
+ # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha
3024
+ #
3025
+ # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will
3026
+ end
3027
+ end
3028
+
3029
+ # @!method self.variants
3030
+ # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput)]
3031
+ end
3032
+ end
3033
+
3034
+ # Reset billing periods to be aligned with the plan change's effective date or
3035
+ # start of the month. Defaults to `unchanged` which keeps subscription's existing
3036
+ # billing cycle alignment.
3037
+ module BillingCycleAlignment
3038
+ extend Orb::Internal::Type::Enum
3039
+
3040
+ UNCHANGED = :unchanged
3041
+ PLAN_CHANGE_DATE = :plan_change_date
3042
+ START_OF_MONTH = :start_of_month
3043
+
3044
+ # @!method self.values
3045
+ # @return [Array<Symbol>]
3046
+ end
3047
+
3048
+ class RemoveAdjustment < Orb::Internal::Type::BaseModel
3049
+ # @!attribute adjustment_id
3050
+ # The id of the adjustment to remove on the subscription.
3051
+ #
3052
+ # @return [String]
3053
+ required :adjustment_id, String
3054
+
3055
+ # @!method initialize(adjustment_id:)
3056
+ # @param adjustment_id [String] The id of the adjustment to remove on the subscription.
3057
+ end
3058
+
3059
+ class RemovePrice < Orb::Internal::Type::BaseModel
3060
+ # @!attribute external_price_id
3061
+ # The external price id of the price to remove on the subscription.
3062
+ #
3063
+ # @return [String, nil]
3064
+ optional :external_price_id, String, nil?: true
3065
+
3066
+ # @!attribute price_id
3067
+ # The id of the price to remove on the subscription.
3068
+ #
3069
+ # @return [String, nil]
3070
+ optional :price_id, String, nil?: true
3071
+
3072
+ # @!method initialize(external_price_id: nil, price_id: nil)
3073
+ # @param external_price_id [String, nil] The external price id of the price to remove on the subscription.
3074
+ #
3075
+ # @param price_id [String, nil] The id of the price to remove on the subscription.
3076
+ end
3077
+
3078
+ class ReplaceAdjustment < Orb::Internal::Type::BaseModel
3079
+ # @!attribute adjustment
3080
+ # The definition of a new adjustment to create and add to the subscription.
3081
+ #
3082
+ # @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount]
3083
+ required :adjustment,
3084
+ union: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment }
3085
+
3086
+ # @!attribute replaces_adjustment_id
3087
+ # The id of the adjustment on the plan to replace in the subscription.
3088
+ #
3089
+ # @return [String]
3090
+ required :replaces_adjustment_id, String
3091
+
3092
+ # @!method initialize(adjustment:, replaces_adjustment_id:)
3093
+ # @param adjustment [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount] The definition of a new adjustment to create and add to the subscription.
3094
+ #
3095
+ # @param replaces_adjustment_id [String] The id of the adjustment on the plan to replace in the subscription.
3096
+
3097
+ # The definition of a new adjustment to create and add to the subscription.
3098
+ #
3099
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment#adjustment
3100
+ module Adjustment
3101
+ extend Orb::Internal::Type::Union
3102
+
3103
+ discriminator :adjustment_type
3104
+
3105
+ variant :percentage_discount, -> { Orb::NewPercentageDiscount }
3106
+
3107
+ variant :usage_discount, -> { Orb::NewUsageDiscount }
3108
+
3109
+ variant :amount_discount, -> { Orb::NewAmountDiscount }
3110
+
3111
+ variant :minimum, -> { Orb::NewMinimum }
3112
+
3113
+ variant :maximum, -> { Orb::NewMaximum }
3114
+
3115
+ variant :tiered_percentage_discount,
3116
+ -> { Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount }
3117
+
3118
+ class TieredPercentageDiscount < Orb::Internal::Type::BaseModel
3119
+ # @!attribute adjustment_type
3120
+ #
3121
+ # @return [Symbol, :tiered_percentage_discount]
3122
+ required :adjustment_type, const: :tiered_percentage_discount
3123
+
3124
+ # @!attribute tiers
3125
+ #
3126
+ # @return [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Tier>]
3127
+ required :tiers,
3128
+ -> { Orb::Internal::Type::ArrayOf[Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Tier] }
3129
+
3130
+ # @!attribute applies_to_all
3131
+ # If set, the adjustment will apply to every price on the subscription.
3132
+ #
3133
+ # @return [Boolean, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::AppliesToAll, nil]
3134
+ optional :applies_to_all,
3135
+ enum: -> {
3136
+ Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::AppliesToAll
3137
+ },
3138
+ nil?: true
3139
+
3140
+ # @!attribute applies_to_item_ids
3141
+ # The set of item IDs to which this adjustment applies.
3142
+ #
3143
+ # @return [Array<String>, nil]
3144
+ optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
3145
+
3146
+ # @!attribute applies_to_price_ids
3147
+ # The set of price IDs to which this adjustment applies.
3148
+ #
3149
+ # @return [Array<String>, nil]
3150
+ optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
3151
+
3152
+ # @!attribute currency
3153
+ # If set, only prices in the specified currency will have the adjustment applied.
3154
+ #
3155
+ # @return [String, nil]
3156
+ optional :currency, String, nil?: true
3157
+
3158
+ # @!attribute filters
3159
+ # A list of filters that determine which prices this adjustment will apply to.
3160
+ #
3161
+ # @return [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter>, nil]
3162
+ optional :filters,
3163
+ -> {
3164
+ Orb::Internal::Type::ArrayOf[Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter]
3165
+ },
3166
+ nil?: true
3167
+
3168
+ # @!attribute is_invoice_level
3169
+ # When false, this adjustment will be applied to a single price. Otherwise, it
3170
+ # will be applied at the invoice level, possibly to multiple prices.
3171
+ #
3172
+ # @return [Boolean, nil]
3173
+ optional :is_invoice_level, Orb::Internal::Type::Boolean
3174
+
3175
+ # @!attribute price_type
3176
+ # If set, only prices of the specified type will have the adjustment applied.
3177
+ #
3178
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::PriceType, nil]
3179
+ optional :price_type,
3180
+ enum: -> {
3181
+ Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::PriceType
3182
+ },
3183
+ nil?: true
3184
+
3185
+ # @!method initialize(tiers:, applies_to_all: nil, applies_to_item_ids: nil, applies_to_price_ids: nil, currency: nil, filters: nil, is_invoice_level: nil, price_type: nil, adjustment_type: :tiered_percentage_discount)
3186
+ # Some parameter documentations has been truncated, see
3187
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount}
3188
+ # for more details.
3189
+ #
3190
+ # @param tiers [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Tier>]
3191
+ #
3192
+ # @param applies_to_all [Boolean, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
3193
+ #
3194
+ # @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
3195
+ #
3196
+ # @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
3197
+ #
3198
+ # @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
3199
+ #
3200
+ # @param filters [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
3201
+ #
3202
+ # @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
3203
+ #
3204
+ # @param price_type [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
3205
+ #
3206
+ # @param adjustment_type [Symbol, :tiered_percentage_discount]
3207
+
3208
+ class Tier < Orb::Internal::Type::BaseModel
3209
+ # @!attribute lower_bound
3210
+ # Exclusive lower bound of cumulative spend for this tier.
3211
+ #
3212
+ # @return [Float]
3213
+ required :lower_bound, Float
3214
+
3215
+ # @!attribute percentage
3216
+ # The percentage (0-1) discounted from spend in this tier.
3217
+ #
3218
+ # @return [Float]
3219
+ required :percentage, Float
3220
+
3221
+ # @!attribute upper_bound
3222
+ # Inclusive upper bound of cumulative spend; null for the final open-ended tier.
3223
+ #
3224
+ # @return [Float, nil]
3225
+ optional :upper_bound, Float, nil?: true
3226
+
3227
+ # @!method initialize(lower_bound:, percentage:, upper_bound: nil)
3228
+ # @param lower_bound [Float] Exclusive lower bound of cumulative spend for this tier.
3229
+ #
3230
+ # @param percentage [Float] The percentage (0-1) discounted from spend in this tier.
3231
+ #
3232
+ # @param upper_bound [Float, nil] Inclusive upper bound of cumulative spend; null for the final open-ended tier.
3233
+ end
3234
+
3235
+ # If set, the adjustment will apply to every price on the subscription.
3236
+ #
3237
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount#applies_to_all
3238
+ module AppliesToAll
3239
+ extend Orb::Internal::Type::Enum
3240
+
3241
+ TRUE = true
3242
+
3243
+ # @!method self.values
3244
+ # @return [Array<Boolean>]
3245
+ end
3246
+
3247
+ class Filter < Orb::Internal::Type::BaseModel
3248
+ # @!attribute field
3249
+ # The property of the price to filter on.
3250
+ #
3251
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter::Field]
3252
+ required :field,
3253
+ enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter::Field }
3254
+
3255
+ # @!attribute operator
3256
+ # Should prices that match the filter be included or excluded.
3257
+ #
3258
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter::Operator]
3259
+ required :operator,
3260
+ enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter::Operator }
3261
+
3262
+ # @!attribute values
3263
+ # The IDs or values that match this filter.
3264
+ #
3265
+ # @return [Array<String>]
3266
+ required :values, Orb::Internal::Type::ArrayOf[String]
3267
+
3268
+ # @!method initialize(field:, operator:, values:)
3269
+ # @param field [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter::Field] The property of the price to filter on.
3270
+ #
3271
+ # @param operator [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
3272
+ #
3273
+ # @param values [Array<String>] The IDs or values that match this filter.
3274
+
3275
+ # The property of the price to filter on.
3276
+ #
3277
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter#field
3278
+ module Field
3279
+ extend Orb::Internal::Type::Enum
3280
+
3281
+ PRICE_ID = :price_id
3282
+ ITEM_ID = :item_id
3283
+ PRICE_TYPE = :price_type
3284
+ CURRENCY = :currency
3285
+ PRICING_UNIT_ID = :pricing_unit_id
3286
+
3287
+ # @!method self.values
3288
+ # @return [Array<Symbol>]
3289
+ end
3290
+
3291
+ # Should prices that match the filter be included or excluded.
3292
+ #
3293
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter#operator
3294
+ module Operator
3295
+ extend Orb::Internal::Type::Enum
3296
+
3297
+ INCLUDES = :includes
3298
+ EXCLUDES = :excludes
3299
+
3300
+ # @!method self.values
3301
+ # @return [Array<Symbol>]
3302
+ end
3303
+ end
3304
+
3305
+ # If set, only prices of the specified type will have the adjustment applied.
3306
+ #
3307
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount#price_type
3308
+ module PriceType
3309
+ extend Orb::Internal::Type::Enum
3310
+
3311
+ USAGE = :usage
3312
+ FIXED_IN_ADVANCE = :fixed_in_advance
3313
+ FIXED_IN_ARREARS = :fixed_in_arrears
3314
+ FIXED = :fixed
3315
+ IN_ARREARS = :in_arrears
3316
+
3317
+ # @!method self.values
3318
+ # @return [Array<Symbol>]
1940
3319
  end
1941
3320
  end
1942
3321
 
1943
3322
  # @!method self.variants
1944
- # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::EventOutput)]
3323
+ # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount)]
1945
3324
  end
1946
3325
  end
1947
3326
 
1948
- # Reset billing periods to be aligned with the plan change's effective date or
1949
- # start of the month. Defaults to `unchanged` which keeps subscription's existing
1950
- # billing cycle alignment.
1951
- module BillingCycleAlignment
1952
- extend Orb::Internal::Type::Enum
3327
+ class ReplacePrice < Orb::Internal::Type::BaseModel
3328
+ # @!attribute replaces_price_id
3329
+ # The id of the price on the plan to replace in the subscription.
3330
+ #
3331
+ # @return [String]
3332
+ required :replaces_price_id, String
3333
+
3334
+ # @!attribute allocation_price
3335
+ # The definition of a new allocation price to create and add to the subscription.
3336
+ #
3337
+ # @return [Orb::Models::NewAllocationPrice, nil]
3338
+ optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true
3339
+
3340
+ # @!attribute discounts
3341
+ # @deprecated
3342
+ #
3343
+ # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the
3344
+ # replacement price.
3345
+ #
3346
+ # @return [Array<Orb::Models::DiscountOverride>, nil]
3347
+ optional :discounts, -> { Orb::Internal::Type::ArrayOf[Orb::DiscountOverride] }, nil?: true
3348
+
3349
+ # @!attribute external_price_id
3350
+ # The external price id of the price to add to the subscription.
3351
+ #
3352
+ # @return [String, nil]
3353
+ optional :external_price_id, String, nil?: true
3354
+
3355
+ # @!attribute fixed_price_quantity
3356
+ # The new quantity of the price, if the price is a fixed price.
3357
+ #
3358
+ # @return [Float, nil]
3359
+ optional :fixed_price_quantity, Float, nil?: true
3360
+
3361
+ # @!attribute maximum_amount
3362
+ # @deprecated
3363
+ #
3364
+ # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for
3365
+ # the replacement price.
3366
+ #
3367
+ # @return [String, nil]
3368
+ optional :maximum_amount, String, nil?: true
3369
+
3370
+ # @!attribute metric_parameter_overrides
3371
+ # Override values for parameterized billable metric variables. Keys are parameter
3372
+ # names, values are the override values.
3373
+ #
3374
+ # @return [Hash{Symbol=>Object}, nil]
3375
+ optional :metric_parameter_overrides,
3376
+ Orb::Internal::Type::HashOf[Orb::Internal::Type::Unknown],
3377
+ nil?: true
3378
+
3379
+ # @!attribute minimum_amount
3380
+ # @deprecated
3381
+ #
3382
+ # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for
3383
+ # the replacement price.
3384
+ #
3385
+ # @return [String, nil]
3386
+ optional :minimum_amount, String, nil?: true
3387
+
3388
+ # @!attribute price
3389
+ # New subscription price request body params.
3390
+ #
3391
+ # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput, nil]
3392
+ optional :price,
3393
+ union: -> {
3394
+ Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price
3395
+ },
3396
+ nil?: true
3397
+
3398
+ # @!attribute price_id
3399
+ # The id of the price to add to the subscription.
3400
+ #
3401
+ # @return [String, nil]
3402
+ optional :price_id, String, nil?: true
3403
+
3404
+ # @!method initialize(replaces_price_id:, allocation_price: nil, discounts: nil, external_price_id: nil, fixed_price_quantity: nil, maximum_amount: nil, metric_parameter_overrides: nil, minimum_amount: nil, price: nil, price_id: nil)
3405
+ # Some parameter documentations has been truncated, see
3406
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice} for more
3407
+ # details.
3408
+ #
3409
+ # @param replaces_price_id [String] The id of the price on the plan to replace in the subscription.
3410
+ #
3411
+ # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The definition of a new allocation price to create and add to the subscription.
3412
+ #
3413
+ # @param discounts [Array<Orb::Models::DiscountOverride>, nil] [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the r
3414
+ #
3415
+ # @param external_price_id [String, nil] The external price id of the price to add to the subscription.
3416
+ #
3417
+ # @param fixed_price_quantity [Float, nil] The new quantity of the price, if the price is a fixed price.
3418
+ #
3419
+ # @param maximum_amount [String, nil] [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for
3420
+ #
3421
+ # @param metric_parameter_overrides [Hash{Symbol=>Object}, nil] Override values for parameterized billable metric variables. Keys are parameter
3422
+ #
3423
+ # @param minimum_amount [String, nil] [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for
3424
+ #
3425
+ # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput, nil] New subscription price request body params.
3426
+ #
3427
+ # @param price_id [String, nil] The id of the price to add to the subscription.
3428
+
3429
+ # New subscription price request body params.
3430
+ #
3431
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice#price
3432
+ module Price
3433
+ extend Orb::Internal::Type::Union
3434
+
3435
+ discriminator :model_type
3436
+
3437
+ variant :unit, -> { Orb::NewSubscriptionUnitPrice }
3438
+
3439
+ variant :tiered, -> { Orb::NewSubscriptionTieredPrice }
3440
+
3441
+ variant :bulk, -> { Orb::NewSubscriptionBulkPrice }
3442
+
3443
+ variant :bulk_with_filters,
3444
+ -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters }
3445
+
3446
+ variant :package, -> { Orb::NewSubscriptionPackagePrice }
3447
+
3448
+ variant :matrix, -> { Orb::NewSubscriptionMatrixPrice }
3449
+
3450
+ variant :threshold_total_amount, -> { Orb::NewSubscriptionThresholdTotalAmountPrice }
3451
+
3452
+ variant :tiered_package, -> { Orb::NewSubscriptionTieredPackagePrice }
3453
+
3454
+ variant :tiered_with_minimum, -> { Orb::NewSubscriptionTieredWithMinimumPrice }
3455
+
3456
+ variant :grouped_tiered, -> { Orb::NewSubscriptionGroupedTieredPrice }
3457
+
3458
+ variant :tiered_package_with_minimum, -> { Orb::NewSubscriptionTieredPackageWithMinimumPrice }
3459
+
3460
+ variant :package_with_allocation, -> { Orb::NewSubscriptionPackageWithAllocationPrice }
3461
+
3462
+ variant :unit_with_percent, -> { Orb::NewSubscriptionUnitWithPercentPrice }
3463
+
3464
+ variant :matrix_with_allocation, -> { Orb::NewSubscriptionMatrixWithAllocationPrice }
3465
+
3466
+ variant :matrix_with_threshold_discounts,
3467
+ -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts }
3468
+
3469
+ variant :tiered_with_proration,
3470
+ -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration }
3471
+
3472
+ variant :unit_with_proration, -> { Orb::NewSubscriptionUnitWithProrationPrice }
3473
+
3474
+ variant :grouped_allocation, -> { Orb::NewSubscriptionGroupedAllocationPrice }
3475
+
3476
+ variant :bulk_with_proration, -> { Orb::NewSubscriptionBulkWithProrationPrice }
3477
+
3478
+ variant :grouped_with_prorated_minimum, -> { Orb::NewSubscriptionGroupedWithProratedMinimumPrice }
3479
+
3480
+ variant :grouped_with_metered_minimum, -> { Orb::NewSubscriptionGroupedWithMeteredMinimumPrice }
3481
+
3482
+ variant :grouped_with_min_max_thresholds,
3483
+ -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds }
3484
+
3485
+ variant :matrix_with_display_name, -> { Orb::NewSubscriptionMatrixWithDisplayNamePrice }
3486
+
3487
+ variant :grouped_tiered_package, -> { Orb::NewSubscriptionGroupedTieredPackagePrice }
3488
+
3489
+ variant :max_group_tiered_package, -> { Orb::NewSubscriptionMaxGroupTieredPackagePrice }
3490
+
3491
+ variant :scalable_matrix_with_unit_pricing, -> { Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice }
3492
+
3493
+ variant :scalable_matrix_with_tiered_pricing,
3494
+ -> { Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice }
3495
+
3496
+ variant :cumulative_grouped_bulk, -> { Orb::NewSubscriptionCumulativeGroupedBulkPrice }
3497
+
3498
+ variant :cumulative_grouped_allocation,
3499
+ -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation }
3500
+
3501
+ variant :daily_credit_allowance,
3502
+ -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance }
3503
+
3504
+ variant :metered_allowance,
3505
+ -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance }
3506
+
3507
+ variant :minimum_composite, -> { Orb::NewSubscriptionMinimumCompositePrice }
3508
+
3509
+ variant :percent, -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent }
3510
+
3511
+ variant :event_output, -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput }
3512
+
3513
+ class BulkWithFilters < Orb::Internal::Type::BaseModel
3514
+ # @!attribute bulk_with_filters_config
3515
+ # Configuration for bulk_with_filters pricing
3516
+ #
3517
+ # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig]
3518
+ required :bulk_with_filters_config,
3519
+ -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig }
3520
+
3521
+ # @!attribute cadence
3522
+ # The cadence to bill for this price on.
3523
+ #
3524
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence]
3525
+ required :cadence,
3526
+ enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence }
3527
+
3528
+ # @!attribute item_id
3529
+ # The id of the item the price will be associated with.
3530
+ #
3531
+ # @return [String]
3532
+ required :item_id, String
3533
+
3534
+ # @!attribute model_type
3535
+ # The pricing model type
3536
+ #
3537
+ # @return [Symbol, :bulk_with_filters]
3538
+ required :model_type, const: :bulk_with_filters
3539
+
3540
+ # @!attribute name
3541
+ # The name of the price.
3542
+ #
3543
+ # @return [String]
3544
+ required :name, String
3545
+
3546
+ # @!attribute billable_metric_id
3547
+ # The id of the billable metric for the price. Only needed if the price is
3548
+ # usage-based.
3549
+ #
3550
+ # @return [String, nil]
3551
+ optional :billable_metric_id, String, nil?: true
3552
+
3553
+ # @!attribute billed_in_advance
3554
+ # If the Price represents a fixed cost, the price will be billed in-advance if
3555
+ # this is true, and in-arrears if this is false.
3556
+ #
3557
+ # @return [Boolean, nil]
3558
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
3559
+
3560
+ # @!attribute billing_cycle_configuration
3561
+ # For custom cadence: specifies the duration of the billing period in days or
3562
+ # months.
3563
+ #
3564
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
3565
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
3566
+
3567
+ # @!attribute conversion_rate
3568
+ # The per unit conversion rate of the price currency to the invoicing currency.
3569
+ #
3570
+ # @return [Float, nil]
3571
+ optional :conversion_rate, Float, nil?: true
3572
+
3573
+ # @!attribute conversion_rate_config
3574
+ # The configuration for the rate of the price currency to the invoicing currency.
3575
+ #
3576
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
3577
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
3578
+
3579
+ # @!attribute currency
3580
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
3581
+ # price is billed.
3582
+ #
3583
+ # @return [String, nil]
3584
+ optional :currency, String, nil?: true
3585
+
3586
+ # @!attribute dimensional_price_configuration
3587
+ # For dimensional price: specifies a price group and dimension values
3588
+ #
3589
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
3590
+ optional :dimensional_price_configuration,
3591
+ -> {
3592
+ Orb::NewDimensionalPriceConfiguration
3593
+ },
3594
+ nil?: true
3595
+
3596
+ # @!attribute external_price_id
3597
+ # An alias for the price.
3598
+ #
3599
+ # @return [String, nil]
3600
+ optional :external_price_id, String, nil?: true
3601
+
3602
+ # @!attribute fixed_price_quantity
3603
+ # If the Price represents a fixed cost, this represents the quantity of units
3604
+ # applied.
3605
+ #
3606
+ # @return [Float, nil]
3607
+ optional :fixed_price_quantity, Float, nil?: true
3608
+
3609
+ # @!attribute invoice_grouping_key
3610
+ # The property used to group this price on an invoice
3611
+ #
3612
+ # @return [String, nil]
3613
+ optional :invoice_grouping_key, String, nil?: true
3614
+
3615
+ # @!attribute invoicing_cycle_configuration
3616
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
3617
+ # If unspecified, a single invoice is produced per billing cycle.
3618
+ #
3619
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
3620
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
3621
+
3622
+ # @!attribute license_type_id
3623
+ # The ID of the license type to associate with this price.
3624
+ #
3625
+ # @return [String, nil]
3626
+ optional :license_type_id, String, nil?: true
3627
+
3628
+ # @!attribute metadata
3629
+ # User-specified key/value pairs for the resource. Individual keys can be removed
3630
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
3631
+ # by setting `metadata` to `null`.
3632
+ #
3633
+ # @return [Hash{Symbol=>String, nil}, nil]
3634
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
3635
+
3636
+ # @!attribute reference_id
3637
+ # A transient ID that can be used to reference this price when adding adjustments
3638
+ # in the same API call.
3639
+ #
3640
+ # @return [String, nil]
3641
+ optional :reference_id, String, nil?: true
3642
+
3643
+ # @!method initialize(bulk_with_filters_config:, cadence:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_filters)
3644
+ # Some parameter documentations has been truncated, see
3645
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters}
3646
+ # for more details.
3647
+ #
3648
+ # @param bulk_with_filters_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing
3649
+ #
3650
+ # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence] The cadence to bill for this price on.
3651
+ #
3652
+ # @param item_id [String] The id of the item the price will be associated with.
3653
+ #
3654
+ # @param name [String] The name of the price.
3655
+ #
3656
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
3657
+ #
3658
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
3659
+ #
3660
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
3661
+ #
3662
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
3663
+ #
3664
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
3665
+ #
3666
+ # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr
3667
+ #
3668
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
3669
+ #
3670
+ # @param external_price_id [String, nil] An alias for the price.
3671
+ #
3672
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
3673
+ #
3674
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
3675
+ #
3676
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
3677
+ #
3678
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
3679
+ #
3680
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
3681
+ #
3682
+ # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
3683
+ #
3684
+ # @param model_type [Symbol, :bulk_with_filters] The pricing model type
3685
+
3686
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters#bulk_with_filters_config
3687
+ class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel
3688
+ # @!attribute filters
3689
+ # Property filters to apply (all must match)
3690
+ #
3691
+ # @return [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter>]
3692
+ required :filters,
3693
+ -> do
3694
+ Orb::Internal::Type::ArrayOf[
3695
+ Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter
3696
+ ]
3697
+ end
3698
+
3699
+ # @!attribute tiers
3700
+ # Bulk tiers for rating based on total usage volume
3701
+ #
3702
+ # @return [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier>]
3703
+ required :tiers,
3704
+ -> do
3705
+ Orb::Internal::Type::ArrayOf[
3706
+ Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier
3707
+ ]
3708
+ end
3709
+
3710
+ # @!method initialize(filters:, tiers:)
3711
+ # Configuration for bulk_with_filters pricing
3712
+ #
3713
+ # @param filters [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter>] Property filters to apply (all must match)
3714
+ #
3715
+ # @param tiers [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier>] Bulk tiers for rating based on total usage volume
3716
+
3717
+ class Filter < Orb::Internal::Type::BaseModel
3718
+ # @!attribute property_key
3719
+ # Event property key to filter on
3720
+ #
3721
+ # @return [String]
3722
+ required :property_key, String
3723
+
3724
+ # @!attribute property_value
3725
+ # Event property value to match
3726
+ #
3727
+ # @return [String]
3728
+ required :property_value, String
3729
+
3730
+ # @!method initialize(property_key:, property_value:)
3731
+ # Configuration for a single property filter
3732
+ #
3733
+ # @param property_key [String] Event property key to filter on
3734
+ #
3735
+ # @param property_value [String] Event property value to match
3736
+ end
3737
+
3738
+ class Tier < Orb::Internal::Type::BaseModel
3739
+ # @!attribute unit_amount
3740
+ # Amount per unit
3741
+ #
3742
+ # @return [String]
3743
+ required :unit_amount, String
3744
+
3745
+ # @!attribute tier_lower_bound
3746
+ # The lower bound for this tier
3747
+ #
3748
+ # @return [String, nil]
3749
+ optional :tier_lower_bound, String, nil?: true
3750
+
3751
+ # @!method initialize(unit_amount:, tier_lower_bound: nil)
3752
+ # Configuration for a single bulk pricing tier
3753
+ #
3754
+ # @param unit_amount [String] Amount per unit
3755
+ #
3756
+ # @param tier_lower_bound [String, nil] The lower bound for this tier
3757
+ end
3758
+ end
1953
3759
 
1954
- UNCHANGED = :unchanged
1955
- PLAN_CHANGE_DATE = :plan_change_date
1956
- START_OF_MONTH = :start_of_month
3760
+ # The cadence to bill for this price on.
3761
+ #
3762
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters#cadence
3763
+ module Cadence
3764
+ extend Orb::Internal::Type::Enum
1957
3765
 
1958
- # @!method self.values
1959
- # @return [Array<Symbol>]
1960
- end
3766
+ ANNUAL = :annual
3767
+ SEMI_ANNUAL = :semi_annual
3768
+ MONTHLY = :monthly
3769
+ QUARTERLY = :quarterly
3770
+ ONE_TIME = :one_time
3771
+ CUSTOM = :custom
1961
3772
 
1962
- class RemoveAdjustment < Orb::Internal::Type::BaseModel
1963
- # @!attribute adjustment_id
1964
- # The id of the adjustment to remove on the subscription.
1965
- #
1966
- # @return [String]
1967
- required :adjustment_id, String
3773
+ # @!method self.values
3774
+ # @return [Array<Symbol>]
3775
+ end
3776
+ end
1968
3777
 
1969
- # @!method initialize(adjustment_id:)
1970
- # @param adjustment_id [String] The id of the adjustment to remove on the subscription.
1971
- end
3778
+ class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel
3779
+ # @!attribute cadence
3780
+ # The cadence to bill for this price on.
3781
+ #
3782
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence]
3783
+ required :cadence,
3784
+ enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence }
1972
3785
 
1973
- class RemovePrice < Orb::Internal::Type::BaseModel
1974
- # @!attribute external_price_id
1975
- # The external price id of the price to remove on the subscription.
1976
- #
1977
- # @return [String, nil]
1978
- optional :external_price_id, String, nil?: true
3786
+ # @!attribute item_id
3787
+ # The id of the item the price will be associated with.
3788
+ #
3789
+ # @return [String]
3790
+ required :item_id, String
1979
3791
 
1980
- # @!attribute price_id
1981
- # The id of the price to remove on the subscription.
1982
- #
1983
- # @return [String, nil]
1984
- optional :price_id, String, nil?: true
3792
+ # @!attribute matrix_with_threshold_discounts_config
3793
+ # Configuration for matrix_with_threshold_discounts pricing
3794
+ #
3795
+ # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig]
3796
+ required :matrix_with_threshold_discounts_config,
3797
+ -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig }
1985
3798
 
1986
- # @!method initialize(external_price_id: nil, price_id: nil)
1987
- # @param external_price_id [String, nil] The external price id of the price to remove on the subscription.
1988
- #
1989
- # @param price_id [String, nil] The id of the price to remove on the subscription.
1990
- end
3799
+ # @!attribute model_type
3800
+ # The pricing model type
3801
+ #
3802
+ # @return [Symbol, :matrix_with_threshold_discounts]
3803
+ required :model_type, const: :matrix_with_threshold_discounts
1991
3804
 
1992
- class ReplaceAdjustment < Orb::Internal::Type::BaseModel
1993
- # @!attribute adjustment
1994
- # The definition of a new adjustment to create and add to the subscription.
1995
- #
1996
- # @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum]
1997
- required :adjustment,
1998
- union: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment }
3805
+ # @!attribute name
3806
+ # The name of the price.
3807
+ #
3808
+ # @return [String]
3809
+ required :name, String
1999
3810
 
2000
- # @!attribute replaces_adjustment_id
2001
- # The id of the adjustment on the plan to replace in the subscription.
2002
- #
2003
- # @return [String]
2004
- required :replaces_adjustment_id, String
3811
+ # @!attribute billable_metric_id
3812
+ # The id of the billable metric for the price. Only needed if the price is
3813
+ # usage-based.
3814
+ #
3815
+ # @return [String, nil]
3816
+ optional :billable_metric_id, String, nil?: true
2005
3817
 
2006
- # @!method initialize(adjustment:, replaces_adjustment_id:)
2007
- # @param adjustment [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum] The definition of a new adjustment to create and add to the subscription.
2008
- #
2009
- # @param replaces_adjustment_id [String] The id of the adjustment on the plan to replace in the subscription.
3818
+ # @!attribute billed_in_advance
3819
+ # If the Price represents a fixed cost, the price will be billed in-advance if
3820
+ # this is true, and in-arrears if this is false.
3821
+ #
3822
+ # @return [Boolean, nil]
3823
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
2010
3824
 
2011
- # The definition of a new adjustment to create and add to the subscription.
2012
- #
2013
- # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment#adjustment
2014
- module Adjustment
2015
- extend Orb::Internal::Type::Union
3825
+ # @!attribute billing_cycle_configuration
3826
+ # For custom cadence: specifies the duration of the billing period in days or
3827
+ # months.
3828
+ #
3829
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
3830
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
2016
3831
 
2017
- discriminator :adjustment_type
3832
+ # @!attribute conversion_rate
3833
+ # The per unit conversion rate of the price currency to the invoicing currency.
3834
+ #
3835
+ # @return [Float, nil]
3836
+ optional :conversion_rate, Float, nil?: true
2018
3837
 
2019
- variant :percentage_discount, -> { Orb::NewPercentageDiscount }
3838
+ # @!attribute conversion_rate_config
3839
+ # The configuration for the rate of the price currency to the invoicing currency.
3840
+ #
3841
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
3842
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
2020
3843
 
2021
- variant :usage_discount, -> { Orb::NewUsageDiscount }
3844
+ # @!attribute currency
3845
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
3846
+ # price is billed.
3847
+ #
3848
+ # @return [String, nil]
3849
+ optional :currency, String, nil?: true
2022
3850
 
2023
- variant :amount_discount, -> { Orb::NewAmountDiscount }
3851
+ # @!attribute dimensional_price_configuration
3852
+ # For dimensional price: specifies a price group and dimension values
3853
+ #
3854
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
3855
+ optional :dimensional_price_configuration,
3856
+ -> {
3857
+ Orb::NewDimensionalPriceConfiguration
3858
+ },
3859
+ nil?: true
2024
3860
 
2025
- variant :minimum, -> { Orb::NewMinimum }
3861
+ # @!attribute external_price_id
3862
+ # An alias for the price.
3863
+ #
3864
+ # @return [String, nil]
3865
+ optional :external_price_id, String, nil?: true
2026
3866
 
2027
- variant :maximum, -> { Orb::NewMaximum }
3867
+ # @!attribute fixed_price_quantity
3868
+ # If the Price represents a fixed cost, this represents the quantity of units
3869
+ # applied.
3870
+ #
3871
+ # @return [Float, nil]
3872
+ optional :fixed_price_quantity, Float, nil?: true
2028
3873
 
2029
- # @!method self.variants
2030
- # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)]
2031
- end
2032
- end
3874
+ # @!attribute invoice_grouping_key
3875
+ # The property used to group this price on an invoice
3876
+ #
3877
+ # @return [String, nil]
3878
+ optional :invoice_grouping_key, String, nil?: true
2033
3879
 
2034
- class ReplacePrice < Orb::Internal::Type::BaseModel
2035
- # @!attribute replaces_price_id
2036
- # The id of the price on the plan to replace in the subscription.
2037
- #
2038
- # @return [String]
2039
- required :replaces_price_id, String
3880
+ # @!attribute invoicing_cycle_configuration
3881
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
3882
+ # If unspecified, a single invoice is produced per billing cycle.
3883
+ #
3884
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
3885
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
2040
3886
 
2041
- # @!attribute allocation_price
2042
- # The definition of a new allocation price to create and add to the subscription.
2043
- #
2044
- # @return [Orb::Models::NewAllocationPrice, nil]
2045
- optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true
3887
+ # @!attribute license_type_id
3888
+ # The ID of the license type to associate with this price.
3889
+ #
3890
+ # @return [String, nil]
3891
+ optional :license_type_id, String, nil?: true
3892
+
3893
+ # @!attribute metadata
3894
+ # User-specified key/value pairs for the resource. Individual keys can be removed
3895
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
3896
+ # by setting `metadata` to `null`.
3897
+ #
3898
+ # @return [Hash{Symbol=>String, nil}, nil]
3899
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
3900
+
3901
+ # @!attribute reference_id
3902
+ # A transient ID that can be used to reference this price when adding adjustments
3903
+ # in the same API call.
3904
+ #
3905
+ # @return [String, nil]
3906
+ optional :reference_id, String, nil?: true
3907
+
3908
+ # @!method initialize(cadence:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :matrix_with_threshold_discounts)
3909
+ # Some parameter documentations has been truncated, see
3910
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts}
3911
+ # for more details.
3912
+ #
3913
+ # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on.
3914
+ #
3915
+ # @param item_id [String] The id of the item the price will be associated with.
3916
+ #
3917
+ # @param matrix_with_threshold_discounts_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing
3918
+ #
3919
+ # @param name [String] The name of the price.
3920
+ #
3921
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
3922
+ #
3923
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
3924
+ #
3925
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
3926
+ #
3927
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
3928
+ #
3929
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
3930
+ #
3931
+ # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr
3932
+ #
3933
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
3934
+ #
3935
+ # @param external_price_id [String, nil] An alias for the price.
3936
+ #
3937
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
3938
+ #
3939
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
3940
+ #
3941
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
3942
+ #
3943
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
3944
+ #
3945
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
3946
+ #
3947
+ # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
3948
+ #
3949
+ # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type
3950
+
3951
+ # The cadence to bill for this price on.
3952
+ #
3953
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts#cadence
3954
+ module Cadence
3955
+ extend Orb::Internal::Type::Enum
3956
+
3957
+ ANNUAL = :annual
3958
+ SEMI_ANNUAL = :semi_annual
3959
+ MONTHLY = :monthly
3960
+ QUARTERLY = :quarterly
3961
+ ONE_TIME = :one_time
3962
+ CUSTOM = :custom
3963
+
3964
+ # @!method self.values
3965
+ # @return [Array<Symbol>]
3966
+ end
2046
3967
 
2047
- # @!attribute discounts
2048
- # @deprecated
2049
- #
2050
- # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the
2051
- # replacement price.
2052
- #
2053
- # @return [Array<Orb::Models::DiscountOverride>, nil]
2054
- optional :discounts, -> { Orb::Internal::Type::ArrayOf[Orb::DiscountOverride] }, nil?: true
3968
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config
3969
+ class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel
3970
+ # @!attribute default_unit_amount
3971
+ # Unit price used for usage that does not match any defined matrix cell.
3972
+ #
3973
+ # @return [String]
3974
+ required :default_unit_amount, String
2055
3975
 
2056
- # @!attribute external_price_id
2057
- # The external price id of the price to add to the subscription.
2058
- #
2059
- # @return [String, nil]
2060
- optional :external_price_id, String, nil?: true
3976
+ # @!attribute first_dimension
3977
+ # First matrix dimension key.
3978
+ #
3979
+ # @return [String]
3980
+ required :first_dimension, String
2061
3981
 
2062
- # @!attribute fixed_price_quantity
2063
- # The new quantity of the price, if the price is a fixed price.
2064
- #
2065
- # @return [Float, nil]
2066
- optional :fixed_price_quantity, Float, nil?: true
3982
+ # @!attribute matrix_values
3983
+ # Per-cell unit prices.
3984
+ #
3985
+ # @return [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue>]
3986
+ required :matrix_values,
3987
+ -> do
3988
+ Orb::Internal::Type::ArrayOf[
3989
+ Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue
3990
+ ]
3991
+ end
2067
3992
 
2068
- # @!attribute maximum_amount
2069
- # @deprecated
2070
- #
2071
- # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for
2072
- # the replacement price.
2073
- #
2074
- # @return [String, nil]
2075
- optional :maximum_amount, String, nil?: true
3993
+ # @!attribute second_dimension
3994
+ # Optional second matrix dimension key.
3995
+ #
3996
+ # @return [String, nil]
3997
+ optional :second_dimension, String, nil?: true
2076
3998
 
2077
- # @!attribute metric_parameter_overrides
2078
- # Override values for parameterized billable metric variables. Keys are parameter
2079
- # names, values are the override values.
2080
- #
2081
- # @return [Hash{Symbol=>Object}, nil]
2082
- optional :metric_parameter_overrides,
2083
- Orb::Internal::Type::HashOf[Orb::Internal::Type::Unknown],
2084
- nil?: true
3999
+ # @!attribute threshold_discount_groups
4000
+ #
4001
+ # @return [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup>, nil]
4002
+ optional :threshold_discount_groups,
4003
+ -> do
4004
+ Orb::Internal::Type::ArrayOf[
4005
+ Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup
4006
+ ]
4007
+ end
2085
4008
 
2086
- # @!attribute minimum_amount
2087
- # @deprecated
2088
- #
2089
- # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for
2090
- # the replacement price.
2091
- #
2092
- # @return [String, nil]
2093
- optional :minimum_amount, String, nil?: true
4009
+ # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil)
4010
+ # Configuration for matrix_with_threshold_discounts pricing
4011
+ #
4012
+ # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell.
4013
+ #
4014
+ # @param first_dimension [String] First matrix dimension key.
4015
+ #
4016
+ # @param matrix_values [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue>] Per-cell unit prices.
4017
+ #
4018
+ # @param second_dimension [String, nil] Optional second matrix dimension key.
4019
+ #
4020
+ # @param threshold_discount_groups [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup>]
2094
4021
 
2095
- # @!attribute price
2096
- # New subscription price request body params.
2097
- #
2098
- # @return [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput, nil]
2099
- optional :price,
2100
- union: -> {
2101
- Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price
2102
- },
2103
- nil?: true
4022
+ class MatrixValue < Orb::Internal::Type::BaseModel
4023
+ # @!attribute first_dimension_value
4024
+ #
4025
+ # @return [String]
4026
+ required :first_dimension_value, String
2104
4027
 
2105
- # @!attribute price_id
2106
- # The id of the price to add to the subscription.
2107
- #
2108
- # @return [String, nil]
2109
- optional :price_id, String, nil?: true
4028
+ # @!attribute unit_amount
4029
+ #
4030
+ # @return [String]
4031
+ required :unit_amount, String
2110
4032
 
2111
- # @!method initialize(replaces_price_id:, allocation_price: nil, discounts: nil, external_price_id: nil, fixed_price_quantity: nil, maximum_amount: nil, metric_parameter_overrides: nil, minimum_amount: nil, price: nil, price_id: nil)
2112
- # Some parameter documentations has been truncated, see
2113
- # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice} for more
2114
- # details.
2115
- #
2116
- # @param replaces_price_id [String] The id of the price on the plan to replace in the subscription.
2117
- #
2118
- # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The definition of a new allocation price to create and add to the subscription.
2119
- #
2120
- # @param discounts [Array<Orb::Models::DiscountOverride>, nil] [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the r
2121
- #
2122
- # @param external_price_id [String, nil] The external price id of the price to add to the subscription.
2123
- #
2124
- # @param fixed_price_quantity [Float, nil] The new quantity of the price, if the price is a fixed price.
2125
- #
2126
- # @param maximum_amount [String, nil] [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for
2127
- #
2128
- # @param metric_parameter_overrides [Hash{Symbol=>Object}, nil] Override values for parameterized billable metric variables. Keys are parameter
2129
- #
2130
- # @param minimum_amount [String, nil] [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for
2131
- #
2132
- # @param price [Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput, nil] New subscription price request body params.
2133
- #
2134
- # @param price_id [String, nil] The id of the price to add to the subscription.
4033
+ # @!attribute second_dimension_value
4034
+ #
4035
+ # @return [String, nil]
4036
+ optional :second_dimension_value, String, nil?: true
2135
4037
 
2136
- # New subscription price request body params.
2137
- #
2138
- # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice#price
2139
- module Price
2140
- extend Orb::Internal::Type::Union
4038
+ # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil)
4039
+ # @param first_dimension_value [String]
4040
+ # @param unit_amount [String]
4041
+ # @param second_dimension_value [String, nil]
4042
+ end
2141
4043
 
2142
- discriminator :model_type
4044
+ class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel
4045
+ # @!attribute above_threshold_discount_percentage
4046
+ # Discount rate applied to spend above the threshold.
4047
+ #
4048
+ # @return [String]
4049
+ required :above_threshold_discount_percentage, String
2143
4050
 
2144
- variant :unit, -> { Orb::NewSubscriptionUnitPrice }
4051
+ # @!attribute below_threshold_discount_percentage
4052
+ # Discount rate applied to spend at or below the threshold. Set to 0 for no
4053
+ # baseline discount.
4054
+ #
4055
+ # @return [String]
4056
+ required :below_threshold_discount_percentage, String
2145
4057
 
2146
- variant :tiered, -> { Orb::NewSubscriptionTieredPrice }
4058
+ # @!attribute cell_coordinates
4059
+ # Semicolon-separated list of matrix cell coordinates targeted by this group. Each
4060
+ # coordinate is `first,second` when the matrix has two dimensions, or just `first`
4061
+ # for a single-dimension matrix. Example: `blue,circle;green,triangle`.
4062
+ #
4063
+ # @return [String]
4064
+ required :cell_coordinates, String
2147
4065
 
2148
- variant :bulk, -> { Orb::NewSubscriptionBulkPrice }
4066
+ # @!attribute threshold_amount
4067
+ #
4068
+ # @return [String]
4069
+ required :threshold_amount, String
2149
4070
 
2150
- variant :bulk_with_filters,
2151
- -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters }
4071
+ # @!attribute description
4072
+ #
4073
+ # @return [String, nil]
4074
+ optional :description, String, nil?: true
2152
4075
 
2153
- variant :package, -> { Orb::NewSubscriptionPackagePrice }
4076
+ # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil)
4077
+ # Some parameter documentations has been truncated, see
4078
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup}
4079
+ # for more details.
4080
+ #
4081
+ # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold.
4082
+ #
4083
+ # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli
4084
+ #
4085
+ # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each
4086
+ #
4087
+ # @param threshold_amount [String]
4088
+ #
4089
+ # @param description [String, nil]
4090
+ end
4091
+ end
4092
+ end
2154
4093
 
2155
- variant :matrix, -> { Orb::NewSubscriptionMatrixPrice }
4094
+ class TieredWithProration < Orb::Internal::Type::BaseModel
4095
+ # @!attribute cadence
4096
+ # The cadence to bill for this price on.
4097
+ #
4098
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence]
4099
+ required :cadence,
4100
+ enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence }
2156
4101
 
2157
- variant :threshold_total_amount, -> { Orb::NewSubscriptionThresholdTotalAmountPrice }
4102
+ # @!attribute item_id
4103
+ # The id of the item the price will be associated with.
4104
+ #
4105
+ # @return [String]
4106
+ required :item_id, String
2158
4107
 
2159
- variant :tiered_package, -> { Orb::NewSubscriptionTieredPackagePrice }
4108
+ # @!attribute model_type
4109
+ # The pricing model type
4110
+ #
4111
+ # @return [Symbol, :tiered_with_proration]
4112
+ required :model_type, const: :tiered_with_proration
2160
4113
 
2161
- variant :tiered_with_minimum, -> { Orb::NewSubscriptionTieredWithMinimumPrice }
4114
+ # @!attribute name
4115
+ # The name of the price.
4116
+ #
4117
+ # @return [String]
4118
+ required :name, String
2162
4119
 
2163
- variant :grouped_tiered, -> { Orb::NewSubscriptionGroupedTieredPrice }
4120
+ # @!attribute tiered_with_proration_config
4121
+ # Configuration for tiered_with_proration pricing
4122
+ #
4123
+ # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig]
4124
+ required :tiered_with_proration_config,
4125
+ -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig }
2164
4126
 
2165
- variant :tiered_package_with_minimum, -> { Orb::NewSubscriptionTieredPackageWithMinimumPrice }
4127
+ # @!attribute billable_metric_id
4128
+ # The id of the billable metric for the price. Only needed if the price is
4129
+ # usage-based.
4130
+ #
4131
+ # @return [String, nil]
4132
+ optional :billable_metric_id, String, nil?: true
2166
4133
 
2167
- variant :package_with_allocation, -> { Orb::NewSubscriptionPackageWithAllocationPrice }
4134
+ # @!attribute billed_in_advance
4135
+ # If the Price represents a fixed cost, the price will be billed in-advance if
4136
+ # this is true, and in-arrears if this is false.
4137
+ #
4138
+ # @return [Boolean, nil]
4139
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
2168
4140
 
2169
- variant :unit_with_percent, -> { Orb::NewSubscriptionUnitWithPercentPrice }
4141
+ # @!attribute billing_cycle_configuration
4142
+ # For custom cadence: specifies the duration of the billing period in days or
4143
+ # months.
4144
+ #
4145
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
4146
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
2170
4147
 
2171
- variant :matrix_with_allocation, -> { Orb::NewSubscriptionMatrixWithAllocationPrice }
4148
+ # @!attribute conversion_rate
4149
+ # The per unit conversion rate of the price currency to the invoicing currency.
4150
+ #
4151
+ # @return [Float, nil]
4152
+ optional :conversion_rate, Float, nil?: true
2172
4153
 
2173
- variant :tiered_with_proration,
2174
- -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration }
4154
+ # @!attribute conversion_rate_config
4155
+ # The configuration for the rate of the price currency to the invoicing currency.
4156
+ #
4157
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
4158
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
2175
4159
 
2176
- variant :unit_with_proration, -> { Orb::NewSubscriptionUnitWithProrationPrice }
4160
+ # @!attribute currency
4161
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
4162
+ # price is billed.
4163
+ #
4164
+ # @return [String, nil]
4165
+ optional :currency, String, nil?: true
2177
4166
 
2178
- variant :grouped_allocation, -> { Orb::NewSubscriptionGroupedAllocationPrice }
4167
+ # @!attribute dimensional_price_configuration
4168
+ # For dimensional price: specifies a price group and dimension values
4169
+ #
4170
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
4171
+ optional :dimensional_price_configuration,
4172
+ -> {
4173
+ Orb::NewDimensionalPriceConfiguration
4174
+ },
4175
+ nil?: true
2179
4176
 
2180
- variant :bulk_with_proration, -> { Orb::NewSubscriptionBulkWithProrationPrice }
4177
+ # @!attribute external_price_id
4178
+ # An alias for the price.
4179
+ #
4180
+ # @return [String, nil]
4181
+ optional :external_price_id, String, nil?: true
2181
4182
 
2182
- variant :grouped_with_prorated_minimum, -> { Orb::NewSubscriptionGroupedWithProratedMinimumPrice }
4183
+ # @!attribute fixed_price_quantity
4184
+ # If the Price represents a fixed cost, this represents the quantity of units
4185
+ # applied.
4186
+ #
4187
+ # @return [Float, nil]
4188
+ optional :fixed_price_quantity, Float, nil?: true
2183
4189
 
2184
- variant :grouped_with_metered_minimum, -> { Orb::NewSubscriptionGroupedWithMeteredMinimumPrice }
4190
+ # @!attribute invoice_grouping_key
4191
+ # The property used to group this price on an invoice
4192
+ #
4193
+ # @return [String, nil]
4194
+ optional :invoice_grouping_key, String, nil?: true
2185
4195
 
2186
- variant :grouped_with_min_max_thresholds,
2187
- -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds }
4196
+ # @!attribute invoicing_cycle_configuration
4197
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
4198
+ # If unspecified, a single invoice is produced per billing cycle.
4199
+ #
4200
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
4201
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
4202
+
4203
+ # @!attribute license_type_id
4204
+ # The ID of the license type to associate with this price.
4205
+ #
4206
+ # @return [String, nil]
4207
+ optional :license_type_id, String, nil?: true
2188
4208
 
2189
- variant :matrix_with_display_name, -> { Orb::NewSubscriptionMatrixWithDisplayNamePrice }
4209
+ # @!attribute metadata
4210
+ # User-specified key/value pairs for the resource. Individual keys can be removed
4211
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
4212
+ # by setting `metadata` to `null`.
4213
+ #
4214
+ # @return [Hash{Symbol=>String, nil}, nil]
4215
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
2190
4216
 
2191
- variant :grouped_tiered_package, -> { Orb::NewSubscriptionGroupedTieredPackagePrice }
4217
+ # @!attribute reference_id
4218
+ # A transient ID that can be used to reference this price when adding adjustments
4219
+ # in the same API call.
4220
+ #
4221
+ # @return [String, nil]
4222
+ optional :reference_id, String, nil?: true
2192
4223
 
2193
- variant :max_group_tiered_package, -> { Orb::NewSubscriptionMaxGroupTieredPackagePrice }
4224
+ # @!method initialize(cadence:, item_id:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration)
4225
+ # Some parameter documentations has been truncated, see
4226
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration}
4227
+ # for more details.
4228
+ #
4229
+ # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on.
4230
+ #
4231
+ # @param item_id [String] The id of the item the price will be associated with.
4232
+ #
4233
+ # @param name [String] The name of the price.
4234
+ #
4235
+ # @param tiered_with_proration_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing
4236
+ #
4237
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
4238
+ #
4239
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
4240
+ #
4241
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
4242
+ #
4243
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
4244
+ #
4245
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
4246
+ #
4247
+ # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr
4248
+ #
4249
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
4250
+ #
4251
+ # @param external_price_id [String, nil] An alias for the price.
4252
+ #
4253
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
4254
+ #
4255
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
4256
+ #
4257
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
4258
+ #
4259
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
4260
+ #
4261
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
4262
+ #
4263
+ # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
4264
+ #
4265
+ # @param model_type [Symbol, :tiered_with_proration] The pricing model type
2194
4266
 
2195
- variant :scalable_matrix_with_unit_pricing, -> { Orb::NewSubscriptionScalableMatrixWithUnitPricingPrice }
4267
+ # The cadence to bill for this price on.
4268
+ #
4269
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration#cadence
4270
+ module Cadence
4271
+ extend Orb::Internal::Type::Enum
2196
4272
 
2197
- variant :scalable_matrix_with_tiered_pricing,
2198
- -> { Orb::NewSubscriptionScalableMatrixWithTieredPricingPrice }
4273
+ ANNUAL = :annual
4274
+ SEMI_ANNUAL = :semi_annual
4275
+ MONTHLY = :monthly
4276
+ QUARTERLY = :quarterly
4277
+ ONE_TIME = :one_time
4278
+ CUSTOM = :custom
2199
4279
 
2200
- variant :cumulative_grouped_bulk, -> { Orb::NewSubscriptionCumulativeGroupedBulkPrice }
4280
+ # @!method self.values
4281
+ # @return [Array<Symbol>]
4282
+ end
2201
4283
 
2202
- variant :cumulative_grouped_allocation,
2203
- -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation }
4284
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration#tiered_with_proration_config
4285
+ class TieredWithProrationConfig < Orb::Internal::Type::BaseModel
4286
+ # @!attribute tiers
4287
+ # Tiers for rating based on total usage quantities into the specified tier with
4288
+ # proration
4289
+ #
4290
+ # @return [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier>]
4291
+ required :tiers,
4292
+ -> do
4293
+ Orb::Internal::Type::ArrayOf[
4294
+ Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier
4295
+ ]
4296
+ end
2204
4297
 
2205
- variant :minimum_composite, -> { Orb::NewSubscriptionMinimumCompositePrice }
4298
+ # @!method initialize(tiers:)
4299
+ # Some parameter documentations has been truncated, see
4300
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig}
4301
+ # for more details.
4302
+ #
4303
+ # Configuration for tiered_with_proration pricing
4304
+ #
4305
+ # @param tiers [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier>] Tiers for rating based on total usage quantities into the specified tier with pr
2206
4306
 
2207
- variant :percent, -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent }
4307
+ class Tier < Orb::Internal::Type::BaseModel
4308
+ # @!attribute tier_lower_bound
4309
+ # Inclusive tier starting value
4310
+ #
4311
+ # @return [String]
4312
+ required :tier_lower_bound, String
2208
4313
 
2209
- variant :event_output, -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput }
4314
+ # @!attribute unit_amount
4315
+ # Amount per unit
4316
+ #
4317
+ # @return [String]
4318
+ required :unit_amount, String
2210
4319
 
2211
- class BulkWithFilters < Orb::Internal::Type::BaseModel
2212
- # @!attribute bulk_with_filters_config
2213
- # Configuration for bulk_with_filters pricing
2214
- #
2215
- # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig]
2216
- required :bulk_with_filters_config,
2217
- -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig }
4320
+ # @!method initialize(tier_lower_bound:, unit_amount:)
4321
+ # Configuration for a single tiered with proration tier
4322
+ #
4323
+ # @param tier_lower_bound [String] Inclusive tier starting value
4324
+ #
4325
+ # @param unit_amount [String] Amount per unit
4326
+ end
4327
+ end
4328
+ end
2218
4329
 
4330
+ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel
2219
4331
  # @!attribute cadence
2220
4332
  # The cadence to bill for this price on.
2221
4333
  #
2222
- # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence]
4334
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence]
2223
4335
  required :cadence,
2224
- enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence }
4336
+ enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence }
4337
+
4338
+ # @!attribute grouped_with_min_max_thresholds_config
4339
+ # Configuration for grouped_with_min_max_thresholds pricing
4340
+ #
4341
+ # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig]
4342
+ required :grouped_with_min_max_thresholds_config,
4343
+ -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig }
2225
4344
 
2226
4345
  # @!attribute item_id
2227
4346
  # The id of the item the price will be associated with.
@@ -2232,8 +4351,8 @@ module Orb
2232
4351
  # @!attribute model_type
2233
4352
  # The pricing model type
2234
4353
  #
2235
- # @return [Symbol, :bulk_with_filters]
2236
- required :model_type, const: :bulk_with_filters
4354
+ # @return [Symbol, :grouped_with_min_max_thresholds]
4355
+ required :model_type, const: :grouped_with_min_max_thresholds
2237
4356
 
2238
4357
  # @!attribute name
2239
4358
  # The name of the price.
@@ -2272,11 +4391,7 @@ module Orb
2272
4391
  # The configuration for the rate of the price currency to the invoicing currency.
2273
4392
  #
2274
4393
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
2275
- optional :conversion_rate_config,
2276
- union: -> {
2277
- Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::ConversionRateConfig
2278
- },
2279
- nil?: true
4394
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
2280
4395
 
2281
4396
  # @!attribute currency
2282
4397
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -2342,14 +4457,14 @@ module Orb
2342
4457
  # @return [String, nil]
2343
4458
  optional :reference_id, String, nil?: true
2344
4459
 
2345
- # @!method initialize(bulk_with_filters_config:, cadence:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :bulk_with_filters)
4460
+ # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds)
2346
4461
  # Some parameter documentations has been truncated, see
2347
- # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters}
4462
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds}
2348
4463
  # for more details.
2349
4464
  #
2350
- # @param bulk_with_filters_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing
4465
+ # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on.
2351
4466
  #
2352
- # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::Cadence] The cadence to bill for this price on.
4467
+ # @param grouped_with_min_max_thresholds_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing
2353
4468
  #
2354
4469
  # @param item_id [String] The id of the item the price will be associated with.
2355
4470
  #
@@ -2383,85 +4498,11 @@ module Orb
2383
4498
  #
2384
4499
  # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
2385
4500
  #
2386
- # @param model_type [Symbol, :bulk_with_filters] The pricing model type
2387
-
2388
- # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters#bulk_with_filters_config
2389
- class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel
2390
- # @!attribute filters
2391
- # Property filters to apply (all must match)
2392
- #
2393
- # @return [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter>]
2394
- required :filters,
2395
- -> do
2396
- Orb::Internal::Type::ArrayOf[
2397
- Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter
2398
- ]
2399
- end
2400
-
2401
- # @!attribute tiers
2402
- # Bulk tiers for rating based on total usage volume
2403
- #
2404
- # @return [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier>]
2405
- required :tiers,
2406
- -> do
2407
- Orb::Internal::Type::ArrayOf[
2408
- Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier
2409
- ]
2410
- end
2411
-
2412
- # @!method initialize(filters:, tiers:)
2413
- # Configuration for bulk_with_filters pricing
2414
- #
2415
- # @param filters [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter>] Property filters to apply (all must match)
2416
- #
2417
- # @param tiers [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier>] Bulk tiers for rating based on total usage volume
2418
-
2419
- class Filter < Orb::Internal::Type::BaseModel
2420
- # @!attribute property_key
2421
- # Event property key to filter on
2422
- #
2423
- # @return [String]
2424
- required :property_key, String
2425
-
2426
- # @!attribute property_value
2427
- # Event property value to match
2428
- #
2429
- # @return [String]
2430
- required :property_value, String
2431
-
2432
- # @!method initialize(property_key:, property_value:)
2433
- # Configuration for a single property filter
2434
- #
2435
- # @param property_key [String] Event property key to filter on
2436
- #
2437
- # @param property_value [String] Event property value to match
2438
- end
2439
-
2440
- class Tier < Orb::Internal::Type::BaseModel
2441
- # @!attribute unit_amount
2442
- # Amount per unit
2443
- #
2444
- # @return [String]
2445
- required :unit_amount, String
2446
-
2447
- # @!attribute tier_lower_bound
2448
- # The lower bound for this tier
2449
- #
2450
- # @return [String, nil]
2451
- optional :tier_lower_bound, String, nil?: true
2452
-
2453
- # @!method initialize(unit_amount:, tier_lower_bound: nil)
2454
- # Configuration for a single bulk pricing tier
2455
- #
2456
- # @param unit_amount [String] Amount per unit
2457
- #
2458
- # @param tier_lower_bound [String, nil] The lower bound for this tier
2459
- end
2460
- end
4501
+ # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type
2461
4502
 
2462
4503
  # The cadence to bill for this price on.
2463
4504
  #
2464
- # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters#cadence
4505
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds#cadence
2465
4506
  module Cadence
2466
4507
  extend Orb::Internal::Type::Enum
2467
4508
 
@@ -2472,18 +4513,63 @@ module Orb
2472
4513
  ONE_TIME = :one_time
2473
4514
  CUSTOM = :custom
2474
4515
 
2475
- # @!method self.values
2476
- # @return [Array<Symbol>]
4516
+ # @!method self.values
4517
+ # @return [Array<Symbol>]
4518
+ end
4519
+
4520
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config
4521
+ class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel
4522
+ # @!attribute grouping_key
4523
+ # The event property used to group before applying thresholds
4524
+ #
4525
+ # @return [String]
4526
+ required :grouping_key, String
4527
+
4528
+ # @!attribute maximum_charge
4529
+ # The maximum amount to charge each group
4530
+ #
4531
+ # @return [String]
4532
+ required :maximum_charge, String
4533
+
4534
+ # @!attribute minimum_charge
4535
+ # The minimum amount to charge each group, regardless of usage
4536
+ #
4537
+ # @return [String]
4538
+ required :minimum_charge, String
4539
+
4540
+ # @!attribute per_unit_rate
4541
+ # The base price charged per group
4542
+ #
4543
+ # @return [String]
4544
+ required :per_unit_rate, String
4545
+
4546
+ # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:)
4547
+ # Configuration for grouped_with_min_max_thresholds pricing
4548
+ #
4549
+ # @param grouping_key [String] The event property used to group before applying thresholds
4550
+ #
4551
+ # @param maximum_charge [String] The maximum amount to charge each group
4552
+ #
4553
+ # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage
4554
+ #
4555
+ # @param per_unit_rate [String] The base price charged per group
2477
4556
  end
2478
4557
  end
2479
4558
 
2480
- class TieredWithProration < Orb::Internal::Type::BaseModel
4559
+ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel
2481
4560
  # @!attribute cadence
2482
4561
  # The cadence to bill for this price on.
2483
4562
  #
2484
- # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence]
4563
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence]
2485
4564
  required :cadence,
2486
- enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence }
4565
+ enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence }
4566
+
4567
+ # @!attribute cumulative_grouped_allocation_config
4568
+ # Configuration for cumulative_grouped_allocation pricing
4569
+ #
4570
+ # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig]
4571
+ required :cumulative_grouped_allocation_config,
4572
+ -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig }
2487
4573
 
2488
4574
  # @!attribute item_id
2489
4575
  # The id of the item the price will be associated with.
@@ -2494,8 +4580,8 @@ module Orb
2494
4580
  # @!attribute model_type
2495
4581
  # The pricing model type
2496
4582
  #
2497
- # @return [Symbol, :tiered_with_proration]
2498
- required :model_type, const: :tiered_with_proration
4583
+ # @return [Symbol, :cumulative_grouped_allocation]
4584
+ required :model_type, const: :cumulative_grouped_allocation
2499
4585
 
2500
4586
  # @!attribute name
2501
4587
  # The name of the price.
@@ -2503,13 +4589,6 @@ module Orb
2503
4589
  # @return [String]
2504
4590
  required :name, String
2505
4591
 
2506
- # @!attribute tiered_with_proration_config
2507
- # Configuration for tiered_with_proration pricing
2508
- #
2509
- # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig]
2510
- required :tiered_with_proration_config,
2511
- -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig }
2512
-
2513
4592
  # @!attribute billable_metric_id
2514
4593
  # The id of the billable metric for the price. Only needed if the price is
2515
4594
  # usage-based.
@@ -2541,11 +4620,7 @@ module Orb
2541
4620
  # The configuration for the rate of the price currency to the invoicing currency.
2542
4621
  #
2543
4622
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
2544
- optional :conversion_rate_config,
2545
- union: -> {
2546
- Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::ConversionRateConfig
2547
- },
2548
- nil?: true
4623
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
2549
4624
 
2550
4625
  # @!attribute currency
2551
4626
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -2611,19 +4686,19 @@ module Orb
2611
4686
  # @return [String, nil]
2612
4687
  optional :reference_id, String, nil?: true
2613
4688
 
2614
- # @!method initialize(cadence:, item_id:, name:, tiered_with_proration_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :tiered_with_proration)
4689
+ # @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation)
2615
4690
  # Some parameter documentations has been truncated, see
2616
- # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration}
4691
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation}
2617
4692
  # for more details.
2618
4693
  #
2619
- # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on.
4694
+ # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on.
4695
+ #
4696
+ # @param cumulative_grouped_allocation_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing
2620
4697
  #
2621
4698
  # @param item_id [String] The id of the item the price will be associated with.
2622
4699
  #
2623
4700
  # @param name [String] The name of the price.
2624
4701
  #
2625
- # @param tiered_with_proration_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing
2626
- #
2627
4702
  # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
2628
4703
  #
2629
4704
  # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
@@ -2652,11 +4727,11 @@ module Orb
2652
4727
  #
2653
4728
  # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
2654
4729
  #
2655
- # @param model_type [Symbol, :tiered_with_proration] The pricing model type
4730
+ # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type
2656
4731
 
2657
4732
  # The cadence to bill for this price on.
2658
4733
  #
2659
- # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration#cadence
4734
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation#cadence
2660
4735
  module Cadence
2661
4736
  extend Orb::Internal::Type::Enum
2662
4737
 
@@ -2671,66 +4746,59 @@ module Orb
2671
4746
  # @return [Array<Symbol>]
2672
4747
  end
2673
4748
 
2674
- # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration#tiered_with_proration_config
2675
- class TieredWithProrationConfig < Orb::Internal::Type::BaseModel
2676
- # @!attribute tiers
2677
- # Tiers for rating based on total usage quantities into the specified tier with
2678
- # proration
4749
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config
4750
+ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel
4751
+ # @!attribute cumulative_allocation
4752
+ # The overall allocation across all groups
2679
4753
  #
2680
- # @return [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier>]
2681
- required :tiers,
2682
- -> do
2683
- Orb::Internal::Type::ArrayOf[
2684
- Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier
2685
- ]
2686
- end
4754
+ # @return [String]
4755
+ required :cumulative_allocation, String
2687
4756
 
2688
- # @!method initialize(tiers:)
2689
- # Some parameter documentations has been truncated, see
2690
- # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig}
2691
- # for more details.
2692
- #
2693
- # Configuration for tiered_with_proration pricing
4757
+ # @!attribute group_allocation
4758
+ # The allocation per individual group
2694
4759
  #
2695
- # @param tiers [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier>] Tiers for rating based on total usage quantities into the specified tier with pr
4760
+ # @return [String]
4761
+ required :group_allocation, String
2696
4762
 
2697
- class Tier < Orb::Internal::Type::BaseModel
2698
- # @!attribute tier_lower_bound
2699
- # Inclusive tier starting value
2700
- #
2701
- # @return [String]
2702
- required :tier_lower_bound, String
4763
+ # @!attribute grouping_key
4764
+ # The event property used to group usage before applying allocations
4765
+ #
4766
+ # @return [String]
4767
+ required :grouping_key, String
2703
4768
 
2704
- # @!attribute unit_amount
2705
- # Amount per unit
2706
- #
2707
- # @return [String]
2708
- required :unit_amount, String
4769
+ # @!attribute unit_amount
4770
+ # The amount to charge for each unit outside of the allocation
4771
+ #
4772
+ # @return [String]
4773
+ required :unit_amount, String
2709
4774
 
2710
- # @!method initialize(tier_lower_bound:, unit_amount:)
2711
- # Configuration for a single tiered with proration tier
2712
- #
2713
- # @param tier_lower_bound [String] Inclusive tier starting value
2714
- #
2715
- # @param unit_amount [String] Amount per unit
2716
- end
4775
+ # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:)
4776
+ # Configuration for cumulative_grouped_allocation pricing
4777
+ #
4778
+ # @param cumulative_allocation [String] The overall allocation across all groups
4779
+ #
4780
+ # @param group_allocation [String] The allocation per individual group
4781
+ #
4782
+ # @param grouping_key [String] The event property used to group usage before applying allocations
4783
+ #
4784
+ # @param unit_amount [String] The amount to charge for each unit outside of the allocation
2717
4785
  end
2718
4786
  end
2719
4787
 
2720
- class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel
4788
+ class DailyCreditAllowance < Orb::Internal::Type::BaseModel
2721
4789
  # @!attribute cadence
2722
4790
  # The cadence to bill for this price on.
2723
4791
  #
2724
- # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence]
4792
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence]
2725
4793
  required :cadence,
2726
- enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence }
4794
+ enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence }
2727
4795
 
2728
- # @!attribute grouped_with_min_max_thresholds_config
2729
- # Configuration for grouped_with_min_max_thresholds pricing
4796
+ # @!attribute daily_credit_allowance_config
4797
+ # Configuration for daily_credit_allowance pricing
2730
4798
  #
2731
- # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig]
2732
- required :grouped_with_min_max_thresholds_config,
2733
- -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig }
4799
+ # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig]
4800
+ required :daily_credit_allowance_config,
4801
+ -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig }
2734
4802
 
2735
4803
  # @!attribute item_id
2736
4804
  # The id of the item the price will be associated with.
@@ -2741,8 +4809,8 @@ module Orb
2741
4809
  # @!attribute model_type
2742
4810
  # The pricing model type
2743
4811
  #
2744
- # @return [Symbol, :grouped_with_min_max_thresholds]
2745
- required :model_type, const: :grouped_with_min_max_thresholds
4812
+ # @return [Symbol, :daily_credit_allowance]
4813
+ required :model_type, const: :daily_credit_allowance
2746
4814
 
2747
4815
  # @!attribute name
2748
4816
  # The name of the price.
@@ -2781,11 +4849,7 @@ module Orb
2781
4849
  # The configuration for the rate of the price currency to the invoicing currency.
2782
4850
  #
2783
4851
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
2784
- optional :conversion_rate_config,
2785
- union: -> {
2786
- Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig
2787
- },
2788
- nil?: true
4852
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
2789
4853
 
2790
4854
  # @!attribute currency
2791
4855
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -2851,14 +4915,14 @@ module Orb
2851
4915
  # @return [String, nil]
2852
4916
  optional :reference_id, String, nil?: true
2853
4917
 
2854
- # @!method initialize(cadence:, grouped_with_min_max_thresholds_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :grouped_with_min_max_thresholds)
4918
+ # @!method initialize(cadence:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :daily_credit_allowance)
2855
4919
  # Some parameter documentations has been truncated, see
2856
- # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds}
4920
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance}
2857
4921
  # for more details.
2858
4922
  #
2859
- # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on.
4923
+ # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on.
2860
4924
  #
2861
- # @param grouped_with_min_max_thresholds_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing
4925
+ # @param daily_credit_allowance_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing
2862
4926
  #
2863
4927
  # @param item_id [String] The id of the item the price will be associated with.
2864
4928
  #
@@ -2892,11 +4956,11 @@ module Orb
2892
4956
  #
2893
4957
  # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
2894
4958
  #
2895
- # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type
4959
+ # @param model_type [Symbol, :daily_credit_allowance] The pricing model type
2896
4960
 
2897
4961
  # The cadence to bill for this price on.
2898
4962
  #
2899
- # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds#cadence
4963
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance#cadence
2900
4964
  module Cadence
2901
4965
  extend Orb::Internal::Type::Enum
2902
4966
 
@@ -2911,59 +4975,99 @@ module Orb
2911
4975
  # @return [Array<Symbol>]
2912
4976
  end
2913
4977
 
2914
- # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config
2915
- class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel
2916
- # @!attribute grouping_key
2917
- # The event property used to group before applying thresholds
4978
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance#daily_credit_allowance_config
4979
+ class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel
4980
+ # @!attribute daily_allowance
4981
+ # Credits granted per day. Lose-it-or-use-it; does not roll over.
2918
4982
  #
2919
4983
  # @return [String]
2920
- required :grouping_key, String
4984
+ required :daily_allowance, String
2921
4985
 
2922
- # @!attribute maximum_charge
2923
- # The maximum amount to charge each group
4986
+ # @!attribute default_unit_amount
4987
+ # Default per-unit credit rate for any usage not bucketed into a specified
4988
+ # matrix_value
2924
4989
  #
2925
4990
  # @return [String]
2926
- required :maximum_charge, String
4991
+ required :default_unit_amount, String
2927
4992
 
2928
- # @!attribute minimum_charge
2929
- # The minimum amount to charge each group, regardless of usage
4993
+ # @!attribute dimensions
4994
+ # One or two event property values to evaluate matrix groups by
2930
4995
  #
2931
- # @return [String]
2932
- required :minimum_charge, String
4996
+ # @return [Array<String, nil>]
4997
+ required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true]
2933
4998
 
2934
- # @!attribute per_unit_rate
2935
- # The base price charged per group
4999
+ # @!attribute event_day_property
5000
+ # Event property whose value identifies the day bucket the event belongs to (e.g.
5001
+ # 'event_day' set to an ISO date string in the customer's timezone). The allowance
5002
+ # resets per distinct value of this property.
2936
5003
  #
2937
5004
  # @return [String]
2938
- required :per_unit_rate, String
5005
+ required :event_day_property, String
2939
5006
 
2940
- # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:)
2941
- # Configuration for grouped_with_min_max_thresholds pricing
5007
+ # @!attribute matrix_values
5008
+ # Per-dimension credit rates
2942
5009
  #
2943
- # @param grouping_key [String] The event property used to group before applying thresholds
5010
+ # @return [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue>]
5011
+ required :matrix_values,
5012
+ -> do
5013
+ Orb::Internal::Type::ArrayOf[
5014
+ Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue
5015
+ ]
5016
+ end
5017
+
5018
+ # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:)
5019
+ # Some parameter documentations has been truncated, see
5020
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig}
5021
+ # for more details.
2944
5022
  #
2945
- # @param maximum_charge [String] The maximum amount to charge each group
5023
+ # Configuration for daily_credit_allowance pricing
2946
5024
  #
2947
- # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage
5025
+ # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over.
2948
5026
  #
2949
- # @param per_unit_rate [String] The base price charged per group
5027
+ # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified
5028
+ # matrix\_
5029
+ #
5030
+ # @param dimensions [Array<String, nil>] One or two event property values to evaluate matrix groups by
5031
+ #
5032
+ # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g.
5033
+ #
5034
+ # @param matrix_values [Array<Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue>] Per-dimension credit rates
5035
+
5036
+ class MatrixValue < Orb::Internal::Type::BaseModel
5037
+ # @!attribute dimension_values
5038
+ # One or two matrix keys to filter usage to this value by. For example, ["model"]
5039
+ # could be used to apply a different credit rate to each AI model.
5040
+ #
5041
+ # @return [Array<String, nil>]
5042
+ required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true]
5043
+
5044
+ # @!attribute unit_amount
5045
+ # Credits charged per unit of usage matching the specified dimension_values
5046
+ #
5047
+ # @return [String]
5048
+ required :unit_amount, String
5049
+
5050
+ # @!method initialize(dimension_values:, unit_amount:)
5051
+ # Some parameter documentations has been truncated, see
5052
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue}
5053
+ # for more details.
5054
+ #
5055
+ # Per-dimension credit price for the daily credit allowance model.
5056
+ #
5057
+ # @param dimension_values [Array<String, nil>] One or two matrix keys to filter usage to this value by. For example, ["model"]
5058
+ #
5059
+ # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values
5060
+ end
2950
5061
  end
2951
5062
  end
2952
5063
 
2953
- class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel
5064
+ class MeteredAllowance < Orb::Internal::Type::BaseModel
2954
5065
  # @!attribute cadence
2955
5066
  # The cadence to bill for this price on.
2956
5067
  #
2957
- # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence]
5068
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence]
2958
5069
  required :cadence,
2959
- enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence }
2960
-
2961
- # @!attribute cumulative_grouped_allocation_config
2962
- # Configuration for cumulative_grouped_allocation pricing
2963
- #
2964
- # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig]
2965
- required :cumulative_grouped_allocation_config,
2966
- -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig }
5070
+ enum: -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence }
2967
5071
 
2968
5072
  # @!attribute item_id
2969
5073
  # The id of the item the price will be associated with.
@@ -2971,11 +5075,18 @@ module Orb
2971
5075
  # @return [String]
2972
5076
  required :item_id, String
2973
5077
 
5078
+ # @!attribute metered_allowance_config
5079
+ # Configuration for metered_allowance pricing
5080
+ #
5081
+ # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig]
5082
+ required :metered_allowance_config,
5083
+ -> { Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig }
5084
+
2974
5085
  # @!attribute model_type
2975
5086
  # The pricing model type
2976
5087
  #
2977
- # @return [Symbol, :cumulative_grouped_allocation]
2978
- required :model_type, const: :cumulative_grouped_allocation
5088
+ # @return [Symbol, :metered_allowance]
5089
+ required :model_type, const: :metered_allowance
2979
5090
 
2980
5091
  # @!attribute name
2981
5092
  # The name of the price.
@@ -3014,11 +5125,7 @@ module Orb
3014
5125
  # The configuration for the rate of the price currency to the invoicing currency.
3015
5126
  #
3016
5127
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
3017
- optional :conversion_rate_config,
3018
- union: -> {
3019
- Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::ConversionRateConfig
3020
- },
3021
- nil?: true
5128
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
3022
5129
 
3023
5130
  # @!attribute currency
3024
5131
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -3084,17 +5191,17 @@ module Orb
3084
5191
  # @return [String, nil]
3085
5192
  optional :reference_id, String, nil?: true
3086
5193
 
3087
- # @!method initialize(cadence:, cumulative_grouped_allocation_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :cumulative_grouped_allocation)
5194
+ # @!method initialize(cadence:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, currency: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, reference_id: nil, model_type: :metered_allowance)
3088
5195
  # Some parameter documentations has been truncated, see
3089
- # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation}
5196
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance}
3090
5197
  # for more details.
3091
5198
  #
3092
- # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on.
3093
- #
3094
- # @param cumulative_grouped_allocation_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing
5199
+ # @param cadence [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::Cadence] The cadence to bill for this price on.
3095
5200
  #
3096
5201
  # @param item_id [String] The id of the item the price will be associated with.
3097
5202
  #
5203
+ # @param metered_allowance_config [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing
5204
+ #
3098
5205
  # @param name [String] The name of the price.
3099
5206
  #
3100
5207
  # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
@@ -3125,11 +5232,11 @@ module Orb
3125
5232
  #
3126
5233
  # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
3127
5234
  #
3128
- # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type
5235
+ # @param model_type [Symbol, :metered_allowance] The pricing model type
3129
5236
 
3130
5237
  # The cadence to bill for this price on.
3131
5238
  #
3132
- # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation#cadence
5239
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance#cadence
3133
5240
  module Cadence
3134
5241
  extend Orb::Internal::Type::Enum
3135
5242
 
@@ -3144,42 +5251,67 @@ module Orb
3144
5251
  # @return [Array<Symbol>]
3145
5252
  end
3146
5253
 
3147
- # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config
3148
- class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel
3149
- # @!attribute cumulative_allocation
3150
- # The overall allocation across all groups
5254
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance#metered_allowance_config
5255
+ class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel
5256
+ # @!attribute allowance_grouping_value
5257
+ # The grouping_key value whose summed quantity represents the allowance for this
5258
+ # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
5259
+ # — credit can never exceed actual usage.
3151
5260
  #
3152
5261
  # @return [String]
3153
- required :cumulative_allocation, String
5262
+ required :allowance_grouping_value, String
3154
5263
 
3155
- # @!attribute group_allocation
3156
- # The allocation per individual group
5264
+ # @!attribute consumption_grouping_value
5265
+ # The grouping_key value whose summed quantity represents consumption (e.g.
5266
+ # 'download'). Charged at unit_amount.
3157
5267
  #
3158
5268
  # @return [String]
3159
- required :group_allocation, String
5269
+ required :consumption_grouping_value, String
3160
5270
 
3161
5271
  # @!attribute grouping_key
3162
- # The event property used to group usage before applying allocations
5272
+ # Event property used to partition the metric into consumption and allowance
5273
+ # quantities (e.g. 'event_name'). The metric is queried with this key and the two
5274
+ # values below select which partition is which.
3163
5275
  #
3164
5276
  # @return [String]
3165
5277
  required :grouping_key, String
3166
5278
 
3167
5279
  # @!attribute unit_amount
3168
- # The amount to charge for each unit outside of the allocation
5280
+ # Per-unit price applied to gross consumption and to the allowance credit.
3169
5281
  #
3170
5282
  # @return [String]
3171
5283
  required :unit_amount, String
3172
5284
 
3173
- # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:)
3174
- # Configuration for cumulative_grouped_allocation pricing
5285
+ # @!attribute allowance_display_name
5286
+ # Sub-line label for the credit row (e.g. 'Up to 3x free egress').
3175
5287
  #
3176
- # @param cumulative_allocation [String] The overall allocation across all groups
5288
+ # @return [String, nil]
5289
+ optional :allowance_display_name, String
5290
+
5291
+ # @!attribute consumption_display_name
5292
+ # Sub-line label for the gross consumption row (e.g. 'bytes gotten').
3177
5293
  #
3178
- # @param group_allocation [String] The allocation per individual group
5294
+ # @return [String, nil]
5295
+ optional :consumption_display_name, String
5296
+
5297
+ # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil)
5298
+ # Some parameter documentations has been truncated, see
5299
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig}
5300
+ # for more details.
3179
5301
  #
3180
- # @param grouping_key [String] The event property used to group usage before applying allocations
5302
+ # Configuration for metered_allowance pricing
3181
5303
  #
3182
- # @param unit_amount [String] The amount to charge for each unit outside of the allocation
5304
+ # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p
5305
+ #
5306
+ # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl
5307
+ #
5308
+ # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant
5309
+ #
5310
+ # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit.
5311
+ #
5312
+ # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress').
5313
+ #
5314
+ # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten').
3183
5315
  end
3184
5316
  end
3185
5317
 
@@ -3247,11 +5379,7 @@ module Orb
3247
5379
  # The configuration for the rate of the price currency to the invoicing currency.
3248
5380
  #
3249
5381
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
3250
- optional :conversion_rate_config,
3251
- union: -> {
3252
- Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent::ConversionRateConfig
3253
- },
3254
- nil?: true
5382
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
3255
5383
 
3256
5384
  # @!attribute currency
3257
5385
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -3380,15 +5508,45 @@ module Orb
3380
5508
  # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent#percent_config
3381
5509
  class PercentConfig < Orb::Internal::Type::BaseModel
3382
5510
  # @!attribute percent
3383
- # What percent of the component subtotals to charge
5511
+ # Fraction of the component subtotals to charge (0 < percent <= 1).
3384
5512
  #
3385
5513
  # @return [Float]
3386
5514
  required :percent, Float
3387
5515
 
3388
- # @!method initialize(percent:)
5516
+ # @!attribute maximum_amount
5517
+ # Maximum amount to charge. If unset, the fee has no upper bound.
5518
+ #
5519
+ # @return [String, nil]
5520
+ optional :maximum_amount, String, nil?: true
5521
+
5522
+ # @!attribute minimum_amount
5523
+ # Minimum amount to charge. If unset, the fee is bounded below by 0.
5524
+ #
5525
+ # @return [String, nil]
5526
+ optional :minimum_amount, String, nil?: true
5527
+
5528
+ # @!attribute prorated
5529
+ # If true, the minimum_amount is prorated based on the service period. The
5530
+ # maximum_amount is an absolute cap (never prorated), and the percent applied to
5531
+ # upstream subtotals is never prorated either.
5532
+ #
5533
+ # @return [Boolean, nil]
5534
+ optional :prorated, Orb::Internal::Type::Boolean
5535
+
5536
+ # @!method initialize(percent:, maximum_amount: nil, minimum_amount: nil, prorated: nil)
5537
+ # Some parameter documentations has been truncated, see
5538
+ # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent::PercentConfig}
5539
+ # for more details.
5540
+ #
3389
5541
  # Configuration for percent pricing
3390
5542
  #
3391
- # @param percent [Float] What percent of the component subtotals to charge
5543
+ # @param percent [Float] Fraction of the component subtotals to charge (0 < percent <= 1).
5544
+ #
5545
+ # @param maximum_amount [String, nil] Maximum amount to charge. If unset, the fee has no upper bound.
5546
+ #
5547
+ # @param minimum_amount [String, nil] Minimum amount to charge. If unset, the fee is bounded below by 0.
5548
+ #
5549
+ # @param prorated [Boolean] If true, the minimum_amount is prorated based on the service period. The maximum
3392
5550
  end
3393
5551
  end
3394
5552
 
@@ -3456,11 +5614,7 @@ module Orb
3456
5614
  # The configuration for the rate of the price currency to the invoicing currency.
3457
5615
  #
3458
5616
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
3459
- optional :conversion_rate_config,
3460
- union: -> {
3461
- Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput::ConversionRateConfig
3462
- },
3463
- nil?: true
5617
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
3464
5618
 
3465
5619
  # @!attribute currency
3466
5620
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -3625,7 +5779,7 @@ module Orb
3625
5779
  end
3626
5780
 
3627
5781
  # @!method self.variants
3628
- # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput)]
5782
+ # @return [Array(Orb::Models::NewSubscriptionUnitPrice, Orb::Models::NewSubscriptionTieredPrice, Orb::Models::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewSubscriptionPackagePrice, Orb::Models::NewSubscriptionMatrixPrice, Orb::Models::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::NewSubscriptionTieredPackagePrice, Orb::Models::NewSubscriptionTieredWithMinimumPrice, Orb::Models::NewSubscriptionGroupedTieredPrice, Orb::Models::NewSubscriptionTieredPackageWithMinimumPrice, Orb::Models::NewSubscriptionPackageWithAllocationPrice, Orb::Models::NewSubscriptionUnitWithPercentPrice, Orb::Models::NewSubscriptionMatrixWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewSubscriptionUnitWithProrationPrice, Orb::Models::NewSubscriptionGroupedAllocationPrice, Orb::Models::NewSubscriptionBulkWithProrationPrice, Orb::Models::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::NewSubscriptionGroupedTieredPackagePrice, Orb::Models::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewSubscriptionMinimumCompositePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::Percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::EventOutput)]
3629
5783
  end
3630
5784
  end
3631
5785
  end