orb-billing 1.14.0 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (347) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/lib/orb/client.rb +14 -0
  4. data/lib/orb/internal/transport/base_client.rb +5 -0
  5. data/lib/orb/internal/type/union.rb +13 -27
  6. data/lib/orb/models/accounting_provider_config.rb +14 -3
  7. data/lib/orb/models/adjustment_interval.rb +185 -3
  8. data/lib/orb/models/alert.rb +105 -1
  9. data/lib/orb/models/alert_create_for_subscription_params.rb +120 -7
  10. data/lib/orb/models/alert_update_params.rb +113 -1
  11. data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +2419 -17109
  12. data/lib/orb/models/beta_create_plan_version_params.rb +2361 -16947
  13. data/lib/orb/models/changed_subscription_resources.rb +200 -10
  14. data/lib/orb/models/conversion_rate_config.rb +18 -0
  15. data/lib/orb/models/credit_block_list_invoices_response.rb +155 -1
  16. data/lib/orb/models/credit_block_retrieve_response.rb +150 -1
  17. data/lib/orb/models/customer.rb +111 -4
  18. data/lib/orb/models/customer_create_params.rb +6 -1
  19. data/lib/orb/models/customer_tax_id.rb +15 -1
  20. data/lib/orb/models/customer_update_by_external_id_params.rb +16 -2
  21. data/lib/orb/models/customer_update_params.rb +16 -2
  22. data/lib/orb/models/customers/credit_list_by_external_id_response.rb +155 -1
  23. data/lib/orb/models/customers/credit_list_response.rb +152 -1
  24. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +4 -4
  25. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +4 -4
  26. data/lib/orb/models/dimensional_price_group.rb +1 -1
  27. data/lib/orb/models/discount.rb +145 -1
  28. data/lib/orb/models/event_ingest_params.rb +5 -2
  29. data/lib/orb/models/invoice.rb +198 -10
  30. data/lib/orb/models/invoice_create_params.rb +6 -5
  31. data/lib/orb/models/invoice_fetch_upcoming_response.rb +200 -10
  32. data/lib/orb/models/invoice_issue_summary_response.rb +9 -3
  33. data/lib/orb/models/invoice_level_discount.rb +145 -1
  34. data/lib/orb/models/invoice_line_item_create_response.rb +189 -5
  35. data/lib/orb/models/invoice_list_summary_response.rb +9 -3
  36. data/lib/orb/models/licenses/external_license_get_usage_params.rb +3 -3
  37. data/lib/orb/models/licenses/usage_get_all_usage_params.rb +3 -3
  38. data/lib/orb/models/licenses/usage_get_usage_params.rb +3 -3
  39. data/lib/orb/models/mutated_subscription.rb +169 -4
  40. data/lib/orb/models/new_allocation_price.rb +11 -1
  41. data/lib/orb/models/new_floating_bulk_price.rb +1 -3
  42. data/lib/orb/models/new_floating_bulk_with_proration_price.rb +1 -3
  43. data/lib/orb/models/new_floating_cumulative_grouped_bulk_price.rb +1 -3
  44. data/lib/orb/models/new_floating_grouped_allocation_price.rb +1 -3
  45. data/lib/orb/models/new_floating_grouped_tiered_package_price.rb +1 -3
  46. data/lib/orb/models/new_floating_grouped_tiered_price.rb +1 -3
  47. data/lib/orb/models/new_floating_grouped_with_metered_minimum_price.rb +1 -3
  48. data/lib/orb/models/new_floating_grouped_with_prorated_minimum_price.rb +1 -3
  49. data/lib/orb/models/new_floating_matrix_price.rb +1 -3
  50. data/lib/orb/models/new_floating_matrix_with_allocation_price.rb +1 -3
  51. data/lib/orb/models/new_floating_matrix_with_display_name_price.rb +1 -3
  52. data/lib/orb/models/new_floating_max_group_tiered_package_price.rb +1 -3
  53. data/lib/orb/models/new_floating_minimum_composite_price.rb +1 -3
  54. data/lib/orb/models/new_floating_package_price.rb +1 -3
  55. data/lib/orb/models/new_floating_package_with_allocation_price.rb +1 -3
  56. data/lib/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  57. data/lib/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rb +1 -3
  58. data/lib/orb/models/new_floating_threshold_total_amount_price.rb +1 -3
  59. data/lib/orb/models/new_floating_tiered_package_price.rb +1 -3
  60. data/lib/orb/models/new_floating_tiered_package_with_minimum_price.rb +1 -3
  61. data/lib/orb/models/new_floating_tiered_price.rb +1 -3
  62. data/lib/orb/models/new_floating_tiered_with_minimum_price.rb +1 -3
  63. data/lib/orb/models/new_floating_tiered_with_proration_price.rb +1 -3
  64. data/lib/orb/models/new_floating_unit_price.rb +1 -3
  65. data/lib/orb/models/new_floating_unit_with_percent_price.rb +1 -3
  66. data/lib/orb/models/new_floating_unit_with_proration_price.rb +1 -3
  67. data/lib/orb/models/new_plan_bulk_price.rb +1 -1
  68. data/lib/orb/models/new_plan_bulk_with_proration_price.rb +1 -3
  69. data/lib/orb/models/new_plan_cumulative_grouped_bulk_price.rb +1 -3
  70. data/lib/orb/models/new_plan_grouped_allocation_price.rb +1 -3
  71. data/lib/orb/models/new_plan_grouped_tiered_package_price.rb +1 -3
  72. data/lib/orb/models/new_plan_grouped_tiered_price.rb +1 -3
  73. data/lib/orb/models/new_plan_grouped_with_metered_minimum_price.rb +1 -3
  74. data/lib/orb/models/new_plan_grouped_with_prorated_minimum_price.rb +1 -3
  75. data/lib/orb/models/new_plan_matrix_price.rb +1 -5
  76. data/lib/orb/models/new_plan_matrix_with_allocation_price.rb +1 -3
  77. data/lib/orb/models/new_plan_matrix_with_display_name_price.rb +1 -3
  78. data/lib/orb/models/new_plan_max_group_tiered_package_price.rb +1 -3
  79. data/lib/orb/models/new_plan_minimum_composite_price.rb +1 -3
  80. data/lib/orb/models/new_plan_package_price.rb +1 -5
  81. data/lib/orb/models/new_plan_package_with_allocation_price.rb +1 -3
  82. data/lib/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  83. data/lib/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rb +1 -3
  84. data/lib/orb/models/new_plan_threshold_total_amount_price.rb +1 -3
  85. data/lib/orb/models/new_plan_tiered_package_price.rb +1 -3
  86. data/lib/orb/models/new_plan_tiered_package_with_minimum_price.rb +1 -3
  87. data/lib/orb/models/new_plan_tiered_price.rb +1 -5
  88. data/lib/orb/models/new_plan_tiered_with_minimum_price.rb +1 -3
  89. data/lib/orb/models/new_plan_unit_price.rb +1 -1
  90. data/lib/orb/models/new_plan_unit_with_percent_price.rb +1 -3
  91. data/lib/orb/models/new_plan_unit_with_proration_price.rb +1 -3
  92. data/lib/orb/models/new_subscription_bulk_price.rb +1 -3
  93. data/lib/orb/models/new_subscription_bulk_with_proration_price.rb +1 -3
  94. data/lib/orb/models/new_subscription_cumulative_grouped_bulk_price.rb +1 -3
  95. data/lib/orb/models/new_subscription_grouped_allocation_price.rb +1 -3
  96. data/lib/orb/models/new_subscription_grouped_tiered_package_price.rb +1 -3
  97. data/lib/orb/models/new_subscription_grouped_tiered_price.rb +1 -3
  98. data/lib/orb/models/new_subscription_grouped_with_metered_minimum_price.rb +1 -3
  99. data/lib/orb/models/new_subscription_grouped_with_prorated_minimum_price.rb +1 -3
  100. data/lib/orb/models/new_subscription_matrix_price.rb +1 -3
  101. data/lib/orb/models/new_subscription_matrix_with_allocation_price.rb +1 -3
  102. data/lib/orb/models/new_subscription_matrix_with_display_name_price.rb +1 -3
  103. data/lib/orb/models/new_subscription_max_group_tiered_package_price.rb +1 -3
  104. data/lib/orb/models/new_subscription_minimum_composite_price.rb +1 -3
  105. data/lib/orb/models/new_subscription_package_price.rb +1 -3
  106. data/lib/orb/models/new_subscription_package_with_allocation_price.rb +1 -3
  107. data/lib/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  108. data/lib/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rb +1 -3
  109. data/lib/orb/models/new_subscription_threshold_total_amount_price.rb +1 -3
  110. data/lib/orb/models/new_subscription_tiered_package_price.rb +1 -3
  111. data/lib/orb/models/new_subscription_tiered_package_with_minimum_price.rb +1 -3
  112. data/lib/orb/models/new_subscription_tiered_price.rb +1 -3
  113. data/lib/orb/models/new_subscription_tiered_with_minimum_price.rb +1 -3
  114. data/lib/orb/models/new_subscription_unit_price.rb +1 -3
  115. data/lib/orb/models/new_subscription_unit_with_percent_price.rb +1 -3
  116. data/lib/orb/models/new_subscription_unit_with_proration_price.rb +1 -3
  117. data/lib/orb/models/per_price_cost.rb +2 -2
  118. data/lib/orb/models/plan.rb +189 -9
  119. data/lib/orb/models/plan_create_params.rb +1047 -8228
  120. data/lib/orb/models/plan_update_params.rb +9 -1
  121. data/lib/orb/models/plan_version.rb +186 -5
  122. data/lib/orb/models/plans/external_plan_id_update_params.rb +9 -1
  123. data/lib/orb/models/plans/migration_cancel_response.rb +22 -4
  124. data/lib/orb/models/plans/migration_list_response.rb +22 -4
  125. data/lib/orb/models/plans/migration_retrieve_response.rb +22 -4
  126. data/lib/orb/models/price.rb +2614 -1268
  127. data/lib/orb/models/price_create_params.rb +866 -49
  128. data/lib/orb/models/price_evaluate_multiple_params.rb +889 -54
  129. data/lib/orb/models/price_evaluate_preview_events_params.rb +881 -46
  130. data/lib/orb/models/price_interval.rb +2 -2
  131. data/lib/orb/models/subscription.rb +168 -4
  132. data/lib/orb/models/subscription_create_params.rb +2818 -674
  133. data/lib/orb/models/subscription_price_intervals_params.rb +1098 -57
  134. data/lib/orb/models/subscription_schedule_plan_change_params.rb +2834 -687
  135. data/lib/orb/models/subscription_update_params.rb +12 -1
  136. data/lib/orb/models.rb +2 -0
  137. data/lib/orb/resources/alerts.rb +14 -3
  138. data/lib/orb/resources/customers/credits/ledger.rb +28 -14
  139. data/lib/orb/resources/customers.rb +6 -2
  140. data/lib/orb/resources/events.rb +7 -34
  141. data/lib/orb/resources/invoices.rb +6 -2
  142. data/lib/orb/resources/licenses/external_licenses.rb +1 -1
  143. data/lib/orb/resources/licenses/usage.rb +2 -2
  144. data/lib/orb/resources/metrics.rb +5 -5
  145. data/lib/orb/resources/plans/external_plan_id.rb +5 -3
  146. data/lib/orb/resources/plans.rb +9 -5
  147. data/lib/orb/resources/prices/external_price_id.rb +2 -2
  148. data/lib/orb/resources/prices.rb +5 -5
  149. data/lib/orb/resources/subscriptions.rb +20 -3
  150. data/lib/orb/version.rb +1 -1
  151. data/lib/orb.rb +1 -0
  152. data/rbi/orb/models/accounting_provider_config.rbi +38 -5
  153. data/rbi/orb/models/adjustment_interval.rbi +336 -0
  154. data/rbi/orb/models/alert.rbi +172 -3
  155. data/rbi/orb/models/alert_create_for_subscription_params.rbi +268 -9
  156. data/rbi/orb/models/alert_update_params.rbi +208 -0
  157. data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +3833 -28395
  158. data/rbi/orb/models/beta_create_plan_version_params.rbi +3833 -28363
  159. data/rbi/orb/models/changed_subscription_resources.rbi +360 -5
  160. data/rbi/orb/models/conversion_rate_config.rbi +18 -0
  161. data/rbi/orb/models/credit_block_list_invoices_response.rbi +346 -3
  162. data/rbi/orb/models/credit_block_retrieve_response.rbi +344 -3
  163. data/rbi/orb/models/customer.rbi +190 -10
  164. data/rbi/orb/models/customer_create_params.rbi +12 -2
  165. data/rbi/orb/models/customer_tax_id.rbi +15 -1
  166. data/rbi/orb/models/customer_update_by_external_id_params.rbi +22 -2
  167. data/rbi/orb/models/customer_update_params.rbi +22 -2
  168. data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +346 -3
  169. data/rbi/orb/models/customers/credit_list_response.rbi +347 -3
  170. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +6 -6
  171. data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +6 -6
  172. data/rbi/orb/models/dimensional_price_group.rbi +1 -1
  173. data/rbi/orb/models/discount.rbi +269 -1
  174. data/rbi/orb/models/event_ingest_params.rbi +4 -2
  175. data/rbi/orb/models/invoice.rbi +360 -5
  176. data/rbi/orb/models/invoice_create_params.rbi +12 -7
  177. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +360 -5
  178. data/rbi/orb/models/invoice_issue_summary_response.rbi +19 -4
  179. data/rbi/orb/models/invoice_level_discount.rbi +298 -1
  180. data/rbi/orb/models/invoice_line_item_create_response.rbi +339 -0
  181. data/rbi/orb/models/invoice_list_summary_response.rbi +19 -4
  182. data/rbi/orb/models/licenses/external_license_get_usage_params.rbi +3 -3
  183. data/rbi/orb/models/licenses/usage_get_all_usage_params.rbi +3 -3
  184. data/rbi/orb/models/licenses/usage_get_usage_params.rbi +3 -3
  185. data/rbi/orb/models/mutated_subscription.rbi +324 -2
  186. data/rbi/orb/models/new_allocation_price.rbi +12 -0
  187. data/rbi/orb/models/per_price_cost.rbi +3 -0
  188. data/rbi/orb/models/plan.rbi +339 -2
  189. data/rbi/orb/models/plan_create_params.rbi +1877 -14138
  190. data/rbi/orb/models/plan_update_params.rbi +8 -0
  191. data/rbi/orb/models/plan_version.rbi +339 -0
  192. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +8 -0
  193. data/rbi/orb/models/plans/migration_cancel_response.rbi +22 -1
  194. data/rbi/orb/models/plans/migration_list_response.rbi +22 -1
  195. data/rbi/orb/models/plans/migration_retrieve_response.rbi +22 -1
  196. data/rbi/orb/models/price.rbi +4552 -2285
  197. data/rbi/orb/models/price_create_params.rbi +1540 -114
  198. data/rbi/orb/models/price_evaluate_multiple_params.rbi +1540 -114
  199. data/rbi/orb/models/price_evaluate_preview_events_params.rbi +1540 -114
  200. data/rbi/orb/models/price_interval.rbi +3 -0
  201. data/rbi/orb/models/subscription.rbi +324 -2
  202. data/rbi/orb/models/subscription_create_params.rbi +4998 -1186
  203. data/rbi/orb/models/subscription_price_intervals_params.rbi +2127 -264
  204. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +4997 -1185
  205. data/rbi/orb/models/subscription_update_params.rbi +14 -0
  206. data/rbi/orb/models.rbi +2 -0
  207. data/rbi/orb/resources/alerts.rbi +39 -4
  208. data/rbi/orb/resources/customers/credits/ledger.rbi +28 -14
  209. data/rbi/orb/resources/customers.rbi +23 -0
  210. data/rbi/orb/resources/events.rbi +8 -35
  211. data/rbi/orb/resources/invoices.rbi +9 -3
  212. data/rbi/orb/resources/licenses/external_licenses.rbi +1 -1
  213. data/rbi/orb/resources/licenses/usage.rbi +2 -2
  214. data/rbi/orb/resources/metrics.rbi +5 -5
  215. data/rbi/orb/resources/plans/external_plan_id.rbi +5 -2
  216. data/rbi/orb/resources/plans.rbi +9 -3
  217. data/rbi/orb/resources/prices.rbi +3 -0
  218. data/rbi/orb/resources/subscriptions.rbi +29 -0
  219. data/sig/orb/models/accounting_provider_config.rbs +21 -4
  220. data/sig/orb/models/adjustment_interval.rbs +134 -0
  221. data/sig/orb/models/alert.rbs +85 -3
  222. data/sig/orb/models/alert_create_for_subscription_params.rbs +86 -4
  223. data/sig/orb/models/alert_update_params.rbs +86 -1
  224. data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +1803 -11601
  225. data/sig/orb/models/beta_create_plan_version_params.rbs +1747 -11541
  226. data/sig/orb/models/changed_subscription_resources.rbs +140 -1
  227. data/sig/orb/models/conversion_rate_config.rbs +12 -0
  228. data/sig/orb/models/credit_block_list_invoices_response.rbs +124 -3
  229. data/sig/orb/models/credit_block_retrieve_response.rbs +124 -3
  230. data/sig/orb/models/customer.rbs +70 -4
  231. data/sig/orb/models/customer_create_params.rbs +2 -2
  232. data/sig/orb/models/customer_tax_id.rbs +20 -2
  233. data/sig/orb/models/customer_update_by_external_id_params.rbs +7 -2
  234. data/sig/orb/models/customer_update_params.rbs +7 -2
  235. data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +124 -3
  236. data/sig/orb/models/customers/credit_list_response.rbs +124 -3
  237. data/sig/orb/models/discount.rbs +114 -0
  238. data/sig/orb/models/invoice.rbs +140 -1
  239. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +140 -1
  240. data/sig/orb/models/invoice_issue_summary_response.rbs +2 -1
  241. data/sig/orb/models/invoice_level_discount.rbs +117 -1
  242. data/sig/orb/models/invoice_line_item_create_response.rbs +134 -0
  243. data/sig/orb/models/invoice_list_summary_response.rbs +2 -1
  244. data/sig/orb/models/licenses/external_license_get_usage_params.rbs +4 -4
  245. data/sig/orb/models/licenses/usage_get_all_usage_params.rbs +4 -4
  246. data/sig/orb/models/licenses/usage_get_usage_params.rbs +4 -4
  247. data/sig/orb/models/mutated_subscription.rbs +124 -0
  248. data/sig/orb/models/new_allocation_price.rbs +5 -0
  249. data/sig/orb/models/new_floating_bulk_price.rbs +4 -4
  250. data/sig/orb/models/new_floating_bulk_with_proration_price.rbs +4 -4
  251. data/sig/orb/models/new_floating_cumulative_grouped_bulk_price.rbs +4 -4
  252. data/sig/orb/models/new_floating_grouped_allocation_price.rbs +4 -4
  253. data/sig/orb/models/new_floating_grouped_tiered_package_price.rbs +4 -4
  254. data/sig/orb/models/new_floating_grouped_tiered_price.rbs +4 -4
  255. data/sig/orb/models/new_floating_grouped_with_metered_minimum_price.rbs +4 -4
  256. data/sig/orb/models/new_floating_grouped_with_prorated_minimum_price.rbs +4 -4
  257. data/sig/orb/models/new_floating_matrix_price.rbs +4 -4
  258. data/sig/orb/models/new_floating_matrix_with_allocation_price.rbs +4 -4
  259. data/sig/orb/models/new_floating_matrix_with_display_name_price.rbs +4 -4
  260. data/sig/orb/models/new_floating_max_group_tiered_package_price.rbs +4 -4
  261. data/sig/orb/models/new_floating_minimum_composite_price.rbs +4 -4
  262. data/sig/orb/models/new_floating_package_price.rbs +4 -4
  263. data/sig/orb/models/new_floating_package_with_allocation_price.rbs +4 -4
  264. data/sig/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  265. data/sig/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  266. data/sig/orb/models/new_floating_threshold_total_amount_price.rbs +4 -4
  267. data/sig/orb/models/new_floating_tiered_package_price.rbs +4 -4
  268. data/sig/orb/models/new_floating_tiered_package_with_minimum_price.rbs +4 -4
  269. data/sig/orb/models/new_floating_tiered_price.rbs +4 -4
  270. data/sig/orb/models/new_floating_tiered_with_minimum_price.rbs +4 -4
  271. data/sig/orb/models/new_floating_tiered_with_proration_price.rbs +4 -4
  272. data/sig/orb/models/new_floating_unit_price.rbs +4 -4
  273. data/sig/orb/models/new_floating_unit_with_percent_price.rbs +4 -4
  274. data/sig/orb/models/new_floating_unit_with_proration_price.rbs +4 -4
  275. data/sig/orb/models/new_plan_bulk_price.rbs +4 -4
  276. data/sig/orb/models/new_plan_bulk_with_proration_price.rbs +4 -4
  277. data/sig/orb/models/new_plan_cumulative_grouped_bulk_price.rbs +4 -4
  278. data/sig/orb/models/new_plan_grouped_allocation_price.rbs +4 -4
  279. data/sig/orb/models/new_plan_grouped_tiered_package_price.rbs +4 -4
  280. data/sig/orb/models/new_plan_grouped_tiered_price.rbs +4 -4
  281. data/sig/orb/models/new_plan_grouped_with_metered_minimum_price.rbs +4 -4
  282. data/sig/orb/models/new_plan_grouped_with_prorated_minimum_price.rbs +4 -4
  283. data/sig/orb/models/new_plan_matrix_price.rbs +4 -4
  284. data/sig/orb/models/new_plan_matrix_with_allocation_price.rbs +4 -4
  285. data/sig/orb/models/new_plan_matrix_with_display_name_price.rbs +4 -4
  286. data/sig/orb/models/new_plan_max_group_tiered_package_price.rbs +4 -4
  287. data/sig/orb/models/new_plan_minimum_composite_price.rbs +4 -4
  288. data/sig/orb/models/new_plan_package_price.rbs +4 -4
  289. data/sig/orb/models/new_plan_package_with_allocation_price.rbs +4 -4
  290. data/sig/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  291. data/sig/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  292. data/sig/orb/models/new_plan_threshold_total_amount_price.rbs +4 -4
  293. data/sig/orb/models/new_plan_tiered_package_price.rbs +4 -4
  294. data/sig/orb/models/new_plan_tiered_package_with_minimum_price.rbs +4 -4
  295. data/sig/orb/models/new_plan_tiered_price.rbs +4 -4
  296. data/sig/orb/models/new_plan_tiered_with_minimum_price.rbs +4 -4
  297. data/sig/orb/models/new_plan_unit_price.rbs +4 -4
  298. data/sig/orb/models/new_plan_unit_with_percent_price.rbs +4 -4
  299. data/sig/orb/models/new_plan_unit_with_proration_price.rbs +4 -4
  300. data/sig/orb/models/new_subscription_bulk_price.rbs +4 -4
  301. data/sig/orb/models/new_subscription_bulk_with_proration_price.rbs +4 -4
  302. data/sig/orb/models/new_subscription_cumulative_grouped_bulk_price.rbs +4 -4
  303. data/sig/orb/models/new_subscription_grouped_allocation_price.rbs +4 -4
  304. data/sig/orb/models/new_subscription_grouped_tiered_package_price.rbs +4 -4
  305. data/sig/orb/models/new_subscription_grouped_tiered_price.rbs +4 -4
  306. data/sig/orb/models/new_subscription_grouped_with_metered_minimum_price.rbs +4 -4
  307. data/sig/orb/models/new_subscription_grouped_with_prorated_minimum_price.rbs +4 -4
  308. data/sig/orb/models/new_subscription_matrix_price.rbs +4 -4
  309. data/sig/orb/models/new_subscription_matrix_with_allocation_price.rbs +4 -4
  310. data/sig/orb/models/new_subscription_matrix_with_display_name_price.rbs +4 -4
  311. data/sig/orb/models/new_subscription_max_group_tiered_package_price.rbs +4 -4
  312. data/sig/orb/models/new_subscription_minimum_composite_price.rbs +4 -4
  313. data/sig/orb/models/new_subscription_package_price.rbs +4 -4
  314. data/sig/orb/models/new_subscription_package_with_allocation_price.rbs +4 -4
  315. data/sig/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  316. data/sig/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  317. data/sig/orb/models/new_subscription_threshold_total_amount_price.rbs +4 -4
  318. data/sig/orb/models/new_subscription_tiered_package_price.rbs +4 -4
  319. data/sig/orb/models/new_subscription_tiered_package_with_minimum_price.rbs +4 -4
  320. data/sig/orb/models/new_subscription_tiered_price.rbs +4 -4
  321. data/sig/orb/models/new_subscription_tiered_with_minimum_price.rbs +4 -4
  322. data/sig/orb/models/new_subscription_unit_price.rbs +4 -4
  323. data/sig/orb/models/new_subscription_unit_with_percent_price.rbs +4 -4
  324. data/sig/orb/models/new_subscription_unit_with_proration_price.rbs +4 -4
  325. data/sig/orb/models/plan.rbs +134 -0
  326. data/sig/orb/models/plan_create_params.rbs +836 -5728
  327. data/sig/orb/models/plan_update_params.rbs +5 -0
  328. data/sig/orb/models/plan_version.rbs +134 -0
  329. data/sig/orb/models/plans/external_plan_id_update_params.rbs +5 -0
  330. data/sig/orb/models/price.rbs +2200 -1150
  331. data/sig/orb/models/price_create_params.rbs +611 -23
  332. data/sig/orb/models/price_evaluate_multiple_params.rbs +626 -23
  333. data/sig/orb/models/price_evaluate_preview_events_params.rbs +626 -23
  334. data/sig/orb/models/subscription.rbs +124 -0
  335. data/sig/orb/models/subscription_create_params.rbs +2009 -430
  336. data/sig/orb/models/subscription_price_intervals_params.rbs +795 -23
  337. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +2009 -430
  338. data/sig/orb/models/subscription_update_params.rbs +5 -0
  339. data/sig/orb/models.rbs +2 -0
  340. data/sig/orb/resources/alerts.rbs +5 -1
  341. data/sig/orb/resources/customers.rbs +2 -0
  342. data/sig/orb/resources/licenses/external_licenses.rbs +1 -1
  343. data/sig/orb/resources/licenses/usage.rbs +2 -2
  344. data/sig/orb/resources/plans/external_plan_id.rbs +1 -0
  345. data/sig/orb/resources/plans.rbs +2 -0
  346. data/sig/orb/resources/subscriptions.rbs +3 -0
  347. metadata +6 -7
