orb-billing 1.13.0 → 1.14.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 (356) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +43 -0
  3. data/README.md +1 -1
  4. data/lib/orb/client.rb +7 -0
  5. data/lib/orb/internal/util.rb +22 -7
  6. data/lib/orb/models/alert.rb +10 -1
  7. data/lib/orb/models/alert_create_for_customer_params.rb +8 -1
  8. data/lib/orb/models/alert_create_for_external_customer_params.rb +8 -1
  9. data/lib/orb/models/alert_create_for_subscription_params.rb +29 -1
  10. data/lib/orb/models/alert_disable_params.rb +8 -1
  11. data/lib/orb/models/alert_enable_params.rb +8 -1
  12. data/lib/orb/models/alert_retrieve_params.rb +7 -1
  13. data/lib/orb/models/alert_update_params.rb +8 -1
  14. data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +17769 -414
  15. data/lib/orb/models/beta/external_plan_id_fetch_plan_version_params.rb +7 -1
  16. data/lib/orb/models/beta/external_plan_id_set_default_plan_version_params.rb +8 -1
  17. data/lib/orb/models/beta_create_plan_version_params.rb +17633 -406
  18. data/lib/orb/models/beta_fetch_plan_version_params.rb +7 -1
  19. data/lib/orb/models/beta_set_default_plan_version_params.rb +8 -1
  20. data/lib/orb/models/coupon_archive_params.rb +7 -1
  21. data/lib/orb/models/coupon_fetch_params.rb +7 -1
  22. data/lib/orb/models/coupons/subscription_list_params.rb +8 -1
  23. data/lib/orb/models/credit_block_delete_params.rb +7 -1
  24. data/lib/orb/models/credit_block_list_invoices_params.rb +7 -1
  25. data/lib/orb/models/credit_block_retrieve_params.rb +7 -1
  26. data/lib/orb/models/credit_note_fetch_params.rb +7 -1
  27. data/lib/orb/models/customer.rb +13 -1
  28. data/lib/orb/models/customer_create_params.rb +12 -1
  29. data/lib/orb/models/customer_delete_params.rb +7 -1
  30. data/lib/orb/models/customer_fetch_by_external_id_params.rb +7 -1
  31. data/lib/orb/models/customer_fetch_params.rb +7 -1
  32. data/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rb +7 -1
  33. data/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rb +7 -1
  34. data/lib/orb/models/customer_update_by_external_id_params.rb +25 -5
  35. data/lib/orb/models/customer_update_params.rb +25 -5
  36. data/lib/orb/models/customers/balance_transaction_create_params.rb +8 -1
  37. data/lib/orb/models/customers/balance_transaction_list_params.rb +8 -1
  38. data/lib/orb/models/customers/cost_list_by_external_id_params.rb +8 -1
  39. data/lib/orb/models/customers/cost_list_params.rb +8 -1
  40. data/lib/orb/models/customers/credit_list_by_external_id_params.rb +8 -1
  41. data/lib/orb/models/customers/credit_list_params.rb +8 -1
  42. data/lib/orb/models/customers/credits/decrement_ledger_entry.rb +5 -1
  43. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +582 -315
  44. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +580 -313
  45. data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +8 -1
  46. data/lib/orb/models/customers/credits/ledger_list_params.rb +8 -1
  47. data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +8 -1
  48. data/lib/orb/models/customers/credits/top_up_create_params.rb +8 -1
  49. data/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rb +7 -1
  50. data/lib/orb/models/customers/credits/top_up_delete_params.rb +7 -1
  51. data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +8 -1
  52. data/lib/orb/models/customers/credits/top_up_list_params.rb +8 -1
  53. data/lib/orb/models/dimensional_price_group_retrieve_params.rb +7 -1
  54. data/lib/orb/models/dimensional_price_group_update_params.rb +8 -1
  55. data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rb +7 -1
  56. data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rb +8 -1
  57. data/lib/orb/models/event_deprecate_params.rb +7 -1
  58. data/lib/orb/models/event_update_params.rb +8 -1
  59. data/lib/orb/models/events/backfill_close_params.rb +7 -1
  60. data/lib/orb/models/events/backfill_fetch_params.rb +7 -1
  61. data/lib/orb/models/events/backfill_revert_params.rb +7 -1
  62. data/lib/orb/models/invoice_delete_line_item_params.rb +7 -1
  63. data/lib/orb/models/invoice_fetch_params.rb +7 -1
  64. data/lib/orb/models/invoice_issue_params.rb +8 -1
  65. data/lib/orb/models/invoice_issue_summary_params.rb +8 -1
  66. data/lib/orb/models/invoice_mark_paid_params.rb +8 -1
  67. data/lib/orb/models/invoice_pay_params.rb +16 -1
  68. data/lib/orb/models/invoice_update_params.rb +8 -1
  69. data/lib/orb/models/invoice_void_params.rb +7 -1
  70. data/lib/orb/models/item_archive_params.rb +7 -1
  71. data/lib/orb/models/item_fetch_params.rb +7 -1
  72. data/lib/orb/models/item_update_params.rb +8 -1
  73. data/lib/orb/models/license_deactivate_params.rb +8 -1
  74. data/lib/orb/models/license_retrieve_by_external_id_params.rb +8 -1
  75. data/lib/orb/models/license_retrieve_params.rb +7 -1
  76. data/lib/orb/models/license_type_retrieve_params.rb +7 -1
  77. data/lib/orb/models/licenses/external_license_get_usage_params.rb +8 -1
  78. data/lib/orb/models/licenses/usage_get_usage_params.rb +8 -1
  79. data/lib/orb/models/metric_fetch_params.rb +7 -1
  80. data/lib/orb/models/metric_update_params.rb +8 -1
  81. data/lib/orb/models/plan_create_params.rb +8502 -1
  82. data/lib/orb/models/plan_fetch_params.rb +7 -1
  83. data/lib/orb/models/plan_update_params.rb +8 -1
  84. data/lib/orb/models/plans/external_plan_id_fetch_params.rb +7 -1
  85. data/lib/orb/models/plans/external_plan_id_update_params.rb +8 -1
  86. data/lib/orb/models/plans/migration_cancel_params.rb +7 -1
  87. data/lib/orb/models/plans/migration_list_params.rb +8 -1
  88. data/lib/orb/models/plans/migration_retrieve_params.rb +7 -1
  89. data/lib/orb/models/price.rb +248 -31
  90. data/lib/orb/models/price_create_params.rb +949 -1321
  91. data/lib/orb/models/price_evaluate_params.rb +8 -1
  92. data/lib/orb/models/price_fetch_params.rb +7 -1
  93. data/lib/orb/models/price_update_params.rb +8 -1
  94. data/lib/orb/models/prices/external_price_id_fetch_params.rb +7 -1
  95. data/lib/orb/models/prices/external_price_id_update_params.rb +8 -1
  96. data/lib/orb/models/subscription_cancel_params.rb +8 -1
  97. data/lib/orb/models/subscription_change_apply_params.rb +8 -1
  98. data/lib/orb/models/subscription_change_cancel_params.rb +7 -1
  99. data/lib/orb/models/subscription_change_retrieve_params.rb +7 -1
  100. data/lib/orb/models/subscription_fetch_costs_params.rb +8 -1
  101. data/lib/orb/models/subscription_fetch_params.rb +7 -1
  102. data/lib/orb/models/subscription_fetch_schedule_params.rb +8 -1
  103. data/lib/orb/models/subscription_fetch_usage_params.rb +8 -1
  104. data/lib/orb/models/subscription_price_intervals_params.rb +8 -1
  105. data/lib/orb/models/subscription_redeem_coupon_params.rb +8 -1
  106. data/lib/orb/models/subscription_schedule_plan_change_params.rb +8 -1
  107. data/lib/orb/models/subscription_trigger_phase_params.rb +8 -1
  108. data/lib/orb/models/subscription_unschedule_cancellation_params.rb +7 -1
  109. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rb +8 -1
  110. data/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb +7 -1
  111. data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +8 -1
  112. data/lib/orb/models/subscription_update_params.rb +8 -1
  113. data/lib/orb/models/subscription_update_trial_params.rb +8 -1
  114. data/lib/orb/resources/alerts.rb +8 -1
  115. data/lib/orb/resources/coupons.rb +1 -2
  116. data/lib/orb/resources/credit_blocks.rb +11 -8
  117. data/lib/orb/resources/customers/credits/ledger.rb +12 -67
  118. data/lib/orb/resources/customers.rb +6 -5
  119. data/lib/orb/resources/events/backfills.rb +3 -4
  120. data/lib/orb/resources/invoices.rb +12 -5
  121. data/lib/orb/resources/prices.rb +9 -100
  122. data/lib/orb/resources/subscriptions.rb +4 -4
  123. data/lib/orb/version.rb +1 -1
  124. data/rbi/orb/client.rbi +6 -0
  125. data/rbi/orb/internal/util.rbi +8 -0
  126. data/rbi/orb/models/alert.rbi +10 -0
  127. data/rbi/orb/models/alert_create_for_customer_params.rbi +6 -0
  128. data/rbi/orb/models/alert_create_for_external_customer_params.rbi +6 -0
  129. data/rbi/orb/models/alert_create_for_subscription_params.rbi +26 -0
  130. data/rbi/orb/models/alert_disable_params.rbi +6 -0
  131. data/rbi/orb/models/alert_enable_params.rbi +6 -0
  132. data/rbi/orb/models/alert_retrieve_params.rbi +13 -5
  133. data/rbi/orb/models/alert_update_params.rbi +6 -0
  134. data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +30163 -889
  135. data/rbi/orb/models/beta/external_plan_id_fetch_plan_version_params.rbi +10 -2
  136. data/rbi/orb/models/beta/external_plan_id_set_default_plan_version_params.rbi +10 -1
  137. data/rbi/orb/models/beta_create_plan_version_params.rbi +30126 -884
  138. data/rbi/orb/models/beta_fetch_plan_version_params.rbi +10 -2
  139. data/rbi/orb/models/beta_set_default_plan_version_params.rbi +10 -1
  140. data/rbi/orb/models/coupon_archive_params.rbi +13 -5
  141. data/rbi/orb/models/coupon_fetch_params.rbi +13 -5
  142. data/rbi/orb/models/coupons/subscription_list_params.rbi +6 -0
  143. data/rbi/orb/models/credit_block_delete_params.rbi +13 -5
  144. data/rbi/orb/models/credit_block_list_invoices_params.rbi +13 -5
  145. data/rbi/orb/models/credit_block_retrieve_params.rbi +13 -5
  146. data/rbi/orb/models/credit_note_fetch_params.rbi +13 -5
  147. data/rbi/orb/models/customer.rbi +22 -0
  148. data/rbi/orb/models/customer_create_params.rbi +17 -0
  149. data/rbi/orb/models/customer_delete_params.rbi +13 -5
  150. data/rbi/orb/models/customer_fetch_by_external_id_params.rbi +13 -5
  151. data/rbi/orb/models/customer_fetch_params.rbi +13 -5
  152. data/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +13 -5
  153. data/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +13 -5
  154. data/rbi/orb/models/customer_update_by_external_id_params.rbi +31 -4
  155. data/rbi/orb/models/customer_update_params.rbi +31 -4
  156. data/rbi/orb/models/customers/balance_transaction_create_params.rbi +6 -0
  157. data/rbi/orb/models/customers/balance_transaction_list_params.rbi +6 -0
  158. data/rbi/orb/models/customers/cost_list_by_external_id_params.rbi +6 -0
  159. data/rbi/orb/models/customers/cost_list_params.rbi +6 -0
  160. data/rbi/orb/models/customers/credit_list_by_external_id_params.rbi +6 -0
  161. data/rbi/orb/models/customers/credit_list_params.rbi +6 -0
  162. data/rbi/orb/models/customers/credits/decrement_ledger_entry.rbi +4 -0
  163. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +861 -478
  164. data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +861 -478
  165. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +6 -0
  166. data/rbi/orb/models/customers/credits/ledger_list_params.rbi +6 -0
  167. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +6 -0
  168. data/rbi/orb/models/customers/credits/top_up_create_params.rbi +6 -0
  169. data/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +6 -1
  170. data/rbi/orb/models/customers/credits/top_up_delete_params.rbi +10 -2
  171. data/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +6 -0
  172. data/rbi/orb/models/customers/credits/top_up_list_params.rbi +6 -0
  173. data/rbi/orb/models/dimensional_price_group_retrieve_params.rbi +16 -5
  174. data/rbi/orb/models/dimensional_price_group_update_params.rbi +6 -0
  175. data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +16 -5
  176. data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbi +6 -0
  177. data/rbi/orb/models/event_deprecate_params.rbi +13 -5
  178. data/rbi/orb/models/event_update_params.rbi +6 -0
  179. data/rbi/orb/models/events/backfill_close_params.rbi +13 -5
  180. data/rbi/orb/models/events/backfill_fetch_params.rbi +13 -5
  181. data/rbi/orb/models/events/backfill_revert_params.rbi +13 -5
  182. data/rbi/orb/models/invoice_delete_line_item_params.rbi +10 -2
  183. data/rbi/orb/models/invoice_fetch_params.rbi +13 -5
  184. data/rbi/orb/models/invoice_issue_params.rbi +10 -1
  185. data/rbi/orb/models/invoice_issue_summary_params.rbi +10 -1
  186. data/rbi/orb/models/invoice_mark_paid_params.rbi +6 -0
  187. data/rbi/orb/models/invoice_pay_params.rbi +27 -5
  188. data/rbi/orb/models/invoice_update_params.rbi +6 -0
  189. data/rbi/orb/models/invoice_void_params.rbi +13 -5
  190. data/rbi/orb/models/item_archive_params.rbi +13 -5
  191. data/rbi/orb/models/item_fetch_params.rbi +13 -5
  192. data/rbi/orb/models/item_update_params.rbi +6 -0
  193. data/rbi/orb/models/license_deactivate_params.rbi +10 -1
  194. data/rbi/orb/models/license_retrieve_by_external_id_params.rbi +6 -0
  195. data/rbi/orb/models/license_retrieve_params.rbi +13 -5
  196. data/rbi/orb/models/license_type_retrieve_params.rbi +13 -5
  197. data/rbi/orb/models/licenses/external_license_get_usage_params.rbi +6 -0
  198. data/rbi/orb/models/licenses/usage_get_usage_params.rbi +6 -0
  199. data/rbi/orb/models/metric_fetch_params.rbi +13 -5
  200. data/rbi/orb/models/metric_update_params.rbi +6 -0
  201. data/rbi/orb/models/plan_create_params.rbi +14618 -0
  202. data/rbi/orb/models/plan_fetch_params.rbi +13 -5
  203. data/rbi/orb/models/plan_update_params.rbi +6 -0
  204. data/rbi/orb/models/plans/external_plan_id_fetch_params.rbi +13 -5
  205. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +6 -0
  206. data/rbi/orb/models/plans/migration_cancel_params.rbi +10 -2
  207. data/rbi/orb/models/plans/migration_list_params.rbi +6 -0
  208. data/rbi/orb/models/plans/migration_retrieve_params.rbi +10 -2
  209. data/rbi/orb/models/price.rbi +186 -0
  210. data/rbi/orb/models/price_create_params.rbi +1778 -2590
  211. data/rbi/orb/models/price_evaluate_params.rbi +6 -0
  212. data/rbi/orb/models/price_fetch_params.rbi +13 -5
  213. data/rbi/orb/models/price_update_params.rbi +6 -0
  214. data/rbi/orb/models/prices/external_price_id_fetch_params.rbi +13 -5
  215. data/rbi/orb/models/prices/external_price_id_update_params.rbi +6 -0
  216. data/rbi/orb/models/subscription_cancel_params.rbi +6 -0
  217. data/rbi/orb/models/subscription_change_apply_params.rbi +6 -0
  218. data/rbi/orb/models/subscription_change_cancel_params.rbi +16 -5
  219. data/rbi/orb/models/subscription_change_retrieve_params.rbi +16 -5
  220. data/rbi/orb/models/subscription_fetch_costs_params.rbi +6 -0
  221. data/rbi/orb/models/subscription_fetch_params.rbi +13 -5
  222. data/rbi/orb/models/subscription_fetch_schedule_params.rbi +6 -0
  223. data/rbi/orb/models/subscription_fetch_usage_params.rbi +6 -0
  224. data/rbi/orb/models/subscription_price_intervals_params.rbi +6 -0
  225. data/rbi/orb/models/subscription_redeem_coupon_params.rbi +6 -0
  226. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +6 -0
  227. data/rbi/orb/models/subscription_trigger_phase_params.rbi +6 -0
  228. data/rbi/orb/models/subscription_unschedule_cancellation_params.rbi +13 -5
  229. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +10 -1
  230. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +13 -5
  231. data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +6 -0
  232. data/rbi/orb/models/subscription_update_params.rbi +6 -0
  233. data/rbi/orb/models/subscription_update_trial_params.rbi +6 -0
  234. data/rbi/orb/resources/alerts.rbi +8 -0
  235. data/rbi/orb/resources/coupons.rbi +1 -2
  236. data/rbi/orb/resources/credit_blocks.rbi +10 -7
  237. data/rbi/orb/resources/customers/credits/ledger.rbi +22 -132
  238. data/rbi/orb/resources/customers.rbi +12 -7
  239. data/rbi/orb/resources/events/backfills.rbi +3 -4
  240. data/rbi/orb/resources/invoices.rbi +11 -3
  241. data/rbi/orb/resources/prices.rbi +35 -184
  242. data/rbi/orb/resources/subscriptions.rbi +4 -4
  243. data/sig/orb/client.rbs +3 -0
  244. data/sig/orb/internal/util.rbs +4 -0
  245. data/sig/orb/models/alert.rbs +5 -0
  246. data/sig/orb/models/alert_create_for_customer_params.rbs +5 -0
  247. data/sig/orb/models/alert_create_for_external_customer_params.rbs +5 -0
  248. data/sig/orb/models/alert_create_for_subscription_params.rbs +16 -1
  249. data/sig/orb/models/alert_disable_params.rbs +6 -1
  250. data/sig/orb/models/alert_enable_params.rbs +6 -1
  251. data/sig/orb/models/alert_retrieve_params.rbs +9 -3
  252. data/sig/orb/models/alert_update_params.rbs +5 -1
  253. data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +12092 -373
  254. data/sig/orb/models/beta/external_plan_id_fetch_plan_version_params.rbs +6 -1
  255. data/sig/orb/models/beta/external_plan_id_set_default_plan_version_params.rbs +6 -1
  256. data/sig/orb/models/beta_create_plan_version_params.rbs +12075 -370
  257. data/sig/orb/models/beta_fetch_plan_version_params.rbs +10 -2
  258. data/sig/orb/models/beta_set_default_plan_version_params.rbs +10 -2
  259. data/sig/orb/models/coupon_archive_params.rbs +12 -3
  260. data/sig/orb/models/coupon_fetch_params.rbs +12 -3
  261. data/sig/orb/models/coupons/subscription_list_params.rbs +5 -1
  262. data/sig/orb/models/credit_block_delete_params.rbs +8 -3
  263. data/sig/orb/models/credit_block_list_invoices_params.rbs +8 -3
  264. data/sig/orb/models/credit_block_retrieve_params.rbs +8 -3
  265. data/sig/orb/models/credit_note_fetch_params.rbs +11 -3
  266. data/sig/orb/models/customer.rbs +14 -2
  267. data/sig/orb/models/customer_create_params.rbs +12 -1
  268. data/sig/orb/models/customer_delete_params.rbs +12 -3
  269. data/sig/orb/models/customer_fetch_by_external_id_params.rbs +11 -3
  270. data/sig/orb/models/customer_fetch_params.rbs +12 -3
  271. data/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs +11 -3
  272. data/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs +11 -3
  273. data/sig/orb/models/customer_update_by_external_id_params.rbs +17 -1
  274. data/sig/orb/models/customer_update_params.rbs +17 -1
  275. data/sig/orb/models/customers/balance_transaction_create_params.rbs +5 -0
  276. data/sig/orb/models/customers/balance_transaction_list_params.rbs +5 -0
  277. data/sig/orb/models/customers/cost_list_by_external_id_params.rbs +5 -0
  278. data/sig/orb/models/customers/cost_list_params.rbs +5 -0
  279. data/sig/orb/models/customers/credit_list_by_external_id_params.rbs +5 -0
  280. data/sig/orb/models/customers/credit_list_params.rbs +5 -0
  281. data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +345 -157
  282. data/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +345 -157
  283. data/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs +5 -0
  284. data/sig/orb/models/customers/credits/ledger_list_params.rbs +5 -0
  285. data/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs +5 -0
  286. data/sig/orb/models/customers/credits/top_up_create_params.rbs +5 -0
  287. data/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs +5 -1
  288. data/sig/orb/models/customers/credits/top_up_delete_params.rbs +6 -1
  289. data/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs +5 -1
  290. data/sig/orb/models/customers/credits/top_up_list_params.rbs +5 -1
  291. data/sig/orb/models/dimensional_price_group_retrieve_params.rbs +12 -3
  292. data/sig/orb/models/dimensional_price_group_update_params.rbs +5 -0
  293. data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs +12 -3
  294. data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbs +5 -0
  295. data/sig/orb/models/event_deprecate_params.rbs +9 -3
  296. data/sig/orb/models/event_update_params.rbs +5 -0
  297. data/sig/orb/models/events/backfill_close_params.rbs +11 -3
  298. data/sig/orb/models/events/backfill_fetch_params.rbs +11 -3
  299. data/sig/orb/models/events/backfill_revert_params.rbs +11 -3
  300. data/sig/orb/models/invoice_delete_line_item_params.rbs +6 -1
  301. data/sig/orb/models/invoice_fetch_params.rbs +12 -3
  302. data/sig/orb/models/invoice_issue_params.rbs +6 -1
  303. data/sig/orb/models/invoice_issue_summary_params.rbs +6 -1
  304. data/sig/orb/models/invoice_mark_paid_params.rbs +10 -1
  305. data/sig/orb/models/invoice_pay_params.rbs +17 -3
  306. data/sig/orb/models/invoice_update_params.rbs +5 -0
  307. data/sig/orb/models/invoice_void_params.rbs +12 -3
  308. data/sig/orb/models/item_archive_params.rbs +9 -3
  309. data/sig/orb/models/item_fetch_params.rbs +9 -3
  310. data/sig/orb/models/item_update_params.rbs +5 -0
  311. data/sig/orb/models/license_deactivate_params.rbs +10 -2
  312. data/sig/orb/models/license_retrieve_by_external_id_params.rbs +9 -1
  313. data/sig/orb/models/license_retrieve_params.rbs +11 -3
  314. data/sig/orb/models/license_type_retrieve_params.rbs +11 -3
  315. data/sig/orb/models/licenses/external_license_get_usage_params.rbs +5 -0
  316. data/sig/orb/models/licenses/usage_get_usage_params.rbs +5 -0
  317. data/sig/orb/models/metric_fetch_params.rbs +12 -3
  318. data/sig/orb/models/metric_update_params.rbs +5 -1
  319. data/sig/orb/models/plan_create_params.rbs +5850 -0
  320. data/sig/orb/models/plan_fetch_params.rbs +9 -3
  321. data/sig/orb/models/plan_update_params.rbs +9 -1
  322. data/sig/orb/models/plans/external_plan_id_fetch_params.rbs +11 -3
  323. data/sig/orb/models/plans/external_plan_id_update_params.rbs +9 -1
  324. data/sig/orb/models/plans/migration_cancel_params.rbs +6 -1
  325. data/sig/orb/models/plans/migration_list_params.rbs +5 -1
  326. data/sig/orb/models/plans/migration_retrieve_params.rbs +6 -1
  327. data/sig/orb/models/price.rbs +155 -0
  328. data/sig/orb/models/price_create_params.rbs +616 -1011
  329. data/sig/orb/models/price_evaluate_params.rbs +5 -0
  330. data/sig/orb/models/price_fetch_params.rbs +9 -3
  331. data/sig/orb/models/price_update_params.rbs +5 -1
  332. data/sig/orb/models/prices/external_price_id_fetch_params.rbs +11 -3
  333. data/sig/orb/models/prices/external_price_id_update_params.rbs +5 -1
  334. data/sig/orb/models/subscription_cancel_params.rbs +5 -0
  335. data/sig/orb/models/subscription_change_apply_params.rbs +5 -0
  336. data/sig/orb/models/subscription_change_cancel_params.rbs +12 -3
  337. data/sig/orb/models/subscription_change_retrieve_params.rbs +12 -3
  338. data/sig/orb/models/subscription_fetch_costs_params.rbs +5 -0
  339. data/sig/orb/models/subscription_fetch_params.rbs +11 -3
  340. data/sig/orb/models/subscription_fetch_schedule_params.rbs +5 -0
  341. data/sig/orb/models/subscription_fetch_usage_params.rbs +5 -0
  342. data/sig/orb/models/subscription_price_intervals_params.rbs +5 -0
  343. data/sig/orb/models/subscription_redeem_coupon_params.rbs +5 -0
  344. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +5 -0
  345. data/sig/orb/models/subscription_trigger_phase_params.rbs +9 -1
  346. data/sig/orb/models/subscription_unschedule_cancellation_params.rbs +11 -3
  347. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs +10 -2
  348. data/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs +11 -3
  349. data/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs +5 -0
  350. data/sig/orb/models/subscription_update_params.rbs +5 -0
  351. data/sig/orb/models/subscription_update_trial_params.rbs +5 -0
  352. data/sig/orb/resources/alerts.rbs +2 -0
  353. data/sig/orb/resources/customers/credits/ledger.rbs +2 -26
  354. data/sig/orb/resources/invoices.rbs +1 -0
  355. data/sig/orb/resources/prices.rbs +1 -48
  356. metadata +2 -2
