orb-billing 0.11.0 → 1.0.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 (746) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -0
  3. data/README.md +1 -1
  4. data/lib/orb/internal/type/base_model.rb +5 -5
  5. data/lib/orb/internal/type/union.rb +3 -8
  6. data/lib/orb/internal/util.rb +8 -9
  7. data/lib/orb/models/accounting_provider_config.rb +21 -0
  8. data/lib/orb/models/address.rb +45 -0
  9. data/lib/orb/models/address_input.rb +45 -0
  10. data/lib/orb/models/adjustment_interval.rb +66 -0
  11. data/lib/orb/models/aggregated_cost.rb +45 -0
  12. data/lib/orb/models/alert.rb +9 -60
  13. data/lib/orb/models/alert_create_for_customer_params.rb +3 -24
  14. data/lib/orb/models/alert_create_for_external_customer_params.rb +3 -24
  15. data/lib/orb/models/alert_create_for_subscription_params.rb +3 -23
  16. data/lib/orb/models/alert_update_params.rb +3 -22
  17. data/lib/orb/models/allocation.rb +27 -0
  18. data/lib/orb/models/amount_discount.rb +9 -1
  19. data/lib/orb/models/amount_discount_interval.rb +65 -0
  20. data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +186 -17772
  21. data/lib/orb/models/beta_create_plan_version_params.rb +183 -17605
  22. data/lib/orb/models/billable_metric_tiny.rb +15 -0
  23. data/lib/orb/models/billing_cycle_anchor_configuration.rb +41 -0
  24. data/lib/orb/models/billing_cycle_configuration.rb +32 -0
  25. data/lib/orb/models/bps_config.rb +24 -0
  26. data/lib/orb/models/bps_tier.rb +40 -0
  27. data/lib/orb/models/bulk_bps_config.rb +20 -0
  28. data/lib/orb/models/bulk_bps_tier.rb +32 -0
  29. data/lib/orb/models/bulk_config.rb +16 -0
  30. data/lib/orb/models/bulk_tier.rb +24 -0
  31. data/lib/orb/models/changed_subscription_resources.rb +40 -0
  32. data/lib/orb/models/conversion_rate_tier.rb +32 -0
  33. data/lib/orb/models/conversion_rate_tiered_config.rb +16 -0
  34. data/lib/orb/models/conversion_rate_unit_config.rb +16 -0
  35. data/lib/orb/models/coupon_redemption.rb +27 -0
  36. data/lib/orb/models/credit_note.rb +6 -51
  37. data/lib/orb/models/credit_note_tiny.rb +16 -0
  38. data/lib/orb/models/custom_expiration.rb +32 -0
  39. data/lib/orb/models/customer.rb +15 -426
  40. data/lib/orb/models/customer_create_params.rb +24 -527
  41. data/lib/orb/models/customer_hierarchy_config.rb +29 -0
  42. data/lib/orb/models/customer_minified.rb +21 -0
  43. data/lib/orb/models/customer_tax_id.rb +300 -0
  44. data/lib/orb/models/customer_update_by_external_id_params.rb +24 -529
  45. data/lib/orb/models/customer_update_params.rb +24 -527
  46. data/lib/orb/models/customers/balance_transaction_create_response.rb +6 -32
  47. data/lib/orb/models/customers/balance_transaction_list_response.rb +6 -32
  48. data/lib/orb/models/customers/cost_list_by_external_id_response.rb +3 -88
  49. data/lib/orb/models/customers/cost_list_response.rb +3 -87
  50. data/lib/orb/models/customers/credits/affected_block.rb +31 -0
  51. data/lib/orb/models/customers/credits/amendment_ledger_entry.rb +131 -0
  52. data/lib/orb/models/customers/credits/credit_block_expiry_ledger_entry.rb +137 -0
  53. data/lib/orb/models/customers/credits/decrement_ledger_entry.rb +152 -0
  54. data/lib/orb/models/customers/credits/expiration_change_ledger_entry.rb +141 -0
  55. data/lib/orb/models/customers/credits/increment_ledger_entry.rb +139 -0
  56. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +8 -1177
  57. data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +8 -1169
  58. data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +8 -1173
  59. data/lib/orb/models/customers/credits/ledger_list_response.rb +8 -1161
  60. data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +3 -52
  61. data/lib/orb/models/customers/credits/top_up_create_response.rb +3 -51
  62. data/lib/orb/models/customers/credits/top_up_invoice_settings.rb +53 -0
  63. data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +3 -52
  64. data/lib/orb/models/customers/credits/top_up_list_response.rb +3 -51
  65. data/lib/orb/models/customers/credits/void_initiated_ledger_entry.rb +152 -0
  66. data/lib/orb/models/customers/credits/void_ledger_entry.rb +145 -0
  67. data/lib/orb/models/dimensional_price_configuration.rb +21 -0
  68. data/lib/orb/models/discount_override.rb +56 -0
  69. data/lib/orb/models/fixed_fee_quantity_schedule_entry.rb +33 -0
  70. data/lib/orb/models/fixed_fee_quantity_transition.rb +27 -0
  71. data/lib/orb/models/invoice.rb +56 -1777
  72. data/lib/orb/models/invoice_create_params.rb +3 -15
  73. data/lib/orb/models/invoice_fetch_upcoming_response.rb +56 -1794
  74. data/lib/orb/models/invoice_line_item_create_response.rb +25 -1142
  75. data/lib/orb/models/invoice_tiny.rb +16 -0
  76. data/lib/orb/models/item_slim.rb +21 -0
  77. data/lib/orb/models/matrix_config.rb +32 -0
  78. data/lib/orb/models/matrix_sub_line_item.rb +61 -0
  79. data/lib/orb/models/matrix_value.rb +29 -0
  80. data/lib/orb/models/matrix_with_allocation_config.rb +40 -0
  81. data/lib/orb/models/maximum.rb +38 -0
  82. data/lib/orb/models/maximum_interval.rb +52 -0
  83. data/lib/orb/models/minimum.rb +38 -0
  84. data/lib/orb/models/minimum_interval.rb +52 -0
  85. data/lib/orb/models/monetary_amount_discount_adjustment.rb +87 -0
  86. data/lib/orb/models/monetary_maximum_adjustment.rb +87 -0
  87. data/lib/orb/models/monetary_minimum_adjustment.rb +95 -0
  88. data/lib/orb/models/monetary_percentage_discount_adjustment.rb +87 -0
  89. data/lib/orb/models/monetary_usage_discount_adjustment.rb +87 -0
  90. data/lib/orb/models/mutated_subscription.rb +302 -0
  91. data/lib/orb/models/new_accounting_sync_configuration.rb +23 -0
  92. data/lib/orb/models/new_allocation_price.rb +70 -0
  93. data/lib/orb/models/new_amount_discount.rb +120 -0
  94. data/lib/orb/models/new_avalara_tax_configuration.rb +37 -0
  95. data/lib/orb/models/new_billing_cycle_configuration.rb +37 -0
  96. data/lib/orb/models/new_dimensional_price_configuration.rb +36 -0
  97. data/lib/orb/models/new_floating_bps_price.rb +199 -0
  98. data/lib/orb/models/new_floating_bulk_bps_price.rb +197 -0
  99. data/lib/orb/models/new_floating_bulk_price.rb +197 -0
  100. data/lib/orb/models/new_floating_bulk_with_proration_price.rb +197 -0
  101. data/lib/orb/models/new_floating_cumulative_grouped_bulk_price.rb +197 -0
  102. data/lib/orb/models/new_floating_grouped_allocation_price.rb +197 -0
  103. data/lib/orb/models/new_floating_grouped_tiered_package_price.rb +197 -0
  104. data/lib/orb/models/new_floating_grouped_tiered_price.rb +197 -0
  105. data/lib/orb/models/new_floating_grouped_with_metered_minimum_price.rb +197 -0
  106. data/lib/orb/models/new_floating_grouped_with_prorated_minimum_price.rb +198 -0
  107. data/lib/orb/models/new_floating_matrix_price.rb +197 -0
  108. data/lib/orb/models/new_floating_matrix_with_allocation_price.rb +197 -0
  109. data/lib/orb/models/new_floating_matrix_with_display_name_price.rb +197 -0
  110. data/lib/orb/models/new_floating_max_group_tiered_package_price.rb +197 -0
  111. data/lib/orb/models/new_floating_package_price.rb +197 -0
  112. data/lib/orb/models/new_floating_package_with_allocation_price.rb +197 -0
  113. data/lib/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rb +198 -0
  114. data/lib/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rb +198 -0
  115. data/lib/orb/models/new_floating_threshold_total_amount_price.rb +197 -0
  116. data/lib/orb/models/new_floating_tiered_bps_price.rb +197 -0
  117. data/lib/orb/models/new_floating_tiered_package_price.rb +197 -0
  118. data/lib/orb/models/new_floating_tiered_package_with_minimum_price.rb +197 -0
  119. data/lib/orb/models/new_floating_tiered_price.rb +197 -0
  120. data/lib/orb/models/new_floating_tiered_with_minimum_price.rb +197 -0
  121. data/lib/orb/models/new_floating_tiered_with_proration_price.rb +197 -0
  122. data/lib/orb/models/new_floating_unit_price.rb +197 -0
  123. data/lib/orb/models/new_floating_unit_with_percent_price.rb +197 -0
  124. data/lib/orb/models/new_floating_unit_with_proration_price.rb +197 -0
  125. data/lib/orb/models/new_maximum.rb +120 -0
  126. data/lib/orb/models/new_minimum.rb +128 -0
  127. data/lib/orb/models/new_percentage_discount.rb +120 -0
  128. data/lib/orb/models/new_plan_bps_price.rb +196 -0
  129. data/lib/orb/models/new_plan_bulk_bps_price.rb +200 -0
  130. data/lib/orb/models/new_plan_bulk_price.rb +196 -0
  131. data/lib/orb/models/new_plan_bulk_with_proration_price.rb +198 -0
  132. data/lib/orb/models/new_plan_cumulative_grouped_bulk_price.rb +198 -0
  133. data/lib/orb/models/new_plan_grouped_allocation_price.rb +198 -0
  134. data/lib/orb/models/new_plan_grouped_tiered_package_price.rb +198 -0
  135. data/lib/orb/models/new_plan_grouped_tiered_price.rb +198 -0
  136. data/lib/orb/models/new_plan_grouped_with_metered_minimum_price.rb +198 -0
  137. data/lib/orb/models/new_plan_grouped_with_prorated_minimum_price.rb +199 -0
  138. data/lib/orb/models/new_plan_matrix_price.rb +200 -0
  139. data/lib/orb/models/new_plan_matrix_with_allocation_price.rb +198 -0
  140. data/lib/orb/models/new_plan_matrix_with_display_name_price.rb +198 -0
  141. data/lib/orb/models/new_plan_max_group_tiered_package_price.rb +198 -0
  142. data/lib/orb/models/new_plan_package_price.rb +200 -0
  143. data/lib/orb/models/new_plan_package_with_allocation_price.rb +198 -0
  144. data/lib/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rb +199 -0
  145. data/lib/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rb +199 -0
  146. data/lib/orb/models/new_plan_threshold_total_amount_price.rb +198 -0
  147. data/lib/orb/models/new_plan_tier_with_proration_price.rb +198 -0
  148. data/lib/orb/models/new_plan_tiered_bps_price.rb +198 -0
  149. data/lib/orb/models/new_plan_tiered_package_price.rb +198 -0
  150. data/lib/orb/models/new_plan_tiered_package_with_minimum_price.rb +198 -0
  151. data/lib/orb/models/new_plan_tiered_price.rb +200 -0
  152. data/lib/orb/models/new_plan_tiered_with_minimum_price.rb +198 -0
  153. data/lib/orb/models/new_plan_unit_price.rb +196 -0
  154. data/lib/orb/models/new_plan_unit_with_percent_price.rb +198 -0
  155. data/lib/orb/models/new_plan_unit_with_proration_price.rb +198 -0
  156. data/lib/orb/models/new_reporting_configuration.rb +15 -0
  157. data/lib/orb/models/new_sphere_configuration.rb +31 -0
  158. data/lib/orb/models/new_subscription_bps_price.rb +207 -0
  159. data/lib/orb/models/new_subscription_bulk_bps_price.rb +207 -0
  160. data/lib/orb/models/new_subscription_bulk_price.rb +207 -0
  161. data/lib/orb/models/new_subscription_bulk_with_proration_price.rb +207 -0
  162. data/lib/orb/models/new_subscription_cumulative_grouped_bulk_price.rb +207 -0
  163. data/lib/orb/models/new_subscription_grouped_allocation_price.rb +207 -0
  164. data/lib/orb/models/new_subscription_grouped_tiered_package_price.rb +207 -0
  165. data/lib/orb/models/new_subscription_grouped_tiered_price.rb +207 -0
  166. data/lib/orb/models/new_subscription_grouped_with_metered_minimum_price.rb +207 -0
  167. data/lib/orb/models/new_subscription_grouped_with_prorated_minimum_price.rb +208 -0
  168. data/lib/orb/models/new_subscription_matrix_price.rb +207 -0
  169. data/lib/orb/models/new_subscription_matrix_with_allocation_price.rb +207 -0
  170. data/lib/orb/models/new_subscription_matrix_with_display_name_price.rb +207 -0
  171. data/lib/orb/models/new_subscription_max_group_tiered_package_price.rb +207 -0
  172. data/lib/orb/models/new_subscription_package_price.rb +207 -0
  173. data/lib/orb/models/new_subscription_package_with_allocation_price.rb +207 -0
  174. data/lib/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rb +209 -0
  175. data/lib/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rb +209 -0
  176. data/lib/orb/models/new_subscription_threshold_total_amount_price.rb +207 -0
  177. data/lib/orb/models/new_subscription_tier_with_proration_price.rb +207 -0
  178. data/lib/orb/models/new_subscription_tiered_bps_price.rb +207 -0
  179. data/lib/orb/models/new_subscription_tiered_package_price.rb +207 -0
  180. data/lib/orb/models/new_subscription_tiered_package_with_minimum_price.rb +207 -0
  181. data/lib/orb/models/new_subscription_tiered_price.rb +207 -0
  182. data/lib/orb/models/new_subscription_tiered_with_minimum_price.rb +207 -0
  183. data/lib/orb/models/new_subscription_unit_price.rb +207 -0
  184. data/lib/orb/models/new_subscription_unit_with_percent_price.rb +207 -0
  185. data/lib/orb/models/new_subscription_unit_with_proration_price.rb +207 -0
  186. data/lib/orb/models/new_tax_jar_configuration.rb +31 -0
  187. data/lib/orb/models/new_usage_discount.rb +120 -0
  188. data/lib/orb/models/other_sub_line_item.rb +54 -0
  189. data/lib/orb/models/package_config.rb +28 -0
  190. data/lib/orb/models/per_price_cost.rb +48 -0
  191. data/lib/orb/models/percentage_discount.rb +9 -1
  192. data/lib/orb/models/percentage_discount_interval.rb +69 -0
  193. data/lib/orb/models/plan.rb +22 -1040
  194. data/lib/orb/models/plan_create_params.rb +31 -8145
  195. data/lib/orb/models/plan_phase_amount_discount_adjustment.rb +87 -0
  196. data/lib/orb/models/plan_phase_maximum_adjustment.rb +87 -0
  197. data/lib/orb/models/plan_phase_minimum_adjustment.rb +95 -0
  198. data/lib/orb/models/plan_phase_percentage_discount_adjustment.rb +87 -0
  199. data/lib/orb/models/plan_phase_usage_discount_adjustment.rb +87 -0
  200. data/lib/orb/models/plan_version.rb +10 -672
  201. data/lib/orb/models/price.rb +1225 -10817
  202. data/lib/orb/models/price_create_params.rb +53 -472
  203. data/lib/orb/models/price_evaluate_multiple_params.rb +32 -8479
  204. data/lib/orb/models/price_evaluate_preview_events_params.rb +236 -0
  205. data/lib/orb/models/price_evaluate_preview_events_response.rb +51 -0
  206. data/lib/orb/models/price_interval.rb +113 -0
  207. data/lib/orb/models/sub_line_item_grouping.rb +23 -0
  208. data/lib/orb/models/sub_line_item_matrix_config.rb +16 -0
  209. data/lib/orb/models/subscription.rb +33 -1581
  210. data/lib/orb/models/subscription_change_apply_response.rb +3 -1904
  211. data/lib/orb/models/subscription_change_cancel_response.rb +3 -1905
  212. data/lib/orb/models/subscription_change_minified.rb +15 -0
  213. data/lib/orb/models/subscription_change_retrieve_response.rb +3 -1906
  214. data/lib/orb/models/subscription_create_params.rb +232 -18278
  215. data/lib/orb/models/subscription_fetch_costs_response.rb +3 -87
  216. data/lib/orb/models/subscription_minified.rb +15 -0
  217. data/lib/orb/models/subscription_price_intervals_params.rb +86 -8758
  218. data/lib/orb/models/subscription_redeem_coupon_params.rb +17 -9
  219. data/lib/orb/models/subscription_schedule_plan_change_params.rb +238 -18372
  220. data/lib/orb/models/subscription_trial_info.rb +15 -0
  221. data/lib/orb/models/tax_amount.rb +32 -0
  222. data/lib/orb/models/threshold.rb +24 -0
  223. data/lib/orb/models/tier.rb +32 -0
  224. data/lib/orb/models/tier_config.rb +27 -0
  225. data/lib/orb/models/tier_sub_line_item.rb +61 -0
  226. data/lib/orb/models/tiered_bps_config.rb +20 -0
  227. data/lib/orb/models/tiered_config.rb +16 -0
  228. data/lib/orb/models/tiered_conversion_rate_config.rb +31 -0
  229. data/lib/orb/models/transform_price_filter.rb +61 -0
  230. data/lib/orb/models/trial_discount.rb +9 -1
  231. data/lib/orb/models/unit_config.rb +16 -0
  232. data/lib/orb/models/unit_conversion_rate_config.rb +31 -0
  233. data/lib/orb/models/usage_discount.rb +9 -1
  234. data/lib/orb/models/usage_discount_interval.rb +69 -0
  235. data/lib/orb/models.rb +348 -0
  236. data/lib/orb/resources/alerts.rb +4 -4
  237. data/lib/orb/resources/customers/credits/ledger.rb +4 -4
  238. data/lib/orb/resources/customers.rb +21 -21
  239. data/lib/orb/resources/plans.rb +1 -1
  240. data/lib/orb/resources/prices/external_price_id.rb +2 -2
  241. data/lib/orb/resources/prices.rb +82 -34
  242. data/lib/orb/resources/subscriptions.rb +29 -27
  243. data/lib/orb/version.rb +1 -1
  244. data/lib/orb.rb +181 -11
  245. data/rbi/orb/internal/util.rbi +2 -0
  246. data/rbi/orb/models/accounting_provider_config.rbi +34 -0
  247. data/rbi/orb/models/address.rbi +55 -0
  248. data/rbi/orb/models/address_input.rbi +62 -0
  249. data/rbi/orb/models/adjustment_interval.rbi +93 -0
  250. data/rbi/orb/models/aggregated_cost.rbi +61 -0
  251. data/rbi/orb/models/alert.rbi +11 -84
  252. data/rbi/orb/models/alert_create_for_customer_params.rbi +3 -42
  253. data/rbi/orb/models/alert_create_for_external_customer_params.rbi +3 -48
  254. data/rbi/orb/models/alert_create_for_subscription_params.rbi +3 -38
  255. data/rbi/orb/models/alert_update_params.rbi +3 -31
  256. data/rbi/orb/models/allocation.rbi +45 -0
  257. data/rbi/orb/models/amount_discount.rbi +8 -0
  258. data/rbi/orb/models/amount_discount_interval.rbi +100 -0
  259. data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +482 -32442
  260. data/rbi/orb/models/beta_create_plan_version_params.rbi +484 -32436
  261. data/rbi/orb/models/billable_metric_tiny.rbi +21 -0
  262. data/rbi/orb/models/billing_cycle_anchor_configuration.rbi +61 -0
  263. data/rbi/orb/models/billing_cycle_configuration.rbi +70 -0
  264. data/rbi/orb/models/bps_config.rbi +36 -0
  265. data/rbi/orb/models/bps_tier.rbi +58 -0
  266. data/rbi/orb/models/bulk_bps_config.rbi +31 -0
  267. data/rbi/orb/models/bulk_bps_tier.rbi +50 -0
  268. data/rbi/orb/models/bulk_config.rbi +26 -0
  269. data/rbi/orb/models/bulk_tier.rbi +38 -0
  270. data/rbi/orb/models/changed_subscription_resources.rbi +61 -0
  271. data/rbi/orb/models/conversion_rate_tier.rbi +51 -0
  272. data/rbi/orb/models/conversion_rate_tiered_config.rbi +31 -0
  273. data/rbi/orb/models/conversion_rate_unit_config.rbi +27 -0
  274. data/rbi/orb/models/coupon_redemption.rbi +37 -0
  275. data/rbi/orb/models/credit_note.rbi +7 -87
  276. data/rbi/orb/models/credit_note_tiny.rbi +25 -0
  277. data/rbi/orb/models/custom_expiration.rbi +55 -0
  278. data/rbi/orb/models/customer.rbi +19 -522
  279. data/rbi/orb/models/customer_create_params.rbi +36 -957
  280. data/rbi/orb/models/customer_hierarchy_config.rbi +52 -0
  281. data/rbi/orb/models/customer_minified.rbi +32 -0
  282. data/rbi/orb/models/customer_tax_id.rbi +324 -0
  283. data/rbi/orb/models/customer_update_by_external_id_params.rbi +36 -1436
  284. data/rbi/orb/models/customer_update_params.rbi +36 -957
  285. data/rbi/orb/models/customers/balance_transaction_create_response.rbi +8 -96
  286. data/rbi/orb/models/customers/balance_transaction_list_response.rbi +8 -96
  287. data/rbi/orb/models/customers/cost_list_by_external_id_response.rbi +5 -191
  288. data/rbi/orb/models/customers/cost_list_response.rbi +5 -182
  289. data/rbi/orb/models/customers/credits/affected_block.rbi +50 -0
  290. data/rbi/orb/models/customers/credits/amendment_ledger_entry.rbi +207 -0
  291. data/rbi/orb/models/customers/credits/credit_block_expiry_ledger_entry.rbi +209 -0
  292. data/rbi/orb/models/customers/credits/decrement_ledger_entry.rbi +225 -0
  293. data/rbi/orb/models/customers/credits/expiration_change_ledger_entry.rbi +213 -0
  294. data/rbi/orb/models/customers/credits/increment_ledger_entry.rbi +215 -0
  295. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +7 -1854
  296. data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +7 -1854
  297. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +7 -1854
  298. data/rbi/orb/models/customers/credits/ledger_list_response.rbi +7 -1854
  299. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +4 -84
  300. data/rbi/orb/models/customers/credits/top_up_create_response.rbi +4 -84
  301. data/rbi/orb/models/customers/credits/top_up_invoice_settings.rbi +83 -0
  302. data/rbi/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +4 -84
  303. data/rbi/orb/models/customers/credits/top_up_list_response.rbi +4 -84
  304. data/rbi/orb/models/customers/credits/void_initiated_ledger_entry.rbi +225 -0
  305. data/rbi/orb/models/customers/credits/void_ledger_entry.rbi +219 -0
  306. data/rbi/orb/models/dimensional_price_configuration.rbi +38 -0
  307. data/rbi/orb/models/discount_override.rbi +83 -0
  308. data/rbi/orb/models/fixed_fee_quantity_schedule_entry.rbi +48 -0
  309. data/rbi/orb/models/fixed_fee_quantity_transition.rbi +39 -0
  310. data/rbi/orb/models/invoice.rbi +212 -3345
  311. data/rbi/orb/models/invoice_create_params.rbi +4 -33
  312. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +355 -4329
  313. data/rbi/orb/models/invoice_line_item_create_response.rbi +30 -2260
  314. data/rbi/orb/models/invoice_tiny.rbi +24 -0
  315. data/rbi/orb/models/item_slim.rbi +23 -0
  316. data/rbi/orb/models/matrix_config.rbi +50 -0
  317. data/rbi/orb/models/matrix_sub_line_item.rbi +87 -0
  318. data/rbi/orb/models/matrix_value.rbi +43 -0
  319. data/rbi/orb/models/matrix_with_allocation_config.rbi +61 -0
  320. data/rbi/orb/models/maximum.rbi +52 -0
  321. data/rbi/orb/models/maximum_interval.rbi +69 -0
  322. data/rbi/orb/models/minimum.rbi +52 -0
  323. data/rbi/orb/models/minimum_interval.rbi +69 -0
  324. data/rbi/orb/models/monetary_amount_discount_adjustment.rbi +125 -0
  325. data/rbi/orb/models/monetary_maximum_adjustment.rbi +123 -0
  326. data/rbi/orb/models/monetary_minimum_adjustment.rbi +131 -0
  327. data/rbi/orb/models/monetary_percentage_discount_adjustment.rbi +131 -0
  328. data/rbi/orb/models/monetary_usage_discount_adjustment.rbi +125 -0
  329. data/rbi/orb/models/mutated_subscription.rbi +412 -0
  330. data/rbi/orb/models/new_accounting_sync_configuration.rbi +40 -0
  331. data/rbi/orb/models/new_allocation_price.rbi +104 -0
  332. data/rbi/orb/models/new_amount_discount.rbi +179 -0
  333. data/rbi/orb/models/new_avalara_tax_configuration.rbi +68 -0
  334. data/rbi/orb/models/new_billing_cycle_configuration.rbi +79 -0
  335. data/rbi/orb/models/new_dimensional_price_configuration.rbi +55 -0
  336. data/rbi/orb/models/new_floating_bps_price.rbi +294 -0
  337. data/rbi/orb/models/new_floating_bulk_bps_price.rbi +309 -0
  338. data/rbi/orb/models/new_floating_bulk_price.rbi +298 -0
  339. data/rbi/orb/models/new_floating_bulk_with_proration_price.rbi +331 -0
  340. data/rbi/orb/models/new_floating_cumulative_grouped_bulk_price.rbi +338 -0
  341. data/rbi/orb/models/new_floating_grouped_allocation_price.rbi +331 -0
  342. data/rbi/orb/models/new_floating_grouped_tiered_package_price.rbi +337 -0
  343. data/rbi/orb/models/new_floating_grouped_tiered_price.rbi +325 -0
  344. data/rbi/orb/models/new_floating_grouped_with_metered_minimum_price.rbi +348 -0
  345. data/rbi/orb/models/new_floating_grouped_with_prorated_minimum_price.rbi +348 -0
  346. data/rbi/orb/models/new_floating_matrix_price.rbi +304 -0
  347. data/rbi/orb/models/new_floating_matrix_with_allocation_price.rbi +345 -0
  348. data/rbi/orb/models/new_floating_matrix_with_display_name_price.rbi +338 -0
  349. data/rbi/orb/models/new_floating_max_group_tiered_package_price.rbi +338 -0
  350. data/rbi/orb/models/new_floating_package_price.rbi +306 -0
  351. data/rbi/orb/models/new_floating_package_with_allocation_price.rbi +338 -0
  352. data/rbi/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rbi +350 -0
  353. data/rbi/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rbi +349 -0
  354. data/rbi/orb/models/new_floating_threshold_total_amount_price.rbi +337 -0
  355. data/rbi/orb/models/new_floating_tiered_bps_price.rbi +317 -0
  356. data/rbi/orb/models/new_floating_tiered_package_price.rbi +325 -0
  357. data/rbi/orb/models/new_floating_tiered_package_with_minimum_price.rbi +348 -0
  358. data/rbi/orb/models/new_floating_tiered_price.rbi +304 -0
  359. data/rbi/orb/models/new_floating_tiered_with_minimum_price.rbi +331 -0
  360. data/rbi/orb/models/new_floating_tiered_with_proration_price.rbi +337 -0
  361. data/rbi/orb/models/new_floating_unit_price.rbi +298 -0
  362. data/rbi/orb/models/new_floating_unit_with_percent_price.rbi +328 -0
  363. data/rbi/orb/models/new_floating_unit_with_proration_price.rbi +331 -0
  364. data/rbi/orb/models/new_maximum.rbi +160 -0
  365. data/rbi/orb/models/new_minimum.rbi +168 -0
  366. data/rbi/orb/models/new_percentage_discount.rbi +193 -0
  367. data/rbi/orb/models/new_plan_bps_price.rbi +294 -0
  368. data/rbi/orb/models/new_plan_bulk_bps_price.rbi +297 -0
  369. data/rbi/orb/models/new_plan_bulk_price.rbi +295 -0
  370. data/rbi/orb/models/new_plan_bulk_with_proration_price.rbi +327 -0
  371. data/rbi/orb/models/new_plan_cumulative_grouped_bulk_price.rbi +333 -0
  372. data/rbi/orb/models/new_plan_grouped_allocation_price.rbi +327 -0
  373. data/rbi/orb/models/new_plan_grouped_tiered_package_price.rbi +333 -0
  374. data/rbi/orb/models/new_plan_grouped_tiered_price.rbi +316 -0
  375. data/rbi/orb/models/new_plan_grouped_with_metered_minimum_price.rbi +340 -0
  376. data/rbi/orb/models/new_plan_grouped_with_prorated_minimum_price.rbi +345 -0
  377. data/rbi/orb/models/new_plan_matrix_price.rbi +297 -0
  378. data/rbi/orb/models/new_plan_matrix_with_allocation_price.rbi +341 -0
  379. data/rbi/orb/models/new_plan_matrix_with_display_name_price.rbi +333 -0
  380. data/rbi/orb/models/new_plan_max_group_tiered_package_price.rbi +333 -0
  381. data/rbi/orb/models/new_plan_package_price.rbi +297 -0
  382. data/rbi/orb/models/new_plan_package_with_allocation_price.rbi +333 -0
  383. data/rbi/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rbi +352 -0
  384. data/rbi/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rbi +351 -0
  385. data/rbi/orb/models/new_plan_threshold_total_amount_price.rbi +333 -0
  386. data/rbi/orb/models/new_plan_tier_with_proration_price.rbi +327 -0
  387. data/rbi/orb/models/new_plan_tiered_bps_price.rbi +304 -0
  388. data/rbi/orb/models/new_plan_tiered_package_price.rbi +316 -0
  389. data/rbi/orb/models/new_plan_tiered_package_with_minimum_price.rbi +339 -0
  390. data/rbi/orb/models/new_plan_tiered_price.rbi +297 -0
  391. data/rbi/orb/models/new_plan_tiered_with_minimum_price.rbi +327 -0
  392. data/rbi/orb/models/new_plan_unit_price.rbi +295 -0
  393. data/rbi/orb/models/new_plan_unit_with_percent_price.rbi +325 -0
  394. data/rbi/orb/models/new_plan_unit_with_proration_price.rbi +327 -0
  395. data/rbi/orb/models/new_reporting_configuration.rbi +23 -0
  396. data/rbi/orb/models/new_sphere_configuration.rbi +59 -0
  397. data/rbi/orb/models/new_subscription_bps_price.rbi +317 -0
  398. data/rbi/orb/models/new_subscription_bulk_bps_price.rbi +338 -0
  399. data/rbi/orb/models/new_subscription_bulk_price.rbi +321 -0
  400. data/rbi/orb/models/new_subscription_bulk_with_proration_price.rbi +350 -0
  401. data/rbi/orb/models/new_subscription_cumulative_grouped_bulk_price.rbi +360 -0
  402. data/rbi/orb/models/new_subscription_grouped_allocation_price.rbi +350 -0
  403. data/rbi/orb/models/new_subscription_grouped_tiered_package_price.rbi +360 -0
  404. data/rbi/orb/models/new_subscription_grouped_tiered_price.rbi +343 -0
  405. data/rbi/orb/models/new_subscription_grouped_with_metered_minimum_price.rbi +360 -0
  406. data/rbi/orb/models/new_subscription_grouped_with_prorated_minimum_price.rbi +360 -0
  407. data/rbi/orb/models/new_subscription_matrix_price.rbi +332 -0
  408. data/rbi/orb/models/new_subscription_matrix_with_allocation_price.rbi +368 -0
  409. data/rbi/orb/models/new_subscription_matrix_with_display_name_price.rbi +360 -0
  410. data/rbi/orb/models/new_subscription_max_group_tiered_package_price.rbi +360 -0
  411. data/rbi/orb/models/new_subscription_package_price.rbi +338 -0
  412. data/rbi/orb/models/new_subscription_package_with_allocation_price.rbi +360 -0
  413. data/rbi/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rbi +362 -0
  414. data/rbi/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rbi +361 -0
  415. data/rbi/orb/models/new_subscription_threshold_total_amount_price.rbi +360 -0
  416. data/rbi/orb/models/new_subscription_tier_with_proration_price.rbi +350 -0
  417. data/rbi/orb/models/new_subscription_tiered_bps_price.rbi +340 -0
  418. data/rbi/orb/models/new_subscription_tiered_package_price.rbi +343 -0
  419. data/rbi/orb/models/new_subscription_tiered_package_with_minimum_price.rbi +360 -0
  420. data/rbi/orb/models/new_subscription_tiered_price.rbi +332 -0
  421. data/rbi/orb/models/new_subscription_tiered_with_minimum_price.rbi +350 -0
  422. data/rbi/orb/models/new_subscription_unit_price.rbi +321 -0
  423. data/rbi/orb/models/new_subscription_unit_with_percent_price.rbi +349 -0
  424. data/rbi/orb/models/new_subscription_unit_with_proration_price.rbi +350 -0
  425. data/rbi/orb/models/new_tax_jar_configuration.rbi +59 -0
  426. data/rbi/orb/models/new_usage_discount.rbi +177 -0
  427. data/rbi/orb/models/other_sub_line_item.rbi +78 -0
  428. data/rbi/orb/models/package_config.rbi +39 -0
  429. data/rbi/orb/models/per_price_cost.rbi +96 -0
  430. data/rbi/orb/models/percentage_discount.rbi +8 -0
  431. data/rbi/orb/models/percentage_discount_interval.rbi +107 -0
  432. data/rbi/orb/models/plan.rbi +29 -1937
  433. data/rbi/orb/models/plan_create_params.rbi +112 -15428
  434. data/rbi/orb/models/plan_phase_amount_discount_adjustment.rbi +128 -0
  435. data/rbi/orb/models/plan_phase_maximum_adjustment.rbi +123 -0
  436. data/rbi/orb/models/plan_phase_minimum_adjustment.rbi +131 -0
  437. data/rbi/orb/models/plan_phase_percentage_discount_adjustment.rbi +131 -0
  438. data/rbi/orb/models/plan_phase_usage_discount_adjustment.rbi +125 -0
  439. data/rbi/orb/models/plan_version.rbi +13 -1252
  440. data/rbi/orb/models/price.rbi +3518 -26097
  441. data/rbi/orb/models/price_create_params.rbi +81 -937
  442. data/rbi/orb/models/price_evaluate_multiple_params.rbi +112 -15566
  443. data/rbi/orb/models/price_evaluate_preview_events_params.rbi +411 -0
  444. data/rbi/orb/models/price_evaluate_preview_events_response.rbi +101 -0
  445. data/rbi/orb/models/price_interval.rbi +174 -0
  446. data/rbi/orb/models/sub_line_item_grouping.rbi +31 -0
  447. data/rbi/orb/models/sub_line_item_matrix_config.rbi +33 -0
  448. data/rbi/orb/models/subscription.rbi +51 -2939
  449. data/rbi/orb/models/subscription_change_apply_response.rbi +4 -3580
  450. data/rbi/orb/models/subscription_change_cancel_response.rbi +4 -3580
  451. data/rbi/orb/models/subscription_change_minified.rbi +23 -0
  452. data/rbi/orb/models/subscription_change_retrieve_response.rbi +4 -3582
  453. data/rbi/orb/models/subscription_create_params.rbi +541 -33368
  454. data/rbi/orb/models/subscription_fetch_costs_response.rbi +5 -182
  455. data/rbi/orb/models/subscription_minified.rbi +23 -0
  456. data/rbi/orb/models/subscription_price_intervals_params.rbi +224 -16144
  457. data/rbi/orb/models/subscription_redeem_coupon_params.rbi +16 -8
  458. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +549 -33384
  459. data/rbi/orb/models/subscription_trial_info.rbi +23 -0
  460. data/rbi/orb/models/tax_amount.rbi +50 -0
  461. data/rbi/orb/models/threshold.rbi +30 -0
  462. data/rbi/orb/models/tier.rbi +50 -0
  463. data/rbi/orb/models/tier_config.rbi +40 -0
  464. data/rbi/orb/models/tier_sub_line_item.rbi +87 -0
  465. data/rbi/orb/models/tiered_bps_config.rbi +29 -0
  466. data/rbi/orb/models/tiered_config.rbi +26 -0
  467. data/rbi/orb/models/tiered_conversion_rate_config.rbi +73 -0
  468. data/rbi/orb/models/transform_price_filter.rbi +106 -0
  469. data/rbi/orb/models/trial_discount.rbi +8 -0
  470. data/rbi/orb/models/unit_config.rbi +24 -0
  471. data/rbi/orb/models/unit_conversion_rate_config.rbi +71 -0
  472. data/rbi/orb/models/usage_discount.rbi +8 -0
  473. data/rbi/orb/models/usage_discount_interval.rbi +99 -0
  474. data/rbi/orb/models.rbi +398 -0
  475. data/rbi/orb/resources/alerts.rbi +4 -13
  476. data/rbi/orb/resources/customers.rbi +27 -51
  477. data/rbi/orb/resources/plans.rbi +28 -28
  478. data/rbi/orb/resources/prices.rbi +82 -36
  479. data/rbi/orb/resources/subscriptions.rbi +19 -22
  480. data/sig/orb/models/accounting_provider_config.rbs +19 -0
  481. data/sig/orb/models/address.rbs +45 -0
  482. data/sig/orb/models/address_input.rbs +45 -0
  483. data/sig/orb/models/adjustment_interval.rbs +53 -0
  484. data/sig/orb/models/aggregated_cost.rbs +40 -0
  485. data/sig/orb/models/alert.rbs +12 -44
  486. data/sig/orb/models/alert_create_for_customer_params.rbs +4 -14
  487. data/sig/orb/models/alert_create_for_external_customer_params.rbs +4 -14
  488. data/sig/orb/models/alert_create_for_subscription_params.rbs +4 -14
  489. data/sig/orb/models/alert_update_params.rbs +4 -14
  490. data/sig/orb/models/allocation.rbs +30 -0
  491. data/sig/orb/models/amount_discount.rbs +5 -0
  492. data/sig/orb/models/amount_discount_interval.rbs +55 -0
  493. data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +147 -12821
  494. data/sig/orb/models/beta_create_plan_version_params.rbs +144 -12802
  495. data/sig/orb/models/billable_metric_tiny.rbs +13 -0
  496. data/sig/orb/models/billing_cycle_anchor_configuration.rbs +18 -0
  497. data/sig/orb/models/billing_cycle_configuration.rbs +36 -0
  498. data/sig/orb/models/bps_config.rbs +15 -0
  499. data/sig/orb/models/bps_tier.rbs +35 -0
  500. data/sig/orb/models/bulk_bps_config.rbs +13 -0
  501. data/sig/orb/models/bulk_bps_tier.rbs +26 -0
  502. data/sig/orb/models/bulk_config.rbs +13 -0
  503. data/sig/orb/models/bulk_tier.rbs +15 -0
  504. data/sig/orb/models/changed_subscription_resources.rbs +35 -0
  505. data/sig/orb/models/conversion_rate_tier.rbs +26 -0
  506. data/sig/orb/models/conversion_rate_tiered_config.rbs +14 -0
  507. data/sig/orb/models/conversion_rate_unit_config.rbs +13 -0
  508. data/sig/orb/models/coupon_redemption.rbs +22 -0
  509. data/sig/orb/models/credit_note.rbs +8 -47
  510. data/sig/orb/models/credit_note_tiny.rbs +13 -0
  511. data/sig/orb/models/custom_expiration.rbs +36 -0
  512. data/sig/orb/models/customer.rbs +20 -471
  513. data/sig/orb/models/customer_create_params.rbs +27 -577
  514. data/sig/orb/models/customer_hierarchy_config.rbs +24 -0
  515. data/sig/orb/models/customer_minified.rbs +15 -0
  516. data/sig/orb/models/customer_tax_id.rbs +346 -0
  517. data/sig/orb/models/customer_update_by_external_id_params.rbs +27 -577
  518. data/sig/orb/models/customer_update_params.rbs +27 -577
  519. data/sig/orb/models/customers/balance_transaction_create_response.rbs +8 -28
  520. data/sig/orb/models/customers/balance_transaction_list_response.rbs +8 -28
  521. data/sig/orb/models/customers/cost_list_by_external_id_response.rbs +4 -84
  522. data/sig/orb/models/customers/cost_list_response.rbs +4 -83
  523. data/sig/orb/models/customers/credits/affected_block.rbs +30 -0
  524. data/sig/orb/models/customers/credits/amendment_ledger_entry.rbs +105 -0
  525. data/sig/orb/models/customers/credits/credit_block_expiry_ledger_entry.rbs +107 -0
  526. data/sig/orb/models/customers/credits/decrement_ledger_entry.rbs +120 -0
  527. data/sig/orb/models/customers/credits/expiration_change_ledger_entry.rbs +110 -0
  528. data/sig/orb/models/customers/credits/increment_ledger_entry.rbs +110 -0
  529. data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +7 -939
  530. data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +7 -939
  531. data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +7 -939
  532. data/sig/orb/models/customers/credits/ledger_list_response.rbs +7 -939
  533. data/sig/orb/models/customers/credits/top_up_create_by_external_id_response.rbs +4 -38
  534. data/sig/orb/models/customers/credits/top_up_create_response.rbs +4 -38
  535. data/sig/orb/models/customers/credits/top_up_invoice_settings.rbs +41 -0
  536. data/sig/orb/models/customers/credits/top_up_list_by_external_id_response.rbs +4 -38
  537. data/sig/orb/models/customers/credits/top_up_list_response.rbs +4 -38
  538. data/sig/orb/models/customers/credits/void_initiated_ledger_entry.rbs +120 -0
  539. data/sig/orb/models/customers/credits/void_ledger_entry.rbs +115 -0
  540. data/sig/orb/models/dimensional_price_configuration.rbs +22 -0
  541. data/sig/orb/models/discount_override.rbs +47 -0
  542. data/sig/orb/models/fixed_fee_quantity_schedule_entry.rbs +30 -0
  543. data/sig/orb/models/fixed_fee_quantity_transition.rbs +26 -0
  544. data/sig/orb/models/invoice.rbs +54 -1612
  545. data/sig/orb/models/invoice_create_params.rbs +4 -14
  546. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +54 -1612
  547. data/sig/orb/models/invoice_line_item_create_response.rbs +18 -927
  548. data/sig/orb/models/invoice_tiny.rbs +13 -0
  549. data/sig/orb/models/item_slim.rbs +15 -0
  550. data/sig/orb/models/matrix_config.rbs +30 -0
  551. data/sig/orb/models/matrix_sub_line_item.rbs +55 -0
  552. data/sig/orb/models/matrix_value.rbs +22 -0
  553. data/sig/orb/models/matrix_with_allocation_config.rbs +35 -0
  554. data/sig/orb/models/maximum.rbs +30 -0
  555. data/sig/orb/models/maximum_interval.rbs +40 -0
  556. data/sig/orb/models/minimum.rbs +30 -0
  557. data/sig/orb/models/minimum_interval.rbs +40 -0
  558. data/sig/orb/models/monetary_amount_discount_adjustment.rbs +65 -0
  559. data/sig/orb/models/monetary_maximum_adjustment.rbs +65 -0
  560. data/sig/orb/models/monetary_minimum_adjustment.rbs +70 -0
  561. data/sig/orb/models/monetary_percentage_discount_adjustment.rbs +65 -0
  562. data/sig/orb/models/monetary_usage_discount_adjustment.rbs +65 -0
  563. data/sig/orb/models/mutated_subscription.rbs +178 -0
  564. data/sig/orb/models/new_accounting_sync_configuration.rbs +25 -0
  565. data/sig/orb/models/new_allocation_price.rbs +56 -0
  566. data/sig/orb/models/new_amount_discount.rbs +97 -0
  567. data/sig/orb/models/new_avalara_tax_configuration.rbs +40 -0
  568. data/sig/orb/models/new_billing_cycle_configuration.rbs +36 -0
  569. data/sig/orb/models/new_dimensional_price_configuration.rbs +30 -0
  570. data/sig/orb/models/new_floating_bps_price.rbs +135 -0
  571. data/sig/orb/models/new_floating_bulk_bps_price.rbs +135 -0
  572. data/sig/orb/models/new_floating_bulk_price.rbs +135 -0
  573. data/sig/orb/models/new_floating_bulk_with_proration_price.rbs +135 -0
  574. data/sig/orb/models/new_floating_cumulative_grouped_bulk_price.rbs +135 -0
  575. data/sig/orb/models/new_floating_grouped_allocation_price.rbs +135 -0
  576. data/sig/orb/models/new_floating_grouped_tiered_package_price.rbs +135 -0
  577. data/sig/orb/models/new_floating_grouped_tiered_price.rbs +135 -0
  578. data/sig/orb/models/new_floating_grouped_with_metered_minimum_price.rbs +135 -0
  579. data/sig/orb/models/new_floating_grouped_with_prorated_minimum_price.rbs +135 -0
  580. data/sig/orb/models/new_floating_matrix_price.rbs +135 -0
  581. data/sig/orb/models/new_floating_matrix_with_allocation_price.rbs +135 -0
  582. data/sig/orb/models/new_floating_matrix_with_display_name_price.rbs +135 -0
  583. data/sig/orb/models/new_floating_max_group_tiered_package_price.rbs +135 -0
  584. data/sig/orb/models/new_floating_package_price.rbs +135 -0
  585. data/sig/orb/models/new_floating_package_with_allocation_price.rbs +135 -0
  586. data/sig/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rbs +135 -0
  587. data/sig/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rbs +135 -0
  588. data/sig/orb/models/new_floating_threshold_total_amount_price.rbs +135 -0
  589. data/sig/orb/models/new_floating_tiered_bps_price.rbs +135 -0
  590. data/sig/orb/models/new_floating_tiered_package_price.rbs +135 -0
  591. data/sig/orb/models/new_floating_tiered_package_with_minimum_price.rbs +135 -0
  592. data/sig/orb/models/new_floating_tiered_price.rbs +135 -0
  593. data/sig/orb/models/new_floating_tiered_with_minimum_price.rbs +135 -0
  594. data/sig/orb/models/new_floating_tiered_with_proration_price.rbs +135 -0
  595. data/sig/orb/models/new_floating_unit_price.rbs +135 -0
  596. data/sig/orb/models/new_floating_unit_with_percent_price.rbs +135 -0
  597. data/sig/orb/models/new_floating_unit_with_proration_price.rbs +135 -0
  598. data/sig/orb/models/new_maximum.rbs +97 -0
  599. data/sig/orb/models/new_minimum.rbs +102 -0
  600. data/sig/orb/models/new_percentage_discount.rbs +97 -0
  601. data/sig/orb/models/new_plan_bps_price.rbs +135 -0
  602. data/sig/orb/models/new_plan_bulk_bps_price.rbs +135 -0
  603. data/sig/orb/models/new_plan_bulk_price.rbs +135 -0
  604. data/sig/orb/models/new_plan_bulk_with_proration_price.rbs +135 -0
  605. data/sig/orb/models/new_plan_cumulative_grouped_bulk_price.rbs +135 -0
  606. data/sig/orb/models/new_plan_grouped_allocation_price.rbs +135 -0
  607. data/sig/orb/models/new_plan_grouped_tiered_package_price.rbs +135 -0
  608. data/sig/orb/models/new_plan_grouped_tiered_price.rbs +135 -0
  609. data/sig/orb/models/new_plan_grouped_with_metered_minimum_price.rbs +135 -0
  610. data/sig/orb/models/new_plan_grouped_with_prorated_minimum_price.rbs +135 -0
  611. data/sig/orb/models/new_plan_matrix_price.rbs +135 -0
  612. data/sig/orb/models/new_plan_matrix_with_allocation_price.rbs +135 -0
  613. data/sig/orb/models/new_plan_matrix_with_display_name_price.rbs +135 -0
  614. data/sig/orb/models/new_plan_max_group_tiered_package_price.rbs +135 -0
  615. data/sig/orb/models/new_plan_package_price.rbs +135 -0
  616. data/sig/orb/models/new_plan_package_with_allocation_price.rbs +135 -0
  617. data/sig/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rbs +135 -0
  618. data/sig/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rbs +135 -0
  619. data/sig/orb/models/new_plan_threshold_total_amount_price.rbs +135 -0
  620. data/sig/orb/models/new_plan_tier_with_proration_price.rbs +135 -0
  621. data/sig/orb/models/new_plan_tiered_bps_price.rbs +135 -0
  622. data/sig/orb/models/new_plan_tiered_package_price.rbs +135 -0
  623. data/sig/orb/models/new_plan_tiered_package_with_minimum_price.rbs +135 -0
  624. data/sig/orb/models/new_plan_tiered_price.rbs +135 -0
  625. data/sig/orb/models/new_plan_tiered_with_minimum_price.rbs +135 -0
  626. data/sig/orb/models/new_plan_unit_price.rbs +135 -0
  627. data/sig/orb/models/new_plan_unit_with_percent_price.rbs +135 -0
  628. data/sig/orb/models/new_plan_unit_with_proration_price.rbs +135 -0
  629. data/sig/orb/models/new_reporting_configuration.rbs +13 -0
  630. data/sig/orb/models/new_sphere_configuration.rbs +35 -0
  631. data/sig/orb/models/new_subscription_bps_price.rbs +140 -0
  632. data/sig/orb/models/new_subscription_bulk_bps_price.rbs +140 -0
  633. data/sig/orb/models/new_subscription_bulk_price.rbs +140 -0
  634. data/sig/orb/models/new_subscription_bulk_with_proration_price.rbs +140 -0
  635. data/sig/orb/models/new_subscription_cumulative_grouped_bulk_price.rbs +140 -0
  636. data/sig/orb/models/new_subscription_grouped_allocation_price.rbs +140 -0
  637. data/sig/orb/models/new_subscription_grouped_tiered_package_price.rbs +140 -0
  638. data/sig/orb/models/new_subscription_grouped_tiered_price.rbs +140 -0
  639. data/sig/orb/models/new_subscription_grouped_with_metered_minimum_price.rbs +140 -0
  640. data/sig/orb/models/new_subscription_grouped_with_prorated_minimum_price.rbs +140 -0
  641. data/sig/orb/models/new_subscription_matrix_price.rbs +140 -0
  642. data/sig/orb/models/new_subscription_matrix_with_allocation_price.rbs +140 -0
  643. data/sig/orb/models/new_subscription_matrix_with_display_name_price.rbs +140 -0
  644. data/sig/orb/models/new_subscription_max_group_tiered_package_price.rbs +140 -0
  645. data/sig/orb/models/new_subscription_package_price.rbs +140 -0
  646. data/sig/orb/models/new_subscription_package_with_allocation_price.rbs +140 -0
  647. data/sig/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rbs +140 -0
  648. data/sig/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rbs +140 -0
  649. data/sig/orb/models/new_subscription_threshold_total_amount_price.rbs +140 -0
  650. data/sig/orb/models/new_subscription_tier_with_proration_price.rbs +140 -0
  651. data/sig/orb/models/new_subscription_tiered_bps_price.rbs +140 -0
  652. data/sig/orb/models/new_subscription_tiered_package_price.rbs +140 -0
  653. data/sig/orb/models/new_subscription_tiered_package_with_minimum_price.rbs +140 -0
  654. data/sig/orb/models/new_subscription_tiered_price.rbs +140 -0
  655. data/sig/orb/models/new_subscription_tiered_with_minimum_price.rbs +140 -0
  656. data/sig/orb/models/new_subscription_unit_price.rbs +140 -0
  657. data/sig/orb/models/new_subscription_unit_with_percent_price.rbs +140 -0
  658. data/sig/orb/models/new_subscription_unit_with_proration_price.rbs +140 -0
  659. data/sig/orb/models/new_tax_jar_configuration.rbs +35 -0
  660. data/sig/orb/models/new_usage_discount.rbs +97 -0
  661. data/sig/orb/models/other_sub_line_item.rbs +50 -0
  662. data/sig/orb/models/package_config.rbs +15 -0
  663. data/sig/orb/models/per_price_cost.rbs +40 -0
  664. data/sig/orb/models/percentage_discount.rbs +5 -0
  665. data/sig/orb/models/percentage_discount_interval.rbs +55 -0
  666. data/sig/orb/models/plan.rbs +21 -871
  667. data/sig/orb/models/plan_create_params.rbs +28 -5952
  668. data/sig/orb/models/plan_phase_amount_discount_adjustment.rbs +65 -0
  669. data/sig/orb/models/plan_phase_maximum_adjustment.rbs +65 -0
  670. data/sig/orb/models/plan_phase_minimum_adjustment.rbs +70 -0
  671. data/sig/orb/models/plan_phase_percentage_discount_adjustment.rbs +65 -0
  672. data/sig/orb/models/plan_phase_usage_discount_adjustment.rbs +65 -0
  673. data/sig/orb/models/plan_version.rbs +5 -535
  674. data/sig/orb/models/price.rbs +2164 -11297
  675. data/sig/orb/models/price_create_params.rbs +58 -418
  676. data/sig/orb/models/price_evaluate_multiple_params.rbs +28 -6138
  677. data/sig/orb/models/price_evaluate_preview_events_params.rbs +166 -0
  678. data/sig/orb/models/price_evaluate_preview_events_response.rbs +50 -0
  679. data/sig/orb/models/price_interval.rbs +65 -0
  680. data/sig/orb/models/sub_line_item_grouping.rbs +15 -0
  681. data/sig/orb/models/sub_line_item_matrix_config.rbs +13 -0
  682. data/sig/orb/models/subscription.rbs +39 -1274
  683. data/sig/orb/models/subscription_change_apply_response.rbs +4 -1467
  684. data/sig/orb/models/subscription_change_cancel_response.rbs +4 -1467
  685. data/sig/orb/models/subscription_change_minified.rbs +13 -0
  686. data/sig/orb/models/subscription_change_retrieve_response.rbs +4 -1467
  687. data/sig/orb/models/subscription_create_params.rbs +174 -13219
  688. data/sig/orb/models/subscription_fetch_costs_response.rbs +4 -82
  689. data/sig/orb/models/subscription_minified.rbs +13 -0
  690. data/sig/orb/models/subscription_price_intervals_params.rbs +61 -6390
  691. data/sig/orb/models/subscription_redeem_coupon_params.rbs +11 -6
  692. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +175 -13220
  693. data/sig/orb/models/subscription_trial_info.rbs +13 -0
  694. data/sig/orb/models/tax_amount.rbs +30 -0
  695. data/sig/orb/models/threshold.rbs +13 -0
  696. data/sig/orb/models/tier.rbs +25 -0
  697. data/sig/orb/models/tier_config.rbs +26 -0
  698. data/sig/orb/models/tier_sub_line_item.rbs +55 -0
  699. data/sig/orb/models/tiered_bps_config.rbs +13 -0
  700. data/sig/orb/models/tiered_config.rbs +13 -0
  701. data/sig/orb/models/tiered_conversion_rate_config.rbs +35 -0
  702. data/sig/orb/models/transform_price_filter.rbs +56 -0
  703. data/sig/orb/models/trial_discount.rbs +5 -0
  704. data/sig/orb/models/unit_config.rbs +13 -0
  705. data/sig/orb/models/unit_conversion_rate_config.rbs +35 -0
  706. data/sig/orb/models/usage_discount.rbs +5 -0
  707. data/sig/orb/models/usage_discount_interval.rbs +55 -0
  708. data/sig/orb/models.rbs +342 -0
  709. data/sig/orb/resources/alerts.rbs +4 -4
  710. data/sig/orb/resources/customers.rbs +18 -18
  711. data/sig/orb/resources/prices.rbs +23 -13
  712. data/sig/orb/resources/subscriptions.rbs +15 -14
  713. metadata +545 -35
  714. data/lib/orb/models/subscription_cancel_response.rb +0 -1873
  715. data/lib/orb/models/subscription_create_response.rb +0 -1873
  716. data/lib/orb/models/subscription_price_intervals_response.rb +0 -1888
  717. data/lib/orb/models/subscription_redeem_coupon_response.rb +0 -1883
  718. data/lib/orb/models/subscription_schedule_plan_change_response.rb +0 -1893
  719. data/lib/orb/models/subscription_trigger_phase_response.rb +0 -1883
  720. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +0 -1897
  721. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +0 -1912
  722. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +0 -1908
  723. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +0 -1897
  724. data/lib/orb/models/subscription_update_trial_response.rb +0 -1879
  725. data/rbi/orb/models/subscription_cancel_response.rbi +0 -3537
  726. data/rbi/orb/models/subscription_create_response.rbi +0 -3537
  727. data/rbi/orb/models/subscription_price_intervals_response.rbi +0 -3564
  728. data/rbi/orb/models/subscription_redeem_coupon_response.rbi +0 -3557
  729. data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +0 -3564
  730. data/rbi/orb/models/subscription_trigger_phase_response.rbi +0 -3557
  731. data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +0 -3566
  732. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +0 -3566
  733. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +0 -3566
  734. data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +0 -3566
  735. data/rbi/orb/models/subscription_update_trial_response.rbi +0 -3556
  736. data/sig/orb/models/subscription_cancel_response.rbs +0 -1445
  737. data/sig/orb/models/subscription_create_response.rbs +0 -1445
  738. data/sig/orb/models/subscription_price_intervals_response.rbs +0 -1445
  739. data/sig/orb/models/subscription_redeem_coupon_response.rbs +0 -1445
  740. data/sig/orb/models/subscription_schedule_plan_change_response.rbs +0 -1445
  741. data/sig/orb/models/subscription_trigger_phase_response.rbs +0 -1445
  742. data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +0 -1445
  743. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +0 -1445
  744. data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +0 -1445
  745. data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +0 -1445
  746. data/sig/orb/models/subscription_update_trial_response.rbs +0 -1445
