orb-billing 1.14.0 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (347) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/lib/orb/client.rb +14 -0
  4. data/lib/orb/internal/transport/base_client.rb +5 -0
  5. data/lib/orb/internal/type/union.rb +13 -27
  6. data/lib/orb/models/accounting_provider_config.rb +14 -3
  7. data/lib/orb/models/adjustment_interval.rb +185 -3
  8. data/lib/orb/models/alert.rb +105 -1
  9. data/lib/orb/models/alert_create_for_subscription_params.rb +120 -7
  10. data/lib/orb/models/alert_update_params.rb +113 -1
  11. data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +2419 -17109
  12. data/lib/orb/models/beta_create_plan_version_params.rb +2361 -16947
  13. data/lib/orb/models/changed_subscription_resources.rb +200 -10
  14. data/lib/orb/models/conversion_rate_config.rb +18 -0
  15. data/lib/orb/models/credit_block_list_invoices_response.rb +155 -1
  16. data/lib/orb/models/credit_block_retrieve_response.rb +150 -1
  17. data/lib/orb/models/customer.rb +111 -4
  18. data/lib/orb/models/customer_create_params.rb +6 -1
  19. data/lib/orb/models/customer_tax_id.rb +15 -1
  20. data/lib/orb/models/customer_update_by_external_id_params.rb +16 -2
  21. data/lib/orb/models/customer_update_params.rb +16 -2
  22. data/lib/orb/models/customers/credit_list_by_external_id_response.rb +155 -1
  23. data/lib/orb/models/customers/credit_list_response.rb +152 -1
  24. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +4 -4
  25. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +4 -4
  26. data/lib/orb/models/dimensional_price_group.rb +1 -1
  27. data/lib/orb/models/discount.rb +145 -1
  28. data/lib/orb/models/event_ingest_params.rb +5 -2
  29. data/lib/orb/models/invoice.rb +198 -10
  30. data/lib/orb/models/invoice_create_params.rb +6 -5
  31. data/lib/orb/models/invoice_fetch_upcoming_response.rb +200 -10
  32. data/lib/orb/models/invoice_issue_summary_response.rb +9 -3
  33. data/lib/orb/models/invoice_level_discount.rb +145 -1
  34. data/lib/orb/models/invoice_line_item_create_response.rb +189 -5
  35. data/lib/orb/models/invoice_list_summary_response.rb +9 -3
  36. data/lib/orb/models/licenses/external_license_get_usage_params.rb +3 -3
  37. data/lib/orb/models/licenses/usage_get_all_usage_params.rb +3 -3
  38. data/lib/orb/models/licenses/usage_get_usage_params.rb +3 -3
  39. data/lib/orb/models/mutated_subscription.rb +169 -4
  40. data/lib/orb/models/new_allocation_price.rb +11 -1
  41. data/lib/orb/models/new_floating_bulk_price.rb +1 -3
  42. data/lib/orb/models/new_floating_bulk_with_proration_price.rb +1 -3
  43. data/lib/orb/models/new_floating_cumulative_grouped_bulk_price.rb +1 -3
  44. data/lib/orb/models/new_floating_grouped_allocation_price.rb +1 -3
  45. data/lib/orb/models/new_floating_grouped_tiered_package_price.rb +1 -3
  46. data/lib/orb/models/new_floating_grouped_tiered_price.rb +1 -3
  47. data/lib/orb/models/new_floating_grouped_with_metered_minimum_price.rb +1 -3
  48. data/lib/orb/models/new_floating_grouped_with_prorated_minimum_price.rb +1 -3
  49. data/lib/orb/models/new_floating_matrix_price.rb +1 -3
  50. data/lib/orb/models/new_floating_matrix_with_allocation_price.rb +1 -3
  51. data/lib/orb/models/new_floating_matrix_with_display_name_price.rb +1 -3
  52. data/lib/orb/models/new_floating_max_group_tiered_package_price.rb +1 -3
  53. data/lib/orb/models/new_floating_minimum_composite_price.rb +1 -3
  54. data/lib/orb/models/new_floating_package_price.rb +1 -3
  55. data/lib/orb/models/new_floating_package_with_allocation_price.rb +1 -3
  56. data/lib/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  57. data/lib/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rb +1 -3
  58. data/lib/orb/models/new_floating_threshold_total_amount_price.rb +1 -3
  59. data/lib/orb/models/new_floating_tiered_package_price.rb +1 -3
  60. data/lib/orb/models/new_floating_tiered_package_with_minimum_price.rb +1 -3
  61. data/lib/orb/models/new_floating_tiered_price.rb +1 -3
  62. data/lib/orb/models/new_floating_tiered_with_minimum_price.rb +1 -3
  63. data/lib/orb/models/new_floating_tiered_with_proration_price.rb +1 -3
  64. data/lib/orb/models/new_floating_unit_price.rb +1 -3
  65. data/lib/orb/models/new_floating_unit_with_percent_price.rb +1 -3
  66. data/lib/orb/models/new_floating_unit_with_proration_price.rb +1 -3
  67. data/lib/orb/models/new_plan_bulk_price.rb +1 -1
  68. data/lib/orb/models/new_plan_bulk_with_proration_price.rb +1 -3
  69. data/lib/orb/models/new_plan_cumulative_grouped_bulk_price.rb +1 -3
  70. data/lib/orb/models/new_plan_grouped_allocation_price.rb +1 -3
  71. data/lib/orb/models/new_plan_grouped_tiered_package_price.rb +1 -3
  72. data/lib/orb/models/new_plan_grouped_tiered_price.rb +1 -3
  73. data/lib/orb/models/new_plan_grouped_with_metered_minimum_price.rb +1 -3
  74. data/lib/orb/models/new_plan_grouped_with_prorated_minimum_price.rb +1 -3
  75. data/lib/orb/models/new_plan_matrix_price.rb +1 -5
  76. data/lib/orb/models/new_plan_matrix_with_allocation_price.rb +1 -3
  77. data/lib/orb/models/new_plan_matrix_with_display_name_price.rb +1 -3
  78. data/lib/orb/models/new_plan_max_group_tiered_package_price.rb +1 -3
  79. data/lib/orb/models/new_plan_minimum_composite_price.rb +1 -3
  80. data/lib/orb/models/new_plan_package_price.rb +1 -5
  81. data/lib/orb/models/new_plan_package_with_allocation_price.rb +1 -3
  82. data/lib/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  83. data/lib/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rb +1 -3
  84. data/lib/orb/models/new_plan_threshold_total_amount_price.rb +1 -3
  85. data/lib/orb/models/new_plan_tiered_package_price.rb +1 -3
  86. data/lib/orb/models/new_plan_tiered_package_with_minimum_price.rb +1 -3
  87. data/lib/orb/models/new_plan_tiered_price.rb +1 -5
  88. data/lib/orb/models/new_plan_tiered_with_minimum_price.rb +1 -3
  89. data/lib/orb/models/new_plan_unit_price.rb +1 -1
  90. data/lib/orb/models/new_plan_unit_with_percent_price.rb +1 -3
  91. data/lib/orb/models/new_plan_unit_with_proration_price.rb +1 -3
  92. data/lib/orb/models/new_subscription_bulk_price.rb +1 -3
  93. data/lib/orb/models/new_subscription_bulk_with_proration_price.rb +1 -3
  94. data/lib/orb/models/new_subscription_cumulative_grouped_bulk_price.rb +1 -3
  95. data/lib/orb/models/new_subscription_grouped_allocation_price.rb +1 -3
  96. data/lib/orb/models/new_subscription_grouped_tiered_package_price.rb +1 -3
  97. data/lib/orb/models/new_subscription_grouped_tiered_price.rb +1 -3
  98. data/lib/orb/models/new_subscription_grouped_with_metered_minimum_price.rb +1 -3
  99. data/lib/orb/models/new_subscription_grouped_with_prorated_minimum_price.rb +1 -3
  100. data/lib/orb/models/new_subscription_matrix_price.rb +1 -3
  101. data/lib/orb/models/new_subscription_matrix_with_allocation_price.rb +1 -3
  102. data/lib/orb/models/new_subscription_matrix_with_display_name_price.rb +1 -3
  103. data/lib/orb/models/new_subscription_max_group_tiered_package_price.rb +1 -3
  104. data/lib/orb/models/new_subscription_minimum_composite_price.rb +1 -3
  105. data/lib/orb/models/new_subscription_package_price.rb +1 -3
  106. data/lib/orb/models/new_subscription_package_with_allocation_price.rb +1 -3
  107. data/lib/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  108. data/lib/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rb +1 -3
  109. data/lib/orb/models/new_subscription_threshold_total_amount_price.rb +1 -3
  110. data/lib/orb/models/new_subscription_tiered_package_price.rb +1 -3
  111. data/lib/orb/models/new_subscription_tiered_package_with_minimum_price.rb +1 -3
  112. data/lib/orb/models/new_subscription_tiered_price.rb +1 -3
  113. data/lib/orb/models/new_subscription_tiered_with_minimum_price.rb +1 -3
  114. data/lib/orb/models/new_subscription_unit_price.rb +1 -3
  115. data/lib/orb/models/new_subscription_unit_with_percent_price.rb +1 -3
  116. data/lib/orb/models/new_subscription_unit_with_proration_price.rb +1 -3
  117. data/lib/orb/models/per_price_cost.rb +2 -2
  118. data/lib/orb/models/plan.rb +189 -9
  119. data/lib/orb/models/plan_create_params.rb +1047 -8228
  120. data/lib/orb/models/plan_update_params.rb +9 -1
  121. data/lib/orb/models/plan_version.rb +186 -5
  122. data/lib/orb/models/plans/external_plan_id_update_params.rb +9 -1
  123. data/lib/orb/models/plans/migration_cancel_response.rb +22 -4
  124. data/lib/orb/models/plans/migration_list_response.rb +22 -4
  125. data/lib/orb/models/plans/migration_retrieve_response.rb +22 -4
  126. data/lib/orb/models/price.rb +2614 -1268
  127. data/lib/orb/models/price_create_params.rb +866 -49
  128. data/lib/orb/models/price_evaluate_multiple_params.rb +889 -54
  129. data/lib/orb/models/price_evaluate_preview_events_params.rb +881 -46
  130. data/lib/orb/models/price_interval.rb +2 -2
  131. data/lib/orb/models/subscription.rb +168 -4
  132. data/lib/orb/models/subscription_create_params.rb +2818 -674
  133. data/lib/orb/models/subscription_price_intervals_params.rb +1098 -57
  134. data/lib/orb/models/subscription_schedule_plan_change_params.rb +2834 -687
  135. data/lib/orb/models/subscription_update_params.rb +12 -1
  136. data/lib/orb/models.rb +2 -0
  137. data/lib/orb/resources/alerts.rb +14 -3
  138. data/lib/orb/resources/customers/credits/ledger.rb +28 -14
  139. data/lib/orb/resources/customers.rb +6 -2
  140. data/lib/orb/resources/events.rb +7 -34
  141. data/lib/orb/resources/invoices.rb +6 -2
  142. data/lib/orb/resources/licenses/external_licenses.rb +1 -1
  143. data/lib/orb/resources/licenses/usage.rb +2 -2
  144. data/lib/orb/resources/metrics.rb +5 -5
  145. data/lib/orb/resources/plans/external_plan_id.rb +5 -3
  146. data/lib/orb/resources/plans.rb +9 -5
  147. data/lib/orb/resources/prices/external_price_id.rb +2 -2
  148. data/lib/orb/resources/prices.rb +5 -5
  149. data/lib/orb/resources/subscriptions.rb +20 -3
  150. data/lib/orb/version.rb +1 -1
  151. data/lib/orb.rb +1 -0
  152. data/rbi/orb/models/accounting_provider_config.rbi +38 -5
  153. data/rbi/orb/models/adjustment_interval.rbi +336 -0
  154. data/rbi/orb/models/alert.rbi +172 -3
  155. data/rbi/orb/models/alert_create_for_subscription_params.rbi +268 -9
  156. data/rbi/orb/models/alert_update_params.rbi +208 -0
  157. data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +3833 -28395
  158. data/rbi/orb/models/beta_create_plan_version_params.rbi +3833 -28363
  159. data/rbi/orb/models/changed_subscription_resources.rbi +360 -5
  160. data/rbi/orb/models/conversion_rate_config.rbi +18 -0
  161. data/rbi/orb/models/credit_block_list_invoices_response.rbi +346 -3
  162. data/rbi/orb/models/credit_block_retrieve_response.rbi +344 -3
  163. data/rbi/orb/models/customer.rbi +190 -10
  164. data/rbi/orb/models/customer_create_params.rbi +12 -2
  165. data/rbi/orb/models/customer_tax_id.rbi +15 -1
  166. data/rbi/orb/models/customer_update_by_external_id_params.rbi +22 -2
  167. data/rbi/orb/models/customer_update_params.rbi +22 -2
  168. data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +346 -3
  169. data/rbi/orb/models/customers/credit_list_response.rbi +347 -3
  170. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +6 -6
  171. data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +6 -6
  172. data/rbi/orb/models/dimensional_price_group.rbi +1 -1
  173. data/rbi/orb/models/discount.rbi +269 -1
  174. data/rbi/orb/models/event_ingest_params.rbi +4 -2
  175. data/rbi/orb/models/invoice.rbi +360 -5
  176. data/rbi/orb/models/invoice_create_params.rbi +12 -7
  177. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +360 -5
  178. data/rbi/orb/models/invoice_issue_summary_response.rbi +19 -4
  179. data/rbi/orb/models/invoice_level_discount.rbi +298 -1
  180. data/rbi/orb/models/invoice_line_item_create_response.rbi +339 -0
  181. data/rbi/orb/models/invoice_list_summary_response.rbi +19 -4
  182. data/rbi/orb/models/licenses/external_license_get_usage_params.rbi +3 -3
  183. data/rbi/orb/models/licenses/usage_get_all_usage_params.rbi +3 -3
  184. data/rbi/orb/models/licenses/usage_get_usage_params.rbi +3 -3
  185. data/rbi/orb/models/mutated_subscription.rbi +324 -2
  186. data/rbi/orb/models/new_allocation_price.rbi +12 -0
  187. data/rbi/orb/models/per_price_cost.rbi +3 -0
  188. data/rbi/orb/models/plan.rbi +339 -2
  189. data/rbi/orb/models/plan_create_params.rbi +1877 -14138
  190. data/rbi/orb/models/plan_update_params.rbi +8 -0
  191. data/rbi/orb/models/plan_version.rbi +339 -0
  192. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +8 -0
  193. data/rbi/orb/models/plans/migration_cancel_response.rbi +22 -1
  194. data/rbi/orb/models/plans/migration_list_response.rbi +22 -1
  195. data/rbi/orb/models/plans/migration_retrieve_response.rbi +22 -1
  196. data/rbi/orb/models/price.rbi +4552 -2285
  197. data/rbi/orb/models/price_create_params.rbi +1540 -114
  198. data/rbi/orb/models/price_evaluate_multiple_params.rbi +1540 -114
  199. data/rbi/orb/models/price_evaluate_preview_events_params.rbi +1540 -114
  200. data/rbi/orb/models/price_interval.rbi +3 -0
  201. data/rbi/orb/models/subscription.rbi +324 -2
  202. data/rbi/orb/models/subscription_create_params.rbi +4998 -1186
  203. data/rbi/orb/models/subscription_price_intervals_params.rbi +2127 -264
  204. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +4997 -1185
  205. data/rbi/orb/models/subscription_update_params.rbi +14 -0
  206. data/rbi/orb/models.rbi +2 -0
  207. data/rbi/orb/resources/alerts.rbi +39 -4
  208. data/rbi/orb/resources/customers/credits/ledger.rbi +28 -14
  209. data/rbi/orb/resources/customers.rbi +23 -0
  210. data/rbi/orb/resources/events.rbi +8 -35
  211. data/rbi/orb/resources/invoices.rbi +9 -3
  212. data/rbi/orb/resources/licenses/external_licenses.rbi +1 -1
  213. data/rbi/orb/resources/licenses/usage.rbi +2 -2
  214. data/rbi/orb/resources/metrics.rbi +5 -5
  215. data/rbi/orb/resources/plans/external_plan_id.rbi +5 -2
  216. data/rbi/orb/resources/plans.rbi +9 -3
  217. data/rbi/orb/resources/prices.rbi +3 -0
  218. data/rbi/orb/resources/subscriptions.rbi +29 -0
  219. data/sig/orb/models/accounting_provider_config.rbs +21 -4
  220. data/sig/orb/models/adjustment_interval.rbs +134 -0
  221. data/sig/orb/models/alert.rbs +85 -3
  222. data/sig/orb/models/alert_create_for_subscription_params.rbs +86 -4
  223. data/sig/orb/models/alert_update_params.rbs +86 -1
  224. data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +1803 -11601
  225. data/sig/orb/models/beta_create_plan_version_params.rbs +1747 -11541
  226. data/sig/orb/models/changed_subscription_resources.rbs +140 -1
  227. data/sig/orb/models/conversion_rate_config.rbs +12 -0
  228. data/sig/orb/models/credit_block_list_invoices_response.rbs +124 -3
  229. data/sig/orb/models/credit_block_retrieve_response.rbs +124 -3
  230. data/sig/orb/models/customer.rbs +70 -4
  231. data/sig/orb/models/customer_create_params.rbs +2 -2
  232. data/sig/orb/models/customer_tax_id.rbs +20 -2
  233. data/sig/orb/models/customer_update_by_external_id_params.rbs +7 -2
  234. data/sig/orb/models/customer_update_params.rbs +7 -2
  235. data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +124 -3
  236. data/sig/orb/models/customers/credit_list_response.rbs +124 -3
  237. data/sig/orb/models/discount.rbs +114 -0
  238. data/sig/orb/models/invoice.rbs +140 -1
  239. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +140 -1
  240. data/sig/orb/models/invoice_issue_summary_response.rbs +2 -1
  241. data/sig/orb/models/invoice_level_discount.rbs +117 -1
  242. data/sig/orb/models/invoice_line_item_create_response.rbs +134 -0
  243. data/sig/orb/models/invoice_list_summary_response.rbs +2 -1
  244. data/sig/orb/models/licenses/external_license_get_usage_params.rbs +4 -4
  245. data/sig/orb/models/licenses/usage_get_all_usage_params.rbs +4 -4
  246. data/sig/orb/models/licenses/usage_get_usage_params.rbs +4 -4
  247. data/sig/orb/models/mutated_subscription.rbs +124 -0
  248. data/sig/orb/models/new_allocation_price.rbs +5 -0
  249. data/sig/orb/models/new_floating_bulk_price.rbs +4 -4
  250. data/sig/orb/models/new_floating_bulk_with_proration_price.rbs +4 -4
  251. data/sig/orb/models/new_floating_cumulative_grouped_bulk_price.rbs +4 -4
  252. data/sig/orb/models/new_floating_grouped_allocation_price.rbs +4 -4
  253. data/sig/orb/models/new_floating_grouped_tiered_package_price.rbs +4 -4
  254. data/sig/orb/models/new_floating_grouped_tiered_price.rbs +4 -4
  255. data/sig/orb/models/new_floating_grouped_with_metered_minimum_price.rbs +4 -4
  256. data/sig/orb/models/new_floating_grouped_with_prorated_minimum_price.rbs +4 -4
  257. data/sig/orb/models/new_floating_matrix_price.rbs +4 -4
  258. data/sig/orb/models/new_floating_matrix_with_allocation_price.rbs +4 -4
  259. data/sig/orb/models/new_floating_matrix_with_display_name_price.rbs +4 -4
  260. data/sig/orb/models/new_floating_max_group_tiered_package_price.rbs +4 -4
  261. data/sig/orb/models/new_floating_minimum_composite_price.rbs +4 -4
  262. data/sig/orb/models/new_floating_package_price.rbs +4 -4
  263. data/sig/orb/models/new_floating_package_with_allocation_price.rbs +4 -4
  264. data/sig/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  265. data/sig/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  266. data/sig/orb/models/new_floating_threshold_total_amount_price.rbs +4 -4
  267. data/sig/orb/models/new_floating_tiered_package_price.rbs +4 -4
  268. data/sig/orb/models/new_floating_tiered_package_with_minimum_price.rbs +4 -4
  269. data/sig/orb/models/new_floating_tiered_price.rbs +4 -4
  270. data/sig/orb/models/new_floating_tiered_with_minimum_price.rbs +4 -4
  271. data/sig/orb/models/new_floating_tiered_with_proration_price.rbs +4 -4
  272. data/sig/orb/models/new_floating_unit_price.rbs +4 -4
  273. data/sig/orb/models/new_floating_unit_with_percent_price.rbs +4 -4
  274. data/sig/orb/models/new_floating_unit_with_proration_price.rbs +4 -4
  275. data/sig/orb/models/new_plan_bulk_price.rbs +4 -4
  276. data/sig/orb/models/new_plan_bulk_with_proration_price.rbs +4 -4
  277. data/sig/orb/models/new_plan_cumulative_grouped_bulk_price.rbs +4 -4
  278. data/sig/orb/models/new_plan_grouped_allocation_price.rbs +4 -4
  279. data/sig/orb/models/new_plan_grouped_tiered_package_price.rbs +4 -4
  280. data/sig/orb/models/new_plan_grouped_tiered_price.rbs +4 -4
  281. data/sig/orb/models/new_plan_grouped_with_metered_minimum_price.rbs +4 -4
  282. data/sig/orb/models/new_plan_grouped_with_prorated_minimum_price.rbs +4 -4
  283. data/sig/orb/models/new_plan_matrix_price.rbs +4 -4
  284. data/sig/orb/models/new_plan_matrix_with_allocation_price.rbs +4 -4
  285. data/sig/orb/models/new_plan_matrix_with_display_name_price.rbs +4 -4
  286. data/sig/orb/models/new_plan_max_group_tiered_package_price.rbs +4 -4
  287. data/sig/orb/models/new_plan_minimum_composite_price.rbs +4 -4
  288. data/sig/orb/models/new_plan_package_price.rbs +4 -4
  289. data/sig/orb/models/new_plan_package_with_allocation_price.rbs +4 -4
  290. data/sig/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  291. data/sig/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  292. data/sig/orb/models/new_plan_threshold_total_amount_price.rbs +4 -4
  293. data/sig/orb/models/new_plan_tiered_package_price.rbs +4 -4
  294. data/sig/orb/models/new_plan_tiered_package_with_minimum_price.rbs +4 -4
  295. data/sig/orb/models/new_plan_tiered_price.rbs +4 -4
  296. data/sig/orb/models/new_plan_tiered_with_minimum_price.rbs +4 -4
  297. data/sig/orb/models/new_plan_unit_price.rbs +4 -4
  298. data/sig/orb/models/new_plan_unit_with_percent_price.rbs +4 -4
  299. data/sig/orb/models/new_plan_unit_with_proration_price.rbs +4 -4
  300. data/sig/orb/models/new_subscription_bulk_price.rbs +4 -4
  301. data/sig/orb/models/new_subscription_bulk_with_proration_price.rbs +4 -4
  302. data/sig/orb/models/new_subscription_cumulative_grouped_bulk_price.rbs +4 -4
  303. data/sig/orb/models/new_subscription_grouped_allocation_price.rbs +4 -4
  304. data/sig/orb/models/new_subscription_grouped_tiered_package_price.rbs +4 -4
  305. data/sig/orb/models/new_subscription_grouped_tiered_price.rbs +4 -4
  306. data/sig/orb/models/new_subscription_grouped_with_metered_minimum_price.rbs +4 -4
  307. data/sig/orb/models/new_subscription_grouped_with_prorated_minimum_price.rbs +4 -4
  308. data/sig/orb/models/new_subscription_matrix_price.rbs +4 -4
  309. data/sig/orb/models/new_subscription_matrix_with_allocation_price.rbs +4 -4
  310. data/sig/orb/models/new_subscription_matrix_with_display_name_price.rbs +4 -4
  311. data/sig/orb/models/new_subscription_max_group_tiered_package_price.rbs +4 -4
  312. data/sig/orb/models/new_subscription_minimum_composite_price.rbs +4 -4
  313. data/sig/orb/models/new_subscription_package_price.rbs +4 -4
  314. data/sig/orb/models/new_subscription_package_with_allocation_price.rbs +4 -4
  315. data/sig/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  316. data/sig/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  317. data/sig/orb/models/new_subscription_threshold_total_amount_price.rbs +4 -4
  318. data/sig/orb/models/new_subscription_tiered_package_price.rbs +4 -4
  319. data/sig/orb/models/new_subscription_tiered_package_with_minimum_price.rbs +4 -4
  320. data/sig/orb/models/new_subscription_tiered_price.rbs +4 -4
  321. data/sig/orb/models/new_subscription_tiered_with_minimum_price.rbs +4 -4
  322. data/sig/orb/models/new_subscription_unit_price.rbs +4 -4
  323. data/sig/orb/models/new_subscription_unit_with_percent_price.rbs +4 -4
  324. data/sig/orb/models/new_subscription_unit_with_proration_price.rbs +4 -4
  325. data/sig/orb/models/plan.rbs +134 -0
  326. data/sig/orb/models/plan_create_params.rbs +836 -5728
  327. data/sig/orb/models/plan_update_params.rbs +5 -0
  328. data/sig/orb/models/plan_version.rbs +134 -0
  329. data/sig/orb/models/plans/external_plan_id_update_params.rbs +5 -0
  330. data/sig/orb/models/price.rbs +2200 -1150
  331. data/sig/orb/models/price_create_params.rbs +611 -23
  332. data/sig/orb/models/price_evaluate_multiple_params.rbs +626 -23
  333. data/sig/orb/models/price_evaluate_preview_events_params.rbs +626 -23
  334. data/sig/orb/models/subscription.rbs +124 -0
  335. data/sig/orb/models/subscription_create_params.rbs +2009 -430
  336. data/sig/orb/models/subscription_price_intervals_params.rbs +795 -23
  337. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +2009 -430
  338. data/sig/orb/models/subscription_update_params.rbs +5 -0
  339. data/sig/orb/models.rbs +2 -0
  340. data/sig/orb/resources/alerts.rbs +5 -1
  341. data/sig/orb/resources/customers.rbs +2 -0
  342. data/sig/orb/resources/licenses/external_licenses.rbs +1 -1
  343. data/sig/orb/resources/licenses/usage.rbs +2 -2
  344. data/sig/orb/resources/plans/external_plan_id.rbs +1 -0
  345. data/sig/orb/resources/plans.rbs +2 -0
  346. data/sig/orb/resources/subscriptions.rbs +3 -0
  347. metadata +6 -7