@@ -144,7 +144,7 @@ module Orb
144
144
  # @!attribute price
145
145
  # New floating price request body params.
146
146
  #
147
- # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::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::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil]
147
+ # @return [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::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::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil]
148
148
  optional :price,
149
149
  union: -> {
150
150
  Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price
@@ -170,7 +170,7 @@ module Orb
170
170
  #
171
171
  # @param metric_parameter_overrides [Hash{Symbol=>Object}, nil] Optional overrides for parameterized billable metric parameters. If the metric h
172
172
  #
173
- # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::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::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil] New floating price request body params.
173
+ # @param price [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::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::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput, nil] New floating price request body params.
174
174
  #
175
175
  # @param price_id [String, nil] The ID of a price to evaluate that exists in your Orb account.
176
176
 
@@ -211,6 +211,9 @@ module Orb
211
211
 
212
212
  variant :matrix_with_allocation, -> { Orb::NewFloatingMatrixWithAllocationPrice }
213
213
 
214
+ variant :matrix_with_threshold_discounts,
215
+ -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts }
216
+
214
217
  variant :tiered_with_proration, -> { Orb::NewFloatingTieredWithProrationPrice }
215
218
 
216
219
  variant :unit_with_proration, -> { Orb::NewFloatingUnitWithProrationPrice }
