orb-billing 0.11.0 → 1.0.0

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