@@ -57,6 +57,11 @@ module Orb
57
57
  sig { returns(T.nilable(String)) }
58
58
  attr_accessor :currency
59
59
 
60
+ # The Orb ID of the payment method to set as this customer's default. Pass `null`
61
+ # to clear the customer's default payment method.
62
+ sig { returns(T.nilable(String)) }
63
+ attr_accessor :default_payment_method_id
64
+
60
65
  # A valid customer email, to be used for invoicing and notifications.
61
66
  sig { returns(T.nilable(String)) }
62
67
  attr_accessor :email
@@ -223,11 +228,13 @@ module Orb
223
228
  # | Estonia | `eu_vat` | European VAT Number |
224
229
  # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
225
230
  # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
231
+ # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
226
232
  # | Finland | `eu_vat` | European VAT Number |
227
233
  # | France | `eu_vat` | European VAT Number |
228
234
  # | Georgia | `ge_vat` | Georgian VAT |
229
235
  # | Germany | `de_stn` | German Tax Number (Steuernummer) |
230
236
  # | Germany | `eu_vat` | European VAT Number |
237
+ # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
231
238
  # | Greece | `eu_vat` | European VAT Number |
232
239
  # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
233
240
  # | Hong Kong | `hk_br` | Hong Kong BR Number |
@@ -239,6 +246,7 @@ module Orb
239
246
  # | Ireland | `eu_vat` | European VAT Number |