@@ -241,6 +244,12 @@ module Orb
241
244
  variant :cumulative_grouped_allocation,
242
245
  -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation }
243
246
 
247
+ variant :daily_credit_allowance,
248
+ -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance }
249
+
250
+ variant :metered_allowance,
251
+ -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance }
252
+
244
253
  variant :minimum_composite, -> { Orb::NewFloatingMinimumCompositePrice }
245
254
 
246
255
  variant :percent, -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent }
@@ -317,11 +326,7 @@ module Orb
317
326
  # The configuration for the rate of the price currency to the invoicing currency.
318
327
  #
319
328
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
320
- optional :conversion_rate_config,
321
- union: -> {
322
- Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::BulkWithFilters::ConversionRateConfig
323
- },
324
- nil?: true
329
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
325
330
 
326
331
  # @!attribute dimensional_price_configuration
327
332
  # For dimensional price: specifies a price group and dimension values
@@ -506,6 +511,312 @@ module Orb
506
511
  end
507
512
  end
508
513
 
514
+ class MatrixWithThresholdDiscounts < Orb::Internal::Type::BaseModel
515
+ # @!attribute cadence
516
+ # The cadence to bill for this price on.
517
+ #
518
+ # @return [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence]
519
+ required :cadence,
520
+ enum: -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence }
521
+
522
+ # @!attribute currency
523
+ # An ISO 4217 currency string for which this price is billed in.
524
+ #
525
+ # @return [String]
526
+ required :currency, String
527
+
528
+ # @!attribute item_id
529
+ # The id of the item the price will be associated with.
530
+ #
531
+ # @return [String]
532
+ required :item_id, String
533
+
534
+ # @!attribute matrix_with_threshold_discounts_config
535
+ # Configuration for matrix_with_threshold_discounts pricing
536
+ #
537
+ # @return [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig]
538
+ required :matrix_with_threshold_discounts_config,
539
+ -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig }
540
+
541
+ # @!attribute model_type
542
+ # The pricing model type
543
+ #
544
+ # @return [Symbol, :matrix_with_threshold_discounts]
545
+ required :model_type, const: :matrix_with_threshold_discounts
546
+
547
+ # @!attribute name
548
+ # The name of the price.
549
+ #
550
+ # @return [String]
551
+ required :name, String
552
+
553
+ # @!attribute billable_metric_id
554
+ # The id of the billable metric for the price. Only needed if the price is
555
+ # usage-based.
556
+ #
557
+ # @return [String, nil]
558
+ optional :billable_metric_id, String, nil?: true
559
+
560
+ # @!attribute billed_in_advance
561
+ # If the Price represents a fixed cost, the price will be billed in-advance if
562
+ # this is true, and in-arrears if this is false.
563
+ #
564
+ # @return [Boolean, nil]
565
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
566
+
567
+ # @!attribute billing_cycle_configuration
568
+ # For custom cadence: specifies the duration of the billing period in days or
569
+ # months.
570
+ #
571
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
572
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
573
+
574
+ # @!attribute conversion_rate
575
+ # The per unit conversion rate of the price currency to the invoicing currency.
576
+ #
577
+ # @return [Float, nil]
578
+ optional :conversion_rate, Float, nil?: true
579
+
580
+ # @!attribute conversion_rate_config
581
+ # The configuration for the rate of the price currency to the invoicing currency.
582
+ #
583
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
584
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
585
+
586
+ # @!attribute dimensional_price_configuration
587
+ # For dimensional price: specifies a price group and dimension values
588
+ #
589
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
590
+ optional :dimensional_price_configuration,
591
+ -> {
592
+ Orb::NewDimensionalPriceConfiguration
593
+ },
594
+ nil?: true
595
+
596
+ # @!attribute external_price_id
597
+ # An alias for the price.
598
+ #
599
+ # @return [String, nil]
600
+ optional :external_price_id, String, nil?: true
601
+
602
+ # @!attribute fixed_price_quantity
603
+ # If the Price represents a fixed cost, this represents the quantity of units
604
+ # applied.
605
+ #
606
+ # @return [Float, nil]
607
+ optional :fixed_price_quantity, Float, nil?: true
608
+
609
+ # @!attribute invoice_grouping_key
610
+ # The property used to group this price on an invoice
611
+ #
612
+ # @return [String, nil]
613
+ optional :invoice_grouping_key, String, nil?: true
614
+
615
+ # @!attribute invoicing_cycle_configuration
616
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
617
+ # If unspecified, a single invoice is produced per billing cycle.
618
+ #
619
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
620
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
621
+
622
+ # @!attribute license_type_id
623
+ # The ID of the license type to associate with this price.
624
+ #
625
+ # @return [String, nil]
626
+ optional :license_type_id, String, nil?: true
627
+
628
+ # @!attribute metadata
629
+ # User-specified key/value pairs for the resource. Individual keys can be removed
630
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
631
+ # by setting `metadata` to `null`.
632
+ #
633
+ # @return [Hash{Symbol=>String, nil}, nil]
634
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
635
+
636
+ # @!method initialize(cadence:, currency:, item_id:, matrix_with_threshold_discounts_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :matrix_with_threshold_discounts)
637
+ # Some parameter documentations has been truncated, see
638
+ # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts}
639
+ # for more details.
640
+ #
641
+ # @param cadence [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::Cadence] The cadence to bill for this price on.
642
+ #
643
+ # @param currency [String] An ISO 4217 currency string for which this price is billed in.
644
+ #
645
+ # @param item_id [String] The id of the item the price will be associated with.
646
+ #
647
+ # @param matrix_with_threshold_discounts_config [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig] Configuration for matrix_with_threshold_discounts pricing
648
+ #
649
+ # @param name [String] The name of the price.
650
+ #
651
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
652
+ #
653
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
654
+ #
655
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
656
+ #
657
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
658
+ #
659
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
660
+ #
661
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
662
+ #
663
+ # @param external_price_id [String, nil] An alias for the price.
664
+ #
665
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
666
+ #
667
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
668
+ #
669
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
670
+ #
671
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
672
+ #
673
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
674
+ #
675
+ # @param model_type [Symbol, :matrix_with_threshold_discounts] The pricing model type
676
+
677
+ # The cadence to bill for this price on.
678
+ #
679
+ # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts#cadence
680
+ module Cadence
681
+ extend Orb::Internal::Type::Enum
682
+
683
+ ANNUAL = :annual
684
+ SEMI_ANNUAL = :semi_annual
685
+ MONTHLY = :monthly
686
+ QUARTERLY = :quarterly
687
+ ONE_TIME = :one_time
688
+ CUSTOM = :custom
689
+
690
+ # @!method self.values
691
+ # @return [Array<Symbol>]
692
+ end
693
+
694
+ # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts#matrix_with_threshold_discounts_config
695
+ class MatrixWithThresholdDiscountsConfig < Orb::Internal::Type::BaseModel
696
+ # @!attribute default_unit_amount
697
+ # Unit price used for usage that does not match any defined matrix cell.
698
+ #
699
+ # @return [String]
700
+ required :default_unit_amount, String
701
+
702
+ # @!attribute first_dimension
703
+ # First matrix dimension key.
704
+ #
705
+ # @return [String]
706
+ required :first_dimension, String
707
+
708
+ # @!attribute matrix_values
709
+ # Per-cell unit prices.
710
+ #
711
+ # @return [Array<Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue>]
712
+ required :matrix_values,
713
+ -> do
714
+ Orb::Internal::Type::ArrayOf[
715
+ Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue
716
+ ]
717
+ end
718
+
719
+ # @!attribute second_dimension
720
+ # Optional second matrix dimension key.
721
+ #
722
+ # @return [String, nil]
723
+ optional :second_dimension, String, nil?: true
724
+
725
+ # @!attribute threshold_discount_groups
726
+ #
727
+ # @return [Array<Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup>, nil]
728
+ optional :threshold_discount_groups,
729
+ -> do
730
+ Orb::Internal::Type::ArrayOf[
731
+ Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup
732
+ ]
733
+ end
734
+
735
+ # @!method initialize(default_unit_amount:, first_dimension:, matrix_values:, second_dimension: nil, threshold_discount_groups: nil)
736
+ # Configuration for matrix_with_threshold_discounts pricing
737
+ #
738
+ # @param default_unit_amount [String] Unit price used for usage that does not match any defined matrix cell.
739
+ #
740
+ # @param first_dimension [String] First matrix dimension key.
741
+ #
742
+ # @param matrix_values [Array<Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::MatrixValue>] Per-cell unit prices.
743
+ #
744
+ # @param second_dimension [String, nil] Optional second matrix dimension key.
745
+ #
746
+ # @param threshold_discount_groups [Array<Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup>]
747
+
748
+ class MatrixValue < Orb::Internal::Type::BaseModel
749
+ # @!attribute first_dimension_value
750
+ #
751
+ # @return [String]
752
+ required :first_dimension_value, String
753
+
754
+ # @!attribute unit_amount
755
+ #
756
+ # @return [String]
757
+ required :unit_amount, String
758
+
759
+ # @!attribute second_dimension_value
760
+ #
761
+ # @return [String, nil]
762
+ optional :second_dimension_value, String, nil?: true
763
+
764
+ # @!method initialize(first_dimension_value:, unit_amount:, second_dimension_value: nil)
765
+ # @param first_dimension_value [String]
766
+ # @param unit_amount [String]
767
+ # @param second_dimension_value [String, nil]
768
+ end
769
+
770
+ class ThresholdDiscountGroup < Orb::Internal::Type::BaseModel
771
+ # @!attribute above_threshold_discount_percentage
772
+ # Discount rate applied to spend above the threshold.
773
+ #
774
+ # @return [String]
775
+ required :above_threshold_discount_percentage, String
776
+
777
+ # @!attribute below_threshold_discount_percentage
778
+ # Discount rate applied to spend at or below the threshold. Set to 0 for no
779
+ # baseline discount.
780
+ #
781
+ # @return [String]
782
+ required :below_threshold_discount_percentage, String
783
+
784
+ # @!attribute cell_coordinates
785
+ # Semicolon-separated list of matrix cell coordinates targeted by this group. Each
786
+ # coordinate is `first,second` when the matrix has two dimensions, or just `first`
787
+ # for a single-dimension matrix. Example: `blue,circle;green,triangle`.
788
+ #
789
+ # @return [String]
790
+ required :cell_coordinates, String
791
+
792
+ # @!attribute threshold_amount
793
+ #
794
+ # @return [String]
795
+ required :threshold_amount, String
796
+
797
+ # @!attribute description
798
+ #
799
+ # @return [String, nil]
800
+ optional :description, String, nil?: true
801
+
802
+ # @!method initialize(above_threshold_discount_percentage:, below_threshold_discount_percentage:, cell_coordinates:, threshold_amount:, description: nil)
803
+ # Some parameter documentations has been truncated, see
804
+ # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts::MatrixWithThresholdDiscountsConfig::ThresholdDiscountGroup}
805
+ # for more details.
806
+ #
807
+ # @param above_threshold_discount_percentage [String] Discount rate applied to spend above the threshold.
808
+ #
809
+ # @param below_threshold_discount_percentage [String] Discount rate applied to spend at or below the threshold. Set to 0 for no baseli
810
+ #
811
+ # @param cell_coordinates [String] Semicolon-separated list of matrix cell coordinates targeted by this group. Each
812
+ #
813
+ # @param threshold_amount [String]
814
+ #
815
+ # @param description [String, nil]
816
+ end
817
+ end
818
+ end
819
+
509
820
  class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel
