orb-billing 0.5.2 → 0.5.3

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 (279) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/README.md +4 -4
  4. data/SECURITY.md +2 -2
  5. data/lib/orb/internal.rb +3 -0
  6. data/lib/orb/models/alert.rb +23 -23
  7. data/lib/orb/models/alert_create_for_customer_params.rb +5 -5
  8. data/lib/orb/models/alert_create_for_external_customer_params.rb +5 -5
  9. data/lib/orb/models/alert_create_for_subscription_params.rb +5 -5
  10. data/lib/orb/models/alert_update_params.rb +3 -3
  11. data/lib/orb/models/amount_discount.rb +5 -5
  12. data/lib/orb/models/billable_metric.rb +7 -7
  13. data/lib/orb/models/coupon.rb +6 -6
  14. data/lib/orb/models/coupon_create_params.rb +3 -3
  15. data/lib/orb/models/credit_note.rb +33 -33
  16. data/lib/orb/models/credit_note_create_params.rb +4 -4
  17. data/lib/orb/models/customer.rb +39 -39
  18. data/lib/orb/models/customer_create_params.rb +26 -26
  19. data/lib/orb/models/customer_update_by_external_id_params.rb +26 -26
  20. data/lib/orb/models/customer_update_params.rb +26 -26
  21. data/lib/orb/models/customers/balance_transaction_create_params.rb +2 -2
  22. data/lib/orb/models/customers/cost_list_by_external_id_params.rb +2 -2
  23. data/lib/orb/models/customers/cost_list_by_external_id_response.rb +2 -2
  24. data/lib/orb/models/customers/cost_list_params.rb +2 -2
  25. data/lib/orb/models/customers/cost_list_response.rb +2 -2
  26. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +7 -7
  27. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +8 -8
  28. data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +4 -4
  29. data/lib/orb/models/customers/credits/ledger_list_params.rb +4 -4
  30. data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +6 -6
  31. data/lib/orb/models/customers/credits/top_up_create_params.rb +6 -5
  32. data/lib/orb/models/dimensional_price_group.rb +1 -1
  33. data/lib/orb/models/dimensional_price_groups.rb +4 -4
  34. data/lib/orb/models/discount.rb +1 -1
  35. data/lib/orb/models/event_ingest_params.rb +3 -3
  36. data/lib/orb/models/events/event_volumes.rb +2 -2
  37. data/lib/orb/models/invoice.rb +114 -113
  38. data/lib/orb/models/invoice_create_params.rb +10 -10
  39. data/lib/orb/models/invoice_fetch_upcoming_response.rb +6 -6
  40. data/lib/orb/models/invoice_level_discount.rb +1 -1
  41. data/lib/orb/models/invoice_line_item_create_response.rb +4 -4
  42. data/lib/orb/models/invoice_list_params.rb +4 -4
  43. data/lib/orb/models/item.rb +5 -5
  44. data/lib/orb/models/item_update_params.rb +5 -5
  45. data/lib/orb/models/percentage_discount.rb +5 -5
  46. data/lib/orb/models/plan.rb +58 -58
  47. data/lib/orb/models/plan_create_params.rb +448 -444
  48. data/lib/orb/models/plan_list_params.rb +2 -2
  49. data/lib/orb/models/price.rb +1204 -1204
  50. data/lib/orb/models/price_create_params.rb +50 -50
  51. data/lib/orb/models/price_evaluate_response.rb +2 -2
  52. data/lib/orb/models/subscription.rb +58 -56
  53. data/lib/orb/models/subscription_cancel_params.rb +2 -2
  54. data/lib/orb/models/subscription_cancel_response.rb +14 -14
  55. data/lib/orb/models/subscription_change_apply_response.rb +14 -14
  56. data/lib/orb/models/subscription_change_cancel_response.rb +14 -14
  57. data/lib/orb/models/subscription_change_retrieve_response.rb +14 -14
  58. data/lib/orb/models/subscription_create_params.rb +1002 -987
  59. data/lib/orb/models/subscription_create_response.rb +14 -14
  60. data/lib/orb/models/subscription_fetch_costs_params.rb +2 -2
  61. data/lib/orb/models/subscription_fetch_costs_response.rb +2 -2
  62. data/lib/orb/models/subscription_fetch_usage_params.rb +4 -4
  63. data/lib/orb/models/subscription_list_params.rb +2 -2
  64. data/lib/orb/models/subscription_price_intervals_params.rb +596 -585
  65. data/lib/orb/models/subscription_price_intervals_response.rb +14 -14
  66. data/lib/orb/models/subscription_schedule_plan_change_params.rb +973 -971
  67. data/lib/orb/models/subscription_schedule_plan_change_response.rb +14 -14
  68. data/lib/orb/models/subscription_trigger_phase_response.rb +14 -14
  69. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +14 -14
  70. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +14 -14
  71. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +14 -14
  72. data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +2 -2
  73. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +14 -14
  74. data/lib/orb/models/subscription_update_trial_params.rb +3 -3
  75. data/lib/orb/models/subscription_update_trial_response.rb +14 -14
  76. data/lib/orb/models/subscription_usage.rb +26 -26
  77. data/lib/orb/models/subscriptions.rb +4 -4
  78. data/lib/orb/models/trial_discount.rb +5 -5
  79. data/lib/orb/models/usage_discount.rb +5 -5
  80. data/lib/orb/resources/alerts.rb +15 -15
  81. data/lib/orb/resources/coupons/subscriptions.rb +1 -1
  82. data/lib/orb/resources/coupons.rb +5 -5
  83. data/lib/orb/resources/credit_notes.rb +5 -5
  84. data/lib/orb/resources/customers/balance_transactions.rb +1 -1
  85. data/lib/orb/resources/customers/costs.rb +2 -2
  86. data/lib/orb/resources/customers/credits/ledger.rb +10 -10
  87. data/lib/orb/resources/customers/credits/top_ups.rb +4 -4
  88. data/lib/orb/resources/customers.rb +30 -30
  89. data/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rb +1 -1
  90. data/lib/orb/resources/dimensional_price_groups.rb +3 -3
  91. data/lib/orb/resources/events/volume.rb +1 -1
  92. data/lib/orb/resources/events.rb +1 -1
  93. data/lib/orb/resources/invoices.rb +12 -12
  94. data/lib/orb/resources/items.rb +5 -5
  95. data/lib/orb/resources/metrics.rb +4 -4
  96. data/lib/orb/resources/plans/external_plan_id.rb +2 -2
  97. data/lib/orb/resources/plans.rb +7 -7
  98. data/lib/orb/resources/prices/external_price_id.rb +2 -2
  99. data/lib/orb/resources/prices.rb +17 -17
  100. data/lib/orb/resources/subscriptions.rb +32 -32
  101. data/lib/orb/version.rb +1 -1
  102. data/rbi/orb/internal.rbi +3 -0
  103. data/rbi/orb/models/subscription_price_intervals_params.rbi +26 -72
  104. data/rbi/orb/models/subscription_update_trial_params.rbi +14 -3
  105. data/rbi/orb/resources/subscriptions.rbi +4 -1
  106. data/sig/orb/internal/page.rbs +2 -0
  107. data/sig/orb/internal.rbs +2 -0
  108. data/sig/orb/models/alert.rbs +32 -4
  109. data/sig/orb/models/alert_create_for_customer_params.rbs +9 -0
  110. data/sig/orb/models/alert_create_for_external_customer_params.rbs +9 -0
  111. data/sig/orb/models/alert_create_for_subscription_params.rbs +9 -0
  112. data/sig/orb/models/alert_disable_params.rbs +5 -0
  113. data/sig/orb/models/alert_enable_params.rbs +5 -0
  114. data/sig/orb/models/alert_list_params.rbs +13 -0
  115. data/sig/orb/models/alert_retrieve_params.rbs +2 -0
  116. data/sig/orb/models/alert_update_params.rbs +7 -0
  117. data/sig/orb/models/amount_discount.rbs +11 -4
  118. data/sig/orb/models/billable_metric.rbs +13 -4
  119. data/sig/orb/models/coupon.rbs +14 -4
  120. data/sig/orb/models/coupon_archive_params.rbs +2 -0
  121. data/sig/orb/models/coupon_create_params.rbs +15 -0
  122. data/sig/orb/models/coupon_fetch_params.rbs +2 -0
  123. data/sig/orb/models/coupon_list_params.rbs +8 -0
  124. data/sig/orb/models/coupons/subscription_list_params.rbs +6 -0
  125. data/sig/orb/models/credit_note.rbs +88 -20
  126. data/sig/orb/models/credit_note_create_params.rbs +9 -0
  127. data/sig/orb/models/credit_note_fetch_params.rbs +2 -0
  128. data/sig/orb/models/credit_note_list_params.rbs +10 -0
  129. data/sig/orb/models/customer.rbs +86 -16
  130. data/sig/orb/models/customer_create_params.rbs +79 -8
  131. data/sig/orb/models/customer_delete_params.rbs +2 -0
  132. data/sig/orb/models/customer_fetch_by_external_id_params.rbs +2 -0
  133. data/sig/orb/models/customer_fetch_params.rbs +2 -0
  134. data/sig/orb/models/customer_list_params.rbs +10 -0
  135. data/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs +2 -0
  136. data/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs +2 -0
  137. data/sig/orb/models/customer_update_by_external_id_params.rbs +78 -8
  138. data/sig/orb/models/customer_update_params.rbs +78 -8
  139. data/sig/orb/models/customers/balance_transaction_create_params.rbs +7 -0
  140. data/sig/orb/models/customers/balance_transaction_create_response.rbs +17 -0
  141. data/sig/orb/models/customers/balance_transaction_list_params.rbs +10 -0
  142. data/sig/orb/models/customers/balance_transaction_list_response.rbs +17 -0
  143. data/sig/orb/models/customers/cost_list_by_external_id_params.rbs +8 -0
  144. data/sig/orb/models/customers/cost_list_by_external_id_response.rbs +20 -0
  145. data/sig/orb/models/customers/cost_list_params.rbs +8 -0
  146. data/sig/orb/models/customers/cost_list_response.rbs +20 -0
  147. data/sig/orb/models/customers/credit_list_by_external_id_params.rbs +8 -0
  148. data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +10 -0
  149. data/sig/orb/models/customers/credit_list_params.rbs +8 -0
  150. data/sig/orb/models/customers/credit_list_response.rbs +10 -0
  151. data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +23 -0
  152. data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +177 -0
  153. data/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +23 -0
  154. data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +177 -0
  155. data/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs +14 -0
  156. data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +177 -0
  157. data/sig/orb/models/customers/credits/ledger_list_params.rbs +14 -0
  158. data/sig/orb/models/customers/credits/ledger_list_response.rbs +177 -0
  159. data/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs +19 -0
  160. data/sig/orb/models/customers/credits/top_up_create_by_external_id_response.rbs +18 -0
  161. data/sig/orb/models/customers/credits/top_up_create_params.rbs +19 -0
  162. data/sig/orb/models/customers/credits/top_up_create_response.rbs +18 -0
  163. data/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs +5 -0
  164. data/sig/orb/models/customers/credits/top_up_delete_params.rbs +5 -0
  165. data/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs +6 -0
  166. data/sig/orb/models/customers/credits/top_up_list_by_external_id_response.rbs +18 -0
  167. data/sig/orb/models/customers/credits/top_up_list_params.rbs +6 -0
  168. data/sig/orb/models/customers/credits/top_up_list_response.rbs +18 -0
  169. data/sig/orb/models/dimensional_price_group.rbs +9 -0
  170. data/sig/orb/models/dimensional_price_group_create_params.rbs +9 -0
  171. data/sig/orb/models/dimensional_price_group_list_params.rbs +6 -0
  172. data/sig/orb/models/dimensional_price_group_retrieve_params.rbs +2 -0
  173. data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs +2 -0
  174. data/sig/orb/models/dimensional_price_groups.rbs +5 -0
  175. data/sig/orb/models/evaluate_price_group.rbs +10 -4
  176. data/sig/orb/models/event_deprecate_params.rbs +2 -0
  177. data/sig/orb/models/event_deprecate_response.rbs +2 -0
  178. data/sig/orb/models/event_ingest_params.rbs +16 -0
  179. data/sig/orb/models/event_ingest_response.rbs +15 -0
  180. data/sig/orb/models/event_search_params.rbs +7 -0
  181. data/sig/orb/models/event_search_response.rbs +12 -0
  182. data/sig/orb/models/event_update_params.rbs +9 -0
  183. data/sig/orb/models/event_update_response.rbs +2 -0
  184. data/sig/orb/models/events/backfill_close_params.rbs +2 -0
  185. data/sig/orb/models/events/backfill_close_response.rbs +14 -0
  186. data/sig/orb/models/events/backfill_create_params.rbs +11 -0
  187. data/sig/orb/models/events/backfill_create_response.rbs +14 -0
  188. data/sig/orb/models/events/backfill_fetch_params.rbs +2 -0
  189. data/sig/orb/models/events/backfill_fetch_response.rbs +14 -0
  190. data/sig/orb/models/events/backfill_list_params.rbs +6 -0
  191. data/sig/orb/models/events/backfill_list_response.rbs +14 -0
  192. data/sig/orb/models/events/backfill_revert_params.rbs +2 -0
  193. data/sig/orb/models/events/backfill_revert_response.rbs +14 -0
  194. data/sig/orb/models/events/event_volumes.rbs +8 -0
  195. data/sig/orb/models/events/volume_list_params.rbs +8 -0
  196. data/sig/orb/models/invoice.rbs +293 -36
  197. data/sig/orb/models/invoice_create_params.rbs +30 -4
  198. data/sig/orb/models/invoice_fetch_params.rbs +2 -0
  199. data/sig/orb/models/invoice_fetch_upcoming_params.rbs +5 -0
  200. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +257 -0
  201. data/sig/orb/models/invoice_issue_params.rbs +5 -0
  202. data/sig/orb/models/invoice_line_item_create_params.rbs +10 -0
  203. data/sig/orb/models/invoice_line_item_create_response.rbs +132 -0
  204. data/sig/orb/models/invoice_list_params.rbs +27 -4
  205. data/sig/orb/models/invoice_mark_paid_params.rbs +7 -0
  206. data/sig/orb/models/invoice_pay_params.rbs +2 -0
  207. data/sig/orb/models/invoice_update_params.rbs +5 -0
  208. data/sig/orb/models/invoice_void_params.rbs +2 -0
  209. data/sig/orb/models/item.rbs +16 -4
  210. data/sig/orb/models/item_create_params.rbs +2 -0
  211. data/sig/orb/models/item_fetch_params.rbs +2 -0
  212. data/sig/orb/models/item_list_params.rbs +6 -0
  213. data/sig/orb/models/item_update_params.rbs +15 -4
  214. data/sig/orb/models/metric_create_params.rbs +9 -0
  215. data/sig/orb/models/metric_fetch_params.rbs +2 -0
  216. data/sig/orb/models/metric_list_params.rbs +10 -0
  217. data/sig/orb/models/metric_update_params.rbs +5 -0
  218. data/sig/orb/models/pagination_metadata.rbs +2 -0
  219. data/sig/orb/models/percentage_discount.rbs +11 -4
  220. data/sig/orb/models/plan.rbs +141 -16
  221. data/sig/orb/models/plan_create_params.rbs +1070 -304
  222. data/sig/orb/models/plan_fetch_params.rbs +2 -0
  223. data/sig/orb/models/plan_list_params.rbs +11 -0
  224. data/sig/orb/models/plan_update_params.rbs +6 -0
  225. data/sig/orb/models/plans/external_plan_id_fetch_params.rbs +2 -0
  226. data/sig/orb/models/plans/external_plan_id_update_params.rbs +6 -0
  227. data/sig/orb/models/price.rbs +2148 -460
  228. data/sig/orb/models/price_create_params.rbs +130 -8
  229. data/sig/orb/models/price_evaluate_params.rbs +10 -0
  230. data/sig/orb/models/price_evaluate_response.rbs +2 -0
  231. data/sig/orb/models/price_fetch_params.rbs +2 -0
  232. data/sig/orb/models/price_list_params.rbs +6 -0
  233. data/sig/orb/models/price_update_params.rbs +5 -0
  234. data/sig/orb/models/prices/external_price_id_fetch_params.rbs +2 -0
  235. data/sig/orb/models/prices/external_price_id_update_params.rbs +5 -0
  236. data/sig/orb/models/subscription.rbs +177 -12
  237. data/sig/orb/models/subscription_cancel_params.rbs +7 -0
  238. data/sig/orb/models/subscription_cancel_response.rbs +173 -0
  239. data/sig/orb/models/subscription_change_apply_params.rbs +6 -0
  240. data/sig/orb/models/subscription_change_apply_response.rbs +186 -0
  241. data/sig/orb/models/subscription_change_cancel_params.rbs +2 -0
  242. data/sig/orb/models/subscription_change_cancel_response.rbs +186 -0
  243. data/sig/orb/models/subscription_change_retrieve_params.rbs +2 -0
  244. data/sig/orb/models/subscription_change_retrieve_response.rbs +186 -0
  245. data/sig/orb/models/subscription_create_params.rbs +2368 -632
  246. data/sig/orb/models/subscription_create_response.rbs +173 -0
  247. data/sig/orb/models/subscription_fetch_costs_params.rbs +8 -0
  248. data/sig/orb/models/subscription_fetch_costs_response.rbs +20 -0
  249. data/sig/orb/models/subscription_fetch_params.rbs +2 -0
  250. data/sig/orb/models/subscription_fetch_schedule_params.rbs +10 -0
  251. data/sig/orb/models/subscription_fetch_schedule_response.rbs +13 -0
  252. data/sig/orb/models/subscription_fetch_usage_params.rbs +14 -0
  253. data/sig/orb/models/subscription_list_params.rbs +13 -0
  254. data/sig/orb/models/subscription_price_intervals_params.rbs +1348 -396
  255. data/sig/orb/models/subscription_price_intervals_response.rbs +173 -0
  256. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +2363 -632
  257. data/sig/orb/models/subscription_schedule_plan_change_response.rbs +173 -0
  258. data/sig/orb/models/subscription_trigger_phase_params.rbs +6 -0
  259. data/sig/orb/models/subscription_trigger_phase_response.rbs +173 -0
  260. data/sig/orb/models/subscription_unschedule_cancellation_params.rbs +2 -0
  261. data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +173 -0
  262. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs +2 -0
  263. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +173 -0
  264. data/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs +2 -0
  265. data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +173 -0
  266. data/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs +9 -0
  267. data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +173 -0
  268. data/sig/orb/models/subscription_update_params.rbs +9 -0
  269. data/sig/orb/models/subscription_update_trial_params.rbs +6 -0
  270. data/sig/orb/models/subscription_update_trial_response.rbs +173 -0
  271. data/sig/orb/models/subscription_usage.rbs +48 -8
  272. data/sig/orb/models/subscriptions.rbs +5 -0
  273. data/sig/orb/models/top_level_ping_params.rbs +2 -0
  274. data/sig/orb/models/top_level_ping_response.rbs +2 -0
  275. data/sig/orb/models/trial_discount.rbs +12 -4
  276. data/sig/orb/models/usage_discount.rbs +11 -4
  277. data/sig/orb/resources/invoices.rbs +1 -1
  278. data/sig/orb/resources/plans.rbs +1 -1
  279. metadata +2 -2
