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 plan_id
11
+ #
12
+ # @return [String]
13
+ required :plan_id, String
14
+
10
15
  # @!attribute version
11
16
  # New version number.
12
17
  #
@@ -67,7 +72,9 @@ module Orb
67
72
  # @return [Boolean, nil]
68
73
  optional :set_as_default, Orb::Internal::Type::Boolean, nil?: true
69
74
 
70
- # @!method initialize(version:, add_adjustments: nil, add_prices: nil, remove_adjustments: nil, remove_prices: nil, replace_adjustments: nil, replace_prices: nil, set_as_default: nil, request_options: {})
75
+ # @!method initialize(plan_id:, version:, add_adjustments: nil, add_prices: nil, remove_adjustments: nil, remove_prices: nil, replace_adjustments: nil, replace_prices: nil, set_as_default: nil, request_options: {})
76
+ # @param plan_id [String]
77
+ #
71
78
  # @param version [Integer] New version number.
72
79
  #
73
80
  # @param add_adjustments [Array<Orb::Models::BetaCreatePlanVersionParams::AddAdjustment>, nil] Additional adjustments to be added to the plan.
@@ -90,7 +97,7 @@ module Orb
90
97
  # @!attribute adjustment
91
98
  # The definition of a new adjustment to create and add to the plan.
92
99
  #
93
- # @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum]
100
+ # @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount]
94
101
  required :adjustment, union: -> { Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment }
95
102
 
96
103
  # @!attribute plan_phase_order
@@ -100,7 +107,7 @@ module Orb
100
107
  optional :plan_phase_order, Integer, nil?: true
101
108
 
102
109
  # @!method initialize(adjustment:, plan_phase_order: nil)
103
- # @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 plan.
110
+ # @param adjustment [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount] The definition of a new adjustment to create and add to the plan.
104
111
  #
105
112
  # @param plan_phase_order [Integer, nil] The phase to add this adjustment to.
106
113
 
@@ -122,8 +129,215 @@ module Orb
122
129
 
123
130
  variant :maximum, -> { Orb::NewMaximum }
124
131
 
132
+ variant :tiered_percentage_discount,
133
+ -> { Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount }
134
+
135
+ class TieredPercentageDiscount < Orb::Internal::Type::BaseModel
136
+ # @!attribute adjustment_type
137
+ #
138
+ # @return [Symbol, :tiered_percentage_discount]
139
+ required :adjustment_type, const: :tiered_percentage_discount
140
+
141
+ # @!attribute tiers
142
+ #
143
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Tier>]
144
+ required :tiers,
145
+ -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Tier] }
146
+
147
+ # @!attribute applies_to_all
148
+ # If set, the adjustment will apply to every price on the subscription.
149
+ #
150
+ # @return [Boolean, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount::AppliesToAll, nil]
151
+ optional :applies_to_all,
152
+ enum: -> {
153
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount::AppliesToAll
154
+ },
155
+ nil?: true
156
+
157
+ # @!attribute applies_to_item_ids
158
+ # The set of item IDs to which this adjustment applies.
159
+ #
160
+ # @return [Array<String>, nil]
161
+ optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
162
+
163
+ # @!attribute applies_to_price_ids
164
+ # The set of price IDs to which this adjustment applies.
165
+ #
166
+ # @return [Array<String>, nil]
167
+ optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
168
+
169
+ # @!attribute currency
170
+ # If set, only prices in the specified currency will have the adjustment applied.
171
+ #
172
+ # @return [String, nil]
173
+ optional :currency, String, nil?: true
174
+
175
+ # @!attribute filters
176
+ # A list of filters that determine which prices this adjustment will apply to.
177
+ #
178
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter>, nil]
179
+ optional :filters,
180
+ -> {
181
+ Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter]
182
+ },
183
+ nil?: true
184
+
185
+ # @!attribute is_invoice_level
186
+ # When false, this adjustment will be applied to a single price. Otherwise, it
187
+ # will be applied at the invoice level, possibly to multiple prices.
188
+ #
189
+ # @return [Boolean, nil]
190
+ optional :is_invoice_level, Orb::Internal::Type::Boolean
191
+
192
+ # @!attribute price_type
193
+ # If set, only prices of the specified type will have the adjustment applied.
194
+ #
195
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount::PriceType, nil]
196
+ optional :price_type,
197
+ enum: -> {
198
+ Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount::PriceType
199
+ },
200
+ nil?: true
201
+
202
+ # @!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)
203
+ # Some parameter documentations has been truncated, see
204
+ # {Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount}
205
+ # for more details.
206
+ #
207
+ # @param tiers [Array<Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Tier>]
208
+ #
209
+ # @param applies_to_all [Boolean, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
210
+ #
211
+ # @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
212
+ #
213
+ # @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
214
+ #
215
+ # @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
216
+ #
217
+ # @param filters [Array<Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
218
+ #
219
+ # @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
220
+ #
221
+ # @param price_type [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
222
+ #
223
+ # @param adjustment_type [Symbol, :tiered_percentage_discount]
224
+
225
+ class Tier < Orb::Internal::Type::BaseModel
226
+ # @!attribute lower_bound
227
+ # Exclusive lower bound of cumulative spend for this tier.
228
+ #
229
+ # @return [Float]
230
+ required :lower_bound, Float
231
+
232
+ # @!attribute percentage
233
+ # The percentage (0-1) discounted from spend in this tier.
234
+ #
235
+ # @return [Float]
236
+ required :percentage, Float
237
+
238
+ # @!attribute upper_bound
239
+ # Inclusive upper bound of cumulative spend; null for the final open-ended tier.
240
+ #
241
+ # @return [Float, nil]
242
+ optional :upper_bound, Float, nil?: true
243
+
244
+ # @!method initialize(lower_bound:, percentage:, upper_bound: nil)
245
+ # @param lower_bound [Float] Exclusive lower bound of cumulative spend for this tier.
246
+ #
247
+ # @param percentage [Float] The percentage (0-1) discounted from spend in this tier.
248
+ #
249
+ # @param upper_bound [Float, nil] Inclusive upper bound of cumulative spend; null for the final open-ended tier.
250
+ end
251
+
252
+ # If set, the adjustment will apply to every price on the subscription.
253
+ #
254
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount#applies_to_all
255
+ module AppliesToAll
256
+ extend Orb::Internal::Type::Enum
257
+
258
+ TRUE = true
259
+
260
+ # @!method self.values
261
+ # @return [Array<Boolean>]
262
+ end
263
+
264
+ class Filter < Orb::Internal::Type::BaseModel
265
+ # @!attribute field
266
+ # The property of the price to filter on.
267
+ #
268
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter::Field]
269
+ required :field,
270
+ enum: -> { Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter::Field }
271
+
272
+ # @!attribute operator
273
+ # Should prices that match the filter be included or excluded.
274
+ #
275
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter::Operator]
276
+ required :operator,
277
+ enum: -> { Orb::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter::Operator }
278
+
279
+ # @!attribute values
280
+ # The IDs or values that match this filter.
281
+ #
282
+ # @return [Array<String>]
283
+ required :values, Orb::Internal::Type::ArrayOf[String]
284
+
285
+ # @!method initialize(field:, operator:, values:)
286
+ # @param field [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter::Field] The property of the price to filter on.
287
+ #
288
+ # @param operator [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
289
+ #
290
+ # @param values [Array<String>] The IDs or values that match this filter.
291
+
292
+ # The property of the price to filter on.
293
+ #
294
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter#field
295
+ module Field
296
+ extend Orb::Internal::Type::Enum
297
+
298
+ PRICE_ID = :price_id
299
+ ITEM_ID = :item_id
300
+ PRICE_TYPE = :price_type
301
+ CURRENCY = :currency
302
+ PRICING_UNIT_ID = :pricing_unit_id
303
+
304
+ # @!method self.values
305
+ # @return [Array<Symbol>]
306
+ end
307
+
308
+ # Should prices that match the filter be included or excluded.
309
+ #
310
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount::Filter#operator
311
+ module Operator
312
+ extend Orb::Internal::Type::Enum
313
+
314
+ INCLUDES = :includes
315
+ EXCLUDES = :excludes
316
+
317
+ # @!method self.values
318
+ # @return [Array<Symbol>]
319
+ end
320
+ end
321
+
322
+ # If set, only prices of the specified type will have the adjustment applied.
323
+ #
324
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount#price_type
325
+ module PriceType
326
+ extend Orb::Internal::Type::Enum
327
+
328
+ USAGE = :usage
329
+ FIXED_IN_ADVANCE = :fixed_in_advance
330
+ FIXED_IN_ARREARS = :fixed_in_arrears
331
+ FIXED = :fixed
332
+ IN_ARREARS = :in_arrears
333
+
334
+ # @!method self.values
335
+ # @return [Array<Symbol>]
336
+ end
337
+ end
338
+
125
339
  # @!method self.variants
126
- # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)]
340
+ # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum, Orb::Models::BetaCreatePlanVersionParams::AddAdjustment::Adjustment::TieredPercentageDiscount)]
127
341
  end
128
342
  end
129
343
 
@@ -134,6 +348,14 @@ module Orb
134
348
  # @return [Orb::Models::NewAllocationPrice, nil]
135
349
  optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true
136
350
 
351
+ # @!attribute license_allocation_price
352
+ # The license allocation price to add to the plan.
353
+ #
354
+ # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice, nil]
355
+ optional :license_allocation_price,
356
+ -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice },
357
+ nil?: true
358
+
137
359
  # @!attribute plan_phase_order
138
360
  # The phase to add this price to.
139
361
  #
@@ -143,15 +365,257 @@ module Orb
143
365
  # @!attribute price
144
366
  # New plan price request body params.
145
367
  #
146
- # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil]
368
+ # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil]
147
369
  optional :price, union: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price }, nil?: true
148
370
 
149
- # @!method initialize(allocation_price: nil, plan_phase_order: nil, price: nil)
371
+ # @!method initialize(allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil)
150
372
  # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan.
151
373
  #
374
+ # @param license_allocation_price [Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice, nil] The license allocation price to add to the plan.
375
+ #
152
376
  # @param plan_phase_order [Integer, nil] The phase to add this price to.
153
377
  #
154
- # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] New plan price request body params.
378
+ # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, nil] New plan price request body params.
379
+
380
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice#license_allocation_price
381
+ class LicenseAllocationPrice < Orb::Internal::Type::BaseModel
382
+ # @!attribute cadence
383
+ # The cadence to bill for this price on.
384
+ #
385
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence]
386
+ required :cadence,
387
+ enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence }
388
+
389
+ # @!attribute item_id
390
+ # The id of the item the price will be associated with.
391
+ #
392
+ # @return [String]
393
+ required :item_id, String
394
+
395
+ # @!attribute license_allocations
396
+ # License allocations to associate with this price. Each entry defines a
397
+ # per-license credit pool granted each cadence. Requires license_type_id or
398
+ # license_type_configuration to be set.
399
+ #
400
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation>]
401
+ required :license_allocations,
402
+ -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation] }
403
+
404
+ # @!attribute model_type
405
+ # The pricing model type
406
+ #
407
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType]
408
+ required :model_type,
409
+ enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType }
410
+
411
+ # @!attribute name
412
+ # The name of the price.
413
+ #
414
+ # @return [String]
415
+ required :name, String
416
+
417
+ # @!attribute unit_config
418
+ # Configuration for unit pricing
419
+ #
420
+ # @return [Orb::Models::UnitConfig]
421
+ required :unit_config, -> { Orb::UnitConfig }
422
+
423
+ # @!attribute billable_metric_id
424
+ # The id of the billable metric for the price. Only needed if the price is
425
+ # usage-based.
426
+ #
427
+ # @return [String, nil]
428
+ optional :billable_metric_id, String, nil?: true
429
+
430
+ # @!attribute billed_in_advance
431
+ # If the Price represents a fixed cost, the price will be billed in-advance if
432
+ # this is true, and in-arrears if this is false.
433
+ #
434
+ # @return [Boolean, nil]
435
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
436
+
437
+ # @!attribute billing_cycle_configuration
438
+ # For custom cadence: specifies the duration of the billing period in days or
439
+ # months.
440
+ #
441
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
442
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
443
+
444
+ # @!attribute conversion_rate
445
+ # The per unit conversion rate of the price currency to the invoicing currency.
446
+ #
447
+ # @return [Float, nil]
448
+ optional :conversion_rate, Float, nil?: true
449
+
450
+ # @!attribute conversion_rate_config
451
+ # The configuration for the rate of the price currency to the invoicing currency.
452
+ #
453
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
454
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
455
+
456
+ # @!attribute currency
457
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
458
+ # price is billed.
459
+ #
460
+ # @return [String, nil]
461
+ optional :currency, String, nil?: true
462
+
463
+ # @!attribute dimensional_price_configuration
464
+ # For dimensional price: specifies a price group and dimension values
465
+ #
466
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
467
+ optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true
468
+
469
+ # @!attribute external_price_id
470
+ # An alias for the price.
471
+ #
472
+ # @return [String, nil]
473
+ optional :external_price_id, String, nil?: true
474
+
475
+ # @!attribute fixed_price_quantity
476
+ # If the Price represents a fixed cost, this represents the quantity of units
477
+ # applied.
478
+ #
479
+ # @return [Float, nil]
480
+ optional :fixed_price_quantity, Float, nil?: true
481
+
482
+ # @!attribute invoice_grouping_key
483
+ # The property used to group this price on an invoice
484
+ #
485
+ # @return [String, nil]
486
+ optional :invoice_grouping_key, String, nil?: true
487
+
488
+ # @!attribute invoicing_cycle_configuration
489
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
490
+ # If unspecified, a single invoice is produced per billing cycle.
491
+ #
492
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
493
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
494
+
495
+ # @!attribute license_type_id
496
+ # The ID of the license type to associate with this price.
497
+ #
498
+ # @return [String, nil]
499
+ optional :license_type_id, String, nil?: true
500
+
501
+ # @!attribute metadata
502
+ # User-specified key/value pairs for the resource. Individual keys can be removed
503
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
504
+ # by setting `metadata` to `null`.
505
+ #
506
+ # @return [Hash{Symbol=>String, nil}, nil]
507
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
508
+
509
+ # @!attribute reference_id
510
+ # A transient ID that can be used to reference this price when adding adjustments
511
+ # in the same API call.
512
+ #
513
+ # @return [String, nil]
514
+ optional :reference_id, String, nil?: true
515
+
516
+ # @!method initialize(cadence:, item_id:, license_allocations:, model_type:, name:, unit_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)
517
+ # Some parameter documentations has been truncated, see
518
+ # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice} for
519
+ # more details.
520
+ #
521
+ # The license allocation price to add to the plan.
522
+ #
523
+ # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Cadence] The cadence to bill for this price on.
524
+ #
525
+ # @param item_id [String] The id of the item the price will be associated with.
526
+ #
527
+ # @param license_allocations [Array<Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::LicenseAllocation>] License allocations to associate with this price. Each entry defines a per-licen
528
+ #
529
+ # @param model_type [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ModelType] The pricing model type
530
+ #
531
+ # @param name [String] The name of the price.
532
+ #
533
+ # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing
534
+ #
535
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
536
+ #
537
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
538
+ #
539
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
540
+ #
541
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
542
+ #
543
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
544
+ #
545
+ # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr
546
+ #
547
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
548
+ #
549
+ # @param external_price_id [String, nil] An alias for the price.
550
+ #
551
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
552
+ #
553
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
554
+ #
555
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
556
+ #
557
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
558
+ #
559
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
560
+ #
561
+ # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
562
+
563
+ # The cadence to bill for this price on.
564
+ #
565
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice#cadence
566
+ module Cadence
567
+ extend Orb::Internal::Type::Enum
568
+
569
+ ANNUAL = :annual
570
+ SEMI_ANNUAL = :semi_annual
571
+ MONTHLY = :monthly
572
+ QUARTERLY = :quarterly
573
+ ONE_TIME = :one_time
574
+ CUSTOM = :custom
575
+
576
+ # @!method self.values
577
+ # @return [Array<Symbol>]
578
+ end
579
+
580
+ class LicenseAllocation < Orb::Internal::Type::BaseModel
581
+ # @!attribute amount
582
+ # The amount of credits granted per active license per cadence.
583
+ #
584
+ # @return [String]
585
+ required :amount, String
586
+
587
+ # @!attribute currency
588
+ # The currency of the license allocation.
589
+ #
590
+ # @return [String]
591
+ required :currency, String
592
+
593
+ # @!attribute write_off_overage
594
+ # When True, overage beyond the allocation is written off.
595
+ #
596
+ # @return [Boolean, nil]
597
+ optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true
598
+
599
+ # @!method initialize(amount:, currency:, write_off_overage: nil)
600
+ # @param amount [String] The amount of credits granted per active license per cadence.
601
+ #
602
+ # @param currency [String] The currency of the license allocation.
603
+ #
604
+ # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off.
605
+ end
606
+
607
+ # The pricing model type
608
+ #
609
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice#model_type
610
+ module ModelType
611
+ extend Orb::Internal::Type::Enum
612
+
613
+ UNIT = :unit
614
+
615
+ # @!method self.values
616
+ # @return [Array<Symbol>]
617
+ end
618
+ end
155
619
 
156
620
  # New plan price request body params.
157
621
  #
@@ -189,6 +653,9 @@ module Orb
189
653
 
190
654
  variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice }
191
655
 
656
+ variant :matrix_with_threshold_discounts,
657
+ -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts }
658
+
192
659
  variant :tiered_with_proration,
193
660
  -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration }
194
661
 
@@ -220,6 +687,11 @@ module Orb
220
687
  variant :cumulative_grouped_allocation,
221
688
  -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation }
222
689
 
690
+ variant :daily_credit_allowance,
691
+ -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance }
692
+
693
+ variant :metered_allowance, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance }
694
+
223
695
  variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice }
224
696
 
225
697
  variant :percent, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent }
@@ -290,11 +762,7 @@ module Orb
290
762
  # The configuration for the rate of the price currency to the invoicing currency.
291
763
  #
292
764
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
293
- optional :conversion_rate_config,
294
- union: -> {
295
- Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::ConversionRateConfig
296
- },
297
- nil?: true
765
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
298
766
 
299
767
  # @!attribute currency
300
768
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -487,13 +955,13 @@ module Orb
487
955
  end
488
956
  end
489
957
 
490
- class TieredWithProration < Orb::Internal::Type::BaseModel
958
+ class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel
491
959
  # @!attribute cadence
492
960
  # The cadence to bill for this price on.
493
961
  #
494
- # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence]
962
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence]
495
963
  required :cadence,
496
- enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence }
964
+ enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence }
497
965
 
498
966
  # @!attribute item_id
499
967
  # The id of the item the price will be associated with.
@@ -501,11 +969,18 @@ module Orb
501
969
  # @return [String]
502
970
  required :item_id, String
503
971
 
972
+ # @!attribute matrix_with_threshold_discounts_config
973
+ # Configuration for matrix_with_threshold_discounts pricing
974
+ #
975
+ # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig]
976
+ required :matrix_with_threshold_discounts_config,
977
+ -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig }
978
+
504
979
  # @!attribute model_type
505
980
  # The pricing model type
506
981
  #
507
- # @return [Symbol, :tiered_with_proration]
508
- required :model_type, const: :tiered_with_proration
982
+ # @return [Symbol, :matrix_with_threshold_discounts]
983
+ required :model_type, const: :matrix_with_threshold_discounts
509
984
 
510
985
  # @!attribute name
511
986
  # The name of the price.
@@ -513,13 +988,6 @@ module Orb
513
988
  # @return [String]
514
989
  required :name, String
515
990
 
516
- # @!attribute tiered_with_proration_config
517
- # Configuration for tiered_with_proration pricing
518
- #
519
- # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig]
520
- required :tiered_with_proration_config,
521
- -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig }
522
-
523
991
  # @!attribute billable_metric_id
524
992
  # The id of the billable metric for the price. Only needed if the price is
525
993
  # usage-based.
@@ -551,11 +1019,7 @@ module Orb
551
1019
  # The configuration for the rate of the price currency to the invoicing currency.
552
1020
  #
553
1021
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
554
- optional :conversion_rate_config,
555
- union: -> {
556
- Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::ConversionRateConfig
557
- },
558
- nil?: true
1022
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
559
1023
 
560
1024
  # @!attribute currency
