orb-billing 0.2.0 → 0.3.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 (374) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +34 -0
  3. data/README.md +59 -49
  4. data/lib/orb/client.rb +4 -4
  5. data/lib/orb/file_part.rb +55 -0
  6. data/lib/orb/internal/page.rb +4 -8
  7. data/lib/orb/internal/transport/base_client.rb +7 -7
  8. data/lib/orb/internal/transport/pooled_net_requester.rb +2 -2
  9. data/lib/orb/internal/type/array_of.rb +11 -0
  10. data/lib/orb/internal/type/base_model.rb +32 -14
  11. data/lib/orb/internal/type/base_page.rb +9 -1
  12. data/lib/orb/internal/type/boolean.rb +4 -0
  13. data/lib/orb/internal/type/converter.rb +4 -1
  14. data/lib/orb/internal/type/enum.rb +9 -5
  15. data/lib/orb/internal/type/{io_like.rb → file_input.rb} +33 -15
  16. data/lib/orb/internal/type/hash_of.rb +11 -0
  17. data/lib/orb/internal/type/request_parameters.rb +1 -2
  18. data/lib/orb/internal/type/union.rb +10 -1
  19. data/lib/orb/internal/type/unknown.rb +4 -0
  20. data/lib/orb/internal/util.rb +69 -61
  21. data/lib/orb/internal.rb +0 -1
  22. data/lib/orb/models/alert.rb +68 -71
  23. data/lib/orb/models/alert_create_for_customer_params.rb +20 -25
  24. data/lib/orb/models/alert_create_for_external_customer_params.rb +20 -25
  25. data/lib/orb/models/alert_create_for_subscription_params.rb +20 -25
  26. data/lib/orb/models/alert_disable_params.rb +5 -9
  27. data/lib/orb/models/alert_enable_params.rb +5 -9
  28. data/lib/orb/models/alert_list_params.rb +26 -36
  29. data/lib/orb/models/alert_retrieve_params.rb +3 -8
  30. data/lib/orb/models/alert_update_params.rb +14 -18
  31. data/lib/orb/models/amount_discount.rb +14 -14
  32. data/lib/orb/models/billable_metric.rb +23 -20
  33. data/lib/orb/models/billing_cycle_relative_date.rb +2 -5
  34. data/lib/orb/models/coupon.rb +28 -21
  35. data/lib/orb/models/coupon_archive_params.rb +3 -8
  36. data/lib/orb/models/coupon_create_params.rb +24 -29
  37. data/lib/orb/models/coupon_fetch_params.rb +3 -8
  38. data/lib/orb/models/coupon_list_params.rb +17 -17
  39. data/lib/orb/models/coupons/subscription_list_params.rb +12 -15
  40. data/lib/orb/models/credit_note.rb +100 -166
  41. data/lib/orb/models/credit_note_create_params.rb +15 -23
  42. data/lib/orb/models/credit_note_fetch_params.rb +3 -8
  43. data/lib/orb/models/credit_note_list_params.rb +20 -30
  44. data/lib/orb/models/customer.rb +224 -271
  45. data/lib/orb/models/customer_create_params.rb +211 -252
  46. data/lib/orb/models/customer_delete_params.rb +3 -8
  47. data/lib/orb/models/customer_fetch_by_external_id_params.rb +3 -8
  48. data/lib/orb/models/customer_fetch_params.rb +3 -8
  49. data/lib/orb/models/customer_list_params.rb +20 -30
  50. data/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rb +3 -8
  51. data/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rb +3 -8
  52. data/lib/orb/models/customer_update_by_external_id_params.rb +207 -250
  53. data/lib/orb/models/customer_update_params.rb +207 -250
  54. data/lib/orb/models/customers/balance_transaction_create_params.rb +11 -16
  55. data/lib/orb/models/customers/balance_transaction_create_response.rb +33 -51
  56. data/lib/orb/models/customers/balance_transaction_list_params.rb +20 -30
  57. data/lib/orb/models/customers/balance_transaction_list_response.rb +33 -51
  58. data/lib/orb/models/customers/cost_list_by_external_id_params.rb +17 -17
  59. data/lib/orb/models/customers/cost_list_by_external_id_response.rb +22 -26
  60. data/lib/orb/models/customers/cost_list_params.rb +17 -17
  61. data/lib/orb/models/customers/cost_list_response.rb +22 -26
  62. data/lib/orb/models/customers/credit_list_by_external_id_params.rb +18 -22
  63. data/lib/orb/models/customers/credit_list_by_external_id_response.rb +10 -17
  64. data/lib/orb/models/customers/credit_list_params.rb +18 -22
  65. data/lib/orb/models/customers/credit_list_response.rb +10 -17
  66. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +64 -66
  67. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +300 -406
  68. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +63 -66
  69. data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +300 -406
  70. data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +33 -48
  71. data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +300 -406
  72. data/lib/orb/models/customers/credits/ledger_list_params.rb +32 -48
  73. data/lib/orb/models/customers/credits/ledger_list_response.rb +300 -406
  74. data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +47 -50
  75. data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +43 -46
  76. data/lib/orb/models/customers/credits/top_up_create_params.rb +46 -50
  77. data/lib/orb/models/customers/credits/top_up_create_response.rb +42 -46
  78. data/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rb +4 -9
  79. data/lib/orb/models/customers/credits/top_up_delete_params.rb +4 -9
  80. data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +12 -15
  81. data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +43 -46
  82. data/lib/orb/models/customers/credits/top_up_list_params.rb +12 -15
  83. data/lib/orb/models/customers/credits/top_up_list_response.rb +42 -46
  84. data/lib/orb/models/dimensional_price_group.rb +21 -15
  85. data/lib/orb/models/dimensional_price_group_create_params.rb +17 -23
  86. data/lib/orb/models/dimensional_price_group_list_params.rb +12 -15
  87. data/lib/orb/models/dimensional_price_group_retrieve_params.rb +3 -8
  88. data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rb +3 -8
  89. data/lib/orb/models/dimensional_price_groups.rb +3 -7
  90. data/lib/orb/models/discount.rb +2 -3
  91. data/lib/orb/models/evaluate_price_group.rb +8 -11
  92. data/lib/orb/models/event_deprecate_params.rb +3 -8
  93. data/lib/orb/models/event_deprecate_response.rb +2 -6
  94. data/lib/orb/models/event_ingest_params.rb +33 -27
  95. data/lib/orb/models/event_ingest_response.rb +23 -24
  96. data/lib/orb/models/event_search_params.rb +15 -11
  97. data/lib/orb/models/event_search_response.rb +27 -22
  98. data/lib/orb/models/event_update_params.rb +19 -13
  99. data/lib/orb/models/event_update_response.rb +2 -6
  100. data/lib/orb/models/events/backfill_close_params.rb +3 -8
  101. data/lib/orb/models/events/backfill_close_response.rb +34 -39
  102. data/lib/orb/models/events/backfill_create_params.rb +28 -32
  103. data/lib/orb/models/events/backfill_create_response.rb +34 -39
  104. data/lib/orb/models/events/backfill_fetch_params.rb +3 -8
  105. data/lib/orb/models/events/backfill_fetch_response.rb +34 -39
  106. data/lib/orb/models/events/backfill_list_params.rb +12 -15
  107. data/lib/orb/models/events/backfill_list_response.rb +34 -39
  108. data/lib/orb/models/events/backfill_revert_params.rb +3 -8
  109. data/lib/orb/models/events/backfill_revert_response.rb +34 -39
  110. data/lib/orb/models/events/event_volumes.rb +11 -17
  111. data/lib/orb/models/events/volume_list_params.rb +19 -22
  112. data/lib/orb/models/invoice.rb +589 -637
  113. data/lib/orb/models/invoice_create_params.rb +52 -61
  114. data/lib/orb/models/invoice_fetch_params.rb +3 -8
  115. data/lib/orb/models/invoice_fetch_upcoming_params.rb +4 -9
  116. data/lib/orb/models/invoice_fetch_upcoming_response.rb +584 -631
  117. data/lib/orb/models/invoice_issue_params.rb +10 -14
  118. data/lib/orb/models/invoice_level_discount.rb +2 -3
  119. data/lib/orb/models/invoice_line_item_create_params.rb +19 -14
  120. data/lib/orb/models/invoice_line_item_create_response.rb +247 -269
  121. data/lib/orb/models/invoice_list_params.rb +51 -66
  122. data/lib/orb/models/invoice_mark_paid_params.rb +9 -11
  123. data/lib/orb/models/invoice_pay_params.rb +3 -8
  124. data/lib/orb/models/invoice_update_params.rb +9 -9
  125. data/lib/orb/models/invoice_void_params.rb +3 -8
  126. data/lib/orb/models/item.rb +14 -25
  127. data/lib/orb/models/item_create_params.rb +5 -9
  128. data/lib/orb/models/item_fetch_params.rb +3 -8
  129. data/lib/orb/models/item_list_params.rb +12 -15
  130. data/lib/orb/models/item_update_params.rb +10 -22
  131. data/lib/orb/models/metric_create_params.rb +17 -13
  132. data/lib/orb/models/metric_fetch_params.rb +3 -8
  133. data/lib/orb/models/metric_list_params.rb +20 -30
  134. data/lib/orb/models/metric_update_params.rb +9 -9
  135. data/lib/orb/models/pagination_metadata.rb +3 -7
  136. data/lib/orb/models/percentage_discount.rb +15 -14
  137. data/lib/orb/models/plan.rb +250 -279
  138. data/lib/orb/models/plan_create_params.rb +1623 -1984
  139. data/lib/orb/models/plan_fetch_params.rb +3 -8
  140. data/lib/orb/models/plan_list_params.rb +25 -42
  141. data/lib/orb/models/plan_update_params.rb +12 -10
  142. data/lib/orb/models/plans/external_plan_id_fetch_params.rb +3 -8
  143. data/lib/orb/models/plans/external_plan_id_update_params.rb +12 -10
  144. data/lib/orb/models/price.rb +2709 -3820
  145. data/lib/orb/models/price_create_params.rb +203 -244
  146. data/lib/orb/models/price_evaluate_params.rb +21 -30
  147. data/lib/orb/models/price_evaluate_response.rb +2 -6
  148. data/lib/orb/models/price_fetch_params.rb +3 -8
  149. data/lib/orb/models/price_list_params.rb +12 -15
  150. data/lib/orb/models/price_update_params.rb +9 -9
  151. data/lib/orb/models/prices/external_price_id_fetch_params.rb +3 -8
  152. data/lib/orb/models/prices/external_price_id_update_params.rb +9 -9
  153. data/lib/orb/models/subscription.rb +343 -382
  154. data/lib/orb/models/subscription_cancel_params.rb +16 -16
  155. data/lib/orb/models/subscription_cancel_response.rb +339 -377
  156. data/lib/orb/models/subscription_change_apply_params.rb +7 -10
  157. data/lib/orb/models/subscription_change_apply_response.rb +365 -398
  158. data/lib/orb/models/subscription_change_cancel_params.rb +3 -8
  159. data/lib/orb/models/subscription_change_cancel_response.rb +365 -398
  160. data/lib/orb/models/subscription_change_retrieve_params.rb +3 -8
  161. data/lib/orb/models/subscription_change_retrieve_response.rb +366 -398
  162. data/lib/orb/models/subscription_create_params.rb +3771 -4402
  163. data/lib/orb/models/subscription_create_response.rb +339 -377
  164. data/lib/orb/models/subscription_fetch_costs_params.rb +17 -17
  165. data/lib/orb/models/subscription_fetch_costs_response.rb +22 -26
  166. data/lib/orb/models/subscription_fetch_params.rb +3 -8
  167. data/lib/orb/models/subscription_fetch_schedule_params.rb +20 -30
  168. data/lib/orb/models/subscription_fetch_schedule_response.rb +15 -17
  169. data/lib/orb/models/subscription_fetch_usage_params.rb +32 -43
  170. data/lib/orb/models/subscription_list_params.rb +28 -41
  171. data/lib/orb/models/subscription_price_intervals_params.rb +2018 -2472
  172. data/lib/orb/models/subscription_price_intervals_response.rb +342 -377
  173. data/lib/orb/models/subscription_schedule_plan_change_params.rb +3764 -4392
  174. data/lib/orb/models/subscription_schedule_plan_change_response.rb +342 -377
  175. data/lib/orb/models/subscription_trigger_phase_params.rb +12 -10
  176. data/lib/orb/models/subscription_trigger_phase_response.rb +341 -377
  177. data/lib/orb/models/subscription_unschedule_cancellation_params.rb +3 -8
  178. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +342 -377
  179. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rb +5 -9
  180. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +343 -377
  181. data/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb +3 -8
  182. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +343 -377
  183. data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +22 -33
  184. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +342 -377
  185. data/lib/orb/models/subscription_update_params.rb +21 -23
  186. data/lib/orb/models/subscription_update_trial_params.rb +15 -18
  187. data/lib/orb/models/subscription_update_trial_response.rb +341 -377
  188. data/lib/orb/models/subscription_usage.rb +37 -80
  189. data/lib/orb/models/subscriptions.rb +3 -7
  190. data/lib/orb/models/top_level_ping_params.rb +3 -8
  191. data/lib/orb/models/top_level_ping_response.rb +2 -6
  192. data/lib/orb/models/trial_discount.rb +16 -24
  193. data/lib/orb/models/usage_discount.rb +15 -14
  194. data/lib/orb/request_options.rb +3 -4
  195. data/lib/orb/resources/alerts.rb +48 -17
  196. data/lib/orb/resources/coupons/subscriptions.rb +9 -2
  197. data/lib/orb/resources/coupons.rb +25 -7
  198. data/lib/orb/resources/credit_notes.rb +17 -4
  199. data/lib/orb/resources/customers/balance_transactions.rb +18 -3
  200. data/lib/orb/resources/customers/costs.rb +26 -8
  201. data/lib/orb/resources/customers/credits/ledger.rb +108 -28
  202. data/lib/orb/resources/customers/credits/top_ups.rb +67 -20
  203. data/lib/orb/resources/customers/credits.rb +28 -8
  204. data/lib/orb/resources/customers.rb +135 -36
  205. data/lib/orb/resources/dimensional_price_groups.rb +19 -4
  206. data/lib/orb/resources/events/backfills.rb +32 -9
  207. data/lib/orb/resources/events/volume.rb +14 -4
  208. data/lib/orb/resources/events.rb +40 -11
  209. data/lib/orb/resources/invoice_line_items.rb +16 -6
  210. data/lib/orb/resources/invoices.rb +77 -17
  211. data/lib/orb/resources/items.rb +10 -3
  212. data/lib/orb/resources/metrics.rb +33 -8
  213. data/lib/orb/resources/plans/external_plan_id.rb +10 -2
  214. data/lib/orb/resources/plans.rb +47 -11
  215. data/lib/orb/resources/prices/external_price_id.rb +7 -1
  216. data/lib/orb/resources/prices.rb +97 -22
  217. data/lib/orb/resources/subscription_changes.rb +5 -2
  218. data/lib/orb/resources/subscriptions.rb +292 -78
  219. data/lib/orb/version.rb +1 -1
  220. data/lib/orb.rb +2 -10
  221. data/rbi/lib/orb/client.rbi +4 -4
  222. data/rbi/lib/orb/file_part.rbi +34 -0
  223. data/rbi/lib/orb/internal/transport/base_client.rbi +17 -3
  224. data/rbi/lib/orb/internal/type/array_of.rbi +3 -0
  225. data/rbi/lib/orb/internal/type/base_model.rbi +7 -1
  226. data/rbi/lib/orb/internal/type/base_page.rbi +2 -0
  227. data/rbi/lib/orb/internal/type/enum.rbi +3 -6
  228. data/rbi/lib/orb/internal/type/{io_like.rbi → file_input.rbi} +5 -2
  229. data/rbi/lib/orb/internal/type/hash_of.rbi +3 -0
  230. data/rbi/lib/orb/internal/type/union.rbi +3 -0
  231. data/rbi/lib/orb/internal/util.rbi +24 -19
  232. data/rbi/lib/orb/internal.rbi +0 -1
  233. data/rbi/lib/orb/models/alert.rbi +28 -8
  234. data/rbi/lib/orb/models/alert_create_for_customer_params.rbi +16 -6
  235. data/rbi/lib/orb/models/alert_create_for_external_customer_params.rbi +16 -6
  236. data/rbi/lib/orb/models/alert_create_for_subscription_params.rbi +16 -6
  237. data/rbi/lib/orb/models/alert_disable_params.rbi +5 -2
  238. data/rbi/lib/orb/models/alert_enable_params.rbi +5 -2
  239. data/rbi/lib/orb/models/alert_list_params.rbi +6 -0
  240. data/rbi/lib/orb/models/alert_update_params.rbi +11 -4
  241. data/rbi/lib/orb/models/amount_discount.rbi +10 -4
  242. data/rbi/lib/orb/models/billable_metric.rbi +16 -3
  243. data/rbi/lib/orb/models/billing_cycle_relative_date.rbi +1 -1
  244. data/rbi/lib/orb/models/coupon.rbi +10 -3
  245. data/rbi/lib/orb/models/coupon_create_params.rbi +6 -3
  246. data/rbi/lib/orb/models/coupon_list_params.rbi +13 -3
  247. data/rbi/lib/orb/models/coupons/subscription_list_params.rbi +8 -2
  248. data/rbi/lib/orb/models/credit_note.rbi +44 -12
  249. data/rbi/lib/orb/models/credit_note_create_params.rbi +15 -6
  250. data/rbi/lib/orb/models/credit_note_list_params.rbi +3 -0
  251. data/rbi/lib/orb/models/customer.rbi +130 -11
  252. data/rbi/lib/orb/models/customer_create_params.rbi +142 -8
  253. data/rbi/lib/orb/models/customer_list_params.rbi +3 -0
  254. data/rbi/lib/orb/models/customer_update_by_external_id_params.rbi +140 -8
  255. data/rbi/lib/orb/models/customer_update_params.rbi +140 -8
  256. data/rbi/lib/orb/models/customers/balance_transaction_create_params.rbi +8 -4
  257. data/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi +18 -8
  258. data/rbi/lib/orb/models/customers/balance_transaction_list_params.rbi +3 -0
  259. data/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi +18 -8
  260. data/rbi/lib/orb/models/customers/cost_list_by_external_id_params.rbi +9 -5
  261. data/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi +21 -4
  262. data/rbi/lib/orb/models/customers/cost_list_params.rbi +9 -5
  263. data/rbi/lib/orb/models/customers/cost_list_response.rbi +21 -4
  264. data/rbi/lib/orb/models/customers/credit_list_by_external_id_params.rbi +13 -3
  265. data/rbi/lib/orb/models/customers/credit_list_by_external_id_response.rbi +1 -2
  266. data/rbi/lib/orb/models/customers/credit_list_params.rbi +13 -3
  267. data/rbi/lib/orb/models/customers/credit_list_response.rbi +1 -2
  268. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +40 -18
  269. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +35 -56
  270. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_params.rbi +40 -6
  271. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi +35 -56
  272. data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +6 -16
  273. data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +35 -56
  274. data/rbi/lib/orb/models/customers/credits/ledger_list_params.rbi +6 -4
  275. data/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi +35 -56
  276. data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +27 -10
  277. data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +25 -10
  278. data/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi +27 -4
  279. data/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi +25 -10
  280. data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +8 -2
  281. data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +25 -10
  282. data/rbi/lib/orb/models/customers/credits/top_up_list_params.rbi +8 -2
  283. data/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi +25 -4
  284. data/rbi/lib/orb/models/dimensional_price_group.rbi +11 -3
  285. data/rbi/lib/orb/models/dimensional_price_group_create_params.rbi +4 -0
  286. data/rbi/lib/orb/models/dimensional_price_group_list_params.rbi +8 -2
  287. data/rbi/lib/orb/models/evaluate_price_group.rbi +8 -2
  288. data/rbi/lib/orb/models/event_deprecate_response.rbi +4 -2
  289. data/rbi/lib/orb/models/event_ingest_params.rbi +22 -5
  290. data/rbi/lib/orb/models/event_ingest_response.rbi +15 -4
  291. data/rbi/lib/orb/models/event_search_params.rbi +14 -2
  292. data/rbi/lib/orb/models/event_search_response.rbi +14 -3
  293. data/rbi/lib/orb/models/event_update_params.rbi +10 -3
  294. data/rbi/lib/orb/models/event_update_response.rbi +4 -2
  295. data/rbi/lib/orb/models/events/backfill_close_response.rbi +14 -2
  296. data/rbi/lib/orb/models/events/backfill_create_params.rbi +18 -0
  297. data/rbi/lib/orb/models/events/backfill_create_response.rbi +14 -2
  298. data/rbi/lib/orb/models/events/backfill_fetch_response.rbi +14 -2
  299. data/rbi/lib/orb/models/events/backfill_list_params.rbi +8 -2
  300. data/rbi/lib/orb/models/events/backfill_list_response.rbi +14 -2
  301. data/rbi/lib/orb/models/events/backfill_revert_response.rbi +14 -2
  302. data/rbi/lib/orb/models/events/event_volumes.rbi +6 -2
  303. data/rbi/lib/orb/models/events/volume_list_params.rbi +18 -2
  304. data/rbi/lib/orb/models/invoice.rbi +375 -46
  305. data/rbi/lib/orb/models/invoice_create_params.rbi +38 -6
  306. data/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi +375 -66
  307. data/rbi/lib/orb/models/invoice_issue_params.rbi +9 -2
  308. data/rbi/lib/orb/models/invoice_line_item_create_params.rbi +16 -2
  309. data/rbi/lib/orb/models/invoice_line_item_create_response.rbi +141 -20
  310. data/rbi/lib/orb/models/invoice_list_params.rbi +9 -2
  311. data/rbi/lib/orb/models/invoice_mark_paid_params.rbi +9 -2
  312. data/rbi/lib/orb/models/invoice_update_params.rbi +7 -2
  313. data/rbi/lib/orb/models/item.rbi +1 -2
  314. data/rbi/lib/orb/models/item_create_params.rbi +5 -2
  315. data/rbi/lib/orb/models/item_list_params.rbi +8 -2
  316. data/rbi/lib/orb/models/item_update_params.rbi +1 -8
  317. data/rbi/lib/orb/models/metric_create_params.rbi +15 -2
  318. data/rbi/lib/orb/models/metric_list_params.rbi +3 -0
  319. data/rbi/lib/orb/models/metric_update_params.rbi +7 -2
  320. data/rbi/lib/orb/models/percentage_discount.rbi +11 -4
  321. data/rbi/lib/orb/models/plan.rbi +102 -15
  322. data/rbi/lib/orb/models/plan_create_params.rbi +997 -679
  323. data/rbi/lib/orb/models/plan_list_params.rbi +5 -1
  324. data/rbi/lib/orb/models/plan_update_params.rbi +11 -2
  325. data/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi +11 -2
  326. data/rbi/lib/orb/models/price.rbi +717 -688
  327. data/rbi/lib/orb/models/price_create_params.rbi +137 -53
  328. data/rbi/lib/orb/models/price_evaluate_params.rbi +10 -0
  329. data/rbi/lib/orb/models/price_list_params.rbi +8 -2
  330. data/rbi/lib/orb/models/price_update_params.rbi +7 -2
  331. data/rbi/lib/orb/models/prices/external_price_id_update_params.rbi +7 -2
  332. data/rbi/lib/orb/models/subscription.rbi +174 -11
  333. data/rbi/lib/orb/models/subscription_cancel_params.rbi +8 -5
  334. data/rbi/lib/orb/models/subscription_cancel_response.rbi +187 -14
  335. data/rbi/lib/orb/models/subscription_change_apply_params.rbi +7 -2
  336. data/rbi/lib/orb/models/subscription_change_apply_response.rbi +199 -18
  337. data/rbi/lib/orb/models/subscription_change_cancel_response.rbi +199 -18
  338. data/rbi/lib/orb/models/subscription_change_retrieve_response.rbi +199 -18
  339. data/rbi/lib/orb/models/subscription_create_params.rbi +2282 -1536
  340. data/rbi/lib/orb/models/subscription_create_response.rbi +187 -14
  341. data/rbi/lib/orb/models/subscription_fetch_costs_params.rbi +9 -5
  342. data/rbi/lib/orb/models/subscription_fetch_costs_response.rbi +21 -4
  343. data/rbi/lib/orb/models/subscription_fetch_schedule_params.rbi +3 -0
  344. data/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi +8 -2
  345. data/rbi/lib/orb/models/subscription_fetch_usage_params.rbi +13 -4
  346. data/rbi/lib/orb/models/subscription_list_params.rbi +4 -2
  347. data/rbi/lib/orb/models/subscription_price_intervals_params.rbi +1228 -861
  348. data/rbi/lib/orb/models/subscription_price_intervals_response.rbi +187 -14
  349. data/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi +2288 -1544
  350. data/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi +187 -14
  351. data/rbi/lib/orb/models/subscription_trigger_phase_params.rbi +10 -2
  352. data/rbi/lib/orb/models/subscription_trigger_phase_response.rbi +187 -14
  353. data/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi +187 -14
  354. data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +5 -2
  355. data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +187 -20
  356. data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +187 -14
  357. data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_params.rbi +11 -2
  358. data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi +187 -14
  359. data/rbi/lib/orb/models/subscription_update_params.rbi +15 -0
  360. data/rbi/lib/orb/models/subscription_update_trial_params.rbi +11 -5
  361. data/rbi/lib/orb/models/subscription_update_trial_response.rbi +187 -14
  362. data/rbi/lib/orb/models/subscription_usage.rbi +2 -16
  363. data/rbi/lib/orb/models/trial_discount.rbi +5 -1
  364. data/rbi/lib/orb/models/usage_discount.rbi +11 -3
  365. data/sig/orb/file_part.rbs +21 -0
  366. data/sig/orb/internal/transport/base_client.rbs +9 -3
  367. data/sig/orb/internal/type/array_of.rbs +2 -0
  368. data/sig/orb/internal/type/base_model.rbs +4 -0
  369. data/sig/orb/internal/type/enum.rbs +2 -2
  370. data/sig/orb/internal/type/{io_like.rbs → file_input.rbs} +1 -1
  371. data/sig/orb/internal/type/hash_of.rbs +2 -0
  372. data/sig/orb/internal/type/union.rbs +2 -0
  373. data/sig/orb/internal/util.rbs +14 -12
  374. metadata +8 -5