@@ -7,1541 +7,1169 @@ 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::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::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::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::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
19
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
21
20
 
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
21
+ # New floating price request body params.
22
+ module Body
23
+ extend Orb::Internal::Type::Union
27
24
 
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 }
25
+ discriminator :model_type
33
26
 
34
- # @!attribute name
35
- # The name of the price.
36
- #
37
- # @return [String]
38
- required :name, String
27
+ variant :unit, -> { Orb::NewFloatingUnitPrice }
39
28
 
40
- # @!attribute unit_config
41
- # Configuration for unit pricing
42
- #
43
- # @return [Orb::Models::UnitConfig]
44
- required :unit_config, -> { Orb::UnitConfig }
29
+ variant :tiered, -> { Orb::NewFloatingTieredPrice }
45
30
 
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
31
+ variant :bulk, -> { Orb::NewFloatingBulkPrice }
52
32
 
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
33
+ variant :bulk_with_filters, -> { Orb::PriceCreateParams::Body::BulkWithFilters }
59
34
 
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
35
+ variant :package, -> { Orb::NewFloatingPackagePrice }
66
36
 
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
37
+ variant :matrix, -> { Orb::NewFloatingMatrixPrice }
72
38
 
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
39
+ variant :threshold_total_amount, -> { Orb::NewFloatingThresholdTotalAmountPrice }
78
40
 
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
41
+ variant :tiered_package, -> { Orb::NewFloatingTieredPackagePrice }
84
42
 