561
1025
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -621,18 +1085,18 @@ module Orb
621
1085
  # @return [String, nil]
622
1086
  optional :reference_id, String, nil?: true
623
1087
 
624
- # @!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)
1088
+ # @!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)
625
1089
  # Some parameter documentations has been truncated, see
626
- # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration}
1090
+ # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts}
627
1091
  # for more details.
628
1092
  #
629
- # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on.
1093
+ # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on.
630
1094
  #
631
1095
  # @param item_id [String] The id of the item the price will be associated with.
632
1096
  #
633
- # @param name [String] The name of the price.
1097
+ # @param matrix_with_threshold_discounts_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing
634
1098
  #
635
- # @param tiered_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing
1099
+ # @param name [String] The name of the price.
636
1100
  #
637
1101
  # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
638
1102
  #
@@ -662,11 +1126,11 @@ module Orb
662
1126
  #
663
1127
  # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
664
1128
  #
665
- # @param model_type [Symbol, :tiered_with_proration] The pricing model type
1129
+ # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type
666
1130
 
667
1131
  # The cadence to bill for this price on.
668
1132
  #
669
- # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration#cadence
1133
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts#cadence
670
1134
  module Cadence
671
1135
  extend Orb::Internal::Type::Enum
672
1136
 
@@ -681,62 +1145,139 @@ module Orb
681
1145
  # @return [Array<Symbol>]
682
1146
  end
683
1147
 
684
- # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration#tiered_with_proration_config
685
- class TieredWithProrationConfig < Orb::Internal::Type::BaseModel
686
- # @!attribute tiers
687
- # Tiers for rating based on total usage quantities into the specified tier with
688
- # proration
1148
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config
1149
+ class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel
1150
+ # @!attribute default_unit_amount
1151
+ # Unit price used for usage that does not match any defined matrix cell.
689
1152
  #
690
- # @return [Array<Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier>]
691
- required :tiers,
692
- -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] }
1153
+ # @return [String]
1154
+ required :default_unit_amount, String
693
1155
 
694
- # @!method initialize(tiers:)
695
- # Some parameter documentations has been truncated, see
696
- # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig}
697
- # for more details.
1156
+ # @!attribute first_dimension
1157
+ # First matrix dimension key.
698
1158
  #
699
- # Configuration for tiered_with_proration pricing
1159
+ # @return [String]
1160
+ required :first_dimension, String
1161
+
1162
+ # @!attribute matrix_values
1163
+ # Per-cell unit prices.
700
1164
  #
701
- # @param tiers [Array<Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier>] Tiers for rating based on total usage quantities into the specified tier with pr
1165
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue>]
1166
+ required :matrix_values,
1167
+ -> do
1168
+ Orb::Internal::Type::ArrayOf[
1169
+ Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue
1170
+ ]
1171
+ end
702
1172
 
703
- class Tier < Orb::Internal::Type::BaseModel
704
- # @!attribute tier_lower_bound
705
- # Inclusive tier starting value
1173
+ # @!attribute second_dimension
1174
+ # Optional second matrix dimension key.
1175
+ #
1176
+ # @return [String, nil]
1177
+ optional :second_dimension, String, nil?: true
1178
+
1179
+ # @!attribute threshold_discount_groups
1180
+ #
1181
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup>, nil]
1182
+ optional :threshold_discount_groups,
1183
+ -> do
1184
+ Orb::Internal::Type::ArrayOf[
1185
+ Orb::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup
1186
+ ]
1187
+ end
1188
+
1189
+ # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil)
1190
+ # Configuration for matrix_with_threshold_discounts pricing
1191
+ #
1192
+ # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell.
1193
+ #
1194
+ # @param first_dimension [String] First matrix dimension key.
1195
+ #
1196
+ # @param matrix_values [Array<Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue>] Per-cell unit prices.
1197
+ #
1198
+ # @param second_dimension [String, nil] Optional second matrix dimension key.
1199
+ #
1200
+ # @param threshold_discount_groups [Array<Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup>]
1201
+
1202
+ class MatrixValue < Orb::Internal::Type::BaseModel
1203
+ # @!attribute first_dimension_value
706
1204
  #
707
1205
  # @return [String]
708
- required :tier_lower_bound, String
1206
+ required :first_dimension_value, String
709
1207
 
710
1208
  # @!attribute unit_amount
711
- # Amount per unit
712
1209
  #
713
1210
  # @return [String]
714
1211
  required :unit_amount, String
715
1212
 
716
- # @!method initialize(tier_lower_bound:, unit_amount:)
717
- # Configuration for a single tiered with proration tier
1213
+ # @!attribute second_dimension_value
718
1214
  #
719
- # @param tier_lower_bound [String] Inclusive tier starting value
1215
+ # @return [String, nil]
1216
+ optional :second_dimension_value, String, nil?: true
1217
+
1218
+ # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil)
1219
+ # @param first_dimension_value [String]
1220
+ # @param unit_amount [String]
1221
+ # @param second_dimension_value [String, nil]
1222
+ end
1223
+
1224
+ class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel
1225
+ # @!attribute above_threshold_discount_percentage
1226
+ # Discount rate applied to spend above the threshold.
720
1227
  #
721
- # @param unit_amount [String] Amount per unit
1228
+ # @return [String]
1229
+ required :above_threshold_discount_percentage, String
1230
+
1231
+ # @!attribute below_threshold_discount_percentage
1232
+ # Discount rate applied to spend at or below the threshold. Set to 0 for no
1233
+ # baseline discount.
1234
+ #
1235
+ # @return [String]
1236
+ required :below_threshold_discount_percentage, String
1237
+
1238
+ # @!attribute cell_coordinates
1239
+ # Semicolon-separated list of matrix cell coordinates targeted by this group. Each
1240
+ # coordinate is `first,second` when the matrix has two dimensions, or just `first`
1241
+ # for a single-dimension matrix. Example: `blue,circle;green,triangle`.
1242
+ #
1243
+ # @return [String]
1244
+ required :cell_coordinates, String
1245
+
1246
+ # @!attribute threshold_amount
1247
+ #
1248
+ # @return [String]
1249
+ required :threshold_amount, String
1250
+
1251
+ # @!attribute description
1252
+ #
1253
+ # @return [String, nil]
1254
+ optional :description, String, nil?: true
1255
+
1256
+ # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil)
1257
+ # Some parameter documentations has been truncated, see
1258
+ # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup}
1259
+ # for more details.
1260
+ #
1261
+ # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold.
1262
+ #
1263
+ # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli
1264
+ #
1265
+ # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each
1266
+ #
1267
+ # @param threshold_amount [String]
1268
+ #
1269
+ # @param description [String, nil]
722
1270
  end
723
1271
  end
724
1272
  end
725
1273
 
726
- class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel
1274
+ class TieredWithProration < Orb::Internal::Type::BaseModel
727
1275
  # @!attribute cadence
728
1276
  # The cadence to bill for this price on.
729
1277
  #
730
- # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence]
1278
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence]
731
1279
  required :cadence,
732
- enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence }
733
-
734
- # @!attribute grouped_with_min_max_thresholds_config
735
- # Configuration for grouped_with_min_max_thresholds pricing
736
- #
737
- # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig]
738
- required :grouped_with_min_max_thresholds_config,
739
- -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig }
1280
+ enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence }
740
1281
 
741
1282
  # @!attribute item_id
742
1283
  # The id of the item the price will be associated with.
@@ -747,8 +1288,8 @@ module Orb
747
1288
  # @!attribute model_type
748
1289
  # The pricing model type
749
1290
  #
750
- # @return [Symbol, :grouped_with_min_max_thresholds]
751
- required :model_type, const: :grouped_with_min_max_thresholds
1291
+ # @return [Symbol, :tiered_with_proration]
1292
+ required :model_type, const: :tiered_with_proration
752
1293
 
753
1294
  # @!attribute name
754
1295
  # The name of the price.
@@ -756,6 +1297,13 @@ module Orb
756
1297
  # @return [String]
757
1298
  required :name, String
758
1299
 
1300
+ # @!attribute tiered_with_proration_config
1301
+ # Configuration for tiered_with_proration pricing
1302
+ #
1303
+ # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig]
1304
+ required :tiered_with_proration_config,
1305
+ -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig }
1306
+
759
1307
  # @!attribute billable_metric_id
760
1308
  # The id of the billable metric for the price. Only needed if the price is
761
1309
  # usage-based.
@@ -787,11 +1335,7 @@ module Orb
787
1335
  # The configuration for the rate of the price currency to the invoicing currency.
788
1336
  #
789
1337
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
790
- optional :conversion_rate_config,
791
- union: -> {
792
- Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig
793
- },
794
- nil?: true
1338
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
795
1339
 
796
1340
  # @!attribute currency
797
1341
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -857,19 +1401,19 @@ module Orb
857
1401
  # @return [String, nil]
858
1402
  optional :reference_id, String, nil?: true
859
1403
 
860
- # @!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
+ # @!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)
861
1405
  # Some parameter documentations has been truncated, see
862
- # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds}
1406
+ # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration}
863
1407
  # for more details.
864
1408
  #
865
- # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on.
866
- #
867
- # @param grouped_with_min_max_thresholds_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing
1409
+ # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on.
868
1410
  #
869
1411
  # @param item_id [String] The id of the item the price will be associated with.
870
1412
  #
871
1413
  # @param name [String] The name of the price.
872
1414
  #
1415
+ # @param tiered_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing
1416
+ #
873
1417
  # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
874
1418
  #
875
1419
  # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
@@ -898,11 +1442,11 @@ module Orb
898
1442
  #
899
1443
  # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
900
1444
  #
901
- # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type
1445
+ # @param model_type [Symbol, :tiered_with_proration] The pricing model type
902
1446
 
903
1447
  # The cadence to bill for this price on.
904
1448
  #
905
- # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#cadence
1449
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration#cadence
906
1450
  module Cadence
907
1451
  extend Orb::Internal::Type::Enum
908
1452
 
@@ -917,59 +1461,62 @@ module Orb
917
1461
  # @return [Array<Symbol>]
918
1462
  end
919
1463
 
920
- # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config
921
- class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel
922
- # @!attribute grouping_key
923
- # The event property used to group before applying thresholds
924
- #
925
- # @return [String]
926
- required :grouping_key, String
927
-
928
- # @!attribute maximum_charge
929
- # The maximum amount to charge each group
1464
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration#tiered_with_proration_config
1465
+ class TieredWithProrationConfig < Orb::Internal::Type::BaseModel
1466
+ # @!attribute tiers
1467
+ # Tiers for rating based on total usage quantities into the specified tier with
1468
+ # proration
930
1469
  #
931
- # @return [String]
932
- required :maximum_charge, String
1470
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier>]
1471
+ required :tiers,
1472
+ -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] }
933
1473
 
934
- # @!attribute minimum_charge
935
- # The minimum amount to charge each group, regardless of usage
1474
+ # @!method initialize(tiers:)
1475
+ # Some parameter documentations has been truncated, see
1476
+ # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig}
1477
+ # for more details.
936
1478
  #
937
- # @return [String]
938
- required :minimum_charge, String
939
-
940
- # @!attribute per_unit_rate
941
- # The base price charged per group
1479
+ # Configuration for tiered_with_proration pricing
942
1480
  #
943
- # @return [String]
944
- required :per_unit_rate, String
1481
+ # @param tiers [Array<Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier>] Tiers for rating based on total usage quantities into the specified tier with pr
945
1482
 
946
- # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:)
947
- # Configuration for grouped_with_min_max_thresholds pricing
948
- #
949
- # @param grouping_key [String] The event property used to group before applying thresholds
950
- #
951
- # @param maximum_charge [String] The maximum amount to charge each group
952
- #
953
- # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage
954
- #
955
- # @param per_unit_rate [String] The base price charged per group
1483
+ class Tier < Orb::Internal::Type::BaseModel
1484
+ # @!attribute tier_lower_bound
1485
+ # Inclusive tier starting value
1486
+ #
1487
+ # @return [String]
1488
+ required :tier_lower_bound, String
1489
+
1490
+ # @!attribute unit_amount
1491
+ # Amount per unit
1492
+ #
1493
+ # @return [String]
1494
+ required :unit_amount, String
1495
+
1496
+ # @!method initialize(tier_lower_bound:, unit_amount:)
1497
+ # Configuration for a single tiered with proration tier
1498
+ #
1499
+ # @param tier_lower_bound [String] Inclusive tier starting value
1500
+ #
1501
+ # @param unit_amount [String] Amount per unit
1502
+ end
956
1503
  end
957
1504
  end
958
1505
 
959
- class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel
1506
+ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel
960
1507
  # @!attribute cadence
961
1508
  # The cadence to bill for this price on.
962
1509
  #
963
- # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence]
1510
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence]
964
1511
  required :cadence,
965
- enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence }
1512
+ enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence }
966
1513
 
967
- # @!attribute cumulative_grouped_allocation_config
968
- # Configuration for cumulative_grouped_allocation pricing
1514
+ # @!attribute grouped_with_min_max_thresholds_config
1515
+ # Configuration for grouped_with_min_max_thresholds pricing
969
1516
  #
970
- # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig]
971
- required :cumulative_grouped_allocation_config,
972
- -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig }
1517
+ # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig]
1518
+ required :grouped_with_min_max_thresholds_config,
1519
+ -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig }
973
1520
 
974
1521
  # @!attribute item_id
975
1522
  # The id of the item the price will be associated with.
@@ -980,8 +1527,8 @@ module Orb
980
1527
  # @!attribute model_type
981
1528
  # The pricing model type
982
1529
  #
983
- # @return [Symbol, :cumulative_grouped_allocation]
984
- required :model_type, const: :cumulative_grouped_allocation
1530
+ # @return [Symbol, :grouped_with_min_max_thresholds]
1531
+ required :model_type, const: :grouped_with_min_max_thresholds
985
1532
 
986
1533
  # @!attribute name
987
1534
  # The name of the price.
@@ -1020,11 +1567,7 @@ module Orb
1020
1567
  # The configuration for the rate of the price currency to the invoicing currency.
1021
1568
  #
1022
1569
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
1023
- optional :conversion_rate_config,
1024
- union: -> {
1025
- Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::ConversionRateConfig
1026
- },
1027
- nil?: true
1570
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1028
1571
 
1029
1572
  # @!attribute currency
1030
1573
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -1090,14 +1633,14 @@ module Orb
1090
1633
  # @return [String, nil]
1091
1634
  optional :reference_id, String, nil?: true
1092
1635
 
1093
- # @!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)
1636
+ # @!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)
1094
1637
  # Some parameter documentations has been truncated, see
1095
- # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation}
1638
+ # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds}
1096
1639
  # for more details.
1097
1640
  #
1098
- # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on.
1641
+ # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on.
1099
1642
  #
1100
- # @param cumulative_grouped_allocation_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing
1643
+ # @param grouped_with_min_max_thresholds_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing
1101
1644
  #
1102
1645
  # @param item_id [String] The id of the item the price will be associated with.
1103
1646
  #
@@ -1131,11 +1674,11 @@ module Orb
1131
1674
  #
1132
1675
  # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
1133
1676
  #
1134
- # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type
1677
+ # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type
1135
1678
 
1136
1679
  # The cadence to bill for this price on.
1137
1680
  #
1138
- # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation#cadence
1681
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#cadence
1139
1682
  module Cadence
1140
1683
  extend Orb::Internal::Type::Enum
1141
1684
 
@@ -1150,51 +1693,59 @@ module Orb
1150
1693
  # @return [Array<Symbol>]
1151
1694
  end
1152
1695
 
1153
- # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config
1154
- class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel
1155
- # @!attribute cumulative_allocation
1156
- # The overall allocation across all groups
1696
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config
1697
+ class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel
1698
+ # @!attribute grouping_key
1699
+ # The event property used to group before applying thresholds
1157
1700
  #
1158
1701
  # @return [String]
1159
- required :cumulative_allocation, String
1702
+ required :grouping_key, String
1160
1703
 
1161
- # @!attribute group_allocation
1162
- # The allocation per individual group
1704
+ # @!attribute maximum_charge
1705
+ # The maximum amount to charge each group
1163
1706
  #
1164
1707
  # @return [String]
1165
- required :group_allocation, String
1708
+ required :maximum_charge, String
1166
1709
 
1167
- # @!attribute grouping_key
1168
- # The event property used to group usage before applying allocations
1710
+ # @!attribute minimum_charge
1711
+ # The minimum amount to charge each group, regardless of usage
1169
1712
  #
1170
1713
  # @return [String]
1171
- required :grouping_key, String
1714
+ required :minimum_charge, String
1172
1715
 
1173
- # @!attribute unit_amount
1174
- # The amount to charge for each unit outside of the allocation
1716
+ # @!attribute per_unit_rate
1717
+ # The base price charged per group
1175
1718
  #
1176
1719
  # @return [String]
1177
- required :unit_amount, String
1720
+ required :per_unit_rate, String
1178
1721
 
1179
- # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:)
1180
- # Configuration for cumulative_grouped_allocation pricing
1722
+ # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:)
1723
+ # Configuration for grouped_with_min_max_thresholds pricing
1181
1724
  #
1182
- # @param cumulative_allocation [String] The overall allocation across all groups
1725
+ # @param grouping_key [String] The event property used to group before applying thresholds
1183
1726
  #
1184
- # @param group_allocation [String] The allocation per individual group
1727
+ # @param maximum_charge [String] The maximum amount to charge each group
1185
1728
  #
1186
- # @param grouping_key [String] The event property used to group usage before applying allocations
1729
+ # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage
1187
1730
  #
1188
- # @param unit_amount [String] The amount to charge for each unit outside of the allocation
1731
+ # @param per_unit_rate [String] The base price charged per group
1189
1732
  end
1190
1733
  end
1191
1734
 
1192
- class Percent < Orb::Internal::Type::BaseModel
1735
+ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel
1193
1736
  # @!attribute cadence
1194
1737
  # The cadence to bill for this price on.
1195
1738
  #
1196
- # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence]
1197
- required :cadence, enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence }
1739
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence]
1740
+ required :cadence,
1741
+ enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence }
1742
+
1743
+ # @!attribute cumulative_grouped_allocation_config
1744
+ # Configuration for cumulative_grouped_allocation pricing
1745
+ #
1746
+ # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig]
1747
+ required :cumulative_grouped_allocation_config,
1748
+ -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig }
1198
1749
 
1199
1750
  # @!attribute item_id
1200
1751
  # The id of the item the price will be associated with.
@@ -1205,8 +1756,8 @@ module Orb
1205
1756
  # @!attribute model_type
1206
1757
  # The pricing model type
1207
1758
  #
1208
- # @return [Symbol, :percent]
1209
- required :model_type, const: :percent
1759
+ # @return [Symbol, :cumulative_grouped_allocation]
1760
+ required :model_type, const: :cumulative_grouped_allocation
1210
1761
 
1211
1762
  # @!attribute name
1212
1763
  # The name of the price.
@@ -1214,12 +1765,6 @@ module Orb
1214
1765
  # @return [String]
1215
1766
  required :name, String
1216
1767
 
1217
- # @!attribute percent_config
1218
- # Configuration for percent pricing
1219
- #
1220
- # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig]
1221
- required :percent_config, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig }
1222
-
1223
1768
  # @!attribute billable_metric_id
1224
1769
  # The id of the billable metric for the price. Only needed if the price is
1225
1770
  # usage-based.
@@ -1251,11 +1796,7 @@ module Orb
1251
1796
  # The configuration for the rate of the price currency to the invoicing currency.
1252
1797
  #
1253
1798
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
1254
- optional :conversion_rate_config,
1255
- union: -> {
1256
- Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::ConversionRateConfig
1257
- },
1258
- nil?: true
1799
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1259
1800
 
1260
1801
  # @!attribute currency
1261
1802
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -1321,19 +1862,19 @@ module Orb
1321
1862
  # @return [String, nil]
1322
1863
  optional :reference_id, String, nil?: true
1323
1864
 
1324
- # @!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)
1865
+ # @!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)
1325
1866
  # Some parameter documentations has been truncated, see
1326
- # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent} for more
1327
- # details.
1867
+ # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation}
1868
+ # for more details.
1328
1869
  #
1329
- # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence] The cadence to bill for this price on.
1870
+ # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on.
1871
+ #
1872
+ # @param cumulative_grouped_allocation_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing
1330
1873
  #
1331
1874
  # @param item_id [String] The id of the item the price will be associated with.