@@ -85,6 +85,28 @@ module Orb
85
85
  ?request_options: Orb::request_opts
86
86
  ) -> void
87
87
 
88
+ def to_hash: -> {
89
+ email: String,
90
+ name: String,
91
+ accounting_sync_configuration: Orb::CustomerCreateParams::AccountingSyncConfiguration?,
92
+ additional_emails: ::Array[String]?,
93
+ auto_collection: bool?,
94
+ billing_address: Orb::CustomerCreateParams::BillingAddress?,
95
+ currency: String?,
96
+ email_delivery: bool?,
97
+ external_customer_id: String?,
98
+ hierarchy: Orb::CustomerCreateParams::Hierarchy?,
99
+ metadata: ::Hash[Symbol, String?]?,
100
+ payment_provider: Orb::Models::CustomerCreateParams::payment_provider?,
101
+ payment_provider_id: String?,
102
+ reporting_configuration: Orb::CustomerCreateParams::ReportingConfiguration?,
103
+ shipping_address: Orb::CustomerCreateParams::ShippingAddress?,
104
+ tax_configuration: Orb::Models::CustomerCreateParams::tax_configuration?,
105
+ tax_id: Orb::CustomerCreateParams::TaxID?,
106
+ timezone: String?,
107
+ request_options: Orb::RequestOptions
108
+ }
109
+
88
110
  type accounting_sync_configuration =
