orb-billing 0.12.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (740) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/README.md +1 -1
  4. data/lib/orb/internal/type/base_model.rb +5 -5
  5. data/lib/orb/models/accounting_provider_config.rb +21 -0
  6. data/lib/orb/models/address.rb +45 -0
  7. data/lib/orb/models/address_input.rb +45 -0
  8. data/lib/orb/models/adjustment_interval.rb +66 -0
  9. data/lib/orb/models/aggregated_cost.rb +45 -0
  10. data/lib/orb/models/alert.rb +9 -60
  11. data/lib/orb/models/alert_create_for_customer_params.rb +3 -24
  12. data/lib/orb/models/alert_create_for_external_customer_params.rb +3 -24
  13. data/lib/orb/models/alert_create_for_subscription_params.rb +3 -23
  14. data/lib/orb/models/alert_update_params.rb +3 -22
  15. data/lib/orb/models/allocation.rb +27 -0
  16. data/lib/orb/models/amount_discount.rb +3 -59
  17. data/lib/orb/models/amount_discount_interval.rb +65 -0
  18. data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +193 -19201
  19. data/lib/orb/models/beta_create_plan_version_params.rb +183 -19025
  20. data/lib/orb/models/billable_metric_tiny.rb +15 -0
  21. data/lib/orb/models/billing_cycle_anchor_configuration.rb +41 -0
  22. data/lib/orb/models/billing_cycle_configuration.rb +32 -0
  23. data/lib/orb/models/bps_config.rb +24 -0
  24. data/lib/orb/models/bps_tier.rb +40 -0
  25. data/lib/orb/models/bulk_bps_config.rb +20 -0
  26. data/lib/orb/models/bulk_bps_tier.rb +32 -0
  27. data/lib/orb/models/bulk_config.rb +16 -0
  28. data/lib/orb/models/bulk_tier.rb +24 -0
  29. data/lib/orb/models/changed_subscription_resources.rb +40 -0
  30. data/lib/orb/models/conversion_rate_tier.rb +32 -0
  31. data/lib/orb/models/conversion_rate_tiered_config.rb +16 -0
  32. data/lib/orb/models/conversion_rate_unit_config.rb +16 -0
  33. data/lib/orb/models/coupon_redemption.rb +27 -0
  34. data/lib/orb/models/credit_note.rb +6 -51
  35. data/lib/orb/models/credit_note_tiny.rb +16 -0
  36. data/lib/orb/models/custom_expiration.rb +32 -0
  37. data/lib/orb/models/customer.rb +15 -426
  38. data/lib/orb/models/customer_create_params.rb +24 -527
  39. data/lib/orb/models/customer_hierarchy_config.rb +29 -0
  40. data/lib/orb/models/customer_minified.rb +21 -0
  41. data/lib/orb/models/customer_tax_id.rb +300 -0
  42. data/lib/orb/models/customer_update_by_external_id_params.rb +24 -529
  43. data/lib/orb/models/customer_update_params.rb +24 -527
  44. data/lib/orb/models/customers/balance_transaction_create_response.rb +6 -32
  45. data/lib/orb/models/customers/balance_transaction_list_response.rb +6 -32
  46. data/lib/orb/models/customers/cost_list_by_external_id_response.rb +3 -88
  47. data/lib/orb/models/customers/cost_list_response.rb +3 -87
  48. data/lib/orb/models/customers/credits/affected_block.rb +31 -0
  49. data/lib/orb/models/customers/credits/amendment_ledger_entry.rb +131 -0
  50. data/lib/orb/models/customers/credits/credit_block_expiry_ledger_entry.rb +137 -0
  51. data/lib/orb/models/customers/credits/decrement_ledger_entry.rb +152 -0
  52. data/lib/orb/models/customers/credits/expiration_change_ledger_entry.rb +141 -0
  53. data/lib/orb/models/customers/credits/increment_ledger_entry.rb +139 -0
  54. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +8 -1177
  55. data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +8 -1169
  56. data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +8 -1173
  57. data/lib/orb/models/customers/credits/ledger_list_response.rb +8 -1161
  58. data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +3 -52
  59. data/lib/orb/models/customers/credits/top_up_create_response.rb +3 -51
  60. data/lib/orb/models/customers/credits/top_up_invoice_settings.rb +53 -0
  61. data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +3 -52
  62. data/lib/orb/models/customers/credits/top_up_list_response.rb +3 -51
  63. data/lib/orb/models/customers/credits/void_initiated_ledger_entry.rb +152 -0
  64. data/lib/orb/models/customers/credits/void_ledger_entry.rb +145 -0
  65. data/lib/orb/models/dimensional_price_configuration.rb +21 -0
  66. data/lib/orb/models/discount_override.rb +56 -0
  67. data/lib/orb/models/fixed_fee_quantity_schedule_entry.rb +33 -0
  68. data/lib/orb/models/fixed_fee_quantity_transition.rb +27 -0
  69. data/lib/orb/models/invoice.rb +56 -1777
  70. data/lib/orb/models/invoice_create_params.rb +3 -15
  71. data/lib/orb/models/invoice_fetch_upcoming_response.rb +56 -1794
  72. data/lib/orb/models/invoice_line_item_create_response.rb +25 -1142
  73. data/lib/orb/models/invoice_tiny.rb +16 -0
  74. data/lib/orb/models/item_slim.rb +21 -0
  75. data/lib/orb/models/matrix_config.rb +32 -0
  76. data/lib/orb/models/matrix_sub_line_item.rb +61 -0
  77. data/lib/orb/models/matrix_value.rb +29 -0
  78. data/lib/orb/models/matrix_with_allocation_config.rb +40 -0
  79. data/lib/orb/models/maximum.rb +38 -0
  80. data/lib/orb/models/maximum_interval.rb +52 -0
  81. data/lib/orb/models/minimum.rb +38 -0
  82. data/lib/orb/models/minimum_interval.rb +52 -0
  83. data/lib/orb/models/monetary_amount_discount_adjustment.rb +87 -0
  84. data/lib/orb/models/monetary_maximum_adjustment.rb +87 -0
  85. data/lib/orb/models/monetary_minimum_adjustment.rb +95 -0
  86. data/lib/orb/models/monetary_percentage_discount_adjustment.rb +87 -0
  87. data/lib/orb/models/monetary_usage_discount_adjustment.rb +87 -0
  88. data/lib/orb/models/mutated_subscription.rb +302 -0
  89. data/lib/orb/models/new_accounting_sync_configuration.rb +23 -0
  90. data/lib/orb/models/new_allocation_price.rb +70 -0
  91. data/lib/orb/models/new_amount_discount.rb +120 -0
  92. data/lib/orb/models/new_avalara_tax_configuration.rb +37 -0
  93. data/lib/orb/models/new_billing_cycle_configuration.rb +37 -0
  94. data/lib/orb/models/new_dimensional_price_configuration.rb +36 -0
  95. data/lib/orb/models/new_floating_bps_price.rb +199 -0
  96. data/lib/orb/models/new_floating_bulk_bps_price.rb +197 -0
  97. data/lib/orb/models/new_floating_bulk_price.rb +197 -0
  98. data/lib/orb/models/new_floating_bulk_with_proration_price.rb +197 -0
  99. data/lib/orb/models/new_floating_cumulative_grouped_bulk_price.rb +197 -0
  100. data/lib/orb/models/new_floating_grouped_allocation_price.rb +197 -0
  101. data/lib/orb/models/new_floating_grouped_tiered_package_price.rb +197 -0
  102. data/lib/orb/models/new_floating_grouped_tiered_price.rb +197 -0
  103. data/lib/orb/models/new_floating_grouped_with_metered_minimum_price.rb +197 -0
  104. data/lib/orb/models/new_floating_grouped_with_prorated_minimum_price.rb +198 -0
  105. data/lib/orb/models/new_floating_matrix_price.rb +197 -0
  106. data/lib/orb/models/new_floating_matrix_with_allocation_price.rb +197 -0
  107. data/lib/orb/models/new_floating_matrix_with_display_name_price.rb +197 -0
  108. data/lib/orb/models/new_floating_max_group_tiered_package_price.rb +197 -0
  109. data/lib/orb/models/new_floating_package_price.rb +197 -0
  110. data/lib/orb/models/new_floating_package_with_allocation_price.rb +197 -0
  111. data/lib/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rb +198 -0
  112. data/lib/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rb +198 -0
  113. data/lib/orb/models/new_floating_threshold_total_amount_price.rb +197 -0
  114. data/lib/orb/models/new_floating_tiered_bps_price.rb +197 -0
  115. data/lib/orb/models/new_floating_tiered_package_price.rb +197 -0
  116. data/lib/orb/models/new_floating_tiered_package_with_minimum_price.rb +197 -0
  117. data/lib/orb/models/new_floating_tiered_price.rb +197 -0
  118. data/lib/orb/models/new_floating_tiered_with_minimum_price.rb +197 -0
  119. data/lib/orb/models/new_floating_tiered_with_proration_price.rb +197 -0
  120. data/lib/orb/models/new_floating_unit_price.rb +197 -0
  121. data/lib/orb/models/new_floating_unit_with_percent_price.rb +197 -0
  122. data/lib/orb/models/new_floating_unit_with_proration_price.rb +197 -0
  123. data/lib/orb/models/new_maximum.rb +120 -0
  124. data/lib/orb/models/new_minimum.rb +128 -0
  125. data/lib/orb/models/new_percentage_discount.rb +120 -0
  126. data/lib/orb/models/new_plan_bps_price.rb +196 -0
  127. data/lib/orb/models/new_plan_bulk_bps_price.rb +200 -0
  128. data/lib/orb/models/new_plan_bulk_price.rb +196 -0
  129. data/lib/orb/models/new_plan_bulk_with_proration_price.rb +198 -0
  130. data/lib/orb/models/new_plan_cumulative_grouped_bulk_price.rb +198 -0
  131. data/lib/orb/models/new_plan_grouped_allocation_price.rb +198 -0
  132. data/lib/orb/models/new_plan_grouped_tiered_package_price.rb +198 -0
  133. data/lib/orb/models/new_plan_grouped_tiered_price.rb +198 -0
  134. data/lib/orb/models/new_plan_grouped_with_metered_minimum_price.rb +198 -0
  135. data/lib/orb/models/new_plan_grouped_with_prorated_minimum_price.rb +199 -0
  136. data/lib/orb/models/new_plan_matrix_price.rb +200 -0
  137. data/lib/orb/models/new_plan_matrix_with_allocation_price.rb +198 -0
  138. data/lib/orb/models/new_plan_matrix_with_display_name_price.rb +198 -0
  139. data/lib/orb/models/new_plan_max_group_tiered_package_price.rb +198 -0
  140. data/lib/orb/models/new_plan_package_price.rb +200 -0
  141. data/lib/orb/models/new_plan_package_with_allocation_price.rb +198 -0
  142. data/lib/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rb +199 -0
  143. data/lib/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rb +199 -0
  144. data/lib/orb/models/new_plan_threshold_total_amount_price.rb +198 -0
  145. data/lib/orb/models/new_plan_tier_with_proration_price.rb +198 -0
  146. data/lib/orb/models/new_plan_tiered_bps_price.rb +198 -0
  147. data/lib/orb/models/new_plan_tiered_package_price.rb +198 -0
  148. data/lib/orb/models/new_plan_tiered_package_with_minimum_price.rb +198 -0
  149. data/lib/orb/models/new_plan_tiered_price.rb +200 -0
  150. data/lib/orb/models/new_plan_tiered_with_minimum_price.rb +198 -0
  151. data/lib/orb/models/new_plan_unit_price.rb +196 -0
  152. data/lib/orb/models/new_plan_unit_with_percent_price.rb +198 -0
  153. data/lib/orb/models/new_plan_unit_with_proration_price.rb +198 -0
  154. data/lib/orb/models/new_reporting_configuration.rb +15 -0
  155. data/lib/orb/models/new_sphere_configuration.rb +31 -0
  156. data/lib/orb/models/new_subscription_bps_price.rb +207 -0
  157. data/lib/orb/models/new_subscription_bulk_bps_price.rb +207 -0
  158. data/lib/orb/models/new_subscription_bulk_price.rb +207 -0
  159. data/lib/orb/models/new_subscription_bulk_with_proration_price.rb +207 -0
  160. data/lib/orb/models/new_subscription_cumulative_grouped_bulk_price.rb +207 -0
  161. data/lib/orb/models/new_subscription_grouped_allocation_price.rb +207 -0
  162. data/lib/orb/models/new_subscription_grouped_tiered_package_price.rb +207 -0
  163. data/lib/orb/models/new_subscription_grouped_tiered_price.rb +207 -0
  164. data/lib/orb/models/new_subscription_grouped_with_metered_minimum_price.rb +207 -0
  165. data/lib/orb/models/new_subscription_grouped_with_prorated_minimum_price.rb +208 -0
  166. data/lib/orb/models/new_subscription_matrix_price.rb +207 -0
  167. data/lib/orb/models/new_subscription_matrix_with_allocation_price.rb +207 -0
  168. data/lib/orb/models/new_subscription_matrix_with_display_name_price.rb +207 -0
  169. data/lib/orb/models/new_subscription_max_group_tiered_package_price.rb +207 -0
  170. data/lib/orb/models/new_subscription_package_price.rb +207 -0
  171. data/lib/orb/models/new_subscription_package_with_allocation_price.rb +207 -0
  172. data/lib/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rb +209 -0
  173. data/lib/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rb +209 -0
  174. data/lib/orb/models/new_subscription_threshold_total_amount_price.rb +207 -0
  175. data/lib/orb/models/new_subscription_tier_with_proration_price.rb +207 -0
  176. data/lib/orb/models/new_subscription_tiered_bps_price.rb +207 -0
  177. data/lib/orb/models/new_subscription_tiered_package_price.rb +207 -0
  178. data/lib/orb/models/new_subscription_tiered_package_with_minimum_price.rb +207 -0
  179. data/lib/orb/models/new_subscription_tiered_price.rb +207 -0
  180. data/lib/orb/models/new_subscription_tiered_with_minimum_price.rb +207 -0
  181. data/lib/orb/models/new_subscription_unit_price.rb +207 -0
  182. data/lib/orb/models/new_subscription_unit_with_percent_price.rb +207 -0
  183. data/lib/orb/models/new_subscription_unit_with_proration_price.rb +207 -0
  184. data/lib/orb/models/new_tax_jar_configuration.rb +31 -0
  185. data/lib/orb/models/new_usage_discount.rb +120 -0
  186. data/lib/orb/models/other_sub_line_item.rb +54 -0
  187. data/lib/orb/models/package_config.rb +28 -0
  188. data/lib/orb/models/per_price_cost.rb +48 -0
  189. data/lib/orb/models/percentage_discount.rb +3 -59
  190. data/lib/orb/models/percentage_discount_interval.rb +69 -0
  191. data/lib/orb/models/plan.rb +22 -1040
  192. data/lib/orb/models/plan_create_params.rb +31 -8145
  193. data/lib/orb/models/plan_phase_amount_discount_adjustment.rb +87 -0
  194. data/lib/orb/models/plan_phase_maximum_adjustment.rb +87 -0
  195. data/lib/orb/models/plan_phase_minimum_adjustment.rb +95 -0
  196. data/lib/orb/models/plan_phase_percentage_discount_adjustment.rb +87 -0
  197. data/lib/orb/models/plan_phase_usage_discount_adjustment.rb +87 -0
  198. data/lib/orb/models/plan_version.rb +10 -672
  199. data/lib/orb/models/price.rb +1225 -10817
  200. data/lib/orb/models/price_create_params.rb +53 -472
  201. data/lib/orb/models/price_evaluate_multiple_params.rb +32 -8479
  202. data/lib/orb/models/price_evaluate_preview_events_params.rb +236 -0
  203. data/lib/orb/models/price_evaluate_preview_events_response.rb +51 -0
  204. data/lib/orb/models/price_interval.rb +113 -0
  205. data/lib/orb/models/sub_line_item_grouping.rb +23 -0
  206. data/lib/orb/models/sub_line_item_matrix_config.rb +16 -0
  207. data/lib/orb/models/subscription.rb +33 -1581
  208. data/lib/orb/models/subscription_change_apply_response.rb +3 -1904
  209. data/lib/orb/models/subscription_change_cancel_response.rb +3 -1905
  210. data/lib/orb/models/subscription_change_minified.rb +15 -0
  211. data/lib/orb/models/subscription_change_retrieve_response.rb +3 -1906
  212. data/lib/orb/models/subscription_create_params.rb +232 -19698
  213. data/lib/orb/models/subscription_fetch_costs_response.rb +3 -87
  214. data/lib/orb/models/subscription_minified.rb +15 -0
  215. data/lib/orb/models/subscription_price_intervals_params.rb +86 -9468
  216. data/lib/orb/models/subscription_schedule_plan_change_params.rb +238 -19792
  217. data/lib/orb/models/subscription_trial_info.rb +15 -0
  218. data/lib/orb/models/tax_amount.rb +32 -0
  219. data/lib/orb/models/threshold.rb +24 -0
  220. data/lib/orb/models/tier.rb +32 -0
  221. data/lib/orb/models/tier_config.rb +27 -0
  222. data/lib/orb/models/tier_sub_line_item.rb +61 -0
  223. data/lib/orb/models/tiered_bps_config.rb +20 -0
  224. data/lib/orb/models/tiered_config.rb +16 -0
  225. data/lib/orb/models/tiered_conversion_rate_config.rb +31 -0
  226. data/lib/orb/models/transform_price_filter.rb +61 -0
  227. data/lib/orb/models/trial_discount.rb +3 -59
  228. data/lib/orb/models/unit_config.rb +16 -0
  229. data/lib/orb/models/unit_conversion_rate_config.rb +31 -0
  230. data/lib/orb/models/usage_discount.rb +3 -59
  231. data/lib/orb/models/usage_discount_interval.rb +69 -0
  232. data/lib/orb/models.rb +348 -0
  233. data/lib/orb/resources/alerts.rb +4 -4
  234. data/lib/orb/resources/customers/credits/ledger.rb +4 -4
  235. data/lib/orb/resources/customers.rb +21 -21
  236. data/lib/orb/resources/plans.rb +1 -1
  237. data/lib/orb/resources/prices/external_price_id.rb +2 -2
  238. data/lib/orb/resources/prices.rb +82 -34
  239. data/lib/orb/resources/subscriptions.rb +24 -24
  240. data/lib/orb/version.rb +1 -1
  241. data/lib/orb.rb +181 -11
  242. data/rbi/orb/models/accounting_provider_config.rbi +34 -0
  243. data/rbi/orb/models/address.rbi +55 -0
  244. data/rbi/orb/models/address_input.rbi +62 -0
  245. data/rbi/orb/models/adjustment_interval.rbi +93 -0
  246. data/rbi/orb/models/aggregated_cost.rbi +61 -0
  247. data/rbi/orb/models/alert.rbi +11 -84
  248. data/rbi/orb/models/alert_create_for_customer_params.rbi +3 -42
  249. data/rbi/orb/models/alert_create_for_external_customer_params.rbi +3 -48
  250. data/rbi/orb/models/alert_create_for_subscription_params.rbi +3 -38
  251. data/rbi/orb/models/alert_update_params.rbi +3 -31
  252. data/rbi/orb/models/allocation.rbi +45 -0
  253. data/rbi/orb/models/amount_discount.rbi +3 -112
  254. data/rbi/orb/models/amount_discount_interval.rbi +100 -0
  255. data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +558 -35618
  256. data/rbi/orb/models/beta_create_plan_version_params.rbi +558 -35610
  257. data/rbi/orb/models/billable_metric_tiny.rbi +21 -0
  258. data/rbi/orb/models/billing_cycle_anchor_configuration.rbi +61 -0
  259. data/rbi/orb/models/billing_cycle_configuration.rbi +70 -0
  260. data/rbi/orb/models/bps_config.rbi +36 -0
  261. data/rbi/orb/models/bps_tier.rbi +58 -0
  262. data/rbi/orb/models/bulk_bps_config.rbi +31 -0
  263. data/rbi/orb/models/bulk_bps_tier.rbi +50 -0
  264. data/rbi/orb/models/bulk_config.rbi +26 -0
  265. data/rbi/orb/models/bulk_tier.rbi +38 -0
  266. data/rbi/orb/models/changed_subscription_resources.rbi +61 -0
  267. data/rbi/orb/models/conversion_rate_tier.rbi +51 -0
  268. data/rbi/orb/models/conversion_rate_tiered_config.rbi +31 -0
  269. data/rbi/orb/models/conversion_rate_unit_config.rbi +27 -0
  270. data/rbi/orb/models/coupon_redemption.rbi +37 -0
  271. data/rbi/orb/models/credit_note.rbi +7 -87
  272. data/rbi/orb/models/credit_note_tiny.rbi +25 -0
  273. data/rbi/orb/models/custom_expiration.rbi +55 -0
  274. data/rbi/orb/models/customer.rbi +19 -522
  275. data/rbi/orb/models/customer_create_params.rbi +36 -957
  276. data/rbi/orb/models/customer_hierarchy_config.rbi +52 -0
  277. data/rbi/orb/models/customer_minified.rbi +32 -0
  278. data/rbi/orb/models/customer_tax_id.rbi +324 -0
  279. data/rbi/orb/models/customer_update_by_external_id_params.rbi +36 -1436
  280. data/rbi/orb/models/customer_update_params.rbi +36 -957
  281. data/rbi/orb/models/customers/balance_transaction_create_response.rbi +8 -96
  282. data/rbi/orb/models/customers/balance_transaction_list_response.rbi +8 -96
  283. data/rbi/orb/models/customers/cost_list_by_external_id_response.rbi +5 -191
  284. data/rbi/orb/models/customers/cost_list_response.rbi +5 -182
  285. data/rbi/orb/models/customers/credits/affected_block.rbi +50 -0
  286. data/rbi/orb/models/customers/credits/amendment_ledger_entry.rbi +207 -0
  287. data/rbi/orb/models/customers/credits/credit_block_expiry_ledger_entry.rbi +209 -0
  288. data/rbi/orb/models/customers/credits/decrement_ledger_entry.rbi +225 -0
  289. data/rbi/orb/models/customers/credits/expiration_change_ledger_entry.rbi +213 -0
  290. data/rbi/orb/models/customers/credits/increment_ledger_entry.rbi +215 -0
  291. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +7 -1854
  292. data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +7 -1854
  293. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +7 -1854
  294. data/rbi/orb/models/customers/credits/ledger_list_response.rbi +7 -1854
  295. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +4 -84
  296. data/rbi/orb/models/customers/credits/top_up_create_response.rbi +4 -84
  297. data/rbi/orb/models/customers/credits/top_up_invoice_settings.rbi +83 -0
  298. data/rbi/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +4 -84
  299. data/rbi/orb/models/customers/credits/top_up_list_response.rbi +4 -84
  300. data/rbi/orb/models/customers/credits/void_initiated_ledger_entry.rbi +225 -0
  301. data/rbi/orb/models/customers/credits/void_ledger_entry.rbi +219 -0
  302. data/rbi/orb/models/dimensional_price_configuration.rbi +38 -0
  303. data/rbi/orb/models/discount_override.rbi +83 -0
  304. data/rbi/orb/models/fixed_fee_quantity_schedule_entry.rbi +48 -0
  305. data/rbi/orb/models/fixed_fee_quantity_transition.rbi +39 -0
  306. data/rbi/orb/models/invoice.rbi +212 -3345
  307. data/rbi/orb/models/invoice_create_params.rbi +4 -33
  308. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +355 -4329
  309. data/rbi/orb/models/invoice_line_item_create_response.rbi +30 -2260
  310. data/rbi/orb/models/invoice_tiny.rbi +24 -0
  311. data/rbi/orb/models/item_slim.rbi +23 -0
  312. data/rbi/orb/models/matrix_config.rbi +50 -0
  313. data/rbi/orb/models/matrix_sub_line_item.rbi +87 -0
  314. data/rbi/orb/models/matrix_value.rbi +43 -0
  315. data/rbi/orb/models/matrix_with_allocation_config.rbi +61 -0
  316. data/rbi/orb/models/maximum.rbi +52 -0
  317. data/rbi/orb/models/maximum_interval.rbi +69 -0
  318. data/rbi/orb/models/minimum.rbi +52 -0
  319. data/rbi/orb/models/minimum_interval.rbi +69 -0
  320. data/rbi/orb/models/monetary_amount_discount_adjustment.rbi +125 -0
  321. data/rbi/orb/models/monetary_maximum_adjustment.rbi +123 -0
  322. data/rbi/orb/models/monetary_minimum_adjustment.rbi +131 -0
  323. data/rbi/orb/models/monetary_percentage_discount_adjustment.rbi +131 -0
  324. data/rbi/orb/models/monetary_usage_discount_adjustment.rbi +125 -0
  325. data/rbi/orb/models/mutated_subscription.rbi +412 -0
  326. data/rbi/orb/models/new_accounting_sync_configuration.rbi +40 -0
  327. data/rbi/orb/models/new_allocation_price.rbi +104 -0
  328. data/rbi/orb/models/new_amount_discount.rbi +179 -0
  329. data/rbi/orb/models/new_avalara_tax_configuration.rbi +68 -0
  330. data/rbi/orb/models/new_billing_cycle_configuration.rbi +79 -0
  331. data/rbi/orb/models/new_dimensional_price_configuration.rbi +55 -0
  332. data/rbi/orb/models/new_floating_bps_price.rbi +294 -0
  333. data/rbi/orb/models/new_floating_bulk_bps_price.rbi +309 -0
  334. data/rbi/orb/models/new_floating_bulk_price.rbi +298 -0
  335. data/rbi/orb/models/new_floating_bulk_with_proration_price.rbi +331 -0
  336. data/rbi/orb/models/new_floating_cumulative_grouped_bulk_price.rbi +338 -0
  337. data/rbi/orb/models/new_floating_grouped_allocation_price.rbi +331 -0
  338. data/rbi/orb/models/new_floating_grouped_tiered_package_price.rbi +337 -0
  339. data/rbi/orb/models/new_floating_grouped_tiered_price.rbi +325 -0
  340. data/rbi/orb/models/new_floating_grouped_with_metered_minimum_price.rbi +348 -0
  341. data/rbi/orb/models/new_floating_grouped_with_prorated_minimum_price.rbi +348 -0
  342. data/rbi/orb/models/new_floating_matrix_price.rbi +304 -0
  343. data/rbi/orb/models/new_floating_matrix_with_allocation_price.rbi +345 -0
  344. data/rbi/orb/models/new_floating_matrix_with_display_name_price.rbi +338 -0
  345. data/rbi/orb/models/new_floating_max_group_tiered_package_price.rbi +338 -0
  346. data/rbi/orb/models/new_floating_package_price.rbi +306 -0
  347. data/rbi/orb/models/new_floating_package_with_allocation_price.rbi +338 -0
  348. data/rbi/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rbi +350 -0
  349. data/rbi/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rbi +349 -0
  350. data/rbi/orb/models/new_floating_threshold_total_amount_price.rbi +337 -0
  351. data/rbi/orb/models/new_floating_tiered_bps_price.rbi +317 -0
  352. data/rbi/orb/models/new_floating_tiered_package_price.rbi +325 -0
  353. data/rbi/orb/models/new_floating_tiered_package_with_minimum_price.rbi +348 -0
  354. data/rbi/orb/models/new_floating_tiered_price.rbi +304 -0
  355. data/rbi/orb/models/new_floating_tiered_with_minimum_price.rbi +331 -0
  356. data/rbi/orb/models/new_floating_tiered_with_proration_price.rbi +337 -0
  357. data/rbi/orb/models/new_floating_unit_price.rbi +298 -0
  358. data/rbi/orb/models/new_floating_unit_with_percent_price.rbi +328 -0
  359. data/rbi/orb/models/new_floating_unit_with_proration_price.rbi +331 -0
  360. data/rbi/orb/models/new_maximum.rbi +160 -0
  361. data/rbi/orb/models/new_minimum.rbi +168 -0
  362. data/rbi/orb/models/new_percentage_discount.rbi +193 -0
  363. data/rbi/orb/models/new_plan_bps_price.rbi +294 -0
  364. data/rbi/orb/models/new_plan_bulk_bps_price.rbi +297 -0
  365. data/rbi/orb/models/new_plan_bulk_price.rbi +295 -0
  366. data/rbi/orb/models/new_plan_bulk_with_proration_price.rbi +327 -0
  367. data/rbi/orb/models/new_plan_cumulative_grouped_bulk_price.rbi +333 -0
  368. data/rbi/orb/models/new_plan_grouped_allocation_price.rbi +327 -0
  369. data/rbi/orb/models/new_plan_grouped_tiered_package_price.rbi +333 -0
  370. data/rbi/orb/models/new_plan_grouped_tiered_price.rbi +316 -0
  371. data/rbi/orb/models/new_plan_grouped_with_metered_minimum_price.rbi +340 -0
  372. data/rbi/orb/models/new_plan_grouped_with_prorated_minimum_price.rbi +345 -0
  373. data/rbi/orb/models/new_plan_matrix_price.rbi +297 -0
  374. data/rbi/orb/models/new_plan_matrix_with_allocation_price.rbi +341 -0
  375. data/rbi/orb/models/new_plan_matrix_with_display_name_price.rbi +333 -0
  376. data/rbi/orb/models/new_plan_max_group_tiered_package_price.rbi +333 -0
  377. data/rbi/orb/models/new_plan_package_price.rbi +297 -0
  378. data/rbi/orb/models/new_plan_package_with_allocation_price.rbi +333 -0
  379. data/rbi/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rbi +352 -0
  380. data/rbi/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rbi +351 -0
  381. data/rbi/orb/models/new_plan_threshold_total_amount_price.rbi +333 -0
  382. data/rbi/orb/models/new_plan_tier_with_proration_price.rbi +327 -0
  383. data/rbi/orb/models/new_plan_tiered_bps_price.rbi +304 -0
  384. data/rbi/orb/models/new_plan_tiered_package_price.rbi +316 -0
  385. data/rbi/orb/models/new_plan_tiered_package_with_minimum_price.rbi +339 -0
  386. data/rbi/orb/models/new_plan_tiered_price.rbi +297 -0
  387. data/rbi/orb/models/new_plan_tiered_with_minimum_price.rbi +327 -0
  388. data/rbi/orb/models/new_plan_unit_price.rbi +295 -0
  389. data/rbi/orb/models/new_plan_unit_with_percent_price.rbi +325 -0
  390. data/rbi/orb/models/new_plan_unit_with_proration_price.rbi +327 -0
  391. data/rbi/orb/models/new_reporting_configuration.rbi +23 -0
  392. data/rbi/orb/models/new_sphere_configuration.rbi +59 -0
  393. data/rbi/orb/models/new_subscription_bps_price.rbi +317 -0
  394. data/rbi/orb/models/new_subscription_bulk_bps_price.rbi +338 -0
  395. data/rbi/orb/models/new_subscription_bulk_price.rbi +321 -0
  396. data/rbi/orb/models/new_subscription_bulk_with_proration_price.rbi +350 -0
  397. data/rbi/orb/models/new_subscription_cumulative_grouped_bulk_price.rbi +360 -0
  398. data/rbi/orb/models/new_subscription_grouped_allocation_price.rbi +350 -0
  399. data/rbi/orb/models/new_subscription_grouped_tiered_package_price.rbi +360 -0
  400. data/rbi/orb/models/new_subscription_grouped_tiered_price.rbi +343 -0
  401. data/rbi/orb/models/new_subscription_grouped_with_metered_minimum_price.rbi +360 -0
  402. data/rbi/orb/models/new_subscription_grouped_with_prorated_minimum_price.rbi +360 -0
  403. data/rbi/orb/models/new_subscription_matrix_price.rbi +332 -0
  404. data/rbi/orb/models/new_subscription_matrix_with_allocation_price.rbi +368 -0
  405. data/rbi/orb/models/new_subscription_matrix_with_display_name_price.rbi +360 -0
  406. data/rbi/orb/models/new_subscription_max_group_tiered_package_price.rbi +360 -0
  407. data/rbi/orb/models/new_subscription_package_price.rbi +338 -0
  408. data/rbi/orb/models/new_subscription_package_with_allocation_price.rbi +360 -0
  409. data/rbi/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rbi +362 -0
  410. data/rbi/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rbi +361 -0
  411. data/rbi/orb/models/new_subscription_threshold_total_amount_price.rbi +360 -0
  412. data/rbi/orb/models/new_subscription_tier_with_proration_price.rbi +350 -0
  413. data/rbi/orb/models/new_subscription_tiered_bps_price.rbi +340 -0
  414. data/rbi/orb/models/new_subscription_tiered_package_price.rbi +343 -0
  415. data/rbi/orb/models/new_subscription_tiered_package_with_minimum_price.rbi +360 -0
  416. data/rbi/orb/models/new_subscription_tiered_price.rbi +332 -0
  417. data/rbi/orb/models/new_subscription_tiered_with_minimum_price.rbi +350 -0
  418. data/rbi/orb/models/new_subscription_unit_price.rbi +321 -0
  419. data/rbi/orb/models/new_subscription_unit_with_percent_price.rbi +349 -0
  420. data/rbi/orb/models/new_subscription_unit_with_proration_price.rbi +350 -0
  421. data/rbi/orb/models/new_tax_jar_configuration.rbi +59 -0
  422. data/rbi/orb/models/new_usage_discount.rbi +177 -0
  423. data/rbi/orb/models/other_sub_line_item.rbi +78 -0
  424. data/rbi/orb/models/package_config.rbi +39 -0
  425. data/rbi/orb/models/per_price_cost.rbi +96 -0
  426. data/rbi/orb/models/percentage_discount.rbi +3 -126
  427. data/rbi/orb/models/percentage_discount_interval.rbi +107 -0
  428. data/rbi/orb/models/plan.rbi +29 -1937
  429. data/rbi/orb/models/plan_create_params.rbi +112 -15428
  430. data/rbi/orb/models/plan_phase_amount_discount_adjustment.rbi +128 -0
  431. data/rbi/orb/models/plan_phase_maximum_adjustment.rbi +123 -0
  432. data/rbi/orb/models/plan_phase_minimum_adjustment.rbi +131 -0
  433. data/rbi/orb/models/plan_phase_percentage_discount_adjustment.rbi +131 -0
  434. data/rbi/orb/models/plan_phase_usage_discount_adjustment.rbi +125 -0
  435. data/rbi/orb/models/plan_version.rbi +13 -1252
  436. data/rbi/orb/models/price.rbi +3518 -26097
  437. data/rbi/orb/models/price_create_params.rbi +81 -937
  438. data/rbi/orb/models/price_evaluate_multiple_params.rbi +112 -15566
  439. data/rbi/orb/models/price_evaluate_preview_events_params.rbi +411 -0
  440. data/rbi/orb/models/price_evaluate_preview_events_response.rbi +101 -0
  441. data/rbi/orb/models/price_interval.rbi +174 -0
  442. data/rbi/orb/models/sub_line_item_grouping.rbi +31 -0
  443. data/rbi/orb/models/sub_line_item_matrix_config.rbi +33 -0
  444. data/rbi/orb/models/subscription.rbi +51 -2939
  445. data/rbi/orb/models/subscription_change_apply_response.rbi +4 -3580
  446. data/rbi/orb/models/subscription_change_cancel_response.rbi +4 -3580
  447. data/rbi/orb/models/subscription_change_minified.rbi +23 -0
  448. data/rbi/orb/models/subscription_change_retrieve_response.rbi +4 -3582
  449. data/rbi/orb/models/subscription_create_params.rbi +686 -36613
  450. data/rbi/orb/models/subscription_fetch_costs_response.rbi +5 -182
  451. data/rbi/orb/models/subscription_minified.rbi +23 -0
  452. data/rbi/orb/models/subscription_price_intervals_params.rbi +224 -17694
  453. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +696 -36631
  454. data/rbi/orb/models/subscription_trial_info.rbi +23 -0
  455. data/rbi/orb/models/tax_amount.rbi +50 -0
  456. data/rbi/orb/models/threshold.rbi +30 -0
  457. data/rbi/orb/models/tier.rbi +50 -0
  458. data/rbi/orb/models/tier_config.rbi +40 -0
  459. data/rbi/orb/models/tier_sub_line_item.rbi +87 -0
  460. data/rbi/orb/models/tiered_bps_config.rbi +29 -0
  461. data/rbi/orb/models/tiered_config.rbi +26 -0
  462. data/rbi/orb/models/tiered_conversion_rate_config.rbi +73 -0
  463. data/rbi/orb/models/transform_price_filter.rbi +106 -0
  464. data/rbi/orb/models/trial_discount.rbi +3 -104
  465. data/rbi/orb/models/unit_config.rbi +24 -0
  466. data/rbi/orb/models/unit_conversion_rate_config.rbi +71 -0
  467. data/rbi/orb/models/usage_discount.rbi +3 -104
  468. data/rbi/orb/models/usage_discount_interval.rbi +99 -0
  469. data/rbi/orb/models.rbi +398 -0
  470. data/rbi/orb/resources/alerts.rbi +4 -13
  471. data/rbi/orb/resources/customers.rbi +27 -51
  472. data/rbi/orb/resources/plans.rbi +28 -28
  473. data/rbi/orb/resources/prices.rbi +82 -36
  474. data/rbi/orb/resources/subscriptions.rbi +13 -19
  475. data/sig/orb/models/accounting_provider_config.rbs +19 -0
  476. data/sig/orb/models/address.rbs +45 -0
  477. data/sig/orb/models/address_input.rbs +45 -0
  478. data/sig/orb/models/adjustment_interval.rbs +53 -0
  479. data/sig/orb/models/aggregated_cost.rbs +40 -0
  480. data/sig/orb/models/alert.rbs +12 -44
  481. data/sig/orb/models/alert_create_for_customer_params.rbs +4 -14
  482. data/sig/orb/models/alert_create_for_external_customer_params.rbs +4 -14
  483. data/sig/orb/models/alert_create_for_subscription_params.rbs +4 -14
  484. data/sig/orb/models/alert_update_params.rbs +4 -14
  485. data/sig/orb/models/allocation.rbs +30 -0
  486. data/sig/orb/models/amount_discount.rbs +4 -57
  487. data/sig/orb/models/amount_discount_interval.rbs +55 -0
  488. data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +149 -13933
  489. data/sig/orb/models/beta_create_plan_version_params.rbs +146 -13914
  490. data/sig/orb/models/billable_metric_tiny.rbs +13 -0
  491. data/sig/orb/models/billing_cycle_anchor_configuration.rbs +18 -0
  492. data/sig/orb/models/billing_cycle_configuration.rbs +36 -0
  493. data/sig/orb/models/bps_config.rbs +15 -0
  494. data/sig/orb/models/bps_tier.rbs +35 -0
  495. data/sig/orb/models/bulk_bps_config.rbs +13 -0
  496. data/sig/orb/models/bulk_bps_tier.rbs +26 -0
  497. data/sig/orb/models/bulk_config.rbs +13 -0
  498. data/sig/orb/models/bulk_tier.rbs +15 -0
  499. data/sig/orb/models/changed_subscription_resources.rbs +35 -0
  500. data/sig/orb/models/conversion_rate_tier.rbs +26 -0
  501. data/sig/orb/models/conversion_rate_tiered_config.rbs +14 -0
  502. data/sig/orb/models/conversion_rate_unit_config.rbs +13 -0
  503. data/sig/orb/models/coupon_redemption.rbs +22 -0
  504. data/sig/orb/models/credit_note.rbs +8 -47
  505. data/sig/orb/models/credit_note_tiny.rbs +13 -0
  506. data/sig/orb/models/custom_expiration.rbs +36 -0
  507. data/sig/orb/models/customer.rbs +20 -471
  508. data/sig/orb/models/customer_create_params.rbs +27 -577
  509. data/sig/orb/models/customer_hierarchy_config.rbs +24 -0
  510. data/sig/orb/models/customer_minified.rbs +15 -0
  511. data/sig/orb/models/customer_tax_id.rbs +346 -0
  512. data/sig/orb/models/customer_update_by_external_id_params.rbs +27 -577
  513. data/sig/orb/models/customer_update_params.rbs +27 -577
  514. data/sig/orb/models/customers/balance_transaction_create_response.rbs +8 -28
  515. data/sig/orb/models/customers/balance_transaction_list_response.rbs +8 -28
  516. data/sig/orb/models/customers/cost_list_by_external_id_response.rbs +4 -84
  517. data/sig/orb/models/customers/cost_list_response.rbs +4 -83
  518. data/sig/orb/models/customers/credits/affected_block.rbs +30 -0
  519. data/sig/orb/models/customers/credits/amendment_ledger_entry.rbs +105 -0
  520. data/sig/orb/models/customers/credits/credit_block_expiry_ledger_entry.rbs +107 -0
  521. data/sig/orb/models/customers/credits/decrement_ledger_entry.rbs +120 -0
  522. data/sig/orb/models/customers/credits/expiration_change_ledger_entry.rbs +110 -0
  523. data/sig/orb/models/customers/credits/increment_ledger_entry.rbs +110 -0
  524. data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +7 -939
  525. data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +7 -939
  526. data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +7 -939
  527. data/sig/orb/models/customers/credits/ledger_list_response.rbs +7 -939
  528. data/sig/orb/models/customers/credits/top_up_create_by_external_id_response.rbs +4 -38
  529. data/sig/orb/models/customers/credits/top_up_create_response.rbs +4 -38
  530. data/sig/orb/models/customers/credits/top_up_invoice_settings.rbs +41 -0
  531. data/sig/orb/models/customers/credits/top_up_list_by_external_id_response.rbs +4 -38
  532. data/sig/orb/models/customers/credits/top_up_list_response.rbs +4 -38
  533. data/sig/orb/models/customers/credits/void_initiated_ledger_entry.rbs +120 -0
  534. data/sig/orb/models/customers/credits/void_ledger_entry.rbs +115 -0
  535. data/sig/orb/models/dimensional_price_configuration.rbs +22 -0
  536. data/sig/orb/models/discount_override.rbs +47 -0
  537. data/sig/orb/models/fixed_fee_quantity_schedule_entry.rbs +30 -0
  538. data/sig/orb/models/fixed_fee_quantity_transition.rbs +26 -0
  539. data/sig/orb/models/invoice.rbs +54 -1612
  540. data/sig/orb/models/invoice_create_params.rbs +4 -14
  541. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +54 -1612
  542. data/sig/orb/models/invoice_line_item_create_response.rbs +18 -927
  543. data/sig/orb/models/invoice_tiny.rbs +13 -0
  544. data/sig/orb/models/item_slim.rbs +15 -0
  545. data/sig/orb/models/matrix_config.rbs +30 -0
  546. data/sig/orb/models/matrix_sub_line_item.rbs +55 -0
  547. data/sig/orb/models/matrix_value.rbs +22 -0
  548. data/sig/orb/models/matrix_with_allocation_config.rbs +35 -0
  549. data/sig/orb/models/maximum.rbs +30 -0
  550. data/sig/orb/models/maximum_interval.rbs +40 -0
  551. data/sig/orb/models/minimum.rbs +30 -0
  552. data/sig/orb/models/minimum_interval.rbs +40 -0
  553. data/sig/orb/models/monetary_amount_discount_adjustment.rbs +65 -0
  554. data/sig/orb/models/monetary_maximum_adjustment.rbs +65 -0
  555. data/sig/orb/models/monetary_minimum_adjustment.rbs +70 -0
  556. data/sig/orb/models/monetary_percentage_discount_adjustment.rbs +65 -0
  557. data/sig/orb/models/monetary_usage_discount_adjustment.rbs +65 -0
  558. data/sig/orb/models/mutated_subscription.rbs +178 -0
  559. data/sig/orb/models/new_accounting_sync_configuration.rbs +25 -0
  560. data/sig/orb/models/new_allocation_price.rbs +56 -0
  561. data/sig/orb/models/new_amount_discount.rbs +97 -0
  562. data/sig/orb/models/new_avalara_tax_configuration.rbs +40 -0
  563. data/sig/orb/models/new_billing_cycle_configuration.rbs +36 -0
  564. data/sig/orb/models/new_dimensional_price_configuration.rbs +30 -0
  565. data/sig/orb/models/new_floating_bps_price.rbs +135 -0
  566. data/sig/orb/models/new_floating_bulk_bps_price.rbs +135 -0
  567. data/sig/orb/models/new_floating_bulk_price.rbs +135 -0
  568. data/sig/orb/models/new_floating_bulk_with_proration_price.rbs +135 -0
  569. data/sig/orb/models/new_floating_cumulative_grouped_bulk_price.rbs +135 -0
  570. data/sig/orb/models/new_floating_grouped_allocation_price.rbs +135 -0
  571. data/sig/orb/models/new_floating_grouped_tiered_package_price.rbs +135 -0
  572. data/sig/orb/models/new_floating_grouped_tiered_price.rbs +135 -0
  573. data/sig/orb/models/new_floating_grouped_with_metered_minimum_price.rbs +135 -0
  574. data/sig/orb/models/new_floating_grouped_with_prorated_minimum_price.rbs +135 -0
  575. data/sig/orb/models/new_floating_matrix_price.rbs +135 -0
  576. data/sig/orb/models/new_floating_matrix_with_allocation_price.rbs +135 -0
  577. data/sig/orb/models/new_floating_matrix_with_display_name_price.rbs +135 -0
  578. data/sig/orb/models/new_floating_max_group_tiered_package_price.rbs +135 -0
  579. data/sig/orb/models/new_floating_package_price.rbs +135 -0
  580. data/sig/orb/models/new_floating_package_with_allocation_price.rbs +135 -0
  581. data/sig/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rbs +135 -0
  582. data/sig/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rbs +135 -0
  583. data/sig/orb/models/new_floating_threshold_total_amount_price.rbs +135 -0
  584. data/sig/orb/models/new_floating_tiered_bps_price.rbs +135 -0
  585. data/sig/orb/models/new_floating_tiered_package_price.rbs +135 -0
  586. data/sig/orb/models/new_floating_tiered_package_with_minimum_price.rbs +135 -0
  587. data/sig/orb/models/new_floating_tiered_price.rbs +135 -0
  588. data/sig/orb/models/new_floating_tiered_with_minimum_price.rbs +135 -0
  589. data/sig/orb/models/new_floating_tiered_with_proration_price.rbs +135 -0
  590. data/sig/orb/models/new_floating_unit_price.rbs +135 -0
  591. data/sig/orb/models/new_floating_unit_with_percent_price.rbs +135 -0
  592. data/sig/orb/models/new_floating_unit_with_proration_price.rbs +135 -0
  593. data/sig/orb/models/new_maximum.rbs +97 -0
  594. data/sig/orb/models/new_minimum.rbs +102 -0
  595. data/sig/orb/models/new_percentage_discount.rbs +97 -0
  596. data/sig/orb/models/new_plan_bps_price.rbs +135 -0
  597. data/sig/orb/models/new_plan_bulk_bps_price.rbs +135 -0
  598. data/sig/orb/models/new_plan_bulk_price.rbs +135 -0
  599. data/sig/orb/models/new_plan_bulk_with_proration_price.rbs +135 -0
  600. data/sig/orb/models/new_plan_cumulative_grouped_bulk_price.rbs +135 -0
  601. data/sig/orb/models/new_plan_grouped_allocation_price.rbs +135 -0
  602. data/sig/orb/models/new_plan_grouped_tiered_package_price.rbs +135 -0
  603. data/sig/orb/models/new_plan_grouped_tiered_price.rbs +135 -0
  604. data/sig/orb/models/new_plan_grouped_with_metered_minimum_price.rbs +135 -0
  605. data/sig/orb/models/new_plan_grouped_with_prorated_minimum_price.rbs +135 -0
  606. data/sig/orb/models/new_plan_matrix_price.rbs +135 -0
  607. data/sig/orb/models/new_plan_matrix_with_allocation_price.rbs +135 -0
  608. data/sig/orb/models/new_plan_matrix_with_display_name_price.rbs +135 -0
  609. data/sig/orb/models/new_plan_max_group_tiered_package_price.rbs +135 -0
  610. data/sig/orb/models/new_plan_package_price.rbs +135 -0
  611. data/sig/orb/models/new_plan_package_with_allocation_price.rbs +135 -0
  612. data/sig/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rbs +135 -0
  613. data/sig/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rbs +135 -0
  614. data/sig/orb/models/new_plan_threshold_total_amount_price.rbs +135 -0
  615. data/sig/orb/models/new_plan_tier_with_proration_price.rbs +135 -0
  616. data/sig/orb/models/new_plan_tiered_bps_price.rbs +135 -0
  617. data/sig/orb/models/new_plan_tiered_package_price.rbs +135 -0
  618. data/sig/orb/models/new_plan_tiered_package_with_minimum_price.rbs +135 -0
  619. data/sig/orb/models/new_plan_tiered_price.rbs +135 -0
  620. data/sig/orb/models/new_plan_tiered_with_minimum_price.rbs +135 -0
  621. data/sig/orb/models/new_plan_unit_price.rbs +135 -0
  622. data/sig/orb/models/new_plan_unit_with_percent_price.rbs +135 -0
  623. data/sig/orb/models/new_plan_unit_with_proration_price.rbs +135 -0
  624. data/sig/orb/models/new_reporting_configuration.rbs +13 -0
  625. data/sig/orb/models/new_sphere_configuration.rbs +35 -0
  626. data/sig/orb/models/new_subscription_bps_price.rbs +140 -0
  627. data/sig/orb/models/new_subscription_bulk_bps_price.rbs +140 -0
  628. data/sig/orb/models/new_subscription_bulk_price.rbs +140 -0
  629. data/sig/orb/models/new_subscription_bulk_with_proration_price.rbs +140 -0
  630. data/sig/orb/models/new_subscription_cumulative_grouped_bulk_price.rbs +140 -0
  631. data/sig/orb/models/new_subscription_grouped_allocation_price.rbs +140 -0
  632. data/sig/orb/models/new_subscription_grouped_tiered_package_price.rbs +140 -0
  633. data/sig/orb/models/new_subscription_grouped_tiered_price.rbs +140 -0
  634. data/sig/orb/models/new_subscription_grouped_with_metered_minimum_price.rbs +140 -0
  635. data/sig/orb/models/new_subscription_grouped_with_prorated_minimum_price.rbs +140 -0
  636. data/sig/orb/models/new_subscription_matrix_price.rbs +140 -0
  637. data/sig/orb/models/new_subscription_matrix_with_allocation_price.rbs +140 -0
  638. data/sig/orb/models/new_subscription_matrix_with_display_name_price.rbs +140 -0
  639. data/sig/orb/models/new_subscription_max_group_tiered_package_price.rbs +140 -0
  640. data/sig/orb/models/new_subscription_package_price.rbs +140 -0
  641. data/sig/orb/models/new_subscription_package_with_allocation_price.rbs +140 -0
  642. data/sig/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rbs +140 -0
  643. data/sig/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rbs +140 -0
  644. data/sig/orb/models/new_subscription_threshold_total_amount_price.rbs +140 -0
  645. data/sig/orb/models/new_subscription_tier_with_proration_price.rbs +140 -0
  646. data/sig/orb/models/new_subscription_tiered_bps_price.rbs +140 -0
  647. data/sig/orb/models/new_subscription_tiered_package_price.rbs +140 -0
  648. data/sig/orb/models/new_subscription_tiered_package_with_minimum_price.rbs +140 -0
  649. data/sig/orb/models/new_subscription_tiered_price.rbs +140 -0
  650. data/sig/orb/models/new_subscription_tiered_with_minimum_price.rbs +140 -0
  651. data/sig/orb/models/new_subscription_unit_price.rbs +140 -0
  652. data/sig/orb/models/new_subscription_unit_with_percent_price.rbs +140 -0
  653. data/sig/orb/models/new_subscription_unit_with_proration_price.rbs +140 -0
  654. data/sig/orb/models/new_tax_jar_configuration.rbs +35 -0
  655. data/sig/orb/models/new_usage_discount.rbs +97 -0
  656. data/sig/orb/models/other_sub_line_item.rbs +50 -0
  657. data/sig/orb/models/package_config.rbs +15 -0
  658. data/sig/orb/models/per_price_cost.rbs +40 -0
  659. data/sig/orb/models/percentage_discount.rbs +4 -57
  660. data/sig/orb/models/percentage_discount_interval.rbs +55 -0
  661. data/sig/orb/models/plan.rbs +21 -871
  662. data/sig/orb/models/plan_create_params.rbs +28 -5952
  663. data/sig/orb/models/plan_phase_amount_discount_adjustment.rbs +65 -0
  664. data/sig/orb/models/plan_phase_maximum_adjustment.rbs +65 -0
  665. data/sig/orb/models/plan_phase_minimum_adjustment.rbs +70 -0
  666. data/sig/orb/models/plan_phase_percentage_discount_adjustment.rbs +65 -0
  667. data/sig/orb/models/plan_phase_usage_discount_adjustment.rbs +65 -0
  668. data/sig/orb/models/plan_version.rbs +5 -535
  669. data/sig/orb/models/price.rbs +2164 -11297
  670. data/sig/orb/models/price_create_params.rbs +58 -418
  671. data/sig/orb/models/price_evaluate_multiple_params.rbs +28 -6138
  672. data/sig/orb/models/price_evaluate_preview_events_params.rbs +166 -0
  673. data/sig/orb/models/price_evaluate_preview_events_response.rbs +50 -0
  674. data/sig/orb/models/price_interval.rbs +65 -0
  675. data/sig/orb/models/sub_line_item_grouping.rbs +15 -0
  676. data/sig/orb/models/sub_line_item_matrix_config.rbs +13 -0
  677. data/sig/orb/models/subscription.rbs +39 -1274
  678. data/sig/orb/models/subscription_change_apply_response.rbs +4 -1467
  679. data/sig/orb/models/subscription_change_cancel_response.rbs +4 -1467
  680. data/sig/orb/models/subscription_change_minified.rbs +13 -0
  681. data/sig/orb/models/subscription_change_retrieve_response.rbs +4 -1467
  682. data/sig/orb/models/subscription_create_params.rbs +176 -14331
  683. data/sig/orb/models/subscription_fetch_costs_response.rbs +4 -82
  684. data/sig/orb/models/subscription_minified.rbs +13 -0
  685. data/sig/orb/models/subscription_price_intervals_params.rbs +61 -6945
  686. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +178 -14333
  687. data/sig/orb/models/subscription_trial_info.rbs +13 -0
  688. data/sig/orb/models/tax_amount.rbs +30 -0
  689. data/sig/orb/models/threshold.rbs +13 -0
  690. data/sig/orb/models/tier.rbs +25 -0
  691. data/sig/orb/models/tier_config.rbs +26 -0
  692. data/sig/orb/models/tier_sub_line_item.rbs +55 -0
  693. data/sig/orb/models/tiered_bps_config.rbs +13 -0
  694. data/sig/orb/models/tiered_config.rbs +13 -0
  695. data/sig/orb/models/tiered_conversion_rate_config.rbs +35 -0
  696. data/sig/orb/models/transform_price_filter.rbs +56 -0
  697. data/sig/orb/models/trial_discount.rbs +4 -57
  698. data/sig/orb/models/unit_config.rbs +13 -0
  699. data/sig/orb/models/unit_conversion_rate_config.rbs +35 -0
  700. data/sig/orb/models/usage_discount.rbs +4 -57
  701. data/sig/orb/models/usage_discount_interval.rbs +55 -0
  702. data/sig/orb/models.rbs +342 -0
  703. data/sig/orb/resources/alerts.rbs +4 -4
  704. data/sig/orb/resources/customers.rbs +18 -18
  705. data/sig/orb/resources/prices.rbs +23 -13
  706. data/sig/orb/resources/subscriptions.rbs +13 -13
  707. metadata +545 -35
  708. data/lib/orb/models/subscription_cancel_response.rb +0 -1873
  709. data/lib/orb/models/subscription_create_response.rb +0 -1873
  710. data/lib/orb/models/subscription_price_intervals_response.rb +0 -1888
  711. data/lib/orb/models/subscription_redeem_coupon_response.rb +0 -1883
  712. data/lib/orb/models/subscription_schedule_plan_change_response.rb +0 -1893
  713. data/lib/orb/models/subscription_trigger_phase_response.rb +0 -1883
  714. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +0 -1897
  715. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +0 -1912
  716. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +0 -1908
  717. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +0 -1897
  718. data/lib/orb/models/subscription_update_trial_response.rb +0 -1879
  719. data/rbi/orb/models/subscription_cancel_response.rbi +0 -3537
  720. data/rbi/orb/models/subscription_create_response.rbi +0 -3537
  721. data/rbi/orb/models/subscription_price_intervals_response.rbi +0 -3564
  722. data/rbi/orb/models/subscription_redeem_coupon_response.rbi +0 -3557
  723. data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +0 -3564
  724. data/rbi/orb/models/subscription_trigger_phase_response.rbi +0 -3557
  725. data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +0 -3566
  726. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +0 -3566
  727. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +0 -3566
  728. data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +0 -3566
  729. data/rbi/orb/models/subscription_update_trial_response.rbi +0 -3556
  730. data/sig/orb/models/subscription_cancel_response.rbs +0 -1445
  731. data/sig/orb/models/subscription_create_response.rbs +0 -1445
  732. data/sig/orb/models/subscription_price_intervals_response.rbs +0 -1445
  733. data/sig/orb/models/subscription_redeem_coupon_response.rbs +0 -1445
  734. data/sig/orb/models/subscription_schedule_plan_change_response.rbs +0 -1445
  735. data/sig/orb/models/subscription_trigger_phase_response.rbs +0 -1445
  736. data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +0 -1445
  737. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +0 -1445
  738. data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +0 -1445
  739. data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +0 -1445
  740. data/sig/orb/models/subscription_update_trial_response.rbs +0 -1445