1332
1875
  #
1333
1876
  # @param name [String] The name of the price.
1334
1877
  #
1335
- # @param percent_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig] Configuration for percent pricing
1336
- #
1337
1878
  # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
1338
1879
  #
1339
1880
  # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
@@ -1362,11 +1903,11 @@ module Orb
1362
1903
  #
1363
1904
  # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
1364
1905
  #
1365
- # @param model_type [Symbol, :percent] The pricing model type
1906
+ # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type
1366
1907
 
1367
1908
  # The cadence to bill for this price on.
1368
1909
  #
1369
- # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent#cadence
1910
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation#cadence
1370
1911
  module Cadence
1371
1912
  extend Orb::Internal::Type::Enum
1372
1913
 
@@ -1381,34 +1922,59 @@ module Orb
1381
1922
  # @return [Array<Symbol>]
1382
1923
  end
1383
1924
 
1384
- # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent#percent_config
1385
- class PercentConfig < Orb::Internal::Type::BaseModel
1386
- # @!attribute percent
1387
- # What percent of the component subtotals to charge
1925
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config
1926
+ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel
1927
+ # @!attribute cumulative_allocation
1928
+ # The overall allocation across all groups
1388
1929
  #
1389
- # @return [Float]
1390
- required :percent, Float
1930
+ # @return [String]
1931
+ required :cumulative_allocation, String
1391
1932
 
1392
- # @!method initialize(percent:)
1393
- # Configuration for percent pricing
1933
+ # @!attribute group_allocation
1934
+ # The allocation per individual group
1935
+ #
1936
+ # @return [String]
1937
+ required :group_allocation, String
1938
+
1939
+ # @!attribute grouping_key
1940
+ # The event property used to group usage before applying allocations
1941
+ #
1942
+ # @return [String]
1943
+ required :grouping_key, String
1944
+
1945
+ # @!attribute unit_amount
1946
+ # The amount to charge for each unit outside of the allocation
1947
+ #
1948
+ # @return [String]
1949
+ required :unit_amount, String
1950
+
1951
+ # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:)
1952
+ # Configuration for cumulative_grouped_allocation pricing
1394
1953
  #
1395
- # @param percent [Float] What percent of the component subtotals to charge
1954
+ # @param cumulative_allocation [String] The overall allocation across all groups
1955
+ #
1956
+ # @param group_allocation [String] The allocation per individual group
1957
+ #
1958
+ # @param grouping_key [String] The event property used to group usage before applying allocations
1959
+ #
1960
+ # @param unit_amount [String] The amount to charge for each unit outside of the allocation
1396
1961
  end
1397
1962
  end
1398
1963
 
1399
- class EventOutput < Orb::Internal::Type::BaseModel
1964
+ class DailyCreditAllowance < Orb::Internal::Type::BaseModel
1400
1965
  # @!attribute cadence
1401
1966
  # The cadence to bill for this price on.
1402
1967
  #
1403
- # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence]
1404
- required :cadence, enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence }
1968
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence]
1969
+ required :cadence,
1970
+ enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence }
1405
1971
 
1406
- # @!attribute event_output_config
1407
- # Configuration for event_output pricing
1972
+ # @!attribute daily_credit_allowance_config
1973
+ # Configuration for daily_credit_allowance pricing
1408
1974
  #
1409
- # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig]
1410
- required :event_output_config,
1411
- -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig }
1975
+ # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig]
1976
+ required :daily_credit_allowance_config,
1977
+ -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig }
1412
1978
 
1413
1979
  # @!attribute item_id
1414
1980
  # The id of the item the price will be associated with.
@@ -1419,8 +1985,8 @@ module Orb
1419
1985
  # @!attribute model_type
1420
1986
  # The pricing model type
1421
1987
  #
1422
- # @return [Symbol, :event_output]
1423
- required :model_type, const: :event_output
1988
+ # @return [Symbol, :daily_credit_allowance]
1989
+ required :model_type, const: :daily_credit_allowance
1424
1990
 
1425
1991
  # @!attribute name
1426
1992
  # The name of the price.
@@ -1459,11 +2025,7 @@ module Orb
1459
2025
  # The configuration for the rate of the price currency to the invoicing currency.
1460
2026
  #
1461
2027
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
1462
- optional :conversion_rate_config,
1463
- union: -> {
1464
- Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::ConversionRateConfig
1465
- },
1466
- nil?: true
2028
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1467
2029
 
1468
2030
  # @!attribute currency
1469
2031
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -1529,14 +2091,14 @@ module Orb
1529
2091
  # @return [String, nil]
1530
2092
  optional :reference_id, String, nil?: true
1531
2093
 
1532
- # @!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)
2094
+ # @!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)
1533
2095
  # Some parameter documentations has been truncated, see
1534
- # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput} for
1535
- # more details.
2096
+ # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance}
2097
+ # for more details.
1536
2098
  #
1537
- # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence] The cadence to bill for this price on.
2099
+ # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on.
1538
2100
  #
1539
- # @param event_output_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig] Configuration for event_output pricing
2101
+ # @param daily_credit_allowance_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing
1540
2102
  #
1541
2103
  # @param item_id [String] The id of the item the price will be associated with.
1542
2104
  #
@@ -1570,11 +2132,11 @@ module Orb
1570
2132
  #
1571
2133
  # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
1572
2134
  #
1573
- # @param model_type [Symbol, :event_output] The pricing model type
2135
+ # @param model_type [Symbol, :daily_credit_allowance] The pricing model type
1574
2136
 
1575
2137
  # The cadence to bill for this price on.
1576
2138
  #
1577
- # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput#cadence
2139
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance#cadence
1578
2140
  module Cadence
1579
2141
  extend Orb::Internal::Type::Enum
1580
2142
 
@@ -1589,257 +2151,2293 @@ module Orb
1589
2151
  # @return [Array<Symbol>]
1590
2152
  end
1591
2153
 
1592
- # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput#event_output_config
1593
- class EventOutputConfig < Orb::Internal::Type::BaseModel
1594
- # @!attribute unit_rating_key
1595
- # The key in the event data to extract the unit rate from.
2154
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance#daily_credit_allowance_config
2155
+ class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel
2156
+ # @!attribute daily_allowance
2157
+ # Credits granted per day. Lose-it-or-use-it; does not roll over.
1596
2158
  #
1597
2159
  # @return [String]
1598
- required :unit_rating_key, String
2160
+ required :daily_allowance, String
1599
2161
 
1600
- # @!attribute default_unit_rate
1601
- # If provided, this amount will be used as the unit rate when an event does not
1602
- # have a value for the `unit_rating_key`. If not provided, events missing a unit
1603
- # rate will be ignored.
2162
+ # @!attribute default_unit_amount
2163
+ # Default per-unit credit rate for any usage not bucketed into a specified
2164
+ # matrix_value
1604
2165
  #
1605
- # @return [String, nil]
1606
- optional :default_unit_rate, String, nil?: true
2166
+ # @return [String]
2167
+ required :default_unit_amount, String
1607
2168
 
1608
- # @!attribute grouping_key
1609
- # An optional key in the event data to group by (e.g., event ID). All events will
1610
- # also be grouped by their unit rate.
2169
+ # @!attribute dimensions
2170
+ # One or two event property values to evaluate matrix groups by
1611
2171
  #
1612
- # @return [String, nil]
1613
- optional :grouping_key, String, nil?: true
2172
+ # @return [Array<String, nil>]
2173
+ required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true]
1614
2174
 
1615
- # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil)
1616
- # Some parameter documentations has been truncated, see
1617
- # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig}
2175
+ # @!attribute event_day_property
2176
+ # Event property whose value identifies the day bucket the event belongs to (e.g.
2177
+ # 'event_day' set to an ISO date string in the customer's timezone). The allowance
2178
+ # resets per distinct value of this property.
2179
+ #
2180
+ # @return [String]
2181
+ required :event_day_property, String
2182
+
2183
+ # @!attribute matrix_values
2184
+ # Per-dimension credit rates
2185
+ #
2186
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue>]
2187
+ required :matrix_values,
2188
+ -> do
2189
+ Orb::Internal::Type::ArrayOf[
2190
+ Orb::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue
2191
+ ]
2192
+ end
2193
+
2194
+ # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:)
2195
+ # Some parameter documentations has been truncated, see
2196
+ # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig}
1618
2197
  # for more details.
1619
2198
  #
1620
- # Configuration for event_output pricing
2199
+ # Configuration for daily_credit_allowance pricing
1621
2200
  #
1622
- # @param unit_rating_key [String] The key in the event data to extract the unit rate from.
2201
+ # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over.
1623
2202
  #
1624
- # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha
2203
+ # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified
2204
+ # matrix\_
1625
2205
  #
1626
- # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will
2206
+ # @param dimensions [Array<String, nil>] One or two event property values to evaluate matrix groups by
2207
+ #
2208
+ # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g.
2209
+ #
2210
+ # @param matrix_values [Array<Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue>] Per-dimension credit rates
2211
+
2212
+ class MatrixValue < Orb::Internal::Type::BaseModel
2213
+ # @!attribute dimension_values
2214
+ # One or two matrix keys to filter usage to this value by. For example, ["model"]
2215
+ # could be used to apply a different credit rate to each AI model.
2216
+ #
2217
+ # @return [Array<String, nil>]
2218
+ required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true]
2219
+
2220
+ # @!attribute unit_amount
2221
+ # Credits charged per unit of usage matching the specified dimension_values
2222
+ #
2223
+ # @return [String]
2224
+ required :unit_amount, String
2225
+
2226
+ # @!method initialize(dimension_values:, unit_amount:)
2227
+ # Some parameter documentations has been truncated, see
2228
+ # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue}
2229
+ # for more details.
2230
+ #
2231
+ # Per-dimension credit price for the daily credit allowance model.
2232
+ #
2233
+ # @param dimension_values [Array<String, nil>] One or two matrix keys to filter usage to this value by. For example, ["model"]
2234
+ #
2235
+ # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values
2236
+ end
1627
2237
  end
1628
2238
  end
1629
2239
 
1630
- # @!method self.variants
1631
- # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput)]
1632
- end
1633
- end
2240
+ class MeteredAllowance < Orb::Internal::Type::BaseModel
2241
+ # @!attribute cadence
2242
+ # The cadence to bill for this price on.
2243
+ #
2244
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence]
2245
+ required :cadence,
2246
+ enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence }
1634
2247
 
1635
- class RemoveAdjustment < Orb::Internal::Type::BaseModel
1636
- # @!attribute adjustment_id
1637
- # The id of the adjustment to remove from on the plan.
1638
- #
1639
- # @return [String]
1640
- required :adjustment_id, String
2248
+ # @!attribute item_id
2249
+ # The id of the item the price will be associated with.
2250
+ #
2251
+ # @return [String]
2252
+ required :item_id, String
1641
2253
 
1642
- # @!attribute plan_phase_order
1643
- # The phase to remove this adjustment from.
1644
- #
1645
- # @return [Integer, nil]
1646
- optional :plan_phase_order, Integer, nil?: true
2254
+ # @!attribute metered_allowance_config
2255
+ # Configuration for metered_allowance pricing
2256
+ #
2257
+ # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig]
2258
+ required :metered_allowance_config,
2259
+ -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig }
1647
2260
 
1648
- # @!method initialize(adjustment_id:, plan_phase_order: nil)
1649
- # @param adjustment_id [String] The id of the adjustment to remove from on the plan.
1650
- #
1651
- # @param plan_phase_order [Integer, nil] The phase to remove this adjustment from.
1652
- end
2261
+ # @!attribute model_type
2262
+ # The pricing model type
2263
+ #
2264
+ # @return [Symbol, :metered_allowance]
2265
+ required :model_type, const: :metered_allowance
1653
2266
 
1654
- class RemovePrice < Orb::Internal::Type::BaseModel
1655
- # @!attribute price_id
1656
- # The id of the price to remove from the plan.
1657
- #
1658
- # @return [String]
1659
- required :price_id, String
2267
+ # @!attribute name
2268
+ # The name of the price.
2269
+ #
2270
+ # @return [String]
2271
+ required :name, String
1660
2272
 
1661
- # @!attribute plan_phase_order
1662
- # The phase to remove this price from.
1663
- #
1664
- # @return [Integer, nil]
1665
- optional :plan_phase_order, Integer, nil?: true
2273
+ # @!attribute billable_metric_id
2274
+ # The id of the billable metric for the price. Only needed if the price is
2275
+ # usage-based.
2276
+ #
2277
+ # @return [String, nil]
2278
+ optional :billable_metric_id, String, nil?: true
1666
2279
 
1667
- # @!method initialize(price_id:, plan_phase_order: nil)
1668
- # @param price_id [String] The id of the price to remove from the plan.
1669
- #
1670
- # @param plan_phase_order [Integer, nil] The phase to remove this price from.
1671
- end
2280
+ # @!attribute billed_in_advance
2281
+ # If the Price represents a fixed cost, the price will be billed in-advance if
2282
+ # this is true, and in-arrears if this is false.
2283
+ #
2284
+ # @return [Boolean, nil]
2285
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
1672
2286
 
1673
- class ReplaceAdjustment < Orb::Internal::Type::BaseModel
1674
- # @!attribute adjustment
1675
- # The definition of a new adjustment to create and add to the plan.
1676
- #
1677
- # @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum]
1678
- required :adjustment, union: -> { Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment }
2287
+ # @!attribute billing_cycle_configuration
2288
+ # For custom cadence: specifies the duration of the billing period in days or
2289
+ # months.
2290
+ #
2291
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
2292
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1679
2293
 
1680
- # @!attribute replaces_adjustment_id
1681
- # The id of the adjustment on the plan to replace in the plan.
1682
- #
1683
- # @return [String]
1684
- required :replaces_adjustment_id, String
2294
+ # @!attribute conversion_rate
2295
+ # The per unit conversion rate of the price currency to the invoicing currency.
2296
+ #
2297
+ # @return [Float, nil]
2298
+ optional :conversion_rate, Float, nil?: true
1685
2299
 
1686
- # @!attribute plan_phase_order
1687
- # The phase to replace this adjustment from.
1688
- #
1689
- # @return [Integer, nil]
1690
- optional :plan_phase_order, Integer, nil?: true
2300
+ # @!attribute conversion_rate_config
2301
+ # The configuration for the rate of the price currency to the invoicing currency.
2302
+ #
2303
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
2304
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1691
2305
 
