orb-billing 1.13.0 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (624) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +55 -0
  3. data/README.md +1 -1
  4. data/lib/orb/client.rb +21 -0
  5. data/lib/orb/internal/transport/base_client.rb +5 -0
  6. data/lib/orb/internal/type/union.rb +13 -27
  7. data/lib/orb/internal/util.rb +22 -7
  8. data/lib/orb/models/accounting_provider_config.rb +14 -3
  9. data/lib/orb/models/adjustment_interval.rb +185 -3
  10. data/lib/orb/models/alert.rb +114 -1
  11. data/lib/orb/models/alert_create_for_customer_params.rb +8 -1
  12. data/lib/orb/models/alert_create_for_external_customer_params.rb +8 -1
  13. data/lib/orb/models/alert_create_for_subscription_params.rb +142 -1
  14. data/lib/orb/models/alert_disable_params.rb +8 -1
  15. data/lib/orb/models/alert_enable_params.rb +8 -1
  16. data/lib/orb/models/alert_retrieve_params.rb +7 -1
  17. data/lib/orb/models/alert_update_params.rb +120 -1
  18. data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +3296 -631
  19. data/lib/orb/models/beta/external_plan_id_fetch_plan_version_params.rb +7 -1
  20. data/lib/orb/models/beta/external_plan_id_set_default_plan_version_params.rb +8 -1
  21. data/lib/orb/models/beta_create_plan_version_params.rb +3263 -622
  22. data/lib/orb/models/beta_fetch_plan_version_params.rb +7 -1
  23. data/lib/orb/models/beta_set_default_plan_version_params.rb +8 -1
  24. data/lib/orb/models/changed_subscription_resources.rb +200 -10
  25. data/lib/orb/models/conversion_rate_config.rb +18 -0
  26. data/lib/orb/models/coupon_archive_params.rb +7 -1
  27. data/lib/orb/models/coupon_fetch_params.rb +7 -1
  28. data/lib/orb/models/coupons/subscription_list_params.rb +8 -1
  29. data/lib/orb/models/credit_block_delete_params.rb +7 -1
  30. data/lib/orb/models/credit_block_list_invoices_params.rb +7 -1
  31. data/lib/orb/models/credit_block_list_invoices_response.rb +155 -1
  32. data/lib/orb/models/credit_block_retrieve_params.rb +7 -1
  33. data/lib/orb/models/credit_block_retrieve_response.rb +150 -1
  34. data/lib/orb/models/credit_note_fetch_params.rb +7 -1
  35. data/lib/orb/models/customer.rb +122 -3
  36. data/lib/orb/models/customer_create_params.rb +17 -1
  37. data/lib/orb/models/customer_delete_params.rb +7 -1
  38. data/lib/orb/models/customer_fetch_by_external_id_params.rb +7 -1
  39. data/lib/orb/models/customer_fetch_params.rb +7 -1
  40. data/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rb +7 -1
  41. data/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rb +7 -1
  42. data/lib/orb/models/customer_tax_id.rb +15 -1
  43. data/lib/orb/models/customer_update_by_external_id_params.rb +39 -5
  44. data/lib/orb/models/customer_update_params.rb +39 -5
  45. data/lib/orb/models/customers/balance_transaction_create_params.rb +8 -1
  46. data/lib/orb/models/customers/balance_transaction_list_params.rb +8 -1
  47. data/lib/orb/models/customers/cost_list_by_external_id_params.rb +8 -1
  48. data/lib/orb/models/customers/cost_list_params.rb +8 -1
  49. data/lib/orb/models/customers/credit_list_by_external_id_params.rb +8 -1
  50. data/lib/orb/models/customers/credit_list_by_external_id_response.rb +155 -1
  51. data/lib/orb/models/customers/credit_list_params.rb +8 -1
  52. data/lib/orb/models/customers/credit_list_response.rb +152 -1
  53. data/lib/orb/models/customers/credits/decrement_ledger_entry.rb +5 -1
  54. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +582 -315
  55. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +580 -313
  56. data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +8 -1
  57. data/lib/orb/models/customers/credits/ledger_list_params.rb +8 -1
  58. data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +8 -1
  59. data/lib/orb/models/customers/credits/top_up_create_params.rb +8 -1
  60. data/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rb +7 -1
  61. data/lib/orb/models/customers/credits/top_up_delete_params.rb +7 -1
  62. data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +8 -1
  63. data/lib/orb/models/customers/credits/top_up_list_params.rb +8 -1
  64. data/lib/orb/models/dimensional_price_group.rb +1 -1
  65. data/lib/orb/models/dimensional_price_group_retrieve_params.rb +7 -1
  66. data/lib/orb/models/dimensional_price_group_update_params.rb +8 -1
  67. data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rb +7 -1
  68. data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rb +8 -1
  69. data/lib/orb/models/discount.rb +145 -1
  70. data/lib/orb/models/event_deprecate_params.rb +7 -1
  71. data/lib/orb/models/event_ingest_params.rb +5 -2
  72. data/lib/orb/models/event_update_params.rb +8 -1
  73. data/lib/orb/models/events/backfill_close_params.rb +7 -1
  74. data/lib/orb/models/events/backfill_fetch_params.rb +7 -1
  75. data/lib/orb/models/events/backfill_revert_params.rb +7 -1
  76. data/lib/orb/models/invoice.rb +198 -10
  77. data/lib/orb/models/invoice_create_params.rb +6 -5
  78. data/lib/orb/models/invoice_delete_line_item_params.rb +7 -1
  79. data/lib/orb/models/invoice_fetch_params.rb +7 -1
  80. data/lib/orb/models/invoice_fetch_upcoming_response.rb +200 -10
  81. data/lib/orb/models/invoice_issue_params.rb +8 -1
  82. data/lib/orb/models/invoice_issue_summary_params.rb +8 -1
  83. data/lib/orb/models/invoice_issue_summary_response.rb +9 -3
  84. data/lib/orb/models/invoice_level_discount.rb +145 -1
  85. data/lib/orb/models/invoice_line_item_create_response.rb +189 -5
  86. data/lib/orb/models/invoice_list_summary_response.rb +9 -3
  87. data/lib/orb/models/invoice_mark_paid_params.rb +8 -1
  88. data/lib/orb/models/invoice_pay_params.rb +16 -1
  89. data/lib/orb/models/invoice_update_params.rb +8 -1
  90. data/lib/orb/models/invoice_void_params.rb +7 -1
  91. data/lib/orb/models/item_archive_params.rb +7 -1
  92. data/lib/orb/models/item_fetch_params.rb +7 -1
  93. data/lib/orb/models/item_update_params.rb +8 -1
  94. data/lib/orb/models/license_deactivate_params.rb +8 -1
  95. data/lib/orb/models/license_retrieve_by_external_id_params.rb +8 -1
  96. data/lib/orb/models/license_retrieve_params.rb +7 -1
  97. data/lib/orb/models/license_type_retrieve_params.rb +7 -1
  98. data/lib/orb/models/licenses/external_license_get_usage_params.rb +11 -4
  99. data/lib/orb/models/licenses/usage_get_all_usage_params.rb +3 -3
  100. data/lib/orb/models/licenses/usage_get_usage_params.rb +11 -4
  101. data/lib/orb/models/metric_fetch_params.rb +7 -1
  102. data/lib/orb/models/metric_update_params.rb +8 -1
  103. data/lib/orb/models/mutated_subscription.rb +169 -4
  104. data/lib/orb/models/new_allocation_price.rb +11 -1
  105. data/lib/orb/models/new_floating_bulk_price.rb +1 -3
  106. data/lib/orb/models/new_floating_bulk_with_proration_price.rb +1 -3
  107. data/lib/orb/models/new_floating_cumulative_grouped_bulk_price.rb +1 -3
  108. data/lib/orb/models/new_floating_grouped_allocation_price.rb +1 -3
  109. data/lib/orb/models/new_floating_grouped_tiered_package_price.rb +1 -3
  110. data/lib/orb/models/new_floating_grouped_tiered_price.rb +1 -3
  111. data/lib/orb/models/new_floating_grouped_with_metered_minimum_price.rb +1 -3
  112. data/lib/orb/models/new_floating_grouped_with_prorated_minimum_price.rb +1 -3
  113. data/lib/orb/models/new_floating_matrix_price.rb +1 -3
  114. data/lib/orb/models/new_floating_matrix_with_allocation_price.rb +1 -3
  115. data/lib/orb/models/new_floating_matrix_with_display_name_price.rb +1 -3
  116. data/lib/orb/models/new_floating_max_group_tiered_package_price.rb +1 -3
  117. data/lib/orb/models/new_floating_minimum_composite_price.rb +1 -3
  118. data/lib/orb/models/new_floating_package_price.rb +1 -3
  119. data/lib/orb/models/new_floating_package_with_allocation_price.rb +1 -3
  120. data/lib/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  121. data/lib/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rb +1 -3
  122. data/lib/orb/models/new_floating_threshold_total_amount_price.rb +1 -3
  123. data/lib/orb/models/new_floating_tiered_package_price.rb +1 -3
  124. data/lib/orb/models/new_floating_tiered_package_with_minimum_price.rb +1 -3
  125. data/lib/orb/models/new_floating_tiered_price.rb +1 -3
  126. data/lib/orb/models/new_floating_tiered_with_minimum_price.rb +1 -3
  127. data/lib/orb/models/new_floating_tiered_with_proration_price.rb +1 -3
  128. data/lib/orb/models/new_floating_unit_price.rb +1 -3
  129. data/lib/orb/models/new_floating_unit_with_percent_price.rb +1 -3
  130. data/lib/orb/models/new_floating_unit_with_proration_price.rb +1 -3
  131. data/lib/orb/models/new_plan_bulk_price.rb +1 -1
  132. data/lib/orb/models/new_plan_bulk_with_proration_price.rb +1 -3
  133. data/lib/orb/models/new_plan_cumulative_grouped_bulk_price.rb +1 -3
  134. data/lib/orb/models/new_plan_grouped_allocation_price.rb +1 -3
  135. data/lib/orb/models/new_plan_grouped_tiered_package_price.rb +1 -3
  136. data/lib/orb/models/new_plan_grouped_tiered_price.rb +1 -3
  137. data/lib/orb/models/new_plan_grouped_with_metered_minimum_price.rb +1 -3
  138. data/lib/orb/models/new_plan_grouped_with_prorated_minimum_price.rb +1 -3
  139. data/lib/orb/models/new_plan_matrix_price.rb +1 -5
  140. data/lib/orb/models/new_plan_matrix_with_allocation_price.rb +1 -3
  141. data/lib/orb/models/new_plan_matrix_with_display_name_price.rb +1 -3
  142. data/lib/orb/models/new_plan_max_group_tiered_package_price.rb +1 -3
  143. data/lib/orb/models/new_plan_minimum_composite_price.rb +1 -3
  144. data/lib/orb/models/new_plan_package_price.rb +1 -5
  145. data/lib/orb/models/new_plan_package_with_allocation_price.rb +1 -3
  146. data/lib/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  147. data/lib/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rb +1 -3
  148. data/lib/orb/models/new_plan_threshold_total_amount_price.rb +1 -3
  149. data/lib/orb/models/new_plan_tiered_package_price.rb +1 -3
  150. data/lib/orb/models/new_plan_tiered_package_with_minimum_price.rb +1 -3
  151. data/lib/orb/models/new_plan_tiered_price.rb +1 -5
  152. data/lib/orb/models/new_plan_tiered_with_minimum_price.rb +1 -3
  153. data/lib/orb/models/new_plan_unit_price.rb +1 -1
  154. data/lib/orb/models/new_plan_unit_with_percent_price.rb +1 -3
  155. data/lib/orb/models/new_plan_unit_with_proration_price.rb +1 -3
  156. data/lib/orb/models/new_subscription_bulk_price.rb +1 -3
  157. data/lib/orb/models/new_subscription_bulk_with_proration_price.rb +1 -3
  158. data/lib/orb/models/new_subscription_cumulative_grouped_bulk_price.rb +1 -3
  159. data/lib/orb/models/new_subscription_grouped_allocation_price.rb +1 -3
  160. data/lib/orb/models/new_subscription_grouped_tiered_package_price.rb +1 -3
  161. data/lib/orb/models/new_subscription_grouped_tiered_price.rb +1 -3
  162. data/lib/orb/models/new_subscription_grouped_with_metered_minimum_price.rb +1 -3
  163. data/lib/orb/models/new_subscription_grouped_with_prorated_minimum_price.rb +1 -3
  164. data/lib/orb/models/new_subscription_matrix_price.rb +1 -3
  165. data/lib/orb/models/new_subscription_matrix_with_allocation_price.rb +1 -3
  166. data/lib/orb/models/new_subscription_matrix_with_display_name_price.rb +1 -3
  167. data/lib/orb/models/new_subscription_max_group_tiered_package_price.rb +1 -3
  168. data/lib/orb/models/new_subscription_minimum_composite_price.rb +1 -3
  169. data/lib/orb/models/new_subscription_package_price.rb +1 -3
  170. data/lib/orb/models/new_subscription_package_with_allocation_price.rb +1 -3
  171. data/lib/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  172. data/lib/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rb +1 -3
  173. data/lib/orb/models/new_subscription_threshold_total_amount_price.rb +1 -3
  174. data/lib/orb/models/new_subscription_tiered_package_price.rb +1 -3
  175. data/lib/orb/models/new_subscription_tiered_package_with_minimum_price.rb +1 -3
  176. data/lib/orb/models/new_subscription_tiered_price.rb +1 -3
  177. data/lib/orb/models/new_subscription_tiered_with_minimum_price.rb +1 -3
  178. data/lib/orb/models/new_subscription_unit_price.rb +1 -3
  179. data/lib/orb/models/new_subscription_unit_with_percent_price.rb +1 -3
  180. data/lib/orb/models/new_subscription_unit_with_proration_price.rb +1 -3
  181. data/lib/orb/models/per_price_cost.rb +2 -2
  182. data/lib/orb/models/plan.rb +189 -9
  183. data/lib/orb/models/plan_create_params.rb +1478 -158
  184. data/lib/orb/models/plan_fetch_params.rb +7 -1
  185. data/lib/orb/models/plan_update_params.rb +16 -1
  186. data/lib/orb/models/plan_version.rb +186 -5
  187. data/lib/orb/models/plans/external_plan_id_fetch_params.rb +7 -1
  188. data/lib/orb/models/plans/external_plan_id_update_params.rb +16 -1
  189. data/lib/orb/models/plans/migration_cancel_params.rb +7 -1
  190. data/lib/orb/models/plans/migration_cancel_response.rb +22 -4
  191. data/lib/orb/models/plans/migration_list_params.rb +8 -1
  192. data/lib/orb/models/plans/migration_list_response.rb +22 -4
  193. data/lib/orb/models/plans/migration_retrieve_params.rb +7 -1
  194. data/lib/orb/models/plans/migration_retrieve_response.rb +22 -4
  195. data/lib/orb/models/price.rb +2807 -1244
  196. data/lib/orb/models/price_create_params.rb +1800 -1355
  197. data/lib/orb/models/price_evaluate_multiple_params.rb +889 -54
  198. data/lib/orb/models/price_evaluate_params.rb +8 -1
  199. data/lib/orb/models/price_evaluate_preview_events_params.rb +881 -46
  200. data/lib/orb/models/price_fetch_params.rb +7 -1
  201. data/lib/orb/models/price_interval.rb +2 -2
  202. data/lib/orb/models/price_update_params.rb +8 -1
  203. data/lib/orb/models/prices/external_price_id_fetch_params.rb +7 -1
  204. data/lib/orb/models/prices/external_price_id_update_params.rb +8 -1
  205. data/lib/orb/models/subscription.rb +168 -4
  206. data/lib/orb/models/subscription_cancel_params.rb +8 -1
  207. data/lib/orb/models/subscription_change_apply_params.rb +8 -1
  208. data/lib/orb/models/subscription_change_cancel_params.rb +7 -1
  209. data/lib/orb/models/subscription_change_retrieve_params.rb +7 -1
  210. data/lib/orb/models/subscription_create_params.rb +2818 -674
  211. data/lib/orb/models/subscription_fetch_costs_params.rb +8 -1
  212. data/lib/orb/models/subscription_fetch_params.rb +7 -1
  213. data/lib/orb/models/subscription_fetch_schedule_params.rb +8 -1
  214. data/lib/orb/models/subscription_fetch_usage_params.rb +8 -1
  215. data/lib/orb/models/subscription_price_intervals_params.rb +1103 -55
  216. data/lib/orb/models/subscription_redeem_coupon_params.rb +8 -1
  217. data/lib/orb/models/subscription_schedule_plan_change_params.rb +2839 -685
  218. data/lib/orb/models/subscription_trigger_phase_params.rb +8 -1
  219. data/lib/orb/models/subscription_unschedule_cancellation_params.rb +7 -1
  220. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rb +8 -1
  221. data/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb +7 -1
  222. data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +8 -1
  223. data/lib/orb/models/subscription_update_params.rb +19 -1
  224. data/lib/orb/models/subscription_update_trial_params.rb +8 -1
  225. data/lib/orb/models.rb +2 -0
  226. data/lib/orb/resources/alerts.rb +20 -2
  227. data/lib/orb/resources/coupons.rb +1 -2
  228. data/lib/orb/resources/credit_blocks.rb +11 -8
  229. data/lib/orb/resources/customers/credits/ledger.rb +40 -81
  230. data/lib/orb/resources/customers.rb +12 -7
  231. data/lib/orb/resources/events/backfills.rb +3 -4
  232. data/lib/orb/resources/events.rb +7 -34
  233. data/lib/orb/resources/invoices.rb +18 -7
  234. data/lib/orb/resources/licenses/external_licenses.rb +1 -1
  235. data/lib/orb/resources/licenses/usage.rb +2 -2
  236. data/lib/orb/resources/metrics.rb +5 -5
  237. data/lib/orb/resources/plans/external_plan_id.rb +5 -3
  238. data/lib/orb/resources/plans.rb +9 -5
  239. data/lib/orb/resources/prices/external_price_id.rb +2 -2
  240. data/lib/orb/resources/prices.rb +13 -104
  241. data/lib/orb/resources/subscriptions.rb +24 -7
  242. data/lib/orb/version.rb +1 -1
  243. data/lib/orb.rb +1 -0
  244. data/rbi/orb/client.rbi +6 -0
  245. data/rbi/orb/internal/util.rbi +8 -0
  246. data/rbi/orb/models/accounting_provider_config.rbi +38 -5
  247. data/rbi/orb/models/adjustment_interval.rbi +336 -0
  248. data/rbi/orb/models/alert.rbi +182 -3
  249. data/rbi/orb/models/alert_create_for_customer_params.rbi +6 -0
  250. data/rbi/orb/models/alert_create_for_external_customer_params.rbi +6 -0
  251. data/rbi/orb/models/alert_create_for_subscription_params.rbi +285 -0
  252. data/rbi/orb/models/alert_disable_params.rbi +6 -0
  253. data/rbi/orb/models/alert_enable_params.rbi +6 -0
  254. data/rbi/orb/models/alert_retrieve_params.rbi +13 -5
  255. data/rbi/orb/models/alert_update_params.rbi +214 -0
  256. data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +5873 -1161
  257. data/rbi/orb/models/beta/external_plan_id_fetch_plan_version_params.rbi +10 -2
  258. data/rbi/orb/models/beta/external_plan_id_set_default_plan_version_params.rbi +10 -1
  259. data/rbi/orb/models/beta_create_plan_version_params.rbi +5877 -1165
  260. data/rbi/orb/models/beta_fetch_plan_version_params.rbi +10 -2
  261. data/rbi/orb/models/beta_set_default_plan_version_params.rbi +10 -1
  262. data/rbi/orb/models/changed_subscription_resources.rbi +360 -5
  263. data/rbi/orb/models/conversion_rate_config.rbi +18 -0
  264. data/rbi/orb/models/coupon_archive_params.rbi +13 -5
  265. data/rbi/orb/models/coupon_fetch_params.rbi +13 -5
  266. data/rbi/orb/models/coupons/subscription_list_params.rbi +6 -0
  267. data/rbi/orb/models/credit_block_delete_params.rbi +13 -5
  268. data/rbi/orb/models/credit_block_list_invoices_params.rbi +13 -5
  269. data/rbi/orb/models/credit_block_list_invoices_response.rbi +346 -3
  270. data/rbi/orb/models/credit_block_retrieve_params.rbi +13 -5
  271. data/rbi/orb/models/credit_block_retrieve_response.rbi +344 -3
  272. data/rbi/orb/models/credit_note_fetch_params.rbi +13 -5
  273. data/rbi/orb/models/customer.rbi +202 -0
  274. data/rbi/orb/models/customer_create_params.rbi +27 -0
  275. data/rbi/orb/models/customer_delete_params.rbi +13 -5
  276. data/rbi/orb/models/customer_fetch_by_external_id_params.rbi +13 -5
  277. data/rbi/orb/models/customer_fetch_params.rbi +13 -5
  278. data/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +13 -5
  279. data/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +13 -5
  280. data/rbi/orb/models/customer_tax_id.rbi +15 -1
  281. data/rbi/orb/models/customer_update_by_external_id_params.rbi +51 -4
  282. data/rbi/orb/models/customer_update_params.rbi +51 -4
  283. data/rbi/orb/models/customers/balance_transaction_create_params.rbi +6 -0
  284. data/rbi/orb/models/customers/balance_transaction_list_params.rbi +6 -0
  285. data/rbi/orb/models/customers/cost_list_by_external_id_params.rbi +6 -0
  286. data/rbi/orb/models/customers/cost_list_params.rbi +6 -0
  287. data/rbi/orb/models/customers/credit_list_by_external_id_params.rbi +6 -0
  288. data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +346 -3
  289. data/rbi/orb/models/customers/credit_list_params.rbi +6 -0
  290. data/rbi/orb/models/customers/credit_list_response.rbi +347 -3
  291. data/rbi/orb/models/customers/credits/decrement_ledger_entry.rbi +4 -0
  292. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +861 -478
  293. data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +861 -478
  294. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +6 -0
  295. data/rbi/orb/models/customers/credits/ledger_list_params.rbi +6 -0
  296. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +6 -0
  297. data/rbi/orb/models/customers/credits/top_up_create_params.rbi +6 -0
  298. data/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +6 -1
  299. data/rbi/orb/models/customers/credits/top_up_delete_params.rbi +10 -2
  300. data/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +6 -0
  301. data/rbi/orb/models/customers/credits/top_up_list_params.rbi +6 -0
  302. data/rbi/orb/models/dimensional_price_group.rbi +1 -1
  303. data/rbi/orb/models/dimensional_price_group_retrieve_params.rbi +16 -5
  304. data/rbi/orb/models/dimensional_price_group_update_params.rbi +6 -0
  305. data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +16 -5
  306. data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbi +6 -0
  307. data/rbi/orb/models/discount.rbi +269 -1
  308. data/rbi/orb/models/event_deprecate_params.rbi +13 -5
  309. data/rbi/orb/models/event_ingest_params.rbi +4 -2
  310. data/rbi/orb/models/event_update_params.rbi +6 -0
  311. data/rbi/orb/models/events/backfill_close_params.rbi +13 -5
  312. data/rbi/orb/models/events/backfill_fetch_params.rbi +13 -5
  313. data/rbi/orb/models/events/backfill_revert_params.rbi +13 -5
  314. data/rbi/orb/models/invoice.rbi +360 -5
  315. data/rbi/orb/models/invoice_create_params.rbi +12 -7
  316. data/rbi/orb/models/invoice_delete_line_item_params.rbi +10 -2
  317. data/rbi/orb/models/invoice_fetch_params.rbi +13 -5
  318. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +360 -5
  319. data/rbi/orb/models/invoice_issue_params.rbi +10 -1
  320. data/rbi/orb/models/invoice_issue_summary_params.rbi +10 -1
  321. data/rbi/orb/models/invoice_issue_summary_response.rbi +19 -4
  322. data/rbi/orb/models/invoice_level_discount.rbi +298 -1
  323. data/rbi/orb/models/invoice_line_item_create_response.rbi +339 -0
  324. data/rbi/orb/models/invoice_list_summary_response.rbi +19 -4
  325. data/rbi/orb/models/invoice_mark_paid_params.rbi +6 -0
  326. data/rbi/orb/models/invoice_pay_params.rbi +27 -5
  327. data/rbi/orb/models/invoice_update_params.rbi +6 -0
  328. data/rbi/orb/models/invoice_void_params.rbi +13 -5
  329. data/rbi/orb/models/item_archive_params.rbi +13 -5
  330. data/rbi/orb/models/item_fetch_params.rbi +13 -5
  331. data/rbi/orb/models/item_update_params.rbi +6 -0
  332. data/rbi/orb/models/license_deactivate_params.rbi +10 -1
  333. data/rbi/orb/models/license_retrieve_by_external_id_params.rbi +6 -0
  334. data/rbi/orb/models/license_retrieve_params.rbi +13 -5
  335. data/rbi/orb/models/license_type_retrieve_params.rbi +13 -5
  336. data/rbi/orb/models/licenses/external_license_get_usage_params.rbi +9 -3
  337. data/rbi/orb/models/licenses/usage_get_all_usage_params.rbi +3 -3
  338. data/rbi/orb/models/licenses/usage_get_usage_params.rbi +9 -3
  339. data/rbi/orb/models/metric_fetch_params.rbi +13 -5
  340. data/rbi/orb/models/metric_update_params.rbi +6 -0
  341. data/rbi/orb/models/mutated_subscription.rbi +324 -2
  342. data/rbi/orb/models/new_allocation_price.rbi +12 -0
  343. data/rbi/orb/models/per_price_cost.rbi +3 -0
  344. data/rbi/orb/models/plan.rbi +339 -2
  345. data/rbi/orb/models/plan_create_params.rbi +2566 -209
  346. data/rbi/orb/models/plan_fetch_params.rbi +13 -5
  347. data/rbi/orb/models/plan_update_params.rbi +14 -0
  348. data/rbi/orb/models/plan_version.rbi +339 -0
  349. data/rbi/orb/models/plans/external_plan_id_fetch_params.rbi +13 -5
  350. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +14 -0
  351. data/rbi/orb/models/plans/migration_cancel_params.rbi +10 -2
  352. data/rbi/orb/models/plans/migration_cancel_response.rbi +22 -1
  353. data/rbi/orb/models/plans/migration_list_params.rbi +6 -0
  354. data/rbi/orb/models/plans/migration_list_response.rbi +22 -1
  355. data/rbi/orb/models/plans/migration_retrieve_params.rbi +10 -2
  356. data/rbi/orb/models/plans/migration_retrieve_response.rbi +22 -1
  357. data/rbi/orb/models/price.rbi +4733 -2280
  358. data/rbi/orb/models/price_create_params.rbi +3022 -2408
  359. data/rbi/orb/models/price_evaluate_multiple_params.rbi +1540 -114
  360. data/rbi/orb/models/price_evaluate_params.rbi +6 -0
  361. data/rbi/orb/models/price_evaluate_preview_events_params.rbi +1540 -114
  362. data/rbi/orb/models/price_fetch_params.rbi +13 -5
  363. data/rbi/orb/models/price_interval.rbi +3 -0
  364. data/rbi/orb/models/price_update_params.rbi +6 -0
  365. data/rbi/orb/models/prices/external_price_id_fetch_params.rbi +13 -5
  366. data/rbi/orb/models/prices/external_price_id_update_params.rbi +6 -0
  367. data/rbi/orb/models/subscription.rbi +324 -2
  368. data/rbi/orb/models/subscription_cancel_params.rbi +6 -0
  369. data/rbi/orb/models/subscription_change_apply_params.rbi +6 -0
  370. data/rbi/orb/models/subscription_change_cancel_params.rbi +16 -5
  371. data/rbi/orb/models/subscription_change_retrieve_params.rbi +16 -5
  372. data/rbi/orb/models/subscription_create_params.rbi +4998 -1186
  373. data/rbi/orb/models/subscription_fetch_costs_params.rbi +6 -0
  374. data/rbi/orb/models/subscription_fetch_params.rbi +13 -5
  375. data/rbi/orb/models/subscription_fetch_schedule_params.rbi +6 -0
  376. data/rbi/orb/models/subscription_fetch_usage_params.rbi +6 -0
  377. data/rbi/orb/models/subscription_price_intervals_params.rbi +2133 -264
  378. data/rbi/orb/models/subscription_redeem_coupon_params.rbi +6 -0
  379. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +5001 -1183
  380. data/rbi/orb/models/subscription_trigger_phase_params.rbi +6 -0
  381. data/rbi/orb/models/subscription_unschedule_cancellation_params.rbi +13 -5
  382. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +10 -1
  383. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +13 -5
  384. data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +6 -0
  385. data/rbi/orb/models/subscription_update_params.rbi +20 -0
  386. data/rbi/orb/models/subscription_update_trial_params.rbi +6 -0
  387. data/rbi/orb/models.rbi +2 -0
  388. data/rbi/orb/resources/alerts.rbi +43 -0
  389. data/rbi/orb/resources/coupons.rbi +1 -2
  390. data/rbi/orb/resources/credit_blocks.rbi +10 -7
  391. data/rbi/orb/resources/customers/credits/ledger.rbi +50 -146
  392. data/rbi/orb/resources/customers.rbi +35 -7
  393. data/rbi/orb/resources/events/backfills.rbi +3 -4
  394. data/rbi/orb/resources/events.rbi +8 -35
  395. data/rbi/orb/resources/invoices.rbi +20 -6
  396. data/rbi/orb/resources/licenses/external_licenses.rbi +1 -1
  397. data/rbi/orb/resources/licenses/usage.rbi +2 -2
  398. data/rbi/orb/resources/metrics.rbi +5 -5
  399. data/rbi/orb/resources/plans/external_plan_id.rbi +5 -2
  400. data/rbi/orb/resources/plans.rbi +9 -3
  401. data/rbi/orb/resources/prices.rbi +38 -184
  402. data/rbi/orb/resources/subscriptions.rbi +33 -4
  403. data/sig/orb/client.rbs +3 -0
  404. data/sig/orb/internal/util.rbs +4 -0
  405. data/sig/orb/models/accounting_provider_config.rbs +21 -4
  406. data/sig/orb/models/adjustment_interval.rbs +134 -0
  407. data/sig/orb/models/alert.rbs +90 -3
  408. data/sig/orb/models/alert_create_for_customer_params.rbs +5 -0
  409. data/sig/orb/models/alert_create_for_external_customer_params.rbs +5 -0
  410. data/sig/orb/models/alert_create_for_subscription_params.rbs +98 -1
  411. data/sig/orb/models/alert_disable_params.rbs +6 -1
  412. data/sig/orb/models/alert_enable_params.rbs +6 -1
  413. data/sig/orb/models/alert_retrieve_params.rbs +9 -3
  414. data/sig/orb/models/alert_update_params.rbs +90 -1
  415. data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +2318 -397
  416. data/sig/orb/models/beta/external_plan_id_fetch_plan_version_params.rbs +6 -1
  417. data/sig/orb/models/beta/external_plan_id_set_default_plan_version_params.rbs +6 -1
  418. data/sig/orb/models/beta_create_plan_version_params.rbs +2300 -389
  419. data/sig/orb/models/beta_fetch_plan_version_params.rbs +10 -2
  420. data/sig/orb/models/beta_set_default_plan_version_params.rbs +10 -2
  421. data/sig/orb/models/changed_subscription_resources.rbs +140 -1
  422. data/sig/orb/models/conversion_rate_config.rbs +12 -0
  423. data/sig/orb/models/coupon_archive_params.rbs +12 -3
  424. data/sig/orb/models/coupon_fetch_params.rbs +12 -3
  425. data/sig/orb/models/coupons/subscription_list_params.rbs +5 -1
  426. data/sig/orb/models/credit_block_delete_params.rbs +8 -3
  427. data/sig/orb/models/credit_block_list_invoices_params.rbs +8 -3
  428. data/sig/orb/models/credit_block_list_invoices_response.rbs +124 -3
  429. data/sig/orb/models/credit_block_retrieve_params.rbs +8 -3
  430. data/sig/orb/models/credit_block_retrieve_response.rbs +124 -3
  431. data/sig/orb/models/credit_note_fetch_params.rbs +11 -3
  432. data/sig/orb/models/customer.rbs +79 -1
  433. data/sig/orb/models/customer_create_params.rbs +12 -1
  434. data/sig/orb/models/customer_delete_params.rbs +12 -3
  435. data/sig/orb/models/customer_fetch_by_external_id_params.rbs +11 -3
  436. data/sig/orb/models/customer_fetch_params.rbs +12 -3
  437. data/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs +11 -3
  438. data/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs +11 -3
  439. data/sig/orb/models/customer_tax_id.rbs +20 -2
  440. data/sig/orb/models/customer_update_by_external_id_params.rbs +22 -1
  441. data/sig/orb/models/customer_update_params.rbs +22 -1
  442. data/sig/orb/models/customers/balance_transaction_create_params.rbs +5 -0
  443. data/sig/orb/models/customers/balance_transaction_list_params.rbs +5 -0
  444. data/sig/orb/models/customers/cost_list_by_external_id_params.rbs +5 -0
  445. data/sig/orb/models/customers/cost_list_params.rbs +5 -0
  446. data/sig/orb/models/customers/credit_list_by_external_id_params.rbs +5 -0
  447. data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +124 -3
  448. data/sig/orb/models/customers/credit_list_params.rbs +5 -0
  449. data/sig/orb/models/customers/credit_list_response.rbs +124 -3
  450. data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +345 -157
  451. data/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +345 -157
  452. data/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs +5 -0
  453. data/sig/orb/models/customers/credits/ledger_list_params.rbs +5 -0
  454. data/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs +5 -0
  455. data/sig/orb/models/customers/credits/top_up_create_params.rbs +5 -0
  456. data/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs +5 -1
  457. data/sig/orb/models/customers/credits/top_up_delete_params.rbs +6 -1
  458. data/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs +5 -1
  459. data/sig/orb/models/customers/credits/top_up_list_params.rbs +5 -1
  460. data/sig/orb/models/dimensional_price_group_retrieve_params.rbs +12 -3
  461. data/sig/orb/models/dimensional_price_group_update_params.rbs +5 -0
  462. data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs +12 -3
  463. data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbs +5 -0
  464. data/sig/orb/models/discount.rbs +114 -0
  465. data/sig/orb/models/event_deprecate_params.rbs +9 -3
  466. data/sig/orb/models/event_update_params.rbs +5 -0
  467. data/sig/orb/models/events/backfill_close_params.rbs +11 -3
  468. data/sig/orb/models/events/backfill_fetch_params.rbs +11 -3
  469. data/sig/orb/models/events/backfill_revert_params.rbs +11 -3
  470. data/sig/orb/models/invoice.rbs +140 -1
  471. data/sig/orb/models/invoice_delete_line_item_params.rbs +6 -1
  472. data/sig/orb/models/invoice_fetch_params.rbs +12 -3
  473. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +140 -1
  474. data/sig/orb/models/invoice_issue_params.rbs +6 -1
  475. data/sig/orb/models/invoice_issue_summary_params.rbs +6 -1
  476. data/sig/orb/models/invoice_issue_summary_response.rbs +2 -1
  477. data/sig/orb/models/invoice_level_discount.rbs +117 -1
  478. data/sig/orb/models/invoice_line_item_create_response.rbs +134 -0
  479. data/sig/orb/models/invoice_list_summary_response.rbs +2 -1
  480. data/sig/orb/models/invoice_mark_paid_params.rbs +10 -1
  481. data/sig/orb/models/invoice_pay_params.rbs +17 -3
  482. data/sig/orb/models/invoice_update_params.rbs +5 -0
  483. data/sig/orb/models/invoice_void_params.rbs +12 -3
  484. data/sig/orb/models/item_archive_params.rbs +9 -3
  485. data/sig/orb/models/item_fetch_params.rbs +9 -3
  486. data/sig/orb/models/item_update_params.rbs +5 -0
  487. data/sig/orb/models/license_deactivate_params.rbs +10 -2
  488. data/sig/orb/models/license_retrieve_by_external_id_params.rbs +9 -1
  489. data/sig/orb/models/license_retrieve_params.rbs +11 -3
  490. data/sig/orb/models/license_type_retrieve_params.rbs +11 -3
  491. data/sig/orb/models/licenses/external_license_get_usage_params.rbs +9 -4
  492. data/sig/orb/models/licenses/usage_get_all_usage_params.rbs +4 -4
  493. data/sig/orb/models/licenses/usage_get_usage_params.rbs +9 -4
  494. data/sig/orb/models/metric_fetch_params.rbs +12 -3
  495. data/sig/orb/models/metric_update_params.rbs +5 -1
  496. data/sig/orb/models/mutated_subscription.rbs +124 -0
  497. data/sig/orb/models/new_allocation_price.rbs +5 -0
  498. data/sig/orb/models/new_floating_bulk_price.rbs +4 -4
  499. data/sig/orb/models/new_floating_bulk_with_proration_price.rbs +4 -4
  500. data/sig/orb/models/new_floating_cumulative_grouped_bulk_price.rbs +4 -4
  501. data/sig/orb/models/new_floating_grouped_allocation_price.rbs +4 -4
  502. data/sig/orb/models/new_floating_grouped_tiered_package_price.rbs +4 -4
  503. data/sig/orb/models/new_floating_grouped_tiered_price.rbs +4 -4
  504. data/sig/orb/models/new_floating_grouped_with_metered_minimum_price.rbs +4 -4
  505. data/sig/orb/models/new_floating_grouped_with_prorated_minimum_price.rbs +4 -4
  506. data/sig/orb/models/new_floating_matrix_price.rbs +4 -4
  507. data/sig/orb/models/new_floating_matrix_with_allocation_price.rbs +4 -4
  508. data/sig/orb/models/new_floating_matrix_with_display_name_price.rbs +4 -4
  509. data/sig/orb/models/new_floating_max_group_tiered_package_price.rbs +4 -4
  510. data/sig/orb/models/new_floating_minimum_composite_price.rbs +4 -4
  511. data/sig/orb/models/new_floating_package_price.rbs +4 -4
  512. data/sig/orb/models/new_floating_package_with_allocation_price.rbs +4 -4
  513. data/sig/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  514. data/sig/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  515. data/sig/orb/models/new_floating_threshold_total_amount_price.rbs +4 -4
  516. data/sig/orb/models/new_floating_tiered_package_price.rbs +4 -4
  517. data/sig/orb/models/new_floating_tiered_package_with_minimum_price.rbs +4 -4
  518. data/sig/orb/models/new_floating_tiered_price.rbs +4 -4
  519. data/sig/orb/models/new_floating_tiered_with_minimum_price.rbs +4 -4
  520. data/sig/orb/models/new_floating_tiered_with_proration_price.rbs +4 -4
  521. data/sig/orb/models/new_floating_unit_price.rbs +4 -4
  522. data/sig/orb/models/new_floating_unit_with_percent_price.rbs +4 -4
  523. data/sig/orb/models/new_floating_unit_with_proration_price.rbs +4 -4
  524. data/sig/orb/models/new_plan_bulk_price.rbs +4 -4
  525. data/sig/orb/models/new_plan_bulk_with_proration_price.rbs +4 -4
  526. data/sig/orb/models/new_plan_cumulative_grouped_bulk_price.rbs +4 -4
  527. data/sig/orb/models/new_plan_grouped_allocation_price.rbs +4 -4
  528. data/sig/orb/models/new_plan_grouped_tiered_package_price.rbs +4 -4
  529. data/sig/orb/models/new_plan_grouped_tiered_price.rbs +4 -4
  530. data/sig/orb/models/new_plan_grouped_with_metered_minimum_price.rbs +4 -4
  531. data/sig/orb/models/new_plan_grouped_with_prorated_minimum_price.rbs +4 -4
  532. data/sig/orb/models/new_plan_matrix_price.rbs +4 -4
  533. data/sig/orb/models/new_plan_matrix_with_allocation_price.rbs +4 -4
  534. data/sig/orb/models/new_plan_matrix_with_display_name_price.rbs +4 -4
  535. data/sig/orb/models/new_plan_max_group_tiered_package_price.rbs +4 -4
  536. data/sig/orb/models/new_plan_minimum_composite_price.rbs +4 -4
  537. data/sig/orb/models/new_plan_package_price.rbs +4 -4
  538. data/sig/orb/models/new_plan_package_with_allocation_price.rbs +4 -4
  539. data/sig/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  540. data/sig/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  541. data/sig/orb/models/new_plan_threshold_total_amount_price.rbs +4 -4
  542. data/sig/orb/models/new_plan_tiered_package_price.rbs +4 -4
  543. data/sig/orb/models/new_plan_tiered_package_with_minimum_price.rbs +4 -4
  544. data/sig/orb/models/new_plan_tiered_price.rbs +4 -4
  545. data/sig/orb/models/new_plan_tiered_with_minimum_price.rbs +4 -4
  546. data/sig/orb/models/new_plan_unit_price.rbs +4 -4
  547. data/sig/orb/models/new_plan_unit_with_percent_price.rbs +4 -4
  548. data/sig/orb/models/new_plan_unit_with_proration_price.rbs +4 -4
  549. data/sig/orb/models/new_subscription_bulk_price.rbs +4 -4
  550. data/sig/orb/models/new_subscription_bulk_with_proration_price.rbs +4 -4
  551. data/sig/orb/models/new_subscription_cumulative_grouped_bulk_price.rbs +4 -4
  552. data/sig/orb/models/new_subscription_grouped_allocation_price.rbs +4 -4
  553. data/sig/orb/models/new_subscription_grouped_tiered_package_price.rbs +4 -4
  554. data/sig/orb/models/new_subscription_grouped_tiered_price.rbs +4 -4
  555. data/sig/orb/models/new_subscription_grouped_with_metered_minimum_price.rbs +4 -4
  556. data/sig/orb/models/new_subscription_grouped_with_prorated_minimum_price.rbs +4 -4
  557. data/sig/orb/models/new_subscription_matrix_price.rbs +4 -4
  558. data/sig/orb/models/new_subscription_matrix_with_allocation_price.rbs +4 -4
  559. data/sig/orb/models/new_subscription_matrix_with_display_name_price.rbs +4 -4
  560. data/sig/orb/models/new_subscription_max_group_tiered_package_price.rbs +4 -4
  561. data/sig/orb/models/new_subscription_minimum_composite_price.rbs +4 -4
  562. data/sig/orb/models/new_subscription_package_price.rbs +4 -4
  563. data/sig/orb/models/new_subscription_package_with_allocation_price.rbs +4 -4
  564. data/sig/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  565. data/sig/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  566. data/sig/orb/models/new_subscription_threshold_total_amount_price.rbs +4 -4
  567. data/sig/orb/models/new_subscription_tiered_package_price.rbs +4 -4
  568. data/sig/orb/models/new_subscription_tiered_package_with_minimum_price.rbs +4 -4
  569. data/sig/orb/models/new_subscription_tiered_price.rbs +4 -4
  570. data/sig/orb/models/new_subscription_tiered_with_minimum_price.rbs +4 -4
  571. data/sig/orb/models/new_subscription_unit_price.rbs +4 -4
  572. data/sig/orb/models/new_subscription_unit_with_percent_price.rbs +4 -4
  573. data/sig/orb/models/new_subscription_unit_with_proration_price.rbs +4 -4
  574. data/sig/orb/models/plan.rbs +134 -0
  575. data/sig/orb/models/plan_create_params.rbs +1030 -72
  576. data/sig/orb/models/plan_fetch_params.rbs +9 -3
  577. data/sig/orb/models/plan_update_params.rbs +14 -1
  578. data/sig/orb/models/plan_version.rbs +134 -0
  579. data/sig/orb/models/plans/external_plan_id_fetch_params.rbs +11 -3
  580. data/sig/orb/models/plans/external_plan_id_update_params.rbs +14 -1
  581. data/sig/orb/models/plans/migration_cancel_params.rbs +6 -1
  582. data/sig/orb/models/plans/migration_list_params.rbs +5 -1
  583. data/sig/orb/models/plans/migration_retrieve_params.rbs +6 -1
  584. data/sig/orb/models/price.rbs +2361 -1156
  585. data/sig/orb/models/price_create_params.rbs +1124 -931
  586. data/sig/orb/models/price_evaluate_multiple_params.rbs +626 -23
  587. data/sig/orb/models/price_evaluate_params.rbs +5 -0
  588. data/sig/orb/models/price_evaluate_preview_events_params.rbs +626 -23
  589. data/sig/orb/models/price_fetch_params.rbs +9 -3
  590. data/sig/orb/models/price_update_params.rbs +5 -1
  591. data/sig/orb/models/prices/external_price_id_fetch_params.rbs +11 -3
  592. data/sig/orb/models/prices/external_price_id_update_params.rbs +5 -1
  593. data/sig/orb/models/subscription.rbs +124 -0
  594. data/sig/orb/models/subscription_cancel_params.rbs +5 -0
  595. data/sig/orb/models/subscription_change_apply_params.rbs +5 -0
  596. data/sig/orb/models/subscription_change_cancel_params.rbs +12 -3
  597. data/sig/orb/models/subscription_change_retrieve_params.rbs +12 -3
  598. data/sig/orb/models/subscription_create_params.rbs +2009 -430
  599. data/sig/orb/models/subscription_fetch_costs_params.rbs +5 -0
  600. data/sig/orb/models/subscription_fetch_params.rbs +11 -3
  601. data/sig/orb/models/subscription_fetch_schedule_params.rbs +5 -0
  602. data/sig/orb/models/subscription_fetch_usage_params.rbs +5 -0
  603. data/sig/orb/models/subscription_price_intervals_params.rbs +800 -23
  604. data/sig/orb/models/subscription_redeem_coupon_params.rbs +5 -0
  605. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +2014 -430
  606. data/sig/orb/models/subscription_trigger_phase_params.rbs +9 -1
  607. data/sig/orb/models/subscription_unschedule_cancellation_params.rbs +11 -3
  608. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs +10 -2
  609. data/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs +11 -3
  610. data/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs +5 -0
  611. data/sig/orb/models/subscription_update_params.rbs +10 -0
  612. data/sig/orb/models/subscription_update_trial_params.rbs +5 -0
  613. data/sig/orb/models.rbs +2 -0
  614. data/sig/orb/resources/alerts.rbs +6 -0
  615. data/sig/orb/resources/customers/credits/ledger.rbs +2 -26
  616. data/sig/orb/resources/customers.rbs +2 -0
  617. data/sig/orb/resources/invoices.rbs +1 -0
  618. data/sig/orb/resources/licenses/external_licenses.rbs +1 -1
  619. data/sig/orb/resources/licenses/usage.rbs +2 -2
  620. data/sig/orb/resources/plans/external_plan_id.rbs +1 -0
  621. data/sig/orb/resources/plans.rbs +2 -0
  622. data/sig/orb/resources/prices.rbs +1 -48
  623. data/sig/orb/resources/subscriptions.rbs +3 -0
  624. metadata +6 -7