89
111
  {
90
112
  accounting_providers: ::Array[Orb::CustomerCreateParams::AccountingSyncConfiguration::AccountingProvider]?,
@@ -101,6 +123,11 @@ module Orb
101
123
  ?excluded: bool?
102
124
  ) -> void
103
125
 
126
+ def to_hash: -> {
127
+ accounting_providers: ::Array[Orb::CustomerCreateParams::AccountingSyncConfiguration::AccountingProvider]?,
128
+ excluded: bool?
129
+ }
130
+
104
131
  type accounting_provider =
105
132
  { external_provider_id: String, provider_type: String }
106
133
 
@@ -113,6 +140,11 @@ module Orb
113
140
  external_provider_id: String,
114
141
  provider_type: String
115
142
  ) -> void
143
+
144
+ def to_hash: -> {
145
+ external_provider_id: String,
146
+ provider_type: String
147
+ }
116
148
  end
117
149
  end
118
150
 
@@ -147,6 +179,15 @@ module Orb
147
179
  ?postal_code: String?,
148
180
  ?state: String?
149
181
  ) -> void
182
+
183
+ def to_hash: -> {
184
+ city: String?,
185
+ country: String?,
186
+ :line1 => String?,
187
+ :line2 => String?,
188
+ postal_code: String?,
189
+ state: String?
190
+ }
150
191
  end