1692
- # @!method initialize(adjustment:, replaces_adjustment_id:, plan_phase_order: nil)
1693
- # @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 plan.
1694
- #
1695
- # @param replaces_adjustment_id [String] The id of the adjustment on the plan to replace in the plan.
1696
- #
1697
- # @param plan_phase_order [Integer, nil] The phase to replace this adjustment from.
2306
+ # @!attribute currency
2307
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
2308
+ # price is billed.
2309
+ #
2310
+ # @return [String, nil]
2311
+ optional :currency, String, nil?: true
2312
+
2313
+ # @!attribute dimensional_price_configuration
2314
+ # For dimensional price: specifies a price group and dimension values
2315
+ #
2316
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
2317
+ optional :dimensional_price_configuration,
2318
+ -> {
2319
+ Orb::NewDimensionalPriceConfiguration
2320
+ },
2321
+ nil?: true
2322
+
2323
+ # @!attribute external_price_id
2324
+ # An alias for the price.
2325
+ #
2326
+ # @return [String, nil]
2327
+ optional :external_price_id, String, nil?: true
2328
+
2329
+ # @!attribute fixed_price_quantity
2330
+ # If the Price represents a fixed cost, this represents the quantity of units
2331
+ # applied.
2332
+ #
2333
+ # @return [Float, nil]
2334
+ optional :fixed_price_quantity, Float, nil?: true
2335
+
2336
+ # @!attribute invoice_grouping_key
2337
+ # The property used to group this price on an invoice
2338
+ #
2339
+ # @return [String, nil]
2340
+ optional :invoice_grouping_key, String, nil?: true
2341
+
2342
+ # @!attribute invoicing_cycle_configuration
2343
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
2344
+ # If unspecified, a single invoice is produced per billing cycle.
2345
+ #
2346
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
2347
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
2348
+
2349
+ # @!attribute license_type_id
2350
+ # The ID of the license type to associate with this price.
2351
+ #
2352
+ # @return [String, nil]
2353
+ optional :license_type_id, String, nil?: true
2354
+
2355
+ # @!attribute metadata
2356
+ # User-specified key/value pairs for the resource. Individual keys can be removed
2357
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
2358
+ # by setting `metadata` to `null`.
2359
+ #
2360
+ # @return [Hash{Symbol=>String, nil}, nil]
2361
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
2362
+
2363
+ # @!attribute reference_id
2364
+ # A transient ID that can be used to reference this price when adding adjustments
2365
+ # in the same API call.
2366
+ #
2367
+ # @return [String, nil]
2368
+ optional :reference_id, String, nil?: true
2369
+
2370
+ # @!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)
2371
+ # Some parameter documentations has been truncated, see
2372
+ # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance}
2373
+ # for more details.
2374
+ #
2375
+ # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::Cadence] The cadence to bill for this price on.
2376
+ #
2377
+ # @param item_id [String] The id of the item the price will be associated with.
2378
+ #
2379
+ # @param metered_allowance_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing
2380
+ #
2381
+ # @param name [String] The name of the price.
2382
+ #
2383
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
2384
+ #
2385
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
2386
+ #
2387
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
2388
+ #
2389
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
2390
+ #
2391
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
2392
+ #
2393
+ # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr
2394
+ #
2395
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
2396
+ #
2397
+ # @param external_price_id [String, nil] An alias for the price.
2398
+ #
2399
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
2400
+ #
2401
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
2402
+ #
2403
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
2404
+ #
2405
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
2406
+ #
2407
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
2408
+ #
2409
+ # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
2410
+ #
2411
+ # @param model_type [Symbol, :metered_allowance] The pricing model type
2412
+
2413
+ # The cadence to bill for this price on.
2414
+ #
2415
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance#cadence
2416
+ module Cadence
2417
+ extend Orb::Internal::Type::Enum
2418
+
2419
+ ANNUAL = :annual
2420
+ SEMI_ANNUAL = :semi_annual
2421
+ MONTHLY = :monthly
2422
+ QUARTERLY = :quarterly
2423
+ ONE_TIME = :one_time
2424
+ CUSTOM = :custom
2425
+
2426
+ # @!method self.values
2427
+ # @return [Array<Symbol>]
2428
+ end
2429
+
2430
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance#metered_allowance_config
2431
+ class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel
2432
+ # @!attribute allowance_grouping_value
2433
+ # The grouping_key value whose summed quantity represents the allowance for this
2434
+ # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
2435
+ # — credit can never exceed actual usage.
2436
+ #
2437
+ # @return [String]
2438
+ required :allowance_grouping_value, String
2439
+
2440
+ # @!attribute consumption_grouping_value
2441
+ # The grouping_key value whose summed quantity represents consumption (e.g.
2442
+ # 'download'). Charged at unit_amount.
2443
+ #
2444
+ # @return [String]
2445
+ required :consumption_grouping_value, String
2446
+
2447
+ # @!attribute grouping_key
2448
+ # Event property used to partition the metric into consumption and allowance
2449
+ # quantities (e.g. 'event_name'). The metric is queried with this key and the two
2450
+ # values below select which partition is which.
2451
+ #
2452
+ # @return [String]
2453
+ required :grouping_key, String
2454
+
2455
+ # @!attribute unit_amount
2456
+ # Per-unit price applied to gross consumption and to the allowance credit.
2457
+ #
2458
+ # @return [String]
2459
+ required :unit_amount, String
2460
+
2461
+ # @!attribute allowance_display_name
2462
+ # Sub-line label for the credit row (e.g. 'Up to 3x free egress').
2463
+ #
2464
+ # @return [String, nil]
2465
+ optional :allowance_display_name, String
2466
+
2467
+ # @!attribute consumption_display_name
2468
+ # Sub-line label for the gross consumption row (e.g. 'bytes gotten').
2469
+ #
2470
+ # @return [String, nil]
2471
+ optional :consumption_display_name, String
2472
+
2473
+ # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil)
2474
+ # Some parameter documentations has been truncated, see
2475
+ # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance::MeteredAllowanceConfig}
2476
+ # for more details.
2477
+ #
2478
+ # Configuration for metered_allowance pricing
2479
+ #
2480
+ # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p
2481
+ #
2482
+ # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl
2483
+ #
2484
+ # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant
2485
+ #
2486
+ # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit.
2487
+ #
2488
+ # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress').
2489
+ #
2490
+ # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten').
2491
+ end
2492
+ end
2493
+
2494
+ class Percent < Orb::Internal::Type::BaseModel
2495
+ # @!attribute cadence
2496
+ # The cadence to bill for this price on.
2497
+ #
2498
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence]
2499
+ required :cadence, enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence }
2500
+
2501
+ # @!attribute item_id
2502
+ # The id of the item the price will be associated with.
2503
+ #
2504
+ # @return [String]
2505
+ required :item_id, String
2506
+
2507
+ # @!attribute model_type
2508
+ # The pricing model type
2509
+ #
2510
+ # @return [Symbol, :percent]
2511
+ required :model_type, const: :percent
2512
+
2513
+ # @!attribute name
2514
+ # The name of the price.
2515
+ #
2516
+ # @return [String]
2517
+ required :name, String
2518
+
2519
+ # @!attribute percent_config
2520
+ # Configuration for percent pricing
2521
+ #
2522
+ # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig]
2523
+ required :percent_config, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig }
2524
+
2525
+ # @!attribute billable_metric_id
2526
+ # The id of the billable metric for the price. Only needed if the price is
2527
+ # usage-based.
2528
+ #
2529
+ # @return [String, nil]
2530
+ optional :billable_metric_id, String, nil?: true
2531
+
2532
+ # @!attribute billed_in_advance
2533
+ # If the Price represents a fixed cost, the price will be billed in-advance if
2534
+ # this is true, and in-arrears if this is false.
2535
+ #
2536
+ # @return [Boolean, nil]
2537
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
2538
+
2539
+ # @!attribute billing_cycle_configuration
2540
+ # For custom cadence: specifies the duration of the billing period in days or
2541
+ # months.
2542
+ #
2543
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
2544
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
2545
+
2546
+ # @!attribute conversion_rate
2547
+ # The per unit conversion rate of the price currency to the invoicing currency.
2548
+ #
2549
+ # @return [Float, nil]
2550
+ optional :conversion_rate, Float, nil?: true
2551
+
2552
+ # @!attribute conversion_rate_config
2553
+ # The configuration for the rate of the price currency to the invoicing currency.
2554
+ #
2555
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
2556
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
2557
+
2558
+ # @!attribute currency
2559
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
2560
+ # price is billed.
2561
+ #
2562
+ # @return [String, nil]
2563
+ optional :currency, String, nil?: true
2564
+
2565
+ # @!attribute dimensional_price_configuration
2566
+ # For dimensional price: specifies a price group and dimension values
2567
+ #
2568
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
2569
+ optional :dimensional_price_configuration,
2570
+ -> {
2571
+ Orb::NewDimensionalPriceConfiguration
2572
+ },
2573
+ nil?: true
2574
+
2575
+ # @!attribute external_price_id
2576
+ # An alias for the price.
2577
+ #
2578
+ # @return [String, nil]
2579
+ optional :external_price_id, String, nil?: true
2580
+
2581
+ # @!attribute fixed_price_quantity
2582
+ # If the Price represents a fixed cost, this represents the quantity of units
2583
+ # applied.
2584
+ #
2585
+ # @return [Float, nil]
2586
+ optional :fixed_price_quantity, Float, nil?: true
2587
+
2588
+ # @!attribute invoice_grouping_key
2589
+ # The property used to group this price on an invoice
2590
+ #
2591
+ # @return [String, nil]
2592
+ optional :invoice_grouping_key, String, nil?: true
2593
+
2594
+ # @!attribute invoicing_cycle_configuration
2595
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
2596
+ # If unspecified, a single invoice is produced per billing cycle.
2597
+ #
2598
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
2599
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
2600
+
2601
+ # @!attribute license_type_id
2602
+ # The ID of the license type to associate with this price.
2603
+ #
2604
+ # @return [String, nil]
2605
+ optional :license_type_id, String, nil?: true
2606
+
2607
+ # @!attribute metadata
2608
+ # User-specified key/value pairs for the resource. Individual keys can be removed
2609
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
2610
+ # by setting `metadata` to `null`.
2611
+ #
2612
+ # @return [Hash{Symbol=>String, nil}, nil]
2613
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
2614
+
2615
+ # @!attribute reference_id
2616
+ # A transient ID that can be used to reference this price when adding adjustments
2617
+ # in the same API call.
2618
+ #
2619
+ # @return [String, nil]
2620
+ optional :reference_id, String, nil?: true
2621
+
2622
+ # @!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)
2623
+ # Some parameter documentations has been truncated, see
2624
+ # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent} for more
2625
+ # details.
2626
+ #
2627
+ # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence] The cadence to bill for this price on.
2628
+ #
2629
+ # @param item_id [String] The id of the item the price will be associated with.
2630
+ #
2631
+ # @param name [String] The name of the price.
2632
+ #
2633
+ # @param percent_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig] Configuration for percent pricing
2634
+ #
2635
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
2636
+ #
2637
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
2638
+ #
2639
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
2640
+ #
2641
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
2642
+ #
2643
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
2644
+ #
2645
+ # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr
2646
+ #
2647
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
2648
+ #
2649
+ # @param external_price_id [String, nil] An alias for the price.
2650
+ #
2651
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
2652
+ #
2653
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
2654
+ #
2655
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
2656
+ #
2657
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
2658
+ #
2659
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
2660
+ #
2661
+ # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
2662
+ #
2663
+ # @param model_type [Symbol, :percent] The pricing model type
2664
+
2665
+ # The cadence to bill for this price on.
2666
+ #
2667
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent#cadence
2668
+ module Cadence
2669
+ extend Orb::Internal::Type::Enum
2670
+
2671
+ ANNUAL = :annual
2672
+ SEMI_ANNUAL = :semi_annual
2673
+ MONTHLY = :monthly
2674
+ QUARTERLY = :quarterly
2675
+ ONE_TIME = :one_time
2676
+ CUSTOM = :custom
2677
+
2678
+ # @!method self.values
2679
+ # @return [Array<Symbol>]
2680
+ end
2681
+
2682
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent#percent_config
2683
+ class PercentConfig < Orb::Internal::Type::BaseModel
2684
+ # @!attribute percent
2685
+ # Fraction of the component subtotals to charge (0 < percent <= 1).
2686
+ #
2687
+ # @return [Float]
2688
+ required :percent, Float
2689
+
2690
+ # @!attribute maximum_amount
2691
+ # Maximum amount to charge. If unset, the fee has no upper bound.
2692
+ #
2693
+ # @return [String, nil]
2694
+ optional :maximum_amount, String, nil?: true
2695
+
2696
+ # @!attribute minimum_amount
2697
+ # Minimum amount to charge. If unset, the fee is bounded below by 0.
2698
+ #
2699
+ # @return [String, nil]
2700
+ optional :minimum_amount, String, nil?: true
2701
+
2702
+ # @!attribute prorated
2703
+ # If true, the minimum_amount is prorated based on the service period. The
2704
+ # maximum_amount is an absolute cap (never prorated), and the percent applied to
2705
+ # upstream subtotals is never prorated either.
2706
+ #
2707
+ # @return [Boolean, nil]
2708
+ optional :prorated, Orb::Internal::Type::Boolean
2709
+
2710
+ # @!method initialize(percent:, maximum_amount: nil, minimum_amount: nil, prorated: nil)
2711
+ # Some parameter documentations has been truncated, see
2712
+ # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig}
2713
+ # for more details.
2714
+ #
2715
+ # Configuration for percent pricing
2716
+ #
2717
+ # @param percent [Float] Fraction of the component subtotals to charge (0 < percent <= 1).
2718
+ #
2719
+ # @param maximum_amount [String, nil] Maximum amount to charge. If unset, the fee has no upper bound.
2720
+ #
2721
+ # @param minimum_amount [String, nil] Minimum amount to charge. If unset, the fee is bounded below by 0.
2722
+ #
2723
+ # @param prorated [Boolean] If true, the minimum_amount is prorated based on the service period. The maximum
2724
+ end
2725
+ end
2726
+
2727
+ class EventOutput < Orb::Internal::Type::BaseModel
2728
+ # @!attribute cadence
2729
+ # The cadence to bill for this price on.
2730
+ #
2731
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence]
2732
+ required :cadence, enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence }
2733
+
2734
+ # @!attribute event_output_config
2735
+ # Configuration for event_output pricing
2736
+ #
2737
+ # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig]
2738
+ required :event_output_config,
2739
+ -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig }
2740
+
2741
+ # @!attribute item_id
2742
+ # The id of the item the price will be associated with.
2743
+ #
2744
+ # @return [String]
2745
+ required :item_id, String
2746
+
2747
+ # @!attribute model_type
2748
+ # The pricing model type
2749
+ #
2750
+ # @return [Symbol, :event_output]
2751
+ required :model_type, const: :event_output
2752
+
2753
+ # @!attribute name
2754
+ # The name of the price.
2755
+ #
2756
+ # @return [String]
2757
+ required :name, String
2758
+
2759
+ # @!attribute billable_metric_id
2760
+ # The id of the billable metric for the price. Only needed if the price is
2761
+ # usage-based.
2762
+ #
2763
+ # @return [String, nil]
2764
+ optional :billable_metric_id, String, nil?: true
2765
+
2766
+ # @!attribute billed_in_advance
2767
+ # If the Price represents a fixed cost, the price will be billed in-advance if
2768
+ # this is true, and in-arrears if this is false.
2769
+ #
2770
+ # @return [Boolean, nil]
2771
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
2772
+
2773
+ # @!attribute billing_cycle_configuration
2774
+ # For custom cadence: specifies the duration of the billing period in days or
2775
+ # months.
2776
+ #
2777
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
2778
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
2779
+
2780
+ # @!attribute conversion_rate
2781
+ # The per unit conversion rate of the price currency to the invoicing currency.
2782
+ #
2783
+ # @return [Float, nil]
2784
+ optional :conversion_rate, Float, nil?: true
2785
+
2786
+ # @!attribute conversion_rate_config
2787
+ # The configuration for the rate of the price currency to the invoicing currency.
2788
+ #
2789
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
2790
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
2791
+
2792
+ # @!attribute currency
2793
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
2794
+ # price is billed.
2795
+ #
2796
+ # @return [String, nil]
2797
+ optional :currency, String, nil?: true
2798
+
2799
+ # @!attribute dimensional_price_configuration
2800
+ # For dimensional price: specifies a price group and dimension values
2801
+ #
2802
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
2803
+ optional :dimensional_price_configuration,
2804
+ -> {
2805
+ Orb::NewDimensionalPriceConfiguration
2806
+ },
2807
+ nil?: true
2808
+
2809
+ # @!attribute external_price_id
2810
+ # An alias for the price.
2811
+ #
2812
+ # @return [String, nil]
2813
+ optional :external_price_id, String, nil?: true
2814
+
2815
+ # @!attribute fixed_price_quantity
2816
+ # If the Price represents a fixed cost, this represents the quantity of units
2817
+ # applied.
2818
+ #
2819
+ # @return [Float, nil]
2820
+ optional :fixed_price_quantity, Float, nil?: true
2821
+
2822
+ # @!attribute invoice_grouping_key
2823
+ # The property used to group this price on an invoice
2824
+ #
2825
+ # @return [String, nil]
2826
+ optional :invoice_grouping_key, String, nil?: true
2827
+
2828
+ # @!attribute invoicing_cycle_configuration
2829
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
2830
+ # If unspecified, a single invoice is produced per billing cycle.
2831
+ #
2832
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
2833
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
2834
+
2835
+ # @!attribute license_type_id
2836
+ # The ID of the license type to associate with this price.
2837
+ #
2838
+ # @return [String, nil]
2839
+ optional :license_type_id, String, nil?: true
2840
+
2841
+ # @!attribute metadata
2842
+ # User-specified key/value pairs for the resource. Individual keys can be removed
2843
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
2844
+ # by setting `metadata` to `null`.
2845
+ #
2846
+ # @return [Hash{Symbol=>String, nil}, nil]
2847
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
2848
+
2849
+ # @!attribute reference_id
2850
+ # A transient ID that can be used to reference this price when adding adjustments
2851
+ # in the same API call.
2852
+ #
2853
+ # @return [String, nil]
2854
+ optional :reference_id, String, nil?: true
2855
+
2856
+ # @!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)
2857
+ # Some parameter documentations has been truncated, see
2858
+ # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput} for
2859
+ # more details.
2860
+ #
2861
+ # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence] The cadence to bill for this price on.
2862
+ #
2863
+ # @param event_output_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig] Configuration for event_output pricing
2864
+ #
2865
+ # @param item_id [String] The id of the item the price will be associated with.
2866
+ #
2867
+ # @param name [String] The name of the price.
2868
+ #
2869
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
2870
+ #
2871
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
2872
+ #
2873
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
2874
+ #
2875
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
2876
+ #
2877
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
2878
+ #
2879
+ # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr
2880
+ #
2881
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
2882
+ #
2883
+ # @param external_price_id [String, nil] An alias for the price.
2884
+ #
2885
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
2886
+ #
2887
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
2888
+ #
2889
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
2890
+ #
2891
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
2892
+ #
2893
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
2894
+ #
2895
+ # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
2896
+ #
2897
+ # @param model_type [Symbol, :event_output] The pricing model type
2898
+
2899
+ # The cadence to bill for this price on.
2900
+ #
2901
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput#cadence
2902
+ module Cadence
2903
+ extend Orb::Internal::Type::Enum
2904
+
2905
+ ANNUAL = :annual
2906
+ SEMI_ANNUAL = :semi_annual
2907
+ MONTHLY = :monthly
2908
+ QUARTERLY = :quarterly
2909
+ ONE_TIME = :one_time
2910
+ CUSTOM = :custom
2911
+
2912
+ # @!method self.values
2913
+ # @return [Array<Symbol>]
2914
+ end
2915
+
2916
+ # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput#event_output_config
2917
+ class EventOutputConfig < Orb::Internal::Type::BaseModel
2918
+ # @!attribute unit_rating_key
2919
+ # The key in the event data to extract the unit rate from.
2920
+ #
2921
+ # @return [String]
2922
+ required :unit_rating_key, String
2923
+
2924
+ # @!attribute default_unit_rate
2925
+ # If provided, this amount will be used as the unit rate when an event does not
2926
+ # have a value for the `unit_rating_key`. If not provided, events missing a unit
2927
+ # rate will be ignored.
2928
+ #
2929
+ # @return [String, nil]
2930
+ optional :default_unit_rate, String, nil?: true
2931
+
2932
+ # @!attribute grouping_key
2933
+ # An optional key in the event data to group by (e.g., event ID). All events will
2934
+ # also be grouped by their unit rate.
2935
+ #
2936
+ # @return [String, nil]
2937
+ optional :grouping_key, String, nil?: true
2938
+
2939
+ # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil)
2940
+ # Some parameter documentations has been truncated, see
2941
+ # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig}
2942
+ # for more details.
2943
+ #
2944
+ # Configuration for event_output pricing
2945
+ #
2946
+ # @param unit_rating_key [String] The key in the event data to extract the unit rate from.
2947
+ #
2948
+ # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha
2949
+ #
2950
+ # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will
2951
+ end
2952
+ end
2953
+
2954
+ # @!method self.variants
2955
+ # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MatrixWithThresholdDiscounts, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput)]
2956
+ end
2957
+ end
2958
+
2959
+ class RemoveAdjustment < Orb::Internal::Type::BaseModel
2960
+ # @!attribute adjustment_id
2961
+ # The id of the adjustment to remove from on the plan.
2962
+ #
2963
+ # @return [String]
2964
+ required :adjustment_id, String
2965
+
2966
+ # @!attribute plan_phase_order
2967
+ # The phase to remove this adjustment from.
2968
+ #
2969
+ # @return [Integer, nil]
2970
+ optional :plan_phase_order, Integer, nil?: true
2971
+
2972
+ # @!method initialize(adjustment_id:, plan_phase_order: nil)
2973
+ # @param adjustment_id [String] The id of the adjustment to remove from on the plan.
2974
+ #
2975
+ # @param plan_phase_order [Integer, nil] The phase to remove this adjustment from.
2976
+ end
2977
+
2978
+ class RemovePrice < Orb::Internal::Type::BaseModel
2979
+ # @!attribute price_id
2980
+ # The id of the price to remove from the plan.
2981
+ #
2982
+ # @return [String]
2983
+ required :price_id, String
2984
+
2985
+ # @!attribute plan_phase_order
2986
+ # The phase to remove this price from.
2987
+ #
2988
+ # @return [Integer, nil]
2989
+ optional :plan_phase_order, Integer, nil?: true
2990
+
2991
+ # @!method initialize(price_id:, plan_phase_order: nil)
2992
+ # @param price_id [String] The id of the price to remove from the plan.
2993
+ #
2994
+ # @param plan_phase_order [Integer, nil] The phase to remove this price from.
2995
+ end
2996
+
2997
+ class ReplaceAdjustment < Orb::Internal::Type::BaseModel
2998
+ # @!attribute adjustment
2999
+ # The definition of a new adjustment to create and add to the plan.
3000
+ #
3001
+ # @return [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount]
3002
+ required :adjustment, union: -> { Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment }
3003
+
3004
+ # @!attribute replaces_adjustment_id
3005
+ # The id of the adjustment on the plan to replace in the plan.
3006
+ #
3007
+ # @return [String]
3008
+ required :replaces_adjustment_id, String
3009
+
3010
+ # @!attribute plan_phase_order
3011
+ # The phase to replace this adjustment from.
3012
+ #
3013
+ # @return [Integer, nil]
3014
+ optional :plan_phase_order, Integer, nil?: true
3015
+
3016
+ # @!method initialize(adjustment:, replaces_adjustment_id:, plan_phase_order: nil)
3017
+ # @param adjustment [Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount] The definition of a new adjustment to create and add to the plan.
3018
+ #
3019
+ # @param replaces_adjustment_id [String] The id of the adjustment on the plan to replace in the plan.
3020
+ #
3021
+ # @param plan_phase_order [Integer, nil] The phase to replace this adjustment from.
3022
+
3023
+ # The definition of a new adjustment to create and add to the plan.
3024
+ #
3025
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment#adjustment
3026
+ module Adjustment
3027
+ extend Orb::Internal::Type::Union
3028
+
3029
+ discriminator :adjustment_type
3030
+
3031
+ variant :percentage_discount, -> { Orb::NewPercentageDiscount }
3032
+
3033
+ variant :usage_discount, -> { Orb::NewUsageDiscount }
3034
+
3035
+ variant :amount_discount, -> { Orb::NewAmountDiscount }
3036
+
3037
+ variant :minimum, -> { Orb::NewMinimum }
3038
+
3039
+ variant :maximum, -> { Orb::NewMaximum }
3040
+
3041
+ variant :tiered_percentage_discount,
3042
+ -> { Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount }
3043
+
3044
+ class TieredPercentageDiscount < Orb::Internal::Type::BaseModel
3045
+ # @!attribute adjustment_type
3046
+ #
3047
+ # @return [Symbol, :tiered_percentage_discount]
3048
+ required :adjustment_type, const: :tiered_percentage_discount
3049
+
3050
+ # @!attribute tiers
3051
+ #
3052
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Tier>]
3053
+ required :tiers,
3054
+ -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Tier] }
3055
+
3056
+ # @!attribute applies_to_all
3057
+ # If set, the adjustment will apply to every price on the subscription.
3058
+ #
3059
+ # @return [Boolean, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::AppliesToAll, nil]
3060
+ optional :applies_to_all,
3061
+ enum: -> {
3062
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::AppliesToAll
3063
+ },
3064
+ nil?: true
3065
+
3066
+ # @!attribute applies_to_item_ids
3067
+ # The set of item IDs to which this adjustment applies.
3068
+ #
3069
+ # @return [Array<String>, nil]
3070
+ optional :applies_to_item_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
3071
+
3072
+ # @!attribute applies_to_price_ids
3073
+ # The set of price IDs to which this adjustment applies.
3074
+ #
3075
+ # @return [Array<String>, nil]
3076
+ optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
3077
+
3078
+ # @!attribute currency
3079
+ # If set, only prices in the specified currency will have the adjustment applied.
3080
+ #
3081
+ # @return [String, nil]
3082
+ optional :currency, String, nil?: true
3083
+
3084
+ # @!attribute filters
3085
+ # A list of filters that determine which prices this adjustment will apply to.
3086
+ #
3087
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter>, nil]
3088
+ optional :filters,
3089
+ -> {
3090
+ Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter]
3091
+ },
3092
+ nil?: true
3093
+
3094
+ # @!attribute is_invoice_level
3095
+ # When false, this adjustment will be applied to a single price. Otherwise, it
3096
+ # will be applied at the invoice level, possibly to multiple prices.
3097
+ #
3098
+ # @return [Boolean, nil]
3099
+ optional :is_invoice_level, Orb::Internal::Type::Boolean
3100
+
3101
+ # @!attribute price_type
3102
+ # If set, only prices of the specified type will have the adjustment applied.
3103
+ #
3104
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::PriceType, nil]
3105
+ optional :price_type,
3106
+ enum: -> {
3107
+ Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::PriceType
3108
+ },
3109
+ nil?: true
3110
+
3111
+ # @!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)
3112
+ # Some parameter documentations has been truncated, see
3113
+ # {Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount}
3114
+ # for more details.
3115
+ #
3116
+ # @param tiers [Array<Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Tier>]
3117
+ #
3118
+ # @param applies_to_all [Boolean, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::AppliesToAll, nil] If set, the adjustment will apply to every price on the subscription.
3119
+ #
3120
+ # @param applies_to_item_ids [Array<String>, nil] The set of item IDs to which this adjustment applies.
3121
+ #
3122
+ # @param applies_to_price_ids [Array<String>, nil] The set of price IDs to which this adjustment applies.
3123
+ #
3124
+ # @param currency [String, nil] If set, only prices in the specified currency will have the adjustment applied.
3125
+ #
3126
+ # @param filters [Array<Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter>, nil] A list of filters that determine which prices this adjustment will apply to.
3127
+ #
3128
+ # @param is_invoice_level [Boolean] When false, this adjustment will be applied to a single price. Otherwise, it wil
3129
+ #
3130
+ # @param price_type [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::PriceType, nil] If set, only prices of the specified type will have the adjustment applied.
3131
+ #
3132
+ # @param adjustment_type [Symbol, :tiered_percentage_discount]
3133
+
3134
+ class Tier < Orb::Internal::Type::BaseModel
3135
+ # @!attribute lower_bound
3136
+ # Exclusive lower bound of cumulative spend for this tier.
3137
+ #
3138
+ # @return [Float]
3139
+ required :lower_bound, Float
3140
+
3141
+ # @!attribute percentage
3142
+ # The percentage (0-1) discounted from spend in this tier.
3143
+ #
3144
+ # @return [Float]
3145
+ required :percentage, Float
3146
+
3147
+ # @!attribute upper_bound
3148
+ # Inclusive upper bound of cumulative spend; null for the final open-ended tier.
3149
+ #
3150
+ # @return [Float, nil]
3151
+ optional :upper_bound, Float, nil?: true
3152
+
3153
+ # @!method initialize(lower_bound:, percentage:, upper_bound: nil)
3154
+ # @param lower_bound [Float] Exclusive lower bound of cumulative spend for this tier.
3155
+ #
3156
+ # @param percentage [Float] The percentage (0-1) discounted from spend in this tier.
3157
+ #
3158
+ # @param upper_bound [Float, nil] Inclusive upper bound of cumulative spend; null for the final open-ended tier.
3159
+ end
3160
+
3161
+ # If set, the adjustment will apply to every price on the subscription.
3162
+ #
3163
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount#applies_to_all
3164
+ module AppliesToAll
3165
+ extend Orb::Internal::Type::Enum
3166
+
3167
+ TRUE = true
3168
+
3169
+ # @!method self.values
3170
+ # @return [Array<Boolean>]
3171
+ end
3172
+
3173
+ class Filter < Orb::Internal::Type::BaseModel
3174
+ # @!attribute field
3175
+ # The property of the price to filter on.
3176
+ #
3177
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter::Field]
3178
+ required :field,
3179
+ enum: -> { Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter::Field }
3180
+
3181
+ # @!attribute operator
3182
+ # Should prices that match the filter be included or excluded.
3183
+ #
3184
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter::Operator]
3185
+ required :operator,
3186
+ enum: -> { Orb::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter::Operator }
3187
+
3188
+ # @!attribute values
3189
+ # The IDs or values that match this filter.
3190
+ #
3191
+ # @return [Array<String>]
3192
+ required :values, Orb::Internal::Type::ArrayOf[String]
3193
+
3194
+ # @!method initialize(field:, operator:, values:)
3195
+ # @param field [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter::Field] The property of the price to filter on.
3196
+ #
3197
+ # @param operator [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
3198
+ #
3199
+ # @param values [Array<String>] The IDs or values that match this filter.
3200
+
3201
+ # The property of the price to filter on.
3202
+ #
3203
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter#field
3204
+ module Field
3205
+ extend Orb::Internal::Type::Enum
3206
+
3207
+ PRICE_ID = :price_id
3208
+ ITEM_ID = :item_id
3209
+ PRICE_TYPE = :price_type
3210
+ CURRENCY = :currency
3211
+ PRICING_UNIT_ID = :pricing_unit_id
3212
+
3213
+ # @!method self.values
3214
+ # @return [Array<Symbol>]
3215
+ end
3216
+
3217
+ # Should prices that match the filter be included or excluded.
3218
+ #
3219
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount::Filter#operator
3220
+ module Operator
3221
+ extend Orb::Internal::Type::Enum
3222
+
3223
+ INCLUDES = :includes
3224
+ EXCLUDES = :excludes
3225
+
3226
+ # @!method self.values
3227
+ # @return [Array<Symbol>]
3228
+ end
3229
+ end
3230
+
3231
+ # If set, only prices of the specified type will have the adjustment applied.
3232
+ #
3233
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount#price_type
3234
+ module PriceType
3235
+ extend Orb::Internal::Type::Enum
3236
+
3237
+ USAGE = :usage
3238
+ FIXED_IN_ADVANCE = :fixed_in_advance
3239
+ FIXED_IN_ARREARS = :fixed_in_arrears
3240
+ FIXED = :fixed
3241
+ IN_ARREARS = :in_arrears
3242
+
3243
+ # @!method self.values
3244
+ # @return [Array<Symbol>]
3245
+ end
3246
+ end
3247
+
3248
+ # @!method self.variants
3249
+ # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum, Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::Adjustment::TieredPercentageDiscount)]
3250
+ end
3251
+ end
3252
+
3253
+ class ReplacePrice < Orb::Internal::Type::BaseModel
3254
+ # @!attribute replaces_price_id
3255
+ # The id of the price on the plan to replace in the plan.
3256
+ #
3257
+ # @return [String]
3258
+ required :replaces_price_id, String
3259
+
3260
+ # @!attribute allocation_price
3261
+ # The allocation price to add to the plan.
3262
+ #
3263
+ # @return [Orb::Models::NewAllocationPrice, nil]
3264
+ optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true
3265
+
3266
+ # @!attribute license_allocation_price
3267
+ # The license allocation price to add to the plan.
3268
+ #
3269
+ # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, nil]
3270
+ optional :license_allocation_price,
3271
+ -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice },
3272
+ nil?: true
3273
+
3274
+ # @!attribute plan_phase_order
3275
+ # The phase to replace this price from.
3276
+ #
3277
+ # @return [Integer, nil]
3278
+ optional :plan_phase_order, Integer, nil?: true
3279
+
3280
+ # @!attribute price
3281
+ # New plan price request body params.
3282
+ #
3283
+ # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil]
3284
+ optional :price, union: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price }, nil?: true
3285
+
3286
+ # @!method initialize(replaces_price_id:, allocation_price: nil, license_allocation_price: nil, plan_phase_order: nil, price: nil)
3287
+ # @param replaces_price_id [String] The id of the price on the plan to replace in the plan.
3288
+ #
3289
+ # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan.
3290
+ #
3291
+ # @param license_allocation_price [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice, nil] The license allocation price to add to the plan.
3292
+ #
3293
+ # @param plan_phase_order [Integer, nil] The phase to replace this price from.
3294
+ #
3295
+ # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params.
3296
+
3297
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice#license_allocation_price
3298
+ class LicenseAllocationPrice < Orb::Internal::Type::BaseModel
3299
+ # @!attribute cadence
3300
+ # The cadence to bill for this price on.
3301
+ #
3302
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence]
3303
+ required :cadence,
3304
+ enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence }
3305
+
3306
+ # @!attribute item_id
3307
+ # The id of the item the price will be associated with.
3308
+ #
3309
+ # @return [String]
3310
+ required :item_id, String
3311
+
3312
+ # @!attribute license_allocations
3313
+ # License allocations to associate with this price. Each entry defines a
3314
+ # per-license credit pool granted each cadence. Requires license_type_id or
3315
+ # license_type_configuration to be set.
3316
+ #
3317
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation>]
3318
+ required :license_allocations,
3319
+ -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation] }
3320
+
3321
+ # @!attribute model_type
3322
+ # The pricing model type
3323
+ #
3324
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType]
3325
+ required :model_type,
3326
+ enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType }
3327
+
3328
+ # @!attribute name
3329
+ # The name of the price.
3330
+ #
3331
+ # @return [String]
3332
+ required :name, String
3333
+
3334
+ # @!attribute unit_config
3335
+ # Configuration for unit pricing
3336
+ #
3337
+ # @return [Orb::Models::UnitConfig]
3338
+ required :unit_config, -> { Orb::UnitConfig }
3339
+
3340
+ # @!attribute billable_metric_id
3341
+ # The id of the billable metric for the price. Only needed if the price is
3342
+ # usage-based.
3343
+ #
3344
+ # @return [String, nil]
3345
+ optional :billable_metric_id, String, nil?: true
3346
+
3347
+ # @!attribute billed_in_advance
3348
+ # If the Price represents a fixed cost, the price will be billed in-advance if
3349
+ # this is true, and in-arrears if this is false.
3350
+ #
3351
+ # @return [Boolean, nil]
3352
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
3353
+
3354
+ # @!attribute billing_cycle_configuration
3355
+ # For custom cadence: specifies the duration of the billing period in days or
3356
+ # months.
3357
+ #
3358
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
3359
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
3360
+
3361
+ # @!attribute conversion_rate
3362
+ # The per unit conversion rate of the price currency to the invoicing currency.
3363
+ #
3364
+ # @return [Float, nil]
3365
+ optional :conversion_rate, Float, nil?: true
3366
+
3367
+ # @!attribute conversion_rate_config
3368
+ # The configuration for the rate of the price currency to the invoicing currency.
3369
+ #
3370
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
3371
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
3372
+
3373
+ # @!attribute currency
3374
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
3375
+ # price is billed.
3376
+ #
3377
+ # @return [String, nil]
3378
+ optional :currency, String, nil?: true
3379
+
3380
+ # @!attribute dimensional_price_configuration
3381
+ # For dimensional price: specifies a price group and dimension values
3382
+ #
3383
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
3384
+ optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true
3385
+
3386
+ # @!attribute external_price_id
3387
+ # An alias for the price.
3388
+ #
3389
+ # @return [String, nil]
3390
+ optional :external_price_id, String, nil?: true
3391
+
3392
+ # @!attribute fixed_price_quantity
3393
+ # If the Price represents a fixed cost, this represents the quantity of units
3394
+ # applied.
3395
+ #
3396
+ # @return [Float, nil]
3397
+ optional :fixed_price_quantity, Float, nil?: true
3398
+
3399
+ # @!attribute invoice_grouping_key
3400
+ # The property used to group this price on an invoice
3401
+ #
3402
+ # @return [String, nil]
3403
+ optional :invoice_grouping_key, String, nil?: true
3404
+
3405
+ # @!attribute invoicing_cycle_configuration
3406
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
3407
+ # If unspecified, a single invoice is produced per billing cycle.
3408
+ #
3409
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
3410
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
3411
+
3412
+ # @!attribute license_type_id
3413
+ # The ID of the license type to associate with this price.
3414
+ #
3415
+ # @return [String, nil]
3416
+ optional :license_type_id, String, nil?: true
3417
+
3418
+ # @!attribute metadata
3419
+ # User-specified key/value pairs for the resource. Individual keys can be removed
3420
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
3421
+ # by setting `metadata` to `null`.
3422
+ #
3423
+ # @return [Hash{Symbol=>String, nil}, nil]
3424
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
3425
+
3426
+ # @!attribute reference_id
3427
+ # A transient ID that can be used to reference this price when adding adjustments
3428
+ # in the same API call.
3429
+ #
3430
+ # @return [String, nil]
3431
+ optional :reference_id, String, nil?: true
3432
+
3433
+ # @!method initialize(cadence:, item_id:, license_allocations:, model_type:, name:, unit_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)
3434
+ # Some parameter documentations has been truncated, see
3435
+ # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice}
3436
+ # for more details.
3437
+ #
3438
+ # The license allocation price to add to the plan.
3439
+ #
3440
+ # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Cadence] The cadence to bill for this price on.
3441
+ #
3442
+ # @param item_id [String] The id of the item the price will be associated with.
3443
+ #
3444
+ # @param license_allocations [Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::LicenseAllocation>] License allocations to associate with this price. Each entry defines a per-licen
3445
+ #
3446
+ # @param model_type [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ModelType] The pricing model type
3447
+ #
3448
+ # @param name [String] The name of the price.
3449
+ #
3450
+ # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing
3451
+ #
3452
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
3453
+ #
3454
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
3455
+ #
3456
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
3457
+ #
3458
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
3459
+ #
3460
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
3461
+ #
3462
+ # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr
3463
+ #
3464
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
3465
+ #
3466
+ # @param external_price_id [String, nil] An alias for the price.
3467
+ #
3468
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
3469
+ #
3470
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
3471
+ #
3472
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
3473
+ #
3474
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
3475
+ #
3476
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
3477
+ #
3478
+ # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
3479
+
3480
+ # The cadence to bill for this price on.
3481
+ #
3482
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice#cadence
3483
+ module Cadence
3484
+ extend Orb::Internal::Type::Enum
3485
+
3486
+ ANNUAL = :annual
3487
+ SEMI_ANNUAL = :semi_annual
3488
+ MONTHLY = :monthly
3489
+ QUARTERLY = :quarterly
3490
+ ONE_TIME = :one_time
3491
+ CUSTOM = :custom
3492
+
3493
+ # @!method self.values
3494
+ # @return [Array<Symbol>]
3495
+ end
3496
+
3497
+ class LicenseAllocation < Orb::Internal::Type::BaseModel
3498
+ # @!attribute amount
3499
+ # The amount of credits granted per active license per cadence.
3500
+ #
3501
+ # @return [String]
3502
+ required :amount, String
3503
+
3504
+ # @!attribute currency
3505
+ # The currency of the license allocation.
3506
+ #
3507
+ # @return [String]
3508
+ required :currency, String
3509
+
3510
+ # @!attribute write_off_overage
3511
+ # When True, overage beyond the allocation is written off.
3512
+ #
3513
+ # @return [Boolean, nil]
3514
+ optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true
3515
+
3516
+ # @!method initialize(amount:, currency:, write_off_overage: nil)
3517
+ # @param amount [String] The amount of credits granted per active license per cadence.
3518
+ #
3519
+ # @param currency [String] The currency of the license allocation.
3520
+ #
3521
+ # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off.
3522
+ end
3523
+
3524
+ # The pricing model type
3525
+ #
3526
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice#model_type
3527
+ module ModelType
3528
+ extend Orb::Internal::Type::Enum
3529
+
3530
+ UNIT = :unit
3531
+
3532
+ # @!method self.values
3533
+ # @return [Array<Symbol>]
3534
+ end
3535
+ end
3536
+
3537
+ # New plan price request body params.
3538
+ #
3539
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice#price
3540
+ module Price
3541
+ extend Orb::Internal::Type::Union
3542
+
3543
+ discriminator :model_type
3544
+
3545
+ variant :unit, -> { Orb::NewPlanUnitPrice }
3546
+
3547
+ variant :tiered, -> { Orb::NewPlanTieredPrice }
3548
+
3549
+ variant :bulk, -> { Orb::NewPlanBulkPrice }
3550
+
3551
+ variant :bulk_with_filters, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters }
3552
+
3553
+ variant :package, -> { Orb::NewPlanPackagePrice }
3554
+
3555
+ variant :matrix, -> { Orb::NewPlanMatrixPrice }
3556
+
3557
+ variant :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice }
3558
+
3559
+ variant :tiered_package, -> { Orb::NewPlanTieredPackagePrice }
3560
+
3561
+ variant :tiered_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice }
3562
+
3563
+ variant :grouped_tiered, -> { Orb::NewPlanGroupedTieredPrice }
3564
+
3565
+ variant :tiered_package_with_minimum, -> { Orb::NewPlanTieredPackageWithMinimumPrice }
3566
+
3567
+ variant :package_with_allocation, -> { Orb::NewPlanPackageWithAllocationPrice }
3568
+
3569
+ variant :unit_with_percent, -> { Orb::NewPlanUnitWithPercentPrice }
3570
+
3571
+ variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice }
3572
+
3573
+ variant :matrix_with_threshold_discounts,
3574
+ -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts }
3575
+
3576
+ variant :tiered_with_proration,
3577
+ -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration }
3578
+
3579
+ variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice }
3580
+
3581
+ variant :grouped_allocation, -> { Orb::NewPlanGroupedAllocationPrice }
3582
+
3583
+ variant :bulk_with_proration, -> { Orb::NewPlanBulkWithProrationPrice }
3584
+
3585
+ variant :grouped_with_prorated_minimum, -> { Orb::NewPlanGroupedWithProratedMinimumPrice }
3586
+
3587
+ variant :grouped_with_metered_minimum, -> { Orb::NewPlanGroupedWithMeteredMinimumPrice }
3588
+
3589
+ variant :grouped_with_min_max_thresholds,
3590
+ -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds }
3591
+
3592
+ variant :matrix_with_display_name, -> { Orb::NewPlanMatrixWithDisplayNamePrice }
3593
+
3594
+ variant :grouped_tiered_package, -> { Orb::NewPlanGroupedTieredPackagePrice }
3595
+
3596
+ variant :max_group_tiered_package, -> { Orb::NewPlanMaxGroupTieredPackagePrice }
3597
+
3598
+ variant :scalable_matrix_with_unit_pricing, -> { Orb::NewPlanScalableMatrixWithUnitPricingPrice }
3599
+
3600
+ variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewPlanScalableMatrixWithTieredPricingPrice }
3601
+
3602
+ variant :cumulative_grouped_bulk, -> { Orb::NewPlanCumulativeGroupedBulkPrice }
3603
+
3604
+ variant :cumulative_grouped_allocation,
3605
+ -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation }
3606
+
3607
+ variant :daily_credit_allowance,
3608
+ -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance }
3609
+
3610
+ variant :metered_allowance, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance }
3611
+
3612
+ variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice }
3613
+
3614
+ variant :percent, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent }
3615
+
3616
+ variant :event_output, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput }
3617
+
3618
+ class BulkWithFilters < Orb::Internal::Type::BaseModel
3619
+ # @!attribute bulk_with_filters_config
3620
+ # Configuration for bulk_with_filters pricing
3621
+ #
3622
+ # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig]
3623
+ required :bulk_with_filters_config,
3624
+ -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig }
3625
+
3626
+ # @!attribute cadence
3627
+ # The cadence to bill for this price on.
3628
+ #
3629
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence]
3630
+ required :cadence,
3631
+ enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence }
3632
+
3633
+ # @!attribute item_id
3634
+ # The id of the item the price will be associated with.
3635
+ #
3636
+ # @return [String]
3637
+ required :item_id, String
3638
+
3639
+ # @!attribute model_type
3640
+ # The pricing model type
3641
+ #
3642
+ # @return [Symbol, :bulk_with_filters]
3643
+ required :model_type, const: :bulk_with_filters
3644
+
3645
+ # @!attribute name
3646
+ # The name of the price.
3647
+ #
3648
+ # @return [String]
3649
+ required :name, String
3650
+
3651
+ # @!attribute billable_metric_id
3652
+ # The id of the billable metric for the price. Only needed if the price is
3653
+ # usage-based.
3654
+ #
3655
+ # @return [String, nil]
3656
+ optional :billable_metric_id, String, nil?: true
3657
+
3658
+ # @!attribute billed_in_advance
3659
+ # If the Price represents a fixed cost, the price will be billed in-advance if
3660
+ # this is true, and in-arrears if this is false.
3661
+ #
3662
+ # @return [Boolean, nil]
3663
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
3664
+
3665
+ # @!attribute billing_cycle_configuration
3666
+ # For custom cadence: specifies the duration of the billing period in days or
3667
+ # months.
3668
+ #
3669
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
3670
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
3671
+
3672
+ # @!attribute conversion_rate
3673
+ # The per unit conversion rate of the price currency to the invoicing currency.
3674
+ #
3675
+ # @return [Float, nil]
3676
+ optional :conversion_rate, Float, nil?: true
3677
+
3678
+ # @!attribute conversion_rate_config
3679
+ # The configuration for the rate of the price currency to the invoicing currency.
3680
+ #
3681
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
3682
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
3683
+
3684
+ # @!attribute currency
3685
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
3686
+ # price is billed.
3687
+ #
3688
+ # @return [String, nil]
3689
+ optional :currency, String, nil?: true
3690
+
3691
+ # @!attribute dimensional_price_configuration
3692
+ # For dimensional price: specifies a price group and dimension values
3693
+ #
3694
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
3695
+ optional :dimensional_price_configuration,
3696
+ -> {
3697
+ Orb::NewDimensionalPriceConfiguration
3698
+ },
3699
+ nil?: true
3700
+
3701
+ # @!attribute external_price_id
3702
+ # An alias for the price.
3703
+ #
3704
+ # @return [String, nil]
3705
+ optional :external_price_id, String, nil?: true
3706
+
3707
+ # @!attribute fixed_price_quantity
3708
+ # If the Price represents a fixed cost, this represents the quantity of units
3709
+ # applied.
3710
+ #
3711
+ # @return [Float, nil]
3712
+ optional :fixed_price_quantity, Float, nil?: true
3713
+
3714
+ # @!attribute invoice_grouping_key
3715
+ # The property used to group this price on an invoice
3716
+ #
3717
+ # @return [String, nil]
3718
+ optional :invoice_grouping_key, String, nil?: true
3719
+
3720
+ # @!attribute invoicing_cycle_configuration
3721
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
3722
+ # If unspecified, a single invoice is produced per billing cycle.
3723
+ #
3724
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
3725
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
3726
+
3727
+ # @!attribute license_type_id
3728
+ # The ID of the license type to associate with this price.
3729
+ #
3730
+ # @return [String, nil]
3731
+ optional :license_type_id, String, nil?: true
3732
+
3733
+ # @!attribute metadata
3734
+ # User-specified key/value pairs for the resource. Individual keys can be removed
3735
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
3736
+ # by setting `metadata` to `null`.
3737
+ #
3738
+ # @return [Hash{Symbol=>String, nil}, nil]
3739
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
3740
+
3741
+ # @!attribute reference_id
3742
+ # A transient ID that can be used to reference this price when adding adjustments
3743
+ # in the same API call.
3744
+ #
3745
+ # @return [String, nil]
3746
+ optional :reference_id, String, nil?: true
3747
+
3748
+ # @!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)
3749
+ # Some parameter documentations has been truncated, see
3750
+ # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters}
3751
+ # for more details.
3752
+ #
3753
+ # @param bulk_with_filters_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing
3754
+ #
3755
+ # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence] The cadence to bill for this price on.
3756
+ #
3757
+ # @param item_id [String] The id of the item the price will be associated with.
3758
+ #
3759
+ # @param name [String] The name of the price.
3760
+ #
3761
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
3762
+ #
3763
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
3764
+ #
3765
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
3766
+ #
3767
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
3768
+ #
3769
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
3770
+ #
3771
+ # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr
3772
+ #
3773
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
3774
+ #
3775
+ # @param external_price_id [String, nil] An alias for the price.
3776
+ #
3777
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
3778
+ #
3779
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
3780
+ #
3781
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
3782
+ #
3783
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
3784
+ #
3785
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
3786
+ #
3787
+ # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
3788
+ #
3789
+ # @param model_type [Symbol, :bulk_with_filters] The pricing model type
3790
+
3791
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters#bulk_with_filters_config
3792
+ class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel
3793
+ # @!attribute filters
3794
+ # Property filters to apply (all must match)
3795
+ #
3796
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter>]
3797
+ required :filters,
3798
+ -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] }
3799
+
3800
+ # @!attribute tiers
3801
+ # Bulk tiers for rating based on total usage volume
3802
+ #
3803
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier>]
3804
+ required :tiers,
3805
+ -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] }
3806
+
3807
+ # @!method initialize(filters:, tiers:)
3808
+ # Configuration for bulk_with_filters pricing
3809
+ #
3810
+ # @param filters [Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter>] Property filters to apply (all must match)
3811
+ #
3812
+ # @param tiers [Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier>] Bulk tiers for rating based on total usage volume
3813
+
3814
+ class Filter < Orb::Internal::Type::BaseModel
3815
+ # @!attribute property_key
3816
+ # Event property key to filter on
3817
+ #
3818
+ # @return [String]
3819
+ required :property_key, String
3820
+
3821
+ # @!attribute property_value
3822
+ # Event property value to match
3823
+ #
3824
+ # @return [String]
3825
+ required :property_value, String
3826
+
3827
+ # @!method initialize(property_key:, property_value:)
3828
+ # Configuration for a single property filter
3829
+ #
3830
+ # @param property_key [String] Event property key to filter on
3831
+ #
3832
+ # @param property_value [String] Event property value to match
3833
+ end
3834
+
3835
+ class Tier < Orb::Internal::Type::BaseModel
3836
+ # @!attribute unit_amount
3837
+ # Amount per unit
3838
+ #
3839
+ # @return [String]
3840
+ required :unit_amount, String
3841
+
3842
+ # @!attribute tier_lower_bound
3843
+ # The lower bound for this tier
3844
+ #
3845
+ # @return [String, nil]
3846
+ optional :tier_lower_bound, String, nil?: true
3847
+
3848
+ # @!method initialize(unit_amount:, tier_lower_bound: nil)
3849
+ # Configuration for a single bulk pricing tier
3850
+ #
3851
+ # @param unit_amount [String] Amount per unit
3852
+ #
3853
+ # @param tier_lower_bound [String, nil] The lower bound for this tier
3854
+ end
3855
+ end
3856
+
3857
+ # The cadence to bill for this price on.
3858
+ #
3859
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters#cadence
3860
+ module Cadence
3861
+ extend Orb::Internal::Type::Enum
3862
+
3863
+ ANNUAL = :annual
3864
+ SEMI_ANNUAL = :semi_annual
3865
+ MONTHLY = :monthly
3866
+ QUARTERLY = :quarterly
3867
+ ONE_TIME = :one_time
3868
+ CUSTOM = :custom
3869
+
3870
+ # @!method self.values
3871
+ # @return [Array<Symbol>]
3872
+ end
3873
+ end
3874
+
3875
+ class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel
3876
+ # @!attribute cadence
3877
+ # The cadence to bill for this price on.
3878
+ #
3879
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence]
3880
+ required :cadence,
3881
+ enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence }
3882
+
3883
+ # @!attribute item_id
3884
+ # The id of the item the price will be associated with.
3885
+ #
3886
+ # @return [String]
3887
+ required :item_id, String
3888
+
3889
+ # @!attribute matrix_with_threshold_discounts_config
3890
+ # Configuration for matrix_with_threshold_discounts pricing
3891
+ #
3892
+ # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig]
3893
+ required :matrix_with_threshold_discounts_config,
3894
+ -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig }
3895
+
3896
+ # @!attribute model_type
3897
+ # The pricing model type
3898
+ #
3899
+ # @return [Symbol, :matrix_with_threshold_discounts]
3900
+ required :model_type, const: :matrix_with_threshold_discounts
3901
+
3902
+ # @!attribute name
3903
+ # The name of the price.
3904
+ #
3905
+ # @return [String]
3906
+ required :name, String
3907
+
3908
+ # @!attribute billable_metric_id
3909
+ # The id of the billable metric for the price. Only needed if the price is
3910
+ # usage-based.
3911
+ #
3912
+ # @return [String, nil]
3913
+ optional :billable_metric_id, String, nil?: true
3914
+
3915
+ # @!attribute billed_in_advance
3916
+ # If the Price represents a fixed cost, the price will be billed in-advance if
3917
+ # this is true, and in-arrears if this is false.
3918
+ #
3919
+ # @return [Boolean, nil]
3920
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
3921
+
3922
+ # @!attribute billing_cycle_configuration
3923
+ # For custom cadence: specifies the duration of the billing period in days or
3924
+ # months.
3925
+ #
3926
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
3927
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
3928
+
3929
+ # @!attribute conversion_rate
3930
+ # The per unit conversion rate of the price currency to the invoicing currency.
3931
+ #
3932
+ # @return [Float, nil]
3933
+ optional :conversion_rate, Float, nil?: true
3934
+
3935
+ # @!attribute conversion_rate_config
3936
+ # The configuration for the rate of the price currency to the invoicing currency.
3937
+ #
3938
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
3939
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
3940
+
3941
+ # @!attribute currency
3942
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
3943
+ # price is billed.
3944
+ #
3945
+ # @return [String, nil]
3946
+ optional :currency, String, nil?: true
3947
+
3948
+ # @!attribute dimensional_price_configuration
3949
+ # For dimensional price: specifies a price group and dimension values
3950
+ #
3951
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
3952
+ optional :dimensional_price_configuration,
3953
+ -> {
3954
+ Orb::NewDimensionalPriceConfiguration
3955
+ },
3956
+ nil?: true
3957
+
3958
+ # @!attribute external_price_id
3959
+ # An alias for the price.
3960
+ #
3961
+ # @return [String, nil]
3962
+ optional :external_price_id, String, nil?: true
3963
+
3964
+ # @!attribute fixed_price_quantity
3965
+ # If the Price represents a fixed cost, this represents the quantity of units
3966
+ # applied.
3967
+ #
3968
+ # @return [Float, nil]
3969
+ optional :fixed_price_quantity, Float, nil?: true
3970
+
3971
+ # @!attribute invoice_grouping_key
3972
+ # The property used to group this price on an invoice
3973
+ #
3974
+ # @return [String, nil]
3975
+ optional :invoice_grouping_key, String, nil?: true
3976
+
3977
+ # @!attribute invoicing_cycle_configuration
3978
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
3979
+ # If unspecified, a single invoice is produced per billing cycle.
3980
+ #
3981
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
3982
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
3983
+
3984
+ # @!attribute license_type_id
3985
+ # The ID of the license type to associate with this price.
3986
+ #
3987
+ # @return [String, nil]
3988
+ optional :license_type_id, String, nil?: true
3989
+
3990
+ # @!attribute metadata
3991
+ # User-specified key/value pairs for the resource. Individual keys can be removed
3992
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
3993
+ # by setting `metadata` to `null`.
3994
+ #
3995
+ # @return [Hash{Symbol=>String, nil}, nil]
3996
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
3997
+
3998
+ # @!attribute reference_id
3999
+ # A transient ID that can be used to reference this price when adding adjustments
4000
+ # in the same API call.
4001
+ #
4002
+ # @return [String, nil]
4003
+ optional :reference_id, String, nil?: true
1698
4004
 