@@ -7,1541 +7,1986 @@ module Orb
7
7
  extend Orb::Internal::Type::RequestParameters::Converter
8
8
  include Orb::Internal::Type::RequestParameters
9
9
 
10
- # @!attribute cadence
11
- # The cadence to bill for this price on.
10
+ # @!attribute body
11
+ # New floating price request body params.
12
12
  #
13
- # @return [Symbol, Orb::Models::PriceCreateParams::Cadence]
14
- required :cadence, enum: -> { Orb::PriceCreateParams::Cadence }
13
+ # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::PriceCreateParams::Body::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput]
14
+ required :body, union: -> { Orb::PriceCreateParams::Body }
15
15
 
16
- # @!attribute currency
17
- # An ISO 4217 currency string for which this price is billed in.
16
+ # @!method initialize(body:, request_options: {})
17
+ # @param body [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::PriceCreateParams::Body::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] New floating price request body params.
18
18
  #
19
- # @return [String]
20
- required :currency, String
21
-
22
- # @!attribute item_id
23
- # The id of the item the price will be associated with.
24
- #
25
- # @return [String]
26
- required :item_id, String
27
-
28
- # @!attribute model_type
29
- # The pricing model type
30
- #
31
- # @return [Symbol, Orb::Models::PriceCreateParams::ModelType]
32
- required :model_type, enum: -> { Orb::PriceCreateParams::ModelType }
33
-
34
- # @!attribute name
35
- # The name of the price.
36
- #
37
- # @return [String]
38
- required :name, String
39
-
40
- # @!attribute unit_config
41
- # Configuration for unit pricing
42
- #
43
- # @return [Orb::Models::UnitConfig]
44
- required :unit_config, -> { Orb::UnitConfig }
45
-
46
- # @!attribute billable_metric_id
47
- # The id of the billable metric for the price. Only needed if the price is
48
- # usage-based.
49
- #
50
- # @return [String, nil]
51
- optional :billable_metric_id, String, nil?: true
52
-
53
- # @!attribute billed_in_advance
54
- # If the Price represents a fixed cost, the price will be billed in-advance if
55
- # this is true, and in-arrears if this is false.
56
- #
57
- # @return [Boolean, nil]
58
- optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
59
-
60
- # @!attribute billing_cycle_configuration
61
- # For custom cadence: specifies the duration of the billing period in days or
62
- # months.
63
- #
64
- # @return [Orb::Models::NewBillingCycleConfiguration, nil]
65
- optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
66
-
67
- # @!attribute conversion_rate
68
- # The per unit conversion rate of the price currency to the invoicing currency.
69
- #
70
- # @return [Float, nil]
71
- optional :conversion_rate, Float, nil?: true
72
-
73
- # @!attribute conversion_rate_config
74
- # The configuration for the rate of the price currency to the invoicing currency.
75
- #
76
- # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
77
- optional :conversion_rate_config, union: -> { Orb::PriceCreateParams::ConversionRateConfig }, nil?: true
78
-
79
- # @!attribute dimensional_price_configuration
80
- # For dimensional price: specifies a price group and dimension values
81
- #
82
- # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
83
- optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true
84
-
85
- # @!attribute external_price_id
86
- # An alias for the price.
87
- #
88
- # @return [String, nil]
89
- optional :external_price_id, String, nil?: true
90
-
91
- # @!attribute fixed_price_quantity
92
- # If the Price represents a fixed cost, this represents the quantity of units
93
- # applied.
94
- #
95
- # @return [Float, nil]
96
- optional :fixed_price_quantity, Float, nil?: true
97
-
98
- # @!attribute invoice_grouping_key
99
- # The property used to group this price on an invoice
100
- #
101
- # @return [String, nil]
102
- optional :invoice_grouping_key, String, nil?: true
103
-
104
- # @!attribute invoicing_cycle_configuration
105
- # Within each billing cycle, specifies the cadence at which invoices are produced.
106
- # If unspecified, a single invoice is produced per billing cycle.
107
- #
108
- # @return [Orb::Models::NewBillingCycleConfiguration, nil]
109
- optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
110
-
111
- # @!attribute license_type_id
112
- # The ID of the license type to associate with this price.
113
- #
114
- # @return [String, nil]
115
- optional :license_type_id, String, nil?: true
19
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
116
20
 