@@ -102,21 +102,34 @@ module Orb
102
102
  .returns(T.attached_class)
103
103
  end
104
104
  def self.new(
105
+ # The Orb id of this credit note.
105
106
  id:,
107
+ # The creation time of the resource in Orb.
106
108
  created_at:,
109
+ # The unique identifier for credit notes.
107
110
  credit_note_number:,
111
+ # A URL to a PDF of the credit note.
108
112
  credit_note_pdf:,
109
113
  customer:,
114
+ # The id of the invoice resource that this credit note is applied to.
110
115
  invoice_id:,
116
+ # All of the line items associated with this credit note.
111
117
  line_items:,
118
+ # The maximum amount applied on the original invoice
112
119
  maximum_amount_adjustment:,
120
+ # An optional memo supplied on the credit note.
113
121
  memo:,
122
+ # Any credited amount from the applied minimum on the invoice.
114
123
  minimum_amount_refunded:,
115
124
  reason:,
125
+ # The total prior to any creditable invoice-level discounts or minimums.
116
126
  subtotal:,
127
+ # The total including creditable invoice-level discounts or minimums, and tax.
117
128
  total:,
118
129
  type:,
130
+ # The time at which the credit note was voided in Orb, if applicable.
119
131
  voided_at:,
132
+ # Any discounts applied on the original invoice.
120
133
  discounts: nil
121
134
  ); end