240
247
  # | Israel | `il_vat` | Israel VAT |
241
248
  # | Italy | `eu_vat` | European VAT Number |
249
+ # | Italy | `it_cf` | Italian Codice Fiscale Number |
242
250
  # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
243
251
  # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
244
252
  # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
@@ -269,6 +277,7 @@ module Orb
269
277
  # | Norway | `no_vat` | Norwegian VAT Number |
270
278
  # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
271
279
  # | Oman | `om_vat` | Omani VAT Number |
280
+ # | Paraguay | `py_ruc` | Paraguayan RUC Number |
272
281
  # | Peru | `pe_ruc` | Peruvian RUC Number |
273
282
  # | Philippines | `ph_tin` | Philippines Tax Identification Number |
274
283
  # | Poland | `eu_vat` | European VAT Number |
@@ -290,6 +299,7 @@ module Orb
290
299
  # | South Korea | `kr_brn` | Korean BRN |
291
300
  # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
292
301
  # | Spain | `eu_vat` | European VAT Number |
302
+ # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
293
303
  # | Suriname | `sr_fin` | Suriname FIN Number |
294
304
  # | Sweden | `eu_vat` | European VAT Number |
295
305
  # | Switzerland | `ch_uid` | Switzerland UID Number |
@@ -327,6 +337,7 @@ module Orb
327
337
  auto_issuance: T.nilable(T::Boolean),