151
192
 
152
193
  type hierarchy =
@@ -163,6 +204,11 @@ module Orb
163
204
  ?child_customer_ids: ::Array[String],
164
205
  ?parent_customer_id: String?
165
206
  ) -> void
207
+
208
+ def to_hash: -> {
209
+ child_customer_ids: ::Array[String],
210
+ parent_customer_id: String?
211
+ }
166
212
  end
167
213
 
168
214
  type payment_provider =
@@ -186,6 +232,8 @@ module Orb
186
232
  attr_accessor exempt: bool
187
233
 
188
234
  def initialize: (exempt: bool) -> void
235
+
236
+ def to_hash: -> { exempt: bool }
189
237
  end
190
238
 
191
239
  type shipping_address =
@@ -219,6 +267,15 @@ module Orb
219
267
  ?postal_code: String?,
220
268
  ?state: String?
221
269
  ) -> void
270
+
271
+ def to_hash: -> {
272
+ city: String?,
273
+ country: String?,
274
+ :line1 => String?,
275
+ :line2 => String?,
276
+ postal_code: String?,
277
+ state: String?
278
+ }
222
279
  end
223
280
 
224
281
  type tax_configuration =
@@ -247,6 +304,12 @@ module Orb
247
304
  ?tax_exemption_code: String?,