@@ -15,7 +15,7 @@ module Orb
15
15
 
16
16
  # The adjustment intervals for this subscription sorted by the start_date of the
17
17
  # adjustment interval.
18
- sig { returns(T::Array[Orb::Subscription::AdjustmentInterval]) }
18
+ sig { returns(T::Array[Orb::AdjustmentInterval]) }
19
19
  attr_accessor :adjustment_intervals
20
20
 
21
21
  # Determines whether issued invoices for this subscription will automatically be
@@ -24,13 +24,13 @@ module Orb
24
24
  sig { returns(T.nilable(T::Boolean)) }
25
25
  attr_accessor :auto_collection
26
26
 
27
- sig { returns(Orb::Subscription::BillingCycleAnchorConfiguration) }
27
+ sig { returns(Orb::BillingCycleAnchorConfiguration) }
28
28
  attr_reader :billing_cycle_anchor_configuration
29
29
 
30
30
  sig do
31
31
  params(
32
32
  billing_cycle_anchor_configuration:
33
- Orb::Subscription::BillingCycleAnchorConfiguration::OrHash
33
+ Orb::BillingCycleAnchorConfiguration::OrHash
34
34
  ).void
35
35
  end
36
36
  attr_writer :billing_cycle_anchor_configuration
@@ -94,14 +94,14 @@ module Orb
94
94
  sig { returns(T.nilable(Time)) }