1699
- # The definition of a new adjustment to create and add to the plan.
1700
- #
1701
- # @see Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment#adjustment
1702
- module Adjustment
1703
- extend Orb::Internal::Type::Union
4005
+ # @!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)
4006
+ # Some parameter documentations has been truncated, see
4007
+ # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts}
4008
+ # for more details.
4009
+ #
4010
+ # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on.
4011
+ #
4012
+ # @param item_id [String] The id of the item the price will be associated with.
4013
+ #
4014
+ # @param matrix_with_threshold_discounts_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing
4015
+ #
4016
+ # @param name [String] The name of the price.
4017
+ #
4018
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
4019
+ #
4020
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
4021
+ #
4022
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
4023
+ #
4024
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
4025
+ #
4026
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
4027
+ #
4028
+ # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr
4029
+ #
4030
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
4031
+ #
4032
+ # @param external_price_id [String, nil] An alias for the price.
4033
+ #
4034
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
4035
+ #
4036
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
4037
+ #
4038
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
4039
+ #
4040
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
4041
+ #
4042
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
4043
+ #
4044
+ # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
4045
+ #
4046
+ # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type
1704
4047
 
1705
- discriminator :adjustment_type
4048
+ # The cadence to bill for this price on.
4049
+ #
4050
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts#cadence
4051
+ module Cadence
4052
+ extend Orb::Internal::Type::Enum
1706
4053
 
