orb-billing 1.14.0 → 1.16.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 (351) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/README.md +1 -1
  4. data/lib/orb/client.rb +14 -0
  5. data/lib/orb/internal/transport/base_client.rb +5 -0
  6. data/lib/orb/internal/type/union.rb +13 -27
  7. data/lib/orb/models/accounting_provider_config.rb +14 -3
  8. data/lib/orb/models/adjustment_interval.rb +185 -3
  9. data/lib/orb/models/alert.rb +105 -1
  10. data/lib/orb/models/alert_create_for_subscription_params.rb +120 -7
  11. data/lib/orb/models/alert_update_params.rb +113 -1
  12. data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +2419 -17109
  13. data/lib/orb/models/beta_create_plan_version_params.rb +2361 -16947
  14. data/lib/orb/models/billable_metric.rb +10 -1
  15. data/lib/orb/models/changed_subscription_resources.rb +200 -10
  16. data/lib/orb/models/conversion_rate_config.rb +18 -0
  17. data/lib/orb/models/credit_block_list_invoices_response.rb +192 -1
  18. data/lib/orb/models/credit_block_retrieve_response.rb +185 -1
  19. data/lib/orb/models/customer.rb +111 -4
  20. data/lib/orb/models/customer_create_params.rb +6 -1
  21. data/lib/orb/models/customer_tax_id.rb +15 -1
  22. data/lib/orb/models/customer_update_by_external_id_params.rb +16 -2
  23. data/lib/orb/models/customer_update_params.rb +16 -2
  24. data/lib/orb/models/customers/credit_list_by_external_id_response.rb +192 -1
  25. data/lib/orb/models/customers/credit_list_response.rb +189 -1
  26. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +4 -4
  27. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +4 -4
  28. data/lib/orb/models/dimensional_price_group.rb +1 -1
  29. data/lib/orb/models/discount.rb +145 -1
  30. data/lib/orb/models/event_ingest_params.rb +5 -2
  31. data/lib/orb/models/invoice.rb +198 -10
  32. data/lib/orb/models/invoice_create_params.rb +6 -5
  33. data/lib/orb/models/invoice_fetch_upcoming_response.rb +200 -10
  34. data/lib/orb/models/invoice_issue_summary_response.rb +9 -3
  35. data/lib/orb/models/invoice_level_discount.rb +145 -1
  36. data/lib/orb/models/invoice_line_item_create_response.rb +189 -5
  37. data/lib/orb/models/invoice_list_summary_response.rb +9 -3
  38. data/lib/orb/models/licenses/external_license_get_usage_params.rb +3 -3
  39. data/lib/orb/models/licenses/usage_get_all_usage_params.rb +3 -3
  40. data/lib/orb/models/licenses/usage_get_usage_params.rb +3 -3
  41. data/lib/orb/models/mutated_subscription.rb +169 -4
  42. data/lib/orb/models/new_allocation_price.rb +11 -1
  43. data/lib/orb/models/new_floating_bulk_price.rb +1 -3
  44. data/lib/orb/models/new_floating_bulk_with_proration_price.rb +1 -3
  45. data/lib/orb/models/new_floating_cumulative_grouped_bulk_price.rb +1 -3
  46. data/lib/orb/models/new_floating_grouped_allocation_price.rb +1 -3
  47. data/lib/orb/models/new_floating_grouped_tiered_package_price.rb +1 -3
  48. data/lib/orb/models/new_floating_grouped_tiered_price.rb +1 -3
  49. data/lib/orb/models/new_floating_grouped_with_metered_minimum_price.rb +1 -3
  50. data/lib/orb/models/new_floating_grouped_with_prorated_minimum_price.rb +1 -3
  51. data/lib/orb/models/new_floating_matrix_price.rb +1 -3
  52. data/lib/orb/models/new_floating_matrix_with_allocation_price.rb +1 -3
  53. data/lib/orb/models/new_floating_matrix_with_display_name_price.rb +1 -3
  54. data/lib/orb/models/new_floating_max_group_tiered_package_price.rb +1 -3
  55. data/lib/orb/models/new_floating_minimum_composite_price.rb +1 -3
  56. data/lib/orb/models/new_floating_package_price.rb +1 -3
  57. data/lib/orb/models/new_floating_package_with_allocation_price.rb +1 -3
  58. data/lib/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  59. data/lib/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rb +1 -3
  60. data/lib/orb/models/new_floating_threshold_total_amount_price.rb +1 -3
  61. data/lib/orb/models/new_floating_tiered_package_price.rb +1 -3
  62. data/lib/orb/models/new_floating_tiered_package_with_minimum_price.rb +1 -3
  63. data/lib/orb/models/new_floating_tiered_price.rb +1 -3
  64. data/lib/orb/models/new_floating_tiered_with_minimum_price.rb +1 -3
  65. data/lib/orb/models/new_floating_tiered_with_proration_price.rb +1 -3
  66. data/lib/orb/models/new_floating_unit_price.rb +1 -3
  67. data/lib/orb/models/new_floating_unit_with_percent_price.rb +1 -3
  68. data/lib/orb/models/new_floating_unit_with_proration_price.rb +1 -3
  69. data/lib/orb/models/new_plan_bulk_price.rb +1 -1
  70. data/lib/orb/models/new_plan_bulk_with_proration_price.rb +1 -3
  71. data/lib/orb/models/new_plan_cumulative_grouped_bulk_price.rb +1 -3
  72. data/lib/orb/models/new_plan_grouped_allocation_price.rb +1 -3
  73. data/lib/orb/models/new_plan_grouped_tiered_package_price.rb +1 -3
  74. data/lib/orb/models/new_plan_grouped_tiered_price.rb +1 -3
  75. data/lib/orb/models/new_plan_grouped_with_metered_minimum_price.rb +1 -3
  76. data/lib/orb/models/new_plan_grouped_with_prorated_minimum_price.rb +1 -3
  77. data/lib/orb/models/new_plan_matrix_price.rb +1 -5
  78. data/lib/orb/models/new_plan_matrix_with_allocation_price.rb +1 -3
  79. data/lib/orb/models/new_plan_matrix_with_display_name_price.rb +1 -3
  80. data/lib/orb/models/new_plan_max_group_tiered_package_price.rb +1 -3
  81. data/lib/orb/models/new_plan_minimum_composite_price.rb +1 -3
  82. data/lib/orb/models/new_plan_package_price.rb +1 -5
  83. data/lib/orb/models/new_plan_package_with_allocation_price.rb +1 -3
  84. data/lib/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  85. data/lib/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rb +1 -3
  86. data/lib/orb/models/new_plan_threshold_total_amount_price.rb +1 -3
  87. data/lib/orb/models/new_plan_tiered_package_price.rb +1 -3
  88. data/lib/orb/models/new_plan_tiered_package_with_minimum_price.rb +1 -3
  89. data/lib/orb/models/new_plan_tiered_price.rb +1 -5
  90. data/lib/orb/models/new_plan_tiered_with_minimum_price.rb +1 -3
  91. data/lib/orb/models/new_plan_unit_price.rb +1 -1
  92. data/lib/orb/models/new_plan_unit_with_percent_price.rb +1 -3
  93. data/lib/orb/models/new_plan_unit_with_proration_price.rb +1 -3
  94. data/lib/orb/models/new_subscription_bulk_price.rb +1 -3
  95. data/lib/orb/models/new_subscription_bulk_with_proration_price.rb +1 -3
  96. data/lib/orb/models/new_subscription_cumulative_grouped_bulk_price.rb +1 -3
  97. data/lib/orb/models/new_subscription_grouped_allocation_price.rb +1 -3
  98. data/lib/orb/models/new_subscription_grouped_tiered_package_price.rb +1 -3
  99. data/lib/orb/models/new_subscription_grouped_tiered_price.rb +1 -3
  100. data/lib/orb/models/new_subscription_grouped_with_metered_minimum_price.rb +1 -3
  101. data/lib/orb/models/new_subscription_grouped_with_prorated_minimum_price.rb +1 -3
  102. data/lib/orb/models/new_subscription_matrix_price.rb +1 -3
  103. data/lib/orb/models/new_subscription_matrix_with_allocation_price.rb +1 -3
  104. data/lib/orb/models/new_subscription_matrix_with_display_name_price.rb +1 -3
  105. data/lib/orb/models/new_subscription_max_group_tiered_package_price.rb +1 -3
  106. data/lib/orb/models/new_subscription_minimum_composite_price.rb +1 -3
  107. data/lib/orb/models/new_subscription_package_price.rb +1 -3
  108. data/lib/orb/models/new_subscription_package_with_allocation_price.rb +1 -3
  109. data/lib/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  110. data/lib/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rb +1 -3
  111. data/lib/orb/models/new_subscription_threshold_total_amount_price.rb +1 -3
  112. data/lib/orb/models/new_subscription_tiered_package_price.rb +1 -3
  113. data/lib/orb/models/new_subscription_tiered_package_with_minimum_price.rb +1 -3
  114. data/lib/orb/models/new_subscription_tiered_price.rb +1 -3
  115. data/lib/orb/models/new_subscription_tiered_with_minimum_price.rb +1 -3
  116. data/lib/orb/models/new_subscription_unit_price.rb +1 -3
  117. data/lib/orb/models/new_subscription_unit_with_percent_price.rb +1 -3
  118. data/lib/orb/models/new_subscription_unit_with_proration_price.rb +1 -3
  119. data/lib/orb/models/per_price_cost.rb +2 -2
  120. data/lib/orb/models/plan.rb +189 -9
  121. data/lib/orb/models/plan_create_params.rb +1047 -8228
  122. data/lib/orb/models/plan_update_params.rb +9 -1
  123. data/lib/orb/models/plan_version.rb +186 -5
  124. data/lib/orb/models/plans/external_plan_id_update_params.rb +9 -1
  125. data/lib/orb/models/plans/migration_cancel_response.rb +22 -4
  126. data/lib/orb/models/plans/migration_list_response.rb +22 -4
  127. data/lib/orb/models/plans/migration_retrieve_response.rb +22 -4
  128. data/lib/orb/models/price.rb +2614 -1268
  129. data/lib/orb/models/price_create_params.rb +866 -49
  130. data/lib/orb/models/price_evaluate_multiple_params.rb +889 -54
  131. data/lib/orb/models/price_evaluate_preview_events_params.rb +881 -46
  132. data/lib/orb/models/price_interval.rb +2 -2
  133. data/lib/orb/models/subscription.rb +168 -4
  134. data/lib/orb/models/subscription_create_params.rb +2818 -674
  135. data/lib/orb/models/subscription_price_intervals_params.rb +1098 -57
  136. data/lib/orb/models/subscription_schedule_plan_change_params.rb +2834 -687
  137. data/lib/orb/models/subscription_update_params.rb +12 -1
  138. data/lib/orb/models.rb +2 -0
  139. data/lib/orb/resources/alerts.rb +14 -3
  140. data/lib/orb/resources/customers/credits/ledger.rb +28 -14
  141. data/lib/orb/resources/customers.rb +6 -2
  142. data/lib/orb/resources/events.rb +7 -34
  143. data/lib/orb/resources/invoices.rb +6 -2
  144. data/lib/orb/resources/licenses/external_licenses.rb +1 -1
  145. data/lib/orb/resources/licenses/usage.rb +2 -2
  146. data/lib/orb/resources/metrics.rb +5 -5
  147. data/lib/orb/resources/plans/external_plan_id.rb +5 -3
  148. data/lib/orb/resources/plans.rb +9 -5
  149. data/lib/orb/resources/prices/external_price_id.rb +2 -2
  150. data/lib/orb/resources/prices.rb +5 -5
  151. data/lib/orb/resources/subscriptions.rb +20 -3
  152. data/lib/orb/version.rb +1 -1
  153. data/lib/orb.rb +1 -0
  154. data/rbi/orb/models/accounting_provider_config.rbi +38 -5
  155. data/rbi/orb/models/adjustment_interval.rbi +336 -0
  156. data/rbi/orb/models/alert.rbi +172 -3
  157. data/rbi/orb/models/alert_create_for_subscription_params.rbi +268 -9
  158. data/rbi/orb/models/alert_update_params.rbi +208 -0
  159. data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +3833 -28395
  160. data/rbi/orb/models/beta_create_plan_version_params.rbi +3833 -28363
  161. data/rbi/orb/models/billable_metric.rbi +10 -0
  162. data/rbi/orb/models/changed_subscription_resources.rbi +360 -5
  163. data/rbi/orb/models/conversion_rate_config.rbi +18 -0
  164. data/rbi/orb/models/credit_block_list_invoices_response.rbi +425 -3
  165. data/rbi/orb/models/credit_block_retrieve_response.rbi +421 -3
  166. data/rbi/orb/models/customer.rbi +190 -10
  167. data/rbi/orb/models/customer_create_params.rbi +12 -2
  168. data/rbi/orb/models/customer_tax_id.rbi +15 -1
  169. data/rbi/orb/models/customer_update_by_external_id_params.rbi +22 -2
  170. data/rbi/orb/models/customer_update_params.rbi +22 -2
  171. data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +425 -3
  172. data/rbi/orb/models/customers/credit_list_response.rbi +426 -3
  173. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +6 -6
  174. data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +6 -6
  175. data/rbi/orb/models/dimensional_price_group.rbi +1 -1
  176. data/rbi/orb/models/discount.rbi +269 -1
  177. data/rbi/orb/models/event_ingest_params.rbi +4 -2
  178. data/rbi/orb/models/invoice.rbi +360 -5
  179. data/rbi/orb/models/invoice_create_params.rbi +12 -7
  180. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +360 -5
  181. data/rbi/orb/models/invoice_issue_summary_response.rbi +19 -4
  182. data/rbi/orb/models/invoice_level_discount.rbi +298 -1
  183. data/rbi/orb/models/invoice_line_item_create_response.rbi +339 -0
  184. data/rbi/orb/models/invoice_list_summary_response.rbi +19 -4
  185. data/rbi/orb/models/licenses/external_license_get_usage_params.rbi +3 -3
  186. data/rbi/orb/models/licenses/usage_get_all_usage_params.rbi +3 -3
  187. data/rbi/orb/models/licenses/usage_get_usage_params.rbi +3 -3
  188. data/rbi/orb/models/mutated_subscription.rbi +324 -2
  189. data/rbi/orb/models/new_allocation_price.rbi +12 -0
  190. data/rbi/orb/models/per_price_cost.rbi +3 -0
  191. data/rbi/orb/models/plan.rbi +339 -2
  192. data/rbi/orb/models/plan_create_params.rbi +1877 -14138
  193. data/rbi/orb/models/plan_update_params.rbi +8 -0
  194. data/rbi/orb/models/plan_version.rbi +339 -0
  195. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +8 -0
  196. data/rbi/orb/models/plans/migration_cancel_response.rbi +22 -1
  197. data/rbi/orb/models/plans/migration_list_response.rbi +22 -1
  198. data/rbi/orb/models/plans/migration_retrieve_response.rbi +22 -1
  199. data/rbi/orb/models/price.rbi +4552 -2285
  200. data/rbi/orb/models/price_create_params.rbi +1540 -114
  201. data/rbi/orb/models/price_evaluate_multiple_params.rbi +1540 -114
  202. data/rbi/orb/models/price_evaluate_preview_events_params.rbi +1540 -114
  203. data/rbi/orb/models/price_interval.rbi +3 -0
  204. data/rbi/orb/models/subscription.rbi +324 -2
  205. data/rbi/orb/models/subscription_create_params.rbi +4998 -1186
  206. data/rbi/orb/models/subscription_price_intervals_params.rbi +2127 -264
  207. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +4997 -1185
  208. data/rbi/orb/models/subscription_update_params.rbi +14 -0
  209. data/rbi/orb/models.rbi +2 -0
  210. data/rbi/orb/resources/alerts.rbi +39 -4
  211. data/rbi/orb/resources/customers/credits/ledger.rbi +28 -14
  212. data/rbi/orb/resources/customers.rbi +23 -0
  213. data/rbi/orb/resources/events.rbi +8 -35
  214. data/rbi/orb/resources/invoices.rbi +9 -3
  215. data/rbi/orb/resources/licenses/external_licenses.rbi +1 -1
  216. data/rbi/orb/resources/licenses/usage.rbi +2 -2
  217. data/rbi/orb/resources/metrics.rbi +5 -5
  218. data/rbi/orb/resources/plans/external_plan_id.rbi +5 -2
  219. data/rbi/orb/resources/plans.rbi +9 -3
  220. data/rbi/orb/resources/prices.rbi +3 -0
  221. data/rbi/orb/resources/subscriptions.rbi +29 -0
  222. data/sig/orb/models/accounting_provider_config.rbs +21 -4
  223. data/sig/orb/models/adjustment_interval.rbs +134 -0
  224. data/sig/orb/models/alert.rbs +85 -3
  225. data/sig/orb/models/alert_create_for_subscription_params.rbs +86 -4
  226. data/sig/orb/models/alert_update_params.rbs +86 -1
  227. data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +1803 -11601
  228. data/sig/orb/models/beta_create_plan_version_params.rbs +1747 -11541
  229. data/sig/orb/models/billable_metric.rbs +5 -0
  230. data/sig/orb/models/changed_subscription_resources.rbs +140 -1
  231. data/sig/orb/models/conversion_rate_config.rbs +12 -0
  232. data/sig/orb/models/credit_block_list_invoices_response.rbs +142 -3
  233. data/sig/orb/models/credit_block_retrieve_response.rbs +142 -3
  234. data/sig/orb/models/customer.rbs +70 -4
  235. data/sig/orb/models/customer_create_params.rbs +2 -2
  236. data/sig/orb/models/customer_tax_id.rbs +20 -2
  237. data/sig/orb/models/customer_update_by_external_id_params.rbs +7 -2
  238. data/sig/orb/models/customer_update_params.rbs +7 -2
  239. data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +142 -3
  240. data/sig/orb/models/customers/credit_list_response.rbs +142 -3
  241. data/sig/orb/models/discount.rbs +114 -0
  242. data/sig/orb/models/invoice.rbs +140 -1
  243. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +140 -1
  244. data/sig/orb/models/invoice_issue_summary_response.rbs +2 -1
  245. data/sig/orb/models/invoice_level_discount.rbs +117 -1
  246. data/sig/orb/models/invoice_line_item_create_response.rbs +134 -0
  247. data/sig/orb/models/invoice_list_summary_response.rbs +2 -1
  248. data/sig/orb/models/licenses/external_license_get_usage_params.rbs +4 -4
  249. data/sig/orb/models/licenses/usage_get_all_usage_params.rbs +4 -4
  250. data/sig/orb/models/licenses/usage_get_usage_params.rbs +4 -4
  251. data/sig/orb/models/mutated_subscription.rbs +124 -0
  252. data/sig/orb/models/new_allocation_price.rbs +5 -0
  253. data/sig/orb/models/new_floating_bulk_price.rbs +4 -4
  254. data/sig/orb/models/new_floating_bulk_with_proration_price.rbs +4 -4
  255. data/sig/orb/models/new_floating_cumulative_grouped_bulk_price.rbs +4 -4
  256. data/sig/orb/models/new_floating_grouped_allocation_price.rbs +4 -4
  257. data/sig/orb/models/new_floating_grouped_tiered_package_price.rbs +4 -4
  258. data/sig/orb/models/new_floating_grouped_tiered_price.rbs +4 -4
  259. data/sig/orb/models/new_floating_grouped_with_metered_minimum_price.rbs +4 -4
  260. data/sig/orb/models/new_floating_grouped_with_prorated_minimum_price.rbs +4 -4
  261. data/sig/orb/models/new_floating_matrix_price.rbs +4 -4
  262. data/sig/orb/models/new_floating_matrix_with_allocation_price.rbs +4 -4
  263. data/sig/orb/models/new_floating_matrix_with_display_name_price.rbs +4 -4
  264. data/sig/orb/models/new_floating_max_group_tiered_package_price.rbs +4 -4
  265. data/sig/orb/models/new_floating_minimum_composite_price.rbs +4 -4
  266. data/sig/orb/models/new_floating_package_price.rbs +4 -4
  267. data/sig/orb/models/new_floating_package_with_allocation_price.rbs +4 -4
  268. data/sig/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  269. data/sig/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  270. data/sig/orb/models/new_floating_threshold_total_amount_price.rbs +4 -4
  271. data/sig/orb/models/new_floating_tiered_package_price.rbs +4 -4
  272. data/sig/orb/models/new_floating_tiered_package_with_minimum_price.rbs +4 -4
  273. data/sig/orb/models/new_floating_tiered_price.rbs +4 -4
  274. data/sig/orb/models/new_floating_tiered_with_minimum_price.rbs +4 -4
  275. data/sig/orb/models/new_floating_tiered_with_proration_price.rbs +4 -4
  276. data/sig/orb/models/new_floating_unit_price.rbs +4 -4
  277. data/sig/orb/models/new_floating_unit_with_percent_price.rbs +4 -4
  278. data/sig/orb/models/new_floating_unit_with_proration_price.rbs +4 -4
  279. data/sig/orb/models/new_plan_bulk_price.rbs +4 -4
  280. data/sig/orb/models/new_plan_bulk_with_proration_price.rbs +4 -4
  281. data/sig/orb/models/new_plan_cumulative_grouped_bulk_price.rbs +4 -4
  282. data/sig/orb/models/new_plan_grouped_allocation_price.rbs +4 -4
  283. data/sig/orb/models/new_plan_grouped_tiered_package_price.rbs +4 -4
  284. data/sig/orb/models/new_plan_grouped_tiered_price.rbs +4 -4
  285. data/sig/orb/models/new_plan_grouped_with_metered_minimum_price.rbs +4 -4
  286. data/sig/orb/models/new_plan_grouped_with_prorated_minimum_price.rbs +4 -4
  287. data/sig/orb/models/new_plan_matrix_price.rbs +4 -4
  288. data/sig/orb/models/new_plan_matrix_with_allocation_price.rbs +4 -4
  289. data/sig/orb/models/new_plan_matrix_with_display_name_price.rbs +4 -4
  290. data/sig/orb/models/new_plan_max_group_tiered_package_price.rbs +4 -4
  291. data/sig/orb/models/new_plan_minimum_composite_price.rbs +4 -4
  292. data/sig/orb/models/new_plan_package_price.rbs +4 -4
  293. data/sig/orb/models/new_plan_package_with_allocation_price.rbs +4 -4
  294. data/sig/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  295. data/sig/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  296. data/sig/orb/models/new_plan_threshold_total_amount_price.rbs +4 -4
  297. data/sig/orb/models/new_plan_tiered_package_price.rbs +4 -4
  298. data/sig/orb/models/new_plan_tiered_package_with_minimum_price.rbs +4 -4
  299. data/sig/orb/models/new_plan_tiered_price.rbs +4 -4
  300. data/sig/orb/models/new_plan_tiered_with_minimum_price.rbs +4 -4
  301. data/sig/orb/models/new_plan_unit_price.rbs +4 -4
  302. data/sig/orb/models/new_plan_unit_with_percent_price.rbs +4 -4
  303. data/sig/orb/models/new_plan_unit_with_proration_price.rbs +4 -4
  304. data/sig/orb/models/new_subscription_bulk_price.rbs +4 -4
  305. data/sig/orb/models/new_subscription_bulk_with_proration_price.rbs +4 -4
  306. data/sig/orb/models/new_subscription_cumulative_grouped_bulk_price.rbs +4 -4
  307. data/sig/orb/models/new_subscription_grouped_allocation_price.rbs +4 -4
  308. data/sig/orb/models/new_subscription_grouped_tiered_package_price.rbs +4 -4
  309. data/sig/orb/models/new_subscription_grouped_tiered_price.rbs +4 -4
  310. data/sig/orb/models/new_subscription_grouped_with_metered_minimum_price.rbs +4 -4
  311. data/sig/orb/models/new_subscription_grouped_with_prorated_minimum_price.rbs +4 -4
  312. data/sig/orb/models/new_subscription_matrix_price.rbs +4 -4
  313. data/sig/orb/models/new_subscription_matrix_with_allocation_price.rbs +4 -4
  314. data/sig/orb/models/new_subscription_matrix_with_display_name_price.rbs +4 -4
  315. data/sig/orb/models/new_subscription_max_group_tiered_package_price.rbs +4 -4
  316. data/sig/orb/models/new_subscription_minimum_composite_price.rbs +4 -4
  317. data/sig/orb/models/new_subscription_package_price.rbs +4 -4
  318. data/sig/orb/models/new_subscription_package_with_allocation_price.rbs +4 -4
  319. data/sig/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  320. data/sig/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  321. data/sig/orb/models/new_subscription_threshold_total_amount_price.rbs +4 -4
  322. data/sig/orb/models/new_subscription_tiered_package_price.rbs +4 -4
  323. data/sig/orb/models/new_subscription_tiered_package_with_minimum_price.rbs +4 -4
  324. data/sig/orb/models/new_subscription_tiered_price.rbs +4 -4
  325. data/sig/orb/models/new_subscription_tiered_with_minimum_price.rbs +4 -4
  326. data/sig/orb/models/new_subscription_unit_price.rbs +4 -4
  327. data/sig/orb/models/new_subscription_unit_with_percent_price.rbs +4 -4
  328. data/sig/orb/models/new_subscription_unit_with_proration_price.rbs +4 -4
  329. data/sig/orb/models/plan.rbs +134 -0
  330. data/sig/orb/models/plan_create_params.rbs +836 -5728
  331. data/sig/orb/models/plan_update_params.rbs +5 -0
  332. data/sig/orb/models/plan_version.rbs +134 -0
  333. data/sig/orb/models/plans/external_plan_id_update_params.rbs +5 -0
  334. data/sig/orb/models/price.rbs +2200 -1150
  335. data/sig/orb/models/price_create_params.rbs +611 -23
  336. data/sig/orb/models/price_evaluate_multiple_params.rbs +626 -23
  337. data/sig/orb/models/price_evaluate_preview_events_params.rbs +626 -23
  338. data/sig/orb/models/subscription.rbs +124 -0
  339. data/sig/orb/models/subscription_create_params.rbs +2009 -430
  340. data/sig/orb/models/subscription_price_intervals_params.rbs +795 -23
  341. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +2009 -430
  342. data/sig/orb/models/subscription_update_params.rbs +5 -0
  343. data/sig/orb/models.rbs +2 -0
  344. data/sig/orb/resources/alerts.rbs +5 -1
  345. data/sig/orb/resources/customers.rbs +2 -0
  346. data/sig/orb/resources/licenses/external_licenses.rbs +1 -1
  347. data/sig/orb/resources/licenses/usage.rbs +2 -2
  348. data/sig/orb/resources/plans/external_plan_id.rbs +1 -0
  349. data/sig/orb/resources/plans.rbs +2 -0
  350. data/sig/orb/resources/subscriptions.rbs +3 -0
  351. metadata +6 -7