95
95
  attr_accessor :end_date
96
96
 
97
- sig { returns(T::Array[Orb::Subscription::FixedFeeQuantitySchedule]) }
97
+ sig { returns(T::Array[Orb::FixedFeeQuantityScheduleEntry]) }
98
98
  attr_accessor :fixed_fee_quantity_schedule
99
99
 
100
100
  sig { returns(T.nilable(String)) }
101
101
  attr_accessor :invoicing_threshold
102
102
 
103
103
  # The maximum intervals for this subscription sorted by the start_date.
104
- sig { returns(T::Array[Orb::Subscription::MaximumInterval]) }
104
+ sig { returns(T::Array[Orb::MaximumInterval]) }
105
105
  attr_accessor :maximum_intervals
106
106
 
107
107
  # User specified key-value pairs for the resource. If not present, this defaults
@@ -112,7 +112,7 @@ module Orb
112
112
  attr_accessor :metadata
113
113
 
114
114
  # The minimum intervals for this subscription sorted by the start_date.
115
- sig { returns(T::Array[Orb::Subscription::MinimumInterval]) }
115
+ sig { returns(T::Array[Orb::MinimumInterval]) }
116
116
  attr_accessor :minimum_intervals
117
117
 
118
118
  # The name of the subscription.
@@ -127,13 +127,13 @@ module Orb
127
127
  attr_accessor :net_terms