328
338
  billing_address: T.nilable(Orb::AddressInput::OrHash),
329
339
  currency: T.nilable(String),
340
+ default_payment_method_id: T.nilable(String),
330
341
  email: T.nilable(String),
331
342
  email_delivery: T.nilable(T::Boolean),
332
343
  external_customer_id: T.nilable(String),
@@ -382,6 +393,9 @@ module Orb
382
393
  # not set at creation or update time, it will be set at subscription creation
383
394
  # time.
384
395
  currency: nil,
396
+ # The Orb ID of the payment method to set as this customer's default. Pass `null`
397
+ # to clear the customer's default payment method.
398
+ default_payment_method_id: nil,
385
399
  # A valid customer email, to be used for invoicing and notifications.
386
400
  email: nil,
387
401
  email_delivery: nil,
@@ -473,11 +487,13 @@ module Orb
473
487
  # | Estonia | `eu_vat` | European VAT Number |
474
488
  # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
475
489
  # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
490
+ # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
476
491
  # | Finland | `eu_vat` | European VAT Number |
477
492
  # | France | `eu_vat` | European VAT Number |
478
493
  # | Georgia | `ge_vat` | Georgian VAT |
479
494
  # | Germany | `de_stn` | German Tax Number (Steuernummer) |
480
495
  # | Germany | `eu_vat` | European VAT Number |