122
135
  sig do
@@ -210,8 +223,24 @@ module Orb
210
223
  )
211
224
  .returns(T.attached_class)
212
225
  end
213
- def self.new(id:, amount:, item_id:, name:, quantity:, subtotal:, tax_amounts:, discounts: nil); end
214
-
226
+ def self.new(
227
+ # The Orb id of this resource.
228
+ id:,
229
+ # The amount of the line item, including any line item minimums and discounts.
230
+ amount:,
231
+ # The id of the item associated with this line item.
232
+ item_id:,
233
+ # The name of the corresponding invoice line item.
234
+ name:,
235
+ # An optional quantity credited.
236
+ quantity:,
237
+ # The amount of the line item, excluding any line item minimums and discounts.
238
+ subtotal:,
239
+ # Any tax amounts applied onto the line item.
240
+ tax_amounts:,
241
+ # Any line item discounts from the invoice's line item.
242
+ discounts: nil
243
+ ); end
215
244
  sig do
216
245
  override
217
246
  .returns(
@@ -246,8 +275,14 @@ module Orb
246
275
  params(amount: String, tax_rate_description: String, tax_rate_percentage: T.nilable(String))
247
276
  .returns(T.attached_class)
248
277
  end
249
- def self.new(amount:, tax_rate_description:, tax_rate_percentage:); end
250
-
278
+ def self.new(
279
+ # The amount of additional tax incurred by this tax rate.
280
+ amount:,
281
+ # The human-readable description of the applied tax rate.
282
+ tax_rate_description:,
283
+ # The tax rate percentage, out of 100.
284
+ tax_rate_percentage:
285
+ ); end
251
286
  sig do
252
287
  override.returns(
253
288
  {
@@ -323,8 +358,7 @@ module Orb
323
358
  extend Orb::Internal::Type::Enum
324
359
 
325
360
  TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::CreditNote::LineItem::Discount::DiscountType) }
326
- OrSymbol =
327
- T.type_alias { T.any(Symbol, String, Orb::Models::CreditNote::LineItem::Discount::DiscountType::TaggedSymbol) }
361
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
328
362
 
329
363
  PERCENTAGE = T.let(:percentage, Orb::Models::CreditNote::LineItem::Discount::DiscountType::TaggedSymbol)
330
364
  AMOUNT = T.let(:amount, Orb::Models::CreditNote::LineItem::Discount::DiscountType::TaggedSymbol)
@@ -392,8 +426,7 @@ module Orb
392
426
 
393
427
  TaggedSymbol =
394
428
  T.type_alias { T.all(Symbol, Orb::Models::CreditNote::MaximumAmountAdjustment::DiscountType) }
395
- OrSymbol =
396
- T.type_alias { T.any(Symbol, String, Orb::Models::CreditNote::MaximumAmountAdjustment::DiscountType::TaggedSymbol) }
429
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
397
430
 
398
431
  PERCENTAGE =
399
432
  T.let(:percentage, Orb::Models::CreditNote::MaximumAmountAdjustment::DiscountType::TaggedSymbol)
@@ -421,7 +454,7 @@ module Orb
421
454
  extend Orb::Internal::Type::Enum
422
455
 
423
456
  TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::CreditNote::Reason) }