117
- # @!attribute metadata
118
- # User-specified key/value pairs for the resource. Individual keys can be removed
119
- # by setting the value to `null`, and the entire metadata mapping can be cleared
120
- # by setting `metadata` to `null`.
121
- #
122
- # @return [Hash{Symbol=>String, nil}, nil]
123
- optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
21
+ # New floating price request body params.
22
+ module Body
23
+ extend Orb::Internal::Type::Union
124
24
 
125
- # @!attribute tiered_config
126
- # Configuration for tiered pricing
127
- #
128
- # @return [Orb::Models::TieredConfig]
129
- required :tiered_config, -> { Orb::TieredConfig }
25
+ discriminator :model_type
130
26
 
131
- # @!attribute bulk_config
132
- # Configuration for bulk pricing
133
- #
134
- # @return [Orb::Models::BulkConfig]
135
- required :bulk_config, -> { Orb::BulkConfig }
27
+ variant :unit, -> { Orb::NewFloatingUnitPrice }
136
28
 
137
- # @!attribute bulk_with_filters_config
138
- # Configuration for bulk_with_filters pricing
139
- #
140
- # @return [Orb::Models::PriceCreateParams::BulkWithFiltersConfig]
141
- required :bulk_with_filters_config, -> { Orb::PriceCreateParams::BulkWithFiltersConfig }
29
+ variant :tiered, -> { Orb::NewFloatingTieredPrice }
142
30
 
143
- # @!attribute package_config
144
- # Configuration for package pricing
145
- #
146
- # @return [Orb::Models::PackageConfig]
147
- required :package_config, -> { Orb::PackageConfig }
31
+ variant :bulk, -> { Orb::NewFloatingBulkPrice }
148
32
 
149
- # @!attribute matrix_config
150
- # Configuration for matrix pricing
151
- #
152
- # @return [Orb::Models::MatrixConfig]
153
- required :matrix_config, -> { Orb::MatrixConfig }
33
+ variant :bulk_with_filters, -> { Orb::PriceCreateParams::Body::BulkWithFilters }
154
34
 
155
- # @!attribute threshold_total_amount_config
156
- # Configuration for threshold_total_amount pricing
157
- #
158
- # @return [Orb::Models::PriceCreateParams::ThresholdTotalAmountConfig]
159
- required :threshold_total_amount_config, -> { Orb::PriceCreateParams::ThresholdTotalAmountConfig }
35
+ variant :package, -> { Orb::NewFloatingPackagePrice }
160
36
 
161
- # @!attribute tiered_package_config
162
- # Configuration for tiered_package pricing
163
- #
164
- # @return [Orb::Models::PriceCreateParams::TieredPackageConfig]
165
- required :tiered_package_config, -> { Orb::PriceCreateParams::TieredPackageConfig }
37
+ variant :matrix, -> { Orb::NewFloatingMatrixPrice }
166
38
 
167
- # @!attribute tiered_with_minimum_config
168
- # Configuration for tiered_with_minimum pricing
169
- #
170
- # @return [Orb::Models::PriceCreateParams::TieredWithMinimumConfig]
171
- required :tiered_with_minimum_config, -> { Orb::PriceCreateParams::TieredWithMinimumConfig }
39
+ variant :threshold_total_amount, -> { Orb::NewFloatingThresholdTotalAmountPrice }
172
40
 
173
- # @!attribute grouped_tiered_config
174
- # Configuration for grouped_tiered pricing
175
- #
176
- # @return [Orb::Models::PriceCreateParams::GroupedTieredConfig]
177
- required :grouped_tiered_config, -> { Orb::PriceCreateParams::GroupedTieredConfig }
41
+ variant :tiered_package, -> { Orb::NewFloatingTieredPackagePrice }
178
42
 
179
- # @!attribute tiered_package_with_minimum_config
180
- # Configuration for tiered_package_with_minimum pricing
181
- #
182
- # @return [Orb::Models::PriceCreateParams::TieredPackageWithMinimumConfig]
183
- required :tiered_package_with_minimum_config,
184
- -> { Orb::PriceCreateParams::TieredPackageWithMinimumConfig }
43
+ variant :tiered_with_minimum, -> { Orb::NewFloatingTieredWithMinimumPrice }
185
44
 
186
- # @!attribute package_with_allocation_config
187
- # Configuration for package_with_allocation pricing
188
- #
189
- # @return [Orb::Models::PriceCreateParams::PackageWithAllocationConfig]
190
- required :package_with_allocation_config, -> { Orb::PriceCreateParams::PackageWithAllocationConfig }
45
+ variant :grouped_tiered, -> { Orb::NewFloatingGroupedTieredPrice }
191
46
 
192
- # @!attribute unit_with_percent_config
193
- # Configuration for unit_with_percent pricing
194
- #
195
- # @return [Orb::Models::PriceCreateParams::UnitWithPercentConfig]
196
- required :unit_with_percent_config, -> { Orb::PriceCreateParams::UnitWithPercentConfig }
47
+ variant :tiered_package_with_minimum, -> { Orb::NewFloatingTieredPackageWithMinimumPrice }
197
48
 
198
- # @!attribute matrix_with_allocation_config
199
- # Configuration for matrix_with_allocation pricing
200
- #
201
- # @return [Orb::Models::MatrixWithAllocationConfig]
202
- required :matrix_with_allocation_config, -> { Orb::MatrixWithAllocationConfig }
49
+ variant :package_with_allocation, -> { Orb::NewFloatingPackageWithAllocationPrice }
203
50
 
204
- # @!attribute tiered_with_proration_config
205
- # Configuration for tiered_with_proration pricing
206
- #
207
- # @return [Orb::Models::PriceCreateParams::TieredWithProrationConfig]
208
- required :tiered_with_proration_config, -> { Orb::PriceCreateParams::TieredWithProrationConfig }
51
+ variant :unit_with_percent, -> { Orb::NewFloatingUnitWithPercentPrice }
209
52
 
210
- # @!attribute unit_with_proration_config
211
- # Configuration for unit_with_proration pricing
212
- #
213
- # @return [Orb::Models::PriceCreateParams::UnitWithProrationConfig]
214
- required :unit_with_proration_config, -> { Orb::PriceCreateParams::UnitWithProrationConfig }
53
+ variant :matrix_with_allocation, -> { Orb::NewFloatingMatrixWithAllocationPrice }
215
54
 
216
- # @!attribute grouped_allocation_config
217
- # Configuration for grouped_allocation pricing
218
- #
219
- # @return [Orb::Models::PriceCreateParams::GroupedAllocationConfig]
220
- required :grouped_allocation_config, -> { Orb::PriceCreateParams::GroupedAllocationConfig }
55
+ variant :matrix_with_threshold_discounts,
56
+ -> { Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts }
221
57
 
222
- # @!attribute bulk_with_proration_config
223
- # Configuration for bulk_with_proration pricing
224
- #
225
- # @return [Orb::Models::PriceCreateParams::BulkWithProrationConfig]
226
- required :bulk_with_proration_config, -> { Orb::PriceCreateParams::BulkWithProrationConfig }
58
+ variant :tiered_with_proration, -> { Orb::NewFloatingTieredWithProrationPrice }
227
59
 
228
- # @!attribute grouped_with_prorated_minimum_config
229
- # Configuration for grouped_with_prorated_minimum pricing
230
- #
231
- # @return [Orb::Models::PriceCreateParams::GroupedWithProratedMinimumConfig]
232
- required :grouped_with_prorated_minimum_config,
233
- -> { Orb::PriceCreateParams::GroupedWithProratedMinimumConfig }
60
+ variant :unit_with_proration, -> { Orb::NewFloatingUnitWithProrationPrice }
234
61
 
235
- # @!attribute grouped_with_metered_minimum_config
236
- # Configuration for grouped_with_metered_minimum pricing
237
- #
238
- # @return [Orb::Models::PriceCreateParams::GroupedWithMeteredMinimumConfig]
239
- required :grouped_with_metered_minimum_config,
240
- -> { Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig }
62
+ variant :grouped_allocation, -> { Orb::NewFloatingGroupedAllocationPrice }
241
63
 
242
- # @!attribute grouped_with_min_max_thresholds_config
243
- # Configuration for grouped_with_min_max_thresholds pricing
244
- #
245
- # @return [Orb::Models::PriceCreateParams::GroupedWithMinMaxThresholdsConfig]
246
- required :grouped_with_min_max_thresholds_config,
247
- -> { Orb::PriceCreateParams::GroupedWithMinMaxThresholdsConfig }
64
+ variant :bulk_with_proration, -> { Orb::NewFloatingBulkWithProrationPrice }
248
65
 
249
- # @!attribute matrix_with_display_name_config
250
- # Configuration for matrix_with_display_name pricing
251
- #
252
- # @return [Orb::Models::PriceCreateParams::MatrixWithDisplayNameConfig]
253
- required :matrix_with_display_name_config, -> { Orb::PriceCreateParams::MatrixWithDisplayNameConfig }
66
+ variant :grouped_with_prorated_minimum, -> { Orb::NewFloatingGroupedWithProratedMinimumPrice }
254
67
 
255
- # @!attribute grouped_tiered_package_config
256
- # Configuration for grouped_tiered_package pricing
257
- #
258
- # @return [Orb::Models::PriceCreateParams::GroupedTieredPackageConfig]
259
- required :grouped_tiered_package_config, -> { Orb::PriceCreateParams::GroupedTieredPackageConfig }
68
+ variant :grouped_with_metered_minimum, -> { Orb::NewFloatingGroupedWithMeteredMinimumPrice }
260
69
 
261
- # @!attribute max_group_tiered_package_config
262
- # Configuration for max_group_tiered_package pricing
263
- #
264
- # @return [Orb::Models::PriceCreateParams::MaxGroupTieredPackageConfig]
265
- required :max_group_tiered_package_config, -> { Orb::PriceCreateParams::MaxGroupTieredPackageConfig }
70
+ variant :grouped_with_min_max_thresholds, -> { Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds }
266
71
 
267
- # @!attribute scalable_matrix_with_unit_pricing_config
268
- # Configuration for scalable_matrix_with_unit_pricing pricing
269
- #
270
- # @return [Orb::Models::PriceCreateParams::ScalableMatrixWithUnitPricingConfig]
271
- required :scalable_matrix_with_unit_pricing_config,
272
- -> { Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig }
72
+ variant :matrix_with_display_name, -> { Orb::NewFloatingMatrixWithDisplayNamePrice }
273
73
 
274
- # @!attribute scalable_matrix_with_tiered_pricing_config
275
- # Configuration for scalable_matrix_with_tiered_pricing pricing
276
- #
277
- # @return [Orb::Models::PriceCreateParams::ScalableMatrixWithTieredPricingConfig]
278
- required :scalable_matrix_with_tiered_pricing_config,
279
- -> { Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig }
74
+ variant :grouped_tiered_package, -> { Orb::NewFloatingGroupedTieredPackagePrice }
280
75
 
281
- # @!attribute cumulative_grouped_bulk_config
282
- # Configuration for cumulative_grouped_bulk pricing
283
- #
284
- # @return [Orb::Models::PriceCreateParams::CumulativeGroupedBulkConfig]
285
- required :cumulative_grouped_bulk_config, -> { Orb::PriceCreateParams::CumulativeGroupedBulkConfig }
76
+ variant :max_group_tiered_package, -> { Orb::NewFloatingMaxGroupTieredPackagePrice }
286
77
 
287
- # @!attribute cumulative_grouped_allocation_config
288
- # Configuration for cumulative_grouped_allocation pricing
289
- #
290
- # @return [Orb::Models::PriceCreateParams::CumulativeGroupedAllocationConfig]
291
- required :cumulative_grouped_allocation_config,
292
- -> { Orb::PriceCreateParams::CumulativeGroupedAllocationConfig }
78
+ variant :scalable_matrix_with_unit_pricing, -> { Orb::NewFloatingScalableMatrixWithUnitPricingPrice }
293
79
 
294
- # @!attribute minimum_composite_config
295
- # Configuration for minimum_composite pricing
296
- #
297
- # @return [Orb::Models::PriceCreateParams::MinimumCompositeConfig]
298
- required :minimum_composite_config, -> { Orb::PriceCreateParams::MinimumCompositeConfig }
80
+ variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewFloatingScalableMatrixWithTieredPricingPrice }
299
81
 
300
- # @!attribute percent_config
301
- # Configuration for percent pricing
302
- #
303
- # @return [Orb::Models::PriceCreateParams::PercentConfig]
304
- required :percent_config, -> { Orb::PriceCreateParams::PercentConfig }
82
+ variant :cumulative_grouped_bulk, -> { Orb::NewFloatingCumulativeGroupedBulkPrice }
305
83
 
306
- # @!attribute event_output_config
307
- # Configuration for event_output pricing
308
- #
309
- # @return [Orb::Models::PriceCreateParams::EventOutputConfig]
310
- required :event_output_config, -> { Orb::PriceCreateParams::EventOutputConfig }
84
+ variant :cumulative_grouped_allocation, -> { Orb::PriceCreateParams::Body::CumulativeGroupedAllocation }
311
85
 