@@ -19,14 +19,10 @@ module Orb
19
19
  sig { params(auto_collection: Orb::Invoice::AutoCollection::OrHash).void }
20
20
  attr_writer :auto_collection
21
21
 
22
- sig { returns(T.nilable(Orb::Invoice::BillingAddress)) }
22
+ sig { returns(T.nilable(Orb::Address)) }
23
23
  attr_reader :billing_address
24
24
 
25
- sig do
26
- params(
27
- billing_address: T.nilable(Orb::Invoice::BillingAddress::OrHash)
28
- ).void
29
- end
25
+ sig { params(billing_address: T.nilable(Orb::Address::OrHash)).void }
30
26
  attr_writer :billing_address
31
27
 
32
28
  # The creation time of the resource in Orb.
@@ -41,10 +37,10 @@ module Orb
41
37
  sig { returns(String) }
42
38
  attr_accessor :currency
43
39
 
44
- sig { returns(Orb::Invoice::Customer) }
40
+ sig { returns(Orb::CustomerMinified) }
45
41
  attr_reader :customer
46
42
 
47
- sig { params(customer: Orb::Invoice::Customer::OrHash).void }
43
+ sig { params(customer: Orb::CustomerMinified::OrHash).void }
48
44
  attr_writer :customer
49
45
 