@@ -14,6 +14,16 @@ module Orb
14
14
  # @return [Float]
15
15
  required :balance, Float
16
16
 
17
+ # @!attribute credit_block_source
18
+ # How this credit block was created: `allocation` (a subscription's recurring
19
+ # credit allocation), `top_up` (an automatic balance-threshold top-up),
20
+ # `commitment` (a subscription commitment true-up rolled forward as credit), or
21
+ # `manual` (a manual credit ledger increment, including credits voided or expired
22
+ # off another block).
23
+ #
24
+ # @return [Symbol, Orb::Models::CreditBlockRetrieveResponse::CreditBlockSource]
25
+ required :credit_block_source, enum: -> { Orb::Models::CreditBlockRetrieveResponse::CreditBlockSource }
26
+
17
27
  # @!attribute effective_date
18
28
  #
19
29
  # @return [Time, nil]
@@ -53,7 +63,21 @@ module Orb
53
63
  # @return [Symbol, Orb::Models::CreditBlockRetrieveResponse::Status]
54
64
  required :status, enum: -> { Orb::Models::CreditBlockRetrieveResponse::Status }
55
65
 
56
- # @!method initialize(id:, balance:, effective_date:, expiry_date:, filters:, maximum_initial_balance:, metadata:, per_unit_cost_basis:, status:)
66
+ # @!attribute credit_allocation
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
+ #
70
+ # @return [Orb::Models::CreditBlockRetrieveResponse::CreditAllocation, nil]
71
+ optional :credit_allocation, -> { Orb::Models::CreditBlockRetrieveResponse::CreditAllocation }, nil?: true
72
+
73
+ # @!attribute credit_commitment
74
+ # The subscription commitment whose true-up rolled forward into this credit block.
75
+ # Present only when `credit_block_source` is `commitment`.
76
+ #
77
+ # @return [Orb::Models::CreditBlockRetrieveResponse::CreditCommitment, nil]
78
+ optional :credit_commitment, -> { Orb::Models::CreditBlockRetrieveResponse::CreditCommitment }, nil?: true
79
+
80
+ # @!method initialize(id:, balance:, credit_block_source:, effective_date:, expiry_date:, filters:, maximum_initial_balance:, metadata:, per_unit_cost_basis:, status:, credit_allocation: nil, credit_commitment: nil)
57
81
  # Some parameter documentations has been truncated, see