510
821
  # @!attribute cadence
511
822
  # The cadence to bill for this price on.
@@ -576,11 +887,7 @@ module Orb
576
887
  # The configuration for the rate of the price currency to the invoicing currency.
577
888
  #
578
889
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
579
- optional :conversion_rate_config,
580
- union: -> {
581
- Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds::ConversionRateConfig
582
- },
583
- nil?: true
890
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
584
891
 
585
892
  # @!attribute dimensional_price_configuration
586
893
  # For dimensional price: specifies a price group and dimension values
@@ -799,11 +1106,7 @@ module Orb
799
1106
  # The configuration for the rate of the price currency to the invoicing currency.
800
1107
  #
801
1108
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
802
- optional :conversion_rate_config,
803
- union: -> {
804
- Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation::ConversionRateConfig
805
- },
806
- nil?: true
1109
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
807
1110
 
808
1111
  # @!attribute dimensional_price_configuration
809
1112
  # For dimensional price: specifies a price group and dimension values
@@ -952,13 +1255,13 @@ module Orb
952
1255
  end
953
1256
  end
954
1257
 
955
- class Percent < Orb::Internal::Type::BaseModel
1258
+ class DailyCreditAllowance < Orb::Internal::Type::BaseModel
956
1259
  # @!attribute cadence