1707
- variant :percentage_discount, -> { Orb::NewPercentageDiscount }
4054
+ ANNUAL = :annual
4055
+ SEMI_ANNUAL = :semi_annual
4056
+ MONTHLY = :monthly
4057
+ QUARTERLY = :quarterly
4058
+ ONE_TIME = :one_time
4059
+ CUSTOM = :custom
1708
4060
 
1709
- variant :usage_discount, -> { Orb::NewUsageDiscount }
4061
+ # @!method self.values
4062
+ # @return [Array<Symbol>]
4063
+ end
1710
4064
 
1711
- variant :amount_discount, -> { Orb::NewAmountDiscount }
4065
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config
4066
+ class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel
4067
+ # @!attribute default_unit_amount
4068
+ # Unit price used for usage that does not match any defined matrix cell.
4069
+ #
4070
+ # @return [String]
4071
+ required :default_unit_amount, String
1712
4072
 
1713
- variant :minimum, -> { Orb::NewMinimum }
4073
+ # @!attribute first_dimension
4074
+ # First matrix dimension key.
4075
+ #
4076
+ # @return [String]
4077
+ required :first_dimension, String
1714
4078
 
1715
- variant :maximum, -> { Orb::NewMaximum }
4079
+ # @!attribute matrix_values
4080
+ # Per-cell unit prices.
4081
+ #
4082
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue>]
4083
+ required :matrix_values,
4084
+ -> do
4085
+ Orb::Internal::Type::ArrayOf[
4086
+ Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue
4087
+ ]
4088
+ end
1716
4089
 
1717
- # @!method self.variants
1718
- # @return [Array(Orb::Models::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)]
1719
- end
1720
- end
4090
+ # @!attribute second_dimension
4091
+ # Optional second matrix dimension key.
4092
+ #
4093
+ # @return [String, nil]
4094
+ optional :second_dimension, String, nil?: true
1721
4095
 
1722
- class ReplacePrice < Orb::Internal::Type::BaseModel
1723
- # @!attribute replaces_price_id
1724
- # The id of the price on the plan to replace in the plan.
1725
- #
1726
- # @return [String]
1727
- required :replaces_price_id, String
4096
+ # @!attribute threshold_discount_groups
4097
+ #
4098
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup>, nil]
4099
+ optional :threshold_discount_groups,
4100
+ -> do
4101
+ Orb::Internal::Type::ArrayOf[
4102
+ Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup
4103
+ ]
4104
+ end
1728
4105
 
1729
- # @!attribute allocation_price
1730
- # The allocation price to add to the plan.
1731
- #
1732
- # @return [Orb::Models::NewAllocationPrice, nil]
1733
- optional :allocation_price, -> { Orb::NewAllocationPrice }, nil?: true
4106
+ # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil)
4107
+ # Configuration for matrix_with_threshold_discounts pricing
4108
+ #
4109
+ # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell.
4110
+ #
4111
+ # @param first_dimension [String] First matrix dimension key.
4112
+ #
4113
+ # @param matrix_values [Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue>] Per-cell unit prices.
4114
+ #
4115
+ # @param second_dimension [String, nil] Optional second matrix dimension key.
4116
+ #
4117
+ # @param threshold_discount_groups [Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup>]
1734
4118
 
1735
- # @!attribute plan_phase_order
1736
- # The phase to replace this price from.
1737
- #
1738
- # @return [Integer, nil]
1739
- optional :plan_phase_order, Integer, nil?: true
4119
+ class MatrixValue < Orb::Internal::Type::BaseModel
4120
+ # @!attribute first_dimension_value
4121
+ #
4122
+ # @return [String]
4123
+ required :first_dimension_value, String
1740
4124
 
1741
- # @!attribute price
1742
- # New plan price request body params.
1743
- #
1744
- # @return [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil]
1745
- optional :price, union: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price }, nil?: true
4125
+ # @!attribute unit_amount
4126
+ #
4127
+ # @return [String]
4128
+ required :unit_amount, String
1746
4129
 
1747
- # @!method initialize(replaces_price_id:, allocation_price: nil, plan_phase_order: nil, price: nil)
1748
- # @param replaces_price_id [String] The id of the price on the plan to replace in the plan.
1749
- #
1750
- # @param allocation_price [Orb::Models::NewAllocationPrice, nil] The allocation price to add to the plan.
1751
- #
1752
- # @param plan_phase_order [Integer, nil] The phase to replace this price from.
1753
- #
1754
- # @param price [Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput, nil] New plan price request body params.
4130
+ # @!attribute second_dimension_value
4131
+ #
4132
+ # @return [String, nil]
4133
+ optional :second_dimension_value, String, nil?: true
1755
4134
 
1756
- # New plan price request body params.
1757
- #
1758
- # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice#price
1759
- module Price
1760
- extend Orb::Internal::Type::Union
4135
+ # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil)
4136
+ # @param first_dimension_value [String]
4137
+ # @param unit_amount [String]
4138
+ # @param second_dimension_value [String, nil]
4139
+ end
1761
4140
 
1762
- discriminator :model_type
4141
+ class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel
4142
+ # @!attribute above_threshold_discount_percentage
4143
+ # Discount rate applied to spend above the threshold.
4144
+ #
4145
+ # @return [String]
4146
+ required :above_threshold_discount_percentage, String
1763
4147
 
1764
- variant :unit, -> { Orb::NewPlanUnitPrice }
4148
+ # @!attribute below_threshold_discount_percentage
4149
+ # Discount rate applied to spend at or below the threshold. Set to 0 for no
4150
+ # baseline discount.
4151
+ #
4152
+ # @return [String]
4153
+ required :below_threshold_discount_percentage, String
1765
4154
 
1766
- variant :tiered, -> { Orb::NewPlanTieredPrice }
4155
+ # @!attribute cell_coordinates
4156
+ # Semicolon-separated list of matrix cell coordinates targeted by this group. Each
4157
+ # coordinate is `first,second` when the matrix has two dimensions, or just `first`
4158
+ # for a single-dimension matrix. Example: `blue,circle;green,triangle`.
4159
+ #
4160
+ # @return [String]
4161
+ required :cell_coordinates, String
1767
4162
 
1768
- variant :bulk, -> { Orb::NewPlanBulkPrice }
4163
+ # @!attribute threshold_amount
4164
+ #
4165
+ # @return [String]
4166
+ required :threshold_amount, String
1769
4167
 
1770
- variant :bulk_with_filters, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters }
4168
+ # @!attribute description
4169
+ #
4170
+ # @return [String, nil]
4171
+ optional :description, String, nil?: true
1771
4172
 
1772
- variant :package, -> { Orb::NewPlanPackagePrice }
4173
+ # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil)
4174
+ # Some parameter documentations has been truncated, see
4175
+ # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup}
4176
+ # for more details.
4177
+ #
4178
+ # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold.
4179
+ #
4180
+ # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli
4181
+ #
4182
+ # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each
4183
+ #
4184
+ # @param threshold_amount [String]
4185
+ #
4186
+ # @param description [String, nil]
4187
+ end
4188
+ end
4189
+ end
1773
4190
 
1774
- variant :matrix, -> { Orb::NewPlanMatrixPrice }
4191
+ class TieredWithProration < Orb::Internal::Type::BaseModel
4192
+ # @!attribute cadence
4193
+ # The cadence to bill for this price on.
4194
+ #
4195
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence]
4196
+ required :cadence,
4197
+ enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence }
1775
4198
 
1776
- variant :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice }
4199
+ # @!attribute item_id
4200
+ # The id of the item the price will be associated with.
4201
+ #
4202
+ # @return [String]
4203
+ required :item_id, String
1777
4204
 
1778
- variant :tiered_package, -> { Orb::NewPlanTieredPackagePrice }
4205
+ # @!attribute model_type
4206
+ # The pricing model type
4207
+ #
4208
+ # @return [Symbol, :tiered_with_proration]
4209
+ required :model_type, const: :tiered_with_proration
1779
4210
 