58
82
  # {Orb::Models::CreditBlockRetrieveResponse} for more details.
59
83
  #
@@ -63,6 +87,8 @@ module Orb
63
87
  #
64
88
  # @param balance [Float]
65
89
  #
90
+ # @param credit_block_source [Symbol, Orb::Models::CreditBlockRetrieveResponse::CreditBlockSource] How this credit block was created: `allocation` (a subscription's recurring cred
91
+ #
66
92
  # @param effective_date [Time, nil]
67
93
  #
68
94
  # @param expiry_date [Time, nil]
@@ -76,6 +102,29 @@ module Orb
76
102
  # @param per_unit_cost_basis [String, nil]
77
103
  #
78
104
  # @param status [Symbol, Orb::Models::CreditBlockRetrieveResponse::Status]
105
+ #
106
+ # @param credit_allocation [Orb::Models::CreditBlockRetrieveResponse::CreditAllocation, nil] The credit allocation that funded a block. Extends the allocation resource
107
+ #
108
+ # @param credit_commitment [Orb::Models::CreditBlockRetrieveResponse::CreditCommitment, nil] The subscription commitment whose true-up rolled forward into this credit block.
109
+
110
+ # How this credit block was created: `allocation` (a subscription's recurring
111
+ # credit allocation), `top_up` (an automatic balance-threshold top-up),
112
+ # `commitment` (a subscription commitment true-up rolled forward as credit), or
113
+ # `manual` (a manual credit ledger increment, including credits voided or expired
114
+ # off another block).
115
+ #
116
+ # @see Orb::Models::CreditBlockRetrieveResponse#credit_block_source
117
+ module CreditBlockSource
118
+ extend Orb::Internal::Type::Enum
119
+
120
+ ALLOCATION = :allocation
121
+ TOP_UP = :top_up
122
+ COMMITMENT = :commitment
123
+ MANUAL = :manual
124
+
125
+ # @!method self.values
126
+ # @return [Array<Symbol>]
127
+ end
79
128
 