312
- # @!method initialize(cadence:, currency:, item_id:, model_type:, name:, unit_config:, tiered_config:, bulk_config:, bulk_with_filters_config:, package_config:, matrix_config:, threshold_total_amount_config:, tiered_package_config:, tiered_with_minimum_config:, grouped_tiered_config:, tiered_package_with_minimum_config:, package_with_allocation_config:, unit_with_percent_config:, matrix_with_allocation_config:, tiered_with_proration_config:, unit_with_proration_config:, grouped_allocation_config:, bulk_with_proration_config:, grouped_with_prorated_minimum_config:, grouped_with_metered_minimum_config:, grouped_with_min_max_thresholds_config:, matrix_with_display_name_config:, grouped_tiered_package_config:, max_group_tiered_package_config:, scalable_matrix_with_unit_pricing_config:, scalable_matrix_with_tiered_pricing_config:, cumulative_grouped_bulk_config:, cumulative_grouped_allocation_config:, minimum_composite_config:, percent_config:, event_output_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, request_options: {})
313
- # Some parameter documentations has been truncated, see
314
- # {Orb::Models::PriceCreateParams} for more details.
315
- #
316
- # @param cadence [Symbol, Orb::Models::PriceCreateParams::Cadence] The cadence to bill for this price on.
317
- #
318
- # @param currency [String] An ISO 4217 currency string for which this price is billed in.
319
- #
320
- # @param item_id [String] The id of the item the price will be associated with.
321
- #
322
- # @param model_type [Symbol, Orb::Models::PriceCreateParams::ModelType] The pricing model type
323
- #
324
- # @param name [String] The name of the price.
325
- #
326
- # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing
327
- #
328
- # @param tiered_config [Orb::Models::TieredConfig] Configuration for tiered pricing
329
- #
330
- # @param bulk_config [Orb::Models::BulkConfig] Configuration for bulk pricing
331
- #
332
- # @param bulk_with_filters_config [Orb::Models::PriceCreateParams::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing
333
- #
334
- # @param package_config [Orb::Models::PackageConfig] Configuration for package pricing
335
- #
336
- # @param matrix_config [Orb::Models::MatrixConfig] Configuration for matrix pricing
337
- #
338
- # @param threshold_total_amount_config [Orb::Models::PriceCreateParams::ThresholdTotalAmountConfig] Configuration for threshold_total_amount pricing
339
- #
340
- # @param tiered_package_config [Orb::Models::PriceCreateParams::TieredPackageConfig] Configuration for tiered_package pricing
341
- #
342
- # @param tiered_with_minimum_config [Orb::Models::PriceCreateParams::TieredWithMinimumConfig] Configuration for tiered_with_minimum pricing
343
- #
344
- # @param grouped_tiered_config [Orb::Models::PriceCreateParams::GroupedTieredConfig] Configuration for grouped_tiered pricing
345
- #
346
- # @param tiered_package_with_minimum_config [Orb::Models::PriceCreateParams::TieredPackageWithMinimumConfig] Configuration for tiered_package_with_minimum pricing
347
- #
348
- # @param package_with_allocation_config [Orb::Models::PriceCreateParams::PackageWithAllocationConfig] Configuration for package_with_allocation pricing
349
- #
350
- # @param unit_with_percent_config [Orb::Models::PriceCreateParams::UnitWithPercentConfig] Configuration for unit_with_percent pricing
351
- #
352
- # @param matrix_with_allocation_config [Orb::Models::MatrixWithAllocationConfig] Configuration for matrix_with_allocation pricing
353
- #
354
- # @param tiered_with_proration_config [Orb::Models::PriceCreateParams::TieredWithProrationConfig] Configuration for tiered_with_proration pricing
355
- #
356
- # @param unit_with_proration_config [Orb::Models::PriceCreateParams::UnitWithProrationConfig] Configuration for unit_with_proration pricing
357
- #
358
- # @param grouped_allocation_config [Orb::Models::PriceCreateParams::GroupedAllocationConfig] Configuration for grouped_allocation pricing
359
- #
360
- # @param bulk_with_proration_config [Orb::Models::PriceCreateParams::BulkWithProrationConfig] Configuration for bulk_with_proration pricing
361
- #
362
- # @param grouped_with_prorated_minimum_config [Orb::Models::PriceCreateParams::GroupedWithProratedMinimumConfig] Configuration for grouped_with_prorated_minimum pricing
363
- #
364
- # @param grouped_with_metered_minimum_config [Orb::Models::PriceCreateParams::GroupedWithMeteredMinimumConfig] Configuration for grouped_with_metered_minimum pricing
365
- #
366
- # @param grouped_with_min_max_thresholds_config [Orb::Models::PriceCreateParams::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing
367
- #
368
- # @param matrix_with_display_name_config [Orb::Models::PriceCreateParams::MatrixWithDisplayNameConfig] Configuration for matrix_with_display_name pricing
369
- #
370
- # @param grouped_tiered_package_config [Orb::Models::PriceCreateParams::GroupedTieredPackageConfig] Configuration for grouped_tiered_package pricing
371
- #
372
- # @param max_group_tiered_package_config [Orb::Models::PriceCreateParams::MaxGroupTieredPackageConfig] Configuration for max_group_tiered_package pricing
373
- #
374
- # @param scalable_matrix_with_unit_pricing_config [Orb::Models::PriceCreateParams::ScalableMatrixWithUnitPricingConfig] Configuration for scalable_matrix_with_unit_pricing pricing
375
- #
376
- # @param scalable_matrix_with_tiered_pricing_config [Orb::Models::PriceCreateParams::ScalableMatrixWithTieredPricingConfig] Configuration for scalable_matrix_with_tiered_pricing pricing
377
- #
378
- # @param cumulative_grouped_bulk_config [Orb::Models::PriceCreateParams::CumulativeGroupedBulkConfig] Configuration for cumulative_grouped_bulk pricing
379
- #
380
- # @param cumulative_grouped_allocation_config [Orb::Models::PriceCreateParams::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing
381
- #
382
- # @param minimum_composite_config [Orb::Models::PriceCreateParams::MinimumCompositeConfig] Configuration for minimum_composite pricing
383
- #
384
- # @param percent_config [Orb::Models::PriceCreateParams::PercentConfig] Configuration for percent pricing
385
- #
386
- # @param event_output_config [Orb::Models::PriceCreateParams::EventOutputConfig] Configuration for event_output pricing
387
- #
388
- # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
389
- #
390
- # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
391
- #
392
- # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
393
- #
394
- # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
395
- #
396
- # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
397
- #
398
- # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
399
- #
400
- # @param external_price_id [String, nil] An alias for the price.
401
- #
402
- # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
403
- #
404
- # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
405
- #
406
- # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
407
- #
408
- # @param license_type_id [String, nil] The ID of the license type to associate with this price.
409
- #
410
- # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
411
- #
412
- # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
86
+ variant :daily_credit_allowance, -> { Orb::PriceCreateParams::Body::DailyCreditAllowance }
413
87
 
414
- # The cadence to bill for this price on.
415
- module Cadence
416
- extend Orb::Internal::Type::Enum
88
+ variant :metered_allowance, -> { Orb::PriceCreateParams::Body::MeteredAllowance }
417
89
 
418
- ANNUAL = :annual
419
- SEMI_ANNUAL = :semi_annual
420
- MONTHLY = :monthly
421
- QUARTERLY = :quarterly
422
- ONE_TIME = :one_time
423
- CUSTOM = :custom
90
+ variant :minimum_composite, -> { Orb::NewFloatingMinimumCompositePrice }
424
91
 
425
- # @!method self.values
426
- # @return [Array<Symbol>]
427
- end
92
+ variant :percent, -> { Orb::PriceCreateParams::Body::Percent }
428
93
 
429
- # The pricing model type
430
- module ModelType
431
- extend Orb::Internal::Type::Enum
94
+ variant :event_output, -> { Orb::PriceCreateParams::Body::EventOutput }
432
95
 
433
- EVENT_OUTPUT = :event_output
96
+ class BulkWithFilters < Orb::Internal::Type::BaseModel
97
+ # @!attribute bulk_with_filters_config
98
+ # Configuration for bulk_with_filters pricing
99
+ #
100
+ # @return [Orb::Models::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig]
101
+ required :bulk_with_filters_config,
102
+ -> { Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig }
434
103
 
435
- # @!method self.values
436
- # @return [Array<Symbol>]
437
- end
104
+ # @!attribute cadence
105
+ # The cadence to bill for this price on.
106
+ #
107
+ # @return [Symbol, Orb::Models::PriceCreateParams::Body::BulkWithFilters::Cadence]
108
+ required :cadence, enum: -> { Orb::PriceCreateParams::Body::BulkWithFilters::Cadence }
438
109
 
439
- class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel
440
- # @!attribute filters
441
- # Property filters to apply (all must match)
442
- #
443
- # @return [Array<Orb::Models::PriceCreateParams::BulkWithFiltersConfig::Filter>]
444
- required :filters,
445
- -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::BulkWithFiltersConfig::Filter] }
446
-
447
- # @!attribute tiers
448
- # Bulk tiers for rating based on total usage volume
449
- #
450
- # @return [Array<Orb::Models::PriceCreateParams::BulkWithFiltersConfig::Tier>]
451
- required :tiers, -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::BulkWithFiltersConfig::Tier] }
452
-
453
- # @!method initialize(filters:, tiers:)
454
- # Configuration for bulk_with_filters pricing
455
- #
456
- # @param filters [Array<Orb::Models::PriceCreateParams::BulkWithFiltersConfig::Filter>] Property filters to apply (all must match)
457
- #
458
- # @param tiers [Array<Orb::Models::PriceCreateParams::BulkWithFiltersConfig::Tier>] Bulk tiers for rating based on total usage volume
459
-
460
- class Filter < Orb::Internal::Type::BaseModel
461
- # @!attribute property_key
462
- # Event property key to filter on
110
+ # @!attribute currency
111
+ # An ISO 4217 currency string for which this price is billed in.
463
112
  #
464
113
  # @return [String]
465
- required :property_key, String
114
+ required :currency, String
466
115
 
467
- # @!attribute property_value
468
- # Event property value to match
116
+ # @!attribute item_id
117
+ # The id of the item the price will be associated with.
469
118
  #
470
119
  # @return [String]
471
- required :property_value, String
120
+ required :item_id, String
472
121
 
473
- # @!method initialize(property_key:, property_value:)
474
- # Configuration for a single property filter
122
+ # @!attribute model_type
123
+ # The pricing model type
475
124
  #
476
- # @param property_key [String] Event property key to filter on
477
- #
478
- # @param property_value [String] Event property value to match
479
- end
125
+ # @return [Symbol, :bulk_with_filters]
126
+ required :model_type, const: :bulk_with_filters
480
127
 
481
- class Tier < Orb::Internal::Type::BaseModel
482
- # @!attribute unit_amount
483
- # Amount per unit
128
+ # @!attribute name
129
+ # The name of the price.
484
130
  #
485
131
  # @return [String]
486
- required :unit_amount, String
132
+ required :name, String
487
133
 
488
- # @!attribute tier_lower_bound
489
- # The lower bound for this tier
134
+ # @!attribute billable_metric_id
135
+ # The id of the billable metric for the price. Only needed if the price is
136
+ # usage-based.
490
137
  #
491
138
  # @return [String, nil]
492
- optional :tier_lower_bound, String, nil?: true
139
+ optional :billable_metric_id, String, nil?: true
493
140
 
494
- # @!method initialize(unit_amount:, tier_lower_bound: nil)
495
- # Configuration for a single bulk pricing tier
141
+ # @!attribute billed_in_advance
142
+ # If the Price represents a fixed cost, the price will be billed in-advance if
143
+ # this is true, and in-arrears if this is false.
496
144
  #
497
- # @param unit_amount [String] Amount per unit
498
- #
499
- # @param tier_lower_bound [String, nil] The lower bound for this tier
500
- end
501
- end
145
+ # @return [Boolean, nil]
146
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
502
147
 
503
- class ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel
504
- # @!attribute consumption_table
505
- # When the quantity consumed passes a provided threshold, the configured total
506
- # will be charged
507
- #
508
- # @return [Array<Orb::Models::PriceCreateParams::ThresholdTotalAmountConfig::ConsumptionTable>]
509
- required :consumption_table,
510
- -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::ThresholdTotalAmountConfig::ConsumptionTable] }
511
-
512
- # @!attribute prorate
513
- # If true, the unit price will be prorated to the billing period
514
- #
515
- # @return [Boolean, nil]
516
- optional :prorate, Orb::Internal::Type::Boolean, nil?: true
517
-
518
- # @!method initialize(consumption_table:, prorate: nil)
519
- # Some parameter documentations has been truncated, see
520
- # {Orb::Models::PriceCreateParams::ThresholdTotalAmountConfig} for more details.
521
- #
522
- # Configuration for threshold_total_amount pricing
523
- #
524
- # @param consumption_table [Array<Orb::Models::PriceCreateParams::ThresholdTotalAmountConfig::ConsumptionTable>] When the quantity consumed passes a provided threshold, the configured total wil
525
- #
526
- # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period
527
-
528
- class ConsumptionTable < Orb::Internal::Type::BaseModel
529
- # @!attribute threshold
148
+ # @!attribute billing_cycle_configuration
149
+ # For custom cadence: specifies the duration of the billing period in days or
150
+ # months.
530
151
  #
531
- # @return [String]
532
- required :threshold, String
152
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
153
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
533
154
 
534
- # @!attribute total_amount
535
- # Total amount for this threshold
155
+ # @!attribute conversion_rate
156
+ # The per unit conversion rate of the price currency to the invoicing currency.
536
157
  #
537
- # @return [String]
538
- required :total_amount, String
158
+ # @return [Float, nil]
159
+ optional :conversion_rate, Float, nil?: true
539
160
 
540
- # @!method initialize(threshold:, total_amount:)
541
- # Configuration for a single threshold
542
- #
543
- # @param threshold [String]
161
+ # @!attribute conversion_rate_config
162
+ # The configuration for the rate of the price currency to the invoicing currency.
544
163
  #
545
- # @param total_amount [String] Total amount for this threshold
546
- end
547
- end
164
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
165
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
548
166
 
549
- class TieredPackageConfig < Orb::Internal::Type::BaseModel
550
- # @!attribute package_size
551
- #
552
- # @return [String]
553
- required :package_size, String
554
-
555
- # @!attribute tiers
556
- # Apply tiered pricing after rounding up the quantity to the package size. Tiers
557
- # are defined using exclusive lower bounds. The tier bounds are defined based on
558
- # the total quantity rather than the number of packages, so they must be multiples
559
- # of the package size.
560
- #
561
- # @return [Array<Orb::Models::PriceCreateParams::TieredPackageConfig::Tier>]
562
- required :tiers, -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::TieredPackageConfig::Tier] }
563
-
564
- # @!method initialize(package_size:, tiers:)
565
- # Some parameter documentations has been truncated, see
566
- # {Orb::Models::PriceCreateParams::TieredPackageConfig} for more details.
567
- #
568
- # Configuration for tiered_package pricing
569
- #
570
- # @param package_size [String]
571
- #
572
- # @param tiers [Array<Orb::Models::PriceCreateParams::TieredPackageConfig::Tier>] Apply tiered pricing after rounding up the quantity to the package size. Tiers a
573
-
574
- class Tier < Orb::Internal::Type::BaseModel
575
- # @!attribute per_unit
576
- # Price per package
167
+ # @!attribute dimensional_price_configuration
168
+ # For dimensional price: specifies a price group and dimension values
577
169
  #
578
- # @return [String]
579
- required :per_unit, String
170
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
171
+ optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true
580
172
 
581
- # @!attribute tier_lower_bound
173
+ # @!attribute external_price_id
174
+ # An alias for the price.
582
175
  #
583
- # @return [String]
584
- required :tier_lower_bound, String
176
+ # @return [String, nil]
177
+ optional :external_price_id, String, nil?: true
585
178
 
586
- # @!method initialize(per_unit:, tier_lower_bound:)
587
- # Configuration for a single tier with business logic
179
+ # @!attribute fixed_price_quantity
180
+ # If the Price represents a fixed cost, this represents the quantity of units
181
+ # applied.
588
182
  #
589
- # @param per_unit [String] Price per package
183
+ # @return [Float, nil]
184
+ optional :fixed_price_quantity, Float, nil?: true
185
+
186
+ # @!attribute invoice_grouping_key
187
+ # The property used to group this price on an invoice
590
188
  #
591
- # @param tier_lower_bound [String]
592
- end
593
- end
189
+ # @return [String, nil]
190
+ optional :invoice_grouping_key, String, nil?: true
594
191
 
595
- class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel
596
- # @!attribute tiers
597
- # Tiered pricing with a minimum amount dependent on the volume tier. Tiers are
598
- # defined using exclusive lower bounds.
599
- #
600
- # @return [Array<Orb::Models::PriceCreateParams::TieredWithMinimumConfig::Tier>]
601
- required :tiers,
602
- -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::TieredWithMinimumConfig::Tier] }
603
-
604
- # @!attribute hide_zero_amount_tiers
605
- # If true, tiers with an accrued amount of 0 will not be included in the rating.
606
- #
607
- # @return [Boolean, nil]
608
- optional :hide_zero_amount_tiers, Orb::Internal::Type::Boolean
609
-
610
- # @!attribute prorate
611
- # If true, the unit price will be prorated to the billing period
612
- #
613
- # @return [Boolean, nil]
614
- optional :prorate, Orb::Internal::Type::Boolean
615
-
616
- # @!method initialize(tiers:, hide_zero_amount_tiers: nil, prorate: nil)
617
- # Some parameter documentations has been truncated, see
618
- # {Orb::Models::PriceCreateParams::TieredWithMinimumConfig} for more details.
619
- #
620
- # Configuration for tiered_with_minimum pricing
621
- #
622
- # @param tiers [Array<Orb::Models::PriceCreateParams::TieredWithMinimumConfig::Tier>] Tiered pricing with a minimum amount dependent on the volume tier. Tiers are def
623
- #
624
- # @param hide_zero_amount_tiers [Boolean] If true, tiers with an accrued amount of 0 will not be included in the rating.
625
- #
626
- # @param prorate [Boolean] If true, the unit price will be prorated to the billing period
627
-
628
- class Tier < Orb::Internal::Type::BaseModel
629
- # @!attribute minimum_amount
192
+ # @!attribute invoicing_cycle_configuration
193
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
194
+ # If unspecified, a single invoice is produced per billing cycle.
630
195
  #
631
- # @return [String]
632
- required :minimum_amount, String
196
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
197
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
633
198
 
634
- # @!attribute tier_lower_bound
199
+ # @!attribute license_type_id
200
+ # The ID of the license type to associate with this price.
635
201
  #
636
- # @return [String]
637
- required :tier_lower_bound, String
202
+ # @return [String, nil]
203
+ optional :license_type_id, String, nil?: true
638
204
 
639
- # @!attribute unit_amount
640
- # Per unit amount
205
+ # @!attribute metadata
206
+ # User-specified key/value pairs for the resource. Individual keys can be removed
207
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
208
+ # by setting `metadata` to `null`.
641
209
  #
642
- # @return [String]
643
- required :unit_amount, String
210
+ # @return [Hash{Symbol=>String, nil}, nil]
211
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
644
212
 
645
- # @!method initialize(minimum_amount:, tier_lower_bound:, unit_amount:)
646
- # Configuration for a single tier
213
+ # @!method initialize(bulk_with_filters_config:, cadence:, currency:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :bulk_with_filters)
214
+ # Some parameter documentations has been truncated, see
215
+ # {Orb::Models::PriceCreateParams::Body::BulkWithFilters} for more details.
647
216
  #
648
- # @param minimum_amount [String]
217
+ # @param bulk_with_filters_config [Orb::Models::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing
649
218
  #
650
- # @param tier_lower_bound [String]
219
+ # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::BulkWithFilters::Cadence] The cadence to bill for this price on.
651
220
  #
652
- # @param unit_amount [String] Per unit amount
653
- end
654
- end
655
-
656
- class GroupedTieredConfig < Orb::Internal::Type::BaseModel
657
- # @!attribute grouping_key
658
- # The billable metric property used to group before tiering
659
- #
660
- # @return [String]
661
- required :grouping_key, String
662
-
663
- # @!attribute tiers
664
- # Apply tiered pricing to each segment generated after grouping with the provided
665
- # key
666
- #
667
- # @return [Array<Orb::Models::PriceCreateParams::GroupedTieredConfig::Tier>]
668
- required :tiers, -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::GroupedTieredConfig::Tier] }
669
-
670
- # @!method initialize(grouping_key:, tiers:)
671
- # Some parameter documentations has been truncated, see
672
- # {Orb::Models::PriceCreateParams::GroupedTieredConfig} for more details.
673
- #
674
- # Configuration for grouped_tiered pricing
675
- #
676
- # @param grouping_key [String] The billable metric property used to group before tiering
677
- #
678
- # @param tiers [Array<Orb::Models::PriceCreateParams::GroupedTieredConfig::Tier>] Apply tiered pricing to each segment generated after grouping with the provided
679
-
680
- class Tier < Orb::Internal::Type::BaseModel
681
- # @!attribute tier_lower_bound
221
+ # @param currency [String] An ISO 4217 currency string for which this price is billed in.
682
222
  #
683
- # @return [String]
684
- required :tier_lower_bound, String
685
-
686
- # @!attribute unit_amount
687
- # Per unit amount
223
+ # @param item_id [String] The id of the item the price will be associated with.
688
224
  #
689
- # @return [String]
690
- required :unit_amount, String
691
-
692
- # @!method initialize(tier_lower_bound:, unit_amount:)
693
- # Configuration for a single tier
225
+ # @param name [String] The name of the price.
694
226
  #
695
- # @param tier_lower_bound [String]
227
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
696
228
  #