85
- # @!attribute external_price_id
86
- # An alias for the price.
87
- #
88
- # @return [String, nil]
89
- optional :external_price_id, String, nil?: true
43
+ variant :tiered_with_minimum, -> { Orb::NewFloatingTieredWithMinimumPrice }
90
44
 
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
45
+ variant :grouped_tiered, -> { Orb::NewFloatingGroupedTieredPrice }
97
46
 
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
47
+ variant :tiered_package_with_minimum, -> { Orb::NewFloatingTieredPackageWithMinimumPrice }
103
48
 
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
49
+ variant :package_with_allocation, -> { Orb::NewFloatingPackageWithAllocationPrice }
110
50
 
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
51
+ variant :unit_with_percent, -> { Orb::NewFloatingUnitWithPercentPrice }
116
52
 
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
53
+ variant :matrix_with_allocation, -> { Orb::NewFloatingMatrixWithAllocationPrice }
124
54
 
125
- # @!attribute tiered_config
126
- # Configuration for tiered pricing
127
- #
128
- # @return [Orb::Models::TieredConfig]
129
- required :tiered_config, -> { Orb::TieredConfig }
55
+ variant :tiered_with_proration, -> { Orb::NewFloatingTieredWithProrationPrice }
130
56
 
131
- # @!attribute bulk_config
132
- # Configuration for bulk pricing
133
- #
134
- # @return [Orb::Models::BulkConfig]
135
- required :bulk_config, -> { Orb::BulkConfig }
57
+ variant :unit_with_proration, -> { Orb::NewFloatingUnitWithProrationPrice }
136
58
 
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 }
59
+ variant :grouped_allocation, -> { Orb::NewFloatingGroupedAllocationPrice }
142
60
 