496
+ # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
481
497
  # | Greece | `eu_vat` | European VAT Number |
482
498
  # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
483
499
  # | Hong Kong | `hk_br` | Hong Kong BR Number |
@@ -489,6 +505,7 @@ module Orb
489
505
  # | Ireland | `eu_vat` | European VAT Number |
490
506
  # | Israel | `il_vat` | Israel VAT |
491
507
  # | Italy | `eu_vat` | European VAT Number |
508
+ # | Italy | `it_cf` | Italian Codice Fiscale Number |
492
509
  # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
493
510
  # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
494
511
  # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
@@ -519,6 +536,7 @@ module Orb
519
536
  # | Norway | `no_vat` | Norwegian VAT Number |
520
537
  # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
521
538
  # | Oman | `om_vat` | Omani VAT Number |
539
+ # | Paraguay | `py_ruc` | Paraguayan RUC Number |
522
540
  # | Peru | `pe_ruc` | Peruvian RUC Number |
523
541
  # | Philippines | `ph_tin` | Philippines Tax Identification Number |
524
542
  # | Poland | `eu_vat` | European VAT Number |
@@ -540,6 +558,7 @@ module Orb
540
558
  # | South Korea | `kr_brn` | Korean BRN |
541
559
  # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
542
560
  # | Spain | `eu_vat` | European VAT Number |
561
+ # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
543
562
  # | Suriname | `sr_fin` | Suriname FIN Number |