248
305
  ?tax_provider: :avalara
249
306
  ) -> void
307
+
308
+ def to_hash: -> {
309
+ tax_exempt: bool,
310
+ tax_provider: :avalara,
311
+ tax_exemption_code: String?
312
+ }
250
313
  end
251
314
 
252
315
  type taxjar = { tax_exempt: bool, tax_provider: :taxjar }
@@ -257,6 +320,8 @@ module Orb
257
320
  attr_accessor tax_provider: :taxjar
258
321
 
259
322
  def initialize: (tax_exempt: bool, ?tax_provider: :taxjar) -> void
323
+
324
+ def to_hash: -> { tax_exempt: bool, tax_provider: :taxjar }
260
325
  end
261
326
 
262
327
  def self?.variants: -> ::Array[Orb::Models::CustomerCreateParams::tax_configuration]
@@ -264,24 +329,30 @@ module Orb
264
329
 
265
330
  type tax_id =
266
331
  {
267
- country: Orb::CustomerCreateParams::TaxID::country,
268
- type: Orb::CustomerCreateParams::TaxID::type_,
332
+ country: Orb::Models::CustomerCreateParams::TaxID::country,
333
+ type: Orb::Models::CustomerCreateParams::TaxID::type_,
269
334
  value: String
270
335
  }
271
336
 
272
337
  class TaxID < Orb::Internal::Type::BaseModel
273
- attr_accessor country: Orb::CustomerCreateParams::TaxID::country
338
+ attr_accessor country: Orb::Models::CustomerCreateParams::TaxID::country
274
339
 
275
- attr_accessor type: Orb::CustomerCreateParams::TaxID::type_
340
+ attr_accessor type: Orb::Models::CustomerCreateParams::TaxID::type_
276
341
 
277
342
  attr_accessor value: String
278
343
 
279
344
  def initialize: (
280
- country: Orb::CustomerCreateParams::TaxID::country,
281
- type: Orb::CustomerCreateParams::TaxID::type_,
345
+ country: Orb::Models::CustomerCreateParams::TaxID::country,
346
+ type: Orb::Models::CustomerCreateParams::TaxID::type_,
282
347
  value: String
283
348
  ) -> void
284
349
 
350
+ def to_hash: -> {
351
+ country: Orb::Models::CustomerCreateParams::TaxID::country,
352
+ type: Orb::Models::CustomerCreateParams::TaxID::type_,
353
+ value: String
354
+ }
355
+
285
356
  type country =
286
357
  :AD
287
358
  | :AE
@@ -444,7 +515,7 @@ module Orb
444
515
  VN: :VN
445
516
  ZA: :ZA
446
517
 
447
- def self?.values: -> ::Array[Orb::CustomerCreateParams::TaxID::country]
518
+ def self?.values: -> ::Array[Orb::Models::CustomerCreateParams::TaxID::country]
448
519
  end
449
520
 
450
521
  type type_ =
@@ -595,7 +666,7 @@ module Orb
595
666
  VN_TIN: :vn_tin
596
667
  ZA_VAT: :za_vat
597
668
 
598
- def self?.values: -> ::Array[Orb::CustomerCreateParams::TaxID::type_]
669
+ def self?.values: -> ::Array[Orb::Models::CustomerCreateParams::TaxID::type_]
599
670
  end
600
671
  end
601
672
  end
@@ -7,6 +7,8 @@ module Orb
7
7
  include Orb::Internal::Type::RequestParameters
8
8
 
9
9
  def initialize: (?request_options: Orb::request_opts) -> void
10
+
11
+ def to_hash: -> { request_options: Orb::RequestOptions }
10
12
  end
11
13
  end
12
14
  end
@@ -8,6 +8,8 @@ module Orb
8
8
  include Orb::Internal::Type::RequestParameters
9
9
 
10
10
  def initialize: (?request_options: Orb::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: Orb::RequestOptions }
11
13
  end
12
14
  end
13
15
  end
@@ -7,6 +7,8 @@ module Orb
7
7
  include Orb::Internal::Type::RequestParameters
8
8
 
9
9
  def initialize: (?request_options: Orb::request_opts) -> void
10
+
11
+ def to_hash: -> { request_options: Orb::RequestOptions }
10
12
  end
11
13
  end
12
14
  end
@@ -38,6 +38,16 @@ module Orb
38
38
  ?limit: Integer,
39
39
  ?request_options: Orb::request_opts
40
40
  ) -> void
41
+
42
+ def to_hash: -> {
43
+ created_at_gt: Time?,
44
+ created_at_gte: Time?,
45
+ created_at_lt: Time?,
46
+ created_at_lte: Time?,
47
+ cursor: String?,
48
+ limit: Integer,
49
+ request_options: Orb::RequestOptions
50
+ }
41
51
  end
42
52
  end
43
53
  end
@@ -8,6 +8,8 @@ module Orb
8
8
  include Orb::Internal::Type::RequestParameters
9
9
 
10
10
  def initialize: (?request_options: Orb::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: Orb::RequestOptions }
11
13
  end
12
14
  end
13
15
  end
@@ -8,6 +8,8 @@ module Orb
8
8
  include Orb::Internal::Type::RequestParameters
9
9
 
10
10
  def initialize: (?request_options: Orb::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: Orb::RequestOptions }
11
13
  end
12
14
  end
13
15
  end