143
- # @!attribute package_config
144
- # Configuration for package pricing
145
- #
146
- # @return [Orb::Models::PackageConfig]
147
- required :package_config, -> { Orb::PackageConfig }
61
+ variant :bulk_with_proration, -> { Orb::NewFloatingBulkWithProrationPrice }
148
62
 
149
- # @!attribute matrix_config
150
- # Configuration for matrix pricing
151
- #
152
- # @return [Orb::Models::MatrixConfig]
153
- required :matrix_config, -> { Orb::MatrixConfig }
63
+ variant :grouped_with_prorated_minimum, -> { Orb::NewFloatingGroupedWithProratedMinimumPrice }
154
64
 
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 }
65
+ variant :grouped_with_metered_minimum, -> { Orb::NewFloatingGroupedWithMeteredMinimumPrice }
160
66
 
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 }
67
+ variant :grouped_with_min_max_thresholds, -> { Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds }
166
68
 
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 }
69
+ variant :matrix_with_display_name, -> { Orb::NewFloatingMatrixWithDisplayNamePrice }
172
70
 
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 }
71
+ variant :grouped_tiered_package, -> { Orb::NewFloatingGroupedTieredPackagePrice }
178
72
 
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 }
73
+ variant :max_group_tiered_package, -> { Orb::NewFloatingMaxGroupTieredPackagePrice }
185
74
 
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 }
75
+ variant :scalable_matrix_with_unit_pricing, -> { Orb::NewFloatingScalableMatrixWithUnitPricingPrice }
191
76
 
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 }
77
+ variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewFloatingScalableMatrixWithTieredPricingPrice }
197
78
 
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 }
79
+ variant :cumulative_grouped_bulk, -> { Orb::NewFloatingCumulativeGroupedBulkPrice }
203
80
 
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 }
81
+ variant :cumulative_grouped_allocation, -> { Orb::PriceCreateParams::Body::CumulativeGroupedAllocation }
209
82
 
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 }
83
+ variant :minimum_composite, -> { Orb::NewFloatingMinimumCompositePrice }
215
84
 
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 }
85
+ variant :percent, -> { Orb::PriceCreateParams::Body::Percent }
221
86
 
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 }
87
+ variant :event_output, -> { Orb::PriceCreateParams::Body::EventOutput }
227
88
 
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 }
89
+ class BulkWithFilters < Orb::Internal::Type::BaseModel
90
+ # @!attribute bulk_with_filters_config
91
+ # Configuration for bulk_with_filters pricing
92
+ #
93
+ # @return [Orb::Models::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig]
94
+ required :bulk_with_filters_config,
95
+ -> { Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig }
234
96
 
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 }
97
+ # @!attribute cadence
98
+ # The cadence to bill for this price on.
99
+ #
100
+ # @return [Symbol, Orb::Models::PriceCreateParams::Body::BulkWithFilters::Cadence]
101
+ required :cadence, enum: -> { Orb::PriceCreateParams::Body::BulkWithFilters::Cadence }
241
102
 
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 }
103
+ # @!attribute currency
104
+ # An ISO 4217 currency string for which this price is billed in.
105
+ #
106
+ # @return [String]
107
+ required :currency, String
248
108
 
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 }
109
+ # @!attribute item_id
110
+ # The id of the item the price will be associated with.
111
+ #
112
+ # @return [String]
113
+ required :item_id, String
254
114
 
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 }
115
+ # @!attribute model_type
116
+ # The pricing model type
117
+ #
118
+ # @return [Symbol, :bulk_with_filters]
119
+ required :model_type, const: :bulk_with_filters
260
120
 
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 }
121
+ # @!attribute name
122
+ # The name of the price.
123
+ #
124
+ # @return [String]
125
+ required :name, String
266
126
 
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 }
127
+ # @!attribute billable_metric_id
128
+ # The id of the billable metric for the price. Only needed if the price is
129
+ # usage-based.
130
+ #
131
+ # @return [String, nil]
132
+ optional :billable_metric_id, String, nil?: true
273
133
 
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 }
134
+ # @!attribute billed_in_advance
135
+ # If the Price represents a fixed cost, the price will be billed in-advance if
136
+ # this is true, and in-arrears if this is false.
137
+ #
138
+ # @return [Boolean, nil]
139
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
280
140
 
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 }
141
+ # @!attribute billing_cycle_configuration
142
+ # For custom cadence: specifies the duration of the billing period in days or
143
+ # months.
144
+ #
145
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
146
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
286
147
 
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 }
148
+ # @!attribute conversion_rate
149
+ # The per unit conversion rate of the price currency to the invoicing currency.
150
+ #
151
+ # @return [Float, nil]
152
+ optional :conversion_rate, Float, nil?: true
293
153
 
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 }
154
+ # @!attribute conversion_rate_config
155
+ # The configuration for the rate of the price currency to the invoicing currency.
156
+ #
157
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
158
+ optional :conversion_rate_config,
159
+ union: -> { Orb::PriceCreateParams::Body::BulkWithFilters::ConversionRateConfig },
160
+ nil?: true
299
161
 
300
- # @!attribute percent_config
301
- # Configuration for percent pricing
302
- #
303
- # @return [Orb::Models::PriceCreateParams::PercentConfig]
304
- required :percent_config, -> { Orb::PriceCreateParams::PercentConfig }
162
+ # @!attribute dimensional_price_configuration
163
+ # For dimensional price: specifies a price group and dimension values
164
+ #
165
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
166
+ optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true
305
167
 
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 }
168
+ # @!attribute external_price_id
169
+ # An alias for the price.
170
+ #
171
+ # @return [String, nil]
172
+ optional :external_price_id, String, nil?: true
311
173
 
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}]
174
+ # @!attribute fixed_price_quantity
175
+ # If the Price represents a fixed cost, this represents the quantity of units
176
+ # applied.
177
+ #
178
+ # @return [Float, nil]
179
+ optional :fixed_price_quantity, Float, nil?: true
413
180
 
414
- # The cadence to bill for this price on.
415
- module Cadence
416
- extend Orb::Internal::Type::Enum
181
+ # @!attribute invoice_grouping_key
182
+ # The property used to group this price on an invoice
183
+ #
184
+ # @return [String, nil]
185
+ optional :invoice_grouping_key, String, nil?: true
417
186
 
418
- ANNUAL = :annual
419
- SEMI_ANNUAL = :semi_annual
420
- MONTHLY = :monthly
421
- QUARTERLY = :quarterly
422
- ONE_TIME = :one_time
423
- CUSTOM = :custom
187
+ # @!attribute invoicing_cycle_configuration
188
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
189
+ # If unspecified, a single invoice is produced per billing cycle.
190
+ #
191
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
192
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
424
193
 
425
- # @!method self.values
426
- # @return [Array<Symbol>]
427
- end
194
+ # @!attribute license_type_id
195
+ # The ID of the license type to associate with this price.
196
+ #
197
+ # @return [String, nil]
198
+ optional :license_type_id, String, nil?: true
428
199
 
429
- # The pricing model type
430
- module ModelType
431
- extend Orb::Internal::Type::Enum
200
+ # @!attribute metadata
201
+ # User-specified key/value pairs for the resource. Individual keys can be removed
202
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
203
+ # by setting `metadata` to `null`.
204
+ #
205
+ # @return [Hash{Symbol=>String, nil}, nil]
206
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
432
207
 
433
- EVENT_OUTPUT = :event_output
208
+ # @!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)
209
+ # Some parameter documentations has been truncated, see
210
+ # {Orb::Models::PriceCreateParams::Body::BulkWithFilters} for more details.
211
+ #
212
+ # @param bulk_with_filters_config [Orb::Models::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing
213
+ #
214
+ # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::BulkWithFilters::Cadence] The cadence to bill for this price on.
215
+ #
216
+ # @param currency [String] An ISO 4217 currency string for which this price is billed in.
217
+ #
218
+ # @param item_id [String] The id of the item the price will be associated with.
219
+ #
220
+ # @param name [String] The name of the price.
221
+ #
222
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
223
+ #
224
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
225
+ #
226
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
227
+ #
228
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
229
+ #
230
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
231
+ #
232
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
233
+ #
234
+ # @param external_price_id [String, nil] An alias for the price.
235
+ #
236
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
237
+ #
238
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
239
+ #
240
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
241
+ #
242
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
243
+ #
244
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
245
+ #
246
+ # @param model_type [Symbol, :bulk_with_filters] The pricing model type
434
247
 