544
563
  # | Sweden | `eu_vat` | European VAT Number |
545
564
  # | Switzerland | `ch_uid` | Switzerland UID Number |
@@ -577,6 +596,7 @@ module Orb
577
596
  auto_issuance: T.nilable(T::Boolean),
578
597
  billing_address: T.nilable(Orb::AddressInput),
579
598
  currency: T.nilable(String),
599
+ default_payment_method_id: T.nilable(String),
580
600
  email: T.nilable(String),
581
601
  email_delivery: T.nilable(T::Boolean),
582
602
  external_customer_id: T.nilable(String),
@@ -820,9 +840,9 @@ module Orb
820
840
  :netsuite,
821
841
  Orb::CustomerUpdateByExternalIDParams::PaymentProvider::TaggedSymbol
822
842
  )
823
- NETSUITE_AMPERSAND =
843
+ ADYEN =
824
844
  T.let(
825
- :netsuite_ampersand,
845
+ :adyen,
826
846
  Orb::CustomerUpdateByExternalIDParams::PaymentProvider::TaggedSymbol
827
847
  )
828
848
 
@@ -57,6 +57,11 @@ module Orb
57
57
  sig { returns(T.nilable(String)) }
58
58
  attr_accessor :currency
59
59
 
60
+ # The Orb ID of the payment method to set as this customer's default. Pass `null`
61
+ # to clear the customer's default payment method.
62
+ sig { returns(T.nilable(String)) }
63
+ attr_accessor :default_payment_method_id
64
+
60
65
  # A valid customer email, to be used for invoicing and notifications.
61
66
  sig { returns(T.nilable(String)) }
62
67
  attr_accessor :email
@@ -215,11 +220,13 @@ module Orb
215
220
  # | Estonia | `eu_vat` | European VAT Number |
216
221
  # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
217
222
  # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
223
+ # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
218
224
  # | Finland | `eu_vat` | European VAT Number |
219
225
  # | France | `eu_vat` | European VAT Number |
220
226
  # | Georgia | `ge_vat` | Georgian VAT |
221
227
  # | Germany | `de_stn` | German Tax Number (Steuernummer) |
222
228
  # | Germany | `eu_vat` | European VAT Number |
229
+ # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
223
230
  # | Greece | `eu_vat` | European VAT Number |
224
231
  # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
225
232
  # | Hong Kong | `hk_br` | Hong Kong BR Number |
@@ -231,6 +238,7 @@ module Orb
231
238
  # | Ireland | `eu_vat` | European VAT Number |
232
239
  # | Israel | `il_vat` | Israel VAT |
233
240
  # | Italy | `eu_vat` | European VAT Number |
241
+ # | Italy | `it_cf` | Italian Codice Fiscale Number |
234
242
  # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
235
243
  # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
236
244
  # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
@@ -261,6 +269,7 @@ module Orb
261
269
  # | Norway | `no_vat` | Norwegian VAT Number |
262
270
  # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
263
271
  # | Oman | `om_vat` | Omani VAT Number |
272
+ # | Paraguay | `py_ruc` | Paraguayan RUC Number |
264
273
  # | Peru | `pe_ruc` | Peruvian RUC Number |
265
274
  # | Philippines | `ph_tin` | Philippines Tax Identification Number |
266
275
  # | Poland | `eu_vat` | European VAT Number |
@@ -282,6 +291,7 @@ module Orb
282
291
  # | South Korea | `kr_brn` | Korean BRN |
283
292
  # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
284
293
  # | Spain | `eu_vat` | European VAT Number |
294
+ # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
285
295
  # | Suriname | `sr_fin` | Suriname FIN Number |
286
296
  # | Sweden | `eu_vat` | European VAT Number |
287
297
  # | Switzerland | `ch_uid` | Switzerland UID Number |
@@ -319,6 +329,7 @@ module Orb
319
329
  auto_issuance: T.nilable(T::Boolean),
320
330
  billing_address: T.nilable(Orb::AddressInput::OrHash),
321
331
  currency: T.nilable(String),
332
+ default_payment_method_id: T.nilable(String),
322
333
  email: T.nilable(String),
323
334
  email_delivery: T.nilable(T::Boolean),
324
335
  external_customer_id: T.nilable(String),
@@ -370,6 +381,9 @@ module Orb
370
381
  # not set at creation or update time, it will be set at subscription creation
371
382
  # time.
372
383
  currency: nil,
384
+ # The Orb ID of the payment method to set as this customer's default. Pass `null`
385
+ # to clear the customer's default payment method.
386
+ default_payment_method_id: nil,
373
387
  # A valid customer email, to be used for invoicing and notifications.
374
388
  email: nil,
375
389
  email_delivery: nil,
@@ -461,11 +475,13 @@ module Orb
461
475
  # | Estonia | `eu_vat` | European VAT Number |
462
476
  # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
463
477
  # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
478
+ # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
464
479
  # | Finland | `eu_vat` | European VAT Number |
465
480
  # | France | `eu_vat` | European VAT Number |
466
481
  # | Georgia | `ge_vat` | Georgian VAT |
467
482
  # | Germany | `de_stn` | German Tax Number (Steuernummer) |
468
483
  # | Germany | `eu_vat` | European VAT Number |
484
+ # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
469
485
  # | Greece | `eu_vat` | European VAT Number |
470
486
  # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
471
487
  # | Hong Kong | `hk_br` | Hong Kong BR Number |
@@ -477,6 +493,7 @@ module Orb
477
493
  # | Ireland | `eu_vat` | European VAT Number |
478
494
  # | Israel | `il_vat` | Israel VAT |
479
495
  # | Italy | `eu_vat` | European VAT Number |
496
+ # | Italy | `it_cf` | Italian Codice Fiscale Number |
480
497
  # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
481
498
  # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
482
499
  # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
@@ -507,6 +524,7 @@ module Orb
507
524
  # | Norway | `no_vat` | Norwegian VAT Number |
508
525
  # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
509
526
  # | Oman | `om_vat` | Omani VAT Number |
527
+ # | Paraguay | `py_ruc` | Paraguayan RUC Number |
510
528
  # | Peru | `pe_ruc` | Peruvian RUC Number |
511
529
  # | Philippines | `ph_tin` | Philippines Tax Identification Number |
512
530
  # | Poland | `eu_vat` | European VAT Number |
@@ -528,6 +546,7 @@ module Orb
528
546
  # | South Korea | `kr_brn` | Korean BRN |
529
547
  # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
530
548
  # | Spain | `eu_vat` | European VAT Number |