80
129
  class Filter < Orb::Internal::Type::BaseModel
81
130
  # @!attribute field
@@ -143,6 +192,141 @@ module Orb
143
192
  # @!method self.values
144
193
  # @return [Array<Symbol>]
145
194
  end
195
+
196
+ # @see Orb::Models::CreditBlockRetrieveResponse#credit_allocation
197
+ class CreditAllocation < Orb::Internal::Type::BaseModel
198
+ # @!attribute allows_rollover
199
+ #
200
+ # @return [Boolean]
201
+ required :allows_rollover, Orb::Internal::Type::Boolean
202
+
203
+ # @!attribute currency
204
+ #
205
+ # @return [String]
206
+ required :currency, String
207
+
208
+ # @!attribute custom_expiration
209
+ #
210
+ # @return [Orb::Models::CustomExpiration, nil]
211
+ required :custom_expiration, -> { Orb::CustomExpiration }, nil?: true
212
+
213
+ # @!attribute item_id
214
+ # The ID of the catalog item this block was allocated from, derived from the
215
+ # allocation's price.
216
+ #
217
+ # @return [String]
218
+ required :item_id, String
219
+
220
+ # @!attribute filters
221
+ #
222
+ # @return [Array<Orb::Models::CreditBlockRetrieveResponse::CreditAllocation::Filter>, nil]
223
+ optional :filters,
224
+ -> { Orb::Internal::Type::ArrayOf[Orb::Models::CreditBlockRetrieveResponse::CreditAllocation::Filter] }
225
+
226
+ # @!attribute license_type_id
227
+ #
228
+ # @return [String, nil]
229
+ optional :license_type_id, String, nil?: true
230
+
231
+ # @!method initialize(allows_rollover:, currency:, custom_expiration:, item_id:, filters: nil, license_type_id: nil)
232
+ # Some parameter documentations has been truncated, see
233
+ # {Orb::Models::CreditBlockRetrieveResponse::CreditAllocation} for more details.
234
+ #
235
+ # The credit allocation that funded a block. Extends the allocation resource
236
+ # serialized on prices with the catalog-item attribution of the funding price.
237
+ #
238
+ # @param allows_rollover [Boolean]
239
+ #
240
+ # @param currency [String]
241
+ #
242
+ # @param custom_expiration [Orb::Models::CustomExpiration, nil]
243
+ #
244
+ # @param item_id [String] The ID of the catalog item this block was allocated from, derived from the alloc
245
+ #
246
+ # @param filters [Array<Orb::Models::CreditBlockRetrieveResponse::CreditAllocation::Filter>]
247
+ #
248
+ # @param license_type_id [String, nil]
249
+
250
+ class Filter < Orb::Internal::Type::BaseModel
251
+ # @!attribute field
252
+ # The property of the price to filter on.
253
+ #
254
+ # @return [Symbol, Orb::Models::CreditBlockRetrieveResponse::CreditAllocation::Filter::Field]
255
+ required :field, enum: -> { Orb::Models::CreditBlockRetrieveResponse::CreditAllocation::Filter::Field }
256
+
257
+ # @!attribute operator
258
+ # Should prices that match the filter be included or excluded.
259
+ #
260
+ # @return [Symbol, Orb::Models::CreditBlockRetrieveResponse::CreditAllocation::Filter::Operator]
261
+ required :operator,
262
+ enum: -> { Orb::Models::CreditBlockRetrieveResponse::CreditAllocation::Filter::Operator }
263
+
264
+ # @!attribute values
265
+ # The IDs or values that match this filter.
266
+ #
267
+ # @return [Array<String>]
268
+ required :values, Orb::Internal::Type::ArrayOf[String]
269
+
270
+ # @!method initialize(field:, operator:, values:)
271
+ # @param field [Symbol, Orb::Models::CreditBlockRetrieveResponse::CreditAllocation::Filter::Field] The property of the price to filter on.
272
+ #
273
+ # @param operator [Symbol, Orb::Models::CreditBlockRetrieveResponse::CreditAllocation::Filter::Operator] Should prices that match the filter be included or excluded.
274
+ #
275
+ # @param values [Array<String>] The IDs or values that match this filter.
276
+
277
+ # The property of the price to filter on.
278
+ #
279
+ # @see Orb::Models::CreditBlockRetrieveResponse::CreditAllocation::Filter#field
280
+ module Field
281
+ extend Orb::Internal::Type::Enum
282
+
283
+ PRICE_ID = :price_id
284
+ ITEM_ID = :item_id
285
+ PRICE_TYPE = :price_type
286
+ CURRENCY = :currency
287
+ PRICING_UNIT_ID = :pricing_unit_id
288
+
289
+ # @!method self.values
290
+ # @return [Array<Symbol>]
291
+ end
292
+
293
+ # Should prices that match the filter be included or excluded.
294
+ #
295
+ # @see Orb::Models::CreditBlockRetrieveResponse::CreditAllocation::Filter#operator
296
+ module Operator
297
+ extend Orb::Internal::Type::Enum
298
+
299
+ INCLUDES = :includes
300
+ EXCLUDES = :excludes
301
+
302
+ # @!method self.values
303
+ # @return [Array<Symbol>]
304
+ end
305
+ end
306
+ end
307
+
308
+ # @see Orb::Models::CreditBlockRetrieveResponse#credit_commitment
309
+ class CreditCommitment < Orb::Internal::Type::BaseModel
310
+ # @!attribute id
311
+ # The ID of the subscription commitment this block was rolled forward from.
312
+ #
313
+ # @return [String]
314
+ required :id, String
315
+
316
+ # @!attribute subscription_id
317
+ # The subscription the commitment belongs to.
318
+ #
319
+ # @return [String, nil]
320
+ optional :subscription_id, String, nil?: true
321
+
322
+ # @!method initialize(id:, subscription_id: nil)
323
+ # The subscription commitment whose true-up rolled forward into this credit block.
324
+ # Present only when `credit_block_source` is `commitment`.
325
+ #
326
+ # @param id [String] The ID of the subscription commitment this block was rolled forward from.
327
+ #
328
+ # @param subscription_id [String, nil] The subscription the commitment belongs to.
329
+ end
146
330
  end