435
- # @!method self.values
436
- # @return [Array<Symbol>]
437
- end
248
+ # @see Orb::Models::PriceCreateParams::Body::BulkWithFilters#bulk_with_filters_config
249
+ class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel
250
+ # @!attribute filters
251
+ # Property filters to apply (all must match)
252
+ #
253
+ # @return [Array<Orb::Models::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Filter>]
254
+ required :filters,
255
+ -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Filter] }
256
+
257
+ # @!attribute tiers
258
+ # Bulk tiers for rating based on total usage volume
259
+ #
260
+ # @return [Array<Orb::Models::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Tier>]
261
+ required :tiers,
262
+ -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Tier] }
263
+
264
+ # @!method initialize(filters:, tiers:)
265
+ # Configuration for bulk_with_filters pricing
266
+ #
267
+ # @param filters [Array<Orb::Models::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Filter>] Property filters to apply (all must match)
268
+ #
269
+ # @param tiers [Array<Orb::Models::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Tier>] Bulk tiers for rating based on total usage volume
270
+
271
+ class Filter < Orb::Internal::Type::BaseModel
272
+ # @!attribute property_key
273
+ # Event property key to filter on
274
+ #
275
+ # @return [String]
276
+ required :property_key, String
438
277
 
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
278
+ # @!attribute property_value
279
+ # Event property value to match
280
+ #
281
+ # @return [String]
282
+ required :property_value, String
283
+
284
+ # @!method initialize(property_key:, property_value:)
285
+ # Configuration for a single property filter
286
+ #
287
+ # @param property_key [String] Event property key to filter on
288
+ #
289
+ # @param property_value [String] Event property value to match
290
+ end
291
+
292
+ class Tier < Orb::Internal::Type::BaseModel
293
+ # @!attribute unit_amount
294
+ # Amount per unit
295
+ #
296
+ # @return [String]
297
+ required :unit_amount, String
298
+
299
+ # @!attribute tier_lower_bound
300
+ # The lower bound for this tier
301
+ #
302
+ # @return [String, nil]
303
+ optional :tier_lower_bound, String, nil?: true
304
+
305
+ # @!method initialize(unit_amount:, tier_lower_bound: nil)
306
+ # Configuration for a single bulk pricing tier
307
+ #
308
+ # @param unit_amount [String] Amount per unit
309
+ #
310
+ # @param tier_lower_bound [String, nil] The lower bound for this tier
311
+ end
312
+ end
313
+
314
+ # The cadence to bill for this price on.
463
315
  #
464
- # @return [String]
465
- required :property_key, String
316
+ # @see Orb::Models::PriceCreateParams::Body::BulkWithFilters#cadence
317
+ module Cadence
318
+ extend Orb::Internal::Type::Enum
466
319
 
467
- # @!attribute property_value
468
- # Event property value to match
320
+ ANNUAL = :annual
321
+ SEMI_ANNUAL = :semi_annual
322
+ MONTHLY = :monthly
323
+ QUARTERLY = :quarterly
324
+ ONE_TIME = :one_time
325
+ CUSTOM = :custom
326
+
327
+ # @!method self.values
328
+ # @return [Array<Symbol>]
329
+ end
330
+ end
331
+
332
+ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel
333
+ # @!attribute cadence
334
+ # The cadence to bill for this price on.
469
335
  #
470
- # @return [String]
471
- required :property_value, String
336
+ # @return [Symbol, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence]
337
+ required :cadence, enum: -> { Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence }
472
338
 
473
- # @!method initialize(property_key:, property_value:)
474
- # Configuration for a single property filter
339
+ # @!attribute currency
340
+ # An ISO 4217 currency string for which this price is billed in.
475
341
  #
476
- # @param property_key [String] Event property key to filter on
342
+ # @return [String]
343
+ required :currency, String
344
+
345
+ # @!attribute grouped_with_min_max_thresholds_config
346
+ # Configuration for grouped_with_min_max_thresholds pricing
477
347
  #
478
- # @param property_value [String] Event property value to match
479
- end
348
+ # @return [Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig]
349
+ required :grouped_with_min_max_thresholds_config,
350
+ -> { Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig }
480
351
 
481
- class Tier < Orb::Internal::Type::BaseModel
482
- # @!attribute unit_amount
483
- # Amount per unit
352
+ # @!attribute item_id
353
+ # The id of the item the price will be associated with.
484
354
  #
485
355
  # @return [String]
486
- required :unit_amount, String
356
+ required :item_id, String
487
357
 
488
- # @!attribute tier_lower_bound
489
- # The lower bound for this tier
358
+ # @!attribute model_type
359
+ # The pricing model type
490
360
  #
491
- # @return [String, nil]
492
- optional :tier_lower_bound, String, nil?: true
361
+ # @return [Symbol, :grouped_with_min_max_thresholds]
362
+ required :model_type, const: :grouped_with_min_max_thresholds
493
363
 
494
- # @!method initialize(unit_amount:, tier_lower_bound: nil)
495
- # Configuration for a single bulk pricing tier
364
+ # @!attribute name
365
+ # The name of the price.
496
366
  #
497
- # @param unit_amount [String] Amount per unit
367
+ # @return [String]
368
+ required :name, String
369
+
370
+ # @!attribute billable_metric_id
371
+ # The id of the billable metric for the price. Only needed if the price is
372
+ # usage-based.
498
373
  #
499
- # @param tier_lower_bound [String, nil] The lower bound for this tier
500
- end
501
- end
374
+ # @return [String, nil]
375
+ optional :billable_metric_id, String, nil?: true
502
376
 
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
377
+ # @!attribute billed_in_advance
378
+ # If the Price represents a fixed cost, the price will be billed in-advance if
379
+ # this is true, and in-arrears if this is false.
530
380
  #
531
- # @return [String]
532
- required :threshold, String
381
+ # @return [Boolean, nil]
382
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
533
383
 
534
- # @!attribute total_amount
535
- # Total amount for this threshold
384
+ # @!attribute billing_cycle_configuration
385
+ # For custom cadence: specifies the duration of the billing period in days or
386
+ # months.
536
387
  #
537
- # @return [String]
538
- required :total_amount, String
388
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
389
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
539
390
 
540
- # @!method initialize(threshold:, total_amount:)
541
- # Configuration for a single threshold
391
+ # @!attribute conversion_rate
392
+ # The per unit conversion rate of the price currency to the invoicing currency.
542
393
  #
543
- # @param threshold [String]
394
+ # @return [Float, nil]
395
+ optional :conversion_rate, Float, nil?: true
396
+
397
+ # @!attribute conversion_rate_config
398
+ # The configuration for the rate of the price currency to the invoicing currency.
544
399
  #
545
- # @param total_amount [String] Total amount for this threshold
546
- end
547
- end
400
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
401
+ optional :conversion_rate_config,
402
+ union: -> {
403
+ Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::ConversionRateConfig
404
+ },
405
+ nil?: true
548
406
 
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
407
+ # @!attribute dimensional_price_configuration
408
+ # For dimensional price: specifies a price group and dimension values
577
409
  #
578
- # @return [String]
579
- required :per_unit, String
410
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
411
+ optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true
580
412
 
581
- # @!attribute tier_lower_bound
413
+ # @!attribute external_price_id
414
+ # An alias for the price.
582
415
  #
583
- # @return [String]
584
- required :tier_lower_bound, String
416
+ # @return [String, nil]
417
+ optional :external_price_id, String, nil?: true
585
418
 
586
- # @!method initialize(per_unit:, tier_lower_bound:)
587
- # Configuration for a single tier with business logic
419
+ # @!attribute fixed_price_quantity
420
+ # If the Price represents a fixed cost, this represents the quantity of units
421
+ # applied.
588
422
  #
589
- # @param per_unit [String] Price per package
423
+ # @return [Float, nil]
424
+ optional :fixed_price_quantity, Float, nil?: true
425
+
426
+ # @!attribute invoice_grouping_key
427
+ # The property used to group this price on an invoice
590
428
  #
591
- # @param tier_lower_bound [String]
592
- end
593
- end
429
+ # @return [String, nil]
430
+ optional :invoice_grouping_key, String, nil?: true
594
431
 
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
432
+ # @!attribute invoicing_cycle_configuration
433
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
434
+ # If unspecified, a single invoice is produced per billing cycle.
630
435
  #
631
- # @return [String]
632
- required :minimum_amount, String
436
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
437
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
633
438
 
634
- # @!attribute tier_lower_bound
439
+ # @!attribute license_type_id
440
+ # The ID of the license type to associate with this price.
635
441
  #
636
- # @return [String]
637
- required :tier_lower_bound, String
442
+ # @return [String, nil]
443
+ optional :license_type_id, String, nil?: true
638
444
 
639
- # @!attribute unit_amount
640
- # Per unit amount
445
+ # @!attribute metadata
446
+ # User-specified key/value pairs for the resource. Individual keys can be removed
447
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
448
+ # by setting `metadata` to `null`.
641
449
  #
642
- # @return [String]
643
- required :unit_amount, String
450
+ # @return [Hash{Symbol=>String, nil}, nil]
451
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
644
452
 
645
- # @!method initialize(minimum_amount:, tier_lower_bound:, unit_amount:)
646
- # Configuration for a single tier
453
+ # @!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)
454
+ # Some parameter documentations has been truncated, see
455
+ # {Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds} for more
456
+ # details.
647
457
  #
648
- # @param minimum_amount [String]
458
+ # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on.
649
459
  #
650
- # @param tier_lower_bound [String]
460
+ # @param currency [String] An ISO 4217 currency string for which this price is billed in.
651
461
  #
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
462
+ # @param grouped_with_min_max_thresholds_config [Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing
682
463
  #
683
- # @return [String]
684
- required :tier_lower_bound, String
685
-
686
- # @!attribute unit_amount
687
- # Per unit amount
464
+ # @param item_id [String] The id of the item the price will be associated with.
688
465
  #
689
- # @return [String]
690
- required :unit_amount, String
691
-
692
- # @!method initialize(tier_lower_bound:, unit_amount:)
693
- # Configuration for a single tier
466
+ # @param name [String] The name of the price.
467
+ #
468
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
469
+ #
470
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
471
+ #
472
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
473
+ #
474
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
694
475
  #
695
- # @param tier_lower_bound [String]
476
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
696
477
  #