549
+ # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
531
550
  # | Suriname | `sr_fin` | Suriname FIN Number |
532
551
  # | Sweden | `eu_vat` | European VAT Number |
533
552
  # | Switzerland | `ch_uid` | Switzerland UID Number |
@@ -565,6 +584,7 @@ module Orb
565
584
  auto_issuance: T.nilable(T::Boolean),
566
585
  billing_address: T.nilable(Orb::AddressInput),
567
586
  currency: T.nilable(String),
587
+ default_payment_method_id: T.nilable(String),
568
588
  email: T.nilable(String),
569
589
  email_delivery: T.nilable(T::Boolean),
570
590
  external_customer_id: T.nilable(String),
@@ -801,9 +821,9 @@ module Orb
801
821
  :netsuite,
802
822
  Orb::CustomerUpdateParams::PaymentProvider::TaggedSymbol
803
823
  )
804
- NETSUITE_AMPERSAND =
824
+ ADYEN =
805
825
  T.let(
806
- :netsuite_ampersand,
826
+ :adyen,
807
827
  Orb::CustomerUpdateParams::PaymentProvider::TaggedSymbol
808
828
  )
809
829
 
@@ -18,6 +18,17 @@ module Orb
18
18
  sig { returns(Float) }
19
19
  attr_accessor :balance
20
20
 
21
+ # How this credit block was created: `allocation` (a subscription's recurring
22
+ # credit allocation), `top_up` (an automatic balance-threshold top-up), or
23
+ # `manual` (a manual credit ledger increment, including credits voided or expired
24
+ # off another block).
25
+ sig do
26
+ returns(
27
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditBlockSource::TaggedSymbol
28
+ )
29
+ end
30
+ attr_accessor :credit_block_source
31
+
21
32
  sig { returns(T.nilable(Time)) }
22
33
  attr_accessor :effective_date
23
34
 
@@ -53,10 +64,33 @@ module Orb
53
64
  end
54
65
  attr_accessor :status
55
66
 
67
+ # The credit allocation that funded a block. Extends the allocation resource
68
+ # serialized on prices with the catalog-item attribution of the funding price.
69
+ sig do
70
+ returns(
71
+ T.nilable(
72
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation
73
+ )
74
+ )
75
+ end
76
+ attr_reader :credit_allocation
77
+
78
+ sig do
79
+ params(
80
+ credit_allocation:
81
+ T.nilable(
82
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::OrHash
83
+ )
84
+ ).void
85
+ end
86
+ attr_writer :credit_allocation
87
+
56
88
  sig do
57
89
  params(
58
90
  id: String,
59
91
  balance: Float,
92
+ credit_block_source:
93
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditBlockSource::OrSymbol,
60
94
  effective_date: T.nilable(Time),
61
95
  expiry_date: T.nilable(Time),
62
96
  filters:
@@ -67,12 +101,21 @@ module Orb
67
101
  metadata: T::Hash[Symbol, String],
68
102
  per_unit_cost_basis: T.nilable(String),
69
103
  status:
70
- Orb::Models::Customers::CreditListByExternalIDResponse::Status::OrSymbol
104
+ Orb::Models::Customers::CreditListByExternalIDResponse::Status::OrSymbol,
105
+ credit_allocation:
106
+ T.nilable(
107
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::OrHash
108
+ )
71
109
  ).returns(T.attached_class)
72
110
  end
73
111
  def self.new(
74
112
  id:,
75
113
  balance:,
114
+ # How this credit block was created: `allocation` (a subscription's recurring
115
+ # credit allocation), `top_up` (an automatic balance-threshold top-up), or
116
+ # `manual` (a manual credit ledger increment, including credits voided or expired
117
+ # off another block).
118
+ credit_block_source:,
76
119
  effective_date:,
77
120
  expiry_date:,
78
121
  filters:,
@@ -83,7 +126,10 @@ module Orb
83
126
  # `null`.
84
127
  metadata:,
85
128
  per_unit_cost_basis:,
86
- status:
129
+ status:,
130
+ # The credit allocation that funded a block. Extends the allocation resource
131
+ # serialized on prices with the catalog-item attribution of the funding price.
132
+ credit_allocation: nil
87
133
  )
88
134
  end
89
135
 
@@ -92,6 +138,8 @@ module Orb
92
138
  {
93
139
  id: String,
94
140
  balance: Float,
141
+ credit_block_source:
142
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditBlockSource::TaggedSymbol,
95
143
  effective_date: T.nilable(Time),
96
144
  expiry_date: T.nilable(Time),
97
145
  filters:
@@ -102,13 +150,60 @@ module Orb
102
150
  metadata: T::Hash[Symbol, String],
103
151
  per_unit_cost_basis: T.nilable(String),
104
152
  status:
105
- Orb::Models::Customers::CreditListByExternalIDResponse::Status::TaggedSymbol
153
+ Orb::Models::Customers::CreditListByExternalIDResponse::Status::TaggedSymbol,
154
+ credit_allocation:
155
+ T.nilable(
156
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation
157
+ )
106
158
  }
107
159
  )
108
160
  end
109
161
  def to_hash
110
162
  end
111
163
 
164
+ # How this credit block was created: `allocation` (a subscription's recurring
165
+ # credit allocation), `top_up` (an automatic balance-threshold top-up), or
166
+ # `manual` (a manual credit ledger increment, including credits voided or expired
167
+ # off another block).
168
+ module CreditBlockSource
169
+ extend Orb::Internal::Type::Enum
170
+
171
+ TaggedSymbol =
172
+ T.type_alias do
173
+ T.all(
174
+ Symbol,
175
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditBlockSource
176
+ )
177
+ end
178
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
179
+
180
+ ALLOCATION =
181
+ T.let(
182
+ :allocation,
183
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditBlockSource::TaggedSymbol
184
+ )
185
+ TOP_UP =
186
+ T.let(
187
+ :top_up,
188
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditBlockSource::TaggedSymbol
189
+ )
190
+ MANUAL =
191
+ T.let(
192
+ :manual,
193
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditBlockSource::TaggedSymbol
194
+ )
195
+
196
+ sig do
197
+ override.returns(
198
+ T::Array[
199
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditBlockSource::TaggedSymbol
200
+ ]
201
+ )
202
+ end
203
+ def self.values
204
+ end
205
+ end
206
+
112
207
  class Filter < Orb::Internal::Type::BaseModel
113
208
  OrHash =
114
209
  T.type_alias do
@@ -271,6 +366,254 @@ module Orb
271
366
  def self.values