424
- OrSymbol = T.type_alias { T.any(Symbol, String, Orb::Models::CreditNote::Reason::TaggedSymbol) }
457
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
425
458
 
426
459
  DUPLICATE = T.let(:Duplicate, Orb::Models::CreditNote::Reason::TaggedSymbol)
427
460
  FRAUDULENT = T.let(:Fraudulent, Orb::Models::CreditNote::Reason::TaggedSymbol)
@@ -436,7 +469,7 @@ module Orb
436
469
  extend Orb::Internal::Type::Enum
437
470
 
438
471
  TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::CreditNote::Type) }
439
- OrSymbol = T.type_alias { T.any(Symbol, String, Orb::Models::CreditNote::Type::TaggedSymbol) }
472
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
440
473
 
441
474
  REFUND = T.let(:refund, Orb::Models::CreditNote::Type::TaggedSymbol)
442
475
  ADJUSTMENT = T.let(:adjustment, Orb::Models::CreditNote::Type::TaggedSymbol)
@@ -498,8 +531,7 @@ module Orb
498
531
  extend Orb::Internal::Type::Enum
499
532
 
500
533
  TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::CreditNote::Discount::DiscountType) }
501
- OrSymbol =
502
- T.type_alias { T.any(Symbol, String, Orb::Models::CreditNote::Discount::DiscountType::TaggedSymbol) }
534
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
503
535
 