697
- # @param unit_amount [String] Per unit amount
478
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
479
+ #
480
+ # @param external_price_id [String, nil] An alias for the price.
481
+ #
482
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
483
+ #
484
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
485
+ #
486
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
487
+ #
488
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
489
+ #
490
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
491
+ #
492
+ # @param model_type [Symbol, :grouped_with_min_max_thresholds] The pricing model type
493
+
494
+ # The cadence to bill for this price on.
495
+ #
496
+ # @see Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds#cadence
497
+ module Cadence
498
+ extend Orb::Internal::Type::Enum
499
+
500
+ ANNUAL = :annual
501
+ SEMI_ANNUAL = :semi_annual
502
+ MONTHLY = :monthly
503
+ QUARTERLY = :quarterly
504
+ ONE_TIME = :one_time
505
+ CUSTOM = :custom
506
+
507
+ # @!method self.values
508
+ # @return [Array<Symbol>]
509
+ end
510
+
511
+ # @see Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds#grouped_with_min_max_thresholds_config
512
+ class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel
513
+ # @!attribute grouping_key
514
+ # The event property used to group before applying thresholds
515
+ #
516
+ # @return [String]
517
+ required :grouping_key, String
518
+
519
+ # @!attribute maximum_charge
520
+ # The maximum amount to charge each group
521
+ #
522
+ # @return [String]
523
+ required :maximum_charge, String
524
+
525
+ # @!attribute minimum_charge
526
+ # The minimum amount to charge each group, regardless of usage
527
+ #
528
+ # @return [String]
529
+ required :minimum_charge, String
530
+
531
+ # @!attribute per_unit_rate
532
+ # The base price charged per group
533
+ #
534
+ # @return [String]
535
+ required :per_unit_rate, String
536
+
537
+ # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:)
538
+ # Configuration for grouped_with_min_max_thresholds pricing
539
+ #
540
+ # @param grouping_key [String] The event property used to group before applying thresholds
541
+ #
542
+ # @param maximum_charge [String] The maximum amount to charge each group
543
+ #
544
+ # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage
545
+ #
546
+ # @param per_unit_rate [String] The base price charged per group
547
+ end
698
548
  end
699
- end
700
549
 
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
550
+ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel
551
+ # @!attribute cadence
552
+ # The cadence to bill for this price on.
728
553
  #
729
- # @return [String]
730
- required :minimum_amount, String
554
+ # @return [Symbol, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence]
555
+ required :cadence, enum: -> { Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence }
556
+
557
+ # @!attribute cumulative_grouped_allocation_config
558
+ # Configuration for cumulative_grouped_allocation pricing
559
+ #
560
+ # @return [Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig]
561
+ required :cumulative_grouped_allocation_config,
562
+ -> { Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig }
731
563
 
732
- # @!attribute per_unit
564
+ # @!attribute currency
565
+ # An ISO 4217 currency string for which this price is billed in.
733
566
  #
734
567
  # @return [String]
735
- required :per_unit, String
568
+ required :currency, String
736
569
 
737
- # @!attribute tier_lower_bound
570
+ # @!attribute item_id
571
+ # The id of the item the price will be associated with.
738
572
  #
739
573
  # @return [String]
740
- required :tier_lower_bound, String
574
+ required :item_id, String
741
575
 
742
- # @!method initialize(minimum_amount:, per_unit:, tier_lower_bound:)
743
- # Configuration for a single tier
576
+ # @!attribute model_type
577
+ # The pricing model type
744
578
  #
745
- # @param minimum_amount [String]
746
- # @param per_unit [String]
747
- # @param tier_lower_bound [String]
748
- end
749
- end
579
+ # @return [Symbol, :cumulative_grouped_allocation]
580
+ required :model_type, const: :cumulative_grouped_allocation
750
581
 
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
582
+ # @!attribute name
583
+ # The name of the price.
584
+ #
585
+ # @return [String]
586
+ required :name, String
774
587
 
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
588
+ # @!attribute billable_metric_id
589
+ # The id of the billable metric for the price. Only needed if the price is
590
+ # usage-based.
591
+ #
592
+ # @return [String, nil]
593
+ optional :billable_metric_id, String, nil?: true
795
594
 
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
595
+ # @!attribute billed_in_advance
596
+ # If the Price represents a fixed cost, the price will be billed in-advance if
597
+ # this is true, and in-arrears if this is false.
816
598
  #
817
- # @return [String]
818
- required :tier_lower_bound, String
599
+ # @return [Boolean, nil]
600
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
819
601
 
820
- # @!attribute unit_amount
821
- # Amount per unit
602
+ # @!attribute billing_cycle_configuration
603
+ # For custom cadence: specifies the duration of the billing period in days or
604
+ # months.
822
605
  #
823
- # @return [String]
824
- required :unit_amount, String
606
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
607
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
825
608
 
826
- # @!method initialize(tier_lower_bound:, unit_amount:)
827
- # Configuration for a single tiered with proration tier
609
+ # @!attribute conversion_rate
610
+ # The per unit conversion rate of the price currency to the invoicing currency.
828
611
  #
829
- # @param tier_lower_bound [String] Inclusive tier starting value
612
+ # @return [Float, nil]
613
+ optional :conversion_rate, Float, nil?: true
614
+
615
+ # @!attribute conversion_rate_config
616
+ # The configuration for the rate of the price currency to the invoicing currency.
830
617
  #
831
- # @param unit_amount [String] Amount per unit
832
- end
833
- end
618
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
619
+ optional :conversion_rate_config,
620
+ union: -> {
621
+ Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::ConversionRateConfig
622
+ },
623
+ nil?: true
834
624
 
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
625
+ # @!attribute dimensional_price_configuration
626
+ # For dimensional price: specifies a price group and dimension values
627
+ #
628
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
629
+ optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true
847
630
 
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
631
+ # @!attribute external_price_id
632
+ # An alias for the price.
633
+ #
634
+ # @return [String, nil]
635
+ optional :external_price_id, String, nil?: true
876
636
 
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] }
637
+ # @!attribute fixed_price_quantity
638
+ # If the Price represents a fixed cost, this represents the quantity of units
639
+ # applied.
640
+ #
641
+ # @return [Float, nil]
642
+ optional :fixed_price_quantity, Float, nil?: true
884
643
 
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
644
+ # @!attribute invoice_grouping_key
645
+ # The property used to group this price on an invoice
646
+ #
647
+ # @return [String, nil]
648
+ optional :invoice_grouping_key, String, nil?: true
889
649
 
890
- class Tier < Orb::Internal::Type::BaseModel
891
- # @!attribute unit_amount
892
- # Cost per unit
650
+ # @!attribute invoicing_cycle_configuration
651
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
652
+ # If unspecified, a single invoice is produced per billing cycle.
893
653
  #
894
- # @return [String]
895
- required :unit_amount, String
654
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
655
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
896
656
 
897
- # @!attribute tier_lower_bound
898
- # The lower bound for this tier
657
+ # @!attribute license_type_id
658
+ # The ID of the license type to associate with this price.
899
659
  #
900
660
  # @return [String, nil]
901
- optional :tier_lower_bound, String, nil?: true
661
+ optional :license_type_id, String, nil?: true
662
+
663
+ # @!attribute metadata
664
+ # User-specified key/value pairs for the resource. Individual keys can be removed
665
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
666
+ # by setting `metadata` to `null`.
667
+ #
668
+ # @return [Hash{Symbol=>String, nil}, nil]
669
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
902
670
 
903
- # @!method initialize(unit_amount:, tier_lower_bound: nil)
904
- # Configuration for a single bulk pricing tier with proration
671
+ # @!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)
672
+ # Some parameter documentations has been truncated, see
673
+ # {Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation} for more
674
+ # details.
675
+ #
676
+ # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on.
677
+ #
678
+ # @param cumulative_grouped_allocation_config [Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing
679
+ #
680
+ # @param currency [String] An ISO 4217 currency string for which this price is billed in.
681
+ #
682
+ # @param item_id [String] The id of the item the price will be associated with.
683
+ #
684
+ # @param name [String] The name of the price.
685
+ #
686
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
687
+ #
688
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
689
+ #
690
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
691
+ #
692
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
693
+ #
694
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
695
+ #
696
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
905
697
  #
906
- # @param unit_amount [String] Cost per unit
698
+ # @param external_price_id [String, nil] An alias for the price.
907
699
  #
908
- # @param tier_lower_bound [String, nil] The lower bound for this tier
700
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
701
+ #
702
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
703
+ #
704
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
705
+ #
706
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
707
+ #
708
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
709
+ #
710
+ # @param model_type [Symbol, :cumulative_grouped_allocation] The pricing model type
711
+
712
+ # The cadence to bill for this price on.
713
+ #
714
+ # @see Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation#cadence
715
+ module Cadence
716
+ extend Orb::Internal::Type::Enum
717
+
718
+ ANNUAL = :annual
719
+ SEMI_ANNUAL = :semi_annual
720
+ MONTHLY = :monthly
721
+ QUARTERLY = :quarterly
722
+ ONE_TIME = :one_time
723
+ CUSTOM = :custom
724
+
725
+ # @!method self.values
726
+ # @return [Array<Symbol>]
727
+ end
728
+
729
+ # @see Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation#cumulative_grouped_allocation_config
730
+ class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel
731
+ # @!attribute cumulative_allocation
732
+ # The overall allocation across all groups
733
+ #
734
+ # @return [String]
735
+ required :cumulative_allocation, String
736
+
737
+ # @!attribute group_allocation
738
+ # The allocation per individual group
739
+ #
740
+ # @return [String]
741
+ required :group_allocation, String
742
+
743
+ # @!attribute grouping_key
744
+ # The event property used to group usage before applying allocations
745
+ #
746
+ # @return [String]
747
+ required :grouping_key, String
748
+
749
+ # @!attribute unit_amount
750
+ # The amount to charge for each unit outside of the allocation
751
+ #
752
+ # @return [String]
753
+ required :unit_amount, String
754
+
755
+ # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:)
756
+ # Configuration for cumulative_grouped_allocation pricing
757
+ #
758
+ # @param cumulative_allocation [String] The overall allocation across all groups
759
+ #
760
+ # @param group_allocation [String] The allocation per individual group
761
+ #
762
+ # @param grouping_key [String] The event property used to group usage before applying allocations
763
+ #
764
+ # @param unit_amount [String] The amount to charge for each unit outside of the allocation
765
+ end
909
766
  end