957
1260
  # The cadence to bill for this price on.
958
1261
  #
959
- # @return [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent::Cadence]
1262
+ # @return [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence]
960
1263
  required :cadence,
961
- enum: -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent::Cadence }
1264
+ enum: -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence }
962
1265
 
963
1266
  # @!attribute currency
964
1267
  # An ISO 4217 currency string for which this price is billed in.
@@ -966,6 +1269,13 @@ module Orb
966
1269
  # @return [String]
967
1270
  required :currency, String
968
1271
 
1272
+ # @!attribute daily_credit_allowance_config
1273
+ # Configuration for daily_credit_allowance pricing
1274
+ #
1275
+ # @return [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig]
1276
+ required :daily_credit_allowance_config,
1277
+ -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig }
1278
+
969
1279
  # @!attribute item_id
970
1280
  # The id of the item the price will be associated with.
971
1281
  #
@@ -975,8 +1285,8 @@ module Orb
975
1285
  # @!attribute model_type
976
1286
  # The pricing model type
977
1287
  #
978
- # @return [Symbol, :percent]
979
- required :model_type, const: :percent
1288
+ # @return [Symbol, :daily_credit_allowance]
1289
+ required :model_type, const: :daily_credit_allowance
980
1290
 
981
1291
  # @!attribute name