697
- # @param unit_amount [String] Per unit amount
698
- end
699
- end
700
-
701
- class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel
702
- # @!attribute package_size
703
- #
704
- # @return [Float]
705
- required :package_size, Float
706
-
707
- # @!attribute tiers
708
- # Apply tiered pricing after rounding up the quantity to the package size. Tiers
709
- # are defined using exclusive lower bounds.
710
- #
711
- # @return [Array<Orb::Models::PriceCreateParams::TieredPackageWithMinimumConfig::Tier>]
712
- required :tiers,
713
- -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::TieredPackageWithMinimumConfig::Tier] }
714
-
715
- # @!method initialize(package_size:, tiers:)
716
- # Some parameter documentations has been truncated, see
717
- # {Orb::Models::PriceCreateParams::TieredPackageWithMinimumConfig} for more
718
- # details.
719
- #
720
- # Configuration for tiered_package_with_minimum pricing
721
- #
722
- # @param package_size [Float]
723
- #
724
- # @param tiers [Array<Orb::Models::PriceCreateParams::TieredPackageWithMinimumConfig::Tier>] Apply tiered pricing after rounding up the quantity to the package size. Tiers a
725
-
726
- class Tier < Orb::Internal::Type::BaseModel
727
- # @!attribute minimum_amount
229
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
728
230
  #
729
- # @return [String]
730
- required :minimum_amount, String
731
-
732
- # @!attribute per_unit
231
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
733
232
  #
734
- # @return [String]
735
- required :per_unit, String
736
-
737
- # @!attribute tier_lower_bound
233
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
738
234
  #
739
- # @return [String]
740
- required :tier_lower_bound, String
741
-
742
- # @!method initialize(minimum_amount:, per_unit:, tier_lower_bound:)
743
- # Configuration for a single tier
235
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
744
236
  #
745
- # @param minimum_amount [String]
746
- # @param per_unit [String]
747
- # @param tier_lower_bound [String]
748
- end
749
- end
750
-
751
- class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel
752
- # @!attribute allocation
753
- #
754
- # @return [String]
755
- required :allocation, String
756
-
757
- # @!attribute package_amount
758
- #
759
- # @return [String]
760
- required :package_amount, String
761
-
762
- # @!attribute package_size
763
- #
764
- # @return [String]
765
- required :package_size, String
766
-
767
- # @!method initialize(allocation:, package_amount:, package_size:)
768
- # Configuration for package_with_allocation pricing
769
- #
770
- # @param allocation [String]
771
- # @param package_amount [String]
772
- # @param package_size [String]
773
- end
774
-
775
- class UnitWithPercentConfig < Orb::Internal::Type::BaseModel
776
- # @!attribute percent
777
- # What percent, out of 100, of the calculated total to charge
778
- #
779
- # @return [String]
780
- required :percent, String
781
-
782
- # @!attribute unit_amount
783
- # Rate per unit of usage
784
- #
785
- # @return [String]
786
- required :unit_amount, String
787
-
788
- # @!method initialize(percent:, unit_amount:)
789
- # Configuration for unit_with_percent pricing
790
- #
791
- # @param percent [String] What percent, out of 100, of the calculated total to charge
792
- #
793
- # @param unit_amount [String] Rate per unit of usage
794
- end
795
-
796
- class TieredWithProrationConfig < Orb::Internal::Type::BaseModel
797
- # @!attribute tiers
798
- # Tiers for rating based on total usage quantities into the specified tier with
799
- # proration
800
- #
801
- # @return [Array<Orb::Models::PriceCreateParams::TieredWithProrationConfig::Tier>]
802
- required :tiers,
803
- -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::TieredWithProrationConfig::Tier] }
804
-
805
- # @!method initialize(tiers:)
806
- # Some parameter documentations has been truncated, see
807
- # {Orb::Models::PriceCreateParams::TieredWithProrationConfig} for more details.
808
- #
809
- # Configuration for tiered_with_proration pricing
810
- #
811
- # @param tiers [Array<Orb::Models::PriceCreateParams::TieredWithProrationConfig::Tier>] Tiers for rating based on total usage quantities into the specified tier with pr
812
-
813
- class Tier < Orb::Internal::Type::BaseModel
814
- # @!attribute tier_lower_bound
815
- # Inclusive tier starting value
237
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
816
238
  #
817
- # @return [String]
818
- required :tier_lower_bound, String
819
-
820
- # @!attribute unit_amount
821
- # Amount per unit
239
+ # @param external_price_id [String, nil] An alias for the price.
822
240
  #
823
- # @return [String]
824
- required :unit_amount, String
825
-
826
- # @!method initialize(tier_lower_bound:, unit_amount:)
827
- # Configuration for a single tiered with proration tier
241
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
828
242
  #
829
- # @param tier_lower_bound [String] Inclusive tier starting value
243
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
830
244
  #
831
- # @param unit_amount [String] Amount per unit
832
- end
833
- end
245
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
246
+ #
247
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
248
+ #
249
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
250
+ #
251
+ # @param model_type [Symbol, :bulk_with_filters] The pricing model type
834
252
 
835
- class UnitWithProrationConfig < Orb::Internal::Type::BaseModel
836
- # @!attribute unit_amount
837
- # Rate per unit of usage
838
- #
839
- # @return [String]
840
- required :unit_amount, String
841
-
842
- # @!method initialize(unit_amount:)
843
- # Configuration for unit_with_proration pricing
844
- #
845
- # @param unit_amount [String] Rate per unit of usage
846
- end
253
+ # @see Orb::Models::PriceCreateParams::Body::BulkWithFilters#bulk_with_filters_config
254
+ class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel
255
+ # @!attribute filters
256
+ # Property filters to apply (all must match)
257
+ #
258
+ # @return [Array<Orb::Models::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Filter>]
259
+ required :filters,
260
+ -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Filter] }
847
261
 
848
- class GroupedAllocationConfig < Orb::Internal::Type::BaseModel
849
- # @!attribute allocation
850
- # Usage allocation per group
851
- #
852
- # @return [String]
853
- required :allocation, String
854
-
855
- # @!attribute grouping_key
856
- # How to determine the groups that should each be allocated some quantity
857
- #
858
- # @return [String]
859
- required :grouping_key, String
860
-
861
- # @!attribute overage_unit_rate
862
- # Unit rate for post-allocation
863
- #
864
- # @return [String]
865
- required :overage_unit_rate, String
866
-
867
- # @!method initialize(allocation:, grouping_key:, overage_unit_rate:)
868
- # Configuration for grouped_allocation pricing
869
- #
870
- # @param allocation [String] Usage allocation per group
871
- #
872
- # @param grouping_key [String] How to determine the groups that should each be allocated some quantity
873
- #
874
- # @param overage_unit_rate [String] Unit rate for post-allocation
875
- end
262
+ # @!attribute tiers
263
+ # Bulk tiers for rating based on total usage volume
264
+ #
265
+ # @return [Array<Orb::Models::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Tier>]
266
+ required :tiers,
267
+ -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Tier] }
876
268
 
877
- class BulkWithProrationConfig < Orb::Internal::Type::BaseModel
878
- # @!attribute tiers
879
- # Bulk tiers for rating based on total usage volume
880
- #
881
- # @return [Array<Orb::Models::PriceCreateParams::BulkWithProrationConfig::Tier>]
882
- required :tiers,
883
- -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::BulkWithProrationConfig::Tier] }
269
+ # @!method initialize(filters:, tiers:)
270
+ # Configuration for bulk_with_filters pricing
271
+ #
272
+ # @param filters [Array<Orb::Models::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Filter>] Property filters to apply (all must match)
273
+ #
274
+ # @param tiers [Array<Orb::Models::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Tier>] Bulk tiers for rating based on total usage volume
884
275
 
885
- # @!method initialize(tiers:)
886
- # Configuration for bulk_with_proration pricing
887
- #
888
- # @param tiers [Array<Orb::Models::PriceCreateParams::BulkWithProrationConfig::Tier>] Bulk tiers for rating based on total usage volume
276
+ class Filter < Orb::Internal::Type::BaseModel
277
+ # @!attribute property_key
278
+ # Event property key to filter on
279
+ #
280
+ # @return [String]
281
+ required :property_key, String
889
282
 
890
- class Tier < Orb::Internal::Type::BaseModel
891
- # @!attribute unit_amount
892
- # Cost per unit
893
- #
894
- # @return [String]
895
- required :unit_amount, String
283
+ # @!attribute property_value
284
+ # Event property value to match
285
+ #
286
+ # @return [String]
287
+ required :property_value, String
896
288
 
897
- # @!attribute tier_lower_bound
898
- # The lower bound for this tier
899
- #
900
- # @return [String, nil]
901
- optional :tier_lower_bound, String, nil?: true
289
+ # @!method initialize(property_key:, property_value:)
290
+ # Configuration for a single property filter
291
+ #
292
+ # @param property_key [String] Event property key to filter on
293
+ #
294
+ # @param property_value [String] Event property value to match
295
+ end
902
296
 
903
- # @!method initialize(unit_amount:, tier_lower_bound: nil)
904
- # Configuration for a single bulk pricing tier with proration
905
- #
906
- # @param unit_amount [String] Cost per unit
297
+ class Tier < Orb::Internal::Type::BaseModel
298
+ # @!attribute unit_amount
299
+ # Amount per unit
300
+ #
301
+ # @return [String]
302
+ required :unit_amount, String
303
+
304
+ # @!attribute tier_lower_bound
305
+ # The lower bound for this tier
306
+ #
307
+ # @return [String, nil]
308
+ optional :tier_lower_bound, String, nil?: true
309
+
310
+ # @!method initialize(unit_amount:, tier_lower_bound: nil)
311
+ # Configuration for a single bulk pricing tier
312
+ #
313
+ # @param unit_amount [String] Amount per unit
314
+ #
315
+ # @param tier_lower_bound [String, nil] The lower bound for this tier
316
+ end
317
+ end
318
+
319
+ # The cadence to bill for this price on.
907
320
  #
908
- # @param tier_lower_bound [String, nil] The lower bound for this tier
321
+ # @see Orb::Models::PriceCreateParams::Body::BulkWithFilters#cadence
322
+ module Cadence
323
+ extend Orb::Internal::Type::Enum
324
+
325
+ ANNUAL = :annual
326
+ SEMI_ANNUAL = :semi_annual
327
+ MONTHLY = :monthly
328
+ QUARTERLY = :quarterly
329
+ ONE_TIME = :one_time
330
+ CUSTOM = :custom
331
+
332
+ # @!method self.values
333
+ # @return [Array<Symbol>]
334
+ end
909
335
  end
910
- end
911
336
 
912
- class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel
913
- # @!attribute grouping_key
914
- # How to determine the groups that should each have a minimum
915
- #
916
- # @return [String]
917
- required :grouping_key, String
918
-
919
- # @!attribute minimum
920
- # The minimum amount to charge per group
921
- #
922
- # @return [String]
923
- required :minimum, String
924
-
925
- # @!attribute unit_rate
926
- # The amount to charge per unit
927
- #
928
- # @return [String]
929
- required :unit_rate, String
930
-
931
- # @!method initialize(grouping_key:, minimum:, unit_rate:)
932
- # Configuration for grouped_with_prorated_minimum pricing
933
- #
934
- # @param grouping_key [String] How to determine the groups that should each have a minimum
935
- #
936
- # @param minimum [String] The minimum amount to charge per group
937
- #
938
- # @param unit_rate [String] The amount to charge per unit
939
- end
337
+ class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel
338
+ # @!attribute cadence
339
+ # The cadence to bill for this price on.
340
+ #
341
+ # @return [Symbol, Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence]
342
+ required :cadence, enum: -> { Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence }
940
343
 
941
- class GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel
942
- # @!attribute grouping_key
943
- # Used to partition the usage into groups. The minimum amount is applied to each
944
- # group.
945
- #
946
- # @return [String]
947
- required :grouping_key, String
948
-
949
- # @!attribute minimum_unit_amount
950
- # The minimum amount to charge per group per unit
951
- #
952
- # @return [String]
953
- required :minimum_unit_amount, String
954
-
955
- # @!attribute pricing_key
956
- # Used to determine the unit rate
957
- #
958
- # @return [String]
959
- required :pricing_key, String
960
-
961
- # @!attribute scaling_factors
962
- # Scale the unit rates by the scaling factor.
963
- #
964
- # @return [Array<Orb::Models::PriceCreateParams::GroupedWithMeteredMinimumConfig::ScalingFactor>]
965
- required :scaling_factors,
966
- -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::ScalingFactor] }
967
-
968
- # @!attribute scaling_key
969
- # Used to determine the unit rate scaling factor
970
- #
971
- # @return [String]
972
- required :scaling_key, String
973
-
974
- # @!attribute unit_amounts
975
- # Apply per unit pricing to each pricing value. The minimum amount is applied any
976
- # unmatched usage.
977
- #
978
- # @return [Array<Orb::Models::PriceCreateParams::GroupedWithMeteredMinimumConfig::UnitAmount>]
979
- required :unit_amounts,
980
- -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::UnitAmount] }
981
-
982
- # @!method initialize(grouping_key:, minimum_unit_amount:, pricing_key:, scaling_factors:, scaling_key:, unit_amounts:)
983
- # Some parameter documentations has been truncated, see
984
- # {Orb::Models::PriceCreateParams::GroupedWithMeteredMinimumConfig} for more
985
- # details.
986
- #
987
- # Configuration for grouped_with_metered_minimum pricing
988
- #
989
- # @param grouping_key [String] Used to partition the usage into groups. The minimum amount is applied to each g
990
- #
991
- # @param minimum_unit_amount [String] The minimum amount to charge per group per unit
992
- #
993
- # @param pricing_key [String] Used to determine the unit rate
994
- #
995
- # @param scaling_factors [Array<Orb::Models::PriceCreateParams::GroupedWithMeteredMinimumConfig::ScalingFactor>] Scale the unit rates by the scaling factor.
996
- #
997
- # @param scaling_key [String] Used to determine the unit rate scaling factor
998
- #
999
- # @param unit_amounts [Array<Orb::Models::PriceCreateParams::GroupedWithMeteredMinimumConfig::UnitAmount>] Apply per unit pricing to each pricing value. The minimum amount is applied any
1000
-
1001
- class ScalingFactor < Orb::Internal::Type::BaseModel
1002
- # @!attribute scaling_factor
344
+ # @!attribute currency
345
+ # An ISO 4217 currency string for which this price is billed in.
1003
346
  #
1004
347
  # @return [String]
1005
- required :scaling_factor, String
348
+ required :currency, String
1006
349
 
1007
- # @!attribute scaling_value
350
+ # @!attribute item_id
351
+ # The id of the item the price will be associated with.
1008
352
  #
1009
353
  # @return [String]
1010
- required :scaling_value, String
354
+ required :item_id, String
1011
355
 
1012
- # @!method initialize(scaling_factor:, scaling_value:)
1013
- # Configuration for a scaling factor
356
+ # @!attribute matrix_with_threshold_discounts_config
357
+ # Configuration for matrix_with_threshold_discounts pricing
1014
358
  #
1015
- # @param scaling_factor [String]
1016
- # @param scaling_value [String]
1017
- end
359
+ # @return [Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig]
360
+ required :matrix_with_threshold_discounts_config,
361
+ -> { Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig }
1018
362
 
1019
- class UnitAmount < Orb::Internal::Type::BaseModel
1020
- # @!attribute pricing_value
363
+ # @!attribute model_type
364
+ # The pricing model type
1021
365
  #
1022
- # @return [String]
1023
- required :pricing_value, String
366
+ # @return [Symbol, :matrix_with_threshold_discounts]
367
+ required :model_type, const: :matrix_with_threshold_discounts
1024
368
 
1025
- # @!attribute unit_amount
1026
- # Per unit amount
369
+ # @!attribute name
370
+ # The name of the price.
1027
371
  #
1028
372
  # @return [String]
1029
- required :unit_amount, String
373
+ required :name, String
1030
374
 
1031
- # @!method initialize(pricing_value:, unit_amount:)
1032
- # Configuration for a unit amount
375
+ # @!attribute billable_metric_id
376
+ # The id of the billable metric for the price. Only needed if the price is
377
+ # usage-based.
1033
378
  #
1034
- # @param pricing_value [String]
379
+ # @return [String, nil]
380
+ optional :billable_metric_id, String, nil?: true
381
+
382
+ # @!attribute billed_in_advance
383
+ # If the Price represents a fixed cost, the price will be billed in-advance if
384
+ # this is true, and in-arrears if this is false.
1035
385
  #
1036
- # @param unit_amount [String] Per unit amount
1037
- end
1038
- end
386
+ # @return [Boolean, nil]
387
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
1039
388
 
1040
- class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel
1041
- # @!attribute grouping_key
1042
- # The event property used to group before applying thresholds
1043
- #
1044
- # @return [String]
1045
- required :grouping_key, String
1046
-
1047
- # @!attribute maximum_charge
1048
- # The maximum amount to charge each group
1049
- #
1050
- # @return [String]
1051
- required :maximum_charge, String
1052
-
1053
- # @!attribute minimum_charge
1054
- # The minimum amount to charge each group, regardless of usage
1055
- #
1056
- # @return [String]
1057
- required :minimum_charge, String
1058
-
1059
- # @!attribute per_unit_rate
1060
- # The base price charged per group
1061
- #
1062
- # @return [String]
1063
- required :per_unit_rate, String
1064
-
1065
- # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:)
1066
- # Configuration for grouped_with_min_max_thresholds pricing
1067
- #
1068
- # @param grouping_key [String] The event property used to group before applying thresholds
1069
- #
1070
- # @param maximum_charge [String] The maximum amount to charge each group
1071
- #
1072
- # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage
1073
- #
1074
- # @param per_unit_rate [String] The base price charged per group
1075
- end
389
+ # @!attribute billing_cycle_configuration
390
+ # For custom cadence: specifies the duration of the billing period in days or
391
+ # months.
392
+ #
393
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
394
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1076
395
 
1077
- class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel
1078
- # @!attribute dimension
1079
- # Used to determine the unit rate
1080
- #
1081
- # @return [String]
1082
- required :dimension, String
1083
-
1084
- # @!attribute unit_amounts
1085
- # Apply per unit pricing to each dimension value
1086
- #
1087
- # @return [Array<Orb::Models::PriceCreateParams::MatrixWithDisplayNameConfig::UnitAmount>]
1088
- required :unit_amounts,
1089
- -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::MatrixWithDisplayNameConfig::UnitAmount] }
1090
-
1091
- # @!method initialize(dimension:, unit_amounts:)
1092
- # Configuration for matrix_with_display_name pricing
1093
- #
1094
- # @param dimension [String] Used to determine the unit rate
1095
- #
1096
- # @param unit_amounts [Array<Orb::Models::PriceCreateParams::MatrixWithDisplayNameConfig::UnitAmount>] Apply per unit pricing to each dimension value
1097
-
1098
- class UnitAmount < Orb::Internal::Type::BaseModel
1099
- # @!attribute dimension_value
1100
- # The dimension value
396
+ # @!attribute conversion_rate
397
+ # The per unit conversion rate of the price currency to the invoicing currency.
1101
398
  #
1102
- # @return [String]
1103
- required :dimension_value, String
399
+ # @return [Float, nil]
400
+ optional :conversion_rate, Float, nil?: true
1104
401
 
1105
- # @!attribute display_name
1106
- # Display name for this dimension value
402
+ # @!attribute conversion_rate_config
403
+ # The configuration for the rate of the price currency to the invoicing currency.
1107
404
  #
1108
- # @return [String]
1109
- required :display_name, String
405
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
406
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1110
407
 
1111
- # @!attribute unit_amount
1112
- # Per unit amount
408
+ # @!attribute dimensional_price_configuration
409
+ # For dimensional price: specifies a price group and dimension values
1113
410
  #
1114
- # @return [String]
1115
- required :unit_amount, String
411
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
412
+ optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true
1116
413
 
1117
- # @!method initialize(dimension_value:, display_name:, unit_amount:)
1118
- # Configuration for a unit amount item
414
+ # @!attribute external_price_id
415
+ # An alias for the price.
1119
416
  #
1120
- # @param dimension_value [String] The dimension value
417
+ # @return [String, nil]
418
+ optional :external_price_id, String, nil?: true
419
+
420
+ # @!attribute fixed_price_quantity
421
+ # If the Price represents a fixed cost, this represents the quantity of units
422
+ # applied.
1121
423
  #
1122
- # @param display_name [String] Display name for this dimension value
424
+ # @return [Float, nil]
425
+ optional :fixed_price_quantity, Float, nil?: true
426
+
427
+ # @!attribute invoice_grouping_key
428
+ # The property used to group this price on an invoice
1123
429
  #
1124
- # @param unit_amount [String] Per unit amount
1125
- end
1126
- end
430
+ # @return [String, nil]
431
+ optional :invoice_grouping_key, String, nil?: true
1127
432
 
1128
- class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel
1129
- # @!attribute grouping_key
1130
- # The event property used to group before tiering
1131
- #
1132
- # @return [String]
1133
- required :grouping_key, String
1134
-
1135
- # @!attribute package_size
1136
- #
1137
- # @return [String]
1138
- required :package_size, String
1139
-
1140
- # @!attribute tiers
1141
- # Apply tiered pricing after rounding up the quantity to the package size. Tiers
1142
- # are defined using exclusive lower bounds.
1143
- #
1144
- # @return [Array<Orb::Models::PriceCreateParams::GroupedTieredPackageConfig::Tier>]
1145
- required :tiers,
1146
- -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::GroupedTieredPackageConfig::Tier] }
1147
-
1148
- # @!method initialize(grouping_key:, package_size:, tiers:)
1149
- # Some parameter documentations has been truncated, see
1150
- # {Orb::Models::PriceCreateParams::GroupedTieredPackageConfig} for more details.
1151
- #
1152
- # Configuration for grouped_tiered_package pricing
1153
- #
1154
- # @param grouping_key [String] The event property used to group before tiering
1155
- #
1156
- # @param package_size [String]
1157
- #
1158
- # @param tiers [Array<Orb::Models::PriceCreateParams::GroupedTieredPackageConfig::Tier>] Apply tiered pricing after rounding up the quantity to the package size. Tiers a
1159
-
1160
- class Tier < Orb::Internal::Type::BaseModel
1161
- # @!attribute per_unit
1162
- # Per package
433
+ # @!attribute invoicing_cycle_configuration
434
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
435
+ # If unspecified, a single invoice is produced per billing cycle.
1163
436
  #