910
- end
911
767
 
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
768
+ class Percent < Orb::Internal::Type::BaseModel
769
+ # @!attribute cadence
770
+ # The cadence to bill for this price on.
771
+ #
772
+ # @return [Symbol, Orb::Models::PriceCreateParams::Body::Percent::Cadence]
773
+ required :cadence, enum: -> { Orb::PriceCreateParams::Body::Percent::Cadence }
940
774
 
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
775
+ # @!attribute currency
776
+ # An ISO 4217 currency string for which this price is billed in.
1003
777
  #
1004
778
  # @return [String]
1005
- required :scaling_factor, String
779
+ required :currency, String
1006
780
 
1007
- # @!attribute scaling_value
781
+ # @!attribute item_id
782
+ # The id of the item the price will be associated with.
1008
783
  #
1009
784
  # @return [String]
1010
- required :scaling_value, String
785
+ required :item_id, String
1011
786
 
1012
- # @!method initialize(scaling_factor:, scaling_value:)
1013
- # Configuration for a scaling factor
787
+ # @!attribute model_type
788
+ # The pricing model type
1014
789
  #
1015
- # @param scaling_factor [String]
1016
- # @param scaling_value [String]
1017
- end
790
+ # @return [Symbol, :percent]
791
+ required :model_type, const: :percent
1018
792
 
1019
- class UnitAmount < Orb::Internal::Type::BaseModel
1020
- # @!attribute pricing_value
793
+ # @!attribute name
794
+ # The name of the price.
1021
795
  #
1022
796
  # @return [String]
1023
- required :pricing_value, String
797
+ required :name, String
1024
798
 
1025
- # @!attribute unit_amount
1026
- # Per unit amount
799
+ # @!attribute percent_config
800
+ # Configuration for percent pricing
1027
801
  #
1028
- # @return [String]
1029
- required :unit_amount, String
802
+ # @return [Orb::Models::PriceCreateParams::Body::Percent::PercentConfig]
803
+ required :percent_config, -> { Orb::PriceCreateParams::Body::Percent::PercentConfig }
1030
804
 
1031
- # @!method initialize(pricing_value:, unit_amount:)
1032
- # Configuration for a unit amount
805
+ # @!attribute billable_metric_id
806
+ # The id of the billable metric for the price. Only needed if the price is
807
+ # usage-based.
1033
808
  #
1034
- # @param pricing_value [String]
809
+ # @return [String, nil]
810
+ optional :billable_metric_id, String, nil?: true
811
+
812
+ # @!attribute billed_in_advance
813
+ # If the Price represents a fixed cost, the price will be billed in-advance if
814
+ # this is true, and in-arrears if this is false.
1035
815
  #
1036
- # @param unit_amount [String] Per unit amount
1037
- end
1038
- end
816
+ # @return [Boolean, nil]
817
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
1039
818
 
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
819
+ # @!attribute billing_cycle_configuration
820
+ # For custom cadence: specifies the duration of the billing period in days or
821
+ # months.
822
+ #
823
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
824
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1076
825
 
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
826
+ # @!attribute conversion_rate
827
+ # The per unit conversion rate of the price currency to the invoicing currency.
1101
828
  #
1102
- # @return [String]
1103
- required :dimension_value, String
829
+ # @return [Float, nil]
830
+ optional :conversion_rate, Float, nil?: true
1104
831
 
1105
- # @!attribute display_name
1106
- # Display name for this dimension value
832
+ # @!attribute conversion_rate_config
833
+ # The configuration for the rate of the price currency to the invoicing currency.
1107
834
  #
1108
- # @return [String]
1109
- required :display_name, String
835
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
836
+ optional :conversion_rate_config,
837
+ union: -> { Orb::PriceCreateParams::Body::Percent::ConversionRateConfig },
838
+ nil?: true
1110
839
 
1111
- # @!attribute unit_amount
1112
- # Per unit amount
840
+ # @!attribute dimensional_price_configuration
841
+ # For dimensional price: specifies a price group and dimension values
1113
842
  #
1114
- # @return [String]
1115
- required :unit_amount, String
843
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
844
+ optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true
1116
845
 
1117
- # @!method initialize(dimension_value:, display_name:, unit_amount:)
1118
- # Configuration for a unit amount item
846
+ # @!attribute external_price_id
847
+ # An alias for the price.
1119
848
  #
1120
- # @param dimension_value [String] The dimension value
849
+ # @return [String, nil]
850
+ optional :external_price_id, String, nil?: true
851
+
852
+ # @!attribute fixed_price_quantity
853
+ # If the Price represents a fixed cost, this represents the quantity of units
854
+ # applied.
1121
855
  #
1122
- # @param display_name [String] Display name for this dimension value
856
+ # @return [Float, nil]
857
+ optional :fixed_price_quantity, Float, nil?: true
858
+
859
+ # @!attribute invoice_grouping_key
860
+ # The property used to group this price on an invoice
1123
861
  #
1124
- # @param unit_amount [String] Per unit amount
1125
- end
1126
- end
862
+ # @return [String, nil]
863
+ optional :invoice_grouping_key, String, nil?: true
1127
864
 
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
865
+ # @!attribute invoicing_cycle_configuration
866
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
867
+ # If unspecified, a single invoice is produced per billing cycle.
1163
868
  #
1164
- # @return [String]
1165
- required :per_unit, String
869
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
870
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1166
871
 
1167
- # @!attribute tier_lower_bound
872
+ # @!attribute license_type_id
873
+ # The ID of the license type to associate with this price.
1168
874
  #
1169
- # @return [String]
1170
- required :tier_lower_bound, String
875
+ # @return [String, nil]
876
+ optional :license_type_id, String, nil?: true
877
+
878
+ # @!attribute metadata
879
+ # User-specified key/value pairs for the resource. Individual keys can be removed
880
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
881
+ # by setting `metadata` to `null`.
882
+ #
883
+ # @return [Hash{Symbol=>String, nil}, nil]
884
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
1171
885
 
1172
- # @!method initialize(per_unit:, tier_lower_bound:)
1173
- # Configuration for a single tier
886
+ # @!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)
887
+ # Some parameter documentations has been truncated, see
888
+ # {Orb::Models::PriceCreateParams::Body::Percent} for more details.
889
+ #
890
+ # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::Percent::Cadence] The cadence to bill for this price on.
891
+ #
892
+ # @param currency [String] An ISO 4217 currency string for which this price is billed in.
893
+ #
894
+ # @param item_id [String] The id of the item the price will be associated with.
895
+ #
896
+ # @param name [String] The name of the price.
897
+ #
898
+ # @param percent_config [Orb::Models::PriceCreateParams::Body::Percent::PercentConfig] Configuration for percent pricing
1174
899
  #
1175
- # @param per_unit [String] Per package
900
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
1176
901
  #
1177
- # @param tier_lower_bound [String]
902
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
903
+ #
904
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
905
+ #
906
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
907
+ #
908
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
909
+ #
910
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
911
+ #
912
+ # @param external_price_id [String, nil] An alias for the price.
913
+ #
914
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
915
+ #
916
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
917
+ #
918
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
919
+ #
920
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
921
+ #
922
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
923
+ #
924
+ # @param model_type [Symbol, :percent] The pricing model type
925
+
926
+ # The cadence to bill for this price on.
927
+ #
928
+ # @see Orb::Models::PriceCreateParams::Body::Percent#cadence
929
+ module Cadence
930
+ extend Orb::Internal::Type::Enum
931
+
932
+ ANNUAL = :annual
933
+ SEMI_ANNUAL = :semi_annual
934
+ MONTHLY = :monthly
935
+ QUARTERLY = :quarterly
936
+ ONE_TIME = :one_time
937
+ CUSTOM = :custom
938
+
939
+ # @!method self.values
940
+ # @return [Array<Symbol>]
941
+ end
942
+
943
+ # @see Orb::Models::PriceCreateParams::Body::Percent#percent_config
944
+ class PercentConfig < Orb::Internal::Type::BaseModel
945
+ # @!attribute percent
946
+ # What percent of the component subtotals to charge
947
+ #
948
+ # @return [Float]
949
+ required :percent, Float
950
+
951
+ # @!method initialize(percent:)
952
+ # Configuration for percent pricing
953
+ #
954
+ # @param percent [Float] What percent of the component subtotals to charge
955
+ end
1178
956
  end
1179
- end
1180
957
 
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
958
+ class EventOutput < Orb::Internal::Type::BaseModel
959
+ # @!attribute cadence
960
+ # The cadence to bill for this price on.
1214
961
  #
1215
- # @return [String]
1216
- required :tier_lower_bound, String
962
+ # @return [Symbol, Orb::Models::PriceCreateParams::Body::EventOutput::Cadence]
963
+ required :cadence, enum: -> { Orb::PriceCreateParams::Body::EventOutput::Cadence }
1217
964
 
1218
- # @!attribute unit_amount
1219
- # Per unit amount
965
+ # @!attribute currency
966
+ # An ISO 4217 currency string for which this price is billed in.
1220
967
  #
1221
968
  # @return [String]
1222
- required :unit_amount, String
969
+ required :currency, String
1223
970
 
1224
- # @!method initialize(tier_lower_bound:, unit_amount:)
1225
- # Configuration for a single tier
1226
- #
1227
- # @param tier_lower_bound [String]
971
+ # @!attribute event_output_config
972
+ # Configuration for event_output pricing
1228
973
  #
1229
- # @param unit_amount [String] Per unit amount
1230
- end
1231
- end
974
+ # @return [Orb::Models::PriceCreateParams::Body::EventOutput::EventOutputConfig]
975
+ required :event_output_config, -> { Orb::PriceCreateParams::Body::EventOutput::EventOutputConfig }
1232
976
 
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
977
+ # @!attribute item_id
978
+ # The id of the item the price will be associated with.
1288
979
  #