982
1292
  # The name of the price.
@@ -984,13 +1294,6 @@ module Orb
984
1294
  # @return [String]
985
1295
  required :name, String
986
1296
 
987
- # @!attribute percent_config
988
- # Configuration for percent pricing
989
- #
990
- # @return [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent::PercentConfig]
991
- required :percent_config,
992
- -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent::PercentConfig }
993
-
994
1297
  # @!attribute billable_metric_id
995
1298
  # The id of the billable metric for the price. Only needed if the price is
996
1299
  # usage-based.
@@ -1022,11 +1325,7 @@ module Orb
1022
1325
  # The configuration for the rate of the price currency to the invoicing currency.
1023
1326
  #
1024
1327
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
1025
- optional :conversion_rate_config,
1026
- union: -> {
1027
- Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent::ConversionRateConfig
1028
- },
1029
- nil?: true
1328
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1030
1329
 
1031
1330
  # @!attribute dimensional_price_configuration
1032
1331
  # For dimensional price: specifies a price group and dimension values
@@ -1078,12 +1377,522 @@ module Orb
1078
1377
  # @return [Hash{Symbol=>String, nil}, nil]
1079
1378
  optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
1080
1379
 
1081
- # @!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)
1380
+ # @!method initialize(cadence:, currency:, daily_credit_allowance_config:, item_id:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :daily_credit_allowance)
1082
1381
  # Some parameter documentations has been truncated, see
1083
- # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent}
1382
+ # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance}
1084
1383
  # for more details.
1085
1384
  #