128
128
 
129
129
  # A pending subscription change if one exists on this subscription.
130
- sig { returns(T.nilable(Orb::Subscription::PendingSubscriptionChange)) }
130
+ sig { returns(T.nilable(Orb::SubscriptionChangeMinified)) }
131
131
  attr_reader :pending_subscription_change
132
132
 
133
133
  sig do
134
134
  params(
135
135
  pending_subscription_change:
136
- T.nilable(Orb::Subscription::PendingSubscriptionChange::OrHash)
136
+ T.nilable(Orb::SubscriptionChangeMinified::OrHash)
137
137
  ).void
138
138
  end
139
139
  attr_writer :pending_subscription_change
@@ -149,16 +149,14 @@ module Orb
149
149
  attr_writer :plan
150
150
 
151
151
  # The price intervals for this subscription.
152
- sig { returns(T::Array[Orb::Subscription::PriceInterval]) }
152
+ sig { returns(T::Array[Orb::PriceInterval]) }
153
153
  attr_accessor :price_intervals
154
154
 
155
- sig { returns(T.nilable(Orb::Subscription::RedeemedCoupon)) }
155
+ sig { returns(T.nilable(Orb::CouponRedemption)) }
156
156
  attr_reader :redeemed_coupon
157
157
 
158
158
  sig do
159
- params(
160
- redeemed_coupon: T.nilable(Orb::Subscription::RedeemedCoupon::OrHash)
161
- ).void
159
+ params(redeemed_coupon: T.nilable(Orb::CouponRedemption::OrHash)).void
162
160
  end
163
161
  attr_writer :redeemed_coupon
164
162
 
@@ -169,10 +167,10 @@ module Orb
169
167
  sig { returns(Orb::Subscription::Status::TaggedSymbol) }
170
168
  attr_accessor :status
171
169
 
172
- sig { returns(Orb::Subscription::TrialInfo) }
170
+ sig { returns(Orb::SubscriptionTrialInfo) }
173
171
  attr_reader :trial_info
174
172
 
175
- sig { params(trial_info: Orb::Subscription::TrialInfo::OrHash).void }
173
+ sig { params(trial_info: Orb::SubscriptionTrialInfo::OrHash).void }
176
174
  attr_writer :trial_info
177
175
 
178
176
  # A [subscription](/core-concepts#subscription) represents the purchase of a plan
@@ -198,11 +196,10 @@ module Orb
198
196
  params(
199
197
  id: String,
200
198
  active_plan_phase_order: T.nilable(Integer),
201
- adjustment_intervals:
202
- T::Array[Orb::Subscription::AdjustmentInterval::OrHash],
199
+ adjustment_intervals: T::Array[Orb::AdjustmentInterval::OrHash],
203
200
  auto_collection: T.nilable(T::Boolean),
204
201
  billing_cycle_anchor_configuration:
205
- Orb::Subscription::BillingCycleAnchorConfiguration::OrHash,
202
+ Orb::BillingCycleAnchorConfiguration::OrHash,
206
203
  billing_cycle_day: Integer,
207
204
  created_at: Time,
208
205
  current_billing_period_end_date: T.nilable(Time),
@@ -212,30 +209,28 @@ module Orb
212
209
  discount_intervals:
213
210
  T::Array[
214
211
  T.any(
215
- Orb::Subscription::DiscountInterval::Amount::OrHash,
216
- Orb::Subscription::DiscountInterval::Percentage::OrHash,
217
- Orb::Subscription::DiscountInterval::Usage::OrHash
212
+ Orb::AmountDiscountInterval::OrHash,
213
+ Orb::PercentageDiscountInterval::OrHash,
214
+ Orb::UsageDiscountInterval::OrHash
218
215
  )
219
216
  ],
220
217
  end_date: T.nilable(Time),
221
218
  fixed_fee_quantity_schedule:
222
- T::Array[Orb::Subscription::FixedFeeQuantitySchedule::OrHash],
219
+ T::Array[Orb::FixedFeeQuantityScheduleEntry::OrHash],
223
220
  invoicing_threshold: T.nilable(String),
224
- maximum_intervals:
225
- T::Array[Orb::Subscription::MaximumInterval::OrHash],
221
+ maximum_intervals: T::Array[Orb::MaximumInterval::OrHash],
226
222
  metadata: T::Hash[Symbol, String],
227
- minimum_intervals:
228
- T::Array[Orb::Subscription::MinimumInterval::OrHash],
223
+ minimum_intervals: T::Array[Orb::MinimumInterval::OrHash],
229
224
  name: String,
230
225
  net_terms: Integer,
231
226
  pending_subscription_change:
232
- T.nilable(Orb::Subscription::PendingSubscriptionChange::OrHash),
227
+ T.nilable(Orb::SubscriptionChangeMinified::OrHash),
233
228
  plan: T.nilable(Orb::Plan::OrHash),
234
- price_intervals: T::Array[Orb::Subscription::PriceInterval::OrHash],
235
- redeemed_coupon: T.nilable(Orb::Subscription::RedeemedCoupon::OrHash),
229
+ price_intervals: T::Array[Orb::PriceInterval::OrHash],
230
+ redeemed_coupon: T.nilable(Orb::CouponRedemption::OrHash),
236
231
  start_date: Time,
237
232
  status: Orb::Subscription::Status::OrSymbol,
238
- trial_info: Orb::Subscription::TrialInfo::OrHash
233
+ trial_info: Orb::SubscriptionTrialInfo::OrHash
239
234
  ).returns(T.attached_class)
240
235
  end
241
236
  def self.new(
@@ -331,11 +326,10 @@ module Orb
331
326
  {
332
327
  id: String,
333
328
  active_plan_phase_order: T.nilable(Integer),
334
- adjustment_intervals:
335
- T::Array[Orb::Subscription::AdjustmentInterval],
329
+ adjustment_intervals: T::Array[Orb::AdjustmentInterval],
336
330
  auto_collection: T.nilable(T::Boolean),
337
331
  billing_cycle_anchor_configuration:
338
- Orb::Subscription::BillingCycleAnchorConfiguration,
332
+ Orb::BillingCycleAnchorConfiguration,
339
333
  billing_cycle_day: Integer,
340
334
  created_at: Time,
341
335
  current_billing_period_end_date: T.nilable(Time),
@@ -346,2946 +340,64 @@ module Orb
346
340
  T::Array[Orb::Subscription::DiscountInterval::Variants],
347
341
  end_date: T.nilable(Time),
348
342
  fixed_fee_quantity_schedule:
349
- T::Array[Orb::Subscription::FixedFeeQuantitySchedule],
343
+ T::Array[Orb::FixedFeeQuantityScheduleEntry],
350
344
  invoicing_threshold: T.nilable(String),
351
- maximum_intervals: T::Array[Orb::Subscription::MaximumInterval],
345
+ maximum_intervals: T::Array[Orb::MaximumInterval],
352
346
  metadata: T::Hash[Symbol, String],
353
- minimum_intervals: T::Array[Orb::Subscription::MinimumInterval],
347
+ minimum_intervals: T::Array[Orb::MinimumInterval],
354
348
  name: String,
355
349
  net_terms: Integer,
356
350
  pending_subscription_change:
357
- T.nilable(Orb::Subscription::PendingSubscriptionChange),
351
+ T.nilable(Orb::SubscriptionChangeMinified),
358
352
  plan: T.nilable(Orb::Plan),
359
- price_intervals: T::Array[Orb::Subscription::PriceInterval],
360
- redeemed_coupon: T.nilable(Orb::Subscription::RedeemedCoupon),
353
+ price_intervals: T::Array[Orb::PriceInterval],
354
+ redeemed_coupon: T.nilable(Orb::CouponRedemption),
361
355
  start_date: Time,
362
356
  status: Orb::Subscription::Status::TaggedSymbol,
363
- trial_info: Orb::Subscription::TrialInfo
357
+ trial_info: Orb::SubscriptionTrialInfo
364
358
  }
365
359
  )
366
360
  end
367
361
  def to_hash
368
362
  end
369
363
 