147
331
  end
148
332
  end
@@ -111,6 +111,10 @@ module Orb
111
111
  required :payment_provider_id, String, nil?: true
112
112
 
113
113
  # @!attribute portal_url
114
+ # Deprecated. Returns the URL of the most recent non-expired portal link, or null.
115
+ # When the account has opted into customer portal sessions, this field always
116
+ # returns null. Use POST /v1/customers/{id}/portal_sessions to mint short-lived
117
+ # portal session URLs.
114
118
  #
115
119
  # @return [String, nil]
116
120
  required :portal_url, String, nil?: true
@@ -178,11 +182,13 @@ module Orb
178
182
  # | Estonia | `eu_vat` | European VAT Number |
179
183
  # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
180
184
  # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
185
+ # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
181
186
  # | Finland | `eu_vat` | European VAT Number |
182
187
  # | France | `eu_vat` | European VAT Number |
183
188
  # | Georgia | `ge_vat` | Georgian VAT |
184
189
  # | Germany | `de_stn` | German Tax Number (Steuernummer) |
185
190
  # | Germany | `eu_vat` | European VAT Number |
191
+ # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
186
192
  # | Greece | `eu_vat` | European VAT Number |
187
193
  # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
188
194
  # | Hong Kong | `hk_br` | Hong Kong BR Number |