504
536
  PERCENTAGE = T.let(:percentage, Orb::Models::CreditNote::Discount::DiscountType::TaggedSymbol)
505
537
 
@@ -26,8 +26,14 @@ module Orb
26
26
  )
27
27
  .returns(T.attached_class)
28
28
  end
29
- def self.new(line_items:, memo: nil, reason: nil, request_options: {}); end
30
-
29
+ def self.new(
30
+ line_items:,
31
+ # An optional memo to attach to the credit note.
32
+ memo: nil,
33
+ # An optional reason for the credit note.
34
+ reason: nil,
35
+ request_options: {}
36
+ ); end
31
37
  sig do
32
38
  override
33
39
  .returns(
@@ -51,8 +57,12 @@ module Orb
51
57
  attr_accessor :invoice_line_item_id
52
58
 
53
59
  sig { params(amount: String, invoice_line_item_id: String).returns(T.attached_class) }
54
- def self.new(amount:, invoice_line_item_id:); end
55
-
60
+ def self.new(
61
+ # The total amount in the invoice's currency to credit this line item.
62
+ amount:,
63
+ # The ID of the line item to credit.
64
+ invoice_line_item_id:
65
+ ); end
56
66
  sig { override.returns({amount: String, invoice_line_item_id: String}) }
57
67
  def to_hash; end
58
68
  end
@@ -62,8 +72,7 @@ module Orb
62
72
  extend Orb::Internal::Type::Enum
63
73
 
64
74
  TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::CreditNoteCreateParams::Reason) }
65
- OrSymbol =
66
- T.type_alias { T.any(Symbol, String, Orb::Models::CreditNoteCreateParams::Reason::TaggedSymbol) }
75
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
67
76
 
68
77
  DUPLICATE = T.let(:duplicate, Orb::Models::CreditNoteCreateParams::Reason::TaggedSymbol)
69
78
  FRAUDULENT = T.let(:fraudulent, Orb::Models::CreditNoteCreateParams::Reason::TaggedSymbol)
@@ -47,7 +47,10 @@ module Orb
47
47
  created_at_gte: nil,
48
48
  created_at_lt: nil,
49
49
  created_at_lte: nil,
50
+ # Cursor for pagination. This can be populated by the `next_cursor` value returned
51
+ # from the initial request.
50
52
  cursor: nil,
53
+ # The number of items to fetch. Defaults to 20.
51
54
  limit: nil,
52
55
  request_options: {}
53
56
  ); end
@@ -278,22 +278,148 @@ module Orb
278
278
  id:,
279
279
  additional_emails:,
280
280
  auto_collection:,
281
+ # The customer's current balance in their currency.
281
282
  balance:,
282
283
  billing_address:,
283
284
  created_at:,
284
285
  currency:,
286
+ # A valid customer email, to be used for notifications. When Orb triggers payment
287
+ # through a payment gateway, this email will be used for any automatically issued
288
+ # receipts.
285
289
  email:,
286
290
  email_delivery:,
287
291
  exempt_from_automated_tax:,
292
+ # An optional user-defined ID for this customer resource, used throughout the
293
+ # system as an alias for this Customer. Use this field to identify a customer by
294
+ # an existing identifier in your system.
288
295
  external_customer_id:,
296
+ # The hierarchical relationships for this customer.
289
297
  hierarchy:,
298
+ # User specified key-value pairs for the resource. If not present, this defaults
299
+ # to an empty dictionary. Individual keys can be removed by setting the value to
300
+ # `null`, and the entire metadata mapping can be cleared by setting `metadata` to
301
+ # `null`.
290
302
  metadata:,
303
+ # The full name of the customer
291
304
  name:,
305
+ # This is used for creating charges or invoices in an external system via Orb.
306
+ # When not in test mode, the connection must first be configured in the Orb
307
+ # webapp.
292
308
  payment_provider:,