50
46
  sig { returns(T::Array[Orb::Invoice::CustomerBalanceTransaction]) }
@@ -155,13 +151,11 @@ module Orb
155
151
  # | Uruguay | `uy_ruc` | Uruguayan RUC Number |
156
152
  # | Venezuela | `ve_rif` | Venezuelan RIF Number |
157
153
  # | Vietnam | `vn_tin` | Vietnamese Tax ID Number |
158
- sig { returns(T.nilable(Orb::Invoice::CustomerTaxID)) }
154
+ sig { returns(T.nilable(Orb::CustomerTaxID)) }
159
155
  attr_reader :customer_tax_id
160
156
 
161
157
  sig do
162
- params(
163
- customer_tax_id: T.nilable(Orb::Invoice::CustomerTaxID::OrHash)
164
- ).void
158
+ params(customer_tax_id: T.nilable(Orb::CustomerTaxID::OrHash)).void
165
159
  end
166
160
  attr_writer :customer_tax_id
167
161
 
@@ -221,10 +215,10 @@ module Orb
221
215
  sig { returns(T::Array[Orb::Invoice::LineItem]) }
222
216
  attr_accessor :line_items
223
217
 
224
- sig { returns(T.nilable(Orb::Invoice::Maximum)) }
218
+ sig { returns(T.nilable(Orb::Maximum)) }
225
219
  attr_reader :maximum
226
220
 
227
- sig { params(maximum: T.nilable(Orb::Invoice::Maximum::OrHash)).void }
221
+ sig { params(maximum: T.nilable(Orb::Maximum::OrHash)).void }
228
222
  attr_writer :maximum
229
223
 
230
224
  sig { returns(T.nilable(String)) }
@@ -241,10 +235,10 @@ module Orb
241
235
  sig { returns(T::Hash[Symbol, String]) }
242
236
  attr_accessor :metadata
243
237
 
244
- sig { returns(T.nilable(Orb::Invoice::Minimum)) }
238
+ sig { returns(T.nilable(Orb::Minimum)) }
245
239
  attr_reader :minimum
246
240
 
247
- sig { params(minimum: T.nilable(Orb::Invoice::Minimum::OrHash)).void }
241
+ sig { params(minimum: T.nilable(Orb::Minimum::OrHash)).void }
248
242
  attr_writer :minimum
249
243
 
250
244
  sig { returns(T.nilable(String)) }
@@ -275,24 +269,20 @@ module Orb
275
269
  sig { returns(T.nilable(Time)) }
276
270
  attr_accessor :scheduled_issue_at
277
271
 
278
- sig { returns(T.nilable(Orb::Invoice::ShippingAddress)) }
272
+ sig { returns(T.nilable(Orb::Address)) }
279
273
  attr_reader :shipping_address
280
274
 
281
- sig do
282
- params(
283
- shipping_address: T.nilable(Orb::Invoice::ShippingAddress::OrHash)
284
- ).void
285
- end
275
+ sig { params(shipping_address: T.nilable(Orb::Address::OrHash)).void }
286
276
  attr_writer :shipping_address
287
277
 
288
278
  sig { returns(Orb::Invoice::Status::TaggedSymbol) }
289
279
  attr_accessor :status
290
280
 
291
- sig { returns(T.nilable(Orb::Invoice::Subscription)) }
281
+ sig { returns(T.nilable(Orb::SubscriptionMinified)) }
292
282
  attr_reader :subscription
293
283
 
294
284
  sig do
295
- params(subscription: T.nilable(Orb::Invoice::Subscription::OrHash)).void
285
+ params(subscription: T.nilable(Orb::SubscriptionMinified::OrHash)).void
296
286
  end
297
287
  attr_writer :subscription
298
288
 
@@ -330,14 +320,14 @@ module Orb
330
320
  id: String,
331
321
  amount_due: String,
332
322
  auto_collection: Orb::Invoice::AutoCollection::OrHash,
333
- billing_address: T.nilable(Orb::Invoice::BillingAddress::OrHash),
323
+ billing_address: T.nilable(Orb::Address::OrHash),
334
324
  created_at: Time,
335
325
  credit_notes: T::Array[Orb::Invoice::CreditNote::OrHash],
336
326
  currency: String,
337
- customer: Orb::Invoice::Customer::OrHash,
327
+ customer: Orb::CustomerMinified::OrHash,
338
328
  customer_balance_transactions:
339
329
  T::Array[Orb::Invoice::CustomerBalanceTransaction::OrHash],
340
- customer_tax_id: T.nilable(Orb::Invoice::CustomerTaxID::OrHash),
330
+ customer_tax_id: T.nilable(Orb::CustomerTaxID::OrHash),
341
331
  discount: T.anything,
342
332
  discounts:
343
333
  T::Array[
@@ -357,20 +347,20 @@ module Orb
357
347
  issue_failed_at: T.nilable(Time),
358
348
  issued_at: T.nilable(Time),
359
349
  line_items: T::Array[Orb::Invoice::LineItem::OrHash],
360
- maximum: T.nilable(Orb::Invoice::Maximum::OrHash),
350
+ maximum: T.nilable(Orb::Maximum::OrHash),
361
351
  maximum_amount: T.nilable(String),
362
352
  memo: T.nilable(String),
363
353
  metadata: T::Hash[Symbol, String],
364
- minimum: T.nilable(Orb::Invoice::Minimum::OrHash),
354
+ minimum: T.nilable(Orb::Minimum::OrHash),
365
355
  minimum_amount: T.nilable(String),
366
356
  paid_at: T.nilable(Time),
367
357
  payment_attempts: T::Array[Orb::Invoice::PaymentAttempt::OrHash],
368
358
  payment_failed_at: T.nilable(Time),
369
359
  payment_started_at: T.nilable(Time),
370
360
  scheduled_issue_at: T.nilable(Time),
371
- shipping_address: T.nilable(Orb::Invoice::ShippingAddress::OrHash),
361
+ shipping_address: T.nilable(Orb::Address::OrHash),
372
362
  status: Orb::Invoice::Status::OrSymbol,
373
- subscription: T.nilable(Orb::Invoice::Subscription::OrHash),
363
+ subscription: T.nilable(Orb::SubscriptionMinified::OrHash),
374
364
  subtotal: String,
375
365
  sync_failed_at: T.nilable(Time),
376
366
  total: String,
@@ -583,14 +573,14 @@ module Orb
583
573
  id: String,
584
574
  amount_due: String,
585
575
  auto_collection: Orb::Invoice::AutoCollection,
586
- billing_address: T.nilable(Orb::Invoice::BillingAddress),
576
+ billing_address: T.nilable(Orb::Address),
587
577
  created_at: Time,
588
578
  credit_notes: T::Array[Orb::Invoice::CreditNote],
589
579
  currency: String,
590
- customer: Orb::Invoice::Customer,
580
+ customer: Orb::CustomerMinified,
591
581
  customer_balance_transactions:
592
582
  T::Array[Orb::Invoice::CustomerBalanceTransaction],
593
- customer_tax_id: T.nilable(Orb::Invoice::CustomerTaxID),
583
+ customer_tax_id: T.nilable(Orb::CustomerTaxID),
594
584
  discount: T.anything,
595
585
  discounts: T::Array[Orb::InvoiceLevelDiscount::Variants],
596
586
  due_date: T.nilable(Time),
@@ -603,20 +593,20 @@ module Orb
603
593
  issue_failed_at: T.nilable(Time),
604
594
  issued_at: T.nilable(Time),
605
595
  line_items: T::Array[Orb::Invoice::LineItem],
606
- maximum: T.nilable(Orb::Invoice::Maximum),
596
+ maximum: T.nilable(Orb::Maximum),
607
597
  maximum_amount: T.nilable(String),
608
598
  memo: T.nilable(String),
609
599
  metadata: T::Hash[Symbol, String],
610
- minimum: T.nilable(Orb::Invoice::Minimum),
600
+ minimum: T.nilable(Orb::Minimum),
611
601
  minimum_amount: T.nilable(String),
612
602
  paid_at: T.nilable(Time),
613
603
  payment_attempts: T::Array[Orb::Invoice::PaymentAttempt],
614
604
  payment_failed_at: T.nilable(Time),
615
605
  payment_started_at: T.nilable(Time),
616
606
  scheduled_issue_at: T.nilable(Time),
617
- shipping_address: T.nilable(Orb::Invoice::ShippingAddress),
607
+ shipping_address: T.nilable(Orb::Address),
618
608
  status: Orb::Invoice::Status::TaggedSymbol,
619
- subscription: T.nilable(Orb::Invoice::Subscription),
609
+ subscription: T.nilable(Orb::SubscriptionMinified),
620
610
  subtotal: String,
621
611
  sync_failed_at: T.nilable(Time),
622
612
  total: String,
@@ -698,59 +688,6 @@ module Orb
698
688
  end
699
689
  end
700
690
 
701
- class BillingAddress < Orb::Internal::Type::BaseModel
702
- OrHash =
703
- T.type_alias do
704
- T.any(Orb::Invoice::BillingAddress, Orb::Internal::AnyHash)
705
- end
706
-
707
- sig { returns(T.nilable(String)) }
708
- attr_accessor :city
709
-
710
- sig { returns(T.nilable(String)) }
711
- attr_accessor :country
712
-
713
- sig { returns(T.nilable(String)) }
714
- attr_accessor :line1
715
-
716
- sig { returns(T.nilable(String)) }
717
- attr_accessor :line2
718
-
719
- sig { returns(T.nilable(String)) }
720
- attr_accessor :postal_code
721
-
722
- sig { returns(T.nilable(String)) }
723
- attr_accessor :state
724
-
725
- sig do
726
- params(
727
- city: T.nilable(String),
728
- country: T.nilable(String),
729
- line1: T.nilable(String),
730
- line2: T.nilable(String),
731
- postal_code: T.nilable(String),
732
- state: T.nilable(String)
733
- ).returns(T.attached_class)
734
- end
735
- def self.new(city:, country:, line1:, line2:, postal_code:, state:)
736
- end
737
-
738
- sig do
739
- override.returns(
740
- {
741
- city: T.nilable(String),
742
- country: T.nilable(String),
743
- line1: T.nilable(String),
744
- line2: T.nilable(String),
745
- postal_code: T.nilable(String),
746
- state: T.nilable(String)
747
- }
748
- )
749
- end
750
- def to_hash
751
- end
752
- end
753
-
754
691
  class CreditNote < Orb::Internal::Type::BaseModel
755
692
  OrHash =
756
693
  T.type_alias do
@@ -823,33 +760,6 @@ module Orb
823
760
  end
824
761
  end
825
762
 
826
- class Customer < Orb::Internal::Type::BaseModel
827
- OrHash =
828
- T.type_alias { T.any(Orb::Invoice::Customer, Orb::Internal::AnyHash) }
829
-
830
- sig { returns(String) }
831
- attr_accessor :id
832
-
833
- sig { returns(T.nilable(String)) }
834
- attr_accessor :external_customer_id
835
-
836
- sig do
837
- params(id: String, external_customer_id: T.nilable(String)).returns(
838
- T.attached_class
839
- )
840
- end
841
- def self.new(id:, external_customer_id:)
842
- end
843
-
844
- sig do
845
- override.returns(
846
- { id: String, external_customer_id: T.nilable(String) }
847
- )
848
- end
849
- def to_hash
850
- end
851
- end
852
-
853
763
  class CustomerBalanceTransaction < Orb::Internal::Type::BaseModel
854
764
  OrHash =
855
765
  T.type_alias do
@@ -878,21 +788,10 @@ module Orb
878
788
  sig { returns(Time) }
879
789
  attr_accessor :created_at
880
790
 
881
- sig do
882
- returns(
883
- T.nilable(Orb::Invoice::CustomerBalanceTransaction::CreditNote)
884
- )
885
- end
791
+ sig { returns(T.nilable(Orb::CreditNoteTiny)) }
886
792
  attr_reader :credit_note
887
793
 
888
- sig do
889
- params(
890
- credit_note:
891
- T.nilable(
892
- Orb::Invoice::CustomerBalanceTransaction::CreditNote::OrHash
893
- )
894
- ).void
895
- end
794
+ sig { params(credit_note: T.nilable(Orb::CreditNoteTiny::OrHash)).void }
896
795
  attr_writer :credit_note
897
796
 
898
797
  # An optional description provided for manual customer balance adjustments.
@@ -904,19 +803,10 @@ module Orb
904
803
  sig { returns(String) }
905
804
  attr_accessor :ending_balance
906
805
 
907
- sig do
908
- returns(T.nilable(Orb::Invoice::CustomerBalanceTransaction::Invoice))
909
- end
806
+ sig { returns(T.nilable(Orb::InvoiceTiny)) }
910
807
  attr_reader :invoice
911
808
 
912
- sig do
913
- params(
914
- invoice:
915
- T.nilable(
916
- Orb::Invoice::CustomerBalanceTransaction::Invoice::OrHash
917
- )
918
- ).void
919
- end
809
+ sig { params(invoice: T.nilable(Orb::InvoiceTiny::OrHash)).void }
920
810
  attr_writer :invoice
921
811
 
922
812
  # The original value of the customer's balance prior to the transaction, in the
@@ -935,16 +825,10 @@ module Orb
935
825
  action: Orb::Invoice::CustomerBalanceTransaction::Action::OrSymbol,
936
826
  amount: String,
937
827
  created_at: Time,
938
- credit_note:
939
- T.nilable(
940
- Orb::Invoice::CustomerBalanceTransaction::CreditNote::OrHash
941
- ),
828
+ credit_note: T.nilable(Orb::CreditNoteTiny::OrHash),
942
829
  description: T.nilable(String),
943
830
  ending_balance: String,
944
- invoice:
945
- T.nilable(
946
- Orb::Invoice::CustomerBalanceTransaction::Invoice::OrHash
947
- ),
831
+ invoice: T.nilable(Orb::InvoiceTiny::OrHash),
948
832
  starting_balance: String,
949
833
  type: Orb::Invoice::CustomerBalanceTransaction::Type::OrSymbol
950
834
  ).returns(T.attached_class)