@@ -194,6 +200,7 @@ module Orb
194
200
  # | Ireland | `eu_vat` | European VAT Number |
195
201
  # | Israel | `il_vat` | Israel VAT |
196
202
  # | Italy | `eu_vat` | European VAT Number |
203
+ # | Italy | `it_cf` | Italian Codice Fiscale Number |
197
204
  # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
198
205
  # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
199
206
  # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
@@ -224,6 +231,7 @@ module Orb
224
231
  # | Norway | `no_vat` | Norwegian VAT Number |
225
232
  # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
226
233
  # | Oman | `om_vat` | Omani VAT Number |
234
+ # | Paraguay | `py_ruc` | Paraguayan RUC Number |
227
235
  # | Peru | `pe_ruc` | Peruvian RUC Number |
228
236
  # | Philippines | `ph_tin` | Philippines Tax Identification Number |
229
237
  # | Poland | `eu_vat` | European VAT Number |
@@ -245,6 +253,7 @@ module Orb
245
253
  # | South Korea | `kr_brn` | Korean BRN |
246
254
  # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
247
255
  # | Spain | `eu_vat` | European VAT Number |
256
+ # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
248
257
  # | Suriname | `sr_fin` | Suriname FIN Number |
249
258
  # | Sweden | `eu_vat` | European VAT Number |
250
259
  # | Switzerland | `ch_uid` | Switzerland UID Number |
@@ -290,6 +299,16 @@ module Orb
290
299
  # @return [Boolean, nil]
291
300
  optional :automatic_tax_enabled, Orb::Internal::Type::Boolean, nil?: true
292
301
 
302
+ # @!attribute default_payment_method
303
+ # A payment method represents a customer's stored payment instrument held with an
304
+ # external payment provider (such as Adyen or Stripe).
305
+ #
306
+ # The serialization is intentionally minimal for now; provider-pulled details
307
+ # (e.g. card display metadata) will be added over time.
308
+ #
309
+ # @return [Orb::Models::Customer::DefaultPaymentMethod, nil]
310
+ optional :default_payment_method, -> { Orb::Customer::DefaultPaymentMethod }, nil?: true
311
+
293
312
  # @!attribute payment_configuration
294
313
  # Payment configuration for the customer, applicable when using Orb Invoicing with
295
314
  # a supported payment provider such as Stripe.
@@ -302,7 +321,7 @@ module Orb
302
321
  # @return [Orb::Models::Customer::ReportingConfiguration, nil]
303
322
  optional :reporting_configuration, -> { Orb::Customer::ReportingConfiguration }, nil?: true
304
323
 
305
- # @!method initialize(id:, additional_emails:, auto_collection:, auto_issuance:, balance:, billing_address:, created_at:, currency:, email:, email_delivery:, exempt_from_automated_tax:, external_customer_id:, hierarchy:, metadata:, name:, payment_provider:, payment_provider_id:, portal_url:, shipping_address:, tax_id:, timezone:, accounting_sync_configuration: nil, automatic_tax_enabled: nil, payment_configuration: nil, reporting_configuration: nil)
324
+ # @!method initialize(id:, additional_emails:, auto_collection:, auto_issuance:, balance:, billing_address:, created_at:, currency:, email:, email_delivery:, exempt_from_automated_tax:, external_customer_id:, hierarchy:, metadata:, name:, payment_provider:, payment_provider_id:, portal_url:, shipping_address:, tax_id:, timezone:, accounting_sync_configuration: nil, automatic_tax_enabled: nil, default_payment_method: nil, payment_configuration: nil, reporting_configuration: nil)
306
325
  # Some parameter documentations has been truncated, see {Orb::Models::Customer}
307
326
  # for more details.
308
327
  #
@@ -359,7 +378,7 @@ module Orb
359
378
  #
360
379
  # @param payment_provider_id [String, nil] The ID of this customer in an external payments solution, such as Stripe. This i
361
380
  #
362
- # @param portal_url [String, nil]
381
+ # @param portal_url [String, nil] Deprecated. Returns the URL of the most recent non-expired portal link, or null.
363
382
  #
364
383
  # @param shipping_address [Orb::Models::Address, nil]
365
384
  #
@@ -371,6 +390,8 @@ module Orb
371
390
  #
372
391
  # @param automatic_tax_enabled [Boolean, nil] Whether automatic tax calculation is enabled for this customer. This field is nu
373
392
  #
393
+ # @param default_payment_method [Orb::Models::Customer::DefaultPaymentMethod, nil] A payment method represents a customer's stored payment instrument held with an
394
+ #
374
395
  # @param payment_configuration [Orb::Models::Customer::PaymentConfiguration, nil] Payment configuration for the customer, applicable when using Orb Invoicing with
375
396
  #
376
397
  # @param reporting_configuration [Orb::Models::Customer::ReportingConfiguration, nil]
@@ -407,7 +428,7 @@ module Orb
407
428
  STRIPE_CHARGE = :stripe_charge
408
429
  STRIPE_INVOICE = :stripe_invoice
409
430
  NETSUITE = :netsuite
410
- NETSUITE_AMPERSAND = :netsuite_ampersand
431
+ ADYEN = :adyen
411
432
 
412
433
  # @!method self.values
413
434
  # @return [Array<Symbol>]
@@ -452,7 +473,6 @@ module Orb
452
473
 
453
474
  QUICKBOOKS = :quickbooks
454
475
  NETSUITE = :netsuite
455
- NETSUITE_AMPERSAND = :netsuite_ampersand
456
476
 
457
477
  # @!method self.values
458
478
  # @return [Array<Symbol>]
@@ -460,6 +480,93 @@ module Orb
460
480
  end
461
481
  end
462
482
 