1086
- # @param cadence [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent::Cadence] The cadence to bill for this price on.
1385
+ # @param cadence [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::Cadence] The cadence to bill for this price on.
1386
+ #
1387
+ # @param currency [String] An ISO 4217 currency string for which this price is billed in.
1388
+ #
1389
+ # @param daily_credit_allowance_config [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig] Configuration for daily_credit_allowance pricing
1390
+ #
1391
+ # @param item_id [String] The id of the item the price will be associated with.
1392
+ #
1393
+ # @param name [String] The name of the price.
1394
+ #
1395
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
1396
+ #
1397
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
1398
+ #
1399
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
1400
+ #
1401
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
1402
+ #
1403
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
1404
+ #
1405
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
1406
+ #
1407
+ # @param external_price_id [String, nil] An alias for the price.
1408
+ #
1409
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
1410
+ #
1411
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
1412
+ #
1413
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
1414
+ #
1415
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
1416
+ #
1417
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
1418
+ #
1419
+ # @param model_type [Symbol, :daily_credit_allowance] The pricing model type
1420
+
1421
+ # The cadence to bill for this price on.
1422
+ #
1423
+ # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance#cadence
1424
+ module Cadence
1425
+ extend Orb::Internal::Type::Enum
1426
+
1427
+ ANNUAL = :annual
1428
+ SEMI_ANNUAL = :semi_annual
1429
+ MONTHLY = :monthly
1430
+ QUARTERLY = :quarterly
1431
+ ONE_TIME = :one_time
1432
+ CUSTOM = :custom
1433
+
1434
+ # @!method self.values
1435
+ # @return [Array<Symbol>]
1436
+ end
1437
+
1438
+ # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance#daily_credit_allowance_config
1439
+ class DailyCreditAllowanceConfig < Orb::Internal::Type::BaseModel
1440
+ # @!attribute daily_allowance
1441
+ # Credits granted per day. Lose-it-or-use-it; does not roll over.
1442
+ #
1443
+ # @return [String]
1444
+ required :daily_allowance, String
1445
+
1446
+ # @!attribute default_unit_amount
1447
+ # Default per-unit credit rate for any usage not bucketed into a specified
1448
+ # matrix_value
1449
+ #
1450
+ # @return [String]
1451
+ required :default_unit_amount, String
1452
+
1453
+ # @!attribute dimensions
1454
+ # One or two event property values to evaluate matrix groups by
1455
+ #
1456
+ # @return [Array<String, nil>]
1457
+ required :dimensions, Orb::Internal::Type::ArrayOf[String, nil?: true]
1458
+
1459
+ # @!attribute event_day_property
1460
+ # Event property whose value identifies the day bucket the event belongs to (e.g.
1461
+ # 'event_day' set to an ISO date string in the customer's timezone). The allowance
1462
+ # resets per distinct value of this property.
1463
+ #
1464
+ # @return [String]
1465
+ required :event_day_property, String
1466
+
1467
+ # @!attribute matrix_values
1468
+ # Per-dimension credit rates
1469
+ #
1470
+ # @return [Array<Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue>]
1471
+ required :matrix_values,
1472
+ -> do
1473
+ Orb::Internal::Type::ArrayOf[
1474
+ Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue
1475
+ ]
1476
+ end
1477
+
1478
+ # @!method initialize(daily_allowance:, default_unit_amount:, dimensions:, event_day_property:, matrix_values:)
1479
+ # Some parameter documentations has been truncated, see
1480
+ # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig}
1481
+ # for more details.
1482
+ #
1483
+ # Configuration for daily_credit_allowance pricing
1484
+ #
1485
+ # @param daily_allowance [String] Credits granted per day. Lose-it-or-use-it; does not roll over.
1486
+ #
1487
+ # @param default_unit_amount [String] Default per-unit credit rate for any usage not bucketed into a specified
1488
+ # matrix\_
1489
+ #
1490
+ # @param dimensions [Array<String, nil>] One or two event property values to evaluate matrix groups by
1491
+ #
1492
+ # @param event_day_property [String] Event property whose value identifies the day bucket the event belongs to (e.g.
1493
+ #
1494
+ # @param matrix_values [Array<Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue>] Per-dimension credit rates
1495
+
1496
+ class MatrixValue < Orb::Internal::Type::BaseModel
1497
+ # @!attribute dimension_values
1498
+ # One or two matrix keys to filter usage to this value by. For example, ["model"]
1499
+ # could be used to apply a different credit rate to each AI model.
1500
+ #
1501
+ # @return [Array<String, nil>]
1502
+ required :dimension_values, Orb::Internal::Type::ArrayOf[String, nil?: true]
1503
+
1504
+ # @!attribute unit_amount
1505
+ # Credits charged per unit of usage matching the specified dimension_values
1506
+ #
1507
+ # @return [String]
1508
+ required :unit_amount, String
1509
+
1510
+ # @!method initialize(dimension_values:, unit_amount:)
1511
+ # Some parameter documentations has been truncated, see
1512
+ # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance::DailyCreditAllowanceConfig::MatrixValue}
1513
+ # for more details.
1514
+ #
1515
+ # Per-dimension credit price for the daily credit allowance model.
1516
+ #
1517
+ # @param dimension_values [Array<String, nil>] One or two matrix keys to filter usage to this value by. For example, ["model"]
1518
+ #
1519
+ # @param unit_amount [String] Credits charged per unit of usage matching the specified dimension_values
1520
+ end
1521
+ end
1522
+ end
1523
+
1524
+ class MeteredAllowance < Orb::Internal::Type::BaseModel
1525
+ # @!attribute cadence
1526
+ # The cadence to bill for this price on.
1527
+ #
1528
+ # @return [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence]
1529
+ required :cadence,
1530
+ enum: -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence }
1531
+
1532
+ # @!attribute currency
1533
+ # An ISO 4217 currency string for which this price is billed in.
1534
+ #
1535
+ # @return [String]
1536
+ required :currency, String
1537
+
1538
+ # @!attribute item_id
1539
+ # The id of the item the price will be associated with.
1540
+ #
1541
+ # @return [String]
1542
+ required :item_id, String
1543
+
1544
+ # @!attribute metered_allowance_config
1545
+ # Configuration for metered_allowance pricing
1546
+ #
1547
+ # @return [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig]
1548
+ required :metered_allowance_config,
1549
+ -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig }
1550
+
1551
+ # @!attribute model_type
1552
+ # The pricing model type
1553
+ #
1554
+ # @return [Symbol, :metered_allowance]
1555
+ required :model_type, const: :metered_allowance
1556
+
1557
+ # @!attribute name
1558
+ # The name of the price.
1559
+ #
1560
+ # @return [String]
1561
+ required :name, String
1562
+
1563
+ # @!attribute billable_metric_id
1564
+ # The id of the billable metric for the price. Only needed if the price is
1565
+ # usage-based.
1566
+ #
1567
+ # @return [String, nil]
1568
+ optional :billable_metric_id, String, nil?: true
1569
+
1570
+ # @!attribute billed_in_advance
1571
+ # If the Price represents a fixed cost, the price will be billed in-advance if
1572
+ # this is true, and in-arrears if this is false.
1573
+ #
1574
+ # @return [Boolean, nil]
1575
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
1576
+
1577
+ # @!attribute billing_cycle_configuration
1578
+ # For custom cadence: specifies the duration of the billing period in days or
1579
+ # months.
1580
+ #
1581
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
1582
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1583
+
1584
+ # @!attribute conversion_rate
1585
+ # The per unit conversion rate of the price currency to the invoicing currency.
1586
+ #
1587
+ # @return [Float, nil]
1588
+ optional :conversion_rate, Float, nil?: true
1589
+
1590
+ # @!attribute conversion_rate_config
1591
+ # The configuration for the rate of the price currency to the invoicing currency.
1592
+ #
1593
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
1594
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1595
+
1596
+ # @!attribute dimensional_price_configuration
1597
+ # For dimensional price: specifies a price group and dimension values
1598
+ #
1599
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
1600
+ optional :dimensional_price_configuration,
1601
+ -> {
1602
+ Orb::NewDimensionalPriceConfiguration
1603
+ },
1604
+ nil?: true
1605
+
1606
+ # @!attribute external_price_id
1607
+ # An alias for the price.
1608
+ #
1609
+ # @return [String, nil]
1610
+ optional :external_price_id, String, nil?: true
1611
+
1612
+ # @!attribute fixed_price_quantity
1613
+ # If the Price represents a fixed cost, this represents the quantity of units
1614
+ # applied.
1615
+ #
1616
+ # @return [Float, nil]
1617
+ optional :fixed_price_quantity, Float, nil?: true
1618
+
1619
+ # @!attribute invoice_grouping_key
1620
+ # The property used to group this price on an invoice
1621
+ #
1622
+ # @return [String, nil]
1623
+ optional :invoice_grouping_key, String, nil?: true
1624
+
1625
+ # @!attribute invoicing_cycle_configuration
1626
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
1627
+ # If unspecified, a single invoice is produced per billing cycle.
1628
+ #
1629
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
1630
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1631
+
1632
+ # @!attribute license_type_id
1633
+ # The ID of the license type to associate with this price.
1634
+ #
1635
+ # @return [String, nil]
1636
+ optional :license_type_id, String, nil?: true
1637
+
1638
+ # @!attribute metadata
1639
+ # User-specified key/value pairs for the resource. Individual keys can be removed
1640
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
1641
+ # by setting `metadata` to `null`.
1642
+ #
1643
+ # @return [Hash{Symbol=>String, nil}, nil]
1644
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
1645
+
1646
+ # @!method initialize(cadence:, currency:, item_id:, metered_allowance_config:, name:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, conversion_rate_config: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, license_type_id: nil, metadata: nil, model_type: :metered_allowance)
1647
+ # Some parameter documentations has been truncated, see
1648
+ # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance}
1649
+ # for more details.
1650
+ #
1651
+ # @param cadence [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::Cadence] The cadence to bill for this price on.
1652
+ #
1653
+ # @param currency [String] An ISO 4217 currency string for which this price is billed in.
1654
+ #
1655
+ # @param item_id [String] The id of the item the price will be associated with.
1656
+ #
1657
+ # @param metered_allowance_config [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig] Configuration for metered_allowance pricing
1658
+ #
1659
+ # @param name [String] The name of the price.
1660
+ #
1661
+ # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
1662
+ #
1663
+ # @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
1664
+ #
1665
+ # @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
1666
+ #
1667
+ # @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
1668
+ #
1669
+ # @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
1670
+ #
1671
+ # @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
1672
+ #
1673
+ # @param external_price_id [String, nil] An alias for the price.
1674
+ #
1675
+ # @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
1676
+ #
1677
+ # @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
1678
+ #
1679
+ # @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
1680
+ #
1681
+ # @param license_type_id [String, nil] The ID of the license type to associate with this price.
1682
+ #
1683
+ # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
1684
+ #
1685
+ # @param model_type [Symbol, :metered_allowance] The pricing model type
1686
+
1687
+ # The cadence to bill for this price on.
1688
+ #
1689
+ # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance#cadence
1690
+ module Cadence
1691
+ extend Orb::Internal::Type::Enum
1692
+
1693
+ ANNUAL = :annual
1694
+ SEMI_ANNUAL = :semi_annual
1695
+ MONTHLY = :monthly
1696
+ QUARTERLY = :quarterly
1697
+ ONE_TIME = :one_time
1698
+ CUSTOM = :custom
1699
+
1700
+ # @!method self.values
1701
+ # @return [Array<Symbol>]
1702
+ end
1703
+
1704
+ # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance#metered_allowance_config
1705
+ class MeteredAllowanceConfig < Orb::Internal::Type::BaseModel
1706
+ # @!attribute allowance_grouping_value
1707
+ # The grouping_key value whose summed quantity represents the allowance for this
1708
+ # period (e.g. 'storage_snapshot' emitting 3 × avg storage). Capped at consumption
1709
+ # — credit can never exceed actual usage.
1710
+ #
1711
+ # @return [String]
1712
+ required :allowance_grouping_value, String
1713
+
1714
+ # @!attribute consumption_grouping_value
1715
+ # The grouping_key value whose summed quantity represents consumption (e.g.
1716
+ # 'download'). Charged at unit_amount.
1717
+ #
1718
+ # @return [String]
1719
+ required :consumption_grouping_value, String
1720
+
1721
+ # @!attribute grouping_key
1722
+ # Event property used to partition the metric into consumption and allowance
1723
+ # quantities (e.g. 'event_name'). The metric is queried with this key and the two
1724
+ # values below select which partition is which.
1725
+ #
1726
+ # @return [String]
1727
+ required :grouping_key, String
1728
+
1729
+ # @!attribute unit_amount
1730
+ # Per-unit price applied to gross consumption and to the allowance credit.
1731
+ #
1732
+ # @return [String]
1733
+ required :unit_amount, String
1734
+
1735
+ # @!attribute allowance_display_name
1736
+ # Sub-line label for the credit row (e.g. 'Up to 3x free egress').
1737
+ #
1738
+ # @return [String, nil]
1739
+ optional :allowance_display_name, String
1740
+
1741
+ # @!attribute consumption_display_name
1742
+ # Sub-line label for the gross consumption row (e.g. 'bytes gotten').
1743
+ #
1744
+ # @return [String, nil]
1745
+ optional :consumption_display_name, String
1746
+
1747
+ # @!method initialize(allowance_grouping_value:, consumption_grouping_value:, grouping_key:, unit_amount:, allowance_display_name: nil, consumption_display_name: nil)
1748
+ # Some parameter documentations has been truncated, see
1749
+ # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance::MeteredAllowanceConfig}
1750
+ # for more details.
1751
+ #
1752
+ # Configuration for metered_allowance pricing
1753
+ #
1754
+ # @param allowance_grouping_value [String] The grouping_key value whose summed quantity represents the allowance for this p
1755
+ #
1756
+ # @param consumption_grouping_value [String] The grouping_key value whose summed quantity represents consumption (e.g. 'downl
1757
+ #
1758
+ # @param grouping_key [String] Event property used to partition the metric into consumption and allowance quant
1759
+ #
1760
+ # @param unit_amount [String] Per-unit price applied to gross consumption and to the allowance credit.
1761
+ #
1762
+ # @param allowance_display_name [String] Sub-line label for the credit row (e.g. 'Up to 3x free egress').
1763
+ #
1764
+ # @param consumption_display_name [String] Sub-line label for the gross consumption row (e.g. 'bytes gotten').
1765
+ end
1766
+ end
1767
+
1768
+ class Percent < Orb::Internal::Type::BaseModel
1769
+ # @!attribute cadence
1770
+ # The cadence to bill for this price on.
1771
+ #
1772
+ # @return [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent::Cadence]
1773
+ required :cadence,
1774
+ enum: -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent::Cadence }
1775
+
1776
+ # @!attribute currency
1777
+ # An ISO 4217 currency string for which this price is billed in.
1778
+ #
1779
+ # @return [String]
1780
+ required :currency, String
1781
+
1782
+ # @!attribute item_id
1783
+ # The id of the item the price will be associated with.
1784
+ #
1785
+ # @return [String]
1786
+ required :item_id, String
1787
+
1788
+ # @!attribute model_type
1789
+ # The pricing model type
1790
+ #
1791
+ # @return [Symbol, :percent]
1792
+ required :model_type, const: :percent
1793
+
1794
+ # @!attribute name
1795
+ # The name of the price.
1796
+ #
1797
+ # @return [String]
1798
+ required :name, String
1799
+
1800
+ # @!attribute percent_config
1801
+ # Configuration for percent pricing
1802
+ #
1803
+ # @return [Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent::PercentConfig]
1804
+ required :percent_config,
1805
+ -> { Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent::PercentConfig }
1806
+
1807
+ # @!attribute billable_metric_id
1808
+ # The id of the billable metric for the price. Only needed if the price is
1809
+ # usage-based.
1810
+ #
1811
+ # @return [String, nil]
1812
+ optional :billable_metric_id, String, nil?: true
1813
+
1814
+ # @!attribute billed_in_advance
1815
+ # If the Price represents a fixed cost, the price will be billed in-advance if
1816
+ # this is true, and in-arrears if this is false.
1817
+ #
1818
+ # @return [Boolean, nil]
1819
+ optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true
1820
+
1821
+ # @!attribute billing_cycle_configuration
1822
+ # For custom cadence: specifies the duration of the billing period in days or
1823
+ # months.
1824
+ #
1825
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
1826
+ optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1827
+
1828
+ # @!attribute conversion_rate
1829
+ # The per unit conversion rate of the price currency to the invoicing currency.
1830
+ #
1831
+ # @return [Float, nil]
1832
+ optional :conversion_rate, Float, nil?: true
1833
+
1834
+ # @!attribute conversion_rate_config
1835
+ # The configuration for the rate of the price currency to the invoicing currency.
1836
+ #
1837
+ # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
1838
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1839
+
1840
+ # @!attribute dimensional_price_configuration
1841
+ # For dimensional price: specifies a price group and dimension values
1842
+ #
1843
+ # @return [Orb::Models::NewDimensionalPriceConfiguration, nil]
1844
+ optional :dimensional_price_configuration,
1845
+ -> {
1846
+ Orb::NewDimensionalPriceConfiguration
1847
+ },
1848
+ nil?: true
1849
+
1850
+ # @!attribute external_price_id
1851
+ # An alias for the price.
1852
+ #
1853
+ # @return [String, nil]
1854
+ optional :external_price_id, String, nil?: true
1855
+
1856
+ # @!attribute fixed_price_quantity
1857
+ # If the Price represents a fixed cost, this represents the quantity of units
1858
+ # applied.
1859
+ #
1860
+ # @return [Float, nil]
1861
+ optional :fixed_price_quantity, Float, nil?: true
1862
+
1863
+ # @!attribute invoice_grouping_key
1864
+ # The property used to group this price on an invoice
1865
+ #
1866
+ # @return [String, nil]
1867
+ optional :invoice_grouping_key, String, nil?: true
1868
+
1869
+ # @!attribute invoicing_cycle_configuration
1870
+ # Within each billing cycle, specifies the cadence at which invoices are produced.
1871
+ # If unspecified, a single invoice is produced per billing cycle.
1872
+ #
1873
+ # @return [Orb::Models::NewBillingCycleConfiguration, nil]
1874
+ optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true
1875
+
1876
+ # @!attribute license_type_id
1877
+ # The ID of the license type to associate with this price.
1878
+ #
1879
+ # @return [String, nil]
1880
+ optional :license_type_id, String, nil?: true
1881
+
1882
+ # @!attribute metadata
1883
+ # User-specified key/value pairs for the resource. Individual keys can be removed
1884
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
1885
+ # by setting `metadata` to `null`.
1886
+ #
1887
+ # @return [Hash{Symbol=>String, nil}, nil]
1888
+ optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
1889
+
1890
+ # @!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)
1891
+ # Some parameter documentations has been truncated, see
1892
+ # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent}
1893
+ # for more details.
1894
+ #
1895
+ # @param cadence [Symbol, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent::Cadence] The cadence to bill for this price on.
1087
1896
  #