1164
- # @return [String]
1165
- required :per_unit, String
437
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
438
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1166
439
 
1167
- # @!attribute tier_lower_bound
440
+ # @!attribute license_type_id
441
+ # The ID of the license type to associate with this price.
1168
442
  #
1169
- # @return [String]
1170
- required :tier_lower_bound, String
443
+ # @return [String, nil]
444
+ optional :license_type_id, String, nil?: true
445
+
446
+ # @!attribute metadata
447
+ # User-specified key/value pairs for the resource. Individual keys can be removed
448
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
449
+ # by setting `metadata` to `null`.
450
+ #
451
+ # @return [Hash{Symbol=>String, nil}, nil]
452
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
1171
453
 
1172
- # @!method initialize(per_unit:, tier_lower_bound:)
1173
- # Configuration for a single tier
454
+ # @!method initialize(cadence:, currency:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :matrix_with_threshold_discounts)
455
+ # Some parameter documentations has been truncated, see
456
+ # {Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts} for more
457
+ # details.
458
+ #
459
+ # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on.
460
+ #
461
+ # @param currency [String] An ISO 4217 currency string for which this price is billed in.
462
+ #
463
+ # @param item_id [String] The id of the item the price will be associated with.
1174
464
  #
1175
- # @param per_unit [String] Per package
465
+ # @param matrix_with_threshold_discounts_config [Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing
1176
466
  #
1177
- # @param tier_lower_bound [String]
467
+ # @param name [String] The name of the price.
468
+ #
469
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
470
+ #
471
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
472
+ #
473
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
474
+ #
475
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
476
+ #
477
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
478
+ #
479
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
480
+ #
481
+ # @param external_price_id [String, nil] An alias for the price.
482
+ #
483
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
484
+ #
485
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
486
+ #
487
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
488
+ #
489
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
490
+ #
491
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
492
+ #
493
+ # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type
494
+
495
+ # The cadence to bill for this price on.
496
+ #
497
+ # @see Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts#cadence
498
+ module Cadence
499
+ extend Orb::Internal::Type::Enum
500
+
501
+ ANNUAL = :annual
502
+ SEMI_ANNUAL = :semi_annual
503
+ MONTHLY = :monthly
504
+ QUARTERLY = :quarterly
505
+ ONE_TIME = :one_time
506
+ CUSTOM = :custom
507
+
508
+ # @!method self.values
509
+ # @return [Array<Symbol>]
510
+ end
511
+
512
+ # @see Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config
513
+ class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel
514
+ # @!attribute default_unit_amount
515
+ # Unit price used for usage that does not match any defined matrix cell.
516
+ #
517
+ # @return [String]
518
+ required :default_unit_amount, String
519
+
520
+ # @!attribute first_dimension
521
+ # First matrix dimension key.
522
+ #
523
+ # @return [String]
524
+ required :first_dimension, String
525
+
526
+ # @!attribute matrix_values
527
+ # Per-cell unit prices.
528
+ #
529
+ # @return [Array<Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue>]
530
+ required :matrix_values,
531
+ -> do
532
+ Orb::Internal::Type::ArrayOf[
533
+ Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue
534
+ ]
535
+ end
536
+
537
+ # @!attribute second_dimension
538
+ # Optional second matrix dimension key.
539
+ #
540
+ # @return [String, nil]
541
+ optional :second_dimension, String, nil?: true
542
+
543
+ # @!attribute threshold_discount_groups
544
+ #
545
+ # @return [Array<Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup>, nil]
546
+ optional :threshold_discount_groups,
547
+ -> do
548
+ Orb::Internal::Type::ArrayOf[
549
+ Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup
550
+ ]
551
+ end
552
+
553
+ # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil)
554
+ # Configuration for matrix_with_threshold_discounts pricing
555
+ #
556
+ # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell.
557
+ #
558
+ # @param first_dimension [String] First matrix dimension key.
559
+ #
560
+ # @param matrix_values [Array<Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue>] Per-cell unit prices.
561
+ #
562
+ # @param second_dimension [String, nil] Optional second matrix dimension key.
563
+ #
564
+ # @param threshold_discount_groups [Array<Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup>]
565
+
566
+ class MatrixValue < Orb::Internal::Type::BaseModel
567
+ # @!attribute first_dimension_value
568
+ #
569
+ # @return [String]
570
+ required :first_dimension_value, String
571
+
572
+ # @!attribute unit_amount
573
+ #
574
+ # @return [String]
575
+ required :unit_amount, String
576
+
577
+ # @!attribute second_dimension_value
578
+ #
579
+ # @return [String, nil]
580
+ optional :second_dimension_value, String, nil?: true
581
+
582
+ # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil)
583
+ # @param first_dimension_value [String]
584
+ # @param unit_amount [String]
585
+ # @param second_dimension_value [String, nil]
586
+ end
587
+
588
+ class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel
589
+ # @!attribute above_threshold_discount_percentage
590
+ # Discount rate applied to spend above the threshold.
591
+ #
592
+ # @return [String]
593
+ required :above_threshold_discount_percentage, String
594
+
595
+ # @!attribute below_threshold_discount_percentage
596
+ # Discount rate applied to spend at or below the threshold. Set to 0 for no
597
+ # baseline discount.
598
+ #
599
+ # @return [String]
600
+ required :below_threshold_discount_percentage, String
601
+
602
+ # @!attribute cell_coordinates
603
+ # Semicolon-separated list of matrix cell coordinates targeted by this group. Each
604
+ # coordinate is `first,second` when the matrix has two dimensions, or just `first`
605
+ # for a single-dimension matrix. Example: `blue,circle;green,triangle`.
606
+ #
607
+ # @return [String]
608
+ required :cell_coordinates, String
609
+
610
+ # @!attribute threshold_amount
611
+ #
612
+ # @return [String]
613
+ required :threshold_amount, String
614
+
615
+ # @!attribute description
616
+ #
617
+ # @return [String, nil]
618
+ optional :description, String, nil?: true
619
+
620
+ # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil)
621
+ # Some parameter documentations has been truncated, see
622
+ # {Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup}
623
+ # for more details.
624
+ #
625
+ # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold.
626
+ #
627
+ # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli
628
+ #
629
+ # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each
630
+ #
631
+ # @param threshold_amount [String]
632
+ #
633
+ # @param description [String, nil]
634
+ end
635
+ end
1178
636
  end
1179
- end
1180
637
 
1181
- class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel
1182
- # @!attribute grouping_key
1183
- # The event property used to group before tiering the group with the highest value
1184
- #
1185
- # @return [String]
1186
- required :grouping_key, String
1187
-
1188
- # @!attribute package_size
1189
- #
1190
- # @return [String]
1191
- required :package_size, String
1192
-
1193
- # @!attribute tiers
1194
- # Apply tiered pricing to the largest group after grouping with the provided key.
1195
- #
1196
- # @return [Array<Orb::Models::PriceCreateParams::MaxGroupTieredPackageConfig::Tier>]
1197
- required :tiers,
1198
- -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::MaxGroupTieredPackageConfig::Tier] }
1199
-
1200
- # @!method initialize(grouping_key:, package_size:, tiers:)
1201
- # Some parameter documentations has been truncated, see
1202
- # {Orb::Models::PriceCreateParams::MaxGroupTieredPackageConfig} for more details.
1203
- #
1204
- # Configuration for max_group_tiered_package pricing
1205
- #
1206
- # @param grouping_key [String] The event property used to group before tiering the group with the highest value
1207
- #
1208
- # @param package_size [String]
1209
- #
1210
- # @param tiers [Array<Orb::Models::PriceCreateParams::MaxGroupTieredPackageConfig::Tier>] Apply tiered pricing to the largest group after grouping with the provided key.
1211
-
1212
- class Tier < Orb::Internal::Type::BaseModel
1213
- # @!attribute tier_lower_bound
638
+ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel
639
+ # @!attribute cadence
640
+ # The cadence to bill for this price on.
1214
641
  #
1215
- # @return [String]
1216
- required :tier_lower_bound, String
642
+ # @return [Symbol, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence]
643
+ required :cadence, enum: -> { Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence }
1217
644
 
1218
- # @!attribute unit_amount
1219
- # Per unit amount
645
+ # @!attribute currency
646
+ # An ISO 4217 currency string for which this price is billed in.
1220
647
  #
1221
648
  # @return [String]
1222
- required :unit_amount, String
649
+ required :currency, String
1223
650
 
1224
- # @!method initialize(tier_lower_bound:, unit_amount:)
1225
- # Configuration for a single tier
1226
- #
1227
- # @param tier_lower_bound [String]
651
+ # @!attribute grouped_with_min_max_thresholds_config
652
+ # Configuration for grouped_with_min_max_thresholds pricing
1228
653
  #
1229
- # @param unit_amount [String] Per unit amount
1230
- end
1231
- end
654
+ # @return [Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig]
655
+ required :grouped_with_min_max_thresholds_config,
656
+ -> { Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig }
1232
657
 
1233
- class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel
1234
- # @!attribute first_dimension
1235
- # Used to determine the unit rate
1236
- #
1237
- # @return [String]
1238
- required :first_dimension, String
1239
-
1240
- # @!attribute matrix_scaling_factors
1241
- # Apply a scaling factor to each dimension
1242
- #
1243
- # @return [Array<Orb::Models::PriceCreateParams::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor>]
1244
- required :matrix_scaling_factors,
1245
- -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor] }
1246
-
1247
- # @!attribute unit_price
1248
- # The final unit price to rate against the output of the matrix
1249
- #
1250
- # @return [String]
1251
- required :unit_price, String
1252
-
1253
- # @!attribute grouping_key
1254
- # The property used to group this price
1255
- #
1256
- # @return [String, nil]
1257
- optional :grouping_key, String, nil?: true
1258
-
1259
- # @!attribute prorate
1260
- # If true, the unit price will be prorated to the billing period
1261
- #
1262
- # @return [Boolean, nil]
1263
- optional :prorate, Orb::Internal::Type::Boolean, nil?: true
1264
-
1265
- # @!attribute second_dimension
1266
- # Used to determine the unit rate (optional)
1267
- #
1268
- # @return [String, nil]
1269
- optional :second_dimension, String, nil?: true
1270
-
1271
- # @!method initialize(first_dimension:, matrix_scaling_factors:, unit_price:, grouping_key: nil, prorate: nil, second_dimension: nil)
1272
- # Configuration for scalable_matrix_with_unit_pricing pricing
1273
- #
1274
- # @param first_dimension [String] Used to determine the unit rate
1275
- #
1276
- # @param matrix_scaling_factors [Array<Orb::Models::PriceCreateParams::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor>] Apply a scaling factor to each dimension
1277
- #
1278
- # @param unit_price [String] The final unit price to rate against the output of the matrix
1279
- #
1280
- # @param grouping_key [String, nil] The property used to group this price
1281
- #
1282
- # @param prorate [Boolean, nil] If true, the unit price will be prorated to the billing period
1283
- #
1284
- # @param second_dimension [String, nil] Used to determine the unit rate (optional)
1285
-
1286
- class MatrixScalingFactor < Orb::Internal::Type::BaseModel
1287
- # @!attribute first_dimension_value
658
+ # @!attribute item_id
659
+ # The id of the item the price will be associated with.
1288
660
  #
1289
661
  # @return [String]
1290
- required :first_dimension_value, String
662
+ required :item_id, String
663
+
664
+ # @!attribute model_type
665
+ # The pricing model type
666
+ #
667
+ # @return [Symbol, :grouped_with_min_max_thresholds]
668
+ required :model_type, const: :grouped_with_min_max_thresholds
1291
669
 
1292
- # @!attribute scaling_factor
670
+ # @!attribute name
671
+ # The name of the price.
1293
672
  #
1294
673
  # @return [String]
1295
- required :scaling_factor, String
674
+ required :name, String
1296
675
 
1297
- # @!attribute second_dimension_value
676
+ # @!attribute billable_metric_id
677
+ # The id of the billable metric for the price. Only needed if the price is
678
+ # usage-based.
1298
679
  #
1299
680
  # @return [String, nil]
1300
- optional :second_dimension_value, String, nil?: true
681
+ optional :billable_metric_id, String, nil?: true
1301
682
 
1302
- # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil)
1303
- # Configuration for a single matrix scaling factor
683
+ # @!attribute billed_in_advance
684
+ # If the Price represents a fixed cost, the price will be billed in-advance if
685
+ # this is true, and in-arrears if this is false.
1304
686
  #
1305
- # @param first_dimension_value [String]
1306
- # @param scaling_factor [String]
1307
- # @param second_dimension_value [String, nil]
1308
- end
1309
- end
687
+ # @return [Boolean, nil]
688
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
1310
689
 
1311
- class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel
1312
- # @!attribute first_dimension
1313
- # Used for the scalable matrix first dimension
1314
- #
1315
- # @return [String]
1316
- required :first_dimension, String
1317
-
1318
- # @!attribute matrix_scaling_factors
1319
- # Apply a scaling factor to each dimension
1320
- #
1321
- # @return [Array<Orb::Models::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor>]
1322
- required :matrix_scaling_factors,
1323
- -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor] }
1324
-
1325
- # @!attribute tiers
1326
- #
1327
- # @return [Array<Orb::Models::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::Tier>]
1328
- required :tiers,
1329
- -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::Tier] }
1330
-
1331
- # @!attribute second_dimension
1332
- # Used for the scalable matrix second dimension (optional)
1333
- #
1334
- # @return [String, nil]
1335
- optional :second_dimension, String, nil?: true
1336
-
1337
- # @!method initialize(first_dimension:, matrix_scaling_factors:, tiers:, second_dimension: nil)
1338
- # Configuration for scalable_matrix_with_tiered_pricing pricing
1339
- #
1340
- # @param first_dimension [String] Used for the scalable matrix first dimension
1341
- #
1342
- # @param matrix_scaling_factors [Array<Orb::Models::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor>] Apply a scaling factor to each dimension
1343
- #
1344
- # @param tiers [Array<Orb::Models::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::Tier>]
1345
- #
1346
- # @param second_dimension [String, nil] Used for the scalable matrix second dimension (optional)
1347
-
1348
- class MatrixScalingFactor < Orb::Internal::Type::BaseModel
1349
- # @!attribute first_dimension_value
690
+ # @!attribute billing_cycle_configuration
691
+ # For custom cadence: specifies the duration of the billing period in days or
692
+ # months.
1350
693
  #
1351
- # @return [String]
1352
- required :first_dimension_value, String
694
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
695
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1353
696
 
1354
- # @!attribute scaling_factor
697
+ # @!attribute conversion_rate
698
+ # The per unit conversion rate of the price currency to the invoicing currency.
1355
699
  #
1356
- # @return [String]
1357
- required :scaling_factor, String
700
+ # @return [Float, nil]
701
+ optional :conversion_rate, Float, nil?: true
1358
702
 
1359
- # @!attribute second_dimension_value
703
+ # @!attribute conversion_rate_config
704
+ # The configuration for the rate of the price currency to the invoicing currency.
1360
705
  #
1361
- # @return [String, nil]
1362
- optional :second_dimension_value, String, nil?: true
706
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
707
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1363
708
 
1364
- # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil)
1365
- # Configuration for a single matrix scaling factor
709
+ # @!attribute dimensional_price_configuration
710
+ # For dimensional price: specifies a price group and dimension values
1366
711
  #
1367
- # @param first_dimension_value [String]
1368
- # @param scaling_factor [String]
1369
- # @param second_dimension_value [String, nil]
1370
- end
712
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
713
+ optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true
1371
714
 
1372
- class Tier < Orb::Internal::Type::BaseModel
1373
- # @!attribute tier_lower_bound
715
+ # @!attribute external_price_id
716
+ # An alias for the price.
1374
717
  #
1375
- # @return [String]
1376
- required :tier_lower_bound, String
718
+ # @return [String, nil]
719
+ optional :external_price_id, String, nil?: true
1377
720
 
1378
- # @!attribute unit_amount
721
+ # @!attribute fixed_price_quantity
722
+ # If the Price represents a fixed cost, this represents the quantity of units
723
+ # applied.
1379
724
  #
1380
- # @return [String]
1381
- required :unit_amount, String
725
+ # @return [Float, nil]
726
+ optional :fixed_price_quantity, Float, nil?: true
1382
727
 
1383
- # @!method initialize(tier_lower_bound:, unit_amount:)
1384
- # Configuration for a single tier entry with business logic
728
+ # @!attribute invoice_grouping_key
729
+ # The property used to group this price on an invoice
1385
730
  #
1386
- # @param tier_lower_bound [String]
1387
- # @param unit_amount [String]
1388
- end
1389
- end
731
+ # @return [String, nil]
732
+ optional :invoice_grouping_key, String, nil?: true
1390
733
 
1391
- class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel
1392
- # @!attribute dimension_values
1393
- # Each tier lower bound must have the same group of values.
1394
- #
1395
- # @return [Array<Orb::Models::PriceCreateParams::CumulativeGroupedBulkConfig::DimensionValue>]
1396
- required :dimension_values,
1397
- -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::CumulativeGroupedBulkConfig::DimensionValue] }
1398
-
1399
- # @!attribute group
1400
- #
1401
- # @return [String]
1402
- required :group, String
1403
-
1404
- # @!method initialize(dimension_values:, group:)
1405
- # Configuration for cumulative_grouped_bulk pricing
1406
- #
1407
- # @param dimension_values [Array<Orb::Models::PriceCreateParams::CumulativeGroupedBulkConfig::DimensionValue>] Each tier lower bound must have the same group of values.
1408
- #
1409
- # @param group [String]
1410
-
1411
- class DimensionValue < Orb::Internal::Type::BaseModel
1412
- # @!attribute grouping_key
1413
- # Grouping key value
734
+ # @!attribute invoicing_cycle_configuration
735
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
736
+ # If unspecified, a single invoice is produced per billing cycle.
1414
737
  #
1415
- # @return [String]
1416
- required :grouping_key, String
738
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
739
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1417
740
 
1418
- # @!attribute tier_lower_bound
1419
- # Tier lower bound
741
+ # @!attribute license_type_id
742
+ # The ID of the license type to associate with this price.
1420
743
  #
1421
- # @return [String]
1422
- required :tier_lower_bound, String
744
+ # @return [String, nil]
745
+ optional :license_type_id, String, nil?: true
1423
746
 
1424
- # @!attribute unit_amount
1425
- # Unit amount for this combination
747
+ # @!attribute metadata
748
+ # User-specified key/value pairs for the resource. Individual keys can be removed
749
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
750
+ # by setting `metadata` to `null`.
1426
751
  #
1427
- # @return [String]
1428
- required :unit_amount, String
752
+ # @return [Hash{Symbol=>String, nil}, nil]
753
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
1429
754
 
1430
- # @!method initialize(grouping_key:, tier_lower_bound:, unit_amount:)
1431
- # Configuration for a dimension value entry
755
+ # @!method initialize(cadence:, currency:, grouped_with_min_max_thresholds_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :grouped_with_min_max_thresholds)
756
+ # Some parameter documentations has been truncated, see
757
+ # {Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds} for more
758
+ # details.
1432
759
  #
1433
- # @param grouping_key [String] Grouping key value
760
+ # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on.
1434
761
  #
1435
- # @param tier_lower_bound [String] Tier lower bound
762
+ # @param currency [String] An ISO 4217 currency string for which this price is billed in.
1436
763
  #