370
- class AdjustmentInterval < Orb::Internal::Type::BaseModel
371
- OrHash =
372
- T.type_alias do
373
- T.any(Orb::Subscription::AdjustmentInterval, Orb::Internal::AnyHash)
374
- end
375
-
376
- sig { returns(String) }
377
- attr_accessor :id
378
-
379
- sig do
380
- returns(Orb::Subscription::AdjustmentInterval::Adjustment::Variants)
381
- end
382
- attr_accessor :adjustment
383
-
384
- # The price interval IDs that this adjustment applies to.
385
- sig { returns(T::Array[String]) }
386
- attr_accessor :applies_to_price_interval_ids
387
-
388
- # The end date of the adjustment interval.
389
- sig { returns(T.nilable(Time)) }
390
- attr_accessor :end_date
391
-
392
- # The start date of the adjustment interval.
393
- sig { returns(Time) }
394
- attr_accessor :start_date
395
-
396
- sig do
397
- params(
398
- id: String,
399
- adjustment:
400
- T.any(
401
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::OrHash,
402
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::OrHash,
403
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::OrHash,
404
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::OrHash,
405
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::OrHash
406
- ),
407
- applies_to_price_interval_ids: T::Array[String],
408
- end_date: T.nilable(Time),
409
- start_date: Time
410
- ).returns(T.attached_class)
411
- end
412
- def self.new(
413
- id:,
414
- adjustment:,
415
- # The price interval IDs that this adjustment applies to.
416
- applies_to_price_interval_ids:,
417
- # The end date of the adjustment interval.
418
- end_date:,
419
- # The start date of the adjustment interval.
420
- start_date:
421
- )
422
- end
423
-
424
- sig do
425
- override.returns(
426
- {
427
- id: String,
428
- adjustment:
429
- Orb::Subscription::AdjustmentInterval::Adjustment::Variants,
430
- applies_to_price_interval_ids: T::Array[String],
431
- end_date: T.nilable(Time),
432
- start_date: Time
433
- }
434
- )
435
- end
436
- def to_hash
437
- end
438
-
439
- module Adjustment
440
- extend Orb::Internal::Type::Union
441
-
442
- Variants =
443
- T.type_alias do
444
- T.any(
445
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount,
446
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount,
447
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount,
448
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum,
449
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum
450
- )
451
- end
452
-
453
- class UsageDiscount < Orb::Internal::Type::BaseModel
454
- OrHash =
455
- T.type_alias do
456
- T.any(
457
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount,
458
- Orb::Internal::AnyHash
459
- )
460
- end
461
-
462
- sig { returns(String) }
463
- attr_accessor :id
464
-
465
- sig { returns(Symbol) }
466
- attr_accessor :adjustment_type
467
-
468
- # The price IDs that this adjustment applies to.
469
- sig { returns(T::Array[String]) }
470
- attr_accessor :applies_to_price_ids
471
-
472
- # The filters that determine which prices to apply this adjustment to.
473
- sig do
474
- returns(
475
- T::Array[
476
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter
477
- ]
478
- )
479
- end
480
- attr_accessor :filters
481
-
482
- # True for adjustments that apply to an entire invocice, false for adjustments
483
- # that apply to only one price.
484
- sig { returns(T::Boolean) }
485
- attr_accessor :is_invoice_level
486
-
487
- # The plan phase in which this adjustment is active.
488
- sig { returns(T.nilable(Integer)) }
489
- attr_accessor :plan_phase_order
490
-
491
- # The reason for the adjustment.
492
- sig { returns(T.nilable(String)) }
493
- attr_accessor :reason
494
-
495
- # The number of usage units by which to discount the price this adjustment applies
496
- # to in a given billing period.
497
- sig { returns(Float) }
498
- attr_accessor :usage_discount
499
-
500
- sig do
501
- params(
502
- id: String,
503
- applies_to_price_ids: T::Array[String],
504
- filters:
505
- T::Array[
506
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::OrHash
507
- ],
508
- is_invoice_level: T::Boolean,
509
- plan_phase_order: T.nilable(Integer),
510
- reason: T.nilable(String),
511
- usage_discount: Float,
512
- adjustment_type: Symbol
513
- ).returns(T.attached_class)
514
- end
515
- def self.new(
516
- id:,
517
- # The price IDs that this adjustment applies to.
518
- applies_to_price_ids:,
519
- # The filters that determine which prices to apply this adjustment to.
520
- filters:,
521
- # True for adjustments that apply to an entire invocice, false for adjustments
522
- # that apply to only one price.
523
- is_invoice_level:,
524
- # The plan phase in which this adjustment is active.
525
- plan_phase_order:,
526
- # The reason for the adjustment.
527
- reason:,
528
- # The number of usage units by which to discount the price this adjustment applies
529
- # to in a given billing period.
530
- usage_discount:,
531
- adjustment_type: :usage_discount
532
- )
533
- end
534
-
535
- sig do
536
- override.returns(
537
- {
538
- id: String,
539
- adjustment_type: Symbol,
540
- applies_to_price_ids: T::Array[String],
541
- filters:
542
- T::Array[
543
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter
544
- ],
545
- is_invoice_level: T::Boolean,
546
- plan_phase_order: T.nilable(Integer),
547
- reason: T.nilable(String),
548
- usage_discount: Float
549
- }
550
- )
551
- end
552
- def to_hash
553
- end
554
-
555
- class Filter < Orb::Internal::Type::BaseModel
556
- OrHash =
557
- T.type_alias do
558
- T.any(
559
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter,
560
- Orb::Internal::AnyHash
561
- )
562
- end
563
-
564
- # The property of the price to filter on.
565
- sig do
566
- returns(
567
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
568
- )
569
- end
570
- attr_accessor :field
571
-
572
- # Should prices that match the filter be included or excluded.
573
- sig do
574
- returns(
575
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
576
- )
577
- end
578
- attr_accessor :operator
579
-
580
- # The IDs or values that match this filter.
581
- sig { returns(T::Array[String]) }
582
- attr_accessor :values
583
-
584
- sig do
585
- params(
586
- field:
587
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field::OrSymbol,
588
- operator:
589
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Operator::OrSymbol,
590
- values: T::Array[String]
591
- ).returns(T.attached_class)
592
- end
593
- def self.new(
594
- # The property of the price to filter on.
595
- field:,
596
- # Should prices that match the filter be included or excluded.
597
- operator:,
598
- # The IDs or values that match this filter.
599
- values:
600
- )
601
- end
602
-
603
- sig do
604
- override.returns(
605
- {
606
- field:
607
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol,
608
- operator:
609
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol,
610
- values: T::Array[String]
611
- }
612
- )
613
- end
614
- def to_hash
615
- end
616
-
617
- # The property of the price to filter on.
618
- module Field
619
- extend Orb::Internal::Type::Enum
620
-
621
- TaggedSymbol =
622
- T.type_alias do
623
- T.all(
624
- Symbol,
625
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field
626
- )
627
- end
628
- OrSymbol = T.type_alias { T.any(Symbol, String) }
629
-
630
- PRICE_ID =
631
- T.let(
632
- :price_id,
633
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
634
- )
635
- ITEM_ID =
636
- T.let(
637
- :item_id,
638
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
639
- )
640
- PRICE_TYPE =
641
- T.let(
642
- :price_type,
643
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
644
- )
645
- CURRENCY =
646
- T.let(
647
- :currency,
648
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
649
- )
650
- PRICING_UNIT_ID =
651
- T.let(
652
- :pricing_unit_id,
653
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
654
- )
655
-
656
- sig do
657
- override.returns(
658
- T::Array[
659
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
660
- ]
661
- )
662
- end
663
- def self.values
664
- end
665
- end
666
-
667
- # Should prices that match the filter be included or excluded.
668
- module Operator
669
- extend Orb::Internal::Type::Enum
670
-
671
- TaggedSymbol =
672
- T.type_alias do
673
- T.all(
674
- Symbol,
675
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Operator
676
- )
677
- end
678
- OrSymbol = T.type_alias { T.any(Symbol, String) }
679
-
680
- INCLUDES =
681
- T.let(
682
- :includes,
683
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
684
- )
685
- EXCLUDES =
686
- T.let(
687
- :excludes,
688
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
689
- )
690
-
691
- sig do
692
- override.returns(
693
- T::Array[
694
- Orb::Subscription::AdjustmentInterval::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
695
- ]
696
- )
697
- end
698
- def self.values
699
- end
700
- end
701
- end
702
- end
703
-
704
- class AmountDiscount < Orb::Internal::Type::BaseModel
705
- OrHash =
706
- T.type_alias do
707
- T.any(
708
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount,
709
- Orb::Internal::AnyHash
710
- )
711
- end
712
-
713
- sig { returns(String) }
714
- attr_accessor :id
715
-
716
- sig { returns(Symbol) }
717
- attr_accessor :adjustment_type
718
-
719
- # The amount by which to discount the prices this adjustment applies to in a given
720
- # billing period.
721
- sig { returns(String) }
722
- attr_accessor :amount_discount
723
-
724
- # The price IDs that this adjustment applies to.
725
- sig { returns(T::Array[String]) }
726
- attr_accessor :applies_to_price_ids
727
-
728
- # The filters that determine which prices to apply this adjustment to.
729
- sig do
730
- returns(
731
- T::Array[
732
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter
733
- ]
734
- )
735
- end
736
- attr_accessor :filters
737
-
738
- # True for adjustments that apply to an entire invocice, false for adjustments
739
- # that apply to only one price.
740
- sig { returns(T::Boolean) }
741
- attr_accessor :is_invoice_level
742
-
743
- # The plan phase in which this adjustment is active.
744
- sig { returns(T.nilable(Integer)) }
745
- attr_accessor :plan_phase_order
746
-
747
- # The reason for the adjustment.
748
- sig { returns(T.nilable(String)) }
749
- attr_accessor :reason
750
-
751
- sig do
752
- params(
753
- id: String,
754
- amount_discount: String,
755
- applies_to_price_ids: T::Array[String],
756
- filters:
757
- T::Array[
758
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::OrHash
759
- ],
760
- is_invoice_level: T::Boolean,
761
- plan_phase_order: T.nilable(Integer),
762
- reason: T.nilable(String),
763
- adjustment_type: Symbol
764
- ).returns(T.attached_class)
765
- end
766
- def self.new(
767
- id:,
768
- # The amount by which to discount the prices this adjustment applies to in a given
769
- # billing period.
770
- amount_discount:,
771
- # The price IDs that this adjustment applies to.
772
- applies_to_price_ids:,
773
- # The filters that determine which prices to apply this adjustment to.
774
- filters:,
775
- # True for adjustments that apply to an entire invocice, false for adjustments
776
- # that apply to only one price.
777
- is_invoice_level:,
778
- # The plan phase in which this adjustment is active.
779
- plan_phase_order:,
780
- # The reason for the adjustment.
781
- reason:,
782
- adjustment_type: :amount_discount
783
- )
784
- end
785
-
786
- sig do
787
- override.returns(
788
- {
789
- id: String,
790
- adjustment_type: Symbol,
791
- amount_discount: String,
792
- applies_to_price_ids: T::Array[String],
793
- filters:
794
- T::Array[
795
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter
796
- ],
797
- is_invoice_level: T::Boolean,
798
- plan_phase_order: T.nilable(Integer),
799
- reason: T.nilable(String)
800
- }
801
- )
802
- end
803
- def to_hash
804
- end
805
-
806
- class Filter < Orb::Internal::Type::BaseModel
807
- OrHash =
808
- T.type_alias do
809
- T.any(
810
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter,
811
- Orb::Internal::AnyHash
812
- )
813
- end
814
-
815
- # The property of the price to filter on.
816
- sig do
817
- returns(
818
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
819
- )
820
- end
821
- attr_accessor :field
822
-
823
- # Should prices that match the filter be included or excluded.
824
- sig do
825
- returns(
826
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
827
- )
828
- end
829
- attr_accessor :operator
830
-
831
- # The IDs or values that match this filter.
832
- sig { returns(T::Array[String]) }
833
- attr_accessor :values
834
-
835
- sig do
836
- params(
837
- field:
838
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field::OrSymbol,
839
- operator:
840
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Operator::OrSymbol,
841
- values: T::Array[String]
842
- ).returns(T.attached_class)
843
- end
844
- def self.new(
845
- # The property of the price to filter on.
846
- field:,
847
- # Should prices that match the filter be included or excluded.
848
- operator:,
849
- # The IDs or values that match this filter.
850
- values:
851
- )
852
- end
853
-
854
- sig do
855
- override.returns(
856
- {
857
- field:
858
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol,
859
- operator:
860
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol,
861
- values: T::Array[String]
862
- }
863
- )
864
- end
865
- def to_hash
866
- end
867
-
868
- # The property of the price to filter on.
869
- module Field
870
- extend Orb::Internal::Type::Enum
871
-
872
- TaggedSymbol =
873
- T.type_alias do
874
- T.all(
875
- Symbol,
876
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field
877
- )
878
- end
879
- OrSymbol = T.type_alias { T.any(Symbol, String) }
880
-
881
- PRICE_ID =
882
- T.let(
883
- :price_id,
884
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
885
- )
886
- ITEM_ID =
887
- T.let(
888
- :item_id,
889
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
890
- )
891
- PRICE_TYPE =
892
- T.let(
893
- :price_type,
894
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
895
- )
896
- CURRENCY =
897
- T.let(
898
- :currency,
899
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
900
- )
901
- PRICING_UNIT_ID =
902
- T.let(
903
- :pricing_unit_id,
904
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
905
- )
906
-
907
- sig do
908
- override.returns(
909
- T::Array[
910
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
911
- ]
912
- )
913
- end
914
- def self.values
915
- end
916
- end
917
-
918
- # Should prices that match the filter be included or excluded.
919
- module Operator
920
- extend Orb::Internal::Type::Enum
921
-
922
- TaggedSymbol =
923
- T.type_alias do
924
- T.all(
925
- Symbol,
926
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Operator
927
- )
928
- end
929
- OrSymbol = T.type_alias { T.any(Symbol, String) }
930
-
931
- INCLUDES =
932
- T.let(
933
- :includes,
934
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
935
- )
936
- EXCLUDES =
937
- T.let(
938
- :excludes,
939
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
940
- )
941
-
942
- sig do
943
- override.returns(
944
- T::Array[
945
- Orb::Subscription::AdjustmentInterval::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
946
- ]
947
- )
948
- end
949
- def self.values
950
- end
951
- end
952
- end
953
- end
954
-
955
- class PercentageDiscount < Orb::Internal::Type::BaseModel
956
- OrHash =
957
- T.type_alias do
958
- T.any(
959
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount,
960
- Orb::Internal::AnyHash
961
- )
962
- end
963
-
964
- sig { returns(String) }
965
- attr_accessor :id
966
-
967
- sig { returns(Symbol) }
968
- attr_accessor :adjustment_type
969
-
970
- # The price IDs that this adjustment applies to.
971
- sig { returns(T::Array[String]) }
972
- attr_accessor :applies_to_price_ids
973
-
974
- # The filters that determine which prices to apply this adjustment to.
975
- sig do
976
- returns(
977
- T::Array[
978
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter
979
- ]
980
- )
981
- end
982
- attr_accessor :filters
983
-
984
- # True for adjustments that apply to an entire invocice, false for adjustments
985
- # that apply to only one price.
986
- sig { returns(T::Boolean) }
987
- attr_accessor :is_invoice_level
988
-
989
- # The percentage (as a value between 0 and 1) by which to discount the price
990
- # intervals this adjustment applies to in a given billing period.
991
- sig { returns(Float) }
992
- attr_accessor :percentage_discount
993
-
994
- # The plan phase in which this adjustment is active.
995
- sig { returns(T.nilable(Integer)) }
996
- attr_accessor :plan_phase_order
997
-
998
- # The reason for the adjustment.
999
- sig { returns(T.nilable(String)) }
1000
- attr_accessor :reason
1001
-
1002
- sig do
1003
- params(
1004
- id: String,
1005
- applies_to_price_ids: T::Array[String],
1006
- filters:
1007
- T::Array[
1008
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::OrHash
1009
- ],
1010
- is_invoice_level: T::Boolean,
1011
- percentage_discount: Float,
1012
- plan_phase_order: T.nilable(Integer),
1013
- reason: T.nilable(String),
1014
- adjustment_type: Symbol
1015
- ).returns(T.attached_class)
1016
- end
1017
- def self.new(
1018
- id:,
1019
- # The price IDs that this adjustment applies to.
1020
- applies_to_price_ids:,
1021
- # The filters that determine which prices to apply this adjustment to.
1022
- filters:,
1023
- # True for adjustments that apply to an entire invocice, false for adjustments
1024
- # that apply to only one price.
1025
- is_invoice_level:,
1026
- # The percentage (as a value between 0 and 1) by which to discount the price
1027
- # intervals this adjustment applies to in a given billing period.
1028
- percentage_discount:,
1029
- # The plan phase in which this adjustment is active.
1030
- plan_phase_order:,
1031
- # The reason for the adjustment.
1032
- reason:,
1033
- adjustment_type: :percentage_discount
1034
- )
1035
- end
1036
-
1037
- sig do
1038
- override.returns(
1039
- {
1040
- id: String,
1041
- adjustment_type: Symbol,
1042
- applies_to_price_ids: T::Array[String],
1043
- filters:
1044
- T::Array[
1045
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter
1046
- ],
1047
- is_invoice_level: T::Boolean,
1048
- percentage_discount: Float,
1049
- plan_phase_order: T.nilable(Integer),
1050
- reason: T.nilable(String)
1051
- }
1052
- )
1053
- end
1054
- def to_hash
1055
- end
1056
-
1057
- class Filter < Orb::Internal::Type::BaseModel
1058
- OrHash =
1059
- T.type_alias do
1060
- T.any(
1061
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter,
1062
- Orb::Internal::AnyHash
1063
- )
1064
- end
1065
-
1066
- # The property of the price to filter on.
1067
- sig do
1068
- returns(
1069
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
1070
- )
1071
- end
1072
- attr_accessor :field
1073
-
1074
- # Should prices that match the filter be included or excluded.
1075
- sig do
1076
- returns(
1077
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
1078
- )
1079
- end
1080
- attr_accessor :operator
1081
-
1082
- # The IDs or values that match this filter.
1083
- sig { returns(T::Array[String]) }
1084
- attr_accessor :values
1085
-
1086
- sig do
1087
- params(
1088
- field:
1089
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field::OrSymbol,
1090
- operator:
1091
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Operator::OrSymbol,
1092
- values: T::Array[String]
1093
- ).returns(T.attached_class)
1094
- end
1095
- def self.new(
1096
- # The property of the price to filter on.
1097
- field:,
1098
- # Should prices that match the filter be included or excluded.
1099
- operator:,
1100
- # The IDs or values that match this filter.
1101
- values:
1102
- )
1103
- end
1104
-
1105
- sig do
1106
- override.returns(
1107
- {
1108
- field:
1109
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol,
1110
- operator:
1111
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol,
1112
- values: T::Array[String]
1113
- }
1114
- )
1115
- end
1116
- def to_hash
1117
- end
1118
-
1119
- # The property of the price to filter on.
1120
- module Field
1121
- extend Orb::Internal::Type::Enum
1122
-
1123
- TaggedSymbol =
1124
- T.type_alias do
1125
- T.all(
1126
- Symbol,
1127
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field
1128
- )
1129
- end
1130
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1131
-
1132
- PRICE_ID =
1133
- T.let(
1134
- :price_id,
1135
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
1136
- )
1137
- ITEM_ID =
1138
- T.let(
1139
- :item_id,
1140
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
1141
- )
1142
- PRICE_TYPE =
1143
- T.let(
1144
- :price_type,
1145
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
1146
- )
1147
- CURRENCY =
1148
- T.let(
1149
- :currency,
1150
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
1151
- )
1152
- PRICING_UNIT_ID =
1153
- T.let(
1154
- :pricing_unit_id,
1155
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
1156
- )
1157
-
1158
- sig do
1159
- override.returns(
1160
- T::Array[
1161
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
1162
- ]
1163
- )
1164
- end
1165
- def self.values
1166
- end
1167
- end
1168
-
1169
- # Should prices that match the filter be included or excluded.
1170
- module Operator
1171
- extend Orb::Internal::Type::Enum
1172
-
1173
- TaggedSymbol =
1174
- T.type_alias do
1175
- T.all(
1176
- Symbol,
1177
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Operator
1178
- )
1179
- end
1180
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1181
-
1182
- INCLUDES =
1183
- T.let(
1184
- :includes,
1185
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
1186
- )
1187
- EXCLUDES =
1188
- T.let(
1189
- :excludes,
1190
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
1191
- )
1192
-
1193
- sig do
1194
- override.returns(
1195
- T::Array[
1196
- Orb::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
1197
- ]
1198
- )
1199
- end
1200
- def self.values
1201
- end
1202
- end
1203
- end
1204
- end
1205
-
1206
- class Minimum < Orb::Internal::Type::BaseModel
1207
- OrHash =
1208
- T.type_alias do
1209
- T.any(
1210
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum,
1211
- Orb::Internal::AnyHash
1212
- )
1213
- end
1214
-
1215
- sig { returns(String) }
1216
- attr_accessor :id
1217
-
1218
- sig { returns(Symbol) }
1219
- attr_accessor :adjustment_type
1220
-
1221
- # The price IDs that this adjustment applies to.
1222
- sig { returns(T::Array[String]) }
1223
- attr_accessor :applies_to_price_ids
1224
-
1225
- # The filters that determine which prices to apply this adjustment to.
1226
- sig do
1227
- returns(
1228
- T::Array[
1229
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter
1230
- ]
1231
- )
1232
- end
1233
- attr_accessor :filters
1234
-
1235
- # True for adjustments that apply to an entire invocice, false for adjustments
1236
- # that apply to only one price.
1237
- sig { returns(T::Boolean) }
1238
- attr_accessor :is_invoice_level
1239
-
1240
- # The item ID that revenue from this minimum will be attributed to.
1241
- sig { returns(String) }
1242
- attr_accessor :item_id
1243
-
1244
- # The minimum amount to charge in a given billing period for the prices this
1245
- # adjustment applies to.
1246
- sig { returns(String) }
1247
- attr_accessor :minimum_amount
1248
-
1249
- # The plan phase in which this adjustment is active.
1250
- sig { returns(T.nilable(Integer)) }
1251
- attr_accessor :plan_phase_order
1252
-
1253
- # The reason for the adjustment.
1254
- sig { returns(T.nilable(String)) }
1255
- attr_accessor :reason
1256
-
1257
- sig do
1258
- params(
1259
- id: String,
1260
- applies_to_price_ids: T::Array[String],
1261
- filters:
1262
- T::Array[
1263
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::OrHash
1264
- ],
1265
- is_invoice_level: T::Boolean,
1266
- item_id: String,
1267
- minimum_amount: String,
1268
- plan_phase_order: T.nilable(Integer),
1269
- reason: T.nilable(String),
1270
- adjustment_type: Symbol
1271
- ).returns(T.attached_class)
1272
- end
1273
- def self.new(
1274
- id:,
1275
- # The price IDs that this adjustment applies to.
1276
- applies_to_price_ids:,
1277
- # The filters that determine which prices to apply this adjustment to.
1278
- filters:,
1279
- # True for adjustments that apply to an entire invocice, false for adjustments
1280
- # that apply to only one price.
1281
- is_invoice_level:,
1282
- # The item ID that revenue from this minimum will be attributed to.
1283
- item_id:,
1284
- # The minimum amount to charge in a given billing period for the prices this
1285
- # adjustment applies to.
1286
- minimum_amount:,
1287
- # The plan phase in which this adjustment is active.
1288
- plan_phase_order:,
1289
- # The reason for the adjustment.
1290
- reason:,
1291
- adjustment_type: :minimum
1292
- )
1293
- end
1294
-
1295
- sig do
1296
- override.returns(
1297
- {
1298
- id: String,
1299
- adjustment_type: Symbol,
1300
- applies_to_price_ids: T::Array[String],
1301
- filters:
1302
- T::Array[
1303
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter
1304
- ],
1305
- is_invoice_level: T::Boolean,
1306
- item_id: String,
1307
- minimum_amount: String,
1308
- plan_phase_order: T.nilable(Integer),
1309
- reason: T.nilable(String)
1310
- }
1311
- )
1312
- end
1313
- def to_hash
1314
- end
1315
-
1316
- class Filter < Orb::Internal::Type::BaseModel
1317
- OrHash =
1318
- T.type_alias do
1319
- T.any(
1320
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter,
1321
- Orb::Internal::AnyHash
1322
- )
1323
- end
1324
-
1325
- # The property of the price to filter on.
1326
- sig do
1327
- returns(
1328
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Field::TaggedSymbol
1329
- )
1330
- end
1331
- attr_accessor :field
1332
-
1333
- # Should prices that match the filter be included or excluded.
1334
- sig do
1335
- returns(
1336
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Operator::TaggedSymbol
1337
- )
1338
- end
1339
- attr_accessor :operator
1340
-
1341
- # The IDs or values that match this filter.
1342
- sig { returns(T::Array[String]) }
1343
- attr_accessor :values
1344
-
1345
- sig do
1346
- params(
1347
- field:
1348
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Field::OrSymbol,
1349
- operator:
1350
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Operator::OrSymbol,
1351
- values: T::Array[String]
1352
- ).returns(T.attached_class)
1353
- end
1354
- def self.new(
1355
- # The property of the price to filter on.
1356
- field:,
1357
- # Should prices that match the filter be included or excluded.
1358
- operator:,
1359
- # The IDs or values that match this filter.
1360
- values:
1361
- )
1362
- end
1363
-
1364
- sig do
1365
- override.returns(
1366
- {
1367
- field:
1368
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Field::TaggedSymbol,
1369
- operator:
1370
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Operator::TaggedSymbol,
1371
- values: T::Array[String]
1372
- }
1373
- )
1374
- end
1375
- def to_hash
1376
- end
1377
-
1378
- # The property of the price to filter on.
1379
- module Field
1380
- extend Orb::Internal::Type::Enum
1381
-
1382
- TaggedSymbol =
1383
- T.type_alias do
1384
- T.all(
1385
- Symbol,
1386
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Field
1387
- )
1388
- end
1389
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1390
-
1391
- PRICE_ID =
1392
- T.let(
1393
- :price_id,
1394
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Field::TaggedSymbol
1395
- )
1396
- ITEM_ID =
1397
- T.let(
1398
- :item_id,
1399
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Field::TaggedSymbol
1400
- )
1401
- PRICE_TYPE =
1402
- T.let(
1403
- :price_type,
1404
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Field::TaggedSymbol
1405
- )
1406
- CURRENCY =
1407
- T.let(
1408
- :currency,
1409
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Field::TaggedSymbol
1410
- )
1411
- PRICING_UNIT_ID =
1412
- T.let(
1413
- :pricing_unit_id,
1414
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Field::TaggedSymbol
1415
- )
1416
-
1417
- sig do
1418
- override.returns(
1419
- T::Array[
1420
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Field::TaggedSymbol
1421
- ]
1422
- )
1423
- end
1424
- def self.values
1425
- end
1426
- end
1427
-
1428
- # Should prices that match the filter be included or excluded.
1429
- module Operator
1430
- extend Orb::Internal::Type::Enum
1431
-
1432
- TaggedSymbol =
1433
- T.type_alias do
1434
- T.all(
1435
- Symbol,
1436
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Operator
1437
- )
1438
- end
1439
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1440
-
1441
- INCLUDES =
1442
- T.let(
1443
- :includes,
1444
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Operator::TaggedSymbol
1445
- )
1446
- EXCLUDES =
1447
- T.let(
1448
- :excludes,
1449
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Operator::TaggedSymbol
1450
- )
1451
-
1452
- sig do
1453
- override.returns(
1454
- T::Array[
1455
- Orb::Subscription::AdjustmentInterval::Adjustment::Minimum::Filter::Operator::TaggedSymbol
1456
- ]
1457
- )
1458
- end
1459
- def self.values
1460
- end
1461
- end
1462
- end
1463
- end
1464
-
1465
- class Maximum < Orb::Internal::Type::BaseModel
1466
- OrHash =
1467
- T.type_alias do
1468
- T.any(
1469
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum,
1470
- Orb::Internal::AnyHash
1471
- )
1472
- end
1473
-
1474
- sig { returns(String) }
1475
- attr_accessor :id
1476
-
1477
- sig { returns(Symbol) }
1478
- attr_accessor :adjustment_type
1479
-
1480
- # The price IDs that this adjustment applies to.
1481
- sig { returns(T::Array[String]) }
1482
- attr_accessor :applies_to_price_ids
1483
-
1484
- # The filters that determine which prices to apply this adjustment to.
1485
- sig do
1486
- returns(
1487
- T::Array[
1488
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter
1489
- ]
1490
- )
1491
- end
1492
- attr_accessor :filters
1493
-
1494
- # True for adjustments that apply to an entire invocice, false for adjustments
1495
- # that apply to only one price.
1496
- sig { returns(T::Boolean) }
1497
- attr_accessor :is_invoice_level
1498
-
1499
- # The maximum amount to charge in a given billing period for the prices this
1500
- # adjustment applies to.
1501
- sig { returns(String) }
1502
- attr_accessor :maximum_amount
1503
-
1504
- # The plan phase in which this adjustment is active.
1505
- sig { returns(T.nilable(Integer)) }
1506
- attr_accessor :plan_phase_order
1507
-
1508
- # The reason for the adjustment.
1509
- sig { returns(T.nilable(String)) }
1510
- attr_accessor :reason
1511
-
1512
- sig do
1513
- params(
1514
- id: String,
1515
- applies_to_price_ids: T::Array[String],
1516
- filters:
1517
- T::Array[
1518
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::OrHash
1519
- ],
1520
- is_invoice_level: T::Boolean,
1521
- maximum_amount: String,
1522
- plan_phase_order: T.nilable(Integer),
1523
- reason: T.nilable(String),
1524
- adjustment_type: Symbol
1525
- ).returns(T.attached_class)
1526
- end
1527
- def self.new(
1528
- id:,
1529
- # The price IDs that this adjustment applies to.
1530
- applies_to_price_ids:,
1531
- # The filters that determine which prices to apply this adjustment to.
1532
- filters:,
1533
- # True for adjustments that apply to an entire invocice, false for adjustments
1534
- # that apply to only one price.
1535
- is_invoice_level:,
1536
- # The maximum amount to charge in a given billing period for the prices this
1537
- # adjustment applies to.
1538
- maximum_amount:,
1539
- # The plan phase in which this adjustment is active.
1540
- plan_phase_order:,
1541
- # The reason for the adjustment.
1542
- reason:,
1543
- adjustment_type: :maximum
1544
- )
1545
- end
1546
-
1547
- sig do
1548
- override.returns(
1549
- {
1550
- id: String,
1551
- adjustment_type: Symbol,
1552
- applies_to_price_ids: T::Array[String],
1553
- filters:
1554
- T::Array[
1555
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter
1556
- ],
1557
- is_invoice_level: T::Boolean,
1558
- maximum_amount: String,
1559
- plan_phase_order: T.nilable(Integer),
1560
- reason: T.nilable(String)
1561
- }
1562
- )
1563
- end
1564
- def to_hash
1565
- end
1566
-
1567
- class Filter < Orb::Internal::Type::BaseModel
1568
- OrHash =
1569
- T.type_alias do
1570
- T.any(
1571
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter,
1572
- Orb::Internal::AnyHash
1573
- )
1574
- end
1575
-
1576
- # The property of the price to filter on.
1577
- sig do
1578
- returns(
1579
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Field::TaggedSymbol
1580
- )
1581
- end
1582
- attr_accessor :field
1583
-
1584
- # Should prices that match the filter be included or excluded.
1585
- sig do
1586
- returns(
1587
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Operator::TaggedSymbol
1588
- )
1589
- end
1590
- attr_accessor :operator
1591
-
1592
- # The IDs or values that match this filter.
1593
- sig { returns(T::Array[String]) }
1594
- attr_accessor :values
1595
-
1596
- sig do
1597
- params(
1598
- field:
1599
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Field::OrSymbol,
1600
- operator:
1601
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Operator::OrSymbol,
1602
- values: T::Array[String]
1603
- ).returns(T.attached_class)
1604
- end
1605
- def self.new(
1606
- # The property of the price to filter on.
1607
- field:,
1608
- # Should prices that match the filter be included or excluded.
1609
- operator:,
1610
- # The IDs or values that match this filter.
1611
- values:
1612
- )
1613
- end
1614
-
1615
- sig do
1616
- override.returns(
1617
- {
1618
- field:
1619
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Field::TaggedSymbol,
1620
- operator:
1621
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Operator::TaggedSymbol,
1622
- values: T::Array[String]
1623
- }
1624
- )
1625
- end
1626
- def to_hash
1627
- end
1628
-
1629
- # The property of the price to filter on.
1630
- module Field
1631
- extend Orb::Internal::Type::Enum
1632
-
1633
- TaggedSymbol =
1634
- T.type_alias do
1635
- T.all(
1636
- Symbol,
1637
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Field
1638
- )
1639
- end
1640
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1641
-
1642
- PRICE_ID =
1643
- T.let(
1644
- :price_id,
1645
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Field::TaggedSymbol
1646
- )
1647
- ITEM_ID =
1648
- T.let(
1649
- :item_id,
1650
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Field::TaggedSymbol
1651
- )
1652
- PRICE_TYPE =
1653
- T.let(
1654
- :price_type,
1655
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Field::TaggedSymbol
1656
- )
1657
- CURRENCY =
1658
- T.let(
1659
- :currency,
1660
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Field::TaggedSymbol
1661
- )
1662
- PRICING_UNIT_ID =
1663
- T.let(
1664
- :pricing_unit_id,
1665
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Field::TaggedSymbol
1666
- )
1667
-
1668
- sig do
1669
- override.returns(
1670
- T::Array[
1671
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Field::TaggedSymbol
1672
- ]
1673
- )
1674
- end
1675
- def self.values
1676
- end
1677
- end
1678
-
1679
- # Should prices that match the filter be included or excluded.
1680
- module Operator
1681
- extend Orb::Internal::Type::Enum
1682
-
1683
- TaggedSymbol =
1684
- T.type_alias do
1685
- T.all(
1686
- Symbol,
1687
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Operator
1688
- )
1689
- end
1690
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1691
-
1692
- INCLUDES =
1693
- T.let(
1694
- :includes,
1695
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Operator::TaggedSymbol
1696
- )
1697
- EXCLUDES =
1698
- T.let(
1699
- :excludes,
1700
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Operator::TaggedSymbol
1701
- )
1702
-
1703
- sig do
1704
- override.returns(
1705
- T::Array[
1706
- Orb::Subscription::AdjustmentInterval::Adjustment::Maximum::Filter::Operator::TaggedSymbol
1707
- ]
1708
- )
1709
- end
1710
- def self.values
1711
- end
1712
- end
1713
- end
1714
- end
1715
-
1716
- sig do
1717
- override.returns(
1718
- T::Array[
1719
- Orb::Subscription::AdjustmentInterval::Adjustment::Variants
1720
- ]
1721
- )
1722
- end
1723
- def self.variants
1724
- end
1725
- end
1726
- end
364
+ module DiscountInterval
365
+ extend Orb::Internal::Type::Union
1727
366
 
