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
@@ -31,6 +31,10 @@ module Orb
31
31
  sig { returns(T.nilable(String)) }
32
32
  attr_accessor :default_invoice_memo
33
33
 
34
+ # An optional user-defined description of the plan.
35
+ sig { returns(T.nilable(String)) }
36
+ attr_accessor :description
37
+
34
38
  sig { returns(T.nilable(String)) }
35
39
  attr_accessor :external_plan_id
36
40
 
@@ -67,6 +71,7 @@ module Orb
67
71
  adjustments:
68
72
  T.nilable(T::Array[Orb::PlanCreateParams::Adjustment::OrHash]),
69
73
  default_invoice_memo: T.nilable(String),
74
+ description: T.nilable(String),
70
75
  external_plan_id: T.nilable(String),
71
76
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
72
77
  net_terms: T.nilable(Integer),
@@ -89,6 +94,8 @@ module Orb
89
94
  adjustments: nil,
90
95
  # Free-form text which is available on the invoice PDF and the Orb invoice portal.
91
96
  default_invoice_memo: nil,
97
+ # An optional user-defined description of the plan.
98
+ description: nil,
92
99
  external_plan_id: nil,
93
100
  # User-specified key/value pairs for the resource. Individual keys can be removed
94
101
  # by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -116,6 +123,7 @@ module Orb
116
123
  prices: T::Array[Orb::PlanCreateParams::Price],
117
124
  adjustments: T.nilable(T::Array[Orb::PlanCreateParams::Adjustment]),
118
125
  default_invoice_memo: T.nilable(String),
126
+ description: T.nilable(String),
119
127
  external_plan_id: T.nilable(String),
120
128
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
121
129
  net_terms: T.nilable(Integer),
@@ -145,6 +153,24 @@ module Orb
145
153
  end
146
154
  attr_writer :allocation_price
147
155
 
156
+ # The license allocation price to add to the plan.
157
+ sig do
158
+ returns(
159
+ T.nilable(Orb::PlanCreateParams::Price::LicenseAllocationPrice)
160
+ )
161
+ end
162
+ attr_reader :license_allocation_price
163
+
164
+ sig do
165
+ params(
166
+ license_allocation_price:
167
+ T.nilable(
168
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::OrHash
169
+ )
170
+ ).void
171
+ end
172
+ attr_writer :license_allocation_price
173
+
148
174
  # The phase to add this price to.
149
175
  sig { returns(T.nilable(Integer)) }
150
176
  attr_accessor :plan_phase_order
@@ -168,6 +194,7 @@ module Orb
168
194
  Orb::NewPlanPackageWithAllocationPrice,
169
195
  Orb::NewPlanUnitWithPercentPrice,
170
196
  Orb::NewPlanMatrixWithAllocationPrice,
197
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts,
171
198
  Orb::PlanCreateParams::Price::Price::TieredWithProration,
172
199
  Orb::NewPlanUnitWithProrationPrice,
173
200
  Orb::NewPlanGroupedAllocationPrice,
@@ -182,6 +209,8 @@ module Orb
182
209
  Orb::NewPlanScalableMatrixWithTieredPricingPrice,
183
210
  Orb::NewPlanCumulativeGroupedBulkPrice,
184
211
  Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation,
212
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance,
213
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance,
185
214
  Orb::NewPlanMinimumCompositePrice,
186
215
  Orb::PlanCreateParams::Price::Price::Percent,
187
216
  Orb::PlanCreateParams::Price::Price::EventOutput
@@ -194,6 +223,10 @@ module Orb
194
223
  sig do