@@ -979,12 +863,10 @@ module Orb
979
863
  Orb::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol,
980
864
  amount: String,
981
865
  created_at: Time,
982
- credit_note:
983
- T.nilable(Orb::Invoice::CustomerBalanceTransaction::CreditNote),
866
+ credit_note: T.nilable(Orb::CreditNoteTiny),
984
867
  description: T.nilable(String),
985
868
  ending_balance: String,
986
- invoice:
987
- T.nilable(Orb::Invoice::CustomerBalanceTransaction::Invoice),
869
+ invoice: T.nilable(Orb::InvoiceTiny),
988
870
  starting_balance: String,
989
871
  type: Orb::Invoice::CustomerBalanceTransaction::Type::TaggedSymbol
990
872
  }
@@ -1059,56 +941,6 @@ module Orb
1059
941
  end
1060
942
  end
1061
943
 
1062
- class CreditNote < Orb::Internal::Type::BaseModel
1063
- OrHash =
1064
- T.type_alias do
1065
- T.any(
1066
- Orb::Invoice::CustomerBalanceTransaction::CreditNote,
1067
- Orb::Internal::AnyHash
1068
- )
1069
- end
1070
-
1071
- # The id of the Credit note
1072
- sig { returns(String) }
1073
- attr_accessor :id
1074
-
1075
- sig { params(id: String).returns(T.attached_class) }
1076
- def self.new(
1077
- # The id of the Credit note
1078
- id:
1079
- )
1080
- end
1081
-
1082
- sig { override.returns({ id: String }) }
1083
- def to_hash
1084
- end
1085
- end
1086
-
1087
- class Invoice < Orb::Internal::Type::BaseModel
1088
- OrHash =
1089
- T.type_alias do
1090
- T.any(
1091
- Orb::Invoice::CustomerBalanceTransaction::Invoice,
1092
- Orb::Internal::AnyHash
1093
- )
1094
- end
1095
-
1096
- # The Invoice id
1097
- sig { returns(String) }
1098
- attr_accessor :id
1099
-
1100
- sig { params(id: String).returns(T.attached_class) }
1101
- def self.new(
1102
- # The Invoice id
1103
- id:
1104
- )
1105
- end
1106
-
1107
- sig { override.returns({ id: String }) }
1108
- def to_hash
1109
- end
1110
- end
1111
-
1112
944
  module Type
1113
945
  extend Orb::Internal::Type::Enum
1114
946
 
@@ -1141,436 +973,43 @@ module Orb
1141
973
  end
1142
974
  end
1143
975
 
1144
- class CustomerTaxID < Orb::Internal::Type::BaseModel
1145
- OrHash =
1146
- T.type_alias do
1147
- T.any(Orb::Invoice::CustomerTaxID, Orb::Internal::AnyHash)
1148
- end
1149
-
1150
- sig { returns(Orb::Invoice::CustomerTaxID::Country::TaggedSymbol) }
1151
- attr_accessor :country
976
+ module InvoiceSource
977
+ extend Orb::Internal::Type::Enum
1152
978
 
1153
- sig { returns(Orb::Invoice::CustomerTaxID::Type::TaggedSymbol) }
1154
- attr_accessor :type
979
+ TaggedSymbol =
980
+ T.type_alias { T.all(Symbol, Orb::Invoice::InvoiceSource) }
981
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1155
982
 
1156
- sig { returns(String) }
1157
- attr_accessor :value
983
+ SUBSCRIPTION =
984
+ T.let(:subscription, Orb::Invoice::InvoiceSource::TaggedSymbol)
985
+ PARTIAL = T.let(:partial, Orb::Invoice::InvoiceSource::TaggedSymbol)
986
+ ONE_OFF = T.let(:one_off, Orb::Invoice::InvoiceSource::TaggedSymbol)
1158
987
 
1159
- # Tax IDs are commonly required to be displayed on customer invoices, which are
1160
- # added to the headers of invoices.
1161
- #
1162
- # ### Supported Tax ID Countries and Types
1163
- #
1164
- # | Country | Type | Description |
1165
- # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
1166
- # | Andorra | `ad_nrt` | Andorran NRT Number |
1167
- # | Argentina | `ar_cuit` | Argentinian Tax ID Number |
1168
- # | Australia | `au_abn` | Australian Business Number (AU ABN) |
1169
- # | Australia | `au_arn` | Australian Taxation Office Reference Number |
1170
- # | Austria | `eu_vat` | European VAT Number |
1171
- # | Bahrain | `bh_vat` | Bahraini VAT Number |
1172
- # | Belgium | `eu_vat` | European VAT Number |
1173
- # | Bolivia | `bo_tin` | Bolivian Tax ID |
1174
- # | Brazil | `br_cnpj` | Brazilian CNPJ Number |
1175
- # | Brazil | `br_cpf` | Brazilian CPF Number |
1176
- # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
1177
- # | Bulgaria | `eu_vat` | European VAT Number |
1178
- # | Canada | `ca_bn` | Canadian BN |
1179
- # | Canada | `ca_gst_hst` | Canadian GST/HST Number |
1180
- # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) |
1181
- # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) |
1182
- # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) |
1183
- # | Canada | `ca_qst` | Canadian QST Number (Québec) |
1184
- # | Chile | `cl_tin` | Chilean TIN |
1185
- # | China | `cn_tin` | Chinese Tax ID |
1186
- # | Colombia | `co_nit` | Colombian NIT Number |
1187
- # | Costa Rica | `cr_tin` | Costa Rican Tax ID |
1188
- # | Croatia | `eu_vat` | European VAT Number |
1189
- # | Cyprus | `eu_vat` | European VAT Number |
1190
- # | Czech Republic | `eu_vat` | European VAT Number |
1191
- # | Denmark | `eu_vat` | European VAT Number |
1192
- # | Dominican Republic | `do_rcn` | Dominican RCN Number |
1193
- # | Ecuador | `ec_ruc` | Ecuadorian RUC Number |
1194
- # | Egypt | `eg_tin` | Egyptian Tax Identification Number |
1195
- # | El Salvador | `sv_nit` | El Salvadorian NIT Number |
1196
- # | Estonia | `eu_vat` | European VAT Number |
1197
- # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
1198
- # | Finland | `eu_vat` | European VAT Number |
1199
- # | France | `eu_vat` | European VAT Number |
1200
- # | Georgia | `ge_vat` | Georgian VAT |
1201
- # | Germany | `eu_vat` | European VAT Number |
1202
- # | Greece | `eu_vat` | European VAT Number |
1203
- # | Hong Kong | `hk_br` | Hong Kong BR Number |
1204
- # | Hungary | `eu_vat` | European VAT Number |
1205
- # | Hungary | `hu_tin` | Hungary Tax Number (adószám) |
1206
- # | Iceland | `is_vat` | Icelandic VAT |
1207
- # | India | `in_gst` | Indian GST Number |
1208
- # | Indonesia | `id_npwp` | Indonesian NPWP Number |
1209
- # | Ireland | `eu_vat` | European VAT Number |
1210
- # | Israel | `il_vat` | Israel VAT |
1211
- # | Italy | `eu_vat` | European VAT Number |
1212
- # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
1213
- # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
1214
- # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
1215
- # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number |
1216
- # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
1217
- # | Latvia | `eu_vat` | European VAT Number |
1218
- # | Liechtenstein | `li_uid` | Liechtensteinian UID Number |
1219
- # | Lithuania | `eu_vat` | European VAT Number |
1220
- # | Luxembourg | `eu_vat` | European VAT Number |
1221
- # | Malaysia | `my_frp` | Malaysian FRP Number |
1222
- # | Malaysia | `my_itn` | Malaysian ITN |
1223
- # | Malaysia | `my_sst` | Malaysian SST Number |
1224
- # | Malta | `eu_vat ` | European VAT Number |
1225
- # | Mexico | `mx_rfc` | Mexican RFC Number |
1226
- # | Netherlands | `eu_vat` | European VAT Number |
1227
- # | New Zealand | `nz_gst` | New Zealand GST Number |
1228
- # | Nigeria | `ng_tin` | Nigerian Tax Identification Number |
1229
- # | Norway | `no_vat` | Norwegian VAT Number |
1230
- # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
1231
- # | Oman | `om_vat` | Omani VAT Number |
1232
- # | Peru | `pe_ruc` | Peruvian RUC Number |
1233
- # | Philippines | `ph_tin ` | Philippines Tax Identification Number |
1234
- # | Poland | `eu_vat` | European VAT Number |
1235
- # | Portugal | `eu_vat` | European VAT Number |
1236
- # | Romania | `eu_vat` | European VAT Number |
1237
- # | Romania | `ro_tin` | Romanian Tax ID Number |
1238
- # | Russia | `ru_inn` | Russian INN |
1239
- # | Russia | `ru_kpp` | Russian KPP |
1240
- # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT |
1241
- # | Serbia | `rs_pib` | Serbian PIB Number |
1242
- # | Singapore | `sg_gst` | Singaporean GST |
1243
- # | Singapore | `sg_uen` | Singaporean UEN |
1244
- # | Slovakia | `eu_vat` | European VAT Number |
1245
- # | Slovenia | `eu_vat` | European VAT Number |
1246
- # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) |
1247
- # | South Africa | `za_vat` | South African VAT Number |
1248
- # | South Korea | `kr_brn` | Korean BRN |
1249
- # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
1250
- # | Spain | `eu_vat` | European VAT Number |
1251
- # | Sweden | `eu_vat` | European VAT Number |
1252
- # | Switzerland | `ch_vat` | Switzerland VAT Number |
1253
- # | Taiwan | `tw_vat` | Taiwanese VAT |
1254
- # | Thailand | `th_vat` | Thai VAT |
1255
- # | Turkey | `tr_tin` | Turkish Tax Identification Number |
1256
- # | Ukraine | `ua_vat` | Ukrainian VAT |
1257
- # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
1258
- # | United Kingdom | `eu_vat` | Northern Ireland VAT Number |
1259
- # | United Kingdom | `gb_vat` | United Kingdom VAT Number |
1260
- # | United States | `us_ein` | United States EIN |
1261
- # | Uruguay | `uy_ruc` | Uruguayan RUC Number |
1262
- # | Venezuela | `ve_rif` | Venezuelan RIF Number |
1263
- # | Vietnam | `vn_tin` | Vietnamese Tax ID Number |
1264
988
  sig do
1265
- params(
1266
- country: Orb::Invoice::CustomerTaxID::Country::OrSymbol,
1267
- type: Orb::Invoice::CustomerTaxID::Type::OrSymbol,
1268
- value: String
1269
- ).returns(T.attached_class)
989
+ override.returns(T::Array[Orb::Invoice::InvoiceSource::TaggedSymbol])
1270
990
  end
1271
- def self.new(country:, type:, value:)
991
+ def self.values
1272
992
  end
993
+ end
1273
994
 
1274
- sig do
1275
- override.returns(
1276
- {
1277
- country: Orb::Invoice::CustomerTaxID::Country::TaggedSymbol,
1278
- type: Orb::Invoice::CustomerTaxID::Type::TaggedSymbol,
1279
- value: String
1280
- }
1281
- )
1282
- end
1283
- def to_hash
1284
- end
995
+ class LineItem < Orb::Internal::Type::BaseModel
996
+ OrHash =
997
+ T.type_alias { T.any(Orb::Invoice::LineItem, Orb::Internal::AnyHash) }
1285
998
 
1286
- module Country
1287
- extend Orb::Internal::Type::Enum
999
+ # A unique ID for this line item.
1000
+ sig { returns(String) }
1001
+ attr_accessor :id
1288
1002
 
1289
- TaggedSymbol =
1290
- T.type_alias { T.all(Symbol, Orb::Invoice::CustomerTaxID::Country) }
1291
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1003
+ # The line amount after any adjustments and before overage conversion, credits and
1004
+ # partial invoicing.
1005
+ sig { returns(String) }
1006
+ attr_accessor :adjusted_subtotal
1292
1007
 