1289
980
  # @return [String]
1290
- required :first_dimension_value, String
981
+ required :item_id, String
1291
982
 
1292
- # @!attribute scaling_factor
983
+ # @!attribute model_type
984
+ # The pricing model type
985
+ #
986
+ # @return [Symbol, :event_output]
987
+ required :model_type, const: :event_output
988
+
989
+ # @!attribute name
990
+ # The name of the price.
1293
991
  #
1294
992
  # @return [String]
1295
- required :scaling_factor, String
993
+ required :name, String
1296
994
 
1297
- # @!attribute second_dimension_value
995
+ # @!attribute billable_metric_id
996
+ # The id of the billable metric for the price. Only needed if the price is
997
+ # usage-based.
1298
998
  #
1299
999
  # @return [String, nil]
1300
- optional :second_dimension_value, String, nil?: true
1000
+ optional :billable_metric_id, String, nil?: true
1301
1001
 
1302
- # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil)
1303
- # Configuration for a single matrix scaling factor
1002
+ # @!attribute billed_in_advance
1003
+ # If the Price represents a fixed cost, the price will be billed in-advance if
1004
+ # this is true, and in-arrears if this is false.
1304
1005
  #
1305
- # @param first_dimension_value [String]
1306
- # @param scaling_factor [String]
1307
- # @param second_dimension_value [String, nil]
1308
- end
1309
- end
1006
+ # @return [Boolean, nil]
1007
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
1310
1008
 
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
1009
+ # @!attribute billing_cycle_configuration
1010
+ # For custom cadence: specifies the duration of the billing period in days or
1011
+ # months.
1350
1012
  #
1351
- # @return [String]
1352
- required :first_dimension_value, String
1013
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
1014
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1353
1015
 
1354
- # @!attribute scaling_factor
1016
+ # @!attribute conversion_rate
1017
+ # The per unit conversion rate of the price currency to the invoicing currency.
1355
1018
  #
1356
- # @return [String]
1357
- required :scaling_factor, String
1019
+ # @return [Float, nil]
1020
+ optional :conversion_rate, Float, nil?: true
1358
1021
 
1359
- # @!attribute second_dimension_value
1022
+ # @!attribute conversion_rate_config
1023
+ # The configuration for the rate of the price currency to the invoicing currency.
1360
1024
  #
1361
- # @return [String, nil]
1362
- optional :second_dimension_value, String, nil?: true
1025
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
1026
+ optional :conversion_rate_config,
1027
+ union: -> { Orb::PriceCreateParams::Body::EventOutput::ConversionRateConfig },
1028
+ nil?: true
1363
1029
 
1364
- # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil)
1365
- # Configuration for a single matrix scaling factor
1030
+ # @!attribute dimensional_price_configuration
1031
+ # For dimensional price: specifies a price group and dimension values
1366
1032
  #
1367
- # @param first_dimension_value [String]
1368
- # @param scaling_factor [String]
1369
- # @param second_dimension_value [String, nil]
1370
- end
1033
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
1034
+ optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true
1371
1035
 
1372
- class Tier < Orb::Internal::Type::BaseModel
1373
- # @!attribute tier_lower_bound
1036
+ # @!attribute external_price_id
1037
+ # An alias for the price.
1374
1038
  #
1375
- # @return [String]
1376
- required :tier_lower_bound, String
1039
+ # @return [String, nil]
1040
+ optional :external_price_id, String, nil?: true
1377
1041
 
1378
- # @!attribute unit_amount
1042
+ # @!attribute fixed_price_quantity
1043
+ # If the Price represents a fixed cost, this represents the quantity of units
1044
+ # applied.
1379
1045
  #
1380
- # @return [String]
1381
- required :unit_amount, String
1046
+ # @return [Float, nil]
1047
+ optional :fixed_price_quantity, Float, nil?: true
1382
1048
 
1383
- # @!method initialize(tier_lower_bound:, unit_amount:)
1384
- # Configuration for a single tier entry with business logic
1049
+ # @!attribute invoice_grouping_key
1050
+ # The property used to group this price on an invoice
1385
1051
  #
1386
- # @param tier_lower_bound [String]
1387
- # @param unit_amount [String]
1388
- end
1389
- end
1052
+ # @return [String, nil]
1053
+ optional :invoice_grouping_key, String, nil?: true
1390
1054
 
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
1055
+ # @!attribute invoicing_cycle_configuration
1056
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
1057
+ # If unspecified, a single invoice is produced per billing cycle.
1414
1058
  #
1415
- # @return [String]
1416
- required :grouping_key, String
1059
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
1060
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1417
1061
 
1418
- # @!attribute tier_lower_bound
1419
- # Tier lower bound
1062
+ # @!attribute license_type_id
1063
+ # The ID of the license type to associate with this price.
1420
1064
  #
1421
- # @return [String]
1422
- required :tier_lower_bound, String
1065
+ # @return [String, nil]
1066
+ optional :license_type_id, String, nil?: true
1423
1067
 
1424
- # @!attribute unit_amount
1425
- # Unit amount for this combination
1068
+ # @!attribute metadata
1069
+ # User-specified key/value pairs for the resource. Individual keys can be removed
1070
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
1071
+ # by setting `metadata` to `null`.
1426
1072
  #
1427
- # @return [String]
1428
- required :unit_amount, String
1073
+ # @return [Hash{Symbol=>String, nil}, nil]
1074
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
1429
1075
 
1430
- # @!method initialize(grouping_key:, tier_lower_bound:, unit_amount:)
1431
- # Configuration for a dimension value entry
1076
+ # @!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)
1077
+ # Some parameter documentations has been truncated, see
1078
+ # {Orb::Models::PriceCreateParams::Body::EventOutput} for more details.
1432
1079
  #
1433
- # @param grouping_key [String] Grouping key value
1080
+ # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::EventOutput::Cadence] The cadence to bill for this price on.
1434
1081
  #
1435
- # @param tier_lower_bound [String] Tier lower bound
1082
+ # @param currency [String] An ISO 4217 currency string for which this price is billed in.
1436
1083
  #
1437
- # @param unit_amount [String] Unit amount for this combination
1438
- end
1439
- end
1084
+ # @param event_output_config [Orb::Models::PriceCreateParams::Body::EventOutput::EventOutputConfig] Configuration for event_output pricing
1085
+ #
1086
+ # @param item_id [String] The id of the item the price will be associated with.
1087
+ #
1088
+ # @param name [String] The name of the price.
1089
+ #
1090
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
1091
+ #
1092
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
1093
+ #
1094
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
1095
+ #
1096
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
1097
+ #
1098
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
1099
+ #
1100
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
1101
+ #
1102
+ # @param external_price_id [String, nil] An alias for the price.
1103
+ #
1104
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
1105
+ #
1106
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
1107
+ #
1108
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
1109
+ #
1110
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
1111
+ #
1112
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
1113
+ #
1114
+ # @param model_type [Symbol, :event_output] The pricing model type
1440
1115
 
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
1116
+ # The cadence to bill for this price on.
1117
+ #
1118
+ # @see Orb::Models::PriceCreateParams::Body::EventOutput#cadence
1119
+ module Cadence
1120
+ extend Orb::Internal::Type::Enum
1477
1121
 
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
1122
+ ANNUAL = :annual
1123
+ SEMI_ANNUAL = :semi_annual
1124
+ MONTHLY = :monthly
1125
+ QUARTERLY = :quarterly
1126
+ ONE_TIME = :one_time
1127
+ CUSTOM = :custom
1498
1128
 
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
1129
+ # @!method self.values
1130
+ # @return [Array<Symbol>]
1131
+ end
1132
+
1133
+ # @see Orb::Models::PriceCreateParams::Body::EventOutput#event_output_config
1134
+ class EventOutputConfig < Orb::Internal::Type::BaseModel
1135
+ # @!attribute unit_rating_key
1136
+ # The key in the event data to extract the unit rate from.
1137
+ #
1138
+ # @return [String]
1139
+ required :unit_rating_key, String
1140
+
1141
+ # @!attribute default_unit_rate
1142
+ # If provided, this amount will be used as the unit rate when an event does not
1143
+ # have a value for the `unit_rating_key`. If not provided, events missing a unit
1144
+ # rate will be ignored.
1145
+ #
1146
+ # @return [String, nil]
1147
+ optional :default_unit_rate, String, nil?: true
1148
+
1149
+ # @!attribute grouping_key
1150
+ # An optional key in the event data to group by (e.g., event ID). All events will
1151
+ # also be grouped by their unit rate.
1152
+ #
1153
+ # @return [String, nil]
1154
+ optional :grouping_key, String, nil?: true
1155
+
1156
+ # @!method initialize(unit_rating_key:, default_unit_rate: nil, grouping_key: nil)
1157
+ # Some parameter documentations has been truncated, see
1158
+ # {Orb::Models::PriceCreateParams::Body::EventOutput::EventOutputConfig} for more
1159
+ # details.
1160
+ #
1161
+ # Configuration for event_output pricing
1162
+ #
1163
+ # @param unit_rating_key [String] The key in the event data to extract the unit rate from.
1164
+ #
1165
+ # @param default_unit_rate [String, nil] If provided, this amount will be used as the unit rate when an event does not ha
1166
+ #
1167
+ # @param grouping_key [String, nil] An optional key in the event data to group by (e.g., event ID). All events will
1168
+ end
1169
+ end
1511
1170
 
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
1171
+ # @!method self.variants
1172
+ # @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::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::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput)]
1545
1173
  end
1546
1174
  end
1547
1175
  end