483
+ # @see Orb::Models::Customer#default_payment_method
484
+ class DefaultPaymentMethod < Orb::Internal::Type::BaseModel
485
+ # @!attribute id
486
+ # The Orb-assigned unique identifier for the payment method.
487
+ #
488
+ # @return [String]
489
+ required :id, String
490
+
491
+ # @!attribute created_at
492
+ # The time at which the payment method was created.
493
+ #
494
+ # @return [Time]
495
+ required :created_at, Time
496
+
497
+ # @!attribute customer_id
498
+ # The ID of the Orb customer this payment method is attached to.
499
+ #
500
+ # @return [String]
501
+ required :customer_id, String
502
+
503
+ # @!attribute default
504
+ # Whether this is the customer's default payment method.
505
+ #
506
+ # @return [Boolean]
507
+ required :default, Orb::Internal::Type::Boolean
508
+
509
+ # @!attribute external_payment_method_id
510
+ # The identifier of this payment method in the external payment provider.
511
+ #
512
+ # @return [String]
513
+ required :external_payment_method_id, String
514
+
515
+ # @!attribute payment_method_type
516
+ # The type of the underlying payment instrument, e.g. `card` or `us_bank_account`.
517
+ #
518
+ # @return [Symbol, Orb::Models::Customer::DefaultPaymentMethod::PaymentMethodType]
519
+ required :payment_method_type, enum: -> { Orb::Customer::DefaultPaymentMethod::PaymentMethodType }
520
+
521
+ # @!attribute provider_type
522
+ # The external payment provider this method belongs to, derived from the linked
523
+ # payment gateway connection (e.g. `adyen` or `stripe`). Null if the connection
524
+ # has been removed.
525
+ #
526
+ # @return [String, nil]
527
+ required :provider_type, String, nil?: true
528
+
529
+ # @!method initialize(id:, created_at:, customer_id:, default:, external_payment_method_id:, payment_method_type:, provider_type:)
530
+ # Some parameter documentations has been truncated, see
531
+ # {Orb::Models::Customer::DefaultPaymentMethod} for more details.
532
+ #
533
+ # A payment method represents a customer's stored payment instrument held with an
534
+ # external payment provider (such as Adyen or Stripe).
535
+ #
536
+ # The serialization is intentionally minimal for now; provider-pulled details
537
+ # (e.g. card display metadata) will be added over time.
538
+ #
539
+ # @param id [String] The Orb-assigned unique identifier for the payment method.
540
+ #
541
+ # @param created_at [Time] The time at which the payment method was created.
542
+ #
543
+ # @param customer_id [String] The ID of the Orb customer this payment method is attached to.
544
+ #
545
+ # @param default [Boolean] Whether this is the customer's default payment method.
546
+ #
547
+ # @param external_payment_method_id [String] The identifier of this payment method in the external payment provider.
548
+ #
549
+ # @param payment_method_type [Symbol, Orb::Models::Customer::DefaultPaymentMethod::PaymentMethodType] The type of the underlying payment instrument, e.g. `card` or `us_bank_account`.
550
+ #
551
+ # @param provider_type [String, nil] The external payment provider this method belongs to, derived from the linked pa
552
+
553
+ # The type of the underlying payment instrument, e.g. `card` or `us_bank_account`.
554
+ #
555
+ # @see Orb::Models::Customer::DefaultPaymentMethod#payment_method_type
556
+ module PaymentMethodType
557
+ extend Orb::Internal::Type::Enum
558
+
559
+ CARD = :card
560
+ US_BANK_ACCOUNT = :us_bank_account
561
+ LINK = :link
562
+ AMAZON_PAY = :amazon_pay
563
+ CRYPTO = :crypto
564
+
565
+ # @!method self.values
566
+ # @return [Array<Symbol>]
567
+ end
568
+ end
569
+
463
570
  # @see Orb::Models::Customer#payment_configuration
464
571
  class PaymentConfiguration < Orb::Internal::Type::BaseModel
465
572
  # @!attribute payment_providers
@@ -185,11 +185,13 @@ module Orb
185
185
  # | Estonia | `eu_vat` | European VAT Number |
186
186
  # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
187
187
  # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
188
+ # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
188
189
  # | Finland | `eu_vat` | European VAT Number |
189
190
  # | France | `eu_vat` | European VAT Number |
190
191
  # | Georgia | `ge_vat` | Georgian VAT |
191
192
  # | Germany | `de_stn` | German Tax Number (Steuernummer) |
192
193
  # | Germany | `eu_vat` | European VAT Number |
194
+ # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
193
195
  # | Greece | `eu_vat` | European VAT Number |
194
196
  # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
195
197
  # | Hong Kong | `hk_br` | Hong Kong BR Number |
@@ -201,6 +203,7 @@ module Orb
201
203
  # | Ireland | `eu_vat` | European VAT Number |
202
204
  # | Israel | `il_vat` | Israel VAT |
203
205
  # | Italy | `eu_vat` | European VAT Number |
206
+ # | Italy | `it_cf` | Italian Codice Fiscale Number |
204
207
  # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
205
208
  # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
206
209
  # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
@@ -231,6 +234,7 @@ module Orb
231
234
  # | Norway | `no_vat` | Norwegian VAT Number |
232
235
  # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
233
236
  # | Oman | `om_vat` | Omani VAT Number |
237
+ # | Paraguay | `py_ruc` | Paraguayan RUC Number |
234
238
  # | Peru | `pe_ruc` | Peruvian RUC Number |
235
239
  # | Philippines | `ph_tin` | Philippines Tax Identification Number |
236
240
  # | Poland | `eu_vat` | European VAT Number |
@@ -252,6 +256,7 @@ module Orb
252
256
  # | South Korea | `kr_brn` | Korean BRN |
253
257
  # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
254
258
  # | Spain | `eu_vat` | European VAT Number |
259
+ # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
255
260
  # | Suriname | `sr_fin` | Suriname FIN Number |
256
261
  # | Sweden | `eu_vat` | European VAT Number |
257
262
  # | Switzerland | `ch_uid` | Switzerland UID Number |
@@ -407,7 +412,7 @@ module Orb
407
412
  STRIPE_CHARGE = :stripe_charge
408
413
  STRIPE_INVOICE = :stripe_invoice
409
414
  NETSUITE = :netsuite
410
- NETSUITE_AMPERSAND = :netsuite_ampersand
415
+ ADYEN = :adyen
411
416
 
412
417
  # @!method self.values
413
418
  # @return [Array<Symbol>]
@@ -76,11 +76,13 @@ module Orb
76
76
  # | Estonia | `eu_vat` | European VAT Number |
77
77
  # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
78
78
  # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
79
+ # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
79
80
  # | Finland | `eu_vat` | European VAT Number |
80
81
  # | France | `eu_vat` | European VAT Number |
81
82
  # | Georgia | `ge_vat` | Georgian VAT |
82
83
  # | Germany | `de_stn` | German Tax Number (Steuernummer) |
83
84
  # | Germany | `eu_vat` | European VAT Number |
85
+ # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
84
86
  # | Greece | `eu_vat` | European VAT Number |
85
87
  # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
86
88
  # | Hong Kong | `hk_br` | Hong Kong BR Number |
@@ -92,6 +94,7 @@ module Orb
92
94
  # | Ireland | `eu_vat` | European VAT Number |
93
95
  # | Israel | `il_vat` | Israel VAT |
94
96
  # | Italy | `eu_vat` | European VAT Number |
97
+ # | Italy | `it_cf` | Italian Codice Fiscale Number |
95
98
  # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
96
99
  # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
97
100
  # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
@@ -122,6 +125,7 @@ module Orb
122
125
  # | Norway | `no_vat` | Norwegian VAT Number |
123
126
  # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
124
127
  # | Oman | `om_vat` | Omani VAT Number |
128
+ # | Paraguay | `py_ruc` | Paraguayan RUC Number |
125
129
  # | Peru | `pe_ruc` | Peruvian RUC Number |