1437
- # @param unit_amount [String] Unit amount for this combination
1438
- end
1439
- end
1440
-
1441
- class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel
1442
- # @!attribute cumulative_allocation
1443
- # The overall allocation across all groups
1444
- #
1445
- # @return [String]
1446
- required :cumulative_allocation, String
1447
-
1448
- # @!attribute group_allocation
1449
- # The allocation per individual group
1450
- #
1451
- # @return [String]
1452
- required :group_allocation, String
1453
-
1454
- # @!attribute grouping_key
1455
- # The event property used to group usage before applying allocations
1456
- #
1457
- # @return [String]
1458
- required :grouping_key, String
1459
-
1460
- # @!attribute unit_amount
1461
- # The amount to charge for each unit outside of the allocation
1462
- #
1463
- # @return [String]
1464
- required :unit_amount, String
1465
-
1466
- # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:)
1467
- # Configuration for cumulative_grouped_allocation pricing
1468
- #
1469
- # @param cumulative_allocation [String] The overall allocation across all groups
1470
- #
1471
- # @param group_allocation [String] The allocation per individual group
1472
- #
1473
- # @param grouping_key [String] The event property used to group usage before applying allocations
1474
- #
1475
- # @param unit_amount [String] The amount to charge for each unit outside of the allocation
1476
- end
1477
-
1478
- class MinimumCompositeConfig < Orb::Internal::Type::BaseModel
1479
- # @!attribute minimum_amount
1480
- # The minimum amount to apply
1481
- #
1482
- # @return [String]
1483
- required :minimum_amount, String
1484
-
1485
- # @!attribute prorated
1486
- # If true, subtotals from this price are prorated based on the service period
1487
- #
1488
- # @return [Boolean, nil]
1489
- optional :prorated, Orb::Internal::Type::Boolean
1490
-
1491
- # @!method initialize(minimum_amount:, prorated: nil)
1492
- # Configuration for minimum_composite pricing
1493
- #
1494
- # @param minimum_amount [String] The minimum amount to apply
1495
- #
1496
- # @param prorated [Boolean] If true, subtotals from this price are prorated based on the service period
1497
- end
1498
-
1499
- class PercentConfig < Orb::Internal::Type::BaseModel
1500
- # @!attribute percent
1501
- # What percent of the component subtotals to charge
1502
- #
1503
- # @return [Float]
1504
- required :percent, Float
1505
-
1506
- # @!method initialize(percent:)
1507
- # Configuration for percent pricing
1508
- #
1509
- # @param percent [Float] What percent of the component subtotals to charge
1510
- end
764
+ # @param grouped_with_min_max_thresholds_config [Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing
765
+ #
766
+ # @param item_id [String] The id of the item the price will be associated with.
767
+ #
768
+ # @param name [String] The name of the price.
769
+ #
770
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
771
+ #
772
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
773
+ #
774
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
775
+ #
776
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
777
+ #
778
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
779
+ #
780
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
781
+ #
782
+ # @param external_price_id [String, nil] An alias for the price.
783
+ #
784
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
785
+ #
786
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
787
+ #
788
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
789
+ #
790
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
791
+ #
792
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
793
+ #
794
+ # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type
795
+
796
+ # The cadence to bill for this price on.
797
+ #
798
+ # @see Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds#cadence
799
+ module Cadence
800
+ extend Orb::Internal::Type::Enum
801
+
802
+ ANNUAL = :annual
803
+ SEMI_ANNUAL = :semi_annual
804
+ MONTHLY = :monthly
805
+ QUARTERLY = :quarterly
806
+ ONE_TIME = :one_time
807
+ CUSTOM = :custom
808
+
809
+ # @!method self.values
810
+ # @return [Array<Symbol>]
811
+ end
812
+
813
+ # @see Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config
814
+ class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel
815
+ # @!attribute grouping_key
816
+ # The event property used to group before applying thresholds
817
+ #
818
+ # @return [String]
819
+ required :grouping_key, String
820
+
821
+ # @!attribute maximum_charge
822
+ # The maximum amount to charge each group
823
+ #
824
+ # @return [String]
825
+ required :maximum_charge, String
826
+
827
+ # @!attribute minimum_charge
828
+ # The minimum amount to charge each group, regardless of usage
829
+ #
830
+ # @return [String]
831
+ required :minimum_charge, String
832
+
833
+ # @!attribute per_unit_rate
834
+ # The base price charged per group
835
+ #
836
+ # @return [String]
837
+ required :per_unit_rate, String
838
+
839
+ # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:)
840
+ # Configuration for grouped_with_min_max_thresholds pricing
841
+ #
842
+ # @param grouping_key [String] The event property used to group before applying thresholds
843
+ #
844
+ # @param maximum_charge [String] The maximum amount to charge each group
845
+ #
846
+ # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage
847
+ #
848
+ # @param per_unit_rate [String] The base price charged per group
849
+ end
850
+ end
851
+
852
+ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel
853
+ # @!attribute cadence
854
+ # The cadence to bill for this price on.
855
+ #
856
+ # @return [Symbol, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence]
857
+ required :cadence, enum: -> { Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence }
858
+
859
+ # @!attribute cumulative_grouped_allocation_config
860
+ # Configuration for cumulative_grouped_allocation pricing
861
+ #
862
+ # @return [Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig]
863
+ required :cumulative_grouped_allocation_config,
864
+ -> { Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig }
865
+
866
+ # @!attribute currency
867
+ # An ISO 4217 currency string for which this price is billed in.
868
+ #
869
+ # @return [String]
870
+ required :currency, String
871
+
872
+ # @!attribute item_id
873
+ # The id of the item the price will be associated with.
874
+ #
875
+ # @return [String]
876
+ required :item_id, String
877
+
878
+ # @!attribute model_type
879
+ # The pricing model type
880
+ #
881
+ # @return [Symbol, :cumulative_grouped_allocation]
882
+ required :model_type, const: :cumulative_grouped_allocation
883
+
884
+ # @!attribute name
885
+ # The name of the price.
886
+ #
887
+ # @return [String]
888
+ required :name, String
889
+
890
+ # @!attribute billable_metric_id
891
+ # The id of the billable metric for the price. Only needed if the price is
892
+ # usage-based.
893
+ #
894
+ # @return [String, nil]
895
+ optional :billable_metric_id, String, nil?: true
896
+
897
+ # @!attribute billed_in_advance
898
+ # If the Price represents a fixed cost, the price will be billed in-advance if
899
+ # this is true, and in-arrears if this is false.
900
+ #
901
+ # @return [Boolean, nil]
902
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
903
+
904
+ # @!attribute billing_cycle_configuration
905
+ # For custom cadence: specifies the duration of the billing period in days or
906
+ # months.
907
+ #
908
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
909
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
910
+
911
+ # @!attribute conversion_rate
912
+ # The per unit conversion rate of the price currency to the invoicing currency.
913
+ #
914
+ # @return [Float, nil]
915
+ optional :conversion_rate, Float, nil?: true
916
+
917
+ # @!attribute conversion_rate_config
918
+ # The configuration for the rate of the price currency to the invoicing currency.
919
+ #
920
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
921
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
922
+
923
+ # @!attribute dimensional_price_configuration
924
+ # For dimensional price: specifies a price group and dimension values
925
+ #
926
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
927
+ optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true
928
+
929
+ # @!attribute external_price_id
930
+ # An alias for the price.
931
+ #
932
+ # @return [String, nil]
933
+ optional :external_price_id, String, nil?: true
934
+
935
+ # @!attribute fixed_price_quantity
936
+ # If the Price represents a fixed cost, this represents the quantity of units
937
+ # applied.
938
+ #
939
+ # @return [Float, nil]
940
+ optional :fixed_price_quantity, Float, nil?: true
941
+
942
+ # @!attribute invoice_grouping_key
943
+ # The property used to group this price on an invoice
944
+ #
945
+ # @return [String, nil]
946
+ optional :invoice_grouping_key, String, nil?: true
947
+
948
+ # @!attribute invoicing_cycle_configuration
949
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
950
+ # If unspecified, a single invoice is produced per billing cycle.
951
+ #
952
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
953
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
954
+
955
+ # @!attribute license_type_id
956
+ # The ID of the license type to associate with this price.
957
+ #
958
+ # @return [String, nil]
959
+ optional :license_type_id, String, nil?: true
960
+
961
+ # @!attribute metadata
962
+ # User-specified key/value pairs for the resource. Individual keys can be removed
963
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
964
+ # by setting `metadata` to `null`.
965
+ #
966
+ # @return [Hash{Symbol=>String, nil}, nil]
967
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
968
+
969
+ # @!method initialize(cadence:, cumulative_grouped_allocation_config:, currency:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :cumulative_grouped_allocation)
970
+ # Some parameter documentations has been truncated, see
971
+ # {Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation} for more
972
+ # details.
973
+ #
974
+ # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on.
975
+ #
976
+ # @param cumulative_grouped_allocation_config [Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing
977
+ #
978
+ # @param currency [String] An ISO 4217 currency string for which this price is billed in.
979
+ #
980
+ # @param item_id [String] The id of the item the price will be associated with.
981
+ #
982
+ # @param name [String] The name of the price.
983
+ #
984
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
985
+ #
986
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
987
+ #
988
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
989
+ #
990
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
991
+ #
992
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
993
+ #
994
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
995
+ #
996
+ # @param external_price_id [String, nil] An alias for the price.
997
+ #
998
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
999
+ #
1000
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
1001
+ #
1002
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
1003
+ #
1004
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
1005
+ #
1006
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
1007
+ #
1008
+ # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type
1009
+
1010
+ # The cadence to bill for this price on.
1011
+ #
1012
+ # @see Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation#cadence
1013
+ module Cadence
1014
+ extend Orb::Internal::Type::Enum
1015
+
1016
+ ANNUAL = :annual
1017
+ SEMI_ANNUAL = :semi_annual
1018
+ MONTHLY = :monthly
1019
+ QUARTERLY = :quarterly
1020
+ ONE_TIME = :one_time
1021
+ CUSTOM = :custom
1022
+
1023
+ # @!method self.values
1024
+ # @return [Array<Symbol>]
1025
+ end
1026
+
1027
+ # @see Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation#cumulative_grouped_allocation_config
1028
+ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel
1029
+ # @!attribute cumulative_allocation
1030
+ # The overall allocation across all groups
1031
+ #
1032
+ # @return [String]
1033
+ required :cumulative_allocation, String
1034
+
1035
+ # @!attribute group_allocation
1036
+ # The allocation per individual group
1037
+ #
1038
+ # @return [String]
1039
+ required :group_allocation, String
1040
+
1041
+ # @!attribute grouping_key
1042
+ # The event property used to group usage before applying allocations
1043
+ #
1044
+ # @return [String]
1045
+ required :grouping_key, String
1046
+
1047
+ # @!attribute unit_amount
1048
+ # The amount to charge for each unit outside of the allocation
1049
+ #
1050
+ # @return [String]
1051
+ required :unit_amount, String
1052
+
1053
+ # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:)
1054
+ # Configuration for cumulative_grouped_allocation pricing
1055
+ #
1056
+ # @param cumulative_allocation [String] The overall allocation across all groups
1057
+ #
1058
+ # @param group_allocation [String] The allocation per individual group
1059
+ #
1060
+ # @param grouping_key [String] The event property used to group usage before applying allocations
1061
+ #
1062
+ # @param unit_amount [String] The amount to charge for each unit outside of the allocation
1063
+ end
1064
+ end
1065
+
1066
+ class DailyCreditAllowance < Orb::Internal::Type::BaseModel
1067
+ # @!attribute cadence
1068
+ # The cadence to bill for this price on.
1069
+ #
1070
+ # @return [Symbol, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::Cadence]
1071
+ required :cadence, enum: -> { Orb::PriceCreateParams::Body::DailyCreditAllowance::Cadence }
1072
+
1073
+ # @!attribute currency
1074
+ # An ISO 4217 currency string for which this price is billed in.
1075
+ #
1076
+ # @return [String]
1077
+ required :currency, String
1078
+
1079
+ # @!attribute daily_credit_allowance_config
1080
+ # Configuration for daily_credit_allowance pricing
1081
+ #
1082
+ # @return [Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig]
1083
+ required :daily_credit_allowance_config,
1084
+ -> { Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig }
1085
+
1086
+ # @!attribute item_id
1087
+ # The id of the item the price will be associated with.
1088
+ #
1089
+ # @return [String]
1090
+ required :item_id, String
1091
+
1092
+ # @!attribute model_type
1093
+ # The pricing model type
1094
+ #
1095
+ # @return [Symbol, :daily_credit_allowance]
1096
+ required :model_type, const: :daily_credit_allowance
1097
+
1098
+ # @!attribute name
1099
+ # The name of the price.
1100
+ #
1101
+ # @return [String]
1102
+ required :name, String
1103
+
1104
+ # @!attribute billable_metric_id
1105
+ # The id of the billable metric for the price. Only needed if the price is
1106
+ # usage-based.
1107
+ #
1108
+ # @return [String, nil]
1109
+ optional :billable_metric_id, String, nil?: true
1110
+
1111
+ # @!attribute billed_in_advance
1112
+ # If the Price represents a fixed cost, the price will be billed in-advance if
1113
+ # this is true, and in-arrears if this is false.
1114
+ #
1115
+ # @return [Boolean, nil]
1116
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
1117
+
1118
+ # @!attribute billing_cycle_configuration
1119
+ # For custom cadence: specifies the duration of the billing period in days or
1120
+ # months.
1121
+ #
1122
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
1123
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1124
+
1125
+ # @!attribute conversion_rate
1126
+ # The per unit conversion rate of the price currency to the invoicing currency.
1127
+ #
1128
+ # @return [Float, nil]
1129
+ optional :conversion_rate, Float, nil?: true
1130
+
1131
+ # @!attribute conversion_rate_config
1132
+ # The configuration for the rate of the price currency to the invoicing currency.
1133
+ #
1134
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
1135
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1136
+
1137
+ # @!attribute dimensional_price_configuration
1138
+ # For dimensional price: specifies a price group and dimension values
1139
+ #
1140
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
1141
+ optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true
1142
+
1143
+ # @!attribute external_price_id
1144
+ # An alias for the price.
1145
+ #
1146
+ # @return [String, nil]
1147
+ optional :external_price_id, String, nil?: true
1148
+
1149
+ # @!attribute fixed_price_quantity
1150
+ # If the Price represents a fixed cost, this represents the quantity of units
1151
+ # applied.
1152
+ #
1153
+ # @return [Float, nil]
1154
+ optional :fixed_price_quantity, Float, nil?: true
1155
+
1156
+ # @!attribute invoice_grouping_key
1157
+ # The property used to group this price on an invoice
1158
+ #
1159
+ # @return [String, nil]
1160
+ optional :invoice_grouping_key, String, nil?: true
1161
+
1162
+ # @!attribute invoicing_cycle_configuration
1163
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
1164
+ # If unspecified, a single invoice is produced per billing cycle.
1165
+ #
1166
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
1167
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1168
+
1169
+ # @!attribute license_type_id
1170
+ # The ID of the license type to associate with this price.
1171
+ #
1172
+ # @return [String, nil]
1173
+ optional :license_type_id, String, nil?: true
1174
+
1175
+ # @!attribute metadata
1176
+ # User-specified key/value pairs for the resource. Individual keys can be removed
1177
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
1178
+ # by setting `metadata` to `null`.
1179
+ #
1180
+ # @return [Hash{Symbol=>String, nil}, nil]
1181
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
1182
+
1183
+ # @!method initialize(cadence:, currency:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :daily_credit_allowance)
1184
+ # Some parameter documentations has been truncated, see
1185
+ # {Orb::Models::PriceCreateParams::Body::DailyCreditAllowance} for more details.
1186
+ #
1187
+ # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::Cadence] The cadence to bill for this price on.
1188
+ #
1189
+ # @param currency [String] An ISO 4217 currency string for which this price is billed in.
1190
+ #
1191
+ # @param daily_credit_allowance_config [Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing
1192
+ #
1193
+ # @param item_id [String] The id of the item the price will be associated with.
1194
+ #
1195
+ # @param name [String] The name of the price.
1196
+ #
1197
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
1198
+ #
1199
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
1200
+ #
1201
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
1202
+ #
1203
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
1204
+ #
1205
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
1206
+ #
1207
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
1208
+ #
1209
+ # @param external_price_id [String, nil] An alias for the price.
1210
+ #
1211
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
1212
+ #
1213
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
1214
+ #
1215
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
1216
+ #
1217
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
1218
+ #
1219
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
1220
+ #
1221
+ # @param model_type [Symbol, :daily_credit_allowance] The pricing model type
1222
+
1223
+ # The cadence to bill for this price on.
1224
+ #
1225
+ # @see Orb::Models::PriceCreateParams::Body::DailyCreditAllowance#cadence
1226
+ module Cadence
1227
+ extend Orb::Internal::Type::Enum
1228
+
1229
+ ANNUAL = :annual
1230
+ SEMI_ANNUAL = :semi_annual
1231
+ MONTHLY = :monthly
1232
+ QUARTERLY = :quarterly
1233
+ ONE_TIME = :one_time
1234
+ CUSTOM = :custom
1235
+
1236
+ # @!method self.values
1237
+ # @return [Array<Symbol>]
1238
+ end
1239
+
1240
+ # @see Orb::Models::PriceCreateParams::Body::DailyCreditAllowance#daily_credit_allowance_config
1241
+ class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel
1242
+ # @!attribute daily_allowance
1243
+ # Credits granted per day. Lose-it-or-use-it; does not roll over.
1244
+ #
1245
+ # @return [String]
1246
+ required :daily_allowance, String
1247
+
1248
+ # @!attribute default_unit_amount
1249
+ # Default per-unit credit rate for any usage not bucketed into a specified
1250
+ # matrix_value
1251
+ #
1252
+ # @return [String]
1253
+ required :default_unit_amount, String
1254
+
1255
+ # @!attribute dimensions
1256
+ # One or two event property values to evaluate matrix groups by
1257
+ #
1258
+ # @return [Array<String, nil>]
1259
+ required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true]
1260
+
1261
+ # @!attribute event_day_property
1262
+ # Event property whose value identifies the day bucket the event belongs to (e.g.
1263
+ # 'event_day' set to an ISO date string in the customer's timezone). The allowance
1264
+ # resets per distinct value of this property.
1265
+ #
1266
+ # @return [String]
1267
+ required :event_day_property, String
1268
+
1269
+ # @!attribute matrix_values
1270
+ # Per-dimension credit rates
1271
+ #
1272
+ # @return [Array<Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue>]
1273
+ required :matrix_values,
1274
+ -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue] }
1275
+
1276
+ # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:)
1277
+ # Some parameter documentations has been truncated, see
1278
+ # {Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig}
1279
+ # for more details.
1280
+ #
1281
+ # Configuration for daily_credit_allowance pricing
1282
+ #
1283
+ # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over.
1284
+ #
1285
+ # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified
1286
+ # matrix\_
1287
+ #
1288
+ # @param dimensions [Array<String, nil>] One or two event property values to evaluate matrix groups by
1289
+ #
1290
+ # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g.
1291
+ #
1292
+ # @param matrix_values [Array<Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue>] Per-dimension credit rates
1293
+
1294
+ class MatrixValue < Orb::Internal::Type::BaseModel
1295
+ # @!attribute dimension_values
1296
+ # One or two matrix keys to filter usage to this value by. For example, ["model"]
1297
+ # could be used to apply a different credit rate to each AI model.
1298
+ #
1299
+ # @return [Array<String, nil>]
1300
+ required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true]
1301
+
1302
+ # @!attribute unit_amount
1303
+ # Credits charged per unit of usage matching the specified dimension_values
1304
+ #
1305
+ # @return [String]
1306
+ required :unit_amount, String
1307
+
1308
+ # @!method initialize(dimension_values:, unit_amount:)
1309
+ # Some parameter documentations has been truncated, see
1310
+ # {Orb::Models::PriceCreateParams::Body::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue}
1311
+ # for more details.
1312
+ #
1313
+ # Per-dimension credit price for the daily credit allowance model.
1314
+ #
1315
+ # @param dimension_values [Array<String, nil>] One or two matrix keys to filter usage to this value by. For example, ["model"]
1316
+ #
1317
+ # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values
1318
+ end
1319
+ end
1320
+ end
1321
+
1322
+ class MeteredAllowance < Orb::Internal::Type::BaseModel
1323
+ # @!attribute cadence
1324
+ # The cadence to bill for this price on.
1325
+ #
1326
+ # @return [Symbol, Orb::Models::PriceCreateParams::Body::MeteredAllowance::Cadence]
1327
+ required :cadence, enum: -> { Orb::PriceCreateParams::Body::MeteredAllowance::Cadence }
1328
+
1329
+ # @!attribute currency
1330
+ # An ISO 4217 currency string for which this price is billed in.
1331
+ #
1332
+ # @return [String]
1333
+ required :currency, String
1334
+
1335
+ # @!attribute item_id
1336
+ # The id of the item the price will be associated with.
1337
+ #
1338
+ # @return [String]
1339
+ required :item_id, String
1340
+
1341
+ # @!attribute metered_allowance_config
1342
+ # Configuration for metered_allowance pricing
1343
+ #
1344
+ # @return [Orb::Models::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig]
1345
+ required :metered_allowance_config,
1346
+ -> { Orb::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig }
1347
+
1348
+ # @!attribute model_type
1349
+ # The pricing model type
1350
+ #
1351
+ # @return [Symbol, :metered_allowance]
1352
+ required :model_type, const: :metered_allowance
1353
+
1354
+ # @!attribute name
1355
+ # The name of the price.
1356
+ #
1357
+ # @return [String]
1358
+ required :name, String
1359
+
1360
+ # @!attribute billable_metric_id
1361
+ # The id of the billable metric for the price. Only needed if the price is
1362
+ # usage-based.
1363
+ #
1364
+ # @return [String, nil]
1365
+ optional :billable_metric_id, String, nil?: true
1366
+
1367
+ # @!attribute billed_in_advance
1368
+ # If the Price represents a fixed cost, the price will be billed in-advance if
1369
+ # this is true, and in-arrears if this is false.
1370
+ #
1371
+ # @return [Boolean, nil]
1372
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
1373
+
1374
+ # @!attribute billing_cycle_configuration
1375
+ # For custom cadence: specifies the duration of the billing period in days or
1376
+ # months.
1377
+ #
1378
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
1379
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1380
+
1381
+ # @!attribute conversion_rate
1382
+ # The per unit conversion rate of the price currency to the invoicing currency.
1383
+ #
1384
+ # @return [Float, nil]
1385
+ optional :conversion_rate, Float, nil?: true
1386
+
1387
+ # @!attribute conversion_rate_config
1388
+ # The configuration for the rate of the price currency to the invoicing currency.
1389
+ #
1390
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
1391
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1392
+
1393
+ # @!attribute dimensional_price_configuration
1394
+ # For dimensional price: specifies a price group and dimension values
1395
+ #
1396
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
1397
+ optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true
1398
+
1399
+ # @!attribute external_price_id
1400
+ # An alias for the price.
1401
+ #
1402
+ # @return [String, nil]
1403
+ optional :external_price_id, String, nil?: true
1404
+
1405
+ # @!attribute fixed_price_quantity
1406
+ # If the Price represents a fixed cost, this represents the quantity of units
1407
+ # applied.
1408
+ #
1409
+ # @return [Float, nil]
1410
+ optional :fixed_price_quantity, Float, nil?: true
1411
+
1412
+ # @!attribute invoice_grouping_key
1413
+ # The property used to group this price on an invoice
1414
+ #
1415
+ # @return [String, nil]
1416
+ optional :invoice_grouping_key, String, nil?: true
1417
+
1418
+ # @!attribute invoicing_cycle_configuration
1419
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
1420
+ # If unspecified, a single invoice is produced per billing cycle.
1421
+ #
1422
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
1423
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1424
+
1425
+ # @!attribute license_type_id
1426
+ # The ID of the license type to associate with this price.
1427
+ #
1428
+ # @return [String, nil]
1429
+ optional :license_type_id, String, nil?: true
1430
+
1431
+ # @!attribute metadata
1432
+ # User-specified key/value pairs for the resource. Individual keys can be removed
1433
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
1434
+ # by setting `metadata` to `null`.
1435
+ #
1436
+ # @return [Hash{Symbol=>String, nil}, nil]
1437
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
1438
+
1439
+ # @!method initialize(cadence:, currency:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :metered_allowance)
1440
+ # Some parameter documentations has been truncated, see
1441
+ # {Orb::Models::PriceCreateParams::Body::MeteredAllowance} for more details.
1442
+ #
1443
+ # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::MeteredAllowance::Cadence] The cadence to bill for this price on.
1444
+ #
1445
+ # @param currency [String] An ISO 4217 currency string for which this price is billed in.
1446
+ #
1447
+ # @param item_id [String] The id of the item the price will be associated with.
1448
+ #
1449
+ # @param metered_allowance_config [Orb::Models::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing
1450
+ #
1451
+ # @param name [String] The name of the price.
1452
+ #
1453
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
1454
+ #
1455
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
1456
+ #
1457
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
1458
+ #
1459
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
1460
+ #
1461
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
1462
+ #
1463
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
1464
+ #
1465
+ # @param external_price_id [String, nil] An alias for the price.
1466
+ #
1467
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
1468
+ #
1469
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
1470
+ #
1471
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
1472
+ #
1473
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
1474
+ #
1475
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
1476
+ #
1477
+ # @param model_type [Symbol, :metered_allowance] The pricing model type
1478
+
1479
+ # The cadence to bill for this price on.
1480
+ #
1481
+ # @see Orb::Models::PriceCreateParams::Body::MeteredAllowance#cadence
1482
+ module Cadence
1483
+ extend Orb::Internal::Type::Enum
1484
+
1485
+ ANNUAL = :annual
1486
+ SEMI_ANNUAL = :semi_annual
1487
+ MONTHLY = :monthly
1488
+ QUARTERLY = :quarterly
1489
+ ONE_TIME = :one_time
1490
+ CUSTOM = :custom
1491
+
1492
+ # @!method self.values
1493
+ # @return [Array<Symbol>]
1494
+ end
1495
+
1496
+ # @see Orb::Models::PriceCreateParams::Body::MeteredAllowance#metered_allowance_config
1497
+ class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel
1498
+ # @!attribute allowance_grouping_value
1499
+ # The grouping_key value whose summed quantity represents the allowance for this
1500
+ # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
1501
+ # — credit can never exceed actual usage.
1502
+ #
1503
+ # @return [String]
1504
+ required :allowance_grouping_value, String
1505
+
1506
+ # @!attribute consumption_grouping_value
1507
+ # The grouping_key value whose summed quantity represents consumption (e.g.
1508
+ # 'download'). Charged at unit_amount.
1509
+ #
1510
+ # @return [String]
1511
+ required :consumption_grouping_value, String
1512
+
1513
+ # @!attribute grouping_key
1514
+ # Event property used to partition the metric into consumption and allowance
1515
+ # quantities (e.g. 'event_name'). The metric is queried with this key and the two
1516
+ # values below select which partition is which.
1517
+ #
1518
+ # @return [String]
1519
+ required :grouping_key, String
1520
+
1521
+ # @!attribute unit_amount
1522
+ # Per-unit price applied to gross consumption and to the allowance credit.
1523
+ #
1524
+ # @return [String]
1525
+ required :unit_amount, String
1526
+
1527
+ # @!attribute allowance_display_name
1528
+ # Sub-line label for the credit row (e.g. 'Up to 3x free egress').
1529
+ #
1530
+ # @return [String, nil]
1531
+ optional :allowance_display_name, String
1532
+
1533
+ # @!attribute consumption_display_name
1534
+ # Sub-line label for the gross consumption row (e.g. 'bytes gotten').
1535
+ #
1536
+ # @return [String, nil]
1537
+ optional :consumption_display_name, String
1538
+
1539
+ # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil)
1540
+ # Some parameter documentations has been truncated, see
1541
+ # {Orb::Models::PriceCreateParams::Body::MeteredAllowance::MeteredAllowanceConfig}
1542
+ # for more details.
1543
+ #
1544
+ # Configuration for metered_allowance pricing
1545
+ #
1546
+ # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p
1547
+ #
1548
+ # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl
1549
+ #
1550
+ # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant
1551
+ #
1552
+ # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit.
1553
+ #
1554
+ # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress').
1555
+ #
1556
+ # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten').
1557
+ end
1558
+ end
1559
+
1560
+ class Percent < Orb::Internal::Type::BaseModel
1561
+ # @!attribute cadence
1562
+ # The cadence to bill for this price on.
1563
+ #
1564
+ # @return [Symbol, Orb::Models::PriceCreateParams::Body::Percent::Cadence]
1565
+ required :cadence, enum: -> { Orb::PriceCreateParams::Body::Percent::Cadence }
1566
+
1567
+ # @!attribute currency
1568
+ # An ISO 4217 currency string for which this price is billed in.
1569
+ #
1570
+ # @return [String]
1571
+ required :currency, String
1572
+
1573
+ # @!attribute item_id
1574
+ # The id of the item the price will be associated with.
1575
+ #
1576
+ # @return [String]
1577
+ required :item_id, String
1578
+
1579
+ # @!attribute model_type
1580
+ # The pricing model type
1581
+ #
1582
+ # @return [Symbol, :percent]
1583
+ required :model_type, const: :percent
1584
+
1585
+ # @!attribute name
1586
+ # The name of the price.
1587
+ #
1588
+ # @return [String]
1589
+ required :name, String
1590
+
1591
+ # @!attribute percent_config
1592
+ # Configuration for percent pricing
1593
+ #
1594
+ # @return [Orb::Models::PriceCreateParams::Body::Percent::PercentConfig]
1595
+ required :percent_config, -> { Orb::PriceCreateParams::Body::Percent::PercentConfig }
1596
+
1597
+ # @!attribute billable_metric_id
1598
+ # The id of the billable metric for the price. Only needed if the price is
1599
+ # usage-based.
1600
+ #
1601
+ # @return [String, nil]
1602
+ optional :billable_metric_id, String, nil?: true
1603
+
1604
+ # @!attribute billed_in_advance
1605
+ # If the Price represents a fixed cost, the price will be billed in-advance if
1606
+ # this is true, and in-arrears if this is false.
1607
+ #
1608
+ # @return [Boolean, nil]
1609
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
1610
+
1611
+ # @!attribute billing_cycle_configuration
1612
+ # For custom cadence: specifies the duration of the billing period in days or
1613
+ # months.
1614
+ #
1615
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
1616
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1617
+
1618
+ # @!attribute conversion_rate
1619
+ # The per unit conversion rate of the price currency to the invoicing currency.
1620
+ #
1621
+ # @return [Float, nil]
1622
+ optional :conversion_rate, Float, nil?: true
1623
+
1624
+ # @!attribute conversion_rate_config
1625
+ # The configuration for the rate of the price currency to the invoicing currency.
1626
+ #
1627
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
1628
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1629
+
1630
+ # @!attribute dimensional_price_configuration
1631
+ # For dimensional price: specifies a price group and dimension values
1632
+ #
1633
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
1634
+ optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true
1635
+
1636
+ # @!attribute external_price_id
1637
+ # An alias for the price.
1638
+ #
1639
+ # @return [String, nil]
1640
+ optional :external_price_id, String, nil?: true
1641
+
1642
+ # @!attribute fixed_price_quantity
1643
+ # If the Price represents a fixed cost, this represents the quantity of units
1644
+ # applied.
1645
+ #
1646
+ # @return [Float, nil]
1647
+ optional :fixed_price_quantity, Float, nil?: true
1648
+
1649
+ # @!attribute invoice_grouping_key
1650
+ # The property used to group this price on an invoice
1651
+ #
1652
+ # @return [String, nil]
1653
+ optional :invoice_grouping_key, String, nil?: true
1654
+
1655
+ # @!attribute invoicing_cycle_configuration
1656
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
1657
+ # If unspecified, a single invoice is produced per billing cycle.
1658
+ #
1659
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
1660
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1661
+
1662
+ # @!attribute license_type_id
1663
+ # The ID of the license type to associate with this price.
1664
+ #
1665
+ # @return [String, nil]
1666
+ optional :license_type_id, String, nil?: true
1667
+
1668
+ # @!attribute metadata
1669
+ # User-specified key/value pairs for the resource. Individual keys can be removed
1670
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
1671
+ # by setting `metadata` to `null`.
1672
+ #
1673
+ # @return [Hash{Symbol=>String, nil}, nil]
1674
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
1675
+
1676
+ # @!method initialize(cadence:, currency:, item_id:, name:, percent_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :percent)
1677
+ # Some parameter documentations has been truncated, see
1678
+ # {Orb::Models::PriceCreateParams::Body::Percent} for more details.
1679
+ #
1680
+ # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::Percent::Cadence] The cadence to bill for this price on.
1681
+ #
1682
+ # @param currency [String] An ISO 4217 currency string for which this price is billed in.
1683
+ #
1684
+ # @param item_id [String] The id of the item the price will be associated with.
1685
+ #
1686
+ # @param name [String] The name of the price.
1687
+ #
1688
+ # @param percent_config [Orb::Models::PriceCreateParams::Body::Percent::PercentConfig] Configuration for percent pricing
1689
+ #
1690
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
1691
+ #
1692
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
1693
+ #
1694
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
1695
+ #
1696
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
1697
+ #
1698
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
1699
+ #
1700
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
1701
+ #
1702
+ # @param external_price_id [String, nil] An alias for the price.
1703
+ #
1704
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
1705
+ #
1706
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
1707
+ #
1708
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
1709
+ #
1710
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
1711
+ #
1712
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
1713
+ #
1714
+ # @param model_type [Symbol, :percent] The pricing model type
1715
+
1716
+ # The cadence to bill for this price on.
1717
+ #
1718
+ # @see Orb::Models::PriceCreateParams::Body::Percent#cadence
1719
+ module Cadence
1720
+ extend Orb::Internal::Type::Enum
1721
+
1722
+ ANNUAL = :annual
1723
+ SEMI_ANNUAL = :semi_annual
1724
+ MONTHLY = :monthly
1725
+ QUARTERLY = :quarterly
1726
+ ONE_TIME = :one_time
1727
+ CUSTOM = :custom
1728
+
1729
+ # @!method self.values
1730
+ # @return [Array<Symbol>]
1731
+ end
1732
+
1733
+ # @see Orb::Models::PriceCreateParams::Body::Percent#percent_config
1734
+ class PercentConfig < Orb::Internal::Type::BaseModel
1735
+ # @!attribute percent
1736
+ # Fraction of the component subtotals to charge (0 < percent <= 1).
1737
+ #
1738
+ # @return [Float]
1739
+ required :percent, Float
1740
+
1741
+ # @!attribute maximum_amount
1742
+ # Maximum amount to charge. If unset, the fee has no upper bound.
1743
+ #
1744
+ # @return [String, nil]
1745
+ optional :maximum_amount, String, nil?: true
1746
+
1747
+ # @!attribute minimum_amount
1748
+ # Minimum amount to charge. If unset, the fee is bounded below by 0.
1749
+ #
1750
+ # @return [String, nil]
1751
+ optional :minimum_amount, String, nil?: true
1752
+
1753
+ # @!attribute prorated
1754
+ # If true, the minimum_amount is prorated based on the service period. The
1755
+ # maximum_amount is an absolute cap (never prorated), and the percent applied to
1756
+ # upstream subtotals is never prorated either.
1757
+ #
1758
+ # @return [Boolean, nil]
1759
+ optional :prorated, Orb::Internal::Type::Boolean
1760
+
1761
+ # @!method initialize(percent:, maximum_amount: nil, minimum_amount: nil, prorated: nil)
1762
+ # Some parameter documentations has been truncated, see
1763
+ # {Orb::Models::PriceCreateParams::Body::Percent::PercentConfig} for more details.
1764
+ #
1765
+ # Configuration for percent pricing
1766
+ #
1767
+ # @param percent [Float] Fraction of the component subtotals to charge (0 < percent <= 1).
1768
+ #
1769
+ # @param maximum_amount [String, nil] Maximum amount to charge. If unset, the fee has no upper bound.
1770
+ #
1771
+ # @param minimum_amount [String, nil] Minimum amount to charge. If unset, the fee is bounded below by 0.
1772
+ #
1773
+ # @param prorated [Boolean] If true, the minimum_amount is prorated based on the service period. The maximum
1774
+ end
1775
+ end
1776
+
1777
+ class EventOutput < Orb::Internal::Type::BaseModel
1778
+ # @!attribute cadence
1779
+ # The cadence to bill for this price on.
1780
+ #
1781
+ # @return [Symbol, Orb::Models::PriceCreateParams::Body::EventOutput::Cadence]
1782
+ required :cadence, enum: -> { Orb::PriceCreateParams::Body::EventOutput::Cadence }
1783
+
1784
+ # @!attribute currency
1785
+ # An ISO 4217 currency string for which this price is billed in.
1786
+ #
1787
+ # @return [String]
1788
+ required :currency, String
1789
+
1790
+ # @!attribute event_output_config
1791
+ # Configuration for event_output pricing
1792
+ #
1793
+ # @return [Orb::Models::PriceCreateParams::Body::EventOutput::EventOutputConfig]
1794
+ required :event_output_config, -> { Orb::PriceCreateParams::Body::EventOutput::EventOutputConfig }
1795
+
1796
+ # @!attribute item_id
1797
+ # The id of the item the price will be associated with.
1798
+ #
1799
+ # @return [String]
1800
+ required :item_id, String
1801
+
1802
+ # @!attribute model_type
1803
+ # The pricing model type
1804
+ #
1805
+ # @return [Symbol, :event_output]
1806
+ required :model_type, const: :event_output
1807
+
1808
+ # @!attribute name
1809
+ # The name of the price.
1810
+ #
1811
+ # @return [String]
1812
+ required :name, String
1813
+
1814
+ # @!attribute billable_metric_id
1815
+ # The id of the billable metric for the price. Only needed if the price is
1816
+ # usage-based.
1817
+ #
1818
+ # @return [String, nil]
1819
+ optional :billable_metric_id, String, nil?: true
1820
+
1821
+ # @!attribute billed_in_advance
1822
+ # If the Price represents a fixed cost, the price will be billed in-advance if
1823
+ # this is true, and in-arrears if this is false.
1824
+ #
1825
+ # @return [Boolean, nil]
1826
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
1827
+
1828
+ # @!attribute billing_cycle_configuration
1829
+ # For custom cadence: specifies the duration of the billing period in days or
1830
+ # months.
1831
+ #
1832
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
1833
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1834
+
1835
+ # @!attribute conversion_rate
1836
+ # The per unit conversion rate of the price currency to the invoicing currency.
1837
+ #
1838
+ # @return [Float, nil]
1839
+ optional :conversion_rate, Float, nil?: true
1840
+
1841
+ # @!attribute conversion_rate_config
1842
+ # The configuration for the rate of the price currency to the invoicing currency.
1843
+ #
1844
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
1845
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1846
+
1847
+ # @!attribute dimensional_price_configuration
1848
+ # For dimensional price: specifies a price group and dimension values
1849
+ #
1850
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
1851
+ optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true
1852
+
1853
+ # @!attribute external_price_id
1854
+ # An alias for the price.
1855
+ #
1856
+ # @return [String, nil]
1857
+ optional :external_price_id, String, nil?: true
1858
+
1859
+ # @!attribute fixed_price_quantity
1860
+ # If the Price represents a fixed cost, this represents the quantity of units
1861
+ # applied.
1862
+ #
1863
+ # @return [Float, nil]
1864
+ optional :fixed_price_quantity, Float, nil?: true
1865
+
1866
+ # @!attribute invoice_grouping_key
1867
+ # The property used to group this price on an invoice
1868
+ #
1869
+ # @return [String, nil]
1870
+ optional :invoice_grouping_key, String, nil?: true
1871
+
1872
+ # @!attribute invoicing_cycle_configuration
1873
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
1874
+ # If unspecified, a single invoice is produced per billing cycle.
1875
+ #
1876
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
1877
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1878
+
1879
+ # @!attribute license_type_id
1880
+ # The ID of the license type to associate with this price.
1881
+ #
1882
+ # @return [String, nil]
1883
+ optional :license_type_id, String, nil?: true
1884
+
1885
+ # @!attribute metadata
1886
+ # User-specified key/value pairs for the resource. Individual keys can be removed
1887
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
1888
+ # by setting `metadata` to `null`.
1889
+ #
1890
+ # @return [Hash{Symbol=>String, nil}, nil]
1891
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
1892
+
1893
+ # @!method initialize(cadence:, currency:, event_output_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :event_output)
1894
+ # Some parameter documentations has been truncated, see
1895
+ # {Orb::Models::PriceCreateParams::Body::EventOutput} for more details.
1896
+ #
1897
+ # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::EventOutput::Cadence] The cadence to bill for this price on.
1898
+ #
1899
+ # @param currency [String] An ISO 4217 currency string for which this price is billed in.
1900
+ #
1901
+ # @param event_output_config [Orb::Models::PriceCreateParams::Body::EventOutput::EventOutputConfig] Configuration for event_output pricing
1902
+ #
1903
+ # @param item_id [String] The id of the item the price will be associated with.
1904
+ #
1905
+ # @param name [String] The name of the price.
1906
+ #
1907
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
1908
+ #
1909
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
1910
+ #
1911
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
1912
+ #
1913
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
1914
+ #
1915
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
1916
+ #
1917
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
1918
+ #
1919
+ # @param external_price_id [String, nil] An alias for the price.
1920
+ #
1921
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
1922
+ #
1923
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
1924
+ #
1925
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
1926
+ #
1927
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
1928
+ #
1929
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
1930
+ #
1931
+ # @param model_type [Symbol, :event_output] The pricing model type
1932
+
1933
+ # The cadence to bill for this price on.
1934
+ #
1935
+ # @see Orb::Models::PriceCreateParams::Body::EventOutput#cadence
1936
+ module Cadence
1937
+ extend Orb::Internal::Type::Enum
1938
+
1939
+ ANNUAL = :annual
1940
+ SEMI_ANNUAL = :semi_annual
1941
+ MONTHLY = :monthly
1942
+ QUARTERLY = :quarterly
1943
+ ONE_TIME = :one_time
1944
+ CUSTOM = :custom
1945
+
1946
+ # @!method self.values
1947
+ # @return [Array<Symbol>]
1948
+ end
1949
+
1950
+ # @see Orb::Models::PriceCreateParams::Body::EventOutput#event_output_config
1951
+ class EventOutputConfig < Orb::Internal::Type::BaseModel
1952
+ # @!attribute unit_rating_key
1953
+ # The key in the event data to extract the unit rate from.
1954
+ #
1955
+ # @return [String]
1956
+ required :unit_rating_key, String
1957
+
1958
+ # @!attribute default_unit_rate
1959
+ # If provided, this amount will be used as the unit rate when an event does not
1960
+ # have a value for the `unit_rating_key`. If not provided, events missing a unit
1961
+ # rate will be ignored.
1962
+ #
1963
+ # @return [String, nil]
1964
+ optional :default_unit_rate, String, nil?: true
1965
+
1966
+ # @!attribute grouping_key
1967
+ # An optional key in the event data to group by (e.g., event ID). All events will
1968
+ # also be grouped by their unit rate.
1969
+ #
1970
+ # @return [String, nil]
1971
+ optional :grouping_key, String, nil?: true
1972
+
1973
+ # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil)
1974
+ # Some parameter documentations has been truncated, see
1975
+ # {Orb::Models::PriceCreateParams::Body::EventOutput::EventOutputConfig} for more
1976
+ # details.
1977
+ #
1978
+ # Configuration for event_output pricing
1979
+ #
1980
+ # @param unit_rating_key [String] The key in the event data to extract the unit rate from.
1981
+ #
1982
+ # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha
1983
+ #
1984
+ # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will
1985
+ end
1986
+ end
1511
1987
 