@@ -81,6 +81,27 @@ module Orb
81
81
  ?request_options: Orb::request_opts
82
82
  ) -> void
83
83
 
84
+ def to_hash: -> {
85
+ accounting_sync_configuration: Orb::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration?,
86
+ additional_emails: ::Array[String]?,
87
+ auto_collection: bool?,
88
+ billing_address: Orb::CustomerUpdateByExternalIDParams::BillingAddress?,
89
+ currency: String?,
90
+ email: String?,
91
+ email_delivery: bool?,
92
+ external_customer_id: String?,
93
+ hierarchy: Orb::CustomerUpdateByExternalIDParams::Hierarchy?,
94
+ metadata: ::Hash[Symbol, String?]?,
95
+ name: String?,
96
+ payment_provider: Orb::Models::CustomerUpdateByExternalIDParams::payment_provider?,
97
+ payment_provider_id: String?,
98
+ reporting_configuration: Orb::CustomerUpdateByExternalIDParams::ReportingConfiguration?,
99
+ shipping_address: Orb::CustomerUpdateByExternalIDParams::ShippingAddress?,
100
+ tax_configuration: Orb::Models::CustomerUpdateByExternalIDParams::tax_configuration?,
101
+ tax_id: Orb::CustomerUpdateByExternalIDParams::TaxID?,
102
+ request_options: Orb::RequestOptions
103
+ }
104
+
84
105
  type accounting_sync_configuration =
85
106
  {
86
107
  accounting_providers: ::Array[Orb::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration::AccountingProvider]?,
@@ -97,6 +118,11 @@ module Orb
97
118
  ?excluded: bool?
98
119
  ) -> void
99
120
 
121
+ def to_hash: -> {
122
+ accounting_providers: ::Array[Orb::CustomerUpdateByExternalIDParams::AccountingSyncConfiguration::AccountingProvider]?,
123
+ excluded: bool?
124
+ }
125
+
100
126
  type accounting_provider =
101
127
  { external_provider_id: String, provider_type: String }
102
128
 
@@ -109,6 +135,11 @@ module Orb
109
135
  external_provider_id: String,
110
136
  provider_type: String
111
137
  ) -> void
138
+
139
+ def to_hash: -> {
140
+ external_provider_id: String,
141
+ provider_type: String
142
+ }
112
143
  end
113
144
  end
114
145
 
@@ -143,6 +174,15 @@ module Orb
143
174
  ?postal_code: String?,
144
175
  ?state: String?
145
176
  ) -> void
177
+
178
+ def to_hash: -> {
179
+ city: String?,
180
+ country: String?,
181
+ :line1 => String?,
182
+ :line2 => String?,
183
+ postal_code: String?,
184
+ state: String?
185
+ }
146
186
  end
147
187
 
148
188
  type hierarchy =
@@ -159,6 +199,11 @@ module Orb
159
199
  ?child_customer_ids: ::Array[String],
160
200
  ?parent_customer_id: String?
161
201
  ) -> void
202
+
203
+ def to_hash: -> {
204
+ child_customer_ids: ::Array[String],
205
+ parent_customer_id: String?
206
+ }
162
207
  end
163
208
 
164
209
  type payment_provider =
@@ -182,6 +227,8 @@ module Orb
182
227
  attr_accessor exempt: bool
183
228
 
184
229
  def initialize: (exempt: bool) -> void
230
+
231
+ def to_hash: -> { exempt: bool }
185
232
  end
186
233
 
187
234
  type shipping_address =
@@ -215,6 +262,15 @@ module Orb
215
262
  ?postal_code: String?,
216
263
  ?state: String?
217
264
  ) -> void
265
+
266
+ def to_hash: -> {
267
+ city: String?,
268
+ country: String?,
269
+ :line1 => String?,
270
+ :line2 => String?,
271
+ postal_code: String?,
272
+ state: String?
273
+ }
218
274
  end
219
275
 
220
276
  type tax_configuration =
@@ -243,6 +299,12 @@ module Orb
243
299
  ?tax_exemption_code: String?,
244
300
  ?tax_provider: :avalara
245
301
  ) -> void
302
+
303
+ def to_hash: -> {
304
+ tax_exempt: bool,
305
+ tax_provider: :avalara,
306
+ tax_exemption_code: String?
307
+ }
246
308
  end
247
309
 
248
310
  type taxjar = { tax_exempt: bool, tax_provider: :taxjar }
@@ -253,6 +315,8 @@ module Orb
253
315
  attr_accessor tax_provider: :taxjar
254
316
 
255
317
  def initialize: (tax_exempt: bool, ?tax_provider: :taxjar) -> void
318
+
319
+ def to_hash: -> { tax_exempt: bool, tax_provider: :taxjar }
256
320
  end
257
321
 
258
322
  def self?.variants: -> ::Array[Orb::Models::CustomerUpdateByExternalIDParams::tax_configuration]
@@ -260,24 +324,30 @@ module Orb
260
324
 
261
325
  type tax_id =
262
326
  {
263
- country: Orb::CustomerUpdateByExternalIDParams::TaxID::country,
264
- type: Orb::CustomerUpdateByExternalIDParams::TaxID::type_,
327
+ country: Orb::Models::CustomerUpdateByExternalIDParams::TaxID::country,
328
+ type: Orb::Models::CustomerUpdateByExternalIDParams::TaxID::type_,
265
329
  value: String
266
330
  }
267
331
 
268
332
  class TaxID < Orb::Internal::Type::BaseModel
269
- attr_accessor country: Orb::CustomerUpdateByExternalIDParams::TaxID::country
333
+ attr_accessor country: Orb::Models::CustomerUpdateByExternalIDParams::TaxID::country
270
334
 
271
- attr_accessor type: Orb::CustomerUpdateByExternalIDParams::TaxID::type_
335
+ attr_accessor type: Orb::Models::CustomerUpdateByExternalIDParams::TaxID::type_
272
336
 