1780
- variant :tiered_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice }
4211
+ # @!attribute name
4212
+ # The name of the price.
4213
+ #
4214
+ # @return [String]
4215
+ required :name, String
1781
4216
 
1782
- variant :grouped_tiered, -> { Orb::NewPlanGroupedTieredPrice }
4217
+ # @!attribute tiered_with_proration_config
4218
+ # Configuration for tiered_with_proration pricing
4219
+ #
4220
+ # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig]
4221
+ required :tiered_with_proration_config,
4222
+ -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig }
1783
4223
 
1784
- variant :tiered_package_with_minimum, -> { Orb::NewPlanTieredPackageWithMinimumPrice }
4224
+ # @!attribute billable_metric_id
4225
+ # The id of the billable metric for the price. Only needed if the price is
4226
+ # usage-based.
4227
+ #
4228
+ # @return [String, nil]
4229
+ optional :billable_metric_id, String, nil?: true
1785
4230
 
1786
- variant :package_with_allocation, -> { Orb::NewPlanPackageWithAllocationPrice }
4231
+ # @!attribute billed_in_advance
4232
+ # If the Price represents a fixed cost, the price will be billed in-advance if
4233
+ # this is true, and in-arrears if this is false.
4234
+ #
4235
+ # @return [Boolean, nil]
4236
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
1787
4237
 
1788
- variant :unit_with_percent, -> { Orb::NewPlanUnitWithPercentPrice }
4238
+ # @!attribute billing_cycle_configuration
4239
+ # For custom cadence: specifies the duration of the billing period in days or
4240
+ # months.
4241
+ #
4242
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
4243
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1789
4244
 
1790
- variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice }
4245
+ # @!attribute conversion_rate
4246
+ # The per unit conversion rate of the price currency to the invoicing currency.
4247
+ #
4248
+ # @return [Float, nil]
4249
+ optional :conversion_rate, Float, nil?: true
1791
4250
 
1792
- variant :tiered_with_proration,
1793
- -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration }
4251
+ # @!attribute conversion_rate_config
4252
+ # The configuration for the rate of the price currency to the invoicing currency.
4253
+ #
4254
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
4255
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1794
4256
 
1795
- variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice }
4257
+ # @!attribute currency
4258
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
4259
+ # price is billed.
4260
+ #
4261
+ # @return [String, nil]
4262
+ optional :currency, String, nil?: true
1796
4263
 
1797
- variant :grouped_allocation, -> { Orb::NewPlanGroupedAllocationPrice }
4264
+ # @!attribute dimensional_price_configuration
4265
+ # For dimensional price: specifies a price group and dimension values
4266
+ #
4267
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
4268
+ optional :dimensional_price_configuration,
4269
+ -> {
4270
+ Orb::NewDimensionalPriceConfiguration
4271
+ },
4272
+ nil?: true
1798
4273
 
1799
- variant :bulk_with_proration, -> { Orb::NewPlanBulkWithProrationPrice }
4274
+ # @!attribute external_price_id
4275
+ # An alias for the price.
4276
+ #
4277
+ # @return [String, nil]
4278
+ optional :external_price_id, String, nil?: true
1800
4279
 
1801
- variant :grouped_with_prorated_minimum, -> { Orb::NewPlanGroupedWithProratedMinimumPrice }
4280
+ # @!attribute fixed_price_quantity
4281
+ # If the Price represents a fixed cost, this represents the quantity of units
4282
+ # applied.
4283
+ #
4284
+ # @return [Float, nil]
4285
+ optional :fixed_price_quantity, Float, nil?: true
1802
4286
 
1803
- variant :grouped_with_metered_minimum, -> { Orb::NewPlanGroupedWithMeteredMinimumPrice }
4287
+ # @!attribute invoice_grouping_key
4288
+ # The property used to group this price on an invoice
4289
+ #
4290
+ # @return [String, nil]
4291
+ optional :invoice_grouping_key, String, nil?: true
4292
+
4293
+ # @!attribute invoicing_cycle_configuration
4294
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
4295
+ # If unspecified, a single invoice is produced per billing cycle.
4296
+ #
4297
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
4298
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1804
4299
 
1805
- variant :grouped_with_min_max_thresholds,
1806
- -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds }
4300
+ # @!attribute license_type_id
4301
+ # The ID of the license type to associate with this price.
4302
+ #
4303
+ # @return [String, nil]
4304
+ optional :license_type_id, String, nil?: true
1807
4305
 
1808
- variant :matrix_with_display_name, -> { Orb::NewPlanMatrixWithDisplayNamePrice }
4306
+ # @!attribute metadata
4307
+ # User-specified key/value pairs for the resource. Individual keys can be removed
4308
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
4309
+ # by setting `metadata` to `null`.
4310
+ #
4311
+ # @return [Hash{Symbol=>String, nil}, nil]
4312
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
1809
4313
 
1810
- variant :grouped_tiered_package, -> { Orb::NewPlanGroupedTieredPackagePrice }
4314
+ # @!attribute reference_id
4315
+ # A transient ID that can be used to reference this price when adding adjustments
4316
+ # in the same API call.
4317
+ #
4318
+ # @return [String, nil]
4319
+ optional :reference_id, String, nil?: true
1811
4320
 
1812
- variant :max_group_tiered_package, -> { Orb::NewPlanMaxGroupTieredPackagePrice }
4321
+ # @!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)
4322
+ # Some parameter documentations has been truncated, see
4323
+ # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration}
4324
+ # for more details.
4325
+ #
4326
+ # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on.
4327
+ #
4328
+ # @param item_id [String] The id of the item the price will be associated with.
4329
+ #
4330
+ # @param name [String] The name of the price.
4331
+ #
4332
+ # @param tiered_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing
4333
+ #
4334
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
4335
+ #
4336
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
4337
+ #
4338
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
4339
+ #
4340
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
4341
+ #
4342
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
4343
+ #
4344
+ # @param currency [String, nil] An ISO 4217 currency string, or custom pricing unit identifier, in which this pr
4345
+ #
4346
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
4347
+ #
4348
+ # @param external_price_id [String, nil] An alias for the price.
4349
+ #
4350
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
4351
+ #
4352
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
4353
+ #
4354
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
4355
+ #
4356
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
4357
+ #
4358
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
4359
+ #
4360
+ # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
4361
+ #
4362
+ # @param model_type [Symbol, :tiered_with_proration] The pricing model type
1813
4363
 
1814
- variant :scalable_matrix_with_unit_pricing, -> { Orb::NewPlanScalableMatrixWithUnitPricingPrice }
4364
+ # The cadence to bill for this price on.
4365
+ #
4366
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration#cadence
4367
+ module Cadence
4368
+ extend Orb::Internal::Type::Enum
1815
4369
 
1816
- variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewPlanScalableMatrixWithTieredPricingPrice }
4370
+ ANNUAL = :annual
4371
+ SEMI_ANNUAL = :semi_annual
4372
+ MONTHLY = :monthly
4373
+ QUARTERLY = :quarterly
4374
+ ONE_TIME = :one_time
4375
+ CUSTOM = :custom
1817
4376
 
1818
- variant :cumulative_grouped_bulk, -> { Orb::NewPlanCumulativeGroupedBulkPrice }
4377
+ # @!method self.values
4378
+ # @return [Array<Symbol>]
4379
+ end
1819
4380
 
1820
- variant :cumulative_grouped_allocation,
1821
- -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation }
4381
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration#tiered_with_proration_config
4382
+ class TieredWithProrationConfig < Orb::Internal::Type::BaseModel
4383
+ # @!attribute tiers
4384
+ # Tiers for rating based on total usage quantities into the specified tier with
4385
+ # proration
4386
+ #
4387
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier>]
4388
+ required :tiers,
4389
+ -> do
4390
+ Orb::Internal::Type::ArrayOf[
4391
+ Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier
4392
+ ]
4393
+ end
1822
4394
 
1823
- variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice }
4395
+ # @!method initialize(tiers:)
4396
+ # Some parameter documentations has been truncated, see
4397
+ # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig}
4398
+ # for more details.
4399
+ #
4400
+ # Configuration for tiered_with_proration pricing
4401
+ #
4402
+ # @param tiers [Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier>] Tiers for rating based on total usage quantities into the specified tier with pr
1824
4403
 
1825
- variant :percent, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent }
4404
+ class Tier < Orb::Internal::Type::BaseModel
4405
+ # @!attribute tier_lower_bound
4406
+ # Inclusive tier starting value
4407
+ #
4408
+ # @return [String]
4409
+ required :tier_lower_bound, String
1826
4410
 
1827
- variant :event_output, -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput }
4411
+ # @!attribute unit_amount
4412
+ # Amount per unit
4413
+ #
4414
+ # @return [String]
4415
+ required :unit_amount, String
1828
4416
 
1829
- class BulkWithFilters < Orb::Internal::Type::BaseModel
1830
- # @!attribute bulk_with_filters_config
1831
- # Configuration for bulk_with_filters pricing
1832
- #
1833
- # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig]
1834
- required :bulk_with_filters_config,
1835
- -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig }
4417
+ # @!method initialize(tier_lower_bound:, unit_amount:)
4418
+ # Configuration for a single tiered with proration tier
4419
+ #
4420
+ # @param tier_lower_bound [String] Inclusive tier starting value
4421
+ #
4422
+ # @param unit_amount [String] Amount per unit
4423
+ end
4424
+ end
4425
+ end
1836
4426
 
4427
+ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel
1837
4428
  # @!attribute cadence
1838
4429
  # The cadence to bill for this price on.
1839
4430
  #
1840
- # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence]
4431
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence]
1841
4432
  required :cadence,
1842
- enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence }
4433
+ enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence }
4434
+
4435
+ # @!attribute grouped_with_min_max_thresholds_config
4436
+ # Configuration for grouped_with_min_max_thresholds pricing
4437
+ #
4438
+ # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig]
4439
+ required :grouped_with_min_max_thresholds_config,
4440
+ -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig }
1843
4441
 
1844
4442
  # @!attribute item_id
1845
4443
  # The id of the item the price will be associated with.
@@ -1850,8 +4448,8 @@ module Orb
1850
4448
  # @!attribute model_type
1851
4449
  # The pricing model type
1852
4450
  #
1853
- # @return [Symbol, :bulk_with_filters]
1854
- required :model_type, const: :bulk_with_filters
4451
+ # @return [Symbol, :grouped_with_min_max_thresholds]
4452
+ required :model_type, const: :grouped_with_min_max_thresholds
1855
4453
 
1856
4454
  # @!attribute name
1857
4455
  # The name of the price.
@@ -1890,11 +4488,7 @@ module Orb
1890
4488
  # The configuration for the rate of the price currency to the invoicing currency.
1891
4489
  #
1892
4490
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
1893
- optional :conversion_rate_config,
1894
- union: -> {
1895
- Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::ConversionRateConfig
1896
- },
1897
- nil?: true
4491
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1898
4492
 
1899
4493
  # @!attribute currency
1900
4494
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -1960,14 +4554,14 @@ module Orb
1960
4554
  # @return [String, nil]
1961
4555
  optional :reference_id, String, nil?: true
1962
4556
 
1963
- # @!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)
4557
+ # @!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)
1964
4558
  # Some parameter documentations has been truncated, see
1965
- # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters}
4559
+ # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds}
1966
4560
  # for more details.
1967
4561
  #
1968
- # @param bulk_with_filters_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing
4562
+ # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on.
1969
4563
  #
1970
- # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::Cadence] The cadence to bill for this price on.
4564
+ # @param grouped_with_min_max_thresholds_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing
1971
4565
  #
1972
4566
  # @param item_id [String] The id of the item the price will be associated with.
1973
4567
  #
@@ -2001,77 +4595,11 @@ module Orb
2001
4595
  #
2002
4596
  # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
2003
4597
  #
2004
- # @param model_type [Symbol, :bulk_with_filters] The pricing model type
2005
-
2006
- # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters#bulk_with_filters_config
2007
- class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel
2008
- # @!attribute filters
2009
- # Property filters to apply (all must match)
2010
- #
2011
- # @return [Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter>]
2012
- required :filters,
2013
- -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter] }
2014
-
2015
- # @!attribute tiers
2016
- # Bulk tiers for rating based on total usage volume
2017
- #
2018
- # @return [Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier>]
2019
- required :tiers,
2020
- -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier] }
2021
-
2022
- # @!method initialize(filters:, tiers:)
2023
- # Configuration for bulk_with_filters pricing
2024
- #
2025
- # @param filters [Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Filter>] Property filters to apply (all must match)
2026
- #
2027
- # @param tiers [Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters::BulkWithFiltersConfig::Tier>] Bulk tiers for rating based on total usage volume
2028
-
2029
- class Filter < Orb::Internal::Type::BaseModel
2030
- # @!attribute property_key
2031
- # Event property key to filter on
2032
- #
2033
- # @return [String]
2034
- required :property_key, String
2035
-
2036
- # @!attribute property_value
2037
- # Event property value to match
2038
- #
2039
- # @return [String]
2040
- required :property_value, String
2041
-
2042
- # @!method initialize(property_key:, property_value:)
2043
- # Configuration for a single property filter
2044
- #
2045
- # @param property_key [String] Event property key to filter on
2046
- #
2047
- # @param property_value [String] Event property value to match
2048
- end
2049
-
2050
- class Tier < Orb::Internal::Type::BaseModel
2051
- # @!attribute unit_amount
2052
- # Amount per unit
2053
- #
2054
- # @return [String]
2055
- required :unit_amount, String
2056
-
2057
- # @!attribute tier_lower_bound
2058
- # The lower bound for this tier
2059
- #
2060
- # @return [String, nil]
2061
- optional :tier_lower_bound, String, nil?: true
2062
-
2063
- # @!method initialize(unit_amount:, tier_lower_bound: nil)
2064
- # Configuration for a single bulk pricing tier
2065
- #
2066
- # @param unit_amount [String] Amount per unit
2067
- #
2068
- # @param tier_lower_bound [String, nil] The lower bound for this tier
2069
- end
2070
- end
4598
+ # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type
2071
4599
 
2072
4600
  # The cadence to bill for this price on.
2073
4601
  #
2074
- # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters#cadence
4602
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds#cadence
2075
4603
  module Cadence
2076
4604
  extend Orb::Internal::Type::Enum
2077
4605
 
@@ -2082,18 +4610,63 @@ module Orb
2082
4610
  ONE_TIME = :one_time
2083
4611
  CUSTOM = :custom
2084
4612
 
2085
- # @!method self.values
2086
- # @return [Array<Symbol>]
4613
+ # @!method self.values
4614
+ # @return [Array<Symbol>]
4615
+ end
4616
+
4617
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config
4618
+ class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel
4619
+ # @!attribute grouping_key
4620
+ # The event property used to group before applying thresholds
4621
+ #
4622
+ # @return [String]
4623
+ required :grouping_key, String
4624
+
4625
+ # @!attribute maximum_charge
4626
+ # The maximum amount to charge each group
4627
+ #
4628
+ # @return [String]
4629
+ required :maximum_charge, String
4630
+
4631
+ # @!attribute minimum_charge
4632
+ # The minimum amount to charge each group, regardless of usage
4633
+ #
4634
+ # @return [String]
4635
+ required :minimum_charge, String
4636
+
4637
+ # @!attribute per_unit_rate
4638
+ # The base price charged per group
4639
+ #
4640
+ # @return [String]
4641
+ required :per_unit_rate, String
4642
+
4643
+ # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:)
4644
+ # Configuration for grouped_with_min_max_thresholds pricing
4645
+ #
4646
+ # @param grouping_key [String] The event property used to group before applying thresholds
4647
+ #
4648
+ # @param maximum_charge [String] The maximum amount to charge each group
4649
+ #
4650
+ # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage
4651
+ #
4652
+ # @param per_unit_rate [String] The base price charged per group
2087
4653
  end
2088
4654
  end
2089
4655
 
2090
- class TieredWithProration < Orb::Internal::Type::BaseModel
4656
+ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel
2091
4657
  # @!attribute cadence
2092
4658
  # The cadence to bill for this price on.
2093
4659
  #
2094
- # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence]
4660
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence]
2095
4661
  required :cadence,
2096
- enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence }
4662
+ enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence }
4663
+
4664
+ # @!attribute cumulative_grouped_allocation_config
4665
+ # Configuration for cumulative_grouped_allocation pricing
4666
+ #
4667
+ # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig]
4668
+ required :cumulative_grouped_allocation_config,
4669
+ -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig }
2097
4670
 
2098
4671
  # @!attribute item_id
2099
4672
  # The id of the item the price will be associated with.
@@ -2104,8 +4677,8 @@ module Orb
2104
4677
  # @!attribute model_type
2105
4678
  # The pricing model type
2106
4679
  #
2107
- # @return [Symbol, :tiered_with_proration]
2108
- required :model_type, const: :tiered_with_proration
4680
+ # @return [Symbol, :cumulative_grouped_allocation]
4681
+ required :model_type, const: :cumulative_grouped_allocation
2109
4682
 
2110
4683
  # @!attribute name
2111
4684
  # The name of the price.
@@ -2113,13 +4686,6 @@ module Orb
2113
4686
  # @return [String]
2114
4687
  required :name, String
2115
4688
 
2116
- # @!attribute tiered_with_proration_config
2117
- # Configuration for tiered_with_proration pricing
2118
- #
2119
- # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig]
2120
- required :tiered_with_proration_config,
2121
- -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig }
2122
-
2123
4689
  # @!attribute billable_metric_id
2124
4690
  # The id of the billable metric for the price. Only needed if the price is
2125
4691
  # usage-based.
@@ -2151,11 +4717,7 @@ module Orb
2151
4717
  # The configuration for the rate of the price currency to the invoicing currency.
2152
4718
  #
2153
4719
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
2154
- optional :conversion_rate_config,
2155
- union: -> {
2156
- Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::ConversionRateConfig
2157
- },
2158
- nil?: true
4720
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
2159
4721
 
2160
4722
  # @!attribute currency
2161
4723
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -2221,19 +4783,19 @@ module Orb
2221
4783
  # @return [String, nil]
2222
4784
  optional :reference_id, String, nil?: true
2223
4785
 
2224
- # @!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)
4786
+ # @!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)
2225
4787
  # Some parameter documentations has been truncated, see
2226
- # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration}
4788
+ # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation}
2227
4789
  # for more details.
2228
4790
  #
2229
- # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on.
4791
+ # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on.
4792
+ #
4793
+ # @param cumulative_grouped_allocation_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing
2230
4794
  #
2231
4795
  # @param item_id [String] The id of the item the price will be associated with.
2232
4796
  #
2233
4797
  # @param name [String] The name of the price.
2234
4798
  #
2235
- # @param tiered_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing
2236
- #
2237
4799
  # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
2238
4800
  #
2239
4801
  # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
@@ -2262,11 +4824,11 @@ module Orb
2262
4824
  #
2263
4825
  # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
2264
4826
  #
2265
- # @param model_type [Symbol, :tiered_with_proration] The pricing model type
4827
+ # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type
2266
4828
 
2267
4829
  # The cadence to bill for this price on.
2268
4830
  #
2269
- # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration#cadence
4831
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation#cadence
2270
4832
  module Cadence
2271
4833
  extend Orb::Internal::Type::Enum
2272
4834
 
@@ -2281,66 +4843,59 @@ module Orb
2281
4843
  # @return [Array<Symbol>]
2282
4844
  end
2283
4845
 
2284
- # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration#tiered_with_proration_config
2285
- class TieredWithProrationConfig < Orb::Internal::Type::BaseModel
2286
- # @!attribute tiers
2287
- # Tiers for rating based on total usage quantities into the specified tier with
2288
- # proration
4846
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config
4847
+ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel
4848
+ # @!attribute cumulative_allocation
4849
+ # The overall allocation across all groups
2289
4850
  #
2290
- # @return [Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier>]
2291
- required :tiers,
2292
- -> do
2293
- Orb::Internal::Type::ArrayOf[
2294
- Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier
2295
- ]
2296
- end
4851
+ # @return [String]
4852
+ required :cumulative_allocation, String
2297
4853
 
2298
- # @!method initialize(tiers:)
2299
- # Some parameter documentations has been truncated, see
2300
- # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig}
2301
- # for more details.
2302
- #
2303
- # Configuration for tiered_with_proration pricing
4854
+ # @!attribute group_allocation
4855
+ # The allocation per individual group
2304
4856
  #