195
224
  params(
196
225
  allocation_price: T.nilable(Orb::NewAllocationPrice::OrHash),
226
+ license_allocation_price:
227
+ T.nilable(
228
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::OrHash
229
+ ),
197
230
  plan_phase_order: T.nilable(Integer),
198
231
  price:
199
232
  T.nilable(
@@ -212,6 +245,7 @@ module Orb
212
245
  Orb::NewPlanPackageWithAllocationPrice::OrHash,
213
246
  Orb::NewPlanUnitWithPercentPrice::OrHash,
214
247
  Orb::NewPlanMatrixWithAllocationPrice::OrHash,
248
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::OrHash,
215
249
  Orb::PlanCreateParams::Price::Price::TieredWithProration::OrHash,
216
250
  Orb::NewPlanUnitWithProrationPrice::OrHash,
217
251
  Orb::NewPlanGroupedAllocationPrice::OrHash,
@@ -226,6 +260,8 @@ module Orb
226
260
  Orb::NewPlanScalableMatrixWithTieredPricingPrice::OrHash,
227
261
  Orb::NewPlanCumulativeGroupedBulkPrice::OrHash,
228
262
  Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::OrHash,
263
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::OrHash,
264
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance::OrHash,
229
265
  Orb::NewPlanMinimumCompositePrice::OrHash,
230
266
  Orb::PlanCreateParams::Price::Price::Percent::OrHash,
231
267
  Orb::PlanCreateParams::Price::Price::EventOutput::OrHash
@@ -236,6 +272,8 @@ module Orb
236
272
  def self.new(
237
273
  # The allocation price to add to the plan.
238
274
  allocation_price: nil,
275
+ # The license allocation price to add to the plan.
276
+ license_allocation_price: nil,
239
277
  # The phase to add this price to.
240
278
  plan_phase_order: nil,
241
279
  # New plan price request body params.
@@ -247,6 +285,8 @@ module Orb
247
285
  override.returns(
248
286
  {
249
287
  allocation_price: T.nilable(Orb::NewAllocationPrice),
288
+ license_allocation_price:
289
+ T.nilable(Orb::PlanCreateParams::Price::LicenseAllocationPrice),
250
290
  plan_phase_order: T.nilable(Integer),
251
291
  price:
252
292
  T.nilable(
@@ -265,6 +305,7 @@ module Orb
265
305
  Orb::NewPlanPackageWithAllocationPrice,
266
306
  Orb::NewPlanUnitWithPercentPrice,
267
307
  Orb::NewPlanMatrixWithAllocationPrice,
308
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts,
268
309
  Orb::PlanCreateParams::Price::Price::TieredWithProration,
269
310
  Orb::NewPlanUnitWithProrationPrice,
270
311
  Orb::NewPlanGroupedAllocationPrice,
@@ -279,6 +320,8 @@ module Orb
279
320
  Orb::NewPlanScalableMatrixWithTieredPricingPrice,
280
321
  Orb::NewPlanCumulativeGroupedBulkPrice,
281
322
  Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation,
323
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance,
324
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance,
282
325
  Orb::NewPlanMinimumCompositePrice,
283
326
  Orb::PlanCreateParams::Price::Price::Percent,
284
327
  Orb::PlanCreateParams::Price::Price::EventOutput
@@ -290,6 +333,430 @@ module Orb
290
333
  def to_hash
291
334
  end
292
335
 
336
+ class LicenseAllocationPrice < Orb::Internal::Type::BaseModel
337
+ OrHash =
338
+ T.type_alias do
339
+ T.any(
340
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice,
341
+ Orb::Internal::AnyHash
342
+ )
343
+ end
344
+
345
+ # The cadence to bill for this price on.
346
+ sig do
347
+ returns(
348
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::OrSymbol
349
+ )
350
+ end
351
+ attr_accessor :cadence
352
+
353
+ # The id of the item the price will be associated with.
354
+ sig { returns(String) }
355
+ attr_accessor :item_id
356
+
357
+ # License allocations to associate with this price. Each entry defines a
358
+ # per-license credit pool granted each cadence. Requires license_type_id or
359
+ # license_type_configuration to be set.
360
+ sig do
361
+ returns(
362
+ T::Array[
363
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation
364
+ ]
365
+ )
366
+ end
367
+ attr_accessor :license_allocations
368
+
369
+ # The pricing model type
370
+ sig do
371
+ returns(
372
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType::OrSymbol
373
+ )
374
+ end
375
+ attr_accessor :model_type
376
+
377
+ # The name of the price.
378
+ sig { returns(String) }
379
+ attr_accessor :name
380
+
381
+ # Configuration for unit pricing
382
+ sig { returns(Orb::UnitConfig) }
383
+ attr_reader :unit_config
384
+
385
+ sig { params(unit_config: Orb::UnitConfig::OrHash).void }
386
+ attr_writer :unit_config
387
+
388
+ # The id of the billable metric for the price. Only needed if the price is
389
+ # usage-based.
390
+ sig { returns(T.nilable(String)) }
391
+ attr_accessor :billable_metric_id
392
+
393
+ # If the Price represents a fixed cost, the price will be billed in-advance if
394
+ # this is true, and in-arrears if this is false.
395
+ sig { returns(T.nilable(T::Boolean)) }
396
+ attr_accessor :billed_in_advance
397
+
398
+ # For custom cadence: specifies the duration of the billing period in days or
399
+ # months.
400
+ sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
401
+ attr_reader :billing_cycle_configuration
402
+
403
+ sig do
404
+ params(
405
+ billing_cycle_configuration:
406
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
407
+ ).void
408
+ end
409
+ attr_writer :billing_cycle_configuration
410
+
411
+ # The per unit conversion rate of the price currency to the invoicing currency.
412
+ sig { returns(T.nilable(Float)) }
413
+ attr_accessor :conversion_rate
414
+
415
+ # The configuration for the rate of the price currency to the invoicing currency.
416
+ sig do
417
+ returns(
418
+ T.nilable(
419
+ T.any(
420
+ Orb::UnitConversionRateConfig,
421
+ Orb::TieredConversionRateConfig
422
+ )
423
+ )
424
+ )
425
+ end
426
+ attr_accessor :conversion_rate_config
427
+
428
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
429
+ # price is billed.
430
+ sig { returns(T.nilable(String)) }
431
+ attr_accessor :currency
432
+
433
+ # For dimensional price: specifies a price group and dimension values
434
+ sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
435
+ attr_reader :dimensional_price_configuration
436
+
437
+ sig do
438
+ params(
439
+ dimensional_price_configuration:
440
+ T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
441
+ ).void
442
+ end
443
+ attr_writer :dimensional_price_configuration
444
+
445
+ # An alias for the price.
446
+ sig { returns(T.nilable(String)) }
447
+ attr_accessor :external_price_id
448
+
449
+ # If the Price represents a fixed cost, this represents the quantity of units
450
+ # applied.
451
+ sig { returns(T.nilable(Float)) }
452
+ attr_accessor :fixed_price_quantity
453
+
454
+ # The property used to group this price on an invoice
455
+ sig { returns(T.nilable(String)) }
456
+ attr_accessor :invoice_grouping_key
457
+
458
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
459
+ # If unspecified, a single invoice is produced per billing cycle.
460
+ sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
461
+ attr_reader :invoicing_cycle_configuration
462
+
463
+ sig do
464
+ params(
465
+ invoicing_cycle_configuration:
466
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
467
+ ).void
468
+ end
469
+ attr_writer :invoicing_cycle_configuration
470
+
471
+ # The ID of the license type to associate with this price.
472
+ sig { returns(T.nilable(String)) }
473
+ attr_accessor :license_type_id
474
+
475
+ # User-specified key/value pairs for the resource. Individual keys can be removed
476
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
477
+ # by setting `metadata` to `null`.
478
+ sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
479
+ attr_accessor :metadata
480
+
481
+ # A transient ID that can be used to reference this price when adding adjustments
482
+ # in the same API call.
483
+ sig { returns(T.nilable(String)) }
484
+ attr_accessor :reference_id
485
+
486
+ # The license allocation price to add to the plan.
487
+ sig do
488
+ params(
489
+ cadence:
490
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::OrSymbol,
491
+ item_id: String,
492
+ license_allocations:
493
+ T::Array[
494
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation::OrHash
495
+ ],
496
+ model_type:
497
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType::OrSymbol,
498
+ name: String,
499
+ unit_config: Orb::UnitConfig::OrHash,
500
+ billable_metric_id: T.nilable(String),
501
+ billed_in_advance: T.nilable(T::Boolean),
502
+ billing_cycle_configuration:
503
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
504
+ conversion_rate: T.nilable(Float),
505
+ conversion_rate_config:
506
+ T.nilable(
507
+ T.any(
508
+ Orb::UnitConversionRateConfig::OrHash,
509
+ Orb::TieredConversionRateConfig::OrHash
510
+ )
511
+ ),
512
+ currency: T.nilable(String),
513
+ dimensional_price_configuration:
514
+ T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
515
+ external_price_id: T.nilable(String),
516
+ fixed_price_quantity: T.nilable(Float),
517
+ invoice_grouping_key: T.nilable(String),
518
+ invoicing_cycle_configuration:
519
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
520
+ license_type_id: T.nilable(String),
521
+ metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
522
+ reference_id: T.nilable(String)
523
+ ).returns(T.attached_class)
524
+ end
525
+ def self.new(
526
+ # The cadence to bill for this price on.
527
+ cadence:,
528
+ # The id of the item the price will be associated with.
529
+ item_id:,
530
+ # License allocations to associate with this price. Each entry defines a
531
+ # per-license credit pool granted each cadence. Requires license_type_id or
532
+ # license_type_configuration to be set.
533
+ license_allocations:,
534
+ # The pricing model type
535
+ model_type:,
536
+ # The name of the price.
537
+ name:,
538
+ # Configuration for unit pricing
539
+ unit_config:,
540
+ # The id of the billable metric for the price. Only needed if the price is
541
+ # usage-based.
542
+ billable_metric_id: nil,
543
+ # If the Price represents a fixed cost, the price will be billed in-advance if
544
+ # this is true, and in-arrears if this is false.
545
+ billed_in_advance: nil,
546
+ # For custom cadence: specifies the duration of the billing period in days or
547
+ # months.
548
+ billing_cycle_configuration: nil,
549
+ # The per unit conversion rate of the price currency to the invoicing currency.
550
+ conversion_rate: nil,
551
+ # The configuration for the rate of the price currency to the invoicing currency.
552
+ conversion_rate_config: nil,
553
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
554
+ # price is billed.
555
+ currency: nil,
556
+ # For dimensional price: specifies a price group and dimension values
557
+ dimensional_price_configuration: nil,
558
+ # An alias for the price.
559
+ external_price_id: nil,
560
+ # If the Price represents a fixed cost, this represents the quantity of units
561
+ # applied.
562
+ fixed_price_quantity: nil,
563
+ # The property used to group this price on an invoice
564
+ invoice_grouping_key: nil,
565
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
566
+ # If unspecified, a single invoice is produced per billing cycle.
567
+ invoicing_cycle_configuration: nil,
568
+ # The ID of the license type to associate with this price.
569
+ license_type_id: nil,
570
+ # User-specified key/value pairs for the resource. Individual keys can be removed
571
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
572
+ # by setting `metadata` to `null`.
573
+ metadata: nil,
574
+ # A transient ID that can be used to reference this price when adding adjustments
575
+ # in the same API call.
576
+ reference_id: nil
577
+ )
578
+ end
579
+
580
+ sig do
581
+ override.returns(
582
+ {
583
+ cadence:
584
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::OrSymbol,
585
+ item_id: String,
586
+ license_allocations:
587
+ T::Array[
588
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation
589
+ ],
590
+ model_type:
591
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType::OrSymbol,
592
+ name: String,
593
+ unit_config: Orb::UnitConfig,
594
+ billable_metric_id: T.nilable(String),
595
+ billed_in_advance: T.nilable(T::Boolean),
596
+ billing_cycle_configuration:
597
+ T.nilable(Orb::NewBillingCycleConfiguration),
598
+ conversion_rate: T.nilable(Float),
599
+ conversion_rate_config:
600
+ T.nilable(
601
+ T.any(
602
+ Orb::UnitConversionRateConfig,
603
+ Orb::TieredConversionRateConfig
604
+ )
605
+ ),
606
+ currency: T.nilable(String),
607
+ dimensional_price_configuration:
608
+ T.nilable(Orb::NewDimensionalPriceConfiguration),
609
+ external_price_id: T.nilable(String),
610
+ fixed_price_quantity: T.nilable(Float),
611
+ invoice_grouping_key: T.nilable(String),
612
+ invoicing_cycle_configuration:
613
+ T.nilable(Orb::NewBillingCycleConfiguration),
614
+ license_type_id: T.nilable(String),
615
+ metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
616
+ reference_id: T.nilable(String)
617
+ }
618
+ )
619
+ end
620
+ def to_hash
621
+ end
622
+
623
+ # The cadence to bill for this price on.
624
+ module Cadence
625
+ extend Orb::Internal::Type::Enum
626
+
627
+ TaggedSymbol =
628
+ T.type_alias do
629
+ T.all(
630
+ Symbol,
631
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence
632
+ )
633
+ end
634
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
635
+
636
+ ANNUAL =
637
+ T.let(
638
+ :annual,
639
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol
640
+ )
641
+ SEMI_ANNUAL =
642
+ T.let(
643
+ :semi_annual,
644
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol
645
+ )
646
+ MONTHLY =
647
+ T.let(
648
+ :monthly,
649
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol
650
+ )
651
+ QUARTERLY =
652
+ T.let(
653
+ :quarterly,
654
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol
655
+ )
656
+ ONE_TIME =
657
+ T.let(
658
+ :one_time,
659
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol
660
+ )
661
+ CUSTOM =
662
+ T.let(
663
+ :custom,
664
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol
665
+ )
666
+
667
+ sig do
668
+ override.returns(
669
+ T::Array[
670
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::Cadence::TaggedSymbol
671
+ ]
672
+ )
673
+ end
674
+ def self.values
675
+ end
676
+ end
677
+
678
+ class LicenseAllocation < Orb::Internal::Type::BaseModel
679
+ OrHash =
680
+ T.type_alias do
681
+ T.any(
682
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::LicenseAllocation,
683
+ Orb::Internal::AnyHash
684
+ )
685
+ end
686
+
687
+ # The amount of credits granted per active license per cadence.
688
+ sig { returns(String) }
689
+ attr_accessor :amount
690
+
691
+ # The currency of the license allocation.
692
+ sig { returns(String) }
693
+ attr_accessor :currency
694
+
695
+ # When True, overage beyond the allocation is written off.
696
+ sig { returns(T.nilable(T::Boolean)) }
697
+ attr_accessor :write_off_overage
698
+
699
+ sig do
700
+ params(
701
+ amount: String,
702
+ currency: String,
703
+ write_off_overage: T.nilable(T::Boolean)
704
+ ).returns(T.attached_class)
705
+ end
706
+ def self.new(
707
+ # The amount of credits granted per active license per cadence.
708
+ amount:,
709
+ # The currency of the license allocation.
710
+ currency:,
711
+ # When True, overage beyond the allocation is written off.
712
+ write_off_overage: nil
713
+ )
714
+ end
715
+
716
+ sig do
717
+ override.returns(
718
+ {
719
+ amount: String,
720
+ currency: String,
721
+ write_off_overage: T.nilable(T::Boolean)
722
+ }
723
+ )
724
+ end
725
+ def to_hash
726
+ end
727
+ end
728
+
729
+ # The pricing model type
730
+ module ModelType
731
+ extend Orb::Internal::Type::Enum
732
+
733
+ TaggedSymbol =
734
+ T.type_alias do
735
+ T.all(
736
+ Symbol,
737
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType
738
+ )
739
+ end
740
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
741
+
742
+ UNIT =
743
+ T.let(
744
+ :unit,
745
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType::TaggedSymbol
746
+ )
747
+
748
+ sig do
749
+ override.returns(
750
+ T::Array[
751
+ Orb::PlanCreateParams::Price::LicenseAllocationPrice::ModelType::TaggedSymbol
752
+ ]
753
+ )
754
+ end
755
+ def self.values
756
+ end
757
+ end
758
+ end
759
+
293
760
  # New plan price request body params.
294
761
  module Price
295
762
  extend Orb::Internal::Type::Union
@@ -311,6 +778,7 @@ module Orb
311
778
  Orb::NewPlanPackageWithAllocationPrice,
312
779
  Orb::NewPlanUnitWithPercentPrice,
313
780
  Orb::NewPlanMatrixWithAllocationPrice,
781
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts,
314
782
  Orb::PlanCreateParams::Price::Price::TieredWithProration,
315
783
  Orb::NewPlanUnitWithProrationPrice,
316
784
  Orb::NewPlanGroupedAllocationPrice,
@@ -325,6 +793,8 @@ module Orb
325
793
  Orb::NewPlanScalableMatrixWithTieredPricingPrice,
326
794
  Orb::NewPlanCumulativeGroupedBulkPrice,
327
795
  Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation,
796
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance,
797
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance,
328
798
  Orb::NewPlanMinimumCompositePrice,
329
799
  Orb::PlanCreateParams::Price::Price::Percent,
330
800
  Orb::PlanCreateParams::Price::Price::EventOutput
@@ -803,11 +1273,11 @@ module Orb
803
1273
  end
804
1274
  end
805
1275
 
806
- class TieredWithProration < Orb::Internal::Type::BaseModel
1276
+ class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel
807
1277
  OrHash =
808
1278
  T.type_alias do
809
1279
  T.any(
810
- Orb::PlanCreateParams::Price::Price::TieredWithProration,
1280
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts,
811
1281
  Orb::Internal::AnyHash
812
1282
  )
813
1283
  end
@@ -815,7 +1285,7 @@ module Orb
815
1285
  # The cadence to bill for this price on.
816
1286
  sig do
817
1287
  returns(
818
- Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::OrSymbol
1288
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol
819
1289
  )
820
1290
  end
821
1291
  attr_accessor :cadence
@@ -824,29 +1294,29 @@ module Orb
824
1294
  sig { returns(String) }
825
1295
  attr_accessor :item_id
826
1296
 
827
- # The pricing model type
828
- sig { returns(Symbol) }
829
- attr_accessor :model_type
830
-
831
- # The name of the price.
832
- sig { returns(String) }
833
- attr_accessor :name
834
-
835
- # Configuration for tiered_with_proration pricing
1297
+ # Configuration for matrix_with_threshold_discounts pricing
836
1298
  sig do
837
1299
  returns(
838
- Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig
1300
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig
839
1301
  )
840
1302
  end
841
- attr_reader :tiered_with_proration_config
1303
+ attr_reader :matrix_with_threshold_discounts_config
842
1304
 
843
1305
  sig do
844
1306
  params(
845
- tiered_with_proration_config:
846
- Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::OrHash
1307
+ matrix_with_threshold_discounts_config:
1308
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash
847
1309
  ).void
848
1310
  end
849
- attr_writer :tiered_with_proration_config
1311
+ attr_writer :matrix_with_threshold_discounts_config
1312
+
1313
+ # The pricing model type
1314
+ sig { returns(Symbol) }
1315
+ attr_accessor :model_type
1316
+
1317
+ # The name of the price.
1318
+ sig { returns(String) }
1319
+ attr_accessor :name
850
1320
 
851
1321
  # The id of the billable metric for the price. Only needed if the price is
852
1322
  # usage-based.
@@ -949,11 +1419,11 @@ module Orb
949
1419
  sig do
950
1420
  params(
951
1421
  cadence:
952
- Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::OrSymbol,
1422
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol,
953
1423
  item_id: String,
1424
+ matrix_with_threshold_discounts_config:
1425
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::OrHash,
954
1426
  name: String,
955
- tiered_with_proration_config:
956
- Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::OrHash,
957
1427
  billable_metric_id: T.nilable(String),
958
1428
  billed_in_advance: T.nilable(T::Boolean),
959
1429
  billing_cycle_configuration:
@@ -985,10 +1455,10 @@ module Orb
985
1455
  cadence:,
986
1456
  # The id of the item the price will be associated with.
987
1457
  item_id:,
1458
+ # Configuration for matrix_with_threshold_discounts pricing
1459
+ matrix_with_threshold_discounts_config:,
988
1460
  # The name of the price.
989
1461
  name:,
990
- # Configuration for tiered_with_proration pricing
991
- tiered_with_proration_config:,
992
1462
  # The id of the billable metric for the price. Only needed if the price is
993
1463
  # usage-based.
994
1464
  billable_metric_id: nil,
@@ -1027,7 +1497,7 @@ module Orb
1027
1497
  # in the same API call.
1028
1498
  reference_id: nil,
1029
1499
  # The pricing model type
1030
- model_type: :tiered_with_proration
1500
+ model_type: :matrix_with_threshold_discounts
1031
1501
  )
1032
1502
  end
1033
1503
 
@@ -1035,12 +1505,12 @@ module Orb
1035
1505
  override.returns(
1036
1506
  {
1037
1507
  cadence:
1038
- Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::OrSymbol,
1508
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::OrSymbol,
1039
1509
  item_id: String,
1510
+ matrix_with_threshold_discounts_config:
1511
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig,
1040
1512
  model_type: Symbol,
1041
1513
  name: String,
1042
- tiered_with_proration_config:
1043
- Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig,
1044
1514
  billable_metric_id: T.nilable(String),
1045
1515
  billed_in_advance: T.nilable(T::Boolean),
1046
1516
  billing_cycle_configuration:
@@ -1078,7 +1548,7 @@ module Orb
1078
1548
  T.type_alias do
1079
1549
  T.all(
1080
1550
  Symbol,
1081
- Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence
1551
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence
1082
1552
  )
1083
1553
  end
1084
1554
  OrSymbol = T.type_alias { T.any(Symbol, String) }
@@ -1086,38 +1556,38 @@ module Orb
1086
1556
  ANNUAL =
1087
1557
  T.let(
1088
1558
  :annual,
1089
- Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol
1559
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
1090
1560
  )
1091
1561
  SEMI_ANNUAL =
1092
1562
  T.let(
1093
1563
  :semi_annual,
1094
- Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol
1564
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
1095
1565
  )
1096
1566
  MONTHLY =
1097
1567
  T.let(
1098
1568
  :monthly,
1099
- Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol
1569
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
1100
1570
  )
1101
1571
  QUARTERLY =
1102
1572
  T.let(
1103
1573
  :quarterly,
1104
- Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol
1574
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
1105
1575
  )
1106
1576
  ONE_TIME =
1107
1577
  T.let(
1108
1578
  :one_time,
1109
- Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol
1579
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
1110
1580
  )
1111
1581
  CUSTOM =
1112
1582
  T.let(
1113
1583
  :custom,
1114
- Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol
1584
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
1115
1585
  )
1116
1586
 
1117
1587
  sig do
1118
1588
  override.returns(
1119
1589
  T::Array[
1120
- Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol
1590
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::Cadence::TaggedSymbol
1121
1591
  ]
1122
1592
  )
1123
1593
  end
@@ -1125,102 +1595,1407 @@ module Orb
1125
1595
  end
1126
1596
  end
1127
1597
 
1128
- class TieredWithProrationConfig < Orb::Internal::Type::BaseModel
1598
+ class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel
1129
1599
  OrHash =
1130
1600
  T.type_alias do
1131
1601
  T.any(
1132
- Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig,
1602
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig,
1133
1603
  Orb::Internal::AnyHash
1134
1604
  )
1135
1605
  end
1136
1606
 
1137
- # Tiers for rating based on total usage quantities into the specified tier with
1138
- # proration
1607
+ # Unit price used for usage that does not match any defined matrix cell.
1608
+ sig { returns(String) }
1609
+ attr_accessor :default_unit_amount
1610
+
1611
+ # First matrix dimension key.
1612
+ sig { returns(String) }
1613
+ attr_accessor :first_dimension
1614
+
1615
+ # Per-cell unit prices.
1139
1616
  sig do
1140
1617
  returns(
1141
1618
  T::Array[
1142
- Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier
1619
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue
1143
1620
  ]
1144
1621
  )
1145
1622
  end
1146
- attr_accessor :tiers
1623
+ attr_accessor :matrix_values
1624
+
1625
+ # Optional second matrix dimension key.
1626
+ sig { returns(T.nilable(String)) }
1627
+ attr_accessor :second_dimension
1147
1628
 
1148
- # Configuration for tiered_with_proration pricing
1149
1629
  sig do
1150
- params(
1151
- tiers:
1152
- T::Array[
1153
- Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash
1630
+ returns(
1631
+ T.nilable(
1632
+ T::Array[
1633
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup
1634
+ ]
1635
+ )
1636
+ )
1637
+ end
1638
+ attr_reader :threshold_discount_groups
1639
+
1640
+ sig do
1641
+ params(
1642
+ threshold_discount_groups:
1643
+ T::Array[
1644
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash
1645
+ ]
1646
+ ).void
1647
+ end
1648
+ attr_writer :threshold_discount_groups
1649
+
1650
+ # Configuration for matrix_with_threshold_discounts pricing
1651
+ sig do
1652
+ params(
1653
+ default_unit_amount: String,
1654
+ first_dimension: String,
1655
+ matrix_values:
1656
+ T::Array[
1657
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue::OrHash
1658
+ ],
1659
+ second_dimension: T.nilable(String),
1660
+ threshold_discount_groups:
1661
+ T::Array[
1662
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup::OrHash
1154
1663
  ]
1155
1664
  ).returns(T.attached_class)
1156
1665
  end
1157
1666
  def self.new(
1158
- # Tiers for rating based on total usage quantities into the specified tier with
1159
- # proration
1160
- tiers:
1667
+ # Unit price used for usage that does not match any defined matrix cell.
1668
+ default_unit_amount:,
1669
+ # First matrix dimension key.
1670
+ first_dimension:,
1671
+ # Per-cell unit prices.
1672
+ matrix_values:,
1673
+ # Optional second matrix dimension key.
1674
+ second_dimension: nil,
1675
+ threshold_discount_groups: nil
1676
+ )
1677
+ end
1678
+
1679
+ sig do
1680
+ override.returns(
1681
+ {
1682
+ default_unit_amount: String,
1683
+ first_dimension: String,
1684
+ matrix_values:
1685
+ T::Array[
1686
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue
1687
+ ],
1688
+ second_dimension: T.nilable(String),
1689
+ threshold_discount_groups:
1690
+ T::Array[
1691
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup
1692
+ ]
1693
+ }
1694
+ )
1695
+ end
1696
+ def to_hash
1697
+ end
1698
+
1699
+ class MatrixValue < Orb::Internal::Type::BaseModel
1700
+ OrHash =
1701
+ T.type_alias do
1702
+ T.any(
1703
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue,
1704
+ Orb::Internal::AnyHash
1705
+ )
1706
+ end
1707
+
1708
+ sig { returns(String) }
1709
+ attr_accessor :first_dimension_value
1710
+
1711
+ sig { returns(String) }
1712
+ attr_accessor :unit_amount
1713
+
1714
+ sig { returns(T.nilable(String)) }
1715
+ attr_accessor :second_dimension_value
1716
+
1717
+ sig do
1718
+ params(
1719
+ first_dimension_value: String,
1720
+ unit_amount: String,
1721
+ second_dimension_value: T.nilable(String)
1722
+ ).returns(T.attached_class)
1723
+ end
1724
+ def self.new(
1725
+ first_dimension_value:,
1726
+ unit_amount:,
1727
+ second_dimension_value: nil
1728
+ )
1729
+ end
1730
+
1731
+ sig do
1732
+ override.returns(
1733
+ {
1734
+ first_dimension_value: String,
1735
+ unit_amount: String,
1736
+ second_dimension_value: T.nilable(String)
1737
+ }
1738
+ )
1739
+ end
1740
+ def to_hash
1741
+ end
1742
+ end
1743
+
1744
+ class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel
1745
+ OrHash =
1746
+ T.type_alias do
1747
+ T.any(
1748
+ Orb::PlanCreateParams::Price::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup,
1749
+ Orb::Internal::AnyHash
1750
+ )
1751
+ end
1752
+
1753
+ # Discount rate applied to spend above the threshold.
1754
+ sig { returns(String) }
1755
+ attr_accessor :above_threshold_discount_percentage
1756
+
1757
+ # Discount rate applied to spend at or below the threshold. Set to 0 for no
1758
+ # baseline discount.
1759
+ sig { returns(String) }
1760
+ attr_accessor :below_threshold_discount_percentage
1761
+
1762
+ # Semicolon-separated list of matrix cell coordinates targeted by this group. Each
1763
+ # coordinate is `first,second` when the matrix has two dimensions, or just `first`
1764
+ # for a single-dimension matrix. Example: `blue,circle;green,triangle`.
1765
+ sig { returns(String) }
1766
+ attr_accessor :cell_coordinates
1767
+
1768
+ sig { returns(String) }
1769
+ attr_accessor :threshold_amount
1770
+
1771
+ sig { returns(T.nilable(String)) }
1772
+ attr_accessor :description
1773
+
1774
+ sig do
1775
+ params(
1776
+ above_threshold_discount_percentage: String,
1777
+ below_threshold_discount_percentage: String,
1778
+ cell_coordinates: String,
1779
+ threshold_amount: String,
1780
+ description: T.nilable(String)
1781
+ ).returns(T.attached_class)
1782
+ end
1783
+ def self.new(
1784
+ # Discount rate applied to spend above the threshold.
1785
+ above_threshold_discount_percentage:,
1786
+ # Discount rate applied to spend at or below the threshold. Set to 0 for no
1787
+ # baseline discount.
1788
+ below_threshold_discount_percentage:,
1789
+ # Semicolon-separated list of matrix cell coordinates targeted by this group. Each
1790
+ # coordinate is `first,second` when the matrix has two dimensions, or just `first`
1791
+ # for a single-dimension matrix. Example: `blue,circle;green,triangle`.
1792
+ cell_coordinates:,
1793
+ threshold_amount:,
1794
+ description: nil
1795
+ )
1796
+ end
1797
+
1798
+ sig do
1799
+ override.returns(
1800
+ {
1801
+ above_threshold_discount_percentage: String,
1802
+ below_threshold_discount_percentage: String,
1803
+ cell_coordinates: String,
1804
+ threshold_amount: String,
1805
+ description: T.nilable(String)
1806
+ }
1807
+ )
1808
+ end
1809
+ def to_hash
1810
+ end
1811
+ end
1812
+ end
1813
+ end
1814
+
1815
+ class TieredWithProration < Orb::Internal::Type::BaseModel
1816
+ OrHash =
1817
+ T.type_alias do
1818
+ T.any(
1819
+ Orb::PlanCreateParams::Price::Price::TieredWithProration,
1820
+ Orb::Internal::AnyHash
1821
+ )
1822
+ end
1823
+
1824
+ # The cadence to bill for this price on.
1825
+ sig do
1826
+ returns(
1827
+ Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::OrSymbol
1828
+ )
1829
+ end
1830
+ attr_accessor :cadence
1831
+
1832
+ # The id of the item the price will be associated with.
1833
+ sig { returns(String) }
1834
+ attr_accessor :item_id
1835
+
1836
+ # The pricing model type
1837
+ sig { returns(Symbol) }
1838
+ attr_accessor :model_type
1839
+
1840
+ # The name of the price.
1841
+ sig { returns(String) }
1842
+ attr_accessor :name
1843
+
1844
+ # Configuration for tiered_with_proration pricing
1845
+ sig do
1846
+ returns(
1847
+ Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig
1848
+ )
1849
+ end
1850
+ attr_reader :tiered_with_proration_config
1851
+
1852
+ sig do
1853
+ params(
1854
+ tiered_with_proration_config:
1855
+ Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::OrHash
1856
+ ).void
1857
+ end
1858
+ attr_writer :tiered_with_proration_config
1859
+
1860
+ # The id of the billable metric for the price. Only needed if the price is
1861
+ # usage-based.
1862
+ sig { returns(T.nilable(String)) }
1863
+ attr_accessor :billable_metric_id
1864
+
1865
+ # If the Price represents a fixed cost, the price will be billed in-advance if
1866
+ # this is true, and in-arrears if this is false.
1867
+ sig { returns(T.nilable(T::Boolean)) }
1868
+ attr_accessor :billed_in_advance
1869
+
1870
+ # For custom cadence: specifies the duration of the billing period in days or
1871
+ # months.
1872
+ sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
1873
+ attr_reader :billing_cycle_configuration
1874
+
1875
+ sig do
1876
+ params(
1877
+ billing_cycle_configuration:
1878
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
1879
+ ).void
1880
+ end
1881
+ attr_writer :billing_cycle_configuration
1882
+
1883
+ # The per unit conversion rate of the price currency to the invoicing currency.
1884
+ sig { returns(T.nilable(Float)) }
1885
+ attr_accessor :conversion_rate
1886
+
1887
+ # The configuration for the rate of the price currency to the invoicing currency.
1888
+ sig do
1889
+ returns(
1890
+ T.nilable(
1891
+ T.any(
1892
+ Orb::UnitConversionRateConfig,
1893
+ Orb::TieredConversionRateConfig
1894
+ )
1895
+ )
1896
+ )
1897
+ end
1898
+ attr_accessor :conversion_rate_config
1899
+
1900
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
1901
+ # price is billed.
1902
+ sig { returns(T.nilable(String)) }
1903
+ attr_accessor :currency
1904
+
1905
+ # For dimensional price: specifies a price group and dimension values
1906
+ sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
1907
+ attr_reader :dimensional_price_configuration
1908
+
1909
+ sig do
1910
+ params(
1911
+ dimensional_price_configuration:
1912
+ T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
1913
+ ).void
1914
+ end
1915
+ attr_writer :dimensional_price_configuration
1916
+
1917
+ # An alias for the price.
1918
+ sig { returns(T.nilable(String)) }
1919
+ attr_accessor :external_price_id
1920
+
1921
+ # If the Price represents a fixed cost, this represents the quantity of units
1922
+ # applied.
1923
+ sig { returns(T.nilable(Float)) }
1924
+ attr_accessor :fixed_price_quantity
1925
+
1926
+ # The property used to group this price on an invoice
1927
+ sig { returns(T.nilable(String)) }
1928
+ attr_accessor :invoice_grouping_key
1929
+
1930
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
1931
+ # If unspecified, a single invoice is produced per billing cycle.
1932
+ sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
1933
+ attr_reader :invoicing_cycle_configuration
1934
+
1935
+ sig do
1936
+ params(
1937
+ invoicing_cycle_configuration:
1938
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
1939
+ ).void
1940
+ end
1941
+ attr_writer :invoicing_cycle_configuration
1942
+
1943
+ # The ID of the license type to associate with this price.
1944
+ sig { returns(T.nilable(String)) }
1945
+ attr_accessor :license_type_id
1946
+
1947
+ # User-specified key/value pairs for the resource. Individual keys can be removed
1948
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
1949
+ # by setting `metadata` to `null`.
1950
+ sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
1951
+ attr_accessor :metadata
1952
+
1953
+ # A transient ID that can be used to reference this price when adding adjustments
1954
+ # in the same API call.
1955
+ sig { returns(T.nilable(String)) }
1956
+ attr_accessor :reference_id
1957
+
1958
+ sig do
1959
+ params(
1960
+ cadence:
1961
+ Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::OrSymbol,
1962
+ item_id: String,
1963
+ name: String,
1964
+ tiered_with_proration_config:
1965
+ Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::OrHash,
1966
+ billable_metric_id: T.nilable(String),
1967
+ billed_in_advance: T.nilable(T::Boolean),
1968
+ billing_cycle_configuration:
1969
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
1970
+ conversion_rate: T.nilable(Float),
1971
+ conversion_rate_config:
1972
+ T.nilable(
1973
+ T.any(
1974
+ Orb::UnitConversionRateConfig::OrHash,
1975
+ Orb::TieredConversionRateConfig::OrHash
1976
+ )
1977
+ ),
1978
+ currency: T.nilable(String),
1979
+ dimensional_price_configuration:
1980
+ T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
1981
+ external_price_id: T.nilable(String),
1982
+ fixed_price_quantity: T.nilable(Float),
1983
+ invoice_grouping_key: T.nilable(String),
1984
+ invoicing_cycle_configuration:
1985
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
1986
+ license_type_id: T.nilable(String),
1987
+ metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
1988
+ reference_id: T.nilable(String),
1989
+ model_type: Symbol
1990
+ ).returns(T.attached_class)
1991
+ end
1992
+ def self.new(
1993
+ # The cadence to bill for this price on.
1994
+ cadence:,
1995
+ # The id of the item the price will be associated with.
1996
+ item_id:,
1997
+ # The name of the price.
1998
+ name:,
1999
+ # Configuration for tiered_with_proration pricing
2000
+ tiered_with_proration_config:,
2001
+ # The id of the billable metric for the price. Only needed if the price is
2002
+ # usage-based.
2003
+ billable_metric_id: nil,
2004
+ # If the Price represents a fixed cost, the price will be billed in-advance if
2005
+ # this is true, and in-arrears if this is false.
2006
+ billed_in_advance: nil,
2007
+ # For custom cadence: specifies the duration of the billing period in days or
2008
+ # months.
2009
+ billing_cycle_configuration: nil,
2010
+ # The per unit conversion rate of the price currency to the invoicing currency.
2011
+ conversion_rate: nil,
2012
+ # The configuration for the rate of the price currency to the invoicing currency.
2013
+ conversion_rate_config: nil,
2014
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
2015
+ # price is billed.
2016
+ currency: nil,
2017
+ # For dimensional price: specifies a price group and dimension values
2018
+ dimensional_price_configuration: nil,
2019
+ # An alias for the price.
2020
+ external_price_id: nil,
2021
+ # If the Price represents a fixed cost, this represents the quantity of units
2022
+ # applied.
2023
+ fixed_price_quantity: nil,
2024
+ # The property used to group this price on an invoice
2025
+ invoice_grouping_key: nil,
2026
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
2027
+ # If unspecified, a single invoice is produced per billing cycle.
2028
+ invoicing_cycle_configuration: nil,
2029
+ # The ID of the license type to associate with this price.
2030
+ license_type_id: nil,
2031
+ # User-specified key/value pairs for the resource. Individual keys can be removed
2032
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
2033
+ # by setting `metadata` to `null`.
2034
+ metadata: nil,
2035
+ # A transient ID that can be used to reference this price when adding adjustments
2036
+ # in the same API call.
2037
+ reference_id: nil,
2038
+ # The pricing model type
2039
+ model_type: :tiered_with_proration
2040
+ )
2041
+ end
2042
+
2043
+ sig do
2044
+ override.returns(
2045
+ {
2046
+ cadence:
2047
+ Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::OrSymbol,
2048
+ item_id: String,
2049
+ model_type: Symbol,
2050
+ name: String,
2051
+ tiered_with_proration_config:
2052
+ Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig,
2053
+ billable_metric_id: T.nilable(String),
2054
+ billed_in_advance: T.nilable(T::Boolean),
2055
+ billing_cycle_configuration:
2056
+ T.nilable(Orb::NewBillingCycleConfiguration),
2057
+ conversion_rate: T.nilable(Float),
2058
+ conversion_rate_config:
2059
+ T.nilable(
2060
+ T.any(
2061
+ Orb::UnitConversionRateConfig,
2062
+ Orb::TieredConversionRateConfig
2063
+ )
2064
+ ),
2065
+ currency: T.nilable(String),
2066
+ dimensional_price_configuration:
2067
+ T.nilable(Orb::NewDimensionalPriceConfiguration),
2068
+ external_price_id: T.nilable(String),
2069
+ fixed_price_quantity: T.nilable(Float),
2070
+ invoice_grouping_key: T.nilable(String),
2071
+ invoicing_cycle_configuration:
2072
+ T.nilable(Orb::NewBillingCycleConfiguration),
2073
+ license_type_id: T.nilable(String),
2074
+ metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
2075
+ reference_id: T.nilable(String)
2076
+ }
2077
+ )
2078
+ end
2079
+ def to_hash
2080
+ end
2081
+
2082
+ # The cadence to bill for this price on.
2083
+ module Cadence
2084
+ extend Orb::Internal::Type::Enum
2085
+
2086
+ TaggedSymbol =
2087
+ T.type_alias do
2088
+ T.all(
2089
+ Symbol,
2090
+ Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence
2091
+ )
2092
+ end
2093
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2094
+
2095
+ ANNUAL =
2096
+ T.let(
2097
+ :annual,
2098
+ Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol
2099
+ )
2100
+ SEMI_ANNUAL =
2101
+ T.let(
2102
+ :semi_annual,
2103
+ Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol
2104
+ )
2105
+ MONTHLY =
2106
+ T.let(
2107
+ :monthly,
2108
+ Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol
2109
+ )
2110
+ QUARTERLY =
2111
+ T.let(
2112
+ :quarterly,
2113
+ Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol
2114
+ )
2115
+ ONE_TIME =
2116
+ T.let(
2117
+ :one_time,
2118
+ Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol
2119
+ )
2120
+ CUSTOM =
2121
+ T.let(
2122
+ :custom,
2123
+ Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol
2124
+ )
2125
+
2126
+ sig do
2127
+ override.returns(
2128
+ T::Array[
2129
+ Orb::PlanCreateParams::Price::Price::TieredWithProration::Cadence::TaggedSymbol
2130
+ ]
2131
+ )
2132
+ end
2133
+ def self.values
2134
+ end
2135
+ end
2136
+
2137
+ class TieredWithProrationConfig < Orb::Internal::Type::BaseModel
2138
+ OrHash =
2139
+ T.type_alias do
2140
+ T.any(
2141
+ Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig,
2142
+ Orb::Internal::AnyHash
2143
+ )
2144
+ end
2145
+
2146
+ # Tiers for rating based on total usage quantities into the specified tier with
2147
+ # proration
2148
+ sig do
2149
+ returns(
2150
+ T::Array[
2151
+ Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier
2152
+ ]
2153
+ )
2154
+ end
2155
+ attr_accessor :tiers
2156
+
2157
+ # Configuration for tiered_with_proration pricing
2158
+ sig do
2159
+ params(
2160
+ tiers:
2161
+ T::Array[
2162
+ Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash
2163
+ ]
2164
+ ).returns(T.attached_class)
2165
+ end
2166
+ def self.new(
2167
+ # Tiers for rating based on total usage quantities into the specified tier with
2168
+ # proration
2169
+ tiers:
2170
+ )
2171
+ end
2172
+
2173
+ sig do
2174
+ override.returns(
2175
+ {
2176
+ tiers:
2177
+ T::Array[
2178
+ Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier
2179
+ ]
2180
+ }
2181
+ )
2182
+ end
2183
+ def to_hash
2184
+ end
2185
+
2186
+ class Tier < Orb::Internal::Type::BaseModel
2187
+ OrHash =
2188
+ T.type_alias do
2189
+ T.any(
2190
+ Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier,
2191
+ Orb::Internal::AnyHash
2192
+ )
2193
+ end
2194
+
2195
+ # Inclusive tier starting value
2196
+ sig { returns(String) }
2197
+ attr_accessor :tier_lower_bound
2198
+
2199
+ # Amount per unit
2200
+ sig { returns(String) }
2201
+ attr_accessor :unit_amount
2202
+
2203
+ # Configuration for a single tiered with proration tier
2204
+ sig do
2205
+ params(tier_lower_bound: String, unit_amount: String).returns(
2206
+ T.attached_class
2207
+ )
2208
+ end
2209
+ def self.new(
2210
+ # Inclusive tier starting value
2211
+ tier_lower_bound:,
2212
+ # Amount per unit
2213
+ unit_amount:
2214
+ )
2215
+ end
2216
+
2217
+ sig do
2218
+ override.returns(
2219
+ { tier_lower_bound: String, unit_amount: String }
2220
+ )
2221
+ end
2222
+ def to_hash
2223
+ end
2224
+ end
2225
+ end
2226
+ end
2227
+
2228
+ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel
2229
+ OrHash =
2230
+ T.type_alias do
2231
+ T.any(
2232
+ Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds,
2233
+ Orb::Internal::AnyHash
2234
+ )
2235
+ end
2236
+
2237
+ # The cadence to bill for this price on.
2238
+ sig do
2239
+ returns(
2240
+ Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol
2241
+ )
2242
+ end
2243
+ attr_accessor :cadence
2244
+
2245
+ # Configuration for grouped_with_min_max_thresholds pricing
2246
+ sig do
2247
+ returns(
2248
+ Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig
2249
+ )
2250
+ end
2251
+ attr_reader :grouped_with_min_max_thresholds_config
2252
+
2253
+ sig do
2254
+ params(
2255
+ grouped_with_min_max_thresholds_config:
2256
+ Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash
2257
+ ).void
2258
+ end
2259
+ attr_writer :grouped_with_min_max_thresholds_config
2260
+
2261
+ # The id of the item the price will be associated with.
2262
+ sig { returns(String) }
2263
+ attr_accessor :item_id
2264
+
2265
+ # The pricing model type
2266
+ sig { returns(Symbol) }
2267
+ attr_accessor :model_type
2268
+
2269
+ # The name of the price.
2270
+ sig { returns(String) }
2271
+ attr_accessor :name
2272
+
2273
+ # The id of the billable metric for the price. Only needed if the price is
2274
+ # usage-based.
2275
+ sig { returns(T.nilable(String)) }
2276
+ attr_accessor :billable_metric_id
2277
+
2278
+ # If the Price represents a fixed cost, the price will be billed in-advance if
2279
+ # this is true, and in-arrears if this is false.
2280
+ sig { returns(T.nilable(T::Boolean)) }
2281
+ attr_accessor :billed_in_advance
2282
+
2283
+ # For custom cadence: specifies the duration of the billing period in days or
2284
+ # months.
2285
+ sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
2286
+ attr_reader :billing_cycle_configuration
2287
+
2288
+ sig do
2289
+ params(
2290
+ billing_cycle_configuration:
2291
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
2292
+ ).void
2293
+ end
2294
+ attr_writer :billing_cycle_configuration
2295
+
2296
+ # The per unit conversion rate of the price currency to the invoicing currency.
2297
+ sig { returns(T.nilable(Float)) }
2298
+ attr_accessor :conversion_rate
2299
+
2300
+ # The configuration for the rate of the price currency to the invoicing currency.
2301
+ sig do
2302
+ returns(
2303
+ T.nilable(
2304
+ T.any(
2305
+ Orb::UnitConversionRateConfig,
2306
+ Orb::TieredConversionRateConfig
2307
+ )
2308
+ )
2309
+ )
2310
+ end
2311
+ attr_accessor :conversion_rate_config
2312
+
2313
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
2314
+ # price is billed.
2315
+ sig { returns(T.nilable(String)) }
2316
+ attr_accessor :currency
2317
+
2318
+ # For dimensional price: specifies a price group and dimension values
2319
+ sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
2320
+ attr_reader :dimensional_price_configuration
2321
+
2322
+ sig do
2323
+ params(
2324
+ dimensional_price_configuration:
2325
+ T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
2326
+ ).void
2327
+ end
2328
+ attr_writer :dimensional_price_configuration
2329
+
2330
+ # An alias for the price.
2331
+ sig { returns(T.nilable(String)) }
2332
+ attr_accessor :external_price_id
2333
+
2334
+ # If the Price represents a fixed cost, this represents the quantity of units
2335
+ # applied.
2336
+ sig { returns(T.nilable(Float)) }
2337
+ attr_accessor :fixed_price_quantity
2338
+
2339
+ # The property used to group this price on an invoice
2340
+ sig { returns(T.nilable(String)) }
2341
+ attr_accessor :invoice_grouping_key
2342
+
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
+ sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
2346
+ attr_reader :invoicing_cycle_configuration
2347
+
2348
+ sig do
2349
+ params(
2350
+ invoicing_cycle_configuration:
2351
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
2352
+ ).void
2353
+ end
2354
+ attr_writer :invoicing_cycle_configuration
2355
+
2356
+ # The ID of the license type to associate with this price.
2357
+ sig { returns(T.nilable(String)) }
2358
+ attr_accessor :license_type_id
2359
+
2360
+ # User-specified key/value pairs for the resource. Individual keys can be removed
2361
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
2362
+ # by setting `metadata` to `null`.
2363
+ sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
2364
+ attr_accessor :metadata
2365
+
2366
+ # A transient ID that can be used to reference this price when adding adjustments
2367
+ # in the same API call.
2368
+ sig { returns(T.nilable(String)) }
2369
+ attr_accessor :reference_id
2370
+
2371
+ sig do
2372
+ params(
2373
+ cadence:
2374
+ Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol,
2375
+ grouped_with_min_max_thresholds_config:
2376
+ Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash,
2377
+ item_id: String,
2378
+ name: String,
2379
+ billable_metric_id: T.nilable(String),
2380
+ billed_in_advance: T.nilable(T::Boolean),
2381
+ billing_cycle_configuration:
2382
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
2383
+ conversion_rate: T.nilable(Float),
2384
+ conversion_rate_config:
2385
+ T.nilable(
2386
+ T.any(
2387
+ Orb::UnitConversionRateConfig::OrHash,
2388
+ Orb::TieredConversionRateConfig::OrHash
2389
+ )
2390
+ ),
2391
+ currency: T.nilable(String),
2392
+ dimensional_price_configuration:
2393
+ T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
2394
+ external_price_id: T.nilable(String),
2395
+ fixed_price_quantity: T.nilable(Float),
2396
+ invoice_grouping_key: T.nilable(String),
2397
+ invoicing_cycle_configuration:
2398
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
2399
+ license_type_id: T.nilable(String),
2400
+ metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
2401
+ reference_id: T.nilable(String),
2402
+ model_type: Symbol
2403
+ ).returns(T.attached_class)
2404
+ end
2405
+ def self.new(
2406
+ # The cadence to bill for this price on.
2407
+ cadence:,
2408
+ # Configuration for grouped_with_min_max_thresholds pricing
2409
+ grouped_with_min_max_thresholds_config:,
2410
+ # The id of the item the price will be associated with.
2411
+ item_id:,
2412
+ # The name of the price.
2413
+ name:,
2414
+ # The id of the billable metric for the price. Only needed if the price is
2415
+ # usage-based.
2416
+ billable_metric_id: nil,
2417
+ # If the Price represents a fixed cost, the price will be billed in-advance if
2418
+ # this is true, and in-arrears if this is false.
2419
+ billed_in_advance: nil,
2420
+ # For custom cadence: specifies the duration of the billing period in days or
2421
+ # months.
2422
+ billing_cycle_configuration: nil,
2423
+ # The per unit conversion rate of the price currency to the invoicing currency.
2424
+ conversion_rate: nil,
2425
+ # The configuration for the rate of the price currency to the invoicing currency.
2426
+ conversion_rate_config: nil,
2427
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
2428
+ # price is billed.
2429
+ currency: nil,
2430
+ # For dimensional price: specifies a price group and dimension values
2431
+ dimensional_price_configuration: nil,
2432
+ # An alias for the price.
2433
+ external_price_id: nil,
2434
+ # If the Price represents a fixed cost, this represents the quantity of units
2435
+ # applied.
2436
+ fixed_price_quantity: nil,
2437
+ # The property used to group this price on an invoice
2438
+ invoice_grouping_key: nil,
2439
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
2440
+ # If unspecified, a single invoice is produced per billing cycle.
2441
+ invoicing_cycle_configuration: nil,
2442
+ # The ID of the license type to associate with this price.
2443
+ license_type_id: nil,
2444
+ # User-specified key/value pairs for the resource. Individual keys can be removed
2445
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
2446
+ # by setting `metadata` to `null`.
2447
+ metadata: nil,
2448
+ # A transient ID that can be used to reference this price when adding adjustments
2449
+ # in the same API call.
2450
+ reference_id: nil,
2451
+ # The pricing model type
2452
+ model_type: :grouped_with_min_max_thresholds
2453
+ )
2454
+ end
2455
+
2456
+ sig do
2457
+ override.returns(
2458
+ {
2459
+ cadence:
2460
+ Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol,
2461
+ grouped_with_min_max_thresholds_config:
2462
+ Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig,
2463
+ item_id: String,
2464
+ model_type: Symbol,
2465
+ name: String,
2466
+ billable_metric_id: T.nilable(String),
2467
+ billed_in_advance: T.nilable(T::Boolean),
2468
+ billing_cycle_configuration:
2469
+ T.nilable(Orb::NewBillingCycleConfiguration),
2470
+ conversion_rate: T.nilable(Float),
2471
+ conversion_rate_config:
2472
+ T.nilable(
2473
+ T.any(
2474
+ Orb::UnitConversionRateConfig,
2475
+ Orb::TieredConversionRateConfig
2476
+ )
2477
+ ),
2478
+ currency: T.nilable(String),
2479
+ dimensional_price_configuration:
2480
+ T.nilable(Orb::NewDimensionalPriceConfiguration),
2481
+ external_price_id: T.nilable(String),
2482
+ fixed_price_quantity: T.nilable(Float),
2483
+ invoice_grouping_key: T.nilable(String),
2484
+ invoicing_cycle_configuration:
2485
+ T.nilable(Orb::NewBillingCycleConfiguration),
2486
+ license_type_id: T.nilable(String),
2487
+ metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
2488
+ reference_id: T.nilable(String)
2489
+ }
2490
+ )
2491
+ end
2492
+ def to_hash
2493
+ end
2494
+
2495
+ # The cadence to bill for this price on.
2496
+ module Cadence
2497
+ extend Orb::Internal::Type::Enum
2498
+
2499
+ TaggedSymbol =
2500
+ T.type_alias do
2501
+ T.all(
2502
+ Symbol,
2503
+ Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence
2504
+ )
2505
+ end
2506
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2507
+
2508
+ ANNUAL =
2509
+ T.let(
2510
+ :annual,
2511
+ Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
2512
+ )
2513
+ SEMI_ANNUAL =
2514
+ T.let(
2515
+ :semi_annual,
2516
+ Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
2517
+ )
2518
+ MONTHLY =
2519
+ T.let(
2520
+ :monthly,
2521
+ Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
2522
+ )
2523
+ QUARTERLY =
2524
+ T.let(
2525
+ :quarterly,
2526
+ Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
2527
+ )
2528
+ ONE_TIME =
2529
+ T.let(
2530
+ :one_time,
2531
+ Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
2532
+ )
2533
+ CUSTOM =
2534
+ T.let(
2535
+ :custom,
2536
+ Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
2537
+ )
2538
+
2539
+ sig do
2540
+ override.returns(
2541
+ T::Array[
2542
+ Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
2543
+ ]
2544
+ )
2545
+ end
2546
+ def self.values
2547
+ end
2548
+ end
2549
+
2550
+ class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel
2551
+ OrHash =
2552
+ T.type_alias do
2553
+ T.any(
2554
+ Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig,
2555
+ Orb::Internal::AnyHash
2556
+ )
2557
+ end
2558
+
2559
+ # The event property used to group before applying thresholds
2560
+ sig { returns(String) }
2561
+ attr_accessor :grouping_key
2562
+
2563
+ # The maximum amount to charge each group
2564
+ sig { returns(String) }
2565
+ attr_accessor :maximum_charge
2566
+
2567
+ # The minimum amount to charge each group, regardless of usage
2568
+ sig { returns(String) }
2569
+ attr_accessor :minimum_charge
2570
+
2571
+ # The base price charged per group
2572
+ sig { returns(String) }
2573
+ attr_accessor :per_unit_rate
2574
+
2575
+ # Configuration for grouped_with_min_max_thresholds pricing
2576
+ sig do
2577
+ params(
2578
+ grouping_key: String,
2579
+ maximum_charge: String,
2580
+ minimum_charge: String,
2581
+ per_unit_rate: String
2582
+ ).returns(T.attached_class)
2583
+ end
2584
+ def self.new(
2585
+ # The event property used to group before applying thresholds
2586
+ grouping_key:,
2587
+ # The maximum amount to charge each group
2588
+ maximum_charge:,
2589
+ # The minimum amount to charge each group, regardless of usage
2590
+ minimum_charge:,
2591
+ # The base price charged per group
2592
+ per_unit_rate:
2593
+ )
2594
+ end
2595
+
2596
+ sig do
2597
+ override.returns(
2598
+ {
2599
+ grouping_key: String,
2600
+ maximum_charge: String,
2601
+ minimum_charge: String,
2602
+ per_unit_rate: String
2603
+ }
2604
+ )
2605
+ end
2606
+ def to_hash
2607
+ end
2608
+ end
2609
+ end
2610
+
2611
+ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel
2612
+ OrHash =
2613
+ T.type_alias do
2614
+ T.any(
2615
+ Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation,
2616
+ Orb::Internal::AnyHash
2617
+ )
2618
+ end
2619
+
2620
+ # The cadence to bill for this price on.
2621
+ sig do
2622
+ returns(
2623
+ Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::OrSymbol
2624
+ )
2625
+ end
2626
+ attr_accessor :cadence
2627
+
2628
+ # Configuration for cumulative_grouped_allocation pricing
2629
+ sig do
2630
+ returns(
2631
+ Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig
2632
+ )
2633
+ end
2634
+ attr_reader :cumulative_grouped_allocation_config
2635
+
2636
+ sig do
2637
+ params(
2638
+ cumulative_grouped_allocation_config:
2639
+ Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash
2640
+ ).void
2641
+ end
2642
+ attr_writer :cumulative_grouped_allocation_config
2643
+
2644
+ # The id of the item the price will be associated with.
2645
+ sig { returns(String) }
2646
+ attr_accessor :item_id
2647
+
2648
+ # The pricing model type
2649
+ sig { returns(Symbol) }
2650
+ attr_accessor :model_type
2651
+
2652
+ # The name of the price.
2653
+ sig { returns(String) }
2654
+ attr_accessor :name
2655
+
2656
+ # The id of the billable metric for the price. Only needed if the price is
2657
+ # usage-based.
2658
+ sig { returns(T.nilable(String)) }
2659
+ attr_accessor :billable_metric_id
2660
+
2661
+ # If the Price represents a fixed cost, the price will be billed in-advance if
2662
+ # this is true, and in-arrears if this is false.
2663
+ sig { returns(T.nilable(T::Boolean)) }
2664
+ attr_accessor :billed_in_advance
2665
+
2666
+ # For custom cadence: specifies the duration of the billing period in days or
2667
+ # months.
2668
+ sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
2669
+ attr_reader :billing_cycle_configuration
2670
+
2671
+ sig do
2672
+ params(
2673
+ billing_cycle_configuration:
2674
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
2675
+ ).void
2676
+ end
2677
+ attr_writer :billing_cycle_configuration
2678
+
2679
+ # The per unit conversion rate of the price currency to the invoicing currency.
2680
+ sig { returns(T.nilable(Float)) }
2681
+ attr_accessor :conversion_rate
2682
+
2683
+ # The configuration for the rate of the price currency to the invoicing currency.
2684
+ sig do
2685
+ returns(
2686
+ T.nilable(
2687
+ T.any(
2688
+ Orb::UnitConversionRateConfig,
2689
+ Orb::TieredConversionRateConfig
2690
+ )
2691
+ )
2692
+ )
2693
+ end
2694
+ attr_accessor :conversion_rate_config
2695
+
2696
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
2697
+ # price is billed.
2698
+ sig { returns(T.nilable(String)) }
2699
+ attr_accessor :currency
2700
+
2701
+ # For dimensional price: specifies a price group and dimension values
2702
+ sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) }
2703
+ attr_reader :dimensional_price_configuration
2704
+
2705
+ sig do
2706
+ params(
2707
+ dimensional_price_configuration:
2708
+ T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash)
2709
+ ).void
2710
+ end
2711
+ attr_writer :dimensional_price_configuration
2712
+
2713
+ # An alias for the price.
2714
+ sig { returns(T.nilable(String)) }
2715
+ attr_accessor :external_price_id
2716
+
2717
+ # If the Price represents a fixed cost, this represents the quantity of units
2718
+ # applied.
2719
+ sig { returns(T.nilable(Float)) }
2720
+ attr_accessor :fixed_price_quantity
2721
+
2722
+ # The property used to group this price on an invoice
2723
+ sig { returns(T.nilable(String)) }
2724
+ attr_accessor :invoice_grouping_key
2725
+
2726
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
2727
+ # If unspecified, a single invoice is produced per billing cycle.
2728
+ sig { returns(T.nilable(Orb::NewBillingCycleConfiguration)) }
2729
+ attr_reader :invoicing_cycle_configuration
2730
+
2731
+ sig do
2732
+ params(
2733
+ invoicing_cycle_configuration:
2734
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash)
2735
+ ).void
2736
+ end
2737
+ attr_writer :invoicing_cycle_configuration
2738
+
2739
+ # The ID of the license type to associate with this price.
2740
+ sig { returns(T.nilable(String)) }
2741
+ attr_accessor :license_type_id
2742
+
2743
+ # User-specified key/value pairs for the resource. Individual keys can be removed
2744
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
2745
+ # by setting `metadata` to `null`.
2746
+ sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
2747
+ attr_accessor :metadata
2748
+
2749
+ # A transient ID that can be used to reference this price when adding adjustments
2750
+ # in the same API call.
2751
+ sig { returns(T.nilable(String)) }
2752
+ attr_accessor :reference_id
2753
+
2754
+ sig do
2755
+ params(
2756
+ cadence:
2757
+ Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::OrSymbol,
2758
+ cumulative_grouped_allocation_config:
2759
+ Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash,
2760
+ item_id: String,
2761
+ name: String,
2762
+ billable_metric_id: T.nilable(String),
2763
+ billed_in_advance: T.nilable(T::Boolean),
2764
+ billing_cycle_configuration:
2765
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
2766
+ conversion_rate: T.nilable(Float),
2767
+ conversion_rate_config:
2768
+ T.nilable(
2769
+ T.any(
2770
+ Orb::UnitConversionRateConfig::OrHash,
2771
+ Orb::TieredConversionRateConfig::OrHash
2772
+ )
2773
+ ),
2774
+ currency: T.nilable(String),
2775
+ dimensional_price_configuration:
2776
+ T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash),
2777
+ external_price_id: T.nilable(String),
2778
+ fixed_price_quantity: T.nilable(Float),
2779
+ invoice_grouping_key: T.nilable(String),
2780
+ invoicing_cycle_configuration:
2781
+ T.nilable(Orb::NewBillingCycleConfiguration::OrHash),
2782
+ license_type_id: T.nilable(String),
2783
+ metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
2784
+ reference_id: T.nilable(String),
2785
+ model_type: Symbol
2786
+ ).returns(T.attached_class)
2787
+ end
2788
+ def self.new(
2789
+ # The cadence to bill for this price on.
2790
+ cadence:,
2791
+ # Configuration for cumulative_grouped_allocation pricing
2792
+ cumulative_grouped_allocation_config:,
2793
+ # The id of the item the price will be associated with.
2794
+ item_id:,
2795
+ # The name of the price.
2796
+ name:,
2797
+ # The id of the billable metric for the price. Only needed if the price is
2798
+ # usage-based.
2799
+ billable_metric_id: nil,
2800
+ # If the Price represents a fixed cost, the price will be billed in-advance if
2801
+ # this is true, and in-arrears if this is false.
2802
+ billed_in_advance: nil,
2803
+ # For custom cadence: specifies the duration of the billing period in days or
2804
+ # months.
2805
+ billing_cycle_configuration: nil,
2806
+ # The per unit conversion rate of the price currency to the invoicing currency.
2807
+ conversion_rate: nil,
2808
+ # The configuration for the rate of the price currency to the invoicing currency.
2809
+ conversion_rate_config: nil,
2810
+ # An ISO 4217 currency string, or custom pricing unit identifier, in which this
2811
+ # price is billed.
2812
+ currency: nil,
2813
+ # For dimensional price: specifies a price group and dimension values
2814
+ dimensional_price_configuration: nil,
2815
+ # An alias for the price.
2816
+ external_price_id: nil,
2817
+ # If the Price represents a fixed cost, this represents the quantity of units
2818
+ # applied.
2819
+ fixed_price_quantity: nil,
2820
+ # The property used to group this price on an invoice
2821
+ invoice_grouping_key: nil,
2822
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
2823
+ # If unspecified, a single invoice is produced per billing cycle.
2824
+ invoicing_cycle_configuration: nil,
2825
+ # The ID of the license type to associate with this price.
2826
+ license_type_id: nil,
2827
+ # User-specified key/value pairs for the resource. Individual keys can be removed
2828
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
2829
+ # by setting `metadata` to `null`.
2830
+ metadata: nil,
2831
+ # A transient ID that can be used to reference this price when adding adjustments
2832
+ # in the same API call.
2833
+ reference_id: nil,
2834
+ # The pricing model type
2835
+ model_type: :cumulative_grouped_allocation
2836
+ )
2837
+ end
2838
+
2839
+ sig do
2840
+ override.returns(
2841
+ {
2842
+ cadence:
2843
+ Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::OrSymbol,
2844
+ cumulative_grouped_allocation_config:
2845
+ Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig,
2846
+ item_id: String,
2847
+ model_type: Symbol,
2848
+ name: String,
2849
+ billable_metric_id: T.nilable(String),
2850
+ billed_in_advance: T.nilable(T::Boolean),
2851
+ billing_cycle_configuration:
2852
+ T.nilable(Orb::NewBillingCycleConfiguration),
2853
+ conversion_rate: T.nilable(Float),
2854
+ conversion_rate_config:
2855
+ T.nilable(
2856
+ T.any(
2857
+ Orb::UnitConversionRateConfig,
2858
+ Orb::TieredConversionRateConfig
2859
+ )
2860
+ ),
2861
+ currency: T.nilable(String),
2862
+ dimensional_price_configuration:
2863
+ T.nilable(Orb::NewDimensionalPriceConfiguration),
2864
+ external_price_id: T.nilable(String),
2865
+ fixed_price_quantity: T.nilable(Float),
2866
+ invoice_grouping_key: T.nilable(String),
2867
+ invoicing_cycle_configuration:
2868
+ T.nilable(Orb::NewBillingCycleConfiguration),
2869
+ license_type_id: T.nilable(String),
2870
+ metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
2871
+ reference_id: T.nilable(String)
2872
+ }
2873
+ )
2874
+ end
2875
+ def to_hash
2876
+ end
2877
+
2878
+ # The cadence to bill for this price on.
2879
+ module Cadence
2880
+ extend Orb::Internal::Type::Enum
2881
+
2882
+ TaggedSymbol =
2883
+ T.type_alias do
2884
+ T.all(
2885
+ Symbol,
2886
+ Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence
2887
+ )
2888
+ end
2889
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2890
+
2891
+ ANNUAL =
2892
+ T.let(
2893
+ :annual,
2894
+ Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
2895
+ )
2896
+ SEMI_ANNUAL =
2897
+ T.let(
2898
+ :semi_annual,
2899
+ Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
2900
+ )
2901
+ MONTHLY =
2902
+ T.let(
2903
+ :monthly,
2904
+ Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
2905
+ )
2906
+ QUARTERLY =
2907
+ T.let(
2908
+ :quarterly,
2909
+ Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
2910
+ )
2911
+ ONE_TIME =
2912
+ T.let(
2913
+ :one_time,
2914
+ Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
2915
+ )
2916
+ CUSTOM =
2917
+ T.let(
2918
+ :custom,
2919
+ Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
2920
+ )
2921
+
2922
+ sig do
2923
+ override.returns(
2924
+ T::Array[
2925
+ Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
2926
+ ]
2927
+ )
2928
+ end
2929
+ def self.values
2930
+ end
2931
+ end
2932
+
2933
+ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel
2934
+ OrHash =
2935
+ T.type_alias do
2936
+ T.any(
2937
+ Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig,
2938
+ Orb::Internal::AnyHash
2939
+ )
2940
+ end
2941
+
2942
+ # The overall allocation across all groups
2943
+ sig { returns(String) }
2944
+ attr_accessor :cumulative_allocation
2945
+
2946
+ # The allocation per individual group
2947
+ sig { returns(String) }
2948
+ attr_accessor :group_allocation
2949
+
2950
+ # The event property used to group usage before applying allocations
2951
+ sig { returns(String) }
2952
+ attr_accessor :grouping_key
2953
+
2954
+ # The amount to charge for each unit outside of the allocation
2955
+ sig { returns(String) }
2956
+ attr_accessor :unit_amount
2957
+
2958
+ # Configuration for cumulative_grouped_allocation pricing
2959
+ sig do
2960
+ params(
2961
+ cumulative_allocation: String,
2962
+ group_allocation: String,
2963
+ grouping_key: String,
2964
+ unit_amount: String
2965
+ ).returns(T.attached_class)
2966
+ end
2967
+ def self.new(
2968
+ # The overall allocation across all groups
2969
+ cumulative_allocation:,
2970
+ # The allocation per individual group
2971
+ group_allocation:,
2972
+ # The event property used to group usage before applying allocations
2973
+ grouping_key:,
2974
+ # The amount to charge for each unit outside of the allocation
2975
+ unit_amount:
1161
2976
  )
1162
2977
  end
1163
2978
 
1164
2979
  sig do
1165
2980
  override.returns(
1166
2981
  {
1167
- tiers:
1168
- T::Array[
1169
- Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier
1170
- ]
2982
+ cumulative_allocation: String,
2983
+ group_allocation: String,
2984
+ grouping_key: String,
2985
+ unit_amount: String
1171
2986
  }
1172
2987
  )
1173
2988
  end
1174
2989
  def to_hash
1175
2990
  end
1176
-
1177
- class Tier < Orb::Internal::Type::BaseModel
1178
- OrHash =
1179
- T.type_alias do
1180
- T.any(
1181
- Orb::PlanCreateParams::Price::Price::TieredWithProration::TieredWithProrationConfig::Tier,
1182
- Orb::Internal::AnyHash
1183
- )
1184
- end
1185
-
1186
- # Inclusive tier starting value
1187
- sig { returns(String) }
1188
- attr_accessor :tier_lower_bound
1189
-
1190
- # Amount per unit
1191
- sig { returns(String) }
1192
- attr_accessor :unit_amount
1193
-
1194
- # Configuration for a single tiered with proration tier
1195
- sig do
1196
- params(tier_lower_bound: String, unit_amount: String).returns(
1197
- T.attached_class
1198
- )
1199
- end
1200
- def self.new(
1201
- # Inclusive tier starting value
1202
- tier_lower_bound:,
1203
- # Amount per unit
1204
- unit_amount:
1205
- )
1206
- end
1207
-
1208
- sig do
1209
- override.returns(
1210
- { tier_lower_bound: String, unit_amount: String }
1211
- )
1212
- end
1213
- def to_hash
1214
- end
1215
- end
1216
2991
  end
1217
2992
  end
1218
2993
 
1219
- class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel
2994
+ class DailyCreditAllowance < Orb::Internal::Type::BaseModel
1220
2995
  OrHash =
1221
2996
  T.type_alias do
1222
2997
  T.any(
1223
- Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds,
2998
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance,
1224
2999
  Orb::Internal::AnyHash
1225
3000
  )
1226
3001
  end
@@ -1228,26 +3003,26 @@ module Orb
1228
3003
  # The cadence to bill for this price on.
1229
3004
  sig do
1230
3005
  returns(
1231
- Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol
3006
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::OrSymbol
1232
3007
  )
1233
3008
  end
1234
3009
  attr_accessor :cadence
1235
3010
 
1236
- # Configuration for grouped_with_min_max_thresholds pricing
3011
+ # Configuration for daily_credit_allowance pricing
1237
3012
  sig do
1238
3013
  returns(
1239
- Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig
3014
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig
1240
3015
  )
1241
3016
  end
1242
- attr_reader :grouped_with_min_max_thresholds_config
3017
+ attr_reader :daily_credit_allowance_config
1243
3018
 
1244
3019
  sig do
1245
3020
  params(
1246
- grouped_with_min_max_thresholds_config:
1247
- Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash
3021
+ daily_credit_allowance_config:
3022
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash
1248
3023
  ).void
1249
3024
  end
1250
- attr_writer :grouped_with_min_max_thresholds_config
3025
+ attr_writer :daily_credit_allowance_config
1251
3026
 
1252
3027
  # The id of the item the price will be associated with.
1253
3028
  sig { returns(String) }
@@ -1362,9 +3137,9 @@ module Orb
1362
3137
  sig do
1363
3138
  params(
1364
3139
  cadence:
1365
- Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol,
1366
- grouped_with_min_max_thresholds_config:
1367
- Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash,
3140
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::OrSymbol,
3141
+ daily_credit_allowance_config:
3142
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::OrHash,
1368
3143
  item_id: String,
1369
3144
  name: String,
1370
3145
  billable_metric_id: T.nilable(String),
@@ -1396,8 +3171,8 @@ module Orb
1396
3171
  def self.new(
1397
3172
  # The cadence to bill for this price on.
1398
3173
  cadence:,
1399
- # Configuration for grouped_with_min_max_thresholds pricing
1400
- grouped_with_min_max_thresholds_config:,
3174
+ # Configuration for daily_credit_allowance pricing
3175
+ daily_credit_allowance_config:,
1401
3176
  # The id of the item the price will be associated with.
1402
3177
  item_id:,
1403
3178
  # The name of the price.
@@ -1440,7 +3215,7 @@ module Orb
1440
3215
  # in the same API call.
1441
3216
  reference_id: nil,
1442
3217
  # The pricing model type
1443
- model_type: :grouped_with_min_max_thresholds
3218
+ model_type: :daily_credit_allowance
1444
3219
  )
1445
3220
  end
1446
3221
 
@@ -1448,9 +3223,9 @@ module Orb
1448
3223
  override.returns(
1449
3224
  {
1450
3225
  cadence:
1451
- Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol,
1452
- grouped_with_min_max_thresholds_config:
1453
- Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig,
3226
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::OrSymbol,
3227
+ daily_credit_allowance_config:
3228
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig,
1454
3229
  item_id: String,
1455
3230
  model_type: Symbol,
1456
3231
  name: String,
@@ -1491,7 +3266,7 @@ module Orb
1491
3266
  T.type_alias do
1492
3267
  T.all(
1493
3268
  Symbol,
1494
- Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence
3269
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence
1495
3270
  )
1496
3271
  end
1497
3272
  OrSymbol = T.type_alias { T.any(Symbol, String) }
@@ -1499,38 +3274,38 @@ module Orb
1499
3274
  ANNUAL =
1500
3275
  T.let(
1501
3276
  :annual,
1502
- Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
3277
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol
1503
3278
  )
1504
3279
  SEMI_ANNUAL =
1505
3280
  T.let(
1506
3281
  :semi_annual,
1507
- Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
3282
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol
1508
3283
  )
1509
3284
  MONTHLY =
1510
3285
  T.let(
1511
3286
  :monthly,
1512
- Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
3287
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol
1513
3288
  )
1514
3289
  QUARTERLY =
1515
3290
  T.let(
1516
3291
  :quarterly,
1517
- Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
3292
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol
1518
3293
  )
1519
3294
  ONE_TIME =
1520
3295
  T.let(
1521
3296
  :one_time,
1522
- Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
3297
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol
1523
3298
  )
1524
3299
  CUSTOM =
1525
3300
  T.let(
1526
3301
  :custom,
1527
- Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
3302
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol
1528
3303
  )
1529
3304
 
1530
3305
  sig do
1531
3306
  override.returns(
1532
3307
  T::Array[
1533
- Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol
3308
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::Cadence::TaggedSymbol
1534
3309
  ]
1535
3310
  )
1536
3311
  end
@@ -1538,72 +3313,144 @@ module Orb
1538
3313
  end
1539
3314
  end
1540
3315
 
1541
- class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel
3316
+ class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel
1542
3317
  OrHash =
1543
3318
  T.type_alias do
1544
3319
  T.any(
1545
- Orb::PlanCreateParams::Price::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig,
3320
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig,
1546
3321
  Orb::Internal::AnyHash
1547
3322
  )
1548
3323
  end
1549
3324
 
1550
- # The event property used to group before applying thresholds
3325
+ # Credits granted per day. Lose-it-or-use-it; does not roll over.
1551
3326
  sig { returns(String) }
1552
- attr_accessor :grouping_key
3327
+ attr_accessor :daily_allowance
1553
3328
 
1554
- # The maximum amount to charge each group
3329
+ # Default per-unit credit rate for any usage not bucketed into a specified
3330
+ # matrix_value
1555
3331
  sig { returns(String) }
1556
- attr_accessor :maximum_charge
3332
+ attr_accessor :default_unit_amount
1557
3333
 
1558
- # The minimum amount to charge each group, regardless of usage
1559
- sig { returns(String) }
1560
- attr_accessor :minimum_charge
3334
+ # One or two event property values to evaluate matrix groups by
3335
+ sig { returns(T::Array[T.nilable(String)]) }
3336
+ attr_accessor :dimensions
1561
3337
 
1562
- # The base price charged per group
3338
+ # Event property whose value identifies the day bucket the event belongs to (e.g.
3339
+ # 'event_day' set to an ISO date string in the customer's timezone). The allowance
3340
+ # resets per distinct value of this property.
1563
3341
  sig { returns(String) }
1564
- attr_accessor :per_unit_rate
3342
+ attr_accessor :event_day_property
1565
3343
 
1566
- # Configuration for grouped_with_min_max_thresholds pricing
3344
+ # Per-dimension credit rates
3345
+ sig do
3346
+ returns(
3347
+ T::Array[
3348
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue
3349
+ ]
3350
+ )
3351
+ end
3352
+ attr_accessor :matrix_values
3353
+
3354
+ # Configuration for daily_credit_allowance pricing
1567
3355
  sig do
1568
3356
  params(
1569
- grouping_key: String,
1570
- maximum_charge: String,
1571
- minimum_charge: String,
1572
- per_unit_rate: String
3357
+ daily_allowance: String,
3358
+ default_unit_amount: String,
3359
+ dimensions: T::Array[T.nilable(String)],
3360
+ event_day_property: String,
3361
+ matrix_values:
3362
+ T::Array[
3363
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue::OrHash
3364
+ ]
1573
3365
  ).returns(T.attached_class)
1574
3366
  end
1575
3367
  def self.new(
1576
- # The event property used to group before applying thresholds
1577
- grouping_key:,
1578
- # The maximum amount to charge each group
1579
- maximum_charge:,
1580
- # The minimum amount to charge each group, regardless of usage
1581
- minimum_charge:,
1582
- # The base price charged per group
1583
- per_unit_rate:
3368
+ # Credits granted per day. Lose-it-or-use-it; does not roll over.
3369
+ daily_allowance:,
3370
+ # Default per-unit credit rate for any usage not bucketed into a specified
3371
+ # matrix_value
3372
+ default_unit_amount:,
3373
+ # One or two event property values to evaluate matrix groups by
3374
+ dimensions:,
3375
+ # Event property whose value identifies the day bucket the event belongs to (e.g.
3376
+ # 'event_day' set to an ISO date string in the customer's timezone). The allowance
3377
+ # resets per distinct value of this property.
3378
+ event_day_property:,
3379
+ # Per-dimension credit rates
3380
+ matrix_values:
1584
3381
  )
1585
3382
  end
1586
3383
 
1587
3384
  sig do
1588
3385
  override.returns(
1589
3386
  {
1590
- grouping_key: String,
1591
- maximum_charge: String,
1592
- minimum_charge: String,
1593
- per_unit_rate: String
3387
+ daily_allowance: String,
3388
+ default_unit_amount: String,
3389
+ dimensions: T::Array[T.nilable(String)],
3390
+ event_day_property: String,
3391
+ matrix_values:
3392
+ T::Array[
3393
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue
3394
+ ]
1594
3395
  }
1595
3396
  )
1596
3397
  end
1597
3398
  def to_hash
1598
3399
  end
3400
+
3401
+ class MatrixValue < Orb::Internal::Type::BaseModel
3402
+ OrHash =
3403
+ T.type_alias do
3404
+ T.any(
3405
+ Orb::PlanCreateParams::Price::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue,
3406
+ Orb::Internal::AnyHash
3407
+ )
3408
+ end
3409
+
3410
+ # One or two matrix keys to filter usage to this value by. For example, ["model"]
3411
+ # could be used to apply a different credit rate to each AI model.
3412
+ sig { returns(T::Array[T.nilable(String)]) }
3413
+ attr_accessor :dimension_values
3414
+
3415
+ # Credits charged per unit of usage matching the specified dimension_values
3416
+ sig { returns(String) }
3417
+ attr_accessor :unit_amount
3418
+
3419
+ # Per-dimension credit price for the daily credit allowance model.
3420
+ sig do
3421
+ params(
3422
+ dimension_values: T::Array[T.nilable(String)],
3423
+ unit_amount: String
3424
+ ).returns(T.attached_class)
3425
+ end
3426
+ def self.new(
3427
+ # One or two matrix keys to filter usage to this value by. For example, ["model"]
3428
+ # could be used to apply a different credit rate to each AI model.
3429
+ dimension_values:,
3430
+ # Credits charged per unit of usage matching the specified dimension_values
3431
+ unit_amount:
3432
+ )
3433
+ end
3434
+
3435
+ sig do
3436
+ override.returns(
3437
+ {
3438
+ dimension_values: T::Array[T.nilable(String)],
3439
+ unit_amount: String
3440
+ }
3441
+ )
3442
+ end
3443
+ def to_hash
3444
+ end
3445
+ end
1599
3446
  end
1600
3447
  end
1601
3448
 
1602
- class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel
3449
+ class MeteredAllowance < Orb::Internal::Type::BaseModel
1603
3450
  OrHash =
1604
3451
  T.type_alias do
1605
3452
  T.any(
1606
- Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation,
3453
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance,
1607
3454
  Orb::Internal::AnyHash
1608
3455
  )
1609
3456
  end
@@ -1611,30 +3458,30 @@ module Orb
1611
3458
  # The cadence to bill for this price on.
1612
3459
  sig do
1613
3460
  returns(
1614
- Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::OrSymbol
3461
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::OrSymbol
1615
3462
  )
1616
3463
  end
1617
3464
  attr_accessor :cadence
1618
3465
 
1619
- # Configuration for cumulative_grouped_allocation pricing
3466
+ # The id of the item the price will be associated with.
3467
+ sig { returns(String) }
3468
+ attr_accessor :item_id
3469
+
3470
+ # Configuration for metered_allowance pricing
1620
3471
  sig do
1621
3472
  returns(
1622
- Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig
3473
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig
1623
3474
  )
1624
3475
  end
1625
- attr_reader :cumulative_grouped_allocation_config
3476
+ attr_reader :metered_allowance_config
1626
3477
 
1627
3478
  sig do
1628
3479
  params(
1629
- cumulative_grouped_allocation_config:
1630
- Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash
3480
+ metered_allowance_config:
3481
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash
1631
3482
  ).void
1632
3483
  end
1633
- attr_writer :cumulative_grouped_allocation_config
1634
-
1635
- # The id of the item the price will be associated with.
1636
- sig { returns(String) }
1637
- attr_accessor :item_id
3484
+ attr_writer :metered_allowance_config
1638
3485
 
1639
3486
  # The pricing model type
1640
3487
  sig { returns(Symbol) }
@@ -1745,10 +3592,10 @@ module Orb
1745
3592
  sig do
1746
3593
  params(
1747
3594
  cadence:
1748
- Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::OrSymbol,
1749
- cumulative_grouped_allocation_config:
1750
- Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash,
3595
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::OrSymbol,
1751
3596
  item_id: String,
3597
+ metered_allowance_config:
3598
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig::OrHash,
1752
3599
  name: String,
1753
3600
  billable_metric_id: T.nilable(String),
1754
3601
  billed_in_advance: T.nilable(T::Boolean),
@@ -1779,10 +3626,10 @@ module Orb
1779
3626
  def self.new(
1780
3627
  # The cadence to bill for this price on.
1781
3628
  cadence:,
1782
- # Configuration for cumulative_grouped_allocation pricing
1783
- cumulative_grouped_allocation_config:,
1784
3629
  # The id of the item the price will be associated with.
1785
3630
  item_id:,
3631
+ # Configuration for metered_allowance pricing
3632
+ metered_allowance_config:,
1786
3633
  # The name of the price.
1787
3634
  name:,
1788
3635
  # The id of the billable metric for the price. Only needed if the price is
@@ -1823,7 +3670,7 @@ module Orb
1823
3670
  # in the same API call.
1824
3671
  reference_id: nil,
1825
3672
  # The pricing model type
1826
- model_type: :cumulative_grouped_allocation
3673
+ model_type: :metered_allowance
1827
3674
  )
1828
3675
  end
1829
3676
 
@@ -1831,10 +3678,10 @@ module Orb
1831
3678
  override.returns(
1832
3679
  {
1833
3680
  cadence:
1834
- Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::OrSymbol,
1835
- cumulative_grouped_allocation_config:
1836
- Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig,
3681
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::OrSymbol,
1837
3682
  item_id: String,
3683
+ metered_allowance_config:
3684
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig,
1838
3685
  model_type: Symbol,
1839
3686
  name: String,
1840
3687
  billable_metric_id: T.nilable(String),
@@ -1874,7 +3721,7 @@ module Orb
1874
3721
  T.type_alias do
1875
3722
  T.all(
1876
3723
  Symbol,
1877
- Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence
3724
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence
1878
3725
  )
1879
3726
  end
1880
3727
  OrSymbol = T.type_alias { T.any(Symbol, String) }
@@ -1882,38 +3729,38 @@ module Orb
1882
3729
  ANNUAL =
1883
3730
  T.let(
1884
3731
  :annual,
1885
- Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
3732
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol
1886
3733
  )
1887
3734
  SEMI_ANNUAL =
1888
3735
  T.let(
1889
3736
  :semi_annual,
1890
- Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
3737
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol
1891
3738
  )
1892
3739
  MONTHLY =
1893
3740
  T.let(
1894
3741
  :monthly,
1895
- Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
3742
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol
1896
3743
  )
1897
3744
  QUARTERLY =
1898
3745
  T.let(
1899
3746
  :quarterly,
1900
- Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
3747
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol
1901
3748
  )
1902
3749
  ONE_TIME =
1903
3750
  T.let(
1904
3751
  :one_time,
1905
- Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
3752
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol
1906
3753
  )
1907
3754
  CUSTOM =
1908
3755
  T.let(
1909
3756
  :custom,
1910
- Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
3757
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol
1911
3758
  )
1912
3759
 
1913
3760
  sig do
1914
3761
  override.returns(
1915
3762
  T::Array[
1916
- Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol
3763
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance::Cadence::TaggedSymbol
1917
3764
  ]
1918
3765
  )
1919
3766
  end
@@ -1921,59 +3768,91 @@ module Orb
1921
3768
  end
1922
3769
  end
1923
3770
 
1924
- class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel
3771
+ class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel
1925
3772
  OrHash =
1926
3773
  T.type_alias do
1927
3774
  T.any(
1928
- Orb::PlanCreateParams::Price::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig,
3775
+ Orb::PlanCreateParams::Price::Price::MeteredAllowance::MeteredAllowanceConfig,
1929
3776
  Orb::Internal::AnyHash
1930
3777
  )
1931
3778
  end
1932
3779
 
1933
- # The overall allocation across all groups
3780
+ # The grouping_key value whose summed quantity represents the allowance for this
3781
+ # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
3782
+ # — credit can never exceed actual usage.
1934
3783
  sig { returns(String) }
1935
- attr_accessor :cumulative_allocation
3784
+ attr_accessor :allowance_grouping_value
1936
3785
 
1937
- # The allocation per individual group
3786
+ # The grouping_key value whose summed quantity represents consumption (e.g.
3787
+ # 'download'). Charged at unit_amount.
1938
3788
  sig { returns(String) }
1939
- attr_accessor :group_allocation
3789
+ attr_accessor :consumption_grouping_value
1940
3790
 
1941
- # The event property used to group usage before applying allocations
3791
+ # Event property used to partition the metric into consumption and allowance
3792
+ # quantities (e.g. 'event_name'). The metric is queried with this key and the two
3793
+ # values below select which partition is which.
1942
3794
  sig { returns(String) }
1943
3795
  attr_accessor :grouping_key
1944
3796
 
1945
- # The amount to charge for each unit outside of the allocation
3797
+ # Per-unit price applied to gross consumption and to the allowance credit.
1946
3798
  sig { returns(String) }
1947
3799
  attr_accessor :unit_amount
1948
3800
 
1949
- # Configuration for cumulative_grouped_allocation pricing
3801
+ # Sub-line label for the credit row (e.g. 'Up to 3x free egress').
3802
+ sig { returns(T.nilable(String)) }
3803
+ attr_reader :allowance_display_name
3804
+
3805
+ sig { params(allowance_display_name: String).void }
3806
+ attr_writer :allowance_display_name
3807
+
3808
+ # Sub-line label for the gross consumption row (e.g. 'bytes gotten').
3809
+ sig { returns(T.nilable(String)) }
3810
+ attr_reader :consumption_display_name
3811
+
3812
+ sig { params(consumption_display_name: String).void }
3813
+ attr_writer :consumption_display_name
3814
+
3815
+ # Configuration for metered_allowance pricing
1950
3816
  sig do
1951
3817
  params(
1952
- cumulative_allocation: String,
1953
- group_allocation: String,
3818
+ allowance_grouping_value: String,
3819
+ consumption_grouping_value: String,
1954
3820
  grouping_key: String,
1955
- unit_amount: String
3821
+ unit_amount: String,
3822
+ allowance_display_name: String,
3823
+ consumption_display_name: String
1956
3824
  ).returns(T.attached_class)
1957
3825
  end
1958
3826
  def self.new(
1959
- # The overall allocation across all groups
1960
- cumulative_allocation:,
1961
- # The allocation per individual group
1962
- group_allocation:,
1963
- # The event property used to group usage before applying allocations
3827
+ # The grouping_key value whose summed quantity represents the allowance for this
3828
+ # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
3829
+ # credit can never exceed actual usage.
3830
+ allowance_grouping_value:,
3831
+ # The grouping_key value whose summed quantity represents consumption (e.g.
3832
+ # 'download'). Charged at unit_amount.
3833
+ consumption_grouping_value:,
3834
+ # Event property used to partition the metric into consumption and allowance
3835
+ # quantities (e.g. 'event_name'). The metric is queried with this key and the two
3836
+ # values below select which partition is which.
1964
3837
  grouping_key:,
1965
- # The amount to charge for each unit outside of the allocation
1966
- unit_amount:
3838
+ # Per-unit price applied to gross consumption and to the allowance credit.
3839
+ unit_amount:,
3840
+ # Sub-line label for the credit row (e.g. 'Up to 3x free egress').
3841
+ allowance_display_name: nil,
3842
+ # Sub-line label for the gross consumption row (e.g. 'bytes gotten').
3843
+ consumption_display_name: nil
1967
3844
  )
1968
3845
  end
1969
3846
 
1970
3847
  sig do
1971
3848
  override.returns(
1972
3849
  {
1973
- cumulative_allocation: String,
1974
- group_allocation: String,
3850
+ allowance_grouping_value: String,
3851
+ consumption_grouping_value: String,
1975
3852
  grouping_key: String,
1976
- unit_amount: String
3853
+ unit_amount: String,
3854
+ allowance_display_name: String,
3855
+ consumption_display_name: String
1977
3856
  }
1978
3857
  )
1979
3858
  end
@@ -2313,19 +4192,60 @@ module Orb
2313
4192
  )
2314
4193
  end
2315
4194
 
2316
- # What percent of the component subtotals to charge
2317
- sig { returns(Float) }
2318
- attr_accessor :percent
4195
+ # Fraction of the component subtotals to charge (0 < percent <= 1).
4196
+ sig { returns(Float) }
4197
+ attr_accessor :percent
4198
+
4199
+ # Maximum amount to charge. If unset, the fee has no upper bound.
4200
+ sig { returns(T.nilable(String)) }
4201
+ attr_accessor :maximum_amount
4202
+
4203
+ # Minimum amount to charge. If unset, the fee is bounded below by 0.
4204
+ sig { returns(T.nilable(String)) }
4205
+ attr_accessor :minimum_amount
4206
+
4207
+ # If true, the minimum_amount is prorated based on the service period. The
4208
+ # maximum_amount is an absolute cap (never prorated), and the percent applied to
4209
+ # upstream subtotals is never prorated either.
4210
+ sig { returns(T.nilable(T::Boolean)) }
4211
+ attr_reader :prorated
4212
+
4213
+ sig { params(prorated: T::Boolean).void }
4214
+ attr_writer :prorated
2319
4215
 
2320
4216
  # Configuration for percent pricing
2321
- sig { params(percent: Float).returns(T.attached_class) }
4217
+ sig do
4218
+ params(
4219
+ percent: Float,
4220
+ maximum_amount: T.nilable(String),
4221
+ minimum_amount: T.nilable(String),
4222
+ prorated: T::Boolean
4223
+ ).returns(T.attached_class)
4224
+ end
2322
4225
  def self.new(
2323
- # What percent of the component subtotals to charge
2324
- percent:
4226
+ # Fraction of the component subtotals to charge (0 < percent <= 1).
4227
+ percent:,
4228
+ # Maximum amount to charge. If unset, the fee has no upper bound.
4229
+ maximum_amount: nil,
4230
+ # Minimum amount to charge. If unset, the fee is bounded below by 0.
4231
+ minimum_amount: nil,
4232
+ # If true, the minimum_amount is prorated based on the service period. The
4233
+ # maximum_amount is an absolute cap (never prorated), and the percent applied to
4234
+ # upstream subtotals is never prorated either.
4235
+ prorated: nil
2325
4236
  )
2326
4237
  end
2327
4238
 
2328
- sig { override.returns({ percent: Float }) }
4239
+ sig do
4240
+ override.returns(
4241
+ {
4242
+ percent: Float,
4243
+ maximum_amount: T.nilable(String),
4244
+ minimum_amount: T.nilable(String),
4245
+ prorated: T::Boolean
4246
+ }
4247
+ )
4248
+ end
2329
4249
  def to_hash
2330
4250
  end
2331
4251
  end
@@ -2736,7 +4656,8 @@ module Orb
2736
4656
  Orb::NewUsageDiscount,
2737
4657
  Orb::NewAmountDiscount,
2738
4658
  Orb::NewMinimum,
2739
- Orb::NewMaximum
4659
+ Orb::NewMaximum,
4660
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount
2740
4661
  )
2741
4662
  )
2742
4663
  end
@@ -2754,7 +4675,8 @@ module Orb
2754
4675
  Orb::NewUsageDiscount::OrHash,
2755
4676
  Orb::NewAmountDiscount::OrHash,
2756
4677
  Orb::NewMinimum::OrHash,
2757
- Orb::NewMaximum::OrHash
4678
+ Orb::NewMaximum::OrHash,
4679
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::OrHash
2758
4680
  ),
2759
4681
  plan_phase_order: T.nilable(Integer)
2760
4682
  ).returns(T.attached_class)
@@ -2776,7 +4698,8 @@ module Orb
2776
4698
  Orb::NewUsageDiscount,
2777
4699
  Orb::NewAmountDiscount,
2778
4700
  Orb::NewMinimum,
2779
- Orb::NewMaximum
4701
+ Orb::NewMaximum,
4702
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount
2780
4703
  ),
2781
4704
  plan_phase_order: T.nilable(Integer)
2782
4705
  }
@@ -2796,10 +4719,444 @@ module Orb
2796
4719
  Orb::NewUsageDiscount,
2797
4720
  Orb::NewAmountDiscount,
2798
4721
  Orb::NewMinimum,
2799
- Orb::NewMaximum
4722
+ Orb::NewMaximum,
4723
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount
4724
+ )
4725
+ end
4726
+
4727
+ class TieredPercentageDiscount < Orb::Internal::Type::BaseModel
4728
+ OrHash =
4729
+ T.type_alias do
4730
+ T.any(
4731
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount,
4732
+ Orb::Internal::AnyHash
4733
+ )
4734
+ end
4735
+
4736
+ sig { returns(Symbol) }
4737
+ attr_accessor :adjustment_type
4738
+
4739
+ sig do
4740
+ returns(
4741
+ T::Array[
4742
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Tier
4743
+ ]
4744
+ )
4745
+ end
4746
+ attr_accessor :tiers
4747
+
4748
+ # If set, the adjustment will apply to every price on the subscription.
4749
+ sig do
4750
+ returns(
4751
+ T.nilable(
4752
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::AppliesToAll::OrBoolean
4753
+ )
4754
+ )
4755
+ end
4756
+ attr_accessor :applies_to_all
4757
+
4758
+ # The set of item IDs to which this adjustment applies.
4759
+ sig { returns(T.nilable(T::Array[String])) }
4760
+ attr_accessor :applies_to_item_ids
4761
+
4762
+ # The set of price IDs to which this adjustment applies.
4763
+ sig { returns(T.nilable(T::Array[String])) }
4764
+ attr_accessor :applies_to_price_ids
4765
+
4766
+ # If set, only prices in the specified currency will have the adjustment applied.
4767
+ sig { returns(T.nilable(String)) }
4768
+ attr_accessor :currency
4769
+
4770
+ # A list of filters that determine which prices this adjustment will apply to.
4771
+ sig do
4772
+ returns(
4773
+ T.nilable(
4774
+ T::Array[
4775
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter
4776
+ ]
4777
+ )
4778
+ )
4779
+ end
4780
+ attr_accessor :filters
4781
+
4782
+ # When false, this adjustment will be applied to a single price. Otherwise, it
4783
+ # will be applied at the invoice level, possibly to multiple prices.
4784
+ sig { returns(T.nilable(T::Boolean)) }
4785
+ attr_reader :is_invoice_level
4786
+
4787
+ sig { params(is_invoice_level: T::Boolean).void }
4788
+ attr_writer :is_invoice_level
4789
+
4790
+ # If set, only prices of the specified type will have the adjustment applied.
4791
+ sig do
4792
+ returns(
4793
+ T.nilable(
4794
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::PriceType::OrSymbol
4795
+ )
4796
+ )
4797
+ end
4798
+ attr_accessor :price_type
4799
+
4800
+ sig do
4801
+ params(
4802
+ tiers:
4803
+ T::Array[
4804
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Tier::OrHash
4805
+ ],
4806
+ applies_to_all:
4807
+ T.nilable(
4808
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::AppliesToAll::OrBoolean
4809
+ ),
4810
+ applies_to_item_ids: T.nilable(T::Array[String]),
4811
+ applies_to_price_ids: T.nilable(T::Array[String]),
4812
+ currency: T.nilable(String),
4813
+ filters:
4814
+ T.nilable(
4815
+ T::Array[
4816
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::OrHash
4817
+ ]
4818
+ ),
4819
+ is_invoice_level: T::Boolean,
4820
+ price_type:
4821
+ T.nilable(
4822
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::PriceType::OrSymbol
4823
+ ),
4824
+ adjustment_type: Symbol
4825
+ ).returns(T.attached_class)
4826
+ end
4827
+ def self.new(
4828
+ tiers:,
4829
+ # If set, the adjustment will apply to every price on the subscription.
4830
+ applies_to_all: nil,
4831
+ # The set of item IDs to which this adjustment applies.
4832
+ applies_to_item_ids: nil,
4833
+ # The set of price IDs to which this adjustment applies.
4834
+ applies_to_price_ids: nil,
4835
+ # If set, only prices in the specified currency will have the adjustment applied.
4836
+ currency: nil,
4837
+ # A list of filters that determine which prices this adjustment will apply to.
4838
+ filters: nil,
4839
+ # When false, this adjustment will be applied to a single price. Otherwise, it
4840
+ # will be applied at the invoice level, possibly to multiple prices.
4841
+ is_invoice_level: nil,
4842
+ # If set, only prices of the specified type will have the adjustment applied.
4843
+ price_type: nil,
4844
+ adjustment_type: :tiered_percentage_discount
4845
+ )
4846
+ end
4847
+
4848
+ sig do
4849
+ override.returns(
4850
+ {
4851
+ adjustment_type: Symbol,
4852
+ tiers:
4853
+ T::Array[
4854
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Tier
4855
+ ],
4856
+ applies_to_all:
4857
+ T.nilable(
4858
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::AppliesToAll::OrBoolean
4859
+ ),
4860
+ applies_to_item_ids: T.nilable(T::Array[String]),
4861
+ applies_to_price_ids: T.nilable(T::Array[String]),
4862
+ currency: T.nilable(String),
4863
+ filters:
4864
+ T.nilable(
4865
+ T::Array[
4866
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter
4867
+ ]
4868
+ ),
4869
+ is_invoice_level: T::Boolean,
4870
+ price_type:
4871
+ T.nilable(
4872
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::PriceType::OrSymbol
4873
+ )
4874
+ }
4875
+ )
4876
+ end
4877
+ def to_hash
4878
+ end
4879
+
4880
+ class Tier < Orb::Internal::Type::BaseModel
4881
+ OrHash =
4882
+ T.type_alias do
4883
+ T.any(
4884
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Tier,
4885
+ Orb::Internal::AnyHash
4886
+ )
4887
+ end
4888
+
4889
+ # Exclusive lower bound of cumulative spend for this tier.
4890
+ sig { returns(Float) }
4891
+ attr_accessor :lower_bound
4892
+
4893
+ # The percentage (0-1) discounted from spend in this tier.
4894
+ sig { returns(Float) }
4895
+ attr_accessor :percentage
4896
+
4897
+ # Inclusive upper bound of cumulative spend; null for the final open-ended tier.
4898
+ sig { returns(T.nilable(Float)) }
4899
+ attr_accessor :upper_bound
4900
+
4901
+ sig do
4902
+ params(
4903
+ lower_bound: Float,
4904
+ percentage: Float,
4905
+ upper_bound: T.nilable(Float)
4906
+ ).returns(T.attached_class)
4907
+ end
4908
+ def self.new(
4909
+ # Exclusive lower bound of cumulative spend for this tier.
4910
+ lower_bound:,
4911
+ # The percentage (0-1) discounted from spend in this tier.
4912
+ percentage:,
4913
+ # Inclusive upper bound of cumulative spend; null for the final open-ended tier.
4914
+ upper_bound: nil
4915
+ )
4916
+ end
4917
+
4918
+ sig do
4919
+ override.returns(
4920
+ {
4921
+ lower_bound: Float,
4922
+ percentage: Float,
4923
+ upper_bound: T.nilable(Float)
4924
+ }
4925
+ )
4926
+ end
4927
+ def to_hash
4928
+ end
4929
+ end
4930
+
4931
+ # If set, the adjustment will apply to every price on the subscription.
4932
+ module AppliesToAll
4933
+ extend Orb::Internal::Type::Enum
4934
+
4935
+ TaggedBoolean =
4936
+ T.type_alias do
4937
+ T.all(
4938
+ T::Boolean,
4939
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::AppliesToAll
4940
+ )
4941
+ end
4942
+ OrBoolean = T.type_alias { T::Boolean }
4943
+
4944
+ TRUE =
4945
+ T.let(
4946
+ true,
4947
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::AppliesToAll::TaggedBoolean
4948
+ )
4949
+
4950
+ sig do
4951
+ override.returns(
4952
+ T::Array[
4953
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::AppliesToAll::TaggedBoolean
4954
+ ]
4955
+ )
4956
+ end
4957
+ def self.values
4958
+ end
4959
+ end
4960
+
4961
+ class Filter < Orb::Internal::Type::BaseModel
4962
+ OrHash =
4963
+ T.type_alias do
4964
+ T.any(
4965
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter,
4966
+ Orb::Internal::AnyHash
4967
+ )
4968
+ end
4969
+
4970
+ # The property of the price to filter on.
4971
+ sig do
4972
+ returns(
4973
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Field::OrSymbol
4974
+ )
4975
+ end
4976
+ attr_accessor :field
4977
+
4978
+ # Should prices that match the filter be included or excluded.
4979
+ sig do
4980
+ returns(
4981
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Operator::OrSymbol
4982
+ )
4983
+ end
4984
+ attr_accessor :operator
4985
+
4986
+ # The IDs or values that match this filter.
4987
+ sig { returns(T::Array[String]) }
4988
+ attr_accessor :values
4989
+
4990
+ sig do
4991
+ params(
4992
+ field:
4993
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Field::OrSymbol,
4994
+ operator:
4995
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Operator::OrSymbol,
4996
+ values: T::Array[String]
4997
+ ).returns(T.attached_class)
4998
+ end
4999
+ def self.new(
5000
+ # The property of the price to filter on.
5001
+ field:,
5002
+ # Should prices that match the filter be included or excluded.
5003
+ operator:,
5004
+ # The IDs or values that match this filter.
5005
+ values:
2800
5006
  )
5007
+ end
5008
+
5009
+ sig do
5010
+ override.returns(
5011
+ {
5012
+ field:
5013
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Field::OrSymbol,
5014
+ operator:
5015
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Operator::OrSymbol,
5016
+ values: T::Array[String]
5017
+ }
5018
+ )
5019
+ end
5020
+ def to_hash
5021
+ end
5022
+
5023
+ # The property of the price to filter on.
5024
+ module Field
5025
+ extend Orb::Internal::Type::Enum
5026
+
5027
+ TaggedSymbol =
5028
+ T.type_alias do
5029
+ T.all(
5030
+ Symbol,
5031
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Field
5032
+ )
5033
+ end
5034
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
5035
+
5036
+ PRICE_ID =
5037
+ T.let(
5038
+ :price_id,
5039
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol
5040
+ )
5041
+ ITEM_ID =
5042
+ T.let(
5043
+ :item_id,
5044
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol
5045
+ )
5046
+ PRICE_TYPE =
5047
+ T.let(
5048
+ :price_type,
5049
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol
5050
+ )
5051
+ CURRENCY =
5052
+ T.let(
5053
+ :currency,
5054
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol
5055
+ )
5056
+ PRICING_UNIT_ID =
5057
+ T.let(
5058
+ :pricing_unit_id,
5059
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol
5060
+ )
5061
+
5062
+ sig do
5063
+ override.returns(
5064
+ T::Array[
5065
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol
5066
+ ]
5067
+ )
5068
+ end
5069
+ def self.values
5070
+ end
5071
+ end
5072
+
5073
+ # Should prices that match the filter be included or excluded.
5074
+ module Operator
5075
+ extend Orb::Internal::Type::Enum
5076
+
5077
+ TaggedSymbol =
5078
+ T.type_alias do
5079
+ T.all(
5080
+ Symbol,
5081
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Operator
5082
+ )
5083
+ end
5084
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
5085
+
5086
+ INCLUDES =
5087
+ T.let(
5088
+ :includes,
5089
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Operator::TaggedSymbol
5090
+ )
5091
+ EXCLUDES =
5092
+ T.let(
5093
+ :excludes,
5094
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Operator::TaggedSymbol
5095
+ )
5096
+
5097
+ sig do
5098
+ override.returns(
5099
+ T::Array[
5100
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::Filter::Operator::TaggedSymbol
5101
+ ]
5102
+ )
5103
+ end
5104
+ def self.values
5105
+ end
5106
+ end
2801
5107
  end
2802
5108
 
5109
+ # If set, only prices of the specified type will have the adjustment applied.
5110
+ module PriceType
5111
+ extend Orb::Internal::Type::Enum
5112
+
5113
+ TaggedSymbol =
5114
+ T.type_alias do
5115
+ T.all(
5116
+ Symbol,
5117
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::PriceType
5118
+ )
5119
+ end
5120
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
5121
+
5122
+ USAGE =
5123
+ T.let(
5124
+ :usage,
5125
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::PriceType::TaggedSymbol
5126
+ )
5127
+ FIXED_IN_ADVANCE =
5128
+ T.let(
5129
+ :fixed_in_advance,
5130
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::PriceType::TaggedSymbol
5131
+ )
5132
+ FIXED_IN_ARREARS =
5133
+ T.let(
5134
+ :fixed_in_arrears,
5135
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::PriceType::TaggedSymbol
5136
+ )
5137
+ FIXED =
5138
+ T.let(
5139
+ :fixed,
5140
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::PriceType::TaggedSymbol
5141
+ )
5142
+ IN_ARREARS =
5143
+ T.let(
5144
+ :in_arrears,
5145
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::PriceType::TaggedSymbol
5146
+ )
5147
+
5148
+ sig do
5149
+ override.returns(
5150
+ T::Array[
5151
+ Orb::PlanCreateParams::Adjustment::Adjustment::TieredPercentageDiscount::PriceType::TaggedSymbol
5152
+ ]
5153
+ )
5154
+ end
5155
+ def self.values
5156
+ end
5157
+ end
5158
+ end
5159
+
2803
5160
  sig do
2804
5161
  override.returns(
2805
5162
  T::Array[Orb::PlanCreateParams::Adjustment::Adjustment::Variants]