126
130
  # | Philippines | `ph_tin` | Philippines Tax Identification Number |
127
131
  # | Poland | `eu_vat` | European VAT Number |
@@ -143,6 +147,7 @@ module Orb
143
147
  # | South Korea | `kr_brn` | Korean BRN |
144
148
  # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
145
149
  # | Spain | `eu_vat` | European VAT Number |
150
+ # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
146
151
  # | Suriname | `sr_fin` | Suriname FIN Number |
147
152
  # | Sweden | `eu_vat` | European VAT Number |
148
153
  # | Switzerland | `ch_uid` | Switzerland UID Number |
@@ -204,9 +209,9 @@ module Orb
204
209
  CO = :CO
205
210
  CR = :CR
206
211
  CV = :CV
207
- DE = :DE
208
212
  CY = :CY
209
213
  CZ = :CZ
214
+ DE = :DE
210
215
  DK = :DK
211
216
  DO = :DO
212
217
  EC = :EC
@@ -216,9 +221,11 @@ module Orb
216
221
  ET = :ET
217
222
  EU = :EU
218
223
  FI = :FI
224
+ FO = :FO
219
225
  FR = :FR
220
226
  GB = :GB
221
227
  GE = :GE
228
+ GI = :GI
222
229
  GN = :GN
223
230
  GR = :GR
224
231
  HK = :HK
@@ -238,6 +245,7 @@ module Orb
238
245
  KZ = :KZ
239
246
  LA = :LA
240
247
  LI = :LI
248
+ LK = :LK
241
249
  LT = :LT
242
250
  LU = :LU
243
251
  LV = :LV
@@ -259,6 +267,7 @@ module Orb
259
267
  PH = :PH
260
268
  PL = :PL
261
269
  PT = :PT
270
+ PY = :PY
262
271
  RO = :RO
263
272
  RS = :RS
264
273
  RU = :RU
@@ -339,8 +348,10 @@ module Orb
339
348
  ES_CIF = :es_cif
340
349
  ET_TIN = :et_tin
341
350
  EU_OSS_VAT = :eu_oss_vat
351
+ FO_VAT = :fo_vat
342
352
  GB_VAT = :gb_vat
343
353
  GE_VAT = :ge_vat
354
+ GI_TIN = :gi_tin
344
355
  GN_NIF = :gn_nif
345
356
  HK_BR = :hk_br
346
357
  HR_OIB = :hr_oib
@@ -349,6 +360,7 @@ module Orb
349
360
  IL_VAT = :il_vat
350
361
  IN_GST = :in_gst
351
362
  IS_VAT = :is_vat
363
+ IT_CF = :it_cf
352
364
  JP_CN = :jp_cn
353
365
  JP_RN = :jp_rn
354
366
  JP_TRN = :jp_trn
@@ -360,6 +372,7 @@ module Orb
360
372
  LA_TIN = :la_tin
361
373
  LI_UID = :li_uid
362
374
  LI_VAT = :li_vat
375
+ LK_VAT = :lk_vat
363
376
  MA_VAT = :ma_vat
364
377
  MD_VAT = :md_vat
365
378
  ME_PIB = :me_pib
@@ -378,6 +391,7 @@ module Orb
378
391
  PE_RUC = :pe_ruc
379
392
  PH_TIN = :ph_tin
380
393
  PL_NIP = :pl_nip
394
+ PY_RUC = :py_ruc
381
395
  RO_TIN = :ro_tin
382
396
  RS_PIB = :rs_pib
383
397
  RU_INN = :ru_inn
@@ -56,6 +56,13 @@ module Orb
56
56
  # @return [String, nil]
57
57
  optional :currency, String, nil?: true
58
58
 
59
+ # @!attribute default_payment_method_id
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
+ #
63
+ # @return [String, nil]
64
+ optional :default_payment_method_id, String, nil?: true
65
+
59
66
  # @!attribute email
60
67
  # A valid customer email, to be used for invoicing and notifications.
61
68
  #
@@ -202,11 +209,13 @@ module Orb
202
209
  # | Estonia | `eu_vat` | European VAT Number |
203
210
  # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
204
211
  # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
212
+ # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
205
213
  # | Finland | `eu_vat` | European VAT Number |
206
214
  # | France | `eu_vat` | European VAT Number |
207
215
  # | Georgia | `ge_vat` | Georgian VAT |
208
216
  # | Germany | `de_stn` | German Tax Number (Steuernummer) |
209
217
  # | Germany | `eu_vat` | European VAT Number |
218
+ # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
210
219
  # | Greece | `eu_vat` | European VAT Number |
211
220
  # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
212
221
  # | Hong Kong | `hk_br` | Hong Kong BR Number |
@@ -218,6 +227,7 @@ module Orb
218
227
  # | Ireland | `eu_vat` | European VAT Number |
219
228
  # | Israel | `il_vat` | Israel VAT |
220
229
  # | Italy | `eu_vat` | European VAT Number |
230
+ # | Italy | `it_cf` | Italian Codice Fiscale Number |
221
231
  # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
222
232
  # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
223
233
  # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
@@ -248,6 +258,7 @@ module Orb
248
258
  # | Norway | `no_vat` | Norwegian VAT Number |
249
259
  # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
250
260
  # | Oman | `om_vat` | Omani VAT Number |
261
+ # | Paraguay | `py_ruc` | Paraguayan RUC Number |
251
262
  # | Peru | `pe_ruc` | Peruvian RUC Number |
252
263
  # | Philippines | `ph_tin` | Philippines Tax Identification Number |
253
264
  # | Poland | `eu_vat` | European VAT Number |
@@ -269,6 +280,7 @@ module Orb
269
280
  # | South Korea | `kr_brn` | Korean BRN |
270
281
  # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
271
282
  # | Spain | `eu_vat` | European VAT Number |
283
+ # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
272
284
  # | Suriname | `sr_fin` | Suriname FIN Number |
273
285
  # | Sweden | `eu_vat` | European VAT Number |
274
286
  # | Switzerland | `ch_uid` | Switzerland UID Number |
@@ -294,7 +306,7 @@ module Orb
294
306
  # @return [Orb::Models::CustomerTaxID, nil]
295
307
  optional :tax_id, -> { Orb::CustomerTaxID }, nil?: true
296
308
 
297
- # @!method initialize(id:, accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, billing_address: nil, currency: nil, email: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, name: nil, payment_configuration: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, request_options: {})
309
+ # @!method initialize(id:, accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, billing_address: nil, currency: nil, default_payment_method_id: nil, email: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, name: nil, payment_configuration: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, request_options: {})
298
310
  # Some parameter documentations has been truncated, see
299
311
  # {Orb::Models::CustomerUpdateByExternalIDParams} for more details.
300
312
  #
@@ -312,6 +324,8 @@ module Orb
312
324
  #
313
325
  # @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. This c
314
326
  #
327
+ # @param default_payment_method_id [String, nil] The Orb ID of the payment method to set as this customer's default. Pass `null`
328
+ #
315
329
  # @param email [String, nil] A valid customer email, to be used for invoicing and notifications.
316
330
  #
317
331
  # @param email_delivery [Boolean, nil]
@@ -420,7 +434,7 @@ module Orb
420
434
  STRIPE_CHARGE = :stripe_charge
421
435
  STRIPE_INVOICE = :stripe_invoice
422
436
  NETSUITE = :netsuite
423
- NETSUITE_AMPERSAND = :netsuite_ampersand
437
+ ADYEN = :adyen
424
438
 
425
439
  # @!method self.values
426
440
  # @return [Array<Symbol>]