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