309
+ # The ID of this customer in an external payments solution, such as Stripe. This
310
+ # is used for creating charges or invoices in the external system via Orb.
293
311
  payment_provider_id:,
294
312
  portal_url:,
295
313
  shipping_address:,
314
+ # Tax IDs are commonly required to be displayed on customer invoices, which are
315
+ # added to the headers of invoices.
316
+ #
317
+ # ### Supported Tax ID Countries and Types
318
+ #
319
+ # | Country | Type | Description |
320
+ # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
321
+ # | Andorra | `ad_nrt` | Andorran NRT Number |
322
+ # | Argentina | `ar_cuit` | Argentinian Tax ID Number |
323
+ # | Australia | `au_abn` | Australian Business Number (AU ABN) |
324
+ # | Australia | `au_arn` | Australian Taxation Office Reference Number |
325
+ # | Austria | `eu_vat` | European VAT Number |
326
+ # | Bahrain | `bh_vat` | Bahraini VAT Number |
327
+ # | Belgium | `eu_vat` | European VAT Number |
328
+ # | Bolivia | `bo_tin` | Bolivian Tax ID |
329
+ # | Brazil | `br_cnpj` | Brazilian CNPJ Number |
330
+ # | Brazil | `br_cpf` | Brazilian CPF Number |
331
+ # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
332
+ # | Bulgaria | `eu_vat` | European VAT Number |
333
+ # | Canada | `ca_bn` | Canadian BN |
334
+ # | Canada | `ca_gst_hst` | Canadian GST/HST Number |
335
+ # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) |
336
+ # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) |
337
+ # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) |
338
+ # | Canada | `ca_qst` | Canadian QST Number (Québec) |
339
+ # | Chile | `cl_tin` | Chilean TIN |
340
+ # | China | `cn_tin` | Chinese Tax ID |
341
+ # | Colombia | `co_nit` | Colombian NIT Number |
342
+ # | Costa Rica | `cr_tin` | Costa Rican Tax ID |
343
+ # | Croatia | `eu_vat` | European VAT Number |
344
+ # | Cyprus | `eu_vat` | European VAT Number |
345
+ # | Czech Republic | `eu_vat` | European VAT Number |
346
+ # | Denmark | `eu_vat` | European VAT Number |
347
+ # | Dominican Republic | `do_rcn` | Dominican RCN Number |
348
+ # | Ecuador | `ec_ruc` | Ecuadorian RUC Number |
349
+ # | Egypt | `eg_tin` | Egyptian Tax Identification Number |
350
+ # | El Salvador | `sv_nit` | El Salvadorian NIT Number |
351
+ # | Estonia | `eu_vat` | European VAT Number |
352
+ # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
353
+ # | Finland | `eu_vat` | European VAT Number |
354
+ # | France | `eu_vat` | European VAT Number |
355
+ # | Georgia | `ge_vat` | Georgian VAT |
356
+ # | Germany | `eu_vat` | European VAT Number |
357
+ # | Greece | `eu_vat` | European VAT Number |
358
+ # | Hong Kong | `hk_br` | Hong Kong BR Number |
359
+ # | Hungary | `eu_vat` | European VAT Number |
360
+ # | Hungary | `hu_tin` | Hungary Tax Number (adószám) |
361
+ # | Iceland | `is_vat` | Icelandic VAT |
362
+ # | India | `in_gst` | Indian GST Number |
363
+ # | Indonesia | `id_npwp` | Indonesian NPWP Number |
364
+ # | Ireland | `eu_vat` | European VAT Number |
365
+ # | Israel | `il_vat` | Israel VAT |
366
+ # | Italy | `eu_vat` | European VAT Number |
367
+ # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
368
+ # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
369
+ # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
370
+ # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number |
371
+ # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
372
+ # | Latvia | `eu_vat` | European VAT Number |
373
+ # | Liechtenstein | `li_uid` | Liechtensteinian UID Number |
374
+ # | Lithuania | `eu_vat` | European VAT Number |
375
+ # | Luxembourg | `eu_vat` | European VAT Number |
376
+ # | Malaysia | `my_frp` | Malaysian FRP Number |
377
+ # | Malaysia | `my_itn` | Malaysian ITN |
378
+ # | Malaysia | `my_sst` | Malaysian SST Number |
379
+ # | Malta | `eu_vat ` | European VAT Number |
380
+ # | Mexico | `mx_rfc` | Mexican RFC Number |
381
+ # | Netherlands | `eu_vat` | European VAT Number |
382
+ # | New Zealand | `nz_gst` | New Zealand GST Number |
383
+ # | Nigeria | `ng_tin` | Nigerian Tax Identification Number |
384
+ # | Norway | `no_vat` | Norwegian VAT Number |
385
+ # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
386
+ # | Oman | `om_vat` | Omani VAT Number |
387
+ # | Peru | `pe_ruc` | Peruvian RUC Number |
388
+ # | Philippines | `ph_tin ` | Philippines Tax Identification Number |
389
+ # | Poland | `eu_vat` | European VAT Number |
390
+ # | Portugal | `eu_vat` | European VAT Number |
391
+ # | Romania | `eu_vat` | European VAT Number |
392
+ # | Romania | `ro_tin` | Romanian Tax ID Number |
393
+ # | Russia | `ru_inn` | Russian INN |
394
+ # | Russia | `ru_kpp` | Russian KPP |
395
+ # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT |
396
+ # | Serbia | `rs_pib` | Serbian PIB Number |
397
+ # | Singapore | `sg_gst` | Singaporean GST |
398
+ # | Singapore | `sg_uen` | Singaporean UEN |
399
+ # | Slovakia | `eu_vat` | European VAT Number |
400
+ # | Slovenia | `eu_vat` | European VAT Number |
401
+ # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) |
402
+ # | South Africa | `za_vat` | South African VAT Number |
403
+ # | South Korea | `kr_brn` | Korean BRN |
404
+ # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
405
+ # | Spain | `eu_vat` | European VAT Number |
406
+ # | Sweden | `eu_vat` | European VAT Number |
407
+ # | Switzerland | `ch_vat` | Switzerland VAT Number |
408
+ # | Taiwan | `tw_vat` | Taiwanese VAT |
409
+ # | Thailand | `th_vat` | Thai VAT |
410
+ # | Turkey | `tr_tin` | Turkish Tax Identification Number |
411
+ # | Ukraine | `ua_vat` | Ukrainian VAT |
412
+ # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
413
+ # | United Kingdom | `eu_vat` | Northern Ireland VAT Number |
414
+ # | United Kingdom | `gb_vat` | United Kingdom VAT Number |
415
+ # | United States | `us_ein` | United States EIN |
416
+ # | Uruguay | `uy_ruc` | Uruguayan RUC Number |
417
+ # | Venezuela | `ve_rif` | Venezuelan RIF Number |
418
+ # | Vietnam | `vn_tin` | Vietnamese Tax ID Number |
296
419
  tax_id:,
420
+ # A timezone identifier from the IANA timezone database, such as
421
+ # "America/Los_Angeles". This "defaults to your account's timezone if not set.
422
+ # This cannot be changed after customer creation.
297
423
  timezone:,
298
424
  accounting_sync_configuration: nil,
299
425
  reporting_configuration: nil