273
337
  attr_accessor value: String
274
338
 
275
339
  def initialize: (
276
- country: Orb::CustomerUpdateByExternalIDParams::TaxID::country,
277
- type: Orb::CustomerUpdateByExternalIDParams::TaxID::type_,
340
+ country: Orb::Models::CustomerUpdateByExternalIDParams::TaxID::country,
341
+ type: Orb::Models::CustomerUpdateByExternalIDParams::TaxID::type_,
278
342
  value: String
279
343
  ) -> void
280
344
 
345
+ def to_hash: -> {
346
+ country: Orb::Models::CustomerUpdateByExternalIDParams::TaxID::country,
347
+ type: Orb::Models::CustomerUpdateByExternalIDParams::TaxID::type_,
348
+ value: String
349
+ }
350
+
281
351
  type country =
282
352
  :AD
283
353
  | :AE
@@ -440,7 +510,7 @@ module Orb
440
510
  VN: :VN
441
511
  ZA: :ZA
442
512
 
443
- def self?.values: -> ::Array[Orb::CustomerUpdateByExternalIDParams::TaxID::country]
513
+ def self?.values: -> ::Array[Orb::Models::CustomerUpdateByExternalIDParams::TaxID::country]
444
514
  end
445
515
 
446
516
  type type_ =
@@ -591,7 +661,7 @@ module Orb
591
661
  VN_TIN: :vn_tin
592
662
  ZA_VAT: :za_vat
593
663
 
594
- def self?.values: -> ::Array[Orb::CustomerUpdateByExternalIDParams::TaxID::type_]
664
+ def self?.values: -> ::Array[Orb::Models::CustomerUpdateByExternalIDParams::TaxID::type_]
595
665
  end
596
666
  end
597
667
  end
@@ -81,6 +81,27 @@ module Orb
81
81
  ?request_options: Orb::request_opts
82
82
  ) -> void
83
83
 
84
+ def to_hash: -> {
85
+ accounting_sync_configuration: Orb::CustomerUpdateParams::AccountingSyncConfiguration?,
86
+ additional_emails: ::Array[String]?,
87
+ auto_collection: bool?,
88
+ billing_address: Orb::CustomerUpdateParams::BillingAddress?,
89
+ currency: String?,
90
+ email: String?,
91
+ email_delivery: bool?,
92
+ external_customer_id: String?,
93
+ hierarchy: Orb::CustomerUpdateParams::Hierarchy?,
94
+ metadata: ::Hash[Symbol, String?]?,
95
+ name: String?,
96
+ payment_provider: Orb::Models::CustomerUpdateParams::payment_provider?,
97
+ payment_provider_id: String?,
98
+ reporting_configuration: Orb::CustomerUpdateParams::ReportingConfiguration?,
99
+ shipping_address: Orb::CustomerUpdateParams::ShippingAddress?,
100
+ tax_configuration: Orb::Models::CustomerUpdateParams::tax_configuration?,
101
+ tax_id: Orb::CustomerUpdateParams::TaxID?,
102
+ request_options: Orb::RequestOptions
103
+ }
104
+
84
105
  type accounting_sync_configuration =
85
106
  {
86
107
  accounting_providers: ::Array[Orb::CustomerUpdateParams::AccountingSyncConfiguration::AccountingProvider]?,
@@ -97,6 +118,11 @@ module Orb
97
118
  ?excluded: bool?
98
119
  ) -> void
99
120
 
121
+ def to_hash: -> {
122
+ accounting_providers: ::Array[Orb::CustomerUpdateParams::AccountingSyncConfiguration::AccountingProvider]?,
123
+ excluded: bool?
124
+ }
125
+
100
126
  type accounting_provider =
101
127
  { external_provider_id: String, provider_type: String }
102
128
 
@@ -109,6 +135,11 @@ module Orb
109
135
  external_provider_id: String,
110
136
  provider_type: String
111
137
  ) -> void
138
+
139
+ def to_hash: -> {
140
+ external_provider_id: String,
141
+ provider_type: String
142
+ }
112
143
  end
113
144
  end
114
145
 
@@ -143,6 +174,15 @@ module Orb
143
174
  ?postal_code: String?,
144
175
  ?state: String?
145
176
  ) -> void
177
+
178
+ def to_hash: -> {
179
+ city: String?,
180
+ country: String?,
181
+ :line1 => String?,
182
+ :line2 => String?,
183
+ postal_code: String?,
184
+ state: String?
185
+ }
146
186
  end
147
187
 
148
188
  type hierarchy =
@@ -159,6 +199,11 @@ module Orb
159
199
  ?child_customer_ids: ::Array[String],
160
200
  ?parent_customer_id: String?
161
201
  ) -> void
202
+
203
+ def to_hash: -> {
204
+ child_customer_ids: ::Array[String],
205
+ parent_customer_id: String?
206
+ }
162
207
  end
163
208
 
164
209
  type payment_provider =
@@ -182,6 +227,8 @@ module Orb
182
227
  attr_accessor exempt: bool
183
228
 
184
229
  def initialize: (exempt: bool) -> void
230
+
231
+ def to_hash: -> { exempt: bool }
185
232
  end
186
233
 
187
234
  type shipping_address =
@@ -215,6 +262,15 @@ module Orb
215
262
  ?postal_code: String?,
216
263
  ?state: String?
217
264
  ) -> void
265
+
266
+ def to_hash: -> {
267
+ city: String?,
268
+ country: String?,
269
+ :line1 => String?,
270
+ :line2 => String?,
271
+ postal_code: String?,
272
+ state: String?
273
+ }
218
274
  end
219
275
 
220
276
  type tax_configuration =
@@ -243,6 +299,12 @@ module Orb
243
299
  ?tax_exemption_code: String?,
244
300
  ?tax_provider: :avalara