1728
- class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
1729
- OrHash =
367
+ Variants =
1730
368
  T.type_alias do
1731
369
  T.any(
1732
- Orb::Subscription::BillingCycleAnchorConfiguration,
1733
- Orb::Internal::AnyHash
370
+ Orb::AmountDiscountInterval,
371
+ Orb::PercentageDiscountInterval,
372
+ Orb::UsageDiscountInterval
1734
373
  )
1735
374
  end
1736
375
 
1737
- # The day of the month on which the billing cycle is anchored. If the maximum
1738
- # number of days in a month is greater than this value, the last day of the month
1739
- # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
1740
- # period begins on the 30th.
1741
- sig { returns(Integer) }
1742
- attr_accessor :day
1743
-
1744
- # The month on which the billing cycle is anchored (e.g. a quarterly price
1745
- # anchored in February would have cycles starting February, May, August, and
1746
- # November).
1747
- sig { returns(T.nilable(Integer)) }
1748
- attr_accessor :month
1749
-
1750
- # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
1751
- # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
1752
- sig { returns(T.nilable(Integer)) }
1753
- attr_accessor :year
1754
-
1755
- sig do
1756
- params(
1757
- day: Integer,
1758
- month: T.nilable(Integer),
1759
- year: T.nilable(Integer)
1760
- ).returns(T.attached_class)
1761
- end
1762
- def self.new(
1763
- # The day of the month on which the billing cycle is anchored. If the maximum
1764
- # number of days in a month is greater than this value, the last day of the month
1765
- # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
1766
- # period begins on the 30th.
1767
- day:,
1768
- # The month on which the billing cycle is anchored (e.g. a quarterly price
1769
- # anchored in February would have cycles starting February, May, August, and
1770
- # November).
1771
- month: nil,
1772
- # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
1773
- # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
1774
- year: nil
1775
- )
1776
- end
1777
-
1778
376
  sig do
1779
377
  override.returns(
1780
- {
1781
- day: Integer,
1782
- month: T.nilable(Integer),
1783
- year: T.nilable(Integer)
1784
- }
378
+ T::Array[Orb::Subscription::DiscountInterval::Variants]
1785
379
  )
1786
380
  end
1787
- def to_hash
381
+ def self.variants
1788
382
  end
1789
383
  end
1790
384
 
1791
- module DiscountInterval
1792
- extend Orb::Internal::Type::Union
1793
-
1794
- Variants =
1795
- T.type_alias do
1796
- T.any(
1797
- Orb::Subscription::DiscountInterval::Amount,
1798
- Orb::Subscription::DiscountInterval::Percentage,
1799
- Orb::Subscription::DiscountInterval::Usage
1800
- )
1801
- end
1802
-
1803
- class Amount < Orb::Internal::Type::BaseModel
1804
- OrHash =
1805
- T.type_alias do
1806
- T.any(
1807
- Orb::Subscription::DiscountInterval::Amount,
1808
- Orb::Internal::AnyHash
1809
- )
1810
- end
1811
-
1812
- # Only available if discount_type is `amount`.
1813
- sig { returns(String) }
1814
- attr_accessor :amount_discount
1815
-
1816
- # The price interval ids that this discount interval applies to.
1817
- sig { returns(T::Array[String]) }
1818
- attr_accessor :applies_to_price_interval_ids
1819
-
1820
- sig { returns(Symbol) }
1821
- attr_accessor :discount_type
1822
-
1823
- # The end date of the discount interval.
1824
- sig { returns(T.nilable(Time)) }
1825
- attr_accessor :end_date
1826
-
1827
- # The filters that determine which prices this discount interval applies to.
1828
- sig do
1829
- returns(
1830
- T::Array[Orb::Subscription::DiscountInterval::Amount::Filter]
1831
- )
1832
- end
1833
- attr_accessor :filters
1834
-
1835
- # The start date of the discount interval.
1836
- sig { returns(Time) }
1837
- attr_accessor :start_date
1838
-
1839
- sig do
1840
- params(
1841
- amount_discount: String,
1842
- applies_to_price_interval_ids: T::Array[String],
1843
- end_date: T.nilable(Time),
1844
- filters:
1845
- T::Array[
1846
- Orb::Subscription::DiscountInterval::Amount::Filter::OrHash
1847
- ],
1848
- start_date: Time,
1849
- discount_type: Symbol
1850
- ).returns(T.attached_class)
1851
- end
1852
- def self.new(
1853
- # Only available if discount_type is `amount`.
1854
- amount_discount:,
1855
- # The price interval ids that this discount interval applies to.
1856
- applies_to_price_interval_ids:,
1857
- # The end date of the discount interval.
1858
- end_date:,
1859
- # The filters that determine which prices this discount interval applies to.
1860
- filters:,
1861
- # The start date of the discount interval.
1862
- start_date:,
1863
- discount_type: :amount
1864
- )
1865
- end
1866
-
1867
- sig do
1868
- override.returns(
1869
- {
1870
- amount_discount: String,
1871
- applies_to_price_interval_ids: T::Array[String],
1872
- discount_type: Symbol,
1873
- end_date: T.nilable(Time),
1874
- filters:
1875
- T::Array[Orb::Subscription::DiscountInterval::Amount::Filter],
1876
- start_date: Time
1877
- }
1878
- )
1879
- end
1880
- def to_hash
1881
- end
1882
-
1883
- class Filter < Orb::Internal::Type::BaseModel
1884
- OrHash =
1885
- T.type_alias do
1886
- T.any(
1887
- Orb::Subscription::DiscountInterval::Amount::Filter,
1888
- Orb::Internal::AnyHash
1889
- )
1890
- end
1891
-
1892
- # The property of the price to filter on.
1893
- sig do
1894
- returns(
1895
- Orb::Subscription::DiscountInterval::Amount::Filter::Field::TaggedSymbol
1896
- )
1897
- end
1898
- attr_accessor :field
1899
-
1900
- # Should prices that match the filter be included or excluded.
1901
- sig do
1902
- returns(
1903
- Orb::Subscription::DiscountInterval::Amount::Filter::Operator::TaggedSymbol
1904
- )
1905
- end
1906
- attr_accessor :operator
1907
-
1908
- # The IDs or values that match this filter.
1909
- sig { returns(T::Array[String]) }
1910
- attr_accessor :values
1911
-
1912
- sig do
1913
- params(
1914
- field:
1915
- Orb::Subscription::DiscountInterval::Amount::Filter::Field::OrSymbol,
1916
- operator:
1917
- Orb::Subscription::DiscountInterval::Amount::Filter::Operator::OrSymbol,
1918
- values: T::Array[String]
1919
- ).returns(T.attached_class)
1920
- end
1921
- def self.new(
1922
- # The property of the price to filter on.
1923
- field:,
1924
- # Should prices that match the filter be included or excluded.
1925
- operator:,
1926
- # The IDs or values that match this filter.
1927
- values:
1928
- )
1929
- end
1930
-
1931
- sig do
1932
- override.returns(
1933
- {
1934
- field:
1935
- Orb::Subscription::DiscountInterval::Amount::Filter::Field::TaggedSymbol,
1936
- operator:
1937
- Orb::Subscription::DiscountInterval::Amount::Filter::Operator::TaggedSymbol,
1938
- values: T::Array[String]
1939
- }
1940
- )
1941
- end
1942
- def to_hash
1943
- end
1944
-
1945
- # The property of the price to filter on.
1946
- module Field
1947
- extend Orb::Internal::Type::Enum
1948
-
1949
- TaggedSymbol =
1950
- T.type_alias do
1951
- T.all(
1952
- Symbol,
1953
- Orb::Subscription::DiscountInterval::Amount::Filter::Field
1954
- )
1955
- end
1956
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1957
-
1958
- PRICE_ID =
1959
- T.let(
1960
- :price_id,
1961
- Orb::Subscription::DiscountInterval::Amount::Filter::Field::TaggedSymbol
1962
- )
1963
- ITEM_ID =
1964
- T.let(
1965
- :item_id,
1966
- Orb::Subscription::DiscountInterval::Amount::Filter::Field::TaggedSymbol
1967
- )
1968
- PRICE_TYPE =
1969
- T.let(
1970
- :price_type,
1971
- Orb::Subscription::DiscountInterval::Amount::Filter::Field::TaggedSymbol
1972
- )
1973
- CURRENCY =
1974
- T.let(
1975
- :currency,
1976
- Orb::Subscription::DiscountInterval::Amount::Filter::Field::TaggedSymbol
1977
- )
1978
- PRICING_UNIT_ID =
1979
- T.let(
1980
- :pricing_unit_id,
1981
- Orb::Subscription::DiscountInterval::Amount::Filter::Field::TaggedSymbol
1982
- )
1983
-
1984
- sig do
1985
- override.returns(
1986
- T::Array[
1987
- Orb::Subscription::DiscountInterval::Amount::Filter::Field::TaggedSymbol
1988
- ]
1989
- )
1990
- end
1991
- def self.values
1992
- end
1993
- end
1994
-
1995
- # Should prices that match the filter be included or excluded.
1996
- module Operator
1997
- extend Orb::Internal::Type::Enum
385
+ module Status
386
+ extend Orb::Internal::Type::Enum
1998
387
 
1999
- TaggedSymbol =
2000
- T.type_alias do
2001
- T.all(
2002
- Symbol,
2003
- Orb::Subscription::DiscountInterval::Amount::Filter::Operator
2004
- )
2005
- end
2006
- OrSymbol = T.type_alias { T.any(Symbol, String) }
388
+ TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Subscription::Status) }
389
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2007
390
 
2008
- INCLUDES =
2009
- T.let(
2010
- :includes,
2011
- Orb::Subscription::DiscountInterval::Amount::Filter::Operator::TaggedSymbol
2012
- )
2013
- EXCLUDES =
2014
- T.let(
2015
- :excludes,
2016
- Orb::Subscription::DiscountInterval::Amount::Filter::Operator::TaggedSymbol
2017
- )
391
+ ACTIVE = T.let(:active, Orb::Subscription::Status::TaggedSymbol)
392
+ ENDED = T.let(:ended, Orb::Subscription::Status::TaggedSymbol)
393
+ UPCOMING = T.let(:upcoming, Orb::Subscription::Status::TaggedSymbol)
2018
394
 