1512
- class EventOutputConfig < Orb::Internal::Type::BaseModel
1513
- # @!attribute unit_rating_key
1514
- # The key in the event data to extract the unit rate from.
1515
- #
1516
- # @return [String]
1517
- required :unit_rating_key, String
1518
-
1519
- # @!attribute default_unit_rate
1520
- # If provided, this amount will be used as the unit rate when an event does not
1521
- # have a value for the `unit_rating_key`. If not provided, events missing a unit
1522
- # rate will be ignored.
1523
- #
1524
- # @return [String, nil]
1525
- optional :default_unit_rate, String, nil?: true
1526
-
1527
- # @!attribute grouping_key
1528
- # An optional key in the event data to group by (e.g., event ID). All events will
1529
- # also be grouped by their unit rate.
1530
- #
1531
- # @return [String, nil]
1532
- optional :grouping_key, String, nil?: true
1533
-
1534
- # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil)
1535
- # Some parameter documentations has been truncated, see
1536
- # {Orb::Models::PriceCreateParams::EventOutputConfig} for more details.
1537
- #
1538
- # Configuration for event_output pricing
1539
- #
1540
- # @param unit_rating_key [String] The key in the event data to extract the unit rate from.
1541
- #
1542
- # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha
1543
- #
1544
- # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will
1988
+ # @!method self.variants
1989
+ # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::PriceCreateParams::Body::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::PriceCreateParams::Body::DailyCreditAllowance, Orb::Models::PriceCreateParams::Body::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput)]
1545
1990
  end
1546
1991
  end
1547
1992
  end