1293
- AD = T.let(:AD, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1294
- AE = T.let(:AE, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1295
- AR = T.let(:AR, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1296
- AT = T.let(:AT, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1297
- AU = T.let(:AU, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1298
- BE = T.let(:BE, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1299
- BG = T.let(:BG, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1300
- BH = T.let(:BH, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1301
- BO = T.let(:BO, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1302
- BR = T.let(:BR, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1303
- CA = T.let(:CA, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1304
- CH = T.let(:CH, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1305
- CL = T.let(:CL, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1306
- CN = T.let(:CN, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1307
- CO = T.let(:CO, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1308
- CR = T.let(:CR, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1309
- CY = T.let(:CY, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1310
- CZ = T.let(:CZ, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1311
- DE = T.let(:DE, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1312
- DK = T.let(:DK, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1313
- EE = T.let(:EE, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1314
- DO = T.let(:DO, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1315
- EC = T.let(:EC, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1316
- EG = T.let(:EG, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1317
- ES = T.let(:ES, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1318
- EU = T.let(:EU, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1319
- FI = T.let(:FI, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1320
- FR = T.let(:FR, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1321
- GB = T.let(:GB, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1322
- GE = T.let(:GE, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1323
- GR = T.let(:GR, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1324
- HK = T.let(:HK, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1325
- HR = T.let(:HR, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1326
- HU = T.let(:HU, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1327
- ID = T.let(:ID, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1328
- IE = T.let(:IE, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1329
- IL = T.let(:IL, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1330
- IN = T.let(:IN, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1331
- IS = T.let(:IS, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1332
- IT = T.let(:IT, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1333
- JP = T.let(:JP, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1334
- KE = T.let(:KE, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1335
- KR = T.let(:KR, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1336
- KZ = T.let(:KZ, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1337
- LI = T.let(:LI, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1338
- LT = T.let(:LT, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1339
- LU = T.let(:LU, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1340
- LV = T.let(:LV, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1341
- MT = T.let(:MT, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1342
- MX = T.let(:MX, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1343
- MY = T.let(:MY, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1344
- NG = T.let(:NG, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1345
- NL = T.let(:NL, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1346
- NO = T.let(:NO, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1347
- NZ = T.let(:NZ, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1348
- OM = T.let(:OM, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1349
- PE = T.let(:PE, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1350
- PH = T.let(:PH, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1351
- PL = T.let(:PL, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1352
- PT = T.let(:PT, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1353
- RO = T.let(:RO, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1354
- RS = T.let(:RS, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1355
- RU = T.let(:RU, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1356
- SA = T.let(:SA, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1357
- SE = T.let(:SE, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1358
- SG = T.let(:SG, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1359
- SI = T.let(:SI, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1360
- SK = T.let(:SK, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1361
- SV = T.let(:SV, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1362
- TH = T.let(:TH, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1363
- TR = T.let(:TR, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1364
- TW = T.let(:TW, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1365
- UA = T.let(:UA, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1366
- US = T.let(:US, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1367
- UY = T.let(:UY, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1368
- VE = T.let(:VE, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1369
- VN = T.let(:VN, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1370
- ZA = T.let(:ZA, Orb::Invoice::CustomerTaxID::Country::TaggedSymbol)
1371
-
1372
- sig do
1373
- override.returns(
1374
- T::Array[Orb::Invoice::CustomerTaxID::Country::TaggedSymbol]
1375
- )
1376
- end
1377
- def self.values
1378
- end
1379
- end
1380
-
1381
- module Type
1382
- extend Orb::Internal::Type::Enum
1383
-
1384
- TaggedSymbol =
1385
- T.type_alias { T.all(Symbol, Orb::Invoice::CustomerTaxID::Type) }
1386
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1387
-
1388
- AD_NRT =
1389
- T.let(:ad_nrt, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1390
- AE_TRN =
1391
- T.let(:ae_trn, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1392
- AR_CUIT =
1393
- T.let(:ar_cuit, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1394
- EU_VAT =
1395
- T.let(:eu_vat, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1396
- AU_ABN =
1397
- T.let(:au_abn, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1398
- AU_ARN =
1399
- T.let(:au_arn, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1400
- BG_UIC =
1401
- T.let(:bg_uic, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1402
- BH_VAT =
1403
- T.let(:bh_vat, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1404
- BO_TIN =
1405
- T.let(:bo_tin, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1406
- BR_CNPJ =
1407
- T.let(:br_cnpj, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1408
- BR_CPF =
1409
- T.let(:br_cpf, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1410
- CA_BN = T.let(:ca_bn, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1411
- CA_GST_HST =
1412
- T.let(:ca_gst_hst, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1413
- CA_PST_BC =
1414
- T.let(:ca_pst_bc, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1415
- CA_PST_MB =
1416
- T.let(:ca_pst_mb, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1417
- CA_PST_SK =
1418
- T.let(:ca_pst_sk, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1419
- CA_QST =
1420
- T.let(:ca_qst, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1421
- CH_VAT =
1422
- T.let(:ch_vat, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1423
- CL_TIN =
1424
- T.let(:cl_tin, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1425
- CN_TIN =
1426
- T.let(:cn_tin, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1427
- CO_NIT =
1428
- T.let(:co_nit, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1429
- CR_TIN =
1430
- T.let(:cr_tin, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1431
- DO_RCN =
1432
- T.let(:do_rcn, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1433
- EC_RUC =
1434
- T.let(:ec_ruc, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1435
- EG_TIN =
1436
- T.let(:eg_tin, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1437
- ES_CIF =
1438
- T.let(:es_cif, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1439
- EU_OSS_VAT =
1440
- T.let(:eu_oss_vat, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1441
- GB_VAT =
1442
- T.let(:gb_vat, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1443
- GE_VAT =
1444
- T.let(:ge_vat, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1445
- HK_BR = T.let(:hk_br, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1446
- HU_TIN =
1447
- T.let(:hu_tin, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1448
- ID_NPWP =
1449
- T.let(:id_npwp, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1450
- IL_VAT =
1451
- T.let(:il_vat, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1452
- IN_GST =
1453
- T.let(:in_gst, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1454
- IS_VAT =
1455
- T.let(:is_vat, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1456
- JP_CN = T.let(:jp_cn, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1457
- JP_RN = T.let(:jp_rn, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1458
- JP_TRN =
1459
- T.let(:jp_trn, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1460
- KE_PIN =
1461
- T.let(:ke_pin, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1462
- KR_BRN =
1463
- T.let(:kr_brn, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1464
- KZ_BIN =
1465
- T.let(:kz_bin, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1466
- LI_UID =
1467
- T.let(:li_uid, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1468
- MX_RFC =
1469
- T.let(:mx_rfc, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1470
- MY_FRP =
1471
- T.let(:my_frp, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1472
- MY_ITN =
1473
- T.let(:my_itn, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1474
- MY_SST =
1475
- T.let(:my_sst, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1476
- NG_TIN =
1477
- T.let(:ng_tin, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1478
- NO_VAT =
1479
- T.let(:no_vat, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1480
- NO_VOEC =
1481
- T.let(:no_voec, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1482
- NZ_GST =
1483
- T.let(:nz_gst, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1484
- OM_VAT =
1485
- T.let(:om_vat, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1486
- PE_RUC =
1487
- T.let(:pe_ruc, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1488
- PH_TIN =
1489
- T.let(:ph_tin, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1490
- RO_TIN =
1491
- T.let(:ro_tin, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1492
- RS_PIB =
1493
- T.let(:rs_pib, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1494
- RU_INN =
1495
- T.let(:ru_inn, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1496
- RU_KPP =
1497
- T.let(:ru_kpp, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1498
- SA_VAT =
1499
- T.let(:sa_vat, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1500
- SG_GST =
1501
- T.let(:sg_gst, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1502
- SG_UEN =
1503
- T.let(:sg_uen, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1504
- SI_TIN =
1505
- T.let(:si_tin, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1506
- SV_NIT =
1507
- T.let(:sv_nit, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1508
- TH_VAT =
1509
- T.let(:th_vat, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1510
- TR_TIN =
1511
- T.let(:tr_tin, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1512
- TW_VAT =
1513
- T.let(:tw_vat, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1514
- UA_VAT =
1515
- T.let(:ua_vat, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1516
- US_EIN =
1517
- T.let(:us_ein, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1518
- UY_RUC =
1519
- T.let(:uy_ruc, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1520
- VE_RIF =
1521
- T.let(:ve_rif, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1522
- VN_TIN =
1523
- T.let(:vn_tin, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1524
- ZA_VAT =
1525
- T.let(:za_vat, Orb::Invoice::CustomerTaxID::Type::TaggedSymbol)
1526
-
1527
- sig do
1528
- override.returns(
1529
- T::Array[Orb::Invoice::CustomerTaxID::Type::TaggedSymbol]
1530
- )
1531
- end
1532
- def self.values
1533
- end
1534
- end
1535
- end
1536
-
1537
- module InvoiceSource
1538
- extend Orb::Internal::Type::Enum
1539
-
1540
- TaggedSymbol =
1541
- T.type_alias { T.all(Symbol, Orb::Invoice::InvoiceSource) }
1542
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1543
-
1544
- SUBSCRIPTION =
1545
- T.let(:subscription, Orb::Invoice::InvoiceSource::TaggedSymbol)
1546
- PARTIAL = T.let(:partial, Orb::Invoice::InvoiceSource::TaggedSymbol)
1547
- ONE_OFF = T.let(:one_off, Orb::Invoice::InvoiceSource::TaggedSymbol)
1548
-
1549
- sig do
1550
- override.returns(T::Array[Orb::Invoice::InvoiceSource::TaggedSymbol])
1551
- end
1552
- def self.values
1553
- end
1554
- end
1555
-
1556
- class LineItem < Orb::Internal::Type::BaseModel
1557
- OrHash =
1558
- T.type_alias { T.any(Orb::Invoice::LineItem, Orb::Internal::AnyHash) }
1559
-
1560
- # A unique ID for this line item.
1561
- sig { returns(String) }
1562
- attr_accessor :id
1563
-
1564
- # The line amount after any adjustments and before overage conversion, credits and
1565
- # partial invoicing.
1566
- sig { returns(String) }
1567
- attr_accessor :adjusted_subtotal
1568
-
1569
- # All adjustments applied to the line item in the order they were applied based on
1570
- # invoice calculations (ie. usage discounts -> amount discounts -> percentage
1571
- # discounts -> minimums -> maximums).
1572
- sig { returns(T::Array[Orb::Invoice::LineItem::Adjustment::Variants]) }
1573
- attr_accessor :adjustments
1008
+ # All adjustments applied to the line item in the order they were applied based on
1009
+ # invoice calculations (ie. usage discounts -> amount discounts -> percentage
1010
+ # discounts -> minimums -> maximums).
1011
+ sig { returns(T::Array[Orb::Invoice::LineItem::Adjustment::Variants]) }
1012
+ attr_accessor :adjustments
1574
1013
 
1575
1014
  # The final amount for a line item after all adjustments and pre paid credits have
1576
1015
  # been applied.
@@ -1599,14 +1038,10 @@ module Orb
1599
1038
  attr_accessor :grouping
1600
1039
 
1601
1040
  # This field is deprecated in favor of `adjustments`.
1602
- sig { returns(T.nilable(Orb::Invoice::LineItem::Maximum)) }
1041
+ sig { returns(T.nilable(Orb::Maximum)) }
1603
1042
  attr_reader :maximum
1604
1043
 
1605
- sig do
1606
- params(
1607
- maximum: T.nilable(Orb::Invoice::LineItem::Maximum::OrHash)
1608
- ).void
1609
- end
1044
+ sig { params(maximum: T.nilable(Orb::Maximum::OrHash)).void }
1610
1045
  attr_writer :maximum
1611
1046
 
1612
1047
  # This field is deprecated in favor of `adjustments`.
@@ -1614,14 +1049,10 @@ module Orb
1614
1049
  attr_accessor :maximum_amount
1615
1050
 
1616
1051
  # This field is deprecated in favor of `adjustments`.
1617
- sig { returns(T.nilable(Orb::Invoice::LineItem::Minimum)) }
1052
+ sig { returns(T.nilable(Orb::Minimum)) }
1618
1053
  attr_reader :minimum
1619
1054
 
1620
- sig do
1621
- params(
1622
- minimum: T.nilable(Orb::Invoice::LineItem::Minimum::OrHash)
1623
- ).void
1624
- end
1055
+ sig { params(minimum: T.nilable(Orb::Minimum::OrHash)).void }
1625
1056
  attr_writer :minimum
1626
1057
 
1627
1058
  # This field is deprecated in favor of `adjustments`.
@@ -1668,7 +1099,7 @@ module Orb
1668
1099
 
1669
1100
  # An array of tax rates and their incurred tax amounts. Empty if no tax
1670
1101
  # integration is configured.
1671
- sig { returns(T::Array[Orb::Invoice::LineItem::TaxAmount]) }
1102
+ sig { returns(T::Array[Orb::TaxAmount]) }
1672
1103
  attr_accessor :tax_amounts
1673
1104
 
1674
1105
  # A list of customer ids that were used to calculate the usage for this line item.
@@ -1682,11 +1113,11 @@ module Orb
1682
1113
  adjustments:
1683
1114
  T::Array[
1684
1115
  T.any(
1685
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::OrHash,
1686
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::OrHash,
1687
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::OrHash,
1688
- Orb::Invoice::LineItem::Adjustment::Minimum::OrHash,
1689
- Orb::Invoice::LineItem::Adjustment::Maximum::OrHash
1116
+ Orb::MonetaryUsageDiscountAdjustment::OrHash,
1117
+ Orb::MonetaryAmountDiscountAdjustment::OrHash,
1118
+ Orb::MonetaryPercentageDiscountAdjustment::OrHash,
1119
+ Orb::MonetaryMinimumAdjustment::OrHash,
1120
+ Orb::MonetaryMaximumAdjustment::OrHash
1690
1121
  )
1691
1122
  ],
1692
1123
  amount: String,
@@ -1703,9 +1134,9 @@ module Orb
1703
1134
  end_date: Time,
1704
1135
  filter: T.nilable(String),
1705
1136
  grouping: T.nilable(String),
1706
- maximum: T.nilable(Orb::Invoice::LineItem::Maximum::OrHash),
1137
+ maximum: T.nilable(Orb::Maximum::OrHash),
1707
1138
  maximum_amount: T.nilable(String),
1708
- minimum: T.nilable(Orb::Invoice::LineItem::Minimum::OrHash),
1139
+ minimum: T.nilable(Orb::Minimum::OrHash),
1709
1140
  minimum_amount: T.nilable(String),
1710
1141
  name: String,
1711
1142
  partially_invoiced_amount: String,
@@ -1715,9 +1146,9 @@ module Orb
1715
1146
  Orb::Price::Package::OrHash,
1716
1147
  Orb::Price::Matrix::OrHash,
1717
1148
  Orb::Price::Tiered::OrHash,
1718
- Orb::Price::TieredBps::OrHash,
1719
- Orb::Price::Bps::OrHash,
1720
- Orb::Price::BulkBps::OrHash,
1149
+ Orb::Price::TieredBPS::OrHash,
1150
+ Orb::Price::BPS::OrHash,
1151
+ Orb::Price::BulkBPS::OrHash,
1721
1152
  Orb::Price::Bulk::OrHash,
1722
1153
  Orb::Price::ThresholdTotalAmount::OrHash,
1723
1154
  Orb::Price::TieredPackage::OrHash,
@@ -1745,13 +1176,13 @@ module Orb
1745
1176
  sub_line_items:
1746
1177
  T::Array[
1747
1178
  T.any(
1748
- Orb::Invoice::LineItem::SubLineItem::Matrix::OrHash,
1749
- Orb::Invoice::LineItem::SubLineItem::Tier::OrHash,
1750
- Orb::Invoice::LineItem::SubLineItem::Null::OrHash
1179
+ Orb::MatrixSubLineItem::OrHash,
1180
+ Orb::TierSubLineItem::OrHash,
1181
+ Orb::OtherSubLineItem::OrHash
1751
1182
  )
1752
1183
  ],
1753
1184
  subtotal: String,
1754
- tax_amounts: T::Array[Orb::Invoice::LineItem::TaxAmount::OrHash],
1185
+ tax_amounts: T::Array[Orb::TaxAmount::OrHash],
1755
1186
  usage_customer_ids: T.nilable(T::Array[String])
1756
1187
  ).returns(T.attached_class)
1757
1188
  end
@@ -1832,9 +1263,9 @@ module Orb
1832
1263
  end_date: Time,
1833
1264
  filter: T.nilable(String),
1834
1265
  grouping: T.nilable(String),
1835
- maximum: T.nilable(Orb::Invoice::LineItem::Maximum),
1266
+ maximum: T.nilable(Orb::Maximum),
1836
1267
  maximum_amount: T.nilable(String),
1837
- minimum: T.nilable(Orb::Invoice::LineItem::Minimum),
1268
+ minimum: T.nilable(Orb::Minimum),
1838
1269
  minimum_amount: T.nilable(String),
1839
1270
  name: String,
1840
1271
  partially_invoiced_amount: String,
@@ -1844,7 +1275,7 @@ module Orb
1844
1275
  sub_line_items:
1845
1276
  T::Array[Orb::Invoice::LineItem::SubLineItem::Variants],
1846
1277
  subtotal: String,
1847
- tax_amounts: T::Array[Orb::Invoice::LineItem::TaxAmount],
1278
+ tax_amounts: T::Array[Orb::TaxAmount],
1848
1279
  usage_customer_ids: T.nilable(T::Array[String])
1849
1280
  }
1850
1281
  )
@@ -1858,2707 +1289,161 @@ module Orb
1858
1289
  Variants =
1859
1290
  T.type_alias do
1860
1291
  T.any(
1861
- Orb::Invoice::LineItem::Adjustment::UsageDiscount,
1862
- Orb::Invoice::LineItem::Adjustment::AmountDiscount,
1863
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount,
1864
- Orb::Invoice::LineItem::Adjustment::Minimum,
1865
- Orb::Invoice::LineItem::Adjustment::Maximum
1292
+ Orb::MonetaryUsageDiscountAdjustment,
1293
+ Orb::MonetaryAmountDiscountAdjustment,
1294
+ Orb::MonetaryPercentageDiscountAdjustment,
1295
+ Orb::MonetaryMinimumAdjustment,
1296
+ Orb::MonetaryMaximumAdjustment
1866
1297
  )
1867
1298
  end
1868
1299
 
1869
- class UsageDiscount < Orb::Internal::Type::BaseModel
1870
- OrHash =
1871
- T.type_alias do
1872
- T.any(
1873
- Orb::Invoice::LineItem::Adjustment::UsageDiscount,
1874
- Orb::Internal::AnyHash
1875
- )
1876
- end
1877
-
1878
- sig { returns(String) }
1879
- attr_accessor :id
1880
-
1881
- sig { returns(Symbol) }
1882
- attr_accessor :adjustment_type
1883
-
1884
- # The value applied by an adjustment.
1885
- sig { returns(String) }
1886
- attr_accessor :amount
1887
-
1888
- # The price IDs that this adjustment applies to.
1889
- sig { returns(T::Array[String]) }
1890
- attr_accessor :applies_to_price_ids
1891
-
1892
- # The filters that determine which prices to apply this adjustment to.
1893
- sig do
1894
- returns(
1895
- T::Array[
1896
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter
1897
- ]
1898
- )
1899
- end
1900
- attr_accessor :filters
1901
-
1902
- # True for adjustments that apply to an entire invocice, false for adjustments
1903
- # that apply to only one price.
1904
- sig { returns(T::Boolean) }
1905
- attr_accessor :is_invoice_level
1906
-
1907
- # The reason for the adjustment.
1908
- sig { returns(T.nilable(String)) }
1909
- attr_accessor :reason
1910
-
1911
- # The number of usage units by which to discount the price this adjustment applies
1912
- # to in a given billing period.
1913
- sig { returns(Float) }
1914
- attr_accessor :usage_discount
1915
-
1916
- sig do
1917
- params(
1918
- id: String,
1919
- amount: String,
1920
- applies_to_price_ids: T::Array[String],
1921
- filters:
1922
- T::Array[
1923
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter::OrHash
1924
- ],
1925
- is_invoice_level: T::Boolean,
1926
- reason: T.nilable(String),
1927
- usage_discount: Float,
1928
- adjustment_type: Symbol
1929
- ).returns(T.attached_class)
1930
- end
1931
- def self.new(
1932
- id:,
1933
- # The value applied by an adjustment.
1934
- amount:,
1935
- # The price IDs that this adjustment applies to.
1936
- applies_to_price_ids:,
1937
- # The filters that determine which prices to apply this adjustment to.
1938
- filters:,
1939
- # True for adjustments that apply to an entire invocice, false for adjustments
1940
- # that apply to only one price.
1941
- is_invoice_level:,
1942
- # The reason for the adjustment.
1943
- reason:,
1944
- # The number of usage units by which to discount the price this adjustment applies
1945
- # to in a given billing period.
1946
- usage_discount:,
1947
- adjustment_type: :usage_discount
1300
+ sig do
1301
+ override.returns(
1302
+ T::Array[Orb::Invoice::LineItem::Adjustment::Variants]
1948
1303
  )
1949
- end
1950
-
1951
- sig do
1952
- override.returns(
1953
- {
1954
- id: String,
1955
- adjustment_type: Symbol,
1956
- amount: String,
1957
- applies_to_price_ids: T::Array[String],
1958
- filters:
1959
- T::Array[
1960
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter
1961
- ],
1962
- is_invoice_level: T::Boolean,
1963
- reason: T.nilable(String),
1964
- usage_discount: Float
1965
- }
1966
- )
1967
- end
1968
- def to_hash
1969
- end
1970
-
1971
- class Filter < Orb::Internal::Type::BaseModel
1972
- OrHash =
1973
- T.type_alias do
1974
- T.any(
1975
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter,
1976
- Orb::Internal::AnyHash
1977
- )
1978
- end
1979
-
1980
- # The property of the price to filter on.
1981
- sig do
1982
- returns(
1983
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
1984
- )
1985
- end
1986
- attr_accessor :field
1987
-
1988
- # Should prices that match the filter be included or excluded.
1989
- sig do
1990
- returns(
1991
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
1992
- )
1993
- end
1994
- attr_accessor :operator
1995
-
1996
- # The IDs or values that match this filter.
1997
- sig { returns(T::Array[String]) }
1998
- attr_accessor :values
1999
-
2000
- sig do
2001
- params(
2002
- field:
2003
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Field::OrSymbol,
2004
- operator:
2005
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Operator::OrSymbol,
2006
- values: T::Array[String]
2007
- ).returns(T.attached_class)
2008
- end
2009
- def self.new(
2010
- # The property of the price to filter on.
2011
- field:,
2012
- # Should prices that match the filter be included or excluded.
2013
- operator:,
2014
- # The IDs or values that match this filter.
2015
- values:
2016
- )
2017
- end
2018
-
2019
- sig do
2020
- override.returns(
2021
- {
2022
- field:
2023
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol,
2024
- operator:
2025
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol,
2026
- values: T::Array[String]
2027
- }
2028
- )
2029
- end
2030
- def to_hash
2031
- end
2032
-
2033
- # The property of the price to filter on.
2034
- module Field
2035
- extend Orb::Internal::Type::Enum
2036
-
2037
- TaggedSymbol =
2038
- T.type_alias do
2039
- T.all(
2040
- Symbol,
2041
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Field
2042
- )
2043
- end
2044
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2045
-
2046
- PRICE_ID =
2047
- T.let(
2048
- :price_id,
2049
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
2050
- )
2051
- ITEM_ID =
2052
- T.let(
2053
- :item_id,
2054
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
2055
- )
2056
- PRICE_TYPE =
2057
- T.let(
2058
- :price_type,
2059
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
2060
- )
2061
- CURRENCY =
2062
- T.let(
2063
- :currency,
2064
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
2065
- )
2066
- PRICING_UNIT_ID =
2067
- T.let(
2068
- :pricing_unit_id,
2069
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
2070
- )
2071
-
2072
- sig do
2073
- override.returns(
2074
- T::Array[
2075
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Field::TaggedSymbol
2076
- ]
2077
- )
2078
- end
2079
- def self.values
2080
- end
2081
- end
2082
-
2083
- # Should prices that match the filter be included or excluded.
2084
- module Operator
2085
- extend Orb::Internal::Type::Enum
2086
-
2087
- TaggedSymbol =
2088
- T.type_alias do
2089
- T.all(
2090
- Symbol,
2091
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Operator
2092
- )
2093
- end
2094
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2095
-
2096
- INCLUDES =
2097
- T.let(
2098
- :includes,
2099
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
2100
- )
2101
- EXCLUDES =
2102
- T.let(
2103
- :excludes,
2104
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
2105
- )
2106
-
2107
- sig do
2108
- override.returns(
2109
- T::Array[
2110
- Orb::Invoice::LineItem::Adjustment::UsageDiscount::Filter::Operator::TaggedSymbol
2111
- ]
2112
- )
2113
- end
2114
- def self.values
2115
- end
2116
- end
2117
- end
2118
1304
  end
1305
+ def self.variants
1306
+ end
1307
+ end
2119
1308
 
2120
- class AmountDiscount < Orb::Internal::Type::BaseModel
2121
- OrHash =
2122
- T.type_alias do
2123
- T.any(
2124
- Orb::Invoice::LineItem::Adjustment::AmountDiscount,
2125
- Orb::Internal::AnyHash
2126
- )
2127
- end
2128
-
2129
- sig { returns(String) }
2130
- attr_accessor :id
2131
-
2132
- sig { returns(Symbol) }
2133
- attr_accessor :adjustment_type
2134
-
2135
- # The value applied by an adjustment.
2136
- sig { returns(String) }
2137
- attr_accessor :amount
2138
-
2139
- # The amount by which to discount the prices this adjustment applies to in a given
2140
- # billing period.
2141
- sig { returns(String) }
2142
- attr_accessor :amount_discount
2143
-
2144
- # The price IDs that this adjustment applies to.
2145
- sig { returns(T::Array[String]) }
2146
- attr_accessor :applies_to_price_ids
2147
-
2148
- # The filters that determine which prices to apply this adjustment to.
2149
- sig do
2150
- returns(
2151
- T::Array[
2152
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter
2153
- ]
2154
- )
2155
- end
2156
- attr_accessor :filters
2157
-
2158
- # True for adjustments that apply to an entire invocice, false for adjustments
2159
- # that apply to only one price.
2160
- sig { returns(T::Boolean) }
2161
- attr_accessor :is_invoice_level
2162
-
2163
- # The reason for the adjustment.
2164
- sig { returns(T.nilable(String)) }
2165
- attr_accessor :reason
2166
-
2167
- sig do
2168
- params(
2169
- id: String,
2170
- amount: String,
2171
- amount_discount: String,
2172
- applies_to_price_ids: T::Array[String],
2173
- filters:
2174
- T::Array[
2175
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter::OrHash
2176
- ],
2177
- is_invoice_level: T::Boolean,
2178
- reason: T.nilable(String),
2179
- adjustment_type: Symbol
2180
- ).returns(T.attached_class)
2181
- end
2182
- def self.new(
2183
- id:,
2184
- # The value applied by an adjustment.
2185
- amount:,
2186
- # The amount by which to discount the prices this adjustment applies to in a given
2187
- # billing period.
2188
- amount_discount:,
2189
- # The price IDs that this adjustment applies to.
2190
- applies_to_price_ids:,
2191
- # The filters that determine which prices to apply this adjustment to.
2192
- filters:,
2193
- # True for adjustments that apply to an entire invocice, false for adjustments
2194
- # that apply to only one price.
2195
- is_invoice_level:,
2196
- # The reason for the adjustment.
2197
- reason:,
2198
- adjustment_type: :amount_discount
2199
- )
2200
- end
1309
+ module SubLineItem
1310
+ extend Orb::Internal::Type::Union
2201
1311
 
2202
- sig do
2203
- override.returns(
2204
- {
2205
- id: String,
2206
- adjustment_type: Symbol,
2207
- amount: String,
2208
- amount_discount: String,
2209
- applies_to_price_ids: T::Array[String],
2210
- filters:
2211
- T::Array[
2212
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter
2213
- ],
2214
- is_invoice_level: T::Boolean,
2215
- reason: T.nilable(String)
2216
- }
1312
+ Variants =
1313
+ T.type_alias do
1314
+ T.any(
1315
+ Orb::MatrixSubLineItem,
1316
+ Orb::TierSubLineItem,
1317
+ Orb::OtherSubLineItem
2217
1318
  )
2218
1319
  end
2219
- def to_hash
2220
- end
2221
-
2222
- class Filter < Orb::Internal::Type::BaseModel
2223
- OrHash =
2224
- T.type_alias do
2225
- T.any(
2226
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter,
2227
- Orb::Internal::AnyHash
2228
- )
2229
- end
2230
-
2231
- # The property of the price to filter on.
2232
- sig do
2233
- returns(
2234
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
2235
- )
2236
- end
2237
- attr_accessor :field
2238
1320
 
2239
- # Should prices that match the filter be included or excluded.
2240
- sig do
2241
- returns(
2242
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
2243
- )
2244
- end
2245
- attr_accessor :operator
2246
-
2247
- # The IDs or values that match this filter.
2248
- sig { returns(T::Array[String]) }
2249
- attr_accessor :values
2250
-
2251
- sig do
2252
- params(
2253
- field:
2254
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Field::OrSymbol,
2255
- operator:
2256
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Operator::OrSymbol,
2257
- values: T::Array[String]
2258
- ).returns(T.attached_class)
2259
- end
2260
- def self.new(
2261
- # The property of the price to filter on.
2262
- field:,
2263
- # Should prices that match the filter be included or excluded.
2264
- operator:,
2265
- # The IDs or values that match this filter.
2266
- values:
2267
- )
2268
- end
2269
-
2270
- sig do
2271
- override.returns(
2272
- {
2273
- field:
2274
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol,
2275
- operator:
2276
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol,
2277
- values: T::Array[String]
2278
- }
2279
- )
2280
- end
2281
- def to_hash
2282
- end
2283
-
2284
- # The property of the price to filter on.
2285
- module Field
2286
- extend Orb::Internal::Type::Enum
2287
-
2288
- TaggedSymbol =
2289
- T.type_alias do
2290
- T.all(
2291
- Symbol,
2292
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Field
2293
- )
2294
- end
2295
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2296
-
2297
- PRICE_ID =
2298
- T.let(
2299
- :price_id,
2300
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
2301
- )
2302
- ITEM_ID =
2303
- T.let(
2304
- :item_id,
2305
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
2306
- )
2307
- PRICE_TYPE =
2308
- T.let(
2309
- :price_type,
2310
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
2311
- )
2312
- CURRENCY =
2313
- T.let(
2314
- :currency,
2315
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
2316
- )
2317
- PRICING_UNIT_ID =
2318
- T.let(
2319
- :pricing_unit_id,
2320
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
2321
- )
2322
-
2323
- sig do
2324
- override.returns(
2325
- T::Array[
2326
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Field::TaggedSymbol
2327
- ]
2328
- )
2329
- end
2330
- def self.values
2331
- end
2332
- end
2333
-
2334
- # Should prices that match the filter be included or excluded.
2335
- module Operator
2336
- extend Orb::Internal::Type::Enum
2337
-
2338
- TaggedSymbol =
2339
- T.type_alias do
2340
- T.all(
2341
- Symbol,
2342
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Operator
2343
- )
2344
- end
2345
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2346
-
2347
- INCLUDES =
2348
- T.let(
2349
- :includes,
2350
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
2351
- )
2352
- EXCLUDES =
2353
- T.let(
2354
- :excludes,
2355
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
2356
- )
2357
-
2358
- sig do
2359
- override.returns(
2360
- T::Array[
2361
- Orb::Invoice::LineItem::Adjustment::AmountDiscount::Filter::Operator::TaggedSymbol
2362
- ]
2363
- )
2364
- end
2365
- def self.values
2366
- end
2367
- end
2368
- end
1321
+ sig do
1322
+ override.returns(
1323
+ T::Array[Orb::Invoice::LineItem::SubLineItem::Variants]
1324
+ )
2369
1325
  end
1326
+ def self.variants
1327
+ end
1328
+ end
1329
+ end
2370
1330
 
2371
- class PercentageDiscount < Orb::Internal::Type::BaseModel
2372
- OrHash =
2373
- T.type_alias do
2374
- T.any(
2375
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount,
2376
- Orb::Internal::AnyHash
2377
- )
2378
- end
2379
-
2380
- sig { returns(String) }
2381
- attr_accessor :id
1331
+ class PaymentAttempt < Orb::Internal::Type::BaseModel
1332
+ OrHash =
1333
+ T.type_alias do
1334
+ T.any(Orb::Invoice::PaymentAttempt, Orb::Internal::AnyHash)
1335
+ end
2382
1336
 
2383
- sig { returns(Symbol) }
2384
- attr_accessor :adjustment_type
1337
+ # The ID of the payment attempt.
1338
+ sig { returns(String) }
1339
+ attr_accessor :id
2385
1340
 
2386
- # The value applied by an adjustment.
2387
- sig { returns(String) }
2388
- attr_accessor :amount
1341
+ # The amount of the payment attempt.
1342
+ sig { returns(String) }
1343
+ attr_accessor :amount
2389
1344
 
2390
- # The price IDs that this adjustment applies to.
2391
- sig { returns(T::Array[String]) }
2392
- attr_accessor :applies_to_price_ids
1345
+ # The time at which the payment attempt was created.
1346
+ sig { returns(Time) }
1347
+ attr_accessor :created_at
2393
1348
 
2394
- # The filters that determine which prices to apply this adjustment to.
2395
- sig do
2396
- returns(
2397
- T::Array[
2398
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter
2399
- ]
2400
- )
2401
- end
2402
- attr_accessor :filters
2403
-
2404
- # True for adjustments that apply to an entire invocice, false for adjustments
2405
- # that apply to only one price.
2406
- sig { returns(T::Boolean) }
2407
- attr_accessor :is_invoice_level
2408
-
2409
- # The percentage (as a value between 0 and 1) by which to discount the price
2410
- # intervals this adjustment applies to in a given billing period.
2411
- sig { returns(Float) }
2412
- attr_accessor :percentage_discount
2413
-
2414
- # The reason for the adjustment.
2415
- sig { returns(T.nilable(String)) }
2416
- attr_accessor :reason
2417
-
2418
- sig do
2419
- params(
2420
- id: String,
2421
- amount: String,
2422
- applies_to_price_ids: T::Array[String],
2423
- filters:
2424
- T::Array[
2425
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::OrHash
2426
- ],
2427
- is_invoice_level: T::Boolean,
2428
- percentage_discount: Float,
2429
- reason: T.nilable(String),
2430
- adjustment_type: Symbol
2431
- ).returns(T.attached_class)
2432
- end
2433
- def self.new(
2434
- id:,
2435
- # The value applied by an adjustment.
2436
- amount:,
2437
- # The price IDs that this adjustment applies to.
2438
- applies_to_price_ids:,
2439
- # The filters that determine which prices to apply this adjustment to.
2440
- filters:,
2441
- # True for adjustments that apply to an entire invocice, false for adjustments
2442
- # that apply to only one price.
2443
- is_invoice_level:,
2444
- # The percentage (as a value between 0 and 1) by which to discount the price
2445
- # intervals this adjustment applies to in a given billing period.
2446
- percentage_discount:,
2447
- # The reason for the adjustment.
2448
- reason:,
2449
- adjustment_type: :percentage_discount
1349
+ # The payment provider that attempted to collect the payment.
1350
+ sig do
1351
+ returns(
1352
+ T.nilable(
1353
+ Orb::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol
2450
1354
  )
2451
- end
2452
-
2453
- sig do
2454
- override.returns(
2455
- {
2456
- id: String,
2457
- adjustment_type: Symbol,
2458
- amount: String,
2459
- applies_to_price_ids: T::Array[String],
2460
- filters:
2461
- T::Array[
2462
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter
2463
- ],
2464
- is_invoice_level: T::Boolean,
2465
- percentage_discount: Float,
2466
- reason: T.nilable(String)
2467
- }
2468
- )
2469
- end
2470
- def to_hash
2471
- end
1355
+ )
1356
+ end
1357
+ attr_accessor :payment_provider
2472
1358
 
2473
- class Filter < Orb::Internal::Type::BaseModel
2474
- OrHash =
2475
- T.type_alias do
2476
- T.any(
2477
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter,
2478
- Orb::Internal::AnyHash
2479
- )
2480
- end
2481
-
2482
- # The property of the price to filter on.
2483
- sig do
2484
- returns(
2485
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
2486
- )
2487
- end
2488
- attr_accessor :field
1359
+ # The ID of the payment attempt in the payment provider.
1360
+ sig { returns(T.nilable(String)) }
1361
+ attr_accessor :payment_provider_id
2489
1362
 
2490
- # Should prices that match the filter be included or excluded.
2491
- sig do
2492
- returns(
2493
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
2494
- )
2495
- end
2496
- attr_accessor :operator
2497
-
2498
- # The IDs or values that match this filter.
2499
- sig { returns(T::Array[String]) }
2500
- attr_accessor :values
2501
-
2502
- sig do
2503
- params(
2504
- field:
2505
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Field::OrSymbol,
2506
- operator:
2507
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Operator::OrSymbol,
2508
- values: T::Array[String]
2509
- ).returns(T.attached_class)
2510
- end
2511
- def self.new(
2512
- # The property of the price to filter on.
2513
- field:,
2514
- # Should prices that match the filter be included or excluded.
2515
- operator:,
2516
- # The IDs or values that match this filter.
2517
- values:
2518
- )
2519
- end
2520
-
2521
- sig do
2522
- override.returns(
2523
- {
2524
- field:
2525
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol,
2526
- operator:
2527
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol,
2528
- values: T::Array[String]
2529
- }
2530
- )
2531
- end
2532
- def to_hash
2533
- end
2534
-
2535
- # The property of the price to filter on.
2536
- module Field
2537
- extend Orb::Internal::Type::Enum
2538
-
2539
- TaggedSymbol =
2540
- T.type_alias do
2541
- T.all(
2542
- Symbol,
2543
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Field
2544
- )
2545
- end
2546
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2547
-
2548
- PRICE_ID =
2549
- T.let(
2550
- :price_id,
2551
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
2552
- )
2553
- ITEM_ID =
2554
- T.let(
2555
- :item_id,
2556
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
2557
- )
2558
- PRICE_TYPE =
2559
- T.let(
2560
- :price_type,
2561
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
2562
- )
2563
- CURRENCY =
2564
- T.let(
2565
- :currency,
2566
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
2567
- )
2568
- PRICING_UNIT_ID =
2569
- T.let(
2570
- :pricing_unit_id,
2571
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
2572
- )
2573
-
2574
- sig do
2575
- override.returns(
2576
- T::Array[
2577
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Field::TaggedSymbol
2578
- ]
2579
- )
2580
- end
2581
- def self.values
2582
- end
2583
- end
2584
-
2585
- # Should prices that match the filter be included or excluded.
2586
- module Operator
2587
- extend Orb::Internal::Type::Enum
2588
-
2589
- TaggedSymbol =
2590
- T.type_alias do
2591
- T.all(
2592
- Symbol,
2593
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Operator
2594
- )
2595
- end
2596
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2597
-
2598
- INCLUDES =
2599
- T.let(
2600
- :includes,
2601
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
2602
- )
2603
- EXCLUDES =
2604
- T.let(
2605
- :excludes,
2606
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
2607
- )
2608
-
2609
- sig do
2610
- override.returns(
2611
- T::Array[
2612
- Orb::Invoice::LineItem::Adjustment::PercentageDiscount::Filter::Operator::TaggedSymbol
2613
- ]
2614
- )
2615
- end
2616
- def self.values
2617
- end
2618
- end
2619
- end
2620
- end
1363
+ # Whether the payment attempt succeeded.
1364
+ sig { returns(T::Boolean) }
1365
+ attr_accessor :succeeded
2621
1366
 
2622
- class Minimum < Orb::Internal::Type::BaseModel
2623
- OrHash =
2624
- T.type_alias do
2625
- T.any(
2626
- Orb::Invoice::LineItem::Adjustment::Minimum,
2627
- Orb::Internal::AnyHash
2628
- )
2629
- end
1367
+ sig do
1368
+ params(
1369
+ id: String,
1370
+ amount: String,
1371
+ created_at: Time,
1372
+ payment_provider:
1373
+ T.nilable(
1374
+ Orb::Invoice::PaymentAttempt::PaymentProvider::OrSymbol
1375
+ ),
1376
+ payment_provider_id: T.nilable(String),
1377
+ succeeded: T::Boolean
1378
+ ).returns(T.attached_class)
1379
+ end
1380
+ def self.new(
1381
+ # The ID of the payment attempt.
1382
+ id:,
1383
+ # The amount of the payment attempt.
1384
+ amount:,
1385
+ # The time at which the payment attempt was created.
1386
+ created_at:,
1387
+ # The payment provider that attempted to collect the payment.
1388
+ payment_provider:,
1389
+ # The ID of the payment attempt in the payment provider.
1390
+ payment_provider_id:,
1391
+ # Whether the payment attempt succeeded.
1392
+ succeeded:
1393
+ )
1394
+ end
2630
1395
 
2631
- sig { returns(String) }
2632
- attr_accessor :id
1396
+ sig do
1397
+ override.returns(
1398
+ {
1399
+ id: String,
1400
+ amount: String,
1401
+ created_at: Time,
1402
+ payment_provider:
1403
+ T.nilable(
1404
+ Orb::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol
1405
+ ),
1406
+ payment_provider_id: T.nilable(String),
1407
+ succeeded: T::Boolean
1408
+ }
1409
+ )
1410
+ end
1411
+ def to_hash
1412
+ end
2633
1413
 
2634
- sig { returns(Symbol) }
2635
- attr_accessor :adjustment_type
1414
+ # The payment provider that attempted to collect the payment.
1415
+ module PaymentProvider
1416
+ extend Orb::Internal::Type::Enum
2636
1417
 
2637
- # The value applied by an adjustment.
2638
- sig { returns(String) }
2639
- attr_accessor :amount
1418
+ TaggedSymbol =
1419
+ T.type_alias do
1420
+ T.all(Symbol, Orb::Invoice::PaymentAttempt::PaymentProvider)
1421
+ end
1422
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2640
1423
 
2641
- # The price IDs that this adjustment applies to.
2642
- sig { returns(T::Array[String]) }
2643
- attr_accessor :applies_to_price_ids
1424
+ STRIPE =
1425
+ T.let(
1426
+ :stripe,
1427
+ Orb::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol
1428
+ )
2644
1429
 
2645
- # The filters that determine which prices to apply this adjustment to.
2646
- sig do
2647
- returns(
2648
- T::Array[Orb::Invoice::LineItem::Adjustment::Minimum::Filter]
2649
- )
2650
- end
2651
- attr_accessor :filters
2652
-
2653
- # True for adjustments that apply to an entire invocice, false for adjustments
2654
- # that apply to only one price.
2655
- sig { returns(T::Boolean) }
2656
- attr_accessor :is_invoice_level
2657
-
2658
- # The item ID that revenue from this minimum will be attributed to.
2659
- sig { returns(String) }
2660
- attr_accessor :item_id
2661
-
2662
- # The minimum amount to charge in a given billing period for the prices this
2663
- # adjustment applies to.
2664
- sig { returns(String) }
2665
- attr_accessor :minimum_amount
2666
-
2667
- # The reason for the adjustment.
2668
- sig { returns(T.nilable(String)) }
2669
- attr_accessor :reason
2670
-
2671
- sig do
2672
- params(
2673
- id: String,
2674
- amount: String,
2675
- applies_to_price_ids: T::Array[String],
2676
- filters:
2677
- T::Array[
2678
- Orb::Invoice::LineItem::Adjustment::Minimum::Filter::OrHash
2679
- ],
2680
- is_invoice_level: T::Boolean,
2681
- item_id: String,
2682
- minimum_amount: String,
2683
- reason: T.nilable(String),
2684
- adjustment_type: Symbol
2685
- ).returns(T.attached_class)
2686
- end
2687
- def self.new(
2688
- id:,
2689
- # The value applied by an adjustment.
2690
- amount:,
2691
- # The price IDs that this adjustment applies to.
2692
- applies_to_price_ids:,
2693
- # The filters that determine which prices to apply this adjustment to.
2694
- filters:,
2695
- # True for adjustments that apply to an entire invocice, false for adjustments
2696
- # that apply to only one price.
2697
- is_invoice_level:,
2698
- # The item ID that revenue from this minimum will be attributed to.
2699
- item_id:,
2700
- # The minimum amount to charge in a given billing period for the prices this
2701
- # adjustment applies to.
2702
- minimum_amount:,
2703
- # The reason for the adjustment.
2704
- reason:,
2705
- adjustment_type: :minimum
1430
+ sig do
1431
+ override.returns(
1432
+ T::Array[
1433
+ Orb::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol
1434
+ ]
2706
1435
  )
2707
- end
1436
+ end
1437
+ def self.values
1438
+ end
1439
+ end
1440
+ end
2708
1441
 
2709
- sig do
2710
- override.returns(
2711
- {
2712
- id: String,
2713
- adjustment_type: Symbol,
2714
- amount: String,
2715
- applies_to_price_ids: T::Array[String],
2716
- filters:
2717
- T::Array[
2718
- Orb::Invoice::LineItem::Adjustment::Minimum::Filter
2719
- ],
2720
- is_invoice_level: T::Boolean,
2721
- item_id: String,
2722
- minimum_amount: String,
2723
- reason: T.nilable(String)
2724
- }
2725
- )
2726
- end
2727
- def to_hash
2728
- end
1442
+ module Status
1443
+ extend Orb::Internal::Type::Enum
2729
1444
 
2730
- class Filter < Orb::Internal::Type::BaseModel
2731
- OrHash =
2732
- T.type_alias do
2733
- T.any(
2734
- Orb::Invoice::LineItem::Adjustment::Minimum::Filter,
2735
- Orb::Internal::AnyHash
2736
- )
2737
- end
2738
-
2739
- # The property of the price to filter on.
2740
- sig do
2741
- returns(
2742
- Orb::Invoice::LineItem::Adjustment::Minimum::Filter::Field::TaggedSymbol
2743
- )
2744
- end
2745
- attr_accessor :field
2746
-
2747
- # Should prices that match the filter be included or excluded.
2748
- sig do
2749
- returns(
2750
- Orb::Invoice::LineItem::Adjustment::Minimum::Filter::Operator::TaggedSymbol
2751
- )
2752
- end
2753
- attr_accessor :operator
2754
-
2755
- # The IDs or values that match this filter.
2756
- sig { returns(T::Array[String]) }
2757
- attr_accessor :values
2758
-
2759
- sig do
2760
- params(
2761
- field:
2762
- Orb::Invoice::LineItem::Adjustment::Minimum::Filter::Field::OrSymbol,
2763
- operator:
2764
- Orb::Invoice::LineItem::Adjustment::Minimum::Filter::Operator::OrSymbol,
2765
- values: T::Array[String]
2766
- ).returns(T.attached_class)
2767
- end
2768
- def self.new(
2769
- # The property of the price to filter on.
2770
- field:,
2771
- # Should prices that match the filter be included or excluded.
2772
- operator:,
2773
- # The IDs or values that match this filter.
2774
- values:
2775
- )
2776
- end
2777
-
2778
- sig do
2779
- override.returns(
2780
- {
2781
- field:
2782
- Orb::Invoice::LineItem::Adjustment::Minimum::Filter::Field::TaggedSymbol,
2783
- operator:
2784
- Orb::Invoice::LineItem::Adjustment::Minimum::Filter::Operator::TaggedSymbol,
2785
- values: T::Array[String]
2786
- }
2787
- )
2788
- end
2789
- def to_hash
2790
- end
2791
-
2792
- # The property of the price to filter on.
2793
- module Field
2794
- extend Orb::Internal::Type::Enum
2795
-
2796
- TaggedSymbol =
2797
- T.type_alias do
2798
- T.all(
2799
- Symbol,
2800
- Orb::Invoice::LineItem::Adjustment::Minimum::Filter::Field
2801
- )
2802
- end
2803
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2804
-
2805
- PRICE_ID =
2806
- T.let(
2807
- :price_id,
2808
- Orb::Invoice::LineItem::Adjustment::Minimum::Filter::Field::TaggedSymbol
2809
- )
2810
- ITEM_ID =
2811
- T.let(
2812
- :item_id,
2813
- Orb::Invoice::LineItem::Adjustment::Minimum::Filter::Field::TaggedSymbol
2814
- )
2815
- PRICE_TYPE =
2816
- T.let(
2817
- :price_type,
2818
- Orb::Invoice::LineItem::Adjustment::Minimum::Filter::Field::TaggedSymbol
2819
- )
2820
- CURRENCY =
2821
- T.let(
2822
- :currency,
2823
- Orb::Invoice::LineItem::Adjustment::Minimum::Filter::Field::TaggedSymbol
2824
- )
2825
- PRICING_UNIT_ID =
2826
- T.let(
2827
- :pricing_unit_id,
2828
- Orb::Invoice::LineItem::Adjustment::Minimum::Filter::Field::TaggedSymbol
2829
- )
2830
-
2831
- sig do
2832
- override.returns(
2833
- T::Array[
2834
- Orb::Invoice::LineItem::Adjustment::Minimum::Filter::Field::TaggedSymbol
2835
- ]
2836
- )
2837
- end
2838
- def self.values
2839
- end
2840
- end
2841
-
2842
- # Should prices that match the filter be included or excluded.
2843
- module Operator
2844
- extend Orb::Internal::Type::Enum
2845
-
2846
- TaggedSymbol =
2847
- T.type_alias do
2848
- T.all(
2849
- Symbol,
2850
- Orb::Invoice::LineItem::Adjustment::Minimum::Filter::Operator
2851
- )
2852
- end
2853
- OrSymbol = T.type_alias { T.any(Symbol, String) }
2854
-
2855
- INCLUDES =
2856
- T.let(
2857
- :includes,
2858
- Orb::Invoice::LineItem::Adjustment::Minimum::Filter::Operator::TaggedSymbol
2859
- )
2860
- EXCLUDES =
2861
- T.let(
2862
- :excludes,
2863
- Orb::Invoice::LineItem::Adjustment::Minimum::Filter::Operator::TaggedSymbol
2864
- )
2865
-
2866
- sig do
2867
- override.returns(
2868
- T::Array[
2869
- Orb::Invoice::LineItem::Adjustment::Minimum::Filter::Operator::TaggedSymbol
2870
- ]
2871
- )
2872
- end
2873
- def self.values
2874
- end
2875
- end
2876
- end
2877
- end
2878
-
2879
- class Maximum < Orb::Internal::Type::BaseModel
2880
- OrHash =
2881
- T.type_alias do
2882
- T.any(
2883
- Orb::Invoice::LineItem::Adjustment::Maximum,
2884
- Orb::Internal::AnyHash
2885
- )
2886
- end
2887
-
2888
- sig { returns(String) }
2889
- attr_accessor :id
2890
-
2891
- sig { returns(Symbol) }
2892
- attr_accessor :adjustment_type
2893
-
2894
- # The value applied by an adjustment.
2895
- sig { returns(String) }
2896
- attr_accessor :amount
2897
-
2898
- # The price IDs that this adjustment applies to.
2899
- sig { returns(T::Array[String]) }
2900
- attr_accessor :applies_to_price_ids
2901
-
2902
- # The filters that determine which prices to apply this adjustment to.
2903
- sig do
2904
- returns(
2905
- T::Array[Orb::Invoice::LineItem::Adjustment::Maximum::Filter]
2906
- )
2907
- end
2908
- attr_accessor :filters
2909
-
2910
- # True for adjustments that apply to an entire invocice, false for adjustments
2911
- # that apply to only one price.
2912
- sig { returns(T::Boolean) }
2913
- attr_accessor :is_invoice_level
2914
-
2915
- # The maximum amount to charge in a given billing period for the prices this
2916
- # adjustment applies to.
2917
- sig { returns(String) }
2918
- attr_accessor :maximum_amount
2919
-
2920
- # The reason for the adjustment.
2921
- sig { returns(T.nilable(String)) }
2922
- attr_accessor :reason
2923
-
2924
- sig do
2925
- params(
2926
- id: String,
2927
- amount: String,
2928
- applies_to_price_ids: T::Array[String],
2929
- filters:
2930
- T::Array[
2931
- Orb::Invoice::LineItem::Adjustment::Maximum::Filter::OrHash
2932
- ],
2933
- is_invoice_level: T::Boolean,
2934
- maximum_amount: String,
2935
- reason: T.nilable(String),
2936
- adjustment_type: Symbol
2937
- ).returns(T.attached_class)
2938
- end
2939
- def self.new(
2940
- id:,
2941
- # The value applied by an adjustment.
2942
- amount:,
2943
- # The price IDs that this adjustment applies to.
2944
- applies_to_price_ids:,
2945
- # The filters that determine which prices to apply this adjustment to.
2946
- filters:,
2947
- # True for adjustments that apply to an entire invocice, false for adjustments
2948
- # that apply to only one price.
2949
- is_invoice_level:,
2950
- # The maximum amount to charge in a given billing period for the prices this
2951
- # adjustment applies to.
2952
- maximum_amount:,
2953
- # The reason for the adjustment.
2954
- reason:,
2955
- adjustment_type: :maximum
2956
- )
2957
- end
2958
-
2959
- sig do
2960
- override.returns(
2961
- {
2962
- id: String,
2963
- adjustment_type: Symbol,
2964
- amount: String,
2965
- applies_to_price_ids: T::Array[String],
2966
- filters:
2967
- T::Array[
2968
- Orb::Invoice::LineItem::Adjustment::Maximum::Filter
2969
- ],
2970
- is_invoice_level: T::Boolean,
2971
- maximum_amount: String,
2972
- reason: T.nilable(String)
2973
- }
2974
- )
2975
- end
2976
- def to_hash
2977
- end
2978
-
2979
- class Filter < Orb::Internal::Type::BaseModel
2980
- OrHash =
2981
- T.type_alias do
2982
- T.any(
2983
- Orb::Invoice::LineItem::Adjustment::Maximum::Filter,
2984
- Orb::Internal::AnyHash
2985
- )
2986
- end
2987
-
2988
- # The property of the price to filter on.
2989
- sig do
2990
- returns(
2991
- Orb::Invoice::LineItem::Adjustment::Maximum::Filter::Field::TaggedSymbol
2992
- )
2993
- end
2994
- attr_accessor :field
2995
-
2996
- # Should prices that match the filter be included or excluded.
2997
- sig do
2998
- returns(
2999
- Orb::Invoice::LineItem::Adjustment::Maximum::Filter::Operator::TaggedSymbol
3000
- )
3001
- end
3002
- attr_accessor :operator
3003
-
3004
- # The IDs or values that match this filter.
3005
- sig { returns(T::Array[String]) }
3006
- attr_accessor :values
3007
-
3008
- sig do
3009
- params(
3010
- field:
3011
- Orb::Invoice::LineItem::Adjustment::Maximum::Filter::Field::OrSymbol,
3012
- operator:
3013
- Orb::Invoice::LineItem::Adjustment::Maximum::Filter::Operator::OrSymbol,
3014
- values: T::Array[String]
3015
- ).returns(T.attached_class)
3016
- end
3017
- def self.new(
3018
- # The property of the price to filter on.
3019
- field:,
3020
- # Should prices that match the filter be included or excluded.
3021
- operator:,
3022
- # The IDs or values that match this filter.
3023
- values:
3024
- )
3025
- end
3026
-
3027
- sig do
3028
- override.returns(
3029
- {
3030
- field:
3031
- Orb::Invoice::LineItem::Adjustment::Maximum::Filter::Field::TaggedSymbol,
3032
- operator:
3033
- Orb::Invoice::LineItem::Adjustment::Maximum::Filter::Operator::TaggedSymbol,
3034
- values: T::Array[String]
3035
- }
3036
- )
3037
- end
3038
- def to_hash
3039
- end
3040
-
3041
- # The property of the price to filter on.
3042
- module Field
3043
- extend Orb::Internal::Type::Enum
3044
-
3045
- TaggedSymbol =
3046
- T.type_alias do
3047
- T.all(
3048
- Symbol,
3049
- Orb::Invoice::LineItem::Adjustment::Maximum::Filter::Field
3050
- )
3051
- end
3052
- OrSymbol = T.type_alias { T.any(Symbol, String) }
3053
-
3054
- PRICE_ID =
3055
- T.let(
3056
- :price_id,
3057
- Orb::Invoice::LineItem::Adjustment::Maximum::Filter::Field::TaggedSymbol
3058
- )
3059
- ITEM_ID =
3060
- T.let(
3061
- :item_id,
3062
- Orb::Invoice::LineItem::Adjustment::Maximum::Filter::Field::TaggedSymbol
3063
- )
3064
- PRICE_TYPE =
3065
- T.let(
3066
- :price_type,
3067
- Orb::Invoice::LineItem::Adjustment::Maximum::Filter::Field::TaggedSymbol
3068
- )
3069
- CURRENCY =
3070
- T.let(
3071
- :currency,
3072
- Orb::Invoice::LineItem::Adjustment::Maximum::Filter::Field::TaggedSymbol
3073
- )
3074
- PRICING_UNIT_ID =
3075
- T.let(
3076
- :pricing_unit_id,
3077
- Orb::Invoice::LineItem::Adjustment::Maximum::Filter::Field::TaggedSymbol
3078
- )
3079
-
3080
- sig do
3081
- override.returns(
3082
- T::Array[
3083
- Orb::Invoice::LineItem::Adjustment::Maximum::Filter::Field::TaggedSymbol
3084
- ]
3085
- )
3086
- end
3087
- def self.values
3088
- end
3089
- end
3090
-
3091
- # Should prices that match the filter be included or excluded.
3092
- module Operator
3093
- extend Orb::Internal::Type::Enum
3094
-
3095
- TaggedSymbol =
3096
- T.type_alias do
3097
- T.all(
3098
- Symbol,
3099
- Orb::Invoice::LineItem::Adjustment::Maximum::Filter::Operator
3100
- )
3101
- end
3102
- OrSymbol = T.type_alias { T.any(Symbol, String) }
3103
-
3104
- INCLUDES =
3105
- T.let(
3106
- :includes,
3107
- Orb::Invoice::LineItem::Adjustment::Maximum::Filter::Operator::TaggedSymbol
3108
- )
3109
- EXCLUDES =
3110
- T.let(
3111
- :excludes,
3112
- Orb::Invoice::LineItem::Adjustment::Maximum::Filter::Operator::TaggedSymbol
3113
- )
3114
-
3115
- sig do
3116
- override.returns(
3117
- T::Array[
3118
- Orb::Invoice::LineItem::Adjustment::Maximum::Filter::Operator::TaggedSymbol
3119
- ]
3120
- )
3121
- end
3122
- def self.values
3123
- end
3124
- end
3125
- end
3126
- end
3127
-
3128
- sig do
3129
- override.returns(
3130
- T::Array[Orb::Invoice::LineItem::Adjustment::Variants]
3131
- )
3132
- end
3133
- def self.variants
3134
- end
3135
- end
3136
-
3137
- class Maximum < Orb::Internal::Type::BaseModel
3138
- OrHash =
3139
- T.type_alias do
3140
- T.any(Orb::Invoice::LineItem::Maximum, Orb::Internal::AnyHash)
3141
- end
3142
-
3143
- # List of price_ids that this maximum amount applies to. For plan/plan phase
3144
- # maximums, this can be a subset of prices.
3145
- sig { returns(T::Array[String]) }
3146
- attr_accessor :applies_to_price_ids
3147
-
3148
- # The filters that determine which prices to apply this maximum to.
3149
- sig { returns(T::Array[Orb::Invoice::LineItem::Maximum::Filter]) }
3150
- attr_accessor :filters
3151
-
3152
- # Maximum amount applied
3153
- sig { returns(String) }
3154
- attr_accessor :maximum_amount
3155
-
3156
- # This field is deprecated in favor of `adjustments`.
3157
- sig do
3158
- params(
3159
- applies_to_price_ids: T::Array[String],
3160
- filters:
3161
- T::Array[Orb::Invoice::LineItem::Maximum::Filter::OrHash],
3162
- maximum_amount: String
3163
- ).returns(T.attached_class)
3164
- end
3165
- def self.new(
3166
- # List of price_ids that this maximum amount applies to. For plan/plan phase
3167
- # maximums, this can be a subset of prices.
3168
- applies_to_price_ids:,
3169
- # The filters that determine which prices to apply this maximum to.
3170
- filters:,
3171
- # Maximum amount applied
3172
- maximum_amount:
3173
- )
3174
- end
3175
-
3176
- sig do
3177
- override.returns(
3178
- {
3179
- applies_to_price_ids: T::Array[String],
3180
- filters: T::Array[Orb::Invoice::LineItem::Maximum::Filter],
3181
- maximum_amount: String
3182
- }
3183
- )
3184
- end
3185
- def to_hash
3186
- end
3187
-
3188
- class Filter < Orb::Internal::Type::BaseModel
3189
- OrHash =
3190
- T.type_alias do
3191
- T.any(
3192
- Orb::Invoice::LineItem::Maximum::Filter,
3193
- Orb::Internal::AnyHash
3194
- )
3195
- end
3196
-
3197
- # The property of the price to filter on.
3198
- sig do
3199
- returns(
3200
- Orb::Invoice::LineItem::Maximum::Filter::Field::TaggedSymbol
3201
- )
3202
- end
3203
- attr_accessor :field
3204
-
3205
- # Should prices that match the filter be included or excluded.
3206
- sig do
3207
- returns(
3208
- Orb::Invoice::LineItem::Maximum::Filter::Operator::TaggedSymbol
3209
- )
3210
- end
3211
- attr_accessor :operator
3212
-
3213
- # The IDs or values that match this filter.
3214
- sig { returns(T::Array[String]) }
3215
- attr_accessor :values
3216
-
3217
- sig do
3218
- params(
3219
- field: Orb::Invoice::LineItem::Maximum::Filter::Field::OrSymbol,
3220
- operator:
3221
- Orb::Invoice::LineItem::Maximum::Filter::Operator::OrSymbol,
3222
- values: T::Array[String]
3223
- ).returns(T.attached_class)
3224
- end
3225
- def self.new(
3226
- # The property of the price to filter on.
3227
- field:,
3228
- # Should prices that match the filter be included or excluded.
3229
- operator:,
3230
- # The IDs or values that match this filter.
3231
- values:
3232
- )
3233
- end
3234
-
3235
- sig do
3236
- override.returns(
3237
- {
3238
- field:
3239
- Orb::Invoice::LineItem::Maximum::Filter::Field::TaggedSymbol,
3240
- operator:
3241
- Orb::Invoice::LineItem::Maximum::Filter::Operator::TaggedSymbol,
3242
- values: T::Array[String]
3243
- }
3244
- )
3245
- end
3246
- def to_hash
3247
- end
3248
-
3249
- # The property of the price to filter on.
3250
- module Field
3251
- extend Orb::Internal::Type::Enum
3252
-
3253
- TaggedSymbol =
3254
- T.type_alias do
3255
- T.all(Symbol, Orb::Invoice::LineItem::Maximum::Filter::Field)
3256
- end
3257
- OrSymbol = T.type_alias { T.any(Symbol, String) }
3258
-
3259
- PRICE_ID =
3260
- T.let(
3261
- :price_id,
3262
- Orb::Invoice::LineItem::Maximum::Filter::Field::TaggedSymbol
3263
- )
3264
- ITEM_ID =
3265
- T.let(
3266
- :item_id,
3267
- Orb::Invoice::LineItem::Maximum::Filter::Field::TaggedSymbol
3268
- )
3269
- PRICE_TYPE =
3270
- T.let(
3271
- :price_type,
3272
- Orb::Invoice::LineItem::Maximum::Filter::Field::TaggedSymbol
3273
- )
3274
- CURRENCY =
3275
- T.let(
3276
- :currency,
3277
- Orb::Invoice::LineItem::Maximum::Filter::Field::TaggedSymbol
3278
- )
3279
- PRICING_UNIT_ID =
3280
- T.let(
3281
- :pricing_unit_id,
3282
- Orb::Invoice::LineItem::Maximum::Filter::Field::TaggedSymbol
3283
- )
3284
-
3285
- sig do
3286
- override.returns(
3287
- T::Array[
3288
- Orb::Invoice::LineItem::Maximum::Filter::Field::TaggedSymbol
3289
- ]
3290
- )
3291
- end
3292
- def self.values
3293
- end
3294
- end
3295
-
3296
- # Should prices that match the filter be included or excluded.
3297
- module Operator
3298
- extend Orb::Internal::Type::Enum
3299
-
3300
- TaggedSymbol =
3301
- T.type_alias do
3302
- T.all(
3303
- Symbol,
3304
- Orb::Invoice::LineItem::Maximum::Filter::Operator
3305
- )
3306
- end
3307
- OrSymbol = T.type_alias { T.any(Symbol, String) }
3308
-
3309
- INCLUDES =
3310
- T.let(
3311
- :includes,
3312
- Orb::Invoice::LineItem::Maximum::Filter::Operator::TaggedSymbol
3313
- )
3314
- EXCLUDES =
3315
- T.let(
3316
- :excludes,
3317
- Orb::Invoice::LineItem::Maximum::Filter::Operator::TaggedSymbol
3318
- )
3319
-
3320
- sig do
3321
- override.returns(
3322
- T::Array[
3323
- Orb::Invoice::LineItem::Maximum::Filter::Operator::TaggedSymbol
3324
- ]
3325
- )
3326
- end
3327
- def self.values
3328
- end
3329
- end
3330
- end
3331
- end
3332
-
3333
- class Minimum < Orb::Internal::Type::BaseModel
3334
- OrHash =
3335
- T.type_alias do
3336
- T.any(Orb::Invoice::LineItem::Minimum, Orb::Internal::AnyHash)
3337
- end
3338
-
3339
- # List of price_ids that this minimum amount applies to. For plan/plan phase
3340
- # minimums, this can be a subset of prices.
3341
- sig { returns(T::Array[String]) }
3342
- attr_accessor :applies_to_price_ids
3343
-
3344
- # The filters that determine which prices to apply this minimum to.
3345
- sig { returns(T::Array[Orb::Invoice::LineItem::Minimum::Filter]) }
3346
- attr_accessor :filters
3347
-
3348
- # Minimum amount applied
3349
- sig { returns(String) }
3350
- attr_accessor :minimum_amount
3351
-
3352
- # This field is deprecated in favor of `adjustments`.
3353
- sig do
3354
- params(
3355
- applies_to_price_ids: T::Array[String],
3356
- filters:
3357
- T::Array[Orb::Invoice::LineItem::Minimum::Filter::OrHash],
3358
- minimum_amount: String
3359
- ).returns(T.attached_class)
3360
- end
3361
- def self.new(
3362
- # List of price_ids that this minimum amount applies to. For plan/plan phase
3363
- # minimums, this can be a subset of prices.
3364
- applies_to_price_ids:,
3365
- # The filters that determine which prices to apply this minimum to.
3366
- filters:,
3367
- # Minimum amount applied
3368
- minimum_amount:
3369
- )
3370
- end
3371
-
3372
- sig do
3373
- override.returns(
3374
- {
3375
- applies_to_price_ids: T::Array[String],
3376
- filters: T::Array[Orb::Invoice::LineItem::Minimum::Filter],
3377
- minimum_amount: String
3378
- }
3379
- )
3380
- end
3381
- def to_hash
3382
- end
3383
-
3384
- class Filter < Orb::Internal::Type::BaseModel
3385
- OrHash =
3386
- T.type_alias do
3387
- T.any(
3388
- Orb::Invoice::LineItem::Minimum::Filter,
3389
- Orb::Internal::AnyHash
3390
- )
3391
- end
3392
-
3393
- # The property of the price to filter on.
3394
- sig do
3395
- returns(
3396
- Orb::Invoice::LineItem::Minimum::Filter::Field::TaggedSymbol
3397
- )
3398
- end
3399
- attr_accessor :field
3400
-
3401
- # Should prices that match the filter be included or excluded.
3402
- sig do
3403
- returns(
3404
- Orb::Invoice::LineItem::Minimum::Filter::Operator::TaggedSymbol
3405
- )
3406
- end
3407
- attr_accessor :operator
3408
-
3409
- # The IDs or values that match this filter.
3410
- sig { returns(T::Array[String]) }
3411
- attr_accessor :values
3412
-
3413
- sig do
3414
- params(
3415
- field: Orb::Invoice::LineItem::Minimum::Filter::Field::OrSymbol,
3416
- operator:
3417
- Orb::Invoice::LineItem::Minimum::Filter::Operator::OrSymbol,
3418
- values: T::Array[String]
3419
- ).returns(T.attached_class)
3420
- end
3421
- def self.new(
3422
- # The property of the price to filter on.
3423
- field:,
3424
- # Should prices that match the filter be included or excluded.
3425
- operator:,
3426
- # The IDs or values that match this filter.
3427
- values:
3428
- )
3429
- end
3430
-
3431
- sig do
3432
- override.returns(
3433
- {
3434
- field:
3435
- Orb::Invoice::LineItem::Minimum::Filter::Field::TaggedSymbol,
3436
- operator:
3437
- Orb::Invoice::LineItem::Minimum::Filter::Operator::TaggedSymbol,
3438
- values: T::Array[String]
3439
- }
3440
- )
3441
- end
3442
- def to_hash
3443
- end
3444
-
3445
- # The property of the price to filter on.
3446
- module Field
3447
- extend Orb::Internal::Type::Enum
3448
-
3449
- TaggedSymbol =
3450
- T.type_alias do
3451
- T.all(Symbol, Orb::Invoice::LineItem::Minimum::Filter::Field)
3452
- end
3453
- OrSymbol = T.type_alias { T.any(Symbol, String) }
3454
-
3455
- PRICE_ID =
3456
- T.let(
3457
- :price_id,
3458
- Orb::Invoice::LineItem::Minimum::Filter::Field::TaggedSymbol
3459
- )
3460
- ITEM_ID =
3461
- T.let(
3462
- :item_id,
3463
- Orb::Invoice::LineItem::Minimum::Filter::Field::TaggedSymbol
3464
- )
3465
- PRICE_TYPE =
3466
- T.let(
3467
- :price_type,
3468
- Orb::Invoice::LineItem::Minimum::Filter::Field::TaggedSymbol
3469
- )
3470
- CURRENCY =
3471
- T.let(
3472
- :currency,
3473
- Orb::Invoice::LineItem::Minimum::Filter::Field::TaggedSymbol
3474
- )
3475
- PRICING_UNIT_ID =
3476
- T.let(
3477
- :pricing_unit_id,
3478
- Orb::Invoice::LineItem::Minimum::Filter::Field::TaggedSymbol
3479
- )
3480
-
3481
- sig do
3482
- override.returns(
3483
- T::Array[
3484
- Orb::Invoice::LineItem::Minimum::Filter::Field::TaggedSymbol
3485
- ]
3486
- )
3487
- end
3488
- def self.values
3489
- end
3490
- end
3491
-
3492
- # Should prices that match the filter be included or excluded.
3493
- module Operator
3494
- extend Orb::Internal::Type::Enum
3495
-
3496
- TaggedSymbol =
3497
- T.type_alias do
3498
- T.all(
3499
- Symbol,
3500
- Orb::Invoice::LineItem::Minimum::Filter::Operator
3501
- )
3502
- end
3503
- OrSymbol = T.type_alias { T.any(Symbol, String) }
3504
-
3505
- INCLUDES =
3506
- T.let(
3507
- :includes,
3508
- Orb::Invoice::LineItem::Minimum::Filter::Operator::TaggedSymbol
3509
- )
3510
- EXCLUDES =
3511
- T.let(
3512
- :excludes,
3513
- Orb::Invoice::LineItem::Minimum::Filter::Operator::TaggedSymbol
3514
- )
3515
-
3516
- sig do
3517
- override.returns(
3518
- T::Array[
3519
- Orb::Invoice::LineItem::Minimum::Filter::Operator::TaggedSymbol
3520
- ]
3521
- )
3522
- end
3523
- def self.values
3524
- end
3525
- end
3526
- end
3527
- end
3528
-
3529
- module SubLineItem
3530
- extend Orb::Internal::Type::Union
3531
-
3532
- Variants =
3533
- T.type_alias do
3534
- T.any(
3535
- Orb::Invoice::LineItem::SubLineItem::Matrix,
3536
- Orb::Invoice::LineItem::SubLineItem::Tier,
3537
- Orb::Invoice::LineItem::SubLineItem::Null
3538
- )
3539
- end
3540
-
3541
- class Matrix < Orb::Internal::Type::BaseModel
3542
- OrHash =
3543
- T.type_alias do
3544
- T.any(
3545
- Orb::Invoice::LineItem::SubLineItem::Matrix,
3546
- Orb::Internal::AnyHash
3547
- )
3548
- end
3549
-
3550
- # The total amount for this sub line item.
3551
- sig { returns(String) }
3552
- attr_accessor :amount
3553
-
3554
- sig do
3555
- returns(
3556
- T.nilable(Orb::Invoice::LineItem::SubLineItem::Matrix::Grouping)
3557
- )
3558
- end
3559
- attr_reader :grouping
3560
-
3561
- sig do
3562
- params(
3563
- grouping:
3564
- T.nilable(
3565
- Orb::Invoice::LineItem::SubLineItem::Matrix::Grouping::OrHash
3566
- )
3567
- ).void
3568
- end
3569
- attr_writer :grouping
3570
-
3571
- sig do
3572
- returns(Orb::Invoice::LineItem::SubLineItem::Matrix::MatrixConfig)
3573
- end
3574
- attr_reader :matrix_config
3575
-
3576
- sig do
3577
- params(
3578
- matrix_config:
3579
- Orb::Invoice::LineItem::SubLineItem::Matrix::MatrixConfig::OrHash
3580
- ).void
3581
- end
3582
- attr_writer :matrix_config
3583
-
3584
- sig { returns(String) }
3585
- attr_accessor :name
3586
-
3587
- sig { returns(Float) }
3588
- attr_accessor :quantity
3589
-
3590
- sig { returns(Symbol) }
3591
- attr_accessor :type
3592
-
3593
- sig do
3594
- params(
3595
- amount: String,
3596
- grouping:
3597
- T.nilable(
3598
- Orb::Invoice::LineItem::SubLineItem::Matrix::Grouping::OrHash
3599
- ),
3600
- matrix_config:
3601
- Orb::Invoice::LineItem::SubLineItem::Matrix::MatrixConfig::OrHash,
3602
- name: String,
3603
- quantity: Float,
3604
- type: Symbol
3605
- ).returns(T.attached_class)
3606
- end
3607
- def self.new(
3608
- # The total amount for this sub line item.
3609
- amount:,
3610
- grouping:,
3611
- matrix_config:,
3612
- name:,
3613
- quantity:,
3614
- type: :matrix
3615
- )
3616
- end
3617
-
3618
- sig do
3619
- override.returns(
3620
- {
3621
- amount: String,
3622
- grouping:
3623
- T.nilable(
3624
- Orb::Invoice::LineItem::SubLineItem::Matrix::Grouping
3625
- ),
3626
- matrix_config:
3627
- Orb::Invoice::LineItem::SubLineItem::Matrix::MatrixConfig,
3628
- name: String,
3629
- quantity: Float,
3630
- type: Symbol
3631
- }
3632
- )
3633
- end
3634
- def to_hash
3635
- end
3636
-
3637
- class Grouping < Orb::Internal::Type::BaseModel
3638
- OrHash =
3639
- T.type_alias do
3640
- T.any(
3641
- Orb::Invoice::LineItem::SubLineItem::Matrix::Grouping,
3642
- Orb::Internal::AnyHash
3643
- )
3644
- end
3645
-
3646
- sig { returns(String) }
3647
- attr_accessor :key
3648
-
3649
- # No value indicates the default group
3650
- sig { returns(T.nilable(String)) }
3651
- attr_accessor :value
3652
-
3653
- sig do
3654
- params(key: String, value: T.nilable(String)).returns(
3655
- T.attached_class
3656
- )
3657
- end
3658
- def self.new(
3659
- key:,
3660
- # No value indicates the default group
3661
- value:
3662
- )
3663
- end
3664
-
3665
- sig do
3666
- override.returns({ key: String, value: T.nilable(String) })
3667
- end
3668
- def to_hash
3669
- end
3670
- end
3671
-
3672
- class MatrixConfig < Orb::Internal::Type::BaseModel
3673
- OrHash =
3674
- T.type_alias do
3675
- T.any(
3676
- Orb::Invoice::LineItem::SubLineItem::Matrix::MatrixConfig,
3677
- Orb::Internal::AnyHash
3678
- )
3679
- end
3680
-
3681
- # The ordered dimension values for this line item.
3682
- sig { returns(T::Array[T.nilable(String)]) }
3683
- attr_accessor :dimension_values
3684
-
3685
- sig do
3686
- params(dimension_values: T::Array[T.nilable(String)]).returns(
3687
- T.attached_class
3688
- )
3689
- end
3690
- def self.new(
3691
- # The ordered dimension values for this line item.
3692
- dimension_values:
3693
- )
3694
- end
3695
-
3696
- sig do
3697
- override.returns(
3698
- { dimension_values: T::Array[T.nilable(String)] }
3699
- )
3700
- end
3701
- def to_hash
3702
- end
3703
- end
3704
- end
3705
-
3706
- class Tier < Orb::Internal::Type::BaseModel
3707
- OrHash =
3708
- T.type_alias do
3709
- T.any(
3710
- Orb::Invoice::LineItem::SubLineItem::Tier,
3711
- Orb::Internal::AnyHash
3712
- )
3713
- end
3714
-
3715
- # The total amount for this sub line item.
3716
- sig { returns(String) }
3717
- attr_accessor :amount
3718
-
3719
- sig do
3720
- returns(
3721
- T.nilable(Orb::Invoice::LineItem::SubLineItem::Tier::Grouping)
3722
- )
3723
- end
3724
- attr_reader :grouping
3725
-
3726
- sig do
3727
- params(
3728
- grouping:
3729
- T.nilable(
3730
- Orb::Invoice::LineItem::SubLineItem::Tier::Grouping::OrHash
3731
- )
3732
- ).void
3733
- end
3734
- attr_writer :grouping
3735
-
3736
- sig { returns(String) }
3737
- attr_accessor :name
3738
-
3739
- sig { returns(Float) }
3740
- attr_accessor :quantity
3741
-
3742
- sig do
3743
- returns(Orb::Invoice::LineItem::SubLineItem::Tier::TierConfig)
3744
- end
3745
- attr_reader :tier_config
3746
-
3747
- sig do
3748
- params(
3749
- tier_config:
3750
- Orb::Invoice::LineItem::SubLineItem::Tier::TierConfig::OrHash
3751
- ).void
3752
- end
3753
- attr_writer :tier_config
3754
-
3755
- sig { returns(Symbol) }
3756
- attr_accessor :type
3757
-
3758
- sig do
3759
- params(
3760
- amount: String,
3761
- grouping:
3762
- T.nilable(
3763
- Orb::Invoice::LineItem::SubLineItem::Tier::Grouping::OrHash
3764
- ),
3765
- name: String,
3766
- quantity: Float,
3767
- tier_config:
3768
- Orb::Invoice::LineItem::SubLineItem::Tier::TierConfig::OrHash,
3769
- type: Symbol
3770
- ).returns(T.attached_class)
3771
- end
3772
- def self.new(
3773
- # The total amount for this sub line item.
3774
- amount:,
3775
- grouping:,
3776
- name:,
3777
- quantity:,
3778
- tier_config:,
3779
- type: :tier
3780
- )
3781
- end
3782
-
3783
- sig do
3784
- override.returns(
3785
- {
3786
- amount: String,
3787
- grouping:
3788
- T.nilable(
3789
- Orb::Invoice::LineItem::SubLineItem::Tier::Grouping
3790
- ),
3791
- name: String,
3792
- quantity: Float,
3793
- tier_config:
3794
- Orb::Invoice::LineItem::SubLineItem::Tier::TierConfig,
3795
- type: Symbol
3796
- }
3797
- )
3798
- end
3799
- def to_hash
3800
- end
3801
-
3802
- class Grouping < Orb::Internal::Type::BaseModel
3803
- OrHash =
3804
- T.type_alias do
3805
- T.any(
3806
- Orb::Invoice::LineItem::SubLineItem::Tier::Grouping,
3807
- Orb::Internal::AnyHash
3808
- )
3809
- end
3810
-
3811
- sig { returns(String) }
3812
- attr_accessor :key
3813
-
3814
- # No value indicates the default group
3815
- sig { returns(T.nilable(String)) }
3816
- attr_accessor :value
3817
-
3818
- sig do
3819
- params(key: String, value: T.nilable(String)).returns(
3820
- T.attached_class
3821
- )
3822
- end
3823
- def self.new(
3824
- key:,
3825
- # No value indicates the default group
3826
- value:
3827
- )
3828
- end
3829
-
3830
- sig do
3831
- override.returns({ key: String, value: T.nilable(String) })
3832
- end
3833
- def to_hash
3834
- end
3835
- end
3836
-
3837
- class TierConfig < Orb::Internal::Type::BaseModel
3838
- OrHash =
3839
- T.type_alias do
3840
- T.any(
3841
- Orb::Invoice::LineItem::SubLineItem::Tier::TierConfig,
3842
- Orb::Internal::AnyHash
3843
- )
3844
- end
3845
-
3846
- sig { returns(Float) }
3847
- attr_accessor :first_unit
3848
-
3849
- sig { returns(T.nilable(Float)) }
3850
- attr_accessor :last_unit
3851
-
3852
- sig { returns(String) }
3853
- attr_accessor :unit_amount
3854
-
3855
- sig do
3856
- params(
3857
- first_unit: Float,
3858
- last_unit: T.nilable(Float),
3859
- unit_amount: String
3860
- ).returns(T.attached_class)
3861
- end
3862
- def self.new(first_unit:, last_unit:, unit_amount:)
3863
- end
3864
-
3865
- sig do
3866
- override.returns(
3867
- {
3868
- first_unit: Float,
3869
- last_unit: T.nilable(Float),
3870
- unit_amount: String
3871
- }
3872
- )
3873
- end
3874
- def to_hash
3875
- end
3876
- end
3877
- end
3878
-
3879
- class Null < Orb::Internal::Type::BaseModel
3880
- OrHash =
3881
- T.type_alias do
3882
- T.any(
3883
- Orb::Invoice::LineItem::SubLineItem::Null,
3884
- Orb::Internal::AnyHash
3885
- )
3886
- end
3887
-
3888
- # The total amount for this sub line item.
3889
- sig { returns(String) }
3890
- attr_accessor :amount
3891
-
3892
- sig do
3893
- returns(
3894
- T.nilable(Orb::Invoice::LineItem::SubLineItem::Null::Grouping)
3895
- )
3896
- end
3897
- attr_reader :grouping
3898
-
3899
- sig do
3900
- params(
3901
- grouping:
3902
- T.nilable(
3903
- Orb::Invoice::LineItem::SubLineItem::Null::Grouping::OrHash
3904
- )
3905
- ).void
3906
- end
3907
- attr_writer :grouping
3908
-
3909
- sig { returns(String) }
3910
- attr_accessor :name
3911
-
3912
- sig { returns(Float) }
3913
- attr_accessor :quantity
3914
-
3915
- sig { returns(Symbol) }
3916
- attr_accessor :type
3917
-
3918
- sig do
3919
- params(
3920
- amount: String,
3921
- grouping:
3922
- T.nilable(
3923
- Orb::Invoice::LineItem::SubLineItem::Null::Grouping::OrHash
3924
- ),
3925
- name: String,
3926
- quantity: Float,
3927
- type: Symbol
3928
- ).returns(T.attached_class)
3929
- end
3930
- def self.new(
3931
- # The total amount for this sub line item.
3932
- amount:,
3933
- grouping:,
3934
- name:,
3935
- quantity:,
3936
- type: :"'null'"
3937
- )
3938
- end
3939
-
3940
- sig do
3941
- override.returns(
3942
- {
3943
- amount: String,
3944
- grouping:
3945
- T.nilable(
3946
- Orb::Invoice::LineItem::SubLineItem::Null::Grouping
3947
- ),
3948
- name: String,
3949
- quantity: Float,
3950
- type: Symbol
3951
- }
3952
- )
3953
- end
3954
- def to_hash
3955
- end
3956
-
3957
- class Grouping < Orb::Internal::Type::BaseModel
3958
- OrHash =
3959
- T.type_alias do
3960
- T.any(
3961
- Orb::Invoice::LineItem::SubLineItem::Null::Grouping,
3962
- Orb::Internal::AnyHash
3963
- )
3964
- end
3965
-
3966
- sig { returns(String) }
3967
- attr_accessor :key
3968
-
3969
- # No value indicates the default group
3970
- sig { returns(T.nilable(String)) }
3971
- attr_accessor :value
3972
-
3973
- sig do
3974
- params(key: String, value: T.nilable(String)).returns(
3975
- T.attached_class
3976
- )
3977
- end
3978
- def self.new(
3979
- key:,
3980
- # No value indicates the default group
3981
- value:
3982
- )
3983
- end
3984
-
3985
- sig do
3986
- override.returns({ key: String, value: T.nilable(String) })
3987
- end
3988
- def to_hash
3989
- end
3990
- end
3991
- end
3992
-
3993
- sig do
3994
- override.returns(
3995
- T::Array[Orb::Invoice::LineItem::SubLineItem::Variants]
3996
- )
3997
- end
3998
- def self.variants
3999
- end
4000
- end
4001
-
4002
- class TaxAmount < Orb::Internal::Type::BaseModel
4003
- OrHash =
4004
- T.type_alias do
4005
- T.any(Orb::Invoice::LineItem::TaxAmount, Orb::Internal::AnyHash)
4006
- end
4007
-
4008
- # The amount of additional tax incurred by this tax rate.
4009
- sig { returns(String) }
4010
- attr_accessor :amount
4011
-
4012
- # The human-readable description of the applied tax rate.
4013
- sig { returns(String) }
4014
- attr_accessor :tax_rate_description
4015
-
4016
- # The tax rate percentage, out of 100.
4017
- sig { returns(T.nilable(String)) }
4018
- attr_accessor :tax_rate_percentage
4019
-
4020
- sig do
4021
- params(
4022
- amount: String,
4023
- tax_rate_description: String,
4024
- tax_rate_percentage: T.nilable(String)
4025
- ).returns(T.attached_class)
4026
- end
4027
- def self.new(
4028
- # The amount of additional tax incurred by this tax rate.
4029
- amount:,
4030
- # The human-readable description of the applied tax rate.
4031
- tax_rate_description:,
4032
- # The tax rate percentage, out of 100.
4033
- tax_rate_percentage:
4034
- )
4035
- end
4036
-
4037
- sig do
4038
- override.returns(
4039
- {
4040
- amount: String,
4041
- tax_rate_description: String,
4042
- tax_rate_percentage: T.nilable(String)
4043
- }
4044
- )
4045
- end
4046
- def to_hash
4047
- end
4048
- end
4049
- end
4050
-
4051
- class Maximum < Orb::Internal::Type::BaseModel
4052
- OrHash =
4053
- T.type_alias { T.any(Orb::Invoice::Maximum, Orb::Internal::AnyHash) }
4054
-
4055
- # List of price_ids that this maximum amount applies to. For plan/plan phase
4056
- # maximums, this can be a subset of prices.
4057
- sig { returns(T::Array[String]) }
4058
- attr_accessor :applies_to_price_ids
4059
-
4060
- # The filters that determine which prices to apply this maximum to.
4061
- sig { returns(T::Array[Orb::Invoice::Maximum::Filter]) }
4062
- attr_accessor :filters
4063
-
4064
- # Maximum amount applied
4065
- sig { returns(String) }
4066
- attr_accessor :maximum_amount
4067
-
4068
- sig do
4069
- params(
4070
- applies_to_price_ids: T::Array[String],
4071
- filters: T::Array[Orb::Invoice::Maximum::Filter::OrHash],
4072
- maximum_amount: String
4073
- ).returns(T.attached_class)
4074
- end
4075
- def self.new(
4076
- # List of price_ids that this maximum amount applies to. For plan/plan phase
4077
- # maximums, this can be a subset of prices.
4078
- applies_to_price_ids:,
4079
- # The filters that determine which prices to apply this maximum to.
4080
- filters:,
4081
- # Maximum amount applied
4082
- maximum_amount:
4083
- )
4084
- end
4085
-
4086
- sig do
4087
- override.returns(
4088
- {
4089
- applies_to_price_ids: T::Array[String],
4090
- filters: T::Array[Orb::Invoice::Maximum::Filter],
4091
- maximum_amount: String
4092
- }
4093
- )
4094
- end
4095
- def to_hash
4096
- end
4097
-
4098
- class Filter < Orb::Internal::Type::BaseModel
4099
- OrHash =
4100
- T.type_alias do
4101
- T.any(Orb::Invoice::Maximum::Filter, Orb::Internal::AnyHash)
4102
- end
4103
-
4104
- # The property of the price to filter on.
4105
- sig { returns(Orb::Invoice::Maximum::Filter::Field::TaggedSymbol) }
4106
- attr_accessor :field
4107
-
4108
- # Should prices that match the filter be included or excluded.
4109
- sig { returns(Orb::Invoice::Maximum::Filter::Operator::TaggedSymbol) }
4110
- attr_accessor :operator
4111
-
4112
- # The IDs or values that match this filter.
4113
- sig { returns(T::Array[String]) }
4114
- attr_accessor :values
4115
-
4116
- sig do
4117
- params(
4118
- field: Orb::Invoice::Maximum::Filter::Field::OrSymbol,
4119
- operator: Orb::Invoice::Maximum::Filter::Operator::OrSymbol,
4120
- values: T::Array[String]
4121
- ).returns(T.attached_class)
4122
- end
4123
- def self.new(
4124
- # The property of the price to filter on.
4125
- field:,
4126
- # Should prices that match the filter be included or excluded.
4127
- operator:,
4128
- # The IDs or values that match this filter.
4129
- values:
4130
- )
4131
- end
4132
-
4133
- sig do
4134
- override.returns(
4135
- {
4136
- field: Orb::Invoice::Maximum::Filter::Field::TaggedSymbol,
4137
- operator: Orb::Invoice::Maximum::Filter::Operator::TaggedSymbol,
4138
- values: T::Array[String]
4139
- }
4140
- )
4141
- end
4142
- def to_hash
4143
- end
4144
-
4145
- # The property of the price to filter on.
4146
- module Field
4147
- extend Orb::Internal::Type::Enum
4148
-
4149
- TaggedSymbol =
4150
- T.type_alias do
4151
- T.all(Symbol, Orb::Invoice::Maximum::Filter::Field)
4152
- end
4153
- OrSymbol = T.type_alias { T.any(Symbol, String) }
4154
-
4155
- PRICE_ID =
4156
- T.let(
4157
- :price_id,
4158
- Orb::Invoice::Maximum::Filter::Field::TaggedSymbol
4159
- )
4160
- ITEM_ID =
4161
- T.let(
4162
- :item_id,
4163
- Orb::Invoice::Maximum::Filter::Field::TaggedSymbol
4164
- )
4165
- PRICE_TYPE =
4166
- T.let(
4167
- :price_type,
4168
- Orb::Invoice::Maximum::Filter::Field::TaggedSymbol
4169
- )
4170
- CURRENCY =
4171
- T.let(
4172
- :currency,
4173
- Orb::Invoice::Maximum::Filter::Field::TaggedSymbol
4174
- )
4175
- PRICING_UNIT_ID =
4176
- T.let(
4177
- :pricing_unit_id,
4178
- Orb::Invoice::Maximum::Filter::Field::TaggedSymbol
4179
- )
4180
-
4181
- sig do
4182
- override.returns(
4183
- T::Array[Orb::Invoice::Maximum::Filter::Field::TaggedSymbol]
4184
- )
4185
- end
4186
- def self.values
4187
- end
4188
- end
4189
-
4190
- # Should prices that match the filter be included or excluded.
4191
- module Operator
4192
- extend Orb::Internal::Type::Enum
4193
-
4194
- TaggedSymbol =
4195
- T.type_alias do
4196
- T.all(Symbol, Orb::Invoice::Maximum::Filter::Operator)
4197
- end
4198
- OrSymbol = T.type_alias { T.any(Symbol, String) }
4199
-
4200
- INCLUDES =
4201
- T.let(
4202
- :includes,
4203
- Orb::Invoice::Maximum::Filter::Operator::TaggedSymbol
4204
- )
4205
- EXCLUDES =
4206
- T.let(
4207
- :excludes,
4208
- Orb::Invoice::Maximum::Filter::Operator::TaggedSymbol
4209
- )
4210
-
4211
- sig do
4212
- override.returns(
4213
- T::Array[Orb::Invoice::Maximum::Filter::Operator::TaggedSymbol]
4214
- )
4215
- end
4216
- def self.values
4217
- end
4218
- end
4219
- end
4220
- end
4221
-
4222
- class Minimum < Orb::Internal::Type::BaseModel
4223
- OrHash =
4224
- T.type_alias { T.any(Orb::Invoice::Minimum, Orb::Internal::AnyHash) }
4225
-
4226
- # List of price_ids that this minimum amount applies to. For plan/plan phase
4227
- # minimums, this can be a subset of prices.
4228
- sig { returns(T::Array[String]) }
4229
- attr_accessor :applies_to_price_ids
4230
-
4231
- # The filters that determine which prices to apply this minimum to.
4232
- sig { returns(T::Array[Orb::Invoice::Minimum::Filter]) }
4233
- attr_accessor :filters
4234
-
4235
- # Minimum amount applied
4236
- sig { returns(String) }
4237
- attr_accessor :minimum_amount
4238
-
4239
- sig do
4240
- params(
4241
- applies_to_price_ids: T::Array[String],
4242
- filters: T::Array[Orb::Invoice::Minimum::Filter::OrHash],
4243
- minimum_amount: String
4244
- ).returns(T.attached_class)
4245
- end
4246
- def self.new(
4247
- # List of price_ids that this minimum amount applies to. For plan/plan phase
4248
- # minimums, this can be a subset of prices.
4249
- applies_to_price_ids:,
4250
- # The filters that determine which prices to apply this minimum to.
4251
- filters:,
4252
- # Minimum amount applied
4253
- minimum_amount:
4254
- )
4255
- end
4256
-
4257
- sig do
4258
- override.returns(
4259
- {
4260
- applies_to_price_ids: T::Array[String],
4261
- filters: T::Array[Orb::Invoice::Minimum::Filter],
4262
- minimum_amount: String
4263
- }
4264
- )
4265
- end
4266
- def to_hash
4267
- end
4268
-
4269
- class Filter < Orb::Internal::Type::BaseModel
4270
- OrHash =
4271
- T.type_alias do
4272
- T.any(Orb::Invoice::Minimum::Filter, Orb::Internal::AnyHash)
4273
- end
4274
-
4275
- # The property of the price to filter on.
4276
- sig { returns(Orb::Invoice::Minimum::Filter::Field::TaggedSymbol) }
4277
- attr_accessor :field
4278
-
4279
- # Should prices that match the filter be included or excluded.
4280
- sig { returns(Orb::Invoice::Minimum::Filter::Operator::TaggedSymbol) }
4281
- attr_accessor :operator
4282
-
4283
- # The IDs or values that match this filter.
4284
- sig { returns(T::Array[String]) }
4285
- attr_accessor :values
4286
-
4287
- sig do
4288
- params(
4289
- field: Orb::Invoice::Minimum::Filter::Field::OrSymbol,
4290
- operator: Orb::Invoice::Minimum::Filter::Operator::OrSymbol,
4291
- values: T::Array[String]
4292
- ).returns(T.attached_class)
4293
- end
4294
- def self.new(
4295
- # The property of the price to filter on.
4296
- field:,
4297
- # Should prices that match the filter be included or excluded.
4298
- operator:,
4299
- # The IDs or values that match this filter.
4300
- values:
4301
- )
4302
- end
4303
-
4304
- sig do
4305
- override.returns(
4306
- {
4307
- field: Orb::Invoice::Minimum::Filter::Field::TaggedSymbol,
4308
- operator: Orb::Invoice::Minimum::Filter::Operator::TaggedSymbol,
4309
- values: T::Array[String]
4310
- }
4311
- )
4312
- end
4313
- def to_hash
4314
- end
4315
-
4316
- # The property of the price to filter on.
4317
- module Field
4318
- extend Orb::Internal::Type::Enum
4319
-
4320
- TaggedSymbol =
4321
- T.type_alias do
4322
- T.all(Symbol, Orb::Invoice::Minimum::Filter::Field)
4323
- end
4324
- OrSymbol = T.type_alias { T.any(Symbol, String) }
4325
-
4326
- PRICE_ID =
4327
- T.let(
4328
- :price_id,
4329
- Orb::Invoice::Minimum::Filter::Field::TaggedSymbol
4330
- )
4331
- ITEM_ID =
4332
- T.let(
4333
- :item_id,
4334
- Orb::Invoice::Minimum::Filter::Field::TaggedSymbol
4335
- )
4336
- PRICE_TYPE =
4337
- T.let(
4338
- :price_type,
4339
- Orb::Invoice::Minimum::Filter::Field::TaggedSymbol
4340
- )
4341
- CURRENCY =
4342
- T.let(
4343
- :currency,
4344
- Orb::Invoice::Minimum::Filter::Field::TaggedSymbol
4345
- )
4346
- PRICING_UNIT_ID =
4347
- T.let(
4348
- :pricing_unit_id,
4349
- Orb::Invoice::Minimum::Filter::Field::TaggedSymbol
4350
- )
4351
-
4352
- sig do
4353
- override.returns(
4354
- T::Array[Orb::Invoice::Minimum::Filter::Field::TaggedSymbol]
4355
- )
4356
- end
4357
- def self.values
4358
- end
4359
- end
4360
-
4361
- # Should prices that match the filter be included or excluded.
4362
- module Operator
4363
- extend Orb::Internal::Type::Enum
4364
-
4365
- TaggedSymbol =
4366
- T.type_alias do
4367
- T.all(Symbol, Orb::Invoice::Minimum::Filter::Operator)
4368
- end
4369
- OrSymbol = T.type_alias { T.any(Symbol, String) }
4370
-
4371
- INCLUDES =
4372
- T.let(
4373
- :includes,
4374
- Orb::Invoice::Minimum::Filter::Operator::TaggedSymbol
4375
- )
4376
- EXCLUDES =
4377
- T.let(
4378
- :excludes,
4379
- Orb::Invoice::Minimum::Filter::Operator::TaggedSymbol
4380
- )
4381
-
4382
- sig do
4383
- override.returns(
4384
- T::Array[Orb::Invoice::Minimum::Filter::Operator::TaggedSymbol]
4385
- )
4386
- end
4387
- def self.values
4388
- end
4389
- end
4390
- end
4391
- end
4392
-
4393
- class PaymentAttempt < Orb::Internal::Type::BaseModel
4394
- OrHash =
4395
- T.type_alias do
4396
- T.any(Orb::Invoice::PaymentAttempt, Orb::Internal::AnyHash)
4397
- end
4398
-
4399
- # The ID of the payment attempt.
4400
- sig { returns(String) }
4401
- attr_accessor :id
4402
-
4403
- # The amount of the payment attempt.
4404
- sig { returns(String) }
4405
- attr_accessor :amount
4406
-
4407
- # The time at which the payment attempt was created.
4408
- sig { returns(Time) }
4409
- attr_accessor :created_at
4410
-
4411
- # The payment provider that attempted to collect the payment.
4412
- sig do
4413
- returns(
4414
- T.nilable(
4415
- Orb::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol
4416
- )
4417
- )
4418
- end
4419
- attr_accessor :payment_provider
4420
-
4421
- # The ID of the payment attempt in the payment provider.
4422
- sig { returns(T.nilable(String)) }
4423
- attr_accessor :payment_provider_id
4424
-
4425
- # Whether the payment attempt succeeded.
4426
- sig { returns(T::Boolean) }
4427
- attr_accessor :succeeded
4428
-
4429
- sig do
4430
- params(
4431
- id: String,
4432
- amount: String,
4433
- created_at: Time,
4434
- payment_provider:
4435
- T.nilable(
4436
- Orb::Invoice::PaymentAttempt::PaymentProvider::OrSymbol
4437
- ),
4438
- payment_provider_id: T.nilable(String),
4439
- succeeded: T::Boolean
4440
- ).returns(T.attached_class)
4441
- end
4442
- def self.new(
4443
- # The ID of the payment attempt.
4444
- id:,
4445
- # The amount of the payment attempt.
4446
- amount:,
4447
- # The time at which the payment attempt was created.
4448
- created_at:,
4449
- # The payment provider that attempted to collect the payment.
4450
- payment_provider:,
4451
- # The ID of the payment attempt in the payment provider.
4452
- payment_provider_id:,
4453
- # Whether the payment attempt succeeded.
4454
- succeeded:
4455
- )
4456
- end
4457
-
4458
- sig do
4459
- override.returns(
4460
- {
4461
- id: String,
4462
- amount: String,
4463
- created_at: Time,
4464
- payment_provider:
4465
- T.nilable(
4466
- Orb::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol
4467
- ),
4468
- payment_provider_id: T.nilable(String),
4469
- succeeded: T::Boolean
4470
- }
4471
- )
4472
- end
4473
- def to_hash
4474
- end
4475
-
4476
- # The payment provider that attempted to collect the payment.
4477
- module PaymentProvider
4478
- extend Orb::Internal::Type::Enum
4479
-
4480
- TaggedSymbol =
4481
- T.type_alias do
4482
- T.all(Symbol, Orb::Invoice::PaymentAttempt::PaymentProvider)
4483
- end
4484
- OrSymbol = T.type_alias { T.any(Symbol, String) }
4485
-
4486
- STRIPE =
4487
- T.let(
4488
- :stripe,
4489
- Orb::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol
4490
- )
4491
-
4492
- sig do
4493
- override.returns(
4494
- T::Array[
4495
- Orb::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol
4496
- ]
4497
- )
4498
- end
4499
- def self.values
4500
- end
4501
- end
4502
- end
4503
-
4504
- class ShippingAddress < Orb::Internal::Type::BaseModel
4505
- OrHash =
4506
- T.type_alias do
4507
- T.any(Orb::Invoice::ShippingAddress, Orb::Internal::AnyHash)
4508
- end
4509
-
4510
- sig { returns(T.nilable(String)) }
4511
- attr_accessor :city
4512
-
4513
- sig { returns(T.nilable(String)) }
4514
- attr_accessor :country
4515
-
4516
- sig { returns(T.nilable(String)) }
4517
- attr_accessor :line1
4518
-
4519
- sig { returns(T.nilable(String)) }
4520
- attr_accessor :line2
4521
-
4522
- sig { returns(T.nilable(String)) }
4523
- attr_accessor :postal_code
4524
-
4525
- sig { returns(T.nilable(String)) }
4526
- attr_accessor :state
4527
-
4528
- sig do
4529
- params(
4530
- city: T.nilable(String),
4531
- country: T.nilable(String),
4532
- line1: T.nilable(String),
4533
- line2: T.nilable(String),
4534
- postal_code: T.nilable(String),
4535
- state: T.nilable(String)
4536
- ).returns(T.attached_class)
4537
- end
4538
- def self.new(city:, country:, line1:, line2:, postal_code:, state:)
4539
- end
4540
-
4541
- sig do
4542
- override.returns(
4543
- {
4544
- city: T.nilable(String),
4545
- country: T.nilable(String),
4546
- line1: T.nilable(String),
4547
- line2: T.nilable(String),
4548
- postal_code: T.nilable(String),
4549
- state: T.nilable(String)
4550
- }
4551
- )
4552
- end
4553
- def to_hash
4554
- end
4555
- end
4556
-
4557
- module Status
4558
- extend Orb::Internal::Type::Enum
4559
-
4560
- TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Invoice::Status) }
4561
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1445
+ TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Invoice::Status) }
1446
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
4562
1447
 
4563
1448
  ISSUED = T.let(:issued, Orb::Invoice::Status::TaggedSymbol)
4564
1449
  PAID = T.let(:paid, Orb::Invoice::Status::TaggedSymbol)
@@ -4570,24 +1455,6 @@ module Orb
4570
1455
  def self.values
4571
1456
  end
4572
1457
  end
4573
-
4574
- class Subscription < Orb::Internal::Type::BaseModel
4575
- OrHash =
4576
- T.type_alias do
4577
- T.any(Orb::Invoice::Subscription, Orb::Internal::AnyHash)
4578
- end
4579
-
4580
- sig { returns(String) }
4581
- attr_accessor :id
4582
-
4583
- sig { params(id: String).returns(T.attached_class) }
4584
- def self.new(id:)
4585
- end
4586
-
4587
- sig { override.returns({ id: String }) }
4588
- def to_hash
4589
- end
4590
- end
4591
1458
  end
4592
1459
  end
4593
1460
  end