272
367
  end
273
368
  end
369
+
370
+ class CreditAllocation < Orb::Internal::Type::BaseModel
371
+ OrHash =
372
+ T.type_alias do
373
+ T.any(
374
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation,
375
+ Orb::Internal::AnyHash
376
+ )
377
+ end
378
+
379
+ sig { returns(T::Boolean) }
380
+ attr_accessor :allows_rollover
381
+
382
+ sig { returns(String) }
383
+ attr_accessor :currency
384
+
385
+ sig { returns(T.nilable(Orb::CustomExpiration)) }
386
+ attr_reader :custom_expiration
387
+
388
+ sig do
389
+ params(
390
+ custom_expiration: T.nilable(Orb::CustomExpiration::OrHash)
391
+ ).void
392
+ end
393
+ attr_writer :custom_expiration
394
+
395
+ # The ID of the catalog item this block was allocated from, derived from the
396
+ # allocation's price.
397
+ sig { returns(String) }
398
+ attr_accessor :item_id
399
+
400
+ sig do
401
+ returns(
402
+ T.nilable(
403
+ T::Array[
404
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter
405
+ ]
406
+ )
407
+ )
408
+ end
409
+ attr_reader :filters
410
+
411
+ sig do
412
+ params(
413
+ filters:
414
+ T::Array[
415
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::OrHash
416
+ ]
417
+ ).void
418
+ end
419
+ attr_writer :filters
420
+
421
+ sig { returns(T.nilable(String)) }
422
+ attr_accessor :license_type_id
423
+
424
+ # The credit allocation that funded a block. Extends the allocation resource
425
+ # serialized on prices with the catalog-item attribution of the funding price.
426
+ sig do
427
+ params(
428
+ allows_rollover: T::Boolean,
429
+ currency: String,
430
+ custom_expiration: T.nilable(Orb::CustomExpiration::OrHash),
431
+ item_id: String,
432
+ filters:
433
+ T::Array[
434
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::OrHash
435
+ ],
436
+ license_type_id: T.nilable(String)
437
+ ).returns(T.attached_class)
438
+ end
439
+ def self.new(
440
+ allows_rollover:,
441
+ currency:,
442
+ custom_expiration:,
443
+ # The ID of the catalog item this block was allocated from, derived from the
444
+ # allocation's price.
445
+ item_id:,
446
+ filters: nil,
447
+ license_type_id: nil
448
+ )
449
+ end
450
+
451
+ sig do
452
+ override.returns(
453
+ {
454
+ allows_rollover: T::Boolean,
455
+ currency: String,
456
+ custom_expiration: T.nilable(Orb::CustomExpiration),
457
+ item_id: String,
458
+ filters:
459
+ T::Array[
460
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter
461
+ ],
462
+ license_type_id: T.nilable(String)
463
+ }
464
+ )
465
+ end
466
+ def to_hash
467
+ end
468
+
469
+ class Filter < Orb::Internal::Type::BaseModel
470
+ OrHash =
471
+ T.type_alias do
472
+ T.any(
473
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter,
474
+ Orb::Internal::AnyHash
475
+ )
476
+ end
477
+
478
+ # The property of the price to filter on.
479
+ sig do
480
+ returns(
481
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Field::TaggedSymbol
482
+ )
483
+ end
484
+ attr_accessor :field
485
+
486
+ # Should prices that match the filter be included or excluded.
487
+ sig do
488
+ returns(
489
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Operator::TaggedSymbol
490
+ )
491
+ end
492
+ attr_accessor :operator
493
+
494
+ # The IDs or values that match this filter.
495
+ sig { returns(T::Array[String]) }
496
+ attr_accessor :values
497
+
498
+ sig do
499
+ params(
500
+ field:
501
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Field::OrSymbol,
502
+ operator:
503
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Operator::OrSymbol,
504
+ values: T::Array[String]
505
+ ).returns(T.attached_class)
506
+ end
507
+ def self.new(
508
+ # The property of the price to filter on.
509
+ field:,
510
+ # Should prices that match the filter be included or excluded.
511
+ operator:,
512
+ # The IDs or values that match this filter.
513
+ values:
514
+ )
515
+ end
516
+
517
+ sig do
518
+ override.returns(
519
+ {
520
+ field:
521
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Field::TaggedSymbol,
522
+ operator:
523
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Operator::TaggedSymbol,
524
+ values: T::Array[String]
525
+ }
526
+ )
527
+ end
528
+ def to_hash
529
+ end
530
+
531
+ # The property of the price to filter on.
532
+ module Field
533
+ extend Orb::Internal::Type::Enum
534
+
535
+ TaggedSymbol =
536
+ T.type_alias do
537
+ T.all(
538
+ Symbol,
539
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Field
540
+ )
541
+ end
542
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
543
+
544
+ PRICE_ID =
545
+ T.let(
546
+ :price_id,
547
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Field::TaggedSymbol
548
+ )
549
+ ITEM_ID =
550
+ T.let(
551
+ :item_id,
552
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Field::TaggedSymbol
553
+ )
554
+ PRICE_TYPE =
555
+ T.let(
556
+ :price_type,
557
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Field::TaggedSymbol
558
+ )
559
+ CURRENCY =
560
+ T.let(
561
+ :currency,
562
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Field::TaggedSymbol
563
+ )
564
+ PRICING_UNIT_ID =
565
+ T.let(
566
+ :pricing_unit_id,
567
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Field::TaggedSymbol
568
+ )
569
+
570
+ sig do
571
+ override.returns(
572
+ T::Array[
573
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Field::TaggedSymbol
574
+ ]
575
+ )
576
+ end
577
+ def self.values
578
+ end
579
+ end
580
+
581
+ # Should prices that match the filter be included or excluded.
582
+ module Operator
583
+ extend Orb::Internal::Type::Enum
584
+
585
+ TaggedSymbol =
586
+ T.type_alias do
587
+ T.all(
588
+ Symbol,
589
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Operator
590
+ )
591
+ end
592
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
593
+
594
+ INCLUDES =
595
+ T.let(
596
+ :includes,
597
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Operator::TaggedSymbol
598
+ )
599
+ EXCLUDES =
600
+ T.let(
601
+ :excludes,
602
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Operator::TaggedSymbol
603
+ )
604
+
605
+ sig do
606
+ override.returns(
607
+ T::Array[
608
+ Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Operator::TaggedSymbol
609
+ ]
610
+ )
611
+ end
612
+ def self.values
613
+ end
614
+ end
615
+ end
616
+ end
274
617
  end
275
618
  end
276
619
  end