245
301
  ) -> void
302
+
303
+ def to_hash: -> {
304
+ tax_exempt: bool,
305
+ tax_provider: :avalara,
306
+ tax_exemption_code: String?
307
+ }
246
308
  end
247
309
 
248
310
  type taxjar = { tax_exempt: bool, tax_provider: :taxjar }
@@ -253,6 +315,8 @@ module Orb
253
315
  attr_accessor tax_provider: :taxjar
254
316
 
255
317
  def initialize: (tax_exempt: bool, ?tax_provider: :taxjar) -> void
318
+
319
+ def to_hash: -> { tax_exempt: bool, tax_provider: :taxjar }
256
320
  end
257
321
 
258
322
  def self?.variants: -> ::Array[Orb::Models::CustomerUpdateParams::tax_configuration]
@@ -260,24 +324,30 @@ module Orb
260
324
 
261
325
  type tax_id =
262
326
  {
263
- country: Orb::CustomerUpdateParams::TaxID::country,
264
- type: Orb::CustomerUpdateParams::TaxID::type_,
327
+ country: Orb::Models::CustomerUpdateParams::TaxID::country,
328
+ type: Orb::Models::CustomerUpdateParams::TaxID::type_,
265
329
  value: String
266
330
  }
267
331
 
268
332
  class TaxID < Orb::Internal::Type::BaseModel
269
- attr_accessor country: Orb::CustomerUpdateParams::TaxID::country
333
+ attr_accessor country: Orb::Models::CustomerUpdateParams::TaxID::country
270
334
 
271
- attr_accessor type: Orb::CustomerUpdateParams::TaxID::type_
335
+ attr_accessor type: Orb::Models::CustomerUpdateParams::TaxID::type_
272
336
 
273
337
  attr_accessor value: String
274
338
 
275
339
  def initialize: (
276
- country: Orb::CustomerUpdateParams::TaxID::country,
277
- type: Orb::CustomerUpdateParams::TaxID::type_,
340
+ country: Orb::Models::CustomerUpdateParams::TaxID::country,
341
+ type: Orb::Models::CustomerUpdateParams::TaxID::type_,
278
342
  value: String
279
343
  ) -> void
280
344
 
345
+ def to_hash: -> {
346
+ country: Orb::Models::CustomerUpdateParams::TaxID::country,
347
+ type: Orb::Models::CustomerUpdateParams::TaxID::type_,
348
+ value: String
349
+ }
350
+
281
351
  type country =
282
352
  :AD
283
353
  | :AE
@@ -440,7 +510,7 @@ module Orb
440
510
  VN: :VN
441
511
  ZA: :ZA
442
512
 
443
- def self?.values: -> ::Array[Orb::CustomerUpdateParams::TaxID::country]
513
+ def self?.values: -> ::Array[Orb::Models::CustomerUpdateParams::TaxID::country]
444
514
  end
445
515
 
446
516
  type type_ =
@@ -591,7 +661,7 @@ module Orb
591
661
  VN_TIN: :vn_tin
592
662
  ZA_VAT: :za_vat
593
663
 
594
- def self?.values: -> ::Array[Orb::CustomerUpdateParams::TaxID::type_]
664
+ def self?.values: -> ::Array[Orb::Models::CustomerUpdateParams::TaxID::type_]
595
665
  end
596
666
  end
597
667
  end
@@ -26,6 +26,13 @@ module Orb
26
26
  ?request_options: Orb::request_opts
27
27
  ) -> void
28
28
 
29
+ def to_hash: -> {
30
+ amount: String,
31
+ type: Orb::Models::Customers::BalanceTransactionCreateParams::type_,
32
+ description: String?,
33
+ request_options: Orb::RequestOptions
34
+ }
35
+
29
36
  type type_ = :increment | :decrement
30
37
 
31
38
  module Type
@@ -49,6 +49,19 @@ module Orb
49
49
  type: Orb::Models::Customers::BalanceTransactionCreateResponse::type_
50
50
  ) -> void
51
51
 
52
+ def to_hash: -> {
53
+ id: String,
54
+ action: Orb::Models::Customers::BalanceTransactionCreateResponse::action,
55
+ amount: String,
56
+ created_at: Time,
57
+ credit_note: Orb::Models::Customers::BalanceTransactionCreateResponse::CreditNote?,
58
+ description: String?,
59
+ ending_balance: String,
60
+ invoice: Orb::Models::Customers::BalanceTransactionCreateResponse::Invoice?,
61
+ starting_balance: String,
62
+ type: Orb::Models::Customers::BalanceTransactionCreateResponse::type_
63
+ }
64
+
52
65
  type action =
53
66
  :applied_to_invoice
54
67
  | :manual_adjustment
@@ -82,6 +95,8 @@ module Orb
82
95
  attr_accessor id: String
83
96
 
84
97
  def initialize: (id: String) -> void
98
+
99
+ def to_hash: -> { id: String }
85
100
  end
86
101
 
87
102
  type invoice = { id: String }
@@ -90,6 +105,8 @@ module Orb
90
105
  attr_accessor id: String
91
106
 
92
107
  def initialize: (id: String) -> void
108
+
109
+ def to_hash: -> { id: String }
93
110
  end
94
111
 
95
112
  type type_ = :increment | :decrement
@@ -39,6 +39,16 @@ module Orb
39
39
  ?operation_time_lte: Time?,
40
40
  ?request_options: Orb::request_opts
41
41
  ) -> void
42
+
43
+ def to_hash: -> {
44
+ cursor: String?,
45
+ limit: Integer,
46
+ operation_time_gt: Time?,
47
+ operation_time_gte: Time?,
48
+ operation_time_lt: Time?,
49
+ operation_time_lte: Time?,
50
+ request_options: Orb::RequestOptions
51
+ }
42
52
  end
43
53
  end
44
54
  end