1088
1897
  # @param currency [String] An ISO 4217 currency string for which this price is billed in.
1089
1898
  #
@@ -1139,15 +1948,45 @@ module Orb
1139
1948
  # @see Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent#percent_config
1140
1949
  class PercentConfig < Orb::Internal::Type::BaseModel
1141
1950
  # @!attribute percent
1142
- # What percent of the component subtotals to charge
1951
+ # Fraction of the component subtotals to charge (0 < percent <= 1).
1143
1952
  #
1144
1953
  # @return [Float]
1145
1954
  required :percent, Float
1146
1955
 
1147
- # @!method initialize(percent:)
1956
+ # @!attribute maximum_amount
1957
+ # Maximum amount to charge. If unset, the fee has no upper bound.
1958
+ #
1959
+ # @return [String, nil]
1960
+ optional :maximum_amount, String, nil?: true
1961
+
1962
+ # @!attribute minimum_amount
1963
+ # Minimum amount to charge. If unset, the fee is bounded below by 0.
1964
+ #
1965
+ # @return [String, nil]
1966
+ optional :minimum_amount, String, nil?: true
1967
+
1968
+ # @!attribute prorated
1969
+ # If true, the minimum_amount is prorated based on the service period. The
1970
+ # maximum_amount is an absolute cap (never prorated), and the percent applied to
1971
+ # upstream subtotals is never prorated either.
1972
+ #
1973
+ # @return [Boolean, nil]
1974
+ optional :prorated, Orb::Internal::Type::Boolean
1975
+
1976
+ # @!method initialize(percent:, maximum_amount: nil, minimum_amount: nil, prorated: nil)
1977
+ # Some parameter documentations has been truncated, see
1978
+ # {Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent::PercentConfig}
1979
+ # for more details.
1980
+ #
1148
1981
  # Configuration for percent pricing
1149
1982
  #
1150
- # @param percent [Float] What percent of the component subtotals to charge
1983
+ # @param percent [Float] Fraction of the component subtotals to charge (0 < percent <= 1).
1984
+ #
1985
+ # @param maximum_amount [String, nil] Maximum amount to charge. If unset, the fee has no upper bound.
1986
+ #
1987
+ # @param minimum_amount [String, nil] Minimum amount to charge. If unset, the fee is bounded below by 0.
1988
+ #
1989
+ # @param prorated [Boolean] If true, the minimum_amount is prorated based on the service period. The maximum
1151
1990
  end
1152
1991
  end
1153
1992
 
@@ -1221,11 +2060,7 @@ module Orb
1221
2060
  # The configuration for the rate of the price currency to the invoicing currency.
1222
2061
  #
1223
2062
  # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil]
1224
- optional :conversion_rate_config,
1225
- union: -> {
1226
- Orb::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput::ConversionRateConfig
1227
- },
1228
- nil?: true
2063
+ optional :conversion_rate_config, union: -> { Orb::ConversionRateConfig }, nil?: true
1229
2064
 
1230
2065
  # @!attribute dimensional_price_configuration
1231
2066
  # For dimensional price: specifies a price group and dimension values
@@ -1374,7 +2209,7 @@ module Orb
1374
2209
  end
1375
2210
 
1376
2211
  # @!method self.variants
1377
- # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::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::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput)]
2212
+ # @return [Array(Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::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::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MatrixWithThresholdDiscounts, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::CumulativeGroupedAllocation, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::DailyCreditAllowance, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::MeteredAllowance, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::Percent, Orb::Models::PriceEvaluatePreviewEventsParams::PriceEvaluation::Price::EventOutput)]
1378
2213
  end
1379
2214
  end
1380
2215
  end