@@ -444,7 +570,7 @@ module Orb
444
570
  extend Orb::Internal::Type::Enum
445
571
 
446
572
  TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::Customer::PaymentProvider) }
447
- OrSymbol = T.type_alias { T.any(Symbol, String, Orb::Models::Customer::PaymentProvider::TaggedSymbol) }
573
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
448
574
 
449
575
  QUICKBOOKS = T.let(:quickbooks, Orb::Models::Customer::PaymentProvider::TaggedSymbol)
450
576
  BILL_COM = T.let(:"bill.com", Orb::Models::Customer::PaymentProvider::TaggedSymbol)
@@ -645,7 +771,7 @@ module Orb
645
771
  extend Orb::Internal::Type::Enum
646
772
 
647
773
  TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::Customer::TaxID::Country) }
648
- OrSymbol = T.type_alias { T.any(Symbol, String, Orb::Models::Customer::TaxID::Country::TaggedSymbol) }
774
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
649
775
 
650
776
  AD = T.let(:AD, Orb::Models::Customer::TaxID::Country::TaggedSymbol)
651
777
  AE = T.let(:AE, Orb::Models::Customer::TaxID::Country::TaggedSymbol)
@@ -734,7 +860,7 @@ module Orb
734
860
  extend Orb::Internal::Type::Enum
735
861
 
736
862
  TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::Customer::TaxID::Type) }
737
- OrSymbol = T.type_alias { T.any(Symbol, String, Orb::Models::Customer::TaxID::Type::TaggedSymbol) }
863
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
738
864
 
739
865
  AD_NRT = T.let(:ad_nrt, Orb::Models::Customer::TaxID::Type::TaggedSymbol)
740
866
  AE_TRN = T.let(:ae_trn, Orb::Models::Customer::TaxID::Type::TaggedSymbol)
@@ -876,14 +1002,7 @@ module Orb
876
1002
 
877
1003
  TaggedSymbol =
878
1004
  T.type_alias { T.all(Symbol, Orb::Models::Customer::AccountingSyncConfiguration::AccountingProvider::ProviderType) }
879
- OrSymbol =
880
- T.type_alias do
881
- T.any(
882
- Symbol,
883
- String,
884
- Orb::Models::Customer::AccountingSyncConfiguration::AccountingProvider::ProviderType::TaggedSymbol
885
- )
886
- end
1005
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
887
1006
 
888
1007
  QUICKBOOKS =