2019
- sig do
2020
- override.returns(
2021
- T::Array[
2022
- Orb::Subscription::DiscountInterval::Amount::Filter::Operator::TaggedSymbol
2023
- ]
2024
- )
2025
- end
2026
- def self.values
2027
- end
2028
- end
2029
- end
2030
- end
2031
-
2032
- class Percentage < Orb::Internal::Type::BaseModel
2033
- OrHash =
2034
- T.type_alias do
2035
- T.any(
2036
- Orb::Subscription::DiscountInterval::Percentage,
2037
- Orb::Internal::AnyHash
2038
- )
2039
- end
2040
-
2041
- # The price interval ids that this discount interval applies to.
2042
- sig { returns(T::Array[String]) }
2043
- attr_accessor :applies_to_price_interval_ids
2044
-
2045
- sig { returns(Symbol) }
2046
- attr_accessor :discount_type
2047
-
2048
- # The end date of the discount interval.
2049
- sig { returns(T.nilable(Time)) }
2050
- attr_accessor :end_date
2051
-
2052
- # The filters that determine which prices this discount interval applies to.
2053
- sig do
2054
- returns(
2055
- T::Array[Orb::Subscription::DiscountInterval::Percentage::Filter]
2056
- )
2057
- end
2058
- attr_accessor :filters
2059
-
2060
- # Only available if discount_type is `percentage`.This is a number between 0
2061
- # and 1.
2062
- sig { returns(Float) }
2063
- attr_accessor :percentage_discount
2064
-
2065
- # The start date of the discount interval.
2066
- sig { returns(Time) }
2067
- attr_accessor :start_date
2068
-
2069
- sig do
2070
- params(
2071
- applies_to_price_interval_ids: T::Array[String],
2072
- end_date: T.nilable(Time),
2073
- filters:
2074
- T::Array[
2075
- Orb::Subscription::DiscountInterval::Percentage::Filter::OrHash
2076
- ],
2077
- percentage_discount: Float,
2078
- start_date: Time,
2079
- discount_type: Symbol
2080
- ).returns(T.attached_class)
2081
- end
2082
- def self.new(
2083
- # The price interval ids that this discount interval applies to.
2084
- applies_to_price_interval_ids:,
2085
- # The end date of the discount interval.
2086
- end_date:,
2087
- # The filters that determine which prices this discount interval applies to.
2088
- filters:,
2089
- # Only available if discount_type is `percentage`.This is a number between 0
2090
- # and 1.
2091
- percentage_discount:,
2092
- # The start date of the discount interval.
2093
- start_date:,
2094
- discount_type: :percentage
2095
- )
2096
- end
2097
-
2098
- sig do
2099
- override.returns(
2100
- {
2101
- applies_to_price_interval_ids: T::Array[String],
2102
- discount_type: Symbol,
2103
- end_date: T.nilable(Time),
2104
- filters:
2105
- T::Array[
2106
- Orb::Subscription::DiscountInterval::Percentage::Filter
2107
- ],
2108
- percentage_discount: Float,
2109
- start_date: Time
2110
- }
2111
- )
2112
- end
2113
- def to_hash
2114
- end
2115
-
2116
- class Filter < Orb::Internal::Type::BaseModel
2117
- OrHash =
2118
- T.type_alias do
2119
- T.any(
2120
- Orb::Subscription::DiscountInterval::Percentage::Filter,
2121
- Orb::Internal::AnyHash
2122
- )
2123
- end
2124
-
2125
- # The property of the price to filter on.
2126
- sig do
2127
- returns(
2128
- Orb::Subscription::DiscountInterval::Percentage::Filter::Field::TaggedSymbol
2129
- )
2130
- end
2131
- attr_accessor :field
2132
-
2133
- # Should prices that match the filter be included or excluded.
2134
- sig do
2135
- returns(
2136
- Orb::Subscription::DiscountInterval::Percentage::Filter::Operator::TaggedSymbol
2137
- )
2138
- end
2139
- attr_accessor :operator
2140
-
2141
- # The IDs or values that match this filter.
2142
- sig { returns(T::Array[String]) }
2143
- attr_accessor :values
2144
-
2145
- sig do
2146
- params(
2147
- field:
2148
- Orb::Subscription::DiscountInterval::Percentage::Filter::Field::OrSymbol,
2149
- operator:
2150
- Orb::Subscription::DiscountInterval::Percentage::Filter::Operator::OrSymbol,
2151
- values: T::Array[String]
2152
- ).returns(T.attached_class)
2153
- end
2154
- def self.new(
2155
- # The property of the price to filter on.
2156
- field:,
2157
- # Should prices that match the filter be included or excluded.
2158
- operator:,
2159
- # The IDs or values that match this filter.
2160
- values:
2161
- )
2162
- end
2163
-
2164
- sig do
2165
- override.returns(
2166
- {
2167
- field:
2168
- Orb::Subscription::DiscountInterval::Percentage::Filter::Field::TaggedSymbol,
2169
- operator:
2170
- Orb::Subscription::DiscountInterval::Percentage::Filter::Operator::TaggedSymbol,
2171
- values: T::Array[String]
2172
- }
2173
- )
2174
- end
2175
- def to_hash
2176
- end
2177
-
2178
- # The property of the price to filter on.
2179
- module Field
2180
- extend Orb::Internal::Type::Enum
2181
-
2182
- TaggedSymbol =
2183
- T.type_alias do
2184
- T.all(
2185
- Symbol,
2186
- Orb::Subscription::DiscountInterval::Percentage::Filter::Field
2187
- )
2188
- end
2189
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2190
-
2191
- PRICE_ID =
2192
- T.let(
2193
- :price_id,
2194
- Orb::Subscription::DiscountInterval::Percentage::Filter::Field::TaggedSymbol
2195
- )
2196
- ITEM_ID =
2197
- T.let(
2198
- :item_id,
2199
- Orb::Subscription::DiscountInterval::Percentage::Filter::Field::TaggedSymbol
2200
- )
2201
- PRICE_TYPE =
2202
- T.let(
2203
- :price_type,
2204
- Orb::Subscription::DiscountInterval::Percentage::Filter::Field::TaggedSymbol
2205
- )
2206
- CURRENCY =
2207
- T.let(
2208
- :currency,
2209
- Orb::Subscription::DiscountInterval::Percentage::Filter::Field::TaggedSymbol
2210
- )
2211
- PRICING_UNIT_ID =
2212
- T.let(
2213
- :pricing_unit_id,
2214
- Orb::Subscription::DiscountInterval::Percentage::Filter::Field::TaggedSymbol
2215
- )
2216
-
2217
- sig do
2218
- override.returns(
2219
- T::Array[
2220
- Orb::Subscription::DiscountInterval::Percentage::Filter::Field::TaggedSymbol
2221
- ]
2222
- )
2223
- end
2224
- def self.values
2225
- end
2226
- end
2227
-
2228
- # Should prices that match the filter be included or excluded.
2229
- module Operator
2230
- extend Orb::Internal::Type::Enum
2231
-
2232
- TaggedSymbol =
2233
- T.type_alias do
2234
- T.all(
2235
- Symbol,
2236
- Orb::Subscription::DiscountInterval::Percentage::Filter::Operator
2237
- )
2238
- end
2239
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2240
-
2241
- INCLUDES =
2242
- T.let(
2243
- :includes,
2244
- Orb::Subscription::DiscountInterval::Percentage::Filter::Operator::TaggedSymbol
2245
- )
2246
- EXCLUDES =
2247
- T.let(
2248
- :excludes,
2249
- Orb::Subscription::DiscountInterval::Percentage::Filter::Operator::TaggedSymbol
2250
- )
2251
-
2252
- sig do
2253
- override.returns(
2254
- T::Array[
2255
- Orb::Subscription::DiscountInterval::Percentage::Filter::Operator::TaggedSymbol
2256
- ]
2257
- )
2258
- end
2259
- def self.values
2260
- end
2261
- end
2262
- end
2263
- end
2264
-
2265
- class Usage < Orb::Internal::Type::BaseModel
2266
- OrHash =
2267
- T.type_alias do
2268
- T.any(
2269
- Orb::Subscription::DiscountInterval::Usage,
2270
- Orb::Internal::AnyHash
2271
- )
2272
- end
2273
-
2274
- # The price interval ids that this discount interval applies to.
2275
- sig { returns(T::Array[String]) }
2276
- attr_accessor :applies_to_price_interval_ids
2277
-
2278
- sig { returns(Symbol) }
2279
- attr_accessor :discount_type
2280
-
2281
- # The end date of the discount interval.
2282
- sig { returns(T.nilable(Time)) }
2283
- attr_accessor :end_date
2284
-
2285
- # The filters that determine which prices this discount interval applies to.
2286
- sig do
2287
- returns(
2288
- T::Array[Orb::Subscription::DiscountInterval::Usage::Filter]
2289
- )
2290
- end
2291
- attr_accessor :filters
2292
-
2293
- # The start date of the discount interval.
2294
- sig { returns(Time) }
2295
- attr_accessor :start_date
2296
-
2297
- # Only available if discount_type is `usage`. Number of usage units that this
2298
- # discount is for
2299
- sig { returns(Float) }
2300
- attr_accessor :usage_discount
2301
-
2302
- sig do
2303
- params(
2304
- applies_to_price_interval_ids: T::Array[String],
2305
- end_date: T.nilable(Time),
2306
- filters:
2307
- T::Array[
2308
- Orb::Subscription::DiscountInterval::Usage::Filter::OrHash
2309
- ],
2310
- start_date: Time,
2311
- usage_discount: Float,
2312
- discount_type: Symbol
2313
- ).returns(T.attached_class)
2314
- end
2315
- def self.new(
2316
- # The price interval ids that this discount interval applies to.
2317
- applies_to_price_interval_ids:,
2318
- # The end date of the discount interval.
2319
- end_date:,
2320
- # The filters that determine which prices this discount interval applies to.
2321
- filters:,
2322
- # The start date of the discount interval.
2323
- start_date:,
2324
- # Only available if discount_type is `usage`. Number of usage units that this
2325
- # discount is for
2326
- usage_discount:,
2327
- discount_type: :usage
2328
- )
2329
- end
2330
-
2331
- sig do
2332
- override.returns(
2333
- {
2334
- applies_to_price_interval_ids: T::Array[String],
2335
- discount_type: Symbol,
2336
- end_date: T.nilable(Time),
2337
- filters:
2338
- T::Array[Orb::Subscription::DiscountInterval::Usage::Filter],
2339
- start_date: Time,
2340
- usage_discount: Float
2341
- }
2342
- )
2343
- end
2344
- def to_hash
2345
- end
2346
-
2347
- class Filter < Orb::Internal::Type::BaseModel
2348
- OrHash =
2349
- T.type_alias do
2350
- T.any(
2351
- Orb::Subscription::DiscountInterval::Usage::Filter,
2352
- Orb::Internal::AnyHash
2353
- )
2354
- end
2355
-
2356
- # The property of the price to filter on.
2357
- sig do
2358
- returns(
2359
- Orb::Subscription::DiscountInterval::Usage::Filter::Field::TaggedSymbol
2360
- )
2361
- end
2362
- attr_accessor :field
2363
-
2364
- # Should prices that match the filter be included or excluded.
2365
- sig do
2366
- returns(
2367
- Orb::Subscription::DiscountInterval::Usage::Filter::Operator::TaggedSymbol
2368
- )
2369
- end
2370
- attr_accessor :operator
2371
-
2372
- # The IDs or values that match this filter.
2373
- sig { returns(T::Array[String]) }
2374
- attr_accessor :values
2375
-
2376
- sig do
2377
- params(
2378
- field:
2379
- Orb::Subscription::DiscountInterval::Usage::Filter::Field::OrSymbol,
2380
- operator:
2381
- Orb::Subscription::DiscountInterval::Usage::Filter::Operator::OrSymbol,
2382
- values: T::Array[String]
2383
- ).returns(T.attached_class)
2384
- end
2385
- def self.new(
2386
- # The property of the price to filter on.
2387
- field:,
2388
- # Should prices that match the filter be included or excluded.
2389
- operator:,
2390
- # The IDs or values that match this filter.
2391
- values:
2392
- )
2393
- end
2394
-
2395
- sig do
2396
- override.returns(
2397
- {
2398
- field:
2399
- Orb::Subscription::DiscountInterval::Usage::Filter::Field::TaggedSymbol,
2400
- operator:
2401
- Orb::Subscription::DiscountInterval::Usage::Filter::Operator::TaggedSymbol,
2402
- values: T::Array[String]
2403
- }
2404
- )
2405
- end
2406
- def to_hash
2407
- end
2408
-
2409
- # The property of the price to filter on.
2410
- module Field
2411
- extend Orb::Internal::Type::Enum
2412
-
2413
- TaggedSymbol =
2414
- T.type_alias do
2415
- T.all(
2416
- Symbol,
2417
- Orb::Subscription::DiscountInterval::Usage::Filter::Field
2418
- )
2419
- end
2420
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2421
-
2422
- PRICE_ID =
2423
- T.let(
2424
- :price_id,
2425
- Orb::Subscription::DiscountInterval::Usage::Filter::Field::TaggedSymbol
2426
- )
2427
- ITEM_ID =
2428
- T.let(
2429
- :item_id,
2430
- Orb::Subscription::DiscountInterval::Usage::Filter::Field::TaggedSymbol
2431
- )
2432
- PRICE_TYPE =
2433
- T.let(
2434
- :price_type,
2435
- Orb::Subscription::DiscountInterval::Usage::Filter::Field::TaggedSymbol
2436
- )
2437
- CURRENCY =
2438
- T.let(
2439
- :currency,
2440
- Orb::Subscription::DiscountInterval::Usage::Filter::Field::TaggedSymbol
2441
- )
2442
- PRICING_UNIT_ID =
2443
- T.let(
2444
- :pricing_unit_id,
2445
- Orb::Subscription::DiscountInterval::Usage::Filter::Field::TaggedSymbol
2446
- )
2447
-
2448
- sig do
2449
- override.returns(
2450
- T::Array[
2451
- Orb::Subscription::DiscountInterval::Usage::Filter::Field::TaggedSymbol
2452
- ]
2453
- )
2454
- end
2455
- def self.values
2456
- end
2457
- end
2458
-
2459
- # Should prices that match the filter be included or excluded.
2460
- module Operator
2461
- extend Orb::Internal::Type::Enum
2462
-
2463
- TaggedSymbol =
2464
- T.type_alias do
2465
- T.all(
2466
- Symbol,
2467
- Orb::Subscription::DiscountInterval::Usage::Filter::Operator
2468
- )
2469
- end
2470
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2471
-
2472
- INCLUDES =
2473
- T.let(
2474
- :includes,
2475
- Orb::Subscription::DiscountInterval::Usage::Filter::Operator::TaggedSymbol
2476
- )
2477
- EXCLUDES =
2478
- T.let(
2479
- :excludes,
2480
- Orb::Subscription::DiscountInterval::Usage::Filter::Operator::TaggedSymbol
2481
- )
2482
-
2483
- sig do
2484
- override.returns(
2485
- T::Array[
2486
- Orb::Subscription::DiscountInterval::Usage::Filter::Operator::TaggedSymbol
2487
- ]
2488
- )
2489
- end
2490
- def self.values
2491
- end
2492
- end
2493
- end
2494
- end
2495
-
2496
- sig do
2497
- override.returns(
2498
- T::Array[Orb::Subscription::DiscountInterval::Variants]
2499
- )
2500
- end
2501
- def self.variants
2502
- end
2503
- end
2504
-
2505
- class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
2506
- OrHash =
2507
- T.type_alias do
2508
- T.any(
2509
- Orb::Subscription::FixedFeeQuantitySchedule,
2510
- Orb::Internal::AnyHash
2511
- )
2512
- end
2513
-
2514
- sig { returns(T.nilable(Time)) }
2515
- attr_accessor :end_date
2516
-
2517
- sig { returns(String) }
2518
- attr_accessor :price_id
2519
-
2520
- sig { returns(Float) }
2521
- attr_accessor :quantity
2522
-
2523
- sig { returns(Time) }
2524
- attr_accessor :start_date
2525
-
2526
- sig do
2527
- params(
2528
- end_date: T.nilable(Time),
2529
- price_id: String,
2530
- quantity: Float,
2531
- start_date: Time
2532
- ).returns(T.attached_class)
2533
- end
2534
- def self.new(end_date:, price_id:, quantity:, start_date:)
2535
- end
2536
-
2537
- sig do
2538
- override.returns(
2539
- {
2540
- end_date: T.nilable(Time),
2541
- price_id: String,
2542
- quantity: Float,
2543
- start_date: Time
2544
- }
2545
- )
2546
- end
2547
- def to_hash
2548
- end
2549
- end
2550
-
2551
- class MaximumInterval < Orb::Internal::Type::BaseModel
2552
- OrHash =
2553
- T.type_alias do
2554
- T.any(Orb::Subscription::MaximumInterval, Orb::Internal::AnyHash)
2555
- end
2556
-
2557
- # The price interval ids that this maximum interval applies to.
2558
- sig { returns(T::Array[String]) }
2559
- attr_accessor :applies_to_price_interval_ids
2560
-
2561
- # The end date of the maximum interval.
2562
- sig { returns(T.nilable(Time)) }
2563
- attr_accessor :end_date
2564
-
2565
- # The filters that determine which prices this maximum interval applies to.
2566
- sig { returns(T::Array[Orb::Subscription::MaximumInterval::Filter]) }
2567
- attr_accessor :filters
2568
-
2569
- # The maximum amount to charge in a given billing period for the price intervals
2570
- # this transform applies to.
2571
- sig { returns(String) }
2572
- attr_accessor :maximum_amount
2573
-
2574
- # The start date of the maximum interval.
2575
- sig { returns(Time) }
2576
- attr_accessor :start_date
2577
-
2578
- sig do
2579
- params(
2580
- applies_to_price_interval_ids: T::Array[String],
2581
- end_date: T.nilable(Time),
2582
- filters:
2583
- T::Array[Orb::Subscription::MaximumInterval::Filter::OrHash],
2584
- maximum_amount: String,
2585
- start_date: Time
2586
- ).returns(T.attached_class)
2587
- end
2588
- def self.new(
2589
- # The price interval ids that this maximum interval applies to.
2590
- applies_to_price_interval_ids:,
2591
- # The end date of the maximum interval.
2592
- end_date:,
2593
- # The filters that determine which prices this maximum interval applies to.
2594
- filters:,
2595
- # The maximum amount to charge in a given billing period for the price intervals
2596
- # this transform applies to.
2597
- maximum_amount:,
2598
- # The start date of the maximum interval.
2599
- start_date:
2600
- )
2601
- end
2602
-
2603
- sig do
2604
- override.returns(
2605
- {
2606
- applies_to_price_interval_ids: T::Array[String],
2607
- end_date: T.nilable(Time),
2608
- filters: T::Array[Orb::Subscription::MaximumInterval::Filter],
2609
- maximum_amount: String,
2610
- start_date: Time
2611
- }
2612
- )
2613
- end
2614
- def to_hash
2615
- end
2616
-
2617
- class Filter < Orb::Internal::Type::BaseModel
2618
- OrHash =
2619
- T.type_alias do
2620
- T.any(
2621
- Orb::Subscription::MaximumInterval::Filter,
2622
- Orb::Internal::AnyHash
2623
- )
2624
- end
2625
-
2626
- # The property of the price to filter on.
2627
- sig do
2628
- returns(
2629
- Orb::Subscription::MaximumInterval::Filter::Field::TaggedSymbol
2630
- )
2631
- end
2632
- attr_accessor :field
2633
-
2634
- # Should prices that match the filter be included or excluded.
2635
- sig do
2636
- returns(
2637
- Orb::Subscription::MaximumInterval::Filter::Operator::TaggedSymbol
2638
- )
2639
- end
2640
- attr_accessor :operator
2641
-
2642
- # The IDs or values that match this filter.
2643
- sig { returns(T::Array[String]) }
2644
- attr_accessor :values
2645
-
2646
- sig do
2647
- params(
2648
- field:
2649
- Orb::Subscription::MaximumInterval::Filter::Field::OrSymbol,
2650
- operator:
2651
- Orb::Subscription::MaximumInterval::Filter::Operator::OrSymbol,
2652
- values: T::Array[String]
2653
- ).returns(T.attached_class)
2654
- end
2655
- def self.new(
2656
- # The property of the price to filter on.
2657
- field:,
2658
- # Should prices that match the filter be included or excluded.
2659
- operator:,
2660
- # The IDs or values that match this filter.
2661
- values:
2662
- )
2663
- end
2664
-
2665
- sig do
2666
- override.returns(
2667
- {
2668
- field:
2669
- Orb::Subscription::MaximumInterval::Filter::Field::TaggedSymbol,
2670
- operator:
2671
- Orb::Subscription::MaximumInterval::Filter::Operator::TaggedSymbol,
2672
- values: T::Array[String]
2673
- }
2674
- )
2675
- end
2676
- def to_hash
2677
- end
2678
-
2679
- # The property of the price to filter on.
2680
- module Field
2681
- extend Orb::Internal::Type::Enum
2682
-
2683
- TaggedSymbol =
2684
- T.type_alias do
2685
- T.all(Symbol, Orb::Subscription::MaximumInterval::Filter::Field)
2686
- end
2687
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2688
-
2689
- PRICE_ID =
2690
- T.let(
2691
- :price_id,
2692
- Orb::Subscription::MaximumInterval::Filter::Field::TaggedSymbol
2693
- )
2694
- ITEM_ID =
2695
- T.let(
2696
- :item_id,
2697
- Orb::Subscription::MaximumInterval::Filter::Field::TaggedSymbol
2698
- )
2699
- PRICE_TYPE =
2700
- T.let(
2701
- :price_type,
2702
- Orb::Subscription::MaximumInterval::Filter::Field::TaggedSymbol
2703
- )
2704
- CURRENCY =
2705
- T.let(
2706
- :currency,
2707
- Orb::Subscription::MaximumInterval::Filter::Field::TaggedSymbol
2708
- )
2709
- PRICING_UNIT_ID =
2710
- T.let(
2711
- :pricing_unit_id,
2712
- Orb::Subscription::MaximumInterval::Filter::Field::TaggedSymbol
2713
- )
2714
-
2715
- sig do
2716
- override.returns(
2717
- T::Array[
2718
- Orb::Subscription::MaximumInterval::Filter::Field::TaggedSymbol
2719
- ]
2720
- )
2721
- end
2722
- def self.values
2723
- end
2724
- end
2725
-
2726
- # Should prices that match the filter be included or excluded.
2727
- module Operator
2728
- extend Orb::Internal::Type::Enum
2729
-
2730
- TaggedSymbol =
2731
- T.type_alias do
2732
- T.all(
2733
- Symbol,
2734
- Orb::Subscription::MaximumInterval::Filter::Operator
2735
- )
2736
- end
2737
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2738
-
2739
- INCLUDES =
2740
- T.let(
2741
- :includes,
2742
- Orb::Subscription::MaximumInterval::Filter::Operator::TaggedSymbol
2743
- )
2744
- EXCLUDES =
2745
- T.let(
2746
- :excludes,
2747
- Orb::Subscription::MaximumInterval::Filter::Operator::TaggedSymbol
2748
- )
2749
-
2750
- sig do
2751
- override.returns(
2752
- T::Array[
2753
- Orb::Subscription::MaximumInterval::Filter::Operator::TaggedSymbol
2754
- ]
2755
- )
2756
- end
2757
- def self.values
2758
- end
2759
- end
2760
- end
2761
- end
2762
-
2763
- class MinimumInterval < Orb::Internal::Type::BaseModel
2764
- OrHash =
2765
- T.type_alias do
2766
- T.any(Orb::Subscription::MinimumInterval, Orb::Internal::AnyHash)
2767
- end
2768
-
2769
- # The price interval ids that this minimum interval applies to.
2770
- sig { returns(T::Array[String]) }
2771
- attr_accessor :applies_to_price_interval_ids
2772
-
2773
- # The end date of the minimum interval.
2774
- sig { returns(T.nilable(Time)) }
2775
- attr_accessor :end_date
2776
-
2777
- # The filters that determine which prices this minimum interval applies to.
2778
- sig { returns(T::Array[Orb::Subscription::MinimumInterval::Filter]) }
2779
- attr_accessor :filters
2780
-
2781
- # The minimum amount to charge in a given billing period for the price intervals
2782
- # this minimum applies to.
2783
- sig { returns(String) }
2784
- attr_accessor :minimum_amount
2785
-
2786
- # The start date of the minimum interval.
2787
- sig { returns(Time) }
2788
- attr_accessor :start_date
2789
-
2790
- sig do
2791
- params(
2792
- applies_to_price_interval_ids: T::Array[String],
2793
- end_date: T.nilable(Time),
2794
- filters:
2795
- T::Array[Orb::Subscription::MinimumInterval::Filter::OrHash],
2796
- minimum_amount: String,
2797
- start_date: Time
2798
- ).returns(T.attached_class)
2799
- end
2800
- def self.new(
2801
- # The price interval ids that this minimum interval applies to.
2802
- applies_to_price_interval_ids:,
2803
- # The end date of the minimum interval.
2804
- end_date:,
2805
- # The filters that determine which prices this minimum interval applies to.
2806
- filters:,
2807
- # The minimum amount to charge in a given billing period for the price intervals
2808
- # this minimum applies to.
2809
- minimum_amount:,
2810
- # The start date of the minimum interval.
2811
- start_date:
2812
- )
2813
- end
2814
-
2815
- sig do
2816
- override.returns(
2817
- {
2818
- applies_to_price_interval_ids: T::Array[String],
2819
- end_date: T.nilable(Time),
2820
- filters: T::Array[Orb::Subscription::MinimumInterval::Filter],
2821
- minimum_amount: String,
2822
- start_date: Time
2823
- }
2824
- )
2825
- end
2826
- def to_hash
2827
- end
2828
-
2829
- class Filter < Orb::Internal::Type::BaseModel
2830
- OrHash =
2831
- T.type_alias do
2832
- T.any(
2833
- Orb::Subscription::MinimumInterval::Filter,
2834
- Orb::Internal::AnyHash
2835
- )
2836
- end
2837
-
2838
- # The property of the price to filter on.
2839
- sig do
2840
- returns(
2841
- Orb::Subscription::MinimumInterval::Filter::Field::TaggedSymbol
2842
- )
2843
- end
2844
- attr_accessor :field
2845
-
2846
- # Should prices that match the filter be included or excluded.
2847
- sig do
2848
- returns(
2849
- Orb::Subscription::MinimumInterval::Filter::Operator::TaggedSymbol
2850
- )
2851
- end
2852
- attr_accessor :operator
2853
-
2854
- # The IDs or values that match this filter.
2855
- sig { returns(T::Array[String]) }
2856
- attr_accessor :values
2857
-
2858
- sig do
2859
- params(
2860
- field:
2861
- Orb::Subscription::MinimumInterval::Filter::Field::OrSymbol,
2862
- operator:
2863
- Orb::Subscription::MinimumInterval::Filter::Operator::OrSymbol,
2864
- values: T::Array[String]
2865
- ).returns(T.attached_class)
2866
- end
2867
- def self.new(
2868
- # The property of the price to filter on.
2869
- field:,
2870
- # Should prices that match the filter be included or excluded.
2871
- operator:,
2872
- # The IDs or values that match this filter.
2873
- values:
2874
- )
2875
- end
2876
-
2877
- sig do
2878
- override.returns(
2879
- {
2880
- field:
2881
- Orb::Subscription::MinimumInterval::Filter::Field::TaggedSymbol,
2882
- operator:
2883
- Orb::Subscription::MinimumInterval::Filter::Operator::TaggedSymbol,
2884
- values: T::Array[String]
2885
- }
2886
- )
2887
- end
2888
- def to_hash
2889
- end
2890
-
2891
- # The property of the price to filter on.
2892
- module Field
2893
- extend Orb::Internal::Type::Enum
2894
-
2895
- TaggedSymbol =
2896
- T.type_alias do
2897
- T.all(Symbol, Orb::Subscription::MinimumInterval::Filter::Field)
2898
- end
2899
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2900
-
2901
- PRICE_ID =
2902
- T.let(
2903
- :price_id,
2904
- Orb::Subscription::MinimumInterval::Filter::Field::TaggedSymbol
2905
- )
2906
- ITEM_ID =
2907
- T.let(
2908
- :item_id,
2909
- Orb::Subscription::MinimumInterval::Filter::Field::TaggedSymbol
2910
- )
2911
- PRICE_TYPE =
2912
- T.let(
2913
- :price_type,
2914
- Orb::Subscription::MinimumInterval::Filter::Field::TaggedSymbol
2915
- )
2916
- CURRENCY =
2917
- T.let(
2918
- :currency,
2919
- Orb::Subscription::MinimumInterval::Filter::Field::TaggedSymbol
2920
- )
2921
- PRICING_UNIT_ID =
2922
- T.let(
2923
- :pricing_unit_id,
2924
- Orb::Subscription::MinimumInterval::Filter::Field::TaggedSymbol
2925
- )
2926
-
2927
- sig do
2928
- override.returns(
2929
- T::Array[
2930
- Orb::Subscription::MinimumInterval::Filter::Field::TaggedSymbol
2931
- ]
2932
- )
2933
- end
2934
- def self.values
2935
- end
2936
- end
2937
-
2938
- # Should prices that match the filter be included or excluded.
2939
- module Operator
2940
- extend Orb::Internal::Type::Enum
2941
-
2942
- TaggedSymbol =
2943
- T.type_alias do
2944
- T.all(
2945
- Symbol,
2946
- Orb::Subscription::MinimumInterval::Filter::Operator
2947
- )
2948
- end
2949
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2950
-
2951
- INCLUDES =
2952
- T.let(
2953
- :includes,
2954
- Orb::Subscription::MinimumInterval::Filter::Operator::TaggedSymbol
2955
- )
2956
- EXCLUDES =
2957
- T.let(
2958
- :excludes,
2959
- Orb::Subscription::MinimumInterval::Filter::Operator::TaggedSymbol
2960
- )
2961
-
2962
- sig do
2963
- override.returns(
2964
- T::Array[
2965
- Orb::Subscription::MinimumInterval::Filter::Operator::TaggedSymbol
2966
- ]
2967
- )
2968
- end
2969
- def self.values
2970
- end
2971
- end
2972
- end
2973
- end
2974
-
2975
- class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
2976
- OrHash =
2977
- T.type_alias do
2978
- T.any(
2979
- Orb::Subscription::PendingSubscriptionChange,
2980
- Orb::Internal::AnyHash
2981
- )
2982
- end
2983
-
2984
- sig { returns(String) }
2985
- attr_accessor :id
2986
-
2987
- # A pending subscription change if one exists on this subscription.
2988
- sig { params(id: String).returns(T.attached_class) }
2989
- def self.new(id:)
2990
- end
2991
-
2992
- sig { override.returns({ id: String }) }
2993
- def to_hash
2994
- end
2995
- end
2996
-
2997
- class PriceInterval < Orb::Internal::Type::BaseModel
2998
- OrHash =
2999
- T.type_alias do
3000
- T.any(Orb::Subscription::PriceInterval, Orb::Internal::AnyHash)
3001
- end
3002
-
3003
- sig { returns(String) }
3004
- attr_accessor :id
3005
-
3006
- # The day of the month that Orb bills for this price
3007
- sig { returns(Integer) }
3008
- attr_accessor :billing_cycle_day
3009
-
3010
- # The end of the current billing period. This is an exclusive timestamp, such that
3011
- # the instant returned is exactly the end of the billing period. Set to null if
3012
- # this price interval is not currently active.
3013
- sig { returns(T.nilable(Time)) }
3014
- attr_accessor :current_billing_period_end_date
3015
-
3016
- # The start date of the current billing period. This is an inclusive timestamp;
3017
- # the instant returned is exactly the beginning of the billing period. Set to null
3018
- # if this price interval is not currently active.
3019
- sig { returns(T.nilable(Time)) }
3020
- attr_accessor :current_billing_period_start_date
3021
-
3022
- # The end date of the price interval. This is the date that Orb stops billing for
3023
- # this price.
3024
- sig { returns(T.nilable(Time)) }
3025
- attr_accessor :end_date
3026
-
3027
- # An additional filter to apply to usage queries.
3028
- sig { returns(T.nilable(String)) }
3029
- attr_accessor :filter
3030
-
3031
- # The fixed fee quantity transitions for this price interval. This is only
3032
- # relevant for fixed fees.
3033
- sig do
3034
- returns(
3035
- T.nilable(
3036
- T::Array[
3037
- Orb::Subscription::PriceInterval::FixedFeeQuantityTransition
3038
- ]
3039
- )
3040
- )
3041
- end
3042
- attr_accessor :fixed_fee_quantity_transitions
3043
-
3044
- # The Price resource represents a price that can be billed on a subscription,
3045
- # resulting in a charge on an invoice in the form of an invoice line item. Prices
3046
- # take a quantity and determine an amount to bill.
3047
- #
3048
- # Orb supports a few different pricing models out of the box. Each of these models
3049
- # is serialized differently in a given Price object. The model_type field
3050
- # determines the key for the configuration object that is present.
3051
- #
3052
- # For more on the types of prices, see
3053
- # [the core concepts documentation](/core-concepts#plan-and-price)
3054
- sig { returns(Orb::Price::Variants) }
3055
- attr_accessor :price
3056
-
3057
- # The start date of the price interval. This is the date that Orb starts billing
3058
- # for this price.
3059
- sig { returns(Time) }
3060
- attr_accessor :start_date
3061
-
3062
- # A list of customer IDs whose usage events will be aggregated and billed under
3063
- # this price interval.
3064
- sig { returns(T.nilable(T::Array[String])) }
3065
- attr_accessor :usage_customer_ids
3066
-
3067
- # The Price Interval resource represents a period of time for which a price will
3068
- # bill on a subscription. A subscription’s price intervals define its billing
3069
- # behavior.
3070
- sig do
3071
- params(
3072
- id: String,
3073
- billing_cycle_day: Integer,
3074
- current_billing_period_end_date: T.nilable(Time),
3075
- current_billing_period_start_date: T.nilable(Time),
3076
- end_date: T.nilable(Time),
3077
- filter: T.nilable(String),
3078
- fixed_fee_quantity_transitions:
3079
- T.nilable(
3080
- T::Array[
3081
- Orb::Subscription::PriceInterval::FixedFeeQuantityTransition::OrHash
3082
- ]
3083
- ),
3084
- price:
3085
- T.any(
3086
- Orb::Price::Unit::OrHash,
3087
- Orb::Price::Package::OrHash,
3088
- Orb::Price::Matrix::OrHash,
3089
- Orb::Price::Tiered::OrHash,
3090
- Orb::Price::TieredBps::OrHash,
3091
- Orb::Price::Bps::OrHash,
3092
- Orb::Price::BulkBps::OrHash,
3093
- Orb::Price::Bulk::OrHash,
3094
- Orb::Price::ThresholdTotalAmount::OrHash,
3095
- Orb::Price::TieredPackage::OrHash,
3096
- Orb::Price::GroupedTiered::OrHash,
3097
- Orb::Price::TieredWithMinimum::OrHash,
3098
- Orb::Price::TieredPackageWithMinimum::OrHash,
3099
- Orb::Price::PackageWithAllocation::OrHash,
3100
- Orb::Price::UnitWithPercent::OrHash,
3101
- Orb::Price::MatrixWithAllocation::OrHash,
3102
- Orb::Price::TieredWithProration::OrHash,
3103
- Orb::Price::UnitWithProration::OrHash,
3104
- Orb::Price::GroupedAllocation::OrHash,
3105
- Orb::Price::GroupedWithProratedMinimum::OrHash,
3106
- Orb::Price::GroupedWithMeteredMinimum::OrHash,
3107
- Orb::Price::MatrixWithDisplayName::OrHash,
3108
- Orb::Price::BulkWithProration::OrHash,
3109
- Orb::Price::GroupedTieredPackage::OrHash,
3110
- Orb::Price::MaxGroupTieredPackage::OrHash,
3111
- Orb::Price::ScalableMatrixWithUnitPricing::OrHash,
3112
- Orb::Price::ScalableMatrixWithTieredPricing::OrHash,
3113
- Orb::Price::CumulativeGroupedBulk::OrHash
3114
- ),
3115
- start_date: Time,
3116
- usage_customer_ids: T.nilable(T::Array[String])
3117
- ).returns(T.attached_class)
3118
- end
3119
- def self.new(
3120
- id:,
3121
- # The day of the month that Orb bills for this price
3122
- billing_cycle_day:,
3123
- # The end of the current billing period. This is an exclusive timestamp, such that
3124
- # the instant returned is exactly the end of the billing period. Set to null if
3125
- # this price interval is not currently active.
3126
- current_billing_period_end_date:,
3127
- # The start date of the current billing period. This is an inclusive timestamp;
3128
- # the instant returned is exactly the beginning of the billing period. Set to null
3129
- # if this price interval is not currently active.
3130
- current_billing_period_start_date:,
3131
- # The end date of the price interval. This is the date that Orb stops billing for
3132
- # this price.
3133
- end_date:,
3134
- # An additional filter to apply to usage queries.
3135
- filter:,
3136
- # The fixed fee quantity transitions for this price interval. This is only
3137
- # relevant for fixed fees.
3138
- fixed_fee_quantity_transitions:,
3139
- # The Price resource represents a price that can be billed on a subscription,
3140
- # resulting in a charge on an invoice in the form of an invoice line item. Prices
3141
- # take a quantity and determine an amount to bill.
3142
- #
3143
- # Orb supports a few different pricing models out of the box. Each of these models
3144
- # is serialized differently in a given Price object. The model_type field
3145
- # determines the key for the configuration object that is present.
3146
- #
3147
- # For more on the types of prices, see
3148
- # [the core concepts documentation](/core-concepts#plan-and-price)
3149
- price:,
3150
- # The start date of the price interval. This is the date that Orb starts billing
3151
- # for this price.
3152
- start_date:,
3153
- # A list of customer IDs whose usage events will be aggregated and billed under
3154
- # this price interval.
3155
- usage_customer_ids:
3156
- )
3157
- end
3158
-
3159
- sig do
3160
- override.returns(
3161
- {
3162
- id: String,
3163
- billing_cycle_day: Integer,
3164
- current_billing_period_end_date: T.nilable(Time),
3165
- current_billing_period_start_date: T.nilable(Time),
3166
- end_date: T.nilable(Time),
3167
- filter: T.nilable(String),
3168
- fixed_fee_quantity_transitions:
3169
- T.nilable(
3170
- T::Array[
3171
- Orb::Subscription::PriceInterval::FixedFeeQuantityTransition
3172
- ]
3173
- ),
3174
- price: Orb::Price::Variants,
3175
- start_date: Time,
3176
- usage_customer_ids: T.nilable(T::Array[String])
3177
- }
3178
- )
3179
- end
3180
- def to_hash
3181
- end
3182
-
3183
- class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
3184
- OrHash =
3185
- T.type_alias do
3186
- T.any(
3187
- Orb::Subscription::PriceInterval::FixedFeeQuantityTransition,
3188
- Orb::Internal::AnyHash
3189
- )
3190
- end
3191
-
3192
- sig { returns(Time) }
3193
- attr_accessor :effective_date
3194
-
3195
- sig { returns(String) }
3196
- attr_accessor :price_id
3197
-
3198
- sig { returns(Integer) }
3199
- attr_accessor :quantity
3200
-
3201
- sig do
3202
- params(
3203
- effective_date: Time,
3204
- price_id: String,
3205
- quantity: Integer
3206
- ).returns(T.attached_class)
3207
- end
3208
- def self.new(effective_date:, price_id:, quantity:)
3209
- end
3210
-
3211
- sig do
3212
- override.returns(
3213
- { effective_date: Time, price_id: String, quantity: Integer }
3214
- )
3215
- end
3216
- def to_hash
3217
- end
3218
- end
3219
- end
3220
-
3221
- class RedeemedCoupon < Orb::Internal::Type::BaseModel
3222
- OrHash =
3223
- T.type_alias do
3224
- T.any(Orb::Subscription::RedeemedCoupon, Orb::Internal::AnyHash)
3225
- end
3226
-
3227
- sig { returns(String) }
3228
- attr_accessor :coupon_id
3229
-
3230
- sig { returns(T.nilable(Time)) }
3231
- attr_accessor :end_date
3232
-
3233
- sig { returns(Time) }
3234
- attr_accessor :start_date
3235
-
3236
- sig do
3237
- params(
3238
- coupon_id: String,
3239
- end_date: T.nilable(Time),
3240
- start_date: Time
3241
- ).returns(T.attached_class)
3242
- end
3243
- def self.new(coupon_id:, end_date:, start_date:)
3244
- end
3245
-
3246
- sig do
3247
- override.returns(
3248
- { coupon_id: String, end_date: T.nilable(Time), start_date: Time }
3249
- )
3250
- end
3251
- def to_hash
3252
- end
3253
- end
3254
-
3255
- module Status
3256
- extend Orb::Internal::Type::Enum
3257
-
3258
- TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Subscription::Status) }
3259
- OrSymbol = T.type_alias { T.any(Symbol, String) }
3260
-
3261
- ACTIVE = T.let(:active, Orb::Subscription::Status::TaggedSymbol)
3262
- ENDED = T.let(:ended, Orb::Subscription::Status::TaggedSymbol)
3263
- UPCOMING = T.let(:upcoming, Orb::Subscription::Status::TaggedSymbol)
3264
-
3265
- sig do
3266
- override.returns(T::Array[Orb::Subscription::Status::TaggedSymbol])
395
+ sig do
396
+ override.returns(T::Array[Orb::Subscription::Status::TaggedSymbol])
3267
397
  end
3268
398
  def self.values
3269
399
  end
3270
400
  end
3271
-
3272
- class TrialInfo < Orb::Internal::Type::BaseModel
3273
- OrHash =
3274
- T.type_alias do
3275
- T.any(Orb::Subscription::TrialInfo, Orb::Internal::AnyHash)
3276
- end
3277
-
3278
- sig { returns(T.nilable(Time)) }
3279
- attr_accessor :end_date
3280
-
3281
- sig { params(end_date: T.nilable(Time)).returns(T.attached_class) }
3282
- def self.new(end_date:)
3283
- end
3284
-
3285
- sig { override.returns({ end_date: T.nilable(Time) }) }
3286
- def to_hash
3287
- end
3288
- end
3289
401
  end
3290
402
  end
3291
403
  end