2305
- # @param tiers [Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration::TieredWithProrationConfig::Tier>] Tiers for rating based on total usage quantities into the specified tier with pr
4857
+ # @return [String]
4858
+ required :group_allocation, String
2306
4859
 
2307
- class Tier < Orb::Internal::Type::BaseModel
2308
- # @!attribute tier_lower_bound
2309
- # Inclusive tier starting value
2310
- #
2311
- # @return [String]
2312
- required :tier_lower_bound, String
4860
+ # @!attribute grouping_key
4861
+ # The event property used to group usage before applying allocations
4862
+ #
4863
+ # @return [String]
4864
+ required :grouping_key, String
2313
4865
 
2314
- # @!attribute unit_amount
2315
- # Amount per unit
2316
- #
2317
- # @return [String]
2318
- required :unit_amount, String
4866
+ # @!attribute unit_amount
4867
+ # The amount to charge for each unit outside of the allocation
4868
+ #
4869
+ # @return [String]
4870
+ required :unit_amount, String
2319
4871
 
2320
- # @!method initialize(tier_lower_bound:, unit_amount:)
2321
- # Configuration for a single tiered with proration tier
2322
- #
2323
- # @param tier_lower_bound [String] Inclusive tier starting value
2324
- #
2325
- # @param unit_amount [String] Amount per unit
2326
- end
4872
+ # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:)
4873
+ # Configuration for cumulative_grouped_allocation pricing
4874
+ #
4875
+ # @param cumulative_allocation [String] The overall allocation across all groups
4876
+ #
4877
+ # @param group_allocation [String] The allocation per individual group
4878
+ #
4879
+ # @param grouping_key [String] The event property used to group usage before applying allocations
4880
+ #
4881
+ # @param unit_amount [String] The amount to charge for each unit outside of the allocation
2327
4882
  end
2328
4883
  end
2329
4884
 
2330
- class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel
4885
+ class DailyCreditAllowance < Orb::Internal::Type::BaseModel
2331
4886
  # @!attribute cadence
2332
4887
  # The cadence to bill for this price on.
2333
4888
  #
2334
- # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence]
4889
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence]
2335
4890
  required :cadence,
2336
- enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence }
4891
+ enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence }
2337
4892
 
2338
- # @!attribute grouped_with_min_max_thresholds_config
2339
- # Configuration for grouped_with_min_max_thresholds pricing
4893
+ # @!attribute daily_credit_allowance_config
4894
+ # Configuration for daily_credit_allowance pricing
2340
4895
  #
2341
- # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig]
2342
- required :grouped_with_min_max_thresholds_config,
2343
- -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig }
4896
+ # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig]
4897
+ required :daily_credit_allowance_config,
4898
+ -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig }
2344
4899
 
2345
4900
  # @!attribute item_id
2346
4901
  # The id of the item the price will be associated with.
@@ -2351,8 +4906,8 @@ module Orb
2351
4906
  # @!attribute model_type
2352
4907
  # The pricing model type
2353
4908
  #
2354
- # @return [Symbol, :grouped_with_min_max_thresholds]
2355
- required :model_type, const: :grouped_with_min_max_thresholds
4909
+ # @return [Symbol, :daily_credit_allowance]
4910
+ required :model_type, const: :daily_credit_allowance
2356
4911
 
2357
4912
  # @!attribute name
2358
4913
  # The name of the price.
@@ -2391,11 +4946,7 @@ module Orb
2391
4946
  # The configuration for the rate of the price currency to the invoicing currency.
2392
4947
  #
2393
4948
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
2394
- optional :conversion_rate_config,
2395
- union: -> {
2396
- Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig
2397
- },
2398
- nil?: true
4949
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
2399
4950
 
2400
4951
  # @!attribute currency
2401
4952
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -2461,14 +5012,14 @@ module Orb
2461
5012
  # @return [String, nil]
2462
5013
  optional :reference_id, String, nil?: true
2463
5014
 
2464
- # @!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)
5015
+ # @!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)
2465
5016
  # Some parameter documentations has been truncated, see
2466
- # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds}
5017
+ # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance}
2467
5018
  # for more details.
2468
5019
  #
2469
- # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on.
5020
+ # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on.
2470
5021
  #
2471
- # @param grouped_with_min_max_thresholds_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing
5022
+ # @param daily_credit_allowance_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing
2472
5023
  #
2473
5024
  # @param item_id [String] The id of the item the price will be associated with.
2474
5025
  #
@@ -2502,11 +5053,11 @@ module Orb
2502
5053
  #
2503
5054
  # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
2504
5055
  #
2505
- # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type
5056
+ # @param model_type [Symbol, :daily_credit_allowance] The pricing model type
2506
5057
 
2507
5058
  # The cadence to bill for this price on.
2508
5059
  #
2509
- # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds#cadence
5060
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance#cadence
2510
5061
  module Cadence
2511
5062
  extend Orb::Internal::Type::Enum
2512
5063
 
@@ -2521,59 +5072,99 @@ module Orb
2521
5072
  # @return [Array<Symbol>]
2522
5073
  end
2523
5074
 
2524
- # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config
2525
- class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel
2526
- # @!attribute grouping_key
2527
- # The event property used to group before applying thresholds
5075
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance#daily_credit_allowance_config
5076
+ class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel
5077
+ # @!attribute daily_allowance
5078
+ # Credits granted per day. Lose-it-or-use-it; does not roll over.
2528
5079
  #
2529
5080
  # @return [String]
2530
- required :grouping_key, String
5081
+ required :daily_allowance, String
2531
5082
 
2532
- # @!attribute maximum_charge
2533
- # The maximum amount to charge each group
5083
+ # @!attribute default_unit_amount
5084
+ # Default per-unit credit rate for any usage not bucketed into a specified
5085
+ # matrix_value
2534
5086
  #
2535
5087
  # @return [String]
2536
- required :maximum_charge, String
5088
+ required :default_unit_amount, String
2537
5089
 
2538
- # @!attribute minimum_charge
2539
- # The minimum amount to charge each group, regardless of usage
5090
+ # @!attribute dimensions
5091
+ # One or two event property values to evaluate matrix groups by
2540
5092
  #
2541
- # @return [String]
2542
- required :minimum_charge, String
5093
+ # @return [Array<String, nil>]
5094
+ required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true]
2543
5095
 
2544
- # @!attribute per_unit_rate
2545
- # The base price charged per group
5096
+ # @!attribute event_day_property
5097
+ # Event property whose value identifies the day bucket the event belongs to (e.g.
5098
+ # 'event_day' set to an ISO date string in the customer's timezone). The allowance
5099
+ # resets per distinct value of this property.
2546
5100
  #
2547
5101
  # @return [String]
2548
- required :per_unit_rate, String
5102
+ required :event_day_property, String
2549
5103
 
2550
- # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:)
2551
- # Configuration for grouped_with_min_max_thresholds pricing
5104
+ # @!attribute matrix_values
5105
+ # Per-dimension credit rates
2552
5106
  #
2553
- # @param grouping_key [String] The event property used to group before applying thresholds
5107
+ # @return [Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue>]
5108
+ required :matrix_values,
5109
+ -> do
5110
+ Orb::Internal::Type::ArrayOf[
5111
+ Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue
5112
+ ]
5113
+ end
5114
+
5115
+ # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:)
5116
+ # Some parameter documentations has been truncated, see
5117
+ # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig}
5118
+ # for more details.
2554
5119
  #
2555
- # @param maximum_charge [String] The maximum amount to charge each group
5120
+ # Configuration for daily_credit_allowance pricing
2556
5121
  #
2557
- # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage
5122
+ # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over.
2558
5123
  #
2559
- # @param per_unit_rate [String] The base price charged per group
5124
+ # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified
5125
+ # matrix\_
5126
+ #
5127
+ # @param dimensions [Array<String, nil>] One or two event property values to evaluate matrix groups by
5128
+ #
5129
+ # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g.
5130
+ #
5131
+ # @param matrix_values [Array<Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue>] Per-dimension credit rates
5132
+
5133
+ class MatrixValue < Orb::Internal::Type::BaseModel
5134
+ # @!attribute dimension_values
5135
+ # One or two matrix keys to filter usage to this value by. For example, ["model"]
5136
+ # could be used to apply a different credit rate to each AI model.
5137
+ #
5138
+ # @return [Array<String, nil>]
5139
+ required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true]
5140
+
5141
+ # @!attribute unit_amount
5142
+ # Credits charged per unit of usage matching the specified dimension_values
5143
+ #
5144
+ # @return [String]
5145
+ required :unit_amount, String
5146
+
5147
+ # @!method initialize(dimension_values:, unit_amount:)
5148
+ # Some parameter documentations has been truncated, see
5149
+ # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue}
5150
+ # for more details.
5151
+ #
5152
+ # Per-dimension credit price for the daily credit allowance model.
5153
+ #
5154
+ # @param dimension_values [Array<String, nil>] One or two matrix keys to filter usage to this value by. For example, ["model"]
5155
+ #
5156
+ # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values
5157
+ end
2560
5158
  end
2561
5159
  end
2562
5160
 
2563
- class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel
5161
+ class MeteredAllowance < Orb::Internal::Type::BaseModel
2564
5162
  # @!attribute cadence
2565
5163
  # The cadence to bill for this price on.
2566
5164
  #
2567
- # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence]
5165
+ # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence]
2568
5166
  required :cadence,
2569
- enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence }
2570
-
2571
- # @!attribute cumulative_grouped_allocation_config
2572
- # Configuration for cumulative_grouped_allocation pricing
2573
- #
2574
- # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig]
2575
- required :cumulative_grouped_allocation_config,
2576
- -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig }
5167
+ enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence }
2577
5168
 
2578
5169
  # @!attribute item_id
2579
5170
  # The id of the item the price will be associated with.
@@ -2581,11 +5172,18 @@ module Orb
2581
5172
  # @return [String]
2582
5173
  required :item_id, String
2583
5174
 
5175
+ # @!attribute metered_allowance_config
5176
+ # Configuration for metered_allowance pricing
5177
+ #
5178
+ # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig]
5179
+ required :metered_allowance_config,
5180
+ -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig }
5181
+
2584
5182
  # @!attribute model_type
2585
5183
  # The pricing model type
2586
5184
  #
2587
- # @return [Symbol, :cumulative_grouped_allocation]
2588
- required :model_type, const: :cumulative_grouped_allocation
5185
+ # @return [Symbol, :metered_allowance]
5186
+ required :model_type, const: :metered_allowance
2589
5187
 
2590
5188
  # @!attribute name
2591
5189
  # The name of the price.
@@ -2624,11 +5222,7 @@ module Orb
2624
5222
  # The configuration for the rate of the price currency to the invoicing currency.
2625
5223
  #
2626
5224
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
2627
- optional :conversion_rate_config,
2628
- union: -> {
2629
- Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::ConversionRateConfig
2630
- },
2631
- nil?: true
5225
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
2632
5226
 
2633
5227
  # @!attribute currency
2634
5228
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -2694,17 +5288,17 @@ module Orb
2694
5288
  # @return [String, nil]
2695
5289
  optional :reference_id, String, nil?: true
2696
5290
 
2697
- # @!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)
5291
+ # @!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)
2698
5292
  # Some parameter documentations has been truncated, see
2699
- # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation}
5293
+ # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance}
2700
5294
  # for more details.
2701
5295
  #
2702
- # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on.
2703
- #
2704
- # @param cumulative_grouped_allocation_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing
5296
+ # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::Cadence] The cadence to bill for this price on.
2705
5297
  #
2706
5298
  # @param item_id [String] The id of the item the price will be associated with.
2707
5299
  #
5300
+ # @param metered_allowance_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing
5301
+ #
2708
5302
  # @param name [String] The name of the price.
2709
5303
  #
2710
5304
  # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
@@ -2735,11 +5329,11 @@ module Orb
2735
5329
  #
2736
5330
  # @param reference_id [String, nil] A transient ID that can be used to reference this price when adding adjustments
2737
5331
  #
2738
- # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type
5332
+ # @param model_type [Symbol, :metered_allowance] The pricing model type
2739
5333
 
2740
5334
  # The cadence to bill for this price on.
2741
5335
  #
2742
- # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation#cadence
5336
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance#cadence
2743
5337
  module Cadence
2744
5338
  extend Orb::Internal::Type::Enum
2745
5339
 
@@ -2754,42 +5348,67 @@ module Orb
2754
5348
  # @return [Array<Symbol>]
2755
5349
  end
2756
5350
 
2757
- # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation#cumulative_grouped_allocation_config
2758
- class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel
2759
- # @!attribute cumulative_allocation
2760
- # The overall allocation across all groups
5351
+ # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance#metered_allowance_config
5352
+ class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel
5353
+ # @!attribute allowance_grouping_value
5354
+ # The grouping_key value whose summed quantity represents the allowance for this
5355
+ # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
5356
+ # — credit can never exceed actual usage.
2761
5357
  #
2762
5358
  # @return [String]
2763
- required :cumulative_allocation, String
5359
+ required :allowance_grouping_value, String
2764
5360
 
2765
- # @!attribute group_allocation
2766
- # The allocation per individual group
5361
+ # @!attribute consumption_grouping_value
5362
+ # The grouping_key value whose summed quantity represents consumption (e.g.
5363
+ # 'download'). Charged at unit_amount.
2767
5364
  #
2768
5365
  # @return [String]
2769
- required :group_allocation, String
5366
+ required :consumption_grouping_value, String
2770
5367
 
2771
5368
  # @!attribute grouping_key
2772
- # The event property used to group usage before applying allocations
5369
+ # Event property used to partition the metric into consumption and allowance
5370
+ # quantities (e.g. 'event_name'). The metric is queried with this key and the two
5371
+ # values below select which partition is which.
2773
5372
  #
2774
5373
  # @return [String]
2775
5374
  required :grouping_key, String
2776
5375
 
2777
5376
  # @!attribute unit_amount
2778
- # The amount to charge for each unit outside of the allocation
5377
+ # Per-unit price applied to gross consumption and to the allowance credit.
2779
5378
  #
2780
5379
  # @return [String]
2781
5380
  required :unit_amount, String
2782
5381
 
2783
- # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:)
2784
- # Configuration for cumulative_grouped_allocation pricing
5382
+ # @!attribute allowance_display_name
5383
+ # Sub-line label for the credit row (e.g. 'Up to 3x free egress').
2785
5384
  #
2786
- # @param cumulative_allocation [String] The overall allocation across all groups
5385
+ # @return [String, nil]
5386
+ optional :allowance_display_name, String
5387
+
5388
+ # @!attribute consumption_display_name
5389
+ # Sub-line label for the gross consumption row (e.g. 'bytes gotten').
2787
5390
  #
2788
- # @param group_allocation [String] The allocation per individual group
5391
+ # @return [String, nil]
5392
+ optional :consumption_display_name, String
5393
+
5394
+ # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil)
5395
+ # Some parameter documentations has been truncated, see
5396
+ # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance::MeteredAllowanceConfig}
5397
+ # for more details.
2789
5398
  #
2790
- # @param grouping_key [String] The event property used to group usage before applying allocations
5399
+ # Configuration for metered_allowance pricing
2791
5400
  #
2792
- # @param unit_amount [String] The amount to charge for each unit outside of the allocation
5401
+ # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p
5402
+ #
5403
+ # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl
5404
+ #
5405
+ # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant
5406
+ #
5407
+ # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit.
5408
+ #
5409
+ # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress').
5410
+ #
5411
+ # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten').
2793
5412
  end
2794
5413
  end
2795
5414
 
@@ -2856,11 +5475,7 @@ module Orb
2856
5475
  # The configuration for the rate of the price currency to the invoicing currency.
2857
5476
  #
2858
5477
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
2859
- optional :conversion_rate_config,
2860
- union: -> {
2861
- Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent::ConversionRateConfig
2862
- },
2863
- nil?: true
5478
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
2864
5479
 
2865
5480
  # @!attribute currency
2866
5481
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -2989,15 +5604,45 @@ module Orb
2989
5604
  # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent#percent_config
2990
5605
  class PercentConfig < Orb::Internal::Type::BaseModel
2991
5606
  # @!attribute percent
2992
- # What percent of the component subtotals to charge
5607
+ # Fraction of the component subtotals to charge (0 < percent <= 1).
2993
5608
  #
2994
5609
  # @return [Float]
2995
5610
  required :percent, Float
2996
5611
 
2997
- # @!method initialize(percent:)
5612
+ # @!attribute maximum_amount
5613
+ # Maximum amount to charge. If unset, the fee has no upper bound.
5614
+ #
5615
+ # @return [String, nil]
5616
+ optional :maximum_amount, String, nil?: true
5617
+
5618
+ # @!attribute minimum_amount
5619
+ # Minimum amount to charge. If unset, the fee is bounded below by 0.
5620
+ #
5621
+ # @return [String, nil]
5622
+ optional :minimum_amount, String, nil?: true
5623
+
5624
+ # @!attribute prorated
5625
+ # If true, the minimum_amount is prorated based on the service period. The
5626
+ # maximum_amount is an absolute cap (never prorated), and the percent applied to
5627
+ # upstream subtotals is never prorated either.
5628
+ #
5629
+ # @return [Boolean, nil]
5630
+ optional :prorated, Orb::Internal::Type::Boolean
5631
+
5632
+ # @!method initialize(percent:, maximum_amount: nil, minimum_amount: nil, prorated: nil)
5633
+ # Some parameter documentations has been truncated, see
5634
+ # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent::PercentConfig}
5635
+ # for more details.
5636
+ #
2998
5637
  # Configuration for percent pricing
2999
5638
  #
3000
- # @param percent [Float] What percent of the component subtotals to charge
5639
+ # @param percent [Float] Fraction of the component subtotals to charge (0 < percent <= 1).
5640
+ #
5641
+ # @param maximum_amount [String, nil] Maximum amount to charge. If unset, the fee has no upper bound.
5642
+ #
5643
+ # @param minimum_amount [String, nil] Minimum amount to charge. If unset, the fee is bounded below by 0.
5644
+ #
5645
+ # @param prorated [Boolean] If true, the minimum_amount is prorated based on the service period. The maximum
3001
5646
  end
3002
5647
  end
3003
5648
 
@@ -3065,11 +5710,7 @@ module Orb
3065
5710
  # The configuration for the rate of the price currency to the invoicing currency.
3066
5711
  #
3067
5712
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
3068
- optional :conversion_rate_config,
3069
- union: -> {
3070
- Orb::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput::ConversionRateConfig
3071
- },
3072
- nil?: true
5713
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
3073
5714
 
3074
5715
  # @!attribute currency
3075
5716
  # An ISO 4217 currency string, or custom pricing unit identifier, in which this
@@ -3234,7 +5875,7 @@ module Orb
3234
5875
  end
3235
5876
 
3236
5877
  # @!method self.variants
3237
- # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput)]
5878
+ # @return [Array(Orb::Models::NewPlanUnitPrice, Orb::Models::NewPlanTieredPrice, Orb::Models::NewPlanBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::BulkWithFilters, Orb::Models::NewPlanPackagePrice, Orb::Models::NewPlanMatrixPrice, Orb::Models::NewPlanThresholdTotalAmountPrice, Orb::Models::NewPlanTieredPackagePrice, Orb::Models::NewPlanTieredWithMinimumPrice, Orb::Models::NewPlanGroupedTieredPrice, Orb::Models::NewPlanTieredPackageWithMinimumPrice, Orb::Models::NewPlanPackageWithAllocationPrice, Orb::Models::NewPlanUnitWithPercentPrice, Orb::Models::NewPlanMatrixWithAllocationPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MatrixWithThresholdDiscounts, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::TieredWithProration, Orb::Models::NewPlanUnitWithProrationPrice, Orb::Models::NewPlanGroupedAllocationPrice, Orb::Models::NewPlanBulkWithProrationPrice, Orb::Models::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::GroupedWithMinMaxThresholds, Orb::Models::NewPlanMatrixWithDisplayNamePrice, Orb::Models::NewPlanGroupedTieredPackagePrice, Orb::Models::NewPlanMaxGroupTieredPackagePrice, Orb::Models::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::NewPlanCumulativeGroupedBulkPrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::CumulativeGroupedAllocation, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::DailyCreditAllowance, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::MeteredAllowance, Orb::Models::NewPlanMinimumCompositePrice, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::Percent, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::Price::EventOutput)]
3238
5879
  end
3239
5880
  end
3240
5881
  end