889
1008
  T.let(
@@ -272,23 +272,154 @@ module Orb
272
272
  .returns(T.attached_class)
273
273
  end
274
274
  def self.new(
275
+ # A valid customer email, to be used for notifications. When Orb triggers payment
276
+ # through a payment gateway, this email will be used for any automatically issued
277
+ # receipts.
275
278
  email:,
279
+ # The full name of the customer
276
280
  name:,
277
281
  accounting_sync_configuration: nil,
282
+ # Additional email addresses for this customer. If populated, these email
283
+ # addresses will be CC'd for customer communications.
278
284
  additional_emails: nil,
285
+ # Used to determine if invoices for this customer will automatically attempt to
286
+ # charge a saved payment method, if available. This parameter defaults to `True`
287
+ # when a payment provider is provided on customer creation.
279
288
  auto_collection: nil,
280
289
  billing_address: nil,
290
+ # An ISO 4217 currency string used for the customer's invoices and balance. If not
291
+ # set at creation time, will be set at subscription creation time.
281
292
  currency: nil,
282
293
  email_delivery: nil,
294
+ # An optional user-defined ID for this customer resource, used throughout the
295
+ # system as an alias for this Customer. Use this field to identify a customer by
296
+ # an existing identifier in your system.
283
297
  external_customer_id: nil,
298
+ # The hierarchical relationships for this customer.
284
299
  hierarchy: nil,
300
+ # User-specified key/value pairs for the resource. Individual keys can be removed
301
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
302
+ # by setting `metadata` to `null`.
285
303
  metadata: nil,
304
+ # This is used for creating charges or invoices in an external system via Orb.
305
+ # When not in test mode, the connection must first be configured in the Orb
306
+ # webapp.
286
307
  payment_provider: nil,
308
+ # The ID of this customer in an external payments solution, such as Stripe. This
309
+ # is used for creating charges or invoices in the external system via Orb.
287
310
  payment_provider_id: nil,
288
311
  reporting_configuration: nil,
289
312
  shipping_address: nil,
290
313
  tax_configuration: nil,
314
+ # Tax IDs are commonly required to be displayed on customer invoices, which are
315
+ # added to the headers of invoices.
316
+ #
317
+ # ### Supported Tax ID Countries and Types
318
+ #
319
+ # | Country | Type | Description |
320
+ # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
321
+ # | Andorra | `ad_nrt` | Andorran NRT Number |
322
+ # | Argentina | `ar_cuit` | Argentinian Tax ID Number |
323
+ # | Australia | `au_abn` | Australian Business Number (AU ABN) |
324
+ # | Australia | `au_arn` | Australian Taxation Office Reference Number |
325
+ # | Austria | `eu_vat` | European VAT Number |
326
+ # | Bahrain | `bh_vat` | Bahraini VAT Number |
327
+ # | Belgium | `eu_vat` | European VAT Number |
328
+ # | Bolivia | `bo_tin` | Bolivian Tax ID |
329
+ # | Brazil | `br_cnpj` | Brazilian CNPJ Number |
330
+ # | Brazil | `br_cpf` | Brazilian CPF Number |
331
+ # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
332
+ # | Bulgaria | `eu_vat` | European VAT Number |
333
+ # | Canada | `ca_bn` | Canadian BN |
334
+ # | Canada | `ca_gst_hst` | Canadian GST/HST Number |
335
+ # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) |
336
+ # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) |
337
+ # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) |
338
+ # | Canada | `ca_qst` | Canadian QST Number (Québec) |
339
+ # | Chile | `cl_tin` | Chilean TIN |
340
+ # | China | `cn_tin` | Chinese Tax ID |
341
+ # | Colombia | `co_nit` | Colombian NIT Number |
342
+ # | Costa Rica | `cr_tin` | Costa Rican Tax ID |
343
+ # | Croatia | `eu_vat` | European VAT Number |
344
+ # | Cyprus | `eu_vat` | European VAT Number |
345
+ # | Czech Republic | `eu_vat` | European VAT Number |
346
+ # | Denmark | `eu_vat` | European VAT Number |
347
+ # | Dominican Republic | `do_rcn` | Dominican RCN Number |
348
+ # | Ecuador | `ec_ruc` | Ecuadorian RUC Number |
349
+ # | Egypt | `eg_tin` | Egyptian Tax Identification Number |
350
+ # | El Salvador | `sv_nit` | El Salvadorian NIT Number |
351
+ # | Estonia | `eu_vat` | European VAT Number |
352
+ # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
353
+ # | Finland | `eu_vat` | European VAT Number |
354
+ # | France | `eu_vat` | European VAT Number |
355
+ # | Georgia | `ge_vat` | Georgian VAT |
356
+ # | Germany | `eu_vat` | European VAT Number |
357
+ # | Greece | `eu_vat` | European VAT Number |
358
+ # | Hong Kong | `hk_br` | Hong Kong BR Number |
359
+ # | Hungary | `eu_vat` | European VAT Number |
360
+ # | Hungary | `hu_tin` | Hungary Tax Number (adószám) |
361
+ # | Iceland | `is_vat` | Icelandic VAT |
362
+ # | India | `in_gst` | Indian GST Number |
363
+ # | Indonesia | `id_npwp` | Indonesian NPWP Number |
364
+ # | Ireland | `eu_vat` | European VAT Number |
365
+ # | Israel | `il_vat` | Israel VAT |
366
+ # | Italy | `eu_vat` | European VAT Number |
367
+ # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
368
+ # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
369
+ # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
370
+ # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number |
371
+ # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
372
+ # | Latvia | `eu_vat` | European VAT Number |
373
+ # | Liechtenstein | `li_uid` | Liechtensteinian UID Number |
374
+ # | Lithuania | `eu_vat` | European VAT Number |
375
+ # | Luxembourg | `eu_vat` | European VAT Number |
376
+ # | Malaysia | `my_frp` | Malaysian FRP Number |
377
+ # | Malaysia | `my_itn` | Malaysian ITN |
378
+ # | Malaysia | `my_sst` | Malaysian SST Number |
379
+ # | Malta | `eu_vat ` | European VAT Number |
380
+ # | Mexico | `mx_rfc` | Mexican RFC Number |
381
+ # | Netherlands | `eu_vat` | European VAT Number |
382
+ # | New Zealand | `nz_gst` | New Zealand GST Number |
383
+ # | Nigeria | `ng_tin` | Nigerian Tax Identification Number |
384
+ # | Norway | `no_vat` | Norwegian VAT Number |
385
+ # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
386
+ # | Oman | `om_vat` | Omani VAT Number |
387
+ # | Peru | `pe_ruc` | Peruvian RUC Number |
388
+ # | Philippines | `ph_tin ` | Philippines Tax Identification Number |
389
+ # | Poland | `eu_vat` | European VAT Number |
390
+ # | Portugal | `eu_vat` | European VAT Number |
391
+ # | Romania | `eu_vat` | European VAT Number |
392
+ # | Romania | `ro_tin` | Romanian Tax ID Number |
393
+ # | Russia | `ru_inn` | Russian INN |
394
+ # | Russia | `ru_kpp` | Russian KPP |
395
+ # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT |
396
+ # | Serbia | `rs_pib` | Serbian PIB Number |
397
+ # | Singapore | `sg_gst` | Singaporean GST |
398
+ # | Singapore | `sg_uen` | Singaporean UEN |
399
+ # | Slovakia | `eu_vat` | European VAT Number |
400
+ # | Slovenia | `eu_vat` | European VAT Number |
401
+ # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) |
402
+ # | South Africa | `za_vat` | South African VAT Number |
403
+ # | South Korea | `kr_brn` | Korean BRN |
404
+ # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
405
+ # | Spain | `eu_vat` | European VAT Number |
406
+ # | Sweden | `eu_vat` | European VAT Number |
407
+ # | Switzerland | `ch_vat` | Switzerland VAT Number |
408
+ # | Taiwan | `tw_vat` | Taiwanese VAT |
409
+ # | Thailand | `th_vat` | Thai VAT |
410
+ # | Turkey | `tr_tin` | Turkish Tax Identification Number |
411
+ # | Ukraine | `ua_vat` | Ukrainian VAT |
412
+ # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
413
+ # | United Kingdom | `eu_vat` | Northern Ireland VAT Number |
414
+ # | United Kingdom | `gb_vat` | United Kingdom VAT Number |
415
+ # | United States | `us_ein` | United States EIN |
416
+ # | Uruguay | `uy_ruc` | Uruguayan RUC Number |
417
+ # | Venezuela | `ve_rif` | Venezuelan RIF Number |
418
+ # | Vietnam | `vn_tin` | Vietnamese Tax ID Number |
291
419
  tax_id: nil,
420
+ # A timezone identifier from the IANA timezone database, such as
421
+ # `"America/Los_Angeles"`. This defaults to your account's timezone if not set.
422
+ # This cannot be changed after customer creation.
292
423
  timezone: nil,
293
424
  request_options: {}
294
425
  ); end
@@ -445,8 +576,14 @@ module Orb
445
576
  params(child_customer_ids: T::Array[String], parent_customer_id: T.nilable(String))
446
577
  .returns(T.attached_class)
447
578
  end
448
- def self.new(child_customer_ids: nil, parent_customer_id: nil); end
449
-
579
+ def self.new(
580
+ # A list of child customer IDs to add to the hierarchy. The desired child
581
+ # customers must not already be part of another hierarchy.
582
+ child_customer_ids: nil,
583
+ # The ID of the parent customer in the hierarchy. The desired parent customer must
584
+ # not be a child of another customer.
585
+ parent_customer_id: nil
586
+ ); end
450
587
  sig do
451
588
  override.returns({child_customer_ids: T::Array[String], parent_customer_id: T.nilable(String)})
452
589
  end
@@ -460,8 +597,7 @@ module Orb
460
597
  extend Orb::Internal::Type::Enum
461
598
 
462
599
  TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::CustomerCreateParams::PaymentProvider) }
463
- OrSymbol =
464
- T.type_alias { T.any(Symbol, String, Orb::Models::CustomerCreateParams::PaymentProvider::TaggedSymbol) }
600
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
465
601
 
466
602
  QUICKBOOKS = T.let(:quickbooks, Orb::Models::CustomerCreateParams::PaymentProvider::TaggedSymbol)
467
603
  BILL_COM = T.let(:"bill.com", Orb::Models::CustomerCreateParams::PaymentProvider::TaggedSymbol)
@@ -727,8 +863,7 @@ module Orb
727
863
  extend Orb::Internal::Type::Enum
728
864
 
729
865
  TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::CustomerCreateParams::TaxID::Country) }
730
- OrSymbol =
731
- T.type_alias { T.any(Symbol, String, Orb::Models::CustomerCreateParams::TaxID::Country::TaggedSymbol) }
866
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
732
867
 
733
868
  AD = T.let(:AD, Orb::Models::CustomerCreateParams::TaxID::Country::TaggedSymbol)
734
869
  AE = T.let(:AE, Orb::Models::CustomerCreateParams::TaxID::Country::TaggedSymbol)
@@ -817,8 +952,7 @@ module Orb
817
952
  extend Orb::Internal::Type::Enum
818
953
 
819
954
  TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::CustomerCreateParams::TaxID::Type) }
820
- OrSymbol =
821
- T.type_alias { T.any(Symbol, String, Orb::Models::CustomerCreateParams::TaxID::Type::TaggedSymbol) }
955
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
822
956
 
823
957
  AD_NRT = T.let(:ad_nrt, Orb::Models::CustomerCreateParams::TaxID::Type::TaggedSymbol)
824
958
  AE_TRN = T.let(:ae_trn, Orb::Models::CustomerCreateParams::TaxID::Type::TaggedSymbol)
@@ -47,7 +47,10 @@ module Orb
47
47
  created_at_gte: nil,
48
48
  created_at_lt: nil,
49
49
  created_at_lte: nil,
50
+ # Cursor for pagination. This can be populated by the `next_cursor` value returned
51
+ # from the initial request.
50
52
  cursor: nil,
53
+ # The number of items to fetch. Defaults to 20.
51
54
  limit: nil,
52
55
  request_options: {}
53
56
  ); end