orb-billing 0.1.0.pre.alpha.33

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 (635) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +169 -0
  3. data/lib/orb/client.rb +129 -0
  4. data/lib/orb/errors.rb +317 -0
  5. data/lib/orb/models/alert.rb +225 -0
  6. data/lib/orb/models/alert_create_for_customer_params.rb +77 -0
  7. data/lib/orb/models/alert_create_for_external_customer_params.rb +77 -0
  8. data/lib/orb/models/alert_create_for_subscription_params.rb +74 -0
  9. data/lib/orb/models/alert_disable_params.rb +26 -0
  10. data/lib/orb/models/alert_enable_params.rb +26 -0
  11. data/lib/orb/models/alert_list_params.rb +97 -0
  12. data/lib/orb/models/alert_retrieve_params.rb +19 -0
  13. data/lib/orb/models/alert_update_params.rb +46 -0
  14. data/lib/orb/models/amount_discount.rb +53 -0
  15. data/lib/orb/models/billable_metric.rb +76 -0
  16. data/lib/orb/models/billing_cycle_relative_date.rb +18 -0
  17. data/lib/orb/models/coupon.rb +86 -0
  18. data/lib/orb/models/coupon_archive_params.rb +19 -0
  19. data/lib/orb/models/coupon_create_params.rb +102 -0
  20. data/lib/orb/models/coupon_fetch_params.rb +19 -0
  21. data/lib/orb/models/coupon_list_params.rb +53 -0
  22. data/lib/orb/models/coupons/subscription_list_params.rb +40 -0
  23. data/lib/orb/models/credit_note.rb +522 -0
  24. data/lib/orb/models/credit_note_create_params.rb +77 -0
  25. data/lib/orb/models/credit_note_fetch_params.rb +19 -0
  26. data/lib/orb/models/credit_note_list_params.rb +73 -0
  27. data/lib/orb/models/customer.rb +872 -0
  28. data/lib/orb/models/customer_create_params.rb +843 -0
  29. data/lib/orb/models/customer_delete_params.rb +19 -0
  30. data/lib/orb/models/customer_fetch_by_external_id_params.rb +19 -0
  31. data/lib/orb/models/customer_fetch_params.rb +19 -0
  32. data/lib/orb/models/customer_list_params.rb +73 -0
  33. data/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rb +19 -0
  34. data/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rb +19 -0
  35. data/lib/orb/models/customer_update_by_external_id_params.rb +848 -0
  36. data/lib/orb/models/customer_update_params.rb +838 -0
  37. data/lib/orb/models/customers/balance_transaction_create_params.rb +53 -0
  38. data/lib/orb/models/customers/balance_transaction_create_response.rb +167 -0
  39. data/lib/orb/models/customers/balance_transaction_list_params.rb +75 -0
  40. data/lib/orb/models/customers/balance_transaction_list_response.rb +167 -0
  41. data/lib/orb/models/customers/cost_list_by_external_id_params.rb +69 -0
  42. data/lib/orb/models/customers/cost_list_by_external_id_response.rb +106 -0
  43. data/lib/orb/models/customers/cost_list_params.rb +69 -0
  44. data/lib/orb/models/customers/cost_list_response.rb +106 -0
  45. data/lib/orb/models/customers/credit_list_by_external_id_params.rb +59 -0
  46. data/lib/orb/models/customers/credit_list_by_external_id_response.rb +72 -0
  47. data/lib/orb/models/customers/credit_list_params.rb +59 -0
  48. data/lib/orb/models/customers/credit_list_response.rb +72 -0
  49. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +215 -0
  50. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +1311 -0
  51. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +214 -0
  52. data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +1310 -0
  53. data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +141 -0
  54. data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +1310 -0
  55. data/lib/orb/models/customers/credits/ledger_list_params.rb +141 -0
  56. data/lib/orb/models/customers/credits/ledger_list_response.rb +1306 -0
  57. data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +159 -0
  58. data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +154 -0
  59. data/lib/orb/models/customers/credits/top_up_create_params.rb +158 -0
  60. data/lib/orb/models/customers/credits/top_up_create_response.rb +153 -0
  61. data/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rb +29 -0
  62. data/lib/orb/models/customers/credits/top_up_delete_params.rb +29 -0
  63. data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +42 -0
  64. data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +154 -0
  65. data/lib/orb/models/customers/credits/top_up_list_params.rb +42 -0
  66. data/lib/orb/models/customers/credits/top_up_list_response.rb +153 -0
  67. data/lib/orb/models/dimensional_price_group.rb +64 -0
  68. data/lib/orb/models/dimensional_price_group_create_params.rb +63 -0
  69. data/lib/orb/models/dimensional_price_group_list_params.rb +38 -0
  70. data/lib/orb/models/dimensional_price_group_retrieve_params.rb +19 -0
  71. data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rb +21 -0
  72. data/lib/orb/models/dimensional_price_groups.rb +25 -0
  73. data/lib/orb/models/discount.rb +23 -0
  74. data/lib/orb/models/evaluate_price_group.rb +48 -0
  75. data/lib/orb/models/event_deprecate_params.rb +19 -0
  76. data/lib/orb/models/event_deprecate_response.rb +21 -0
  77. data/lib/orb/models/event_ingest_params.rb +100 -0
  78. data/lib/orb/models/event_ingest_response.rb +77 -0
  79. data/lib/orb/models/event_search_params.rb +45 -0
  80. data/lib/orb/models/event_search_response.rb +87 -0
  81. data/lib/orb/models/event_update_params.rb +58 -0
  82. data/lib/orb/models/event_update_response.rb +21 -0
  83. data/lib/orb/models/events/backfill_close_params.rb +21 -0
  84. data/lib/orb/models/events/backfill_close_response.rb +131 -0
  85. data/lib/orb/models/events/backfill_create_params.rb +97 -0
  86. data/lib/orb/models/events/backfill_create_response.rb +131 -0
  87. data/lib/orb/models/events/backfill_fetch_params.rb +21 -0
  88. data/lib/orb/models/events/backfill_fetch_response.rb +131 -0
  89. data/lib/orb/models/events/backfill_list_params.rb +40 -0
  90. data/lib/orb/models/events/backfill_list_response.rb +131 -0
  91. data/lib/orb/models/events/backfill_revert_params.rb +21 -0
  92. data/lib/orb/models/events/backfill_revert_response.rb +131 -0
  93. data/lib/orb/models/events/event_volumes.rb +54 -0
  94. data/lib/orb/models/events/volume_list_params.rb +64 -0
  95. data/lib/orb/models/invoice.rb +2218 -0
  96. data/lib/orb/models/invoice_create_params.rb +200 -0
  97. data/lib/orb/models/invoice_fetch_params.rb +19 -0
  98. data/lib/orb/models/invoice_fetch_upcoming_params.rb +25 -0
  99. data/lib/orb/models/invoice_fetch_upcoming_response.rb +2226 -0
  100. data/lib/orb/models/invoice_issue_params.rb +34 -0
  101. data/lib/orb/models/invoice_level_discount.rb +21 -0
  102. data/lib/orb/models/invoice_line_item_create_params.rb +62 -0
  103. data/lib/orb/models/invoice_line_item_create_response.rb +929 -0
  104. data/lib/orb/models/invoice_list_params.rb +197 -0
  105. data/lib/orb/models/invoice_mark_paid_params.rb +40 -0
  106. data/lib/orb/models/invoice_pay_params.rb +19 -0
  107. data/lib/orb/models/invoice_update_params.rb +28 -0
  108. data/lib/orb/models/invoice_void_params.rb +19 -0
  109. data/lib/orb/models/item.rb +82 -0
  110. data/lib/orb/models/item_create_params.rb +26 -0
  111. data/lib/orb/models/item_fetch_params.rb +19 -0
  112. data/lib/orb/models/item_list_params.rb +38 -0
  113. data/lib/orb/models/item_update_params.rb +73 -0
  114. data/lib/orb/models/metric_create_params.rb +56 -0
  115. data/lib/orb/models/metric_fetch_params.rb +19 -0
  116. data/lib/orb/models/metric_list_params.rb +73 -0
  117. data/lib/orb/models/metric_update_params.rb +28 -0
  118. data/lib/orb/models/pagination_metadata.rb +25 -0
  119. data/lib/orb/models/percentage_discount.rb +54 -0
  120. data/lib/orb/models/plan.rb +894 -0
  121. data/lib/orb/models/plan_create_params.rb +6702 -0
  122. data/lib/orb/models/plan_fetch_params.rb +19 -0
  123. data/lib/orb/models/plan_list_params.rb +100 -0
  124. data/lib/orb/models/plan_update_params.rb +37 -0
  125. data/lib/orb/models/plans/external_plan_id_fetch_params.rb +21 -0
  126. data/lib/orb/models/plans/external_plan_id_update_params.rb +39 -0
  127. data/lib/orb/models/price.rb +12229 -0
  128. data/lib/orb/models/price_create_params.rb +808 -0
  129. data/lib/orb/models/price_evaluate_params.rb +80 -0
  130. data/lib/orb/models/price_evaluate_response.rb +20 -0
  131. data/lib/orb/models/price_fetch_params.rb +19 -0
  132. data/lib/orb/models/price_list_params.rb +38 -0
  133. data/lib/orb/models/price_update_params.rb +28 -0
  134. data/lib/orb/models/prices/external_price_id_fetch_params.rb +21 -0
  135. data/lib/orb/models/prices/external_price_id_update_params.rb +30 -0
  136. data/lib/orb/models/subscription.rb +1233 -0
  137. data/lib/orb/models/subscription_cancel_params.rb +58 -0
  138. data/lib/orb/models/subscription_cancel_response.rb +1217 -0
  139. data/lib/orb/models/subscription_create_params.rb +15065 -0
  140. data/lib/orb/models/subscription_create_response.rb +1217 -0
  141. data/lib/orb/models/subscription_fetch_costs_params.rb +67 -0
  142. data/lib/orb/models/subscription_fetch_costs_response.rb +104 -0
  143. data/lib/orb/models/subscription_fetch_params.rb +19 -0
  144. data/lib/orb/models/subscription_fetch_schedule_params.rb +73 -0
  145. data/lib/orb/models/subscription_fetch_schedule_response.rb +68 -0
  146. data/lib/orb/models/subscription_fetch_usage_params.rb +135 -0
  147. data/lib/orb/models/subscription_list_params.rb +108 -0
  148. data/lib/orb/models/subscription_price_intervals_params.rb +8358 -0
  149. data/lib/orb/models/subscription_price_intervals_response.rb +1224 -0
  150. data/lib/orb/models/subscription_schedule_plan_change_params.rb +15088 -0
  151. data/lib/orb/models/subscription_schedule_plan_change_response.rb +1224 -0
  152. data/lib/orb/models/subscription_trigger_phase_params.rb +36 -0
  153. data/lib/orb/models/subscription_trigger_phase_response.rb +1224 -0
  154. data/lib/orb/models/subscription_unschedule_cancellation_params.rb +19 -0
  155. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +1224 -0
  156. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rb +26 -0
  157. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +1228 -0
  158. data/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb +19 -0
  159. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +1224 -0
  160. data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +90 -0
  161. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +1224 -0
  162. data/lib/orb/models/subscription_update_params.rb +74 -0
  163. data/lib/orb/models/subscription_update_trial_params.rb +59 -0
  164. data/lib/orb/models/subscription_update_trial_response.rb +1222 -0
  165. data/lib/orb/models/subscription_usage.rb +258 -0
  166. data/lib/orb/models/subscriptions.rb +25 -0
  167. data/lib/orb/models/top_level_ping_params.rb +19 -0
  168. data/lib/orb/models/top_level_ping_response.rb +20 -0
  169. data/lib/orb/models/trial_discount.rb +69 -0
  170. data/lib/orb/models/usage_discount.rb +54 -0
  171. data/lib/orb/page.rb +114 -0
  172. data/lib/orb/request_options.rb +75 -0
  173. data/lib/orb/resources/alerts.rb +239 -0
  174. data/lib/orb/resources/coupons/subscriptions.rb +43 -0
  175. data/lib/orb/resources/coupons.rb +115 -0
  176. data/lib/orb/resources/credit_notes.rb +87 -0
  177. data/lib/orb/resources/customers/balance_transactions.rb +96 -0
  178. data/lib/orb/resources/customers/costs.rb +298 -0
  179. data/lib/orb/resources/customers/credits/ledger.rb +527 -0
  180. data/lib/orb/resources/customers/credits/top_ups.rb +192 -0
  181. data/lib/orb/resources/customers/credits.rb +88 -0
  182. data/lib/orb/resources/customers.rb +321 -0
  183. data/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rb +38 -0
  184. data/lib/orb/resources/dimensional_price_groups.rb +93 -0
  185. data/lib/orb/resources/events/backfills.rb +174 -0
  186. data/lib/orb/resources/events/volume.rb +52 -0
  187. data/lib/orb/resources/events.rb +415 -0
  188. data/lib/orb/resources/invoice_line_items.rb +41 -0
  189. data/lib/orb/resources/invoices.rb +266 -0
  190. data/lib/orb/resources/items.rb +95 -0
  191. data/lib/orb/resources/metrics.rb +114 -0
  192. data/lib/orb/resources/plans/external_plan_id.rb +76 -0
  193. data/lib/orb/resources/plans.rb +133 -0
  194. data/lib/orb/resources/prices/external_price_id.rb +61 -0
  195. data/lib/orb/resources/prices.rb +197 -0
  196. data/lib/orb/resources/subscriptions.rb +1278 -0
  197. data/lib/orb/resources/top_level.rb +37 -0
  198. data/lib/orb/transport/base_client.rb +459 -0
  199. data/lib/orb/transport/pooled_net_requester.rb +182 -0
  200. data/lib/orb/type/array_of.rb +112 -0
  201. data/lib/orb/type/base_model.rb +367 -0
  202. data/lib/orb/type/base_page.rb +61 -0
  203. data/lib/orb/type/boolean_model.rb +52 -0
  204. data/lib/orb/type/converter.rb +217 -0
  205. data/lib/orb/type/enum.rb +101 -0
  206. data/lib/orb/type/hash_of.rb +132 -0
  207. data/lib/orb/type/request_parameters.rb +38 -0
  208. data/lib/orb/type/union.rb +225 -0
  209. data/lib/orb/type/unknown.rb +56 -0
  210. data/lib/orb/type.rb +23 -0
  211. data/lib/orb/util.rb +722 -0
  212. data/lib/orb/version.rb +5 -0
  213. data/lib/orb.rb +247 -0
  214. data/manifest.yaml +15 -0
  215. data/rbi/lib/orb/client.rbi +90 -0
  216. data/rbi/lib/orb/errors.rbi +246 -0
  217. data/rbi/lib/orb/models/alert.rbi +239 -0
  218. data/rbi/lib/orb/models/alert_create_for_customer_params.rbi +86 -0
  219. data/rbi/lib/orb/models/alert_create_for_external_customer_params.rbi +88 -0
  220. data/rbi/lib/orb/models/alert_create_for_subscription_params.rbi +83 -0
  221. data/rbi/lib/orb/models/alert_disable_params.rbi +28 -0
  222. data/rbi/lib/orb/models/alert_enable_params.rbi +28 -0
  223. data/rbi/lib/orb/models/alert_list_params.rbi +95 -0
  224. data/rbi/lib/orb/models/alert_retrieve_params.rbi +20 -0
  225. data/rbi/lib/orb/models/alert_update_params.rbi +51 -0
  226. data/rbi/lib/orb/models/amount_discount.rbi +62 -0
  227. data/rbi/lib/orb/models/billable_metric.rbi +83 -0
  228. data/rbi/lib/orb/models/billing_cycle_relative_date.rbi +19 -0
  229. data/rbi/lib/orb/models/coupon.rbi +90 -0
  230. data/rbi/lib/orb/models/coupon_archive_params.rbi +20 -0
  231. data/rbi/lib/orb/models/coupon_create_params.rbi +120 -0
  232. data/rbi/lib/orb/models/coupon_fetch_params.rbi +20 -0
  233. data/rbi/lib/orb/models/coupon_list_params.rbi +59 -0
  234. data/rbi/lib/orb/models/coupons/subscription_list_params.rbi +41 -0
  235. data/rbi/lib/orb/models/credit_note.rbi +546 -0
  236. data/rbi/lib/orb/models/credit_note_create_params.rbi +84 -0
  237. data/rbi/lib/orb/models/credit_note_fetch_params.rbi +20 -0
  238. data/rbi/lib/orb/models/credit_note_list_params.rbi +74 -0
  239. data/rbi/lib/orb/models/customer.rbi +941 -0
  240. data/rbi/lib/orb/models/customer_create_params.rbi +923 -0
  241. data/rbi/lib/orb/models/customer_delete_params.rbi +20 -0
  242. data/rbi/lib/orb/models/customer_fetch_by_external_id_params.rbi +20 -0
  243. data/rbi/lib/orb/models/customer_fetch_params.rbi +20 -0
  244. data/rbi/lib/orb/models/customer_list_params.rbi +74 -0
  245. data/rbi/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +20 -0
  246. data/rbi/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +20 -0
  247. data/rbi/lib/orb/models/customer_update_by_external_id_params.rbi +945 -0
  248. data/rbi/lib/orb/models/customer_update_params.rbi +919 -0
  249. data/rbi/lib/orb/models/customers/balance_transaction_create_params.rbi +64 -0
  250. data/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi +199 -0
  251. data/rbi/lib/orb/models/customers/balance_transaction_list_params.rbi +76 -0
  252. data/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi +191 -0
  253. data/rbi/lib/orb/models/customers/cost_list_by_external_id_params.rbi +86 -0
  254. data/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi +214 -0
  255. data/rbi/lib/orb/models/customers/cost_list_params.rbi +84 -0
  256. data/rbi/lib/orb/models/customers/cost_list_response.rbi +212 -0
  257. data/rbi/lib/orb/models/customers/credit_list_by_external_id_params.rbi +64 -0
  258. data/rbi/lib/orb/models/customers/credit_list_by_external_id_response.rbi +87 -0
  259. data/rbi/lib/orb/models/customers/credit_list_params.rbi +64 -0
  260. data/rbi/lib/orb/models/customers/credit_list_response.rbi +86 -0
  261. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +270 -0
  262. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +1670 -0
  263. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_params.rbi +238 -0
  264. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi +1626 -0
  265. data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +181 -0
  266. data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +1654 -0
  267. data/rbi/lib/orb/models/customers/credits/ledger_list_params.rbi +144 -0
  268. data/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi +1588 -0
  269. data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +196 -0
  270. data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +198 -0
  271. data/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi +176 -0
  272. data/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi +175 -0
  273. data/rbi/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +31 -0
  274. data/rbi/lib/orb/models/customers/credits/top_up_delete_params.rbi +28 -0
  275. data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +49 -0
  276. data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +188 -0
  277. data/rbi/lib/orb/models/customers/credits/top_up_list_params.rbi +49 -0
  278. data/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi +168 -0
  279. data/rbi/lib/orb/models/dimensional_price_group.rbi +75 -0
  280. data/rbi/lib/orb/models/dimensional_price_group_create_params.rbi +66 -0
  281. data/rbi/lib/orb/models/dimensional_price_group_list_params.rbi +39 -0
  282. data/rbi/lib/orb/models/dimensional_price_group_retrieve_params.rbi +20 -0
  283. data/rbi/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +22 -0
  284. data/rbi/lib/orb/models/dimensional_price_groups.rbi +35 -0
  285. data/rbi/lib/orb/models/discount.rbi +18 -0
  286. data/rbi/lib/orb/models/evaluate_price_group.rbi +45 -0
  287. data/rbi/lib/orb/models/event_deprecate_params.rbi +20 -0
  288. data/rbi/lib/orb/models/event_deprecate_response.rbi +19 -0
  289. data/rbi/lib/orb/models/event_ingest_params.rbi +120 -0
  290. data/rbi/lib/orb/models/event_ingest_response.rbi +79 -0
  291. data/rbi/lib/orb/models/event_search_params.rbi +53 -0
  292. data/rbi/lib/orb/models/event_search_response.rbi +100 -0
  293. data/rbi/lib/orb/models/event_update_params.rbi +71 -0
  294. data/rbi/lib/orb/models/event_update_response.rbi +19 -0
  295. data/rbi/lib/orb/models/events/backfill_close_params.rbi +22 -0
  296. data/rbi/lib/orb/models/events/backfill_close_response.rbi +127 -0
  297. data/rbi/lib/orb/models/events/backfill_create_params.rbi +97 -0
  298. data/rbi/lib/orb/models/events/backfill_create_response.rbi +128 -0
  299. data/rbi/lib/orb/models/events/backfill_fetch_params.rbi +22 -0
  300. data/rbi/lib/orb/models/events/backfill_fetch_response.rbi +127 -0
  301. data/rbi/lib/orb/models/events/backfill_list_params.rbi +41 -0
  302. data/rbi/lib/orb/models/events/backfill_list_response.rbi +127 -0
  303. data/rbi/lib/orb/models/events/backfill_revert_params.rbi +22 -0
  304. data/rbi/lib/orb/models/events/backfill_revert_response.rbi +128 -0
  305. data/rbi/lib/orb/models/events/event_volumes.rbi +47 -0
  306. data/rbi/lib/orb/models/events/volume_list_params.rbi +69 -0
  307. data/rbi/lib/orb/models/invoice.rbi +2466 -0
  308. data/rbi/lib/orb/models/invoice_create_params.rbi +230 -0
  309. data/rbi/lib/orb/models/invoice_fetch_params.rbi +20 -0
  310. data/rbi/lib/orb/models/invoice_fetch_upcoming_params.rbi +24 -0
  311. data/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi +2646 -0
  312. data/rbi/lib/orb/models/invoice_issue_params.rbi +32 -0
  313. data/rbi/lib/orb/models/invoice_level_discount.rbi +16 -0
  314. data/rbi/lib/orb/models/invoice_line_item_create_params.rbi +67 -0
  315. data/rbi/lib/orb/models/invoice_line_item_create_response.rbi +1164 -0
  316. data/rbi/lib/orb/models/invoice_list_params.rbi +187 -0
  317. data/rbi/lib/orb/models/invoice_mark_paid_params.rbi +48 -0
  318. data/rbi/lib/orb/models/invoice_pay_params.rbi +20 -0
  319. data/rbi/lib/orb/models/invoice_update_params.rbi +36 -0
  320. data/rbi/lib/orb/models/invoice_void_params.rbi +20 -0
  321. data/rbi/lib/orb/models/item.rbi +101 -0
  322. data/rbi/lib/orb/models/item_create_params.rbi +25 -0
  323. data/rbi/lib/orb/models/item_fetch_params.rbi +20 -0
  324. data/rbi/lib/orb/models/item_list_params.rbi +39 -0
  325. data/rbi/lib/orb/models/item_update_params.rbi +113 -0
  326. data/rbi/lib/orb/models/metric_create_params.rbi +62 -0
  327. data/rbi/lib/orb/models/metric_fetch_params.rbi +20 -0
  328. data/rbi/lib/orb/models/metric_list_params.rbi +74 -0
  329. data/rbi/lib/orb/models/metric_update_params.rbi +36 -0
  330. data/rbi/lib/orb/models/pagination_metadata.rbi +21 -0
  331. data/rbi/lib/orb/models/percentage_discount.rbi +63 -0
  332. data/rbi/lib/orb/models/plan.rbi +1071 -0
  333. data/rbi/lib/orb/models/plan_create_params.rbi +10069 -0
  334. data/rbi/lib/orb/models/plan_fetch_params.rbi +20 -0
  335. data/rbi/lib/orb/models/plan_list_params.rbi +100 -0
  336. data/rbi/lib/orb/models/plan_update_params.rbi +46 -0
  337. data/rbi/lib/orb/models/plans/external_plan_id_fetch_params.rbi +22 -0
  338. data/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi +48 -0
  339. data/rbi/lib/orb/models/price.rbi +15341 -0
  340. data/rbi/lib/orb/models/price_create_params.rbi +885 -0
  341. data/rbi/lib/orb/models/price_evaluate_params.rbi +81 -0
  342. data/rbi/lib/orb/models/price_evaluate_response.rbi +21 -0
  343. data/rbi/lib/orb/models/price_fetch_params.rbi +20 -0
  344. data/rbi/lib/orb/models/price_list_params.rbi +39 -0
  345. data/rbi/lib/orb/models/price_update_params.rbi +36 -0
  346. data/rbi/lib/orb/models/prices/external_price_id_fetch_params.rbi +22 -0
  347. data/rbi/lib/orb/models/prices/external_price_id_update_params.rbi +38 -0
  348. data/rbi/lib/orb/models/subscription.rbi +1381 -0
  349. data/rbi/lib/orb/models/subscription_cancel_params.rbi +75 -0
  350. data/rbi/lib/orb/models/subscription_cancel_response.rbi +1374 -0
  351. data/rbi/lib/orb/models/subscription_create_params.rbi +23422 -0
  352. data/rbi/lib/orb/models/subscription_create_response.rbi +1374 -0
  353. data/rbi/lib/orb/models/subscription_fetch_costs_params.rbi +82 -0
  354. data/rbi/lib/orb/models/subscription_fetch_costs_response.rbi +210 -0
  355. data/rbi/lib/orb/models/subscription_fetch_params.rbi +20 -0
  356. data/rbi/lib/orb/models/subscription_fetch_schedule_params.rbi +74 -0
  357. data/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi +81 -0
  358. data/rbi/lib/orb/models/subscription_fetch_usage_params.rbi +137 -0
  359. data/rbi/lib/orb/models/subscription_list_params.rbi +108 -0
  360. data/rbi/lib/orb/models/subscription_price_intervals_params.rbi +12991 -0
  361. data/rbi/lib/orb/models/subscription_price_intervals_response.rbi +1387 -0
  362. data/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi +23589 -0
  363. data/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi +1390 -0
  364. data/rbi/lib/orb/models/subscription_trigger_phase_params.rbi +45 -0
  365. data/rbi/lib/orb/models/subscription_trigger_phase_response.rbi +1381 -0
  366. data/rbi/lib/orb/models/subscription_unschedule_cancellation_params.rbi +20 -0
  367. data/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi +1400 -0
  368. data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +25 -0
  369. data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +1451 -0
  370. data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +20 -0
  371. data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +1410 -0
  372. data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_params.rbi +104 -0
  373. data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi +1400 -0
  374. data/rbi/lib/orb/models/subscription_update_params.rbi +77 -0
  375. data/rbi/lib/orb/models/subscription_update_trial_params.rbi +63 -0
  376. data/rbi/lib/orb/models/subscription_update_trial_response.rbi +1378 -0
  377. data/rbi/lib/orb/models/subscription_usage.rbi +323 -0
  378. data/rbi/lib/orb/models/subscriptions.rbi +33 -0
  379. data/rbi/lib/orb/models/top_level_ping_params.rbi +20 -0
  380. data/rbi/lib/orb/models/top_level_ping_response.rbi +18 -0
  381. data/rbi/lib/orb/models/trial_discount.rbi +73 -0
  382. data/rbi/lib/orb/models/usage_discount.rbi +62 -0
  383. data/rbi/lib/orb/page.rbi +35 -0
  384. data/rbi/lib/orb/request_options.rbi +48 -0
  385. data/rbi/lib/orb/resources/alerts.rbi +216 -0
  386. data/rbi/lib/orb/resources/coupons/subscriptions.rbi +38 -0
  387. data/rbi/lib/orb/resources/coupons.rbi +96 -0
  388. data/rbi/lib/orb/resources/credit_notes.rbi +74 -0
  389. data/rbi/lib/orb/resources/customers/balance_transactions.rbi +92 -0
  390. data/rbi/lib/orb/resources/customers/costs.rbi +304 -0
  391. data/rbi/lib/orb/resources/customers/credits/ledger.rbi +645 -0
  392. data/rbi/lib/orb/resources/customers/credits/top_ups.rbi +180 -0
  393. data/rbi/lib/orb/resources/customers/credits.rbi +88 -0
  394. data/rbi/lib/orb/resources/customers.rbi +714 -0
  395. data/rbi/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi +25 -0
  396. data/rbi/lib/orb/resources/dimensional_price_groups.rbi +78 -0
  397. data/rbi/lib/orb/resources/events/backfills.rbi +161 -0
  398. data/rbi/lib/orb/resources/events/volume.rbi +57 -0
  399. data/rbi/lib/orb/resources/events.rbi +408 -0
  400. data/rbi/lib/orb/resources/invoice_line_items.rbi +44 -0
  401. data/rbi/lib/orb/resources/invoices.rbi +262 -0
  402. data/rbi/lib/orb/resources/items.rbi +65 -0
  403. data/rbi/lib/orb/resources/metrics.rbi +102 -0
  404. data/rbi/lib/orb/resources/plans/external_plan_id.rbi +67 -0
  405. data/rbi/lib/orb/resources/plans.rbi +170 -0
  406. data/rbi/lib/orb/resources/prices/external_price_id.rbi +110 -0
  407. data/rbi/lib/orb/resources/prices.rbi +371 -0
  408. data/rbi/lib/orb/resources/subscriptions.rbi +1469 -0
  409. data/rbi/lib/orb/resources/top_level.rbi +25 -0
  410. data/rbi/lib/orb/transport/base_client.rbi +205 -0
  411. data/rbi/lib/orb/transport/pooled_net_requester.rbi +64 -0
  412. data/rbi/lib/orb/type/array_of.rbi +82 -0
  413. data/rbi/lib/orb/type/base_model.rbi +197 -0
  414. data/rbi/lib/orb/type/base_page.rbi +38 -0
  415. data/rbi/lib/orb/type/boolean_model.rbi +41 -0
  416. data/rbi/lib/orb/type/converter.rbi +95 -0
  417. data/rbi/lib/orb/type/enum.rbi +58 -0
  418. data/rbi/lib/orb/type/hash_of.rbi +86 -0
  419. data/rbi/lib/orb/type/request_parameters.rbi +20 -0
  420. data/rbi/lib/orb/type/union.rbi +66 -0
  421. data/rbi/lib/orb/type/unknown.rbi +37 -0
  422. data/rbi/lib/orb/type.rbi +23 -0
  423. data/rbi/lib/orb/util.rbi +278 -0
  424. data/rbi/lib/orb/version.rbi +5 -0
  425. data/sig/orb/client.rbs +53 -0
  426. data/sig/orb/errors.rbs +201 -0
  427. data/sig/orb/models/alert.rbs +142 -0
  428. data/sig/orb/models/alert_create_for_customer_params.rbs +56 -0
  429. data/sig/orb/models/alert_create_for_external_customer_params.rbs +56 -0
  430. data/sig/orb/models/alert_create_for_subscription_params.rbs +52 -0
  431. data/sig/orb/models/alert_disable_params.rbs +20 -0
  432. data/sig/orb/models/alert_enable_params.rbs +20 -0
  433. data/sig/orb/models/alert_list_params.rbs +57 -0
  434. data/sig/orb/models/alert_retrieve_params.rbs +14 -0
  435. data/sig/orb/models/alert_update_params.rbs +31 -0
  436. data/sig/orb/models/amount_discount.rbs +40 -0
  437. data/sig/orb/models/billable_metric.rbs +50 -0
  438. data/sig/orb/models/billing_cycle_relative_date.rbs +14 -0
  439. data/sig/orb/models/coupon.rbs +51 -0
  440. data/sig/orb/models/coupon_archive_params.rbs +14 -0
  441. data/sig/orb/models/coupon_create_params.rbs +77 -0
  442. data/sig/orb/models/coupon_fetch_params.rbs +14 -0
  443. data/sig/orb/models/coupon_list_params.rbs +37 -0
  444. data/sig/orb/models/coupons/subscription_list_params.rbs +27 -0
  445. data/sig/orb/models/credit_note.rbs +345 -0
  446. data/sig/orb/models/credit_note_create_params.rbs +57 -0
  447. data/sig/orb/models/credit_note_fetch_params.rbs +14 -0
  448. data/sig/orb/models/credit_note_list_params.rbs +45 -0
  449. data/sig/orb/models/customer.rbs +628 -0
  450. data/sig/orb/models/customer_create_params.rbs +624 -0
  451. data/sig/orb/models/customer_delete_params.rbs +14 -0
  452. data/sig/orb/models/customer_fetch_by_external_id_params.rbs +14 -0
  453. data/sig/orb/models/customer_fetch_params.rbs +14 -0
  454. data/sig/orb/models/customer_list_params.rbs +45 -0
  455. data/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs +15 -0
  456. data/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs +15 -0
  457. data/sig/orb/models/customer_update_by_external_id_params.rbs +620 -0
  458. data/sig/orb/models/customer_update_params.rbs +620 -0
  459. data/sig/orb/models/customers/balance_transaction_create_params.rbs +44 -0
  460. data/sig/orb/models/customers/balance_transaction_create_response.rbs +114 -0
  461. data/sig/orb/models/customers/balance_transaction_list_params.rbs +47 -0
  462. data/sig/orb/models/customers/balance_transaction_list_response.rbs +114 -0
  463. data/sig/orb/models/customers/cost_list_by_external_id_params.rbs +48 -0
  464. data/sig/orb/models/customers/cost_list_by_external_id_response.rbs +82 -0
  465. data/sig/orb/models/customers/cost_list_params.rbs +48 -0
  466. data/sig/orb/models/customers/cost_list_response.rbs +80 -0
  467. data/sig/orb/models/customers/credit_list_by_external_id_params.rbs +41 -0
  468. data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +55 -0
  469. data/sig/orb/models/customers/credit_list_params.rbs +41 -0
  470. data/sig/orb/models/customers/credit_list_response.rbs +55 -0
  471. data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +120 -0
  472. data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +814 -0
  473. data/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +120 -0
  474. data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +814 -0
  475. data/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs +99 -0
  476. data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +814 -0
  477. data/sig/orb/models/customers/credits/ledger_list_params.rbs +99 -0
  478. data/sig/orb/models/customers/credits/ledger_list_response.rbs +814 -0
  479. data/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs +95 -0
  480. data/sig/orb/models/customers/credits/top_up_create_by_external_id_response.rbs +90 -0
  481. data/sig/orb/models/customers/credits/top_up_create_params.rbs +95 -0
  482. data/sig/orb/models/customers/credits/top_up_create_response.rbs +90 -0
  483. data/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs +24 -0
  484. data/sig/orb/models/customers/credits/top_up_delete_params.rbs +24 -0
  485. data/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs +29 -0
  486. data/sig/orb/models/customers/credits/top_up_list_by_external_id_response.rbs +90 -0
  487. data/sig/orb/models/customers/credits/top_up_list_params.rbs +29 -0
  488. data/sig/orb/models/customers/credits/top_up_list_response.rbs +90 -0
  489. data/sig/orb/models/dimensional_price_group.rbs +38 -0
  490. data/sig/orb/models/dimensional_price_group_create_params.rbs +39 -0
  491. data/sig/orb/models/dimensional_price_group_list_params.rbs +25 -0
  492. data/sig/orb/models/dimensional_price_group_retrieve_params.rbs +15 -0
  493. data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs +17 -0
  494. data/sig/orb/models/dimensional_price_groups.rbs +22 -0
  495. data/sig/orb/models/discount.rbs +15 -0
  496. data/sig/orb/models/evaluate_price_group.rbs +34 -0
  497. data/sig/orb/models/event_deprecate_params.rbs +14 -0
  498. data/sig/orb/models/event_deprecate_response.rbs +13 -0
  499. data/sig/orb/models/event_ingest_params.rbs +68 -0
  500. data/sig/orb/models/event_ingest_response.rbs +53 -0
  501. data/sig/orb/models/event_search_params.rbs +31 -0
  502. data/sig/orb/models/event_search_response.rbs +55 -0
  503. data/sig/orb/models/event_update_params.rbs +39 -0
  504. data/sig/orb/models/event_update_response.rbs +13 -0
  505. data/sig/orb/models/events/backfill_close_params.rbs +16 -0
  506. data/sig/orb/models/events/backfill_close_response.rbs +73 -0
  507. data/sig/orb/models/events/backfill_create_params.rbs +51 -0
  508. data/sig/orb/models/events/backfill_create_response.rbs +73 -0
  509. data/sig/orb/models/events/backfill_fetch_params.rbs +16 -0
  510. data/sig/orb/models/events/backfill_fetch_response.rbs +73 -0
  511. data/sig/orb/models/events/backfill_list_params.rbs +27 -0
  512. data/sig/orb/models/events/backfill_list_response.rbs +73 -0
  513. data/sig/orb/models/events/backfill_revert_params.rbs +16 -0
  514. data/sig/orb/models/events/backfill_revert_response.rbs +73 -0
  515. data/sig/orb/models/events/event_volumes.rbs +39 -0
  516. data/sig/orb/models/events/volume_list_params.rbs +41 -0
  517. data/sig/orb/models/invoice.rbs +1430 -0
  518. data/sig/orb/models/invoice_create_params.rbs +120 -0
  519. data/sig/orb/models/invoice_fetch_params.rbs +14 -0
  520. data/sig/orb/models/invoice_fetch_upcoming_params.rbs +20 -0
  521. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +1430 -0
  522. data/sig/orb/models/invoice_issue_params.rbs +21 -0
  523. data/sig/orb/models/invoice_level_discount.rbs +14 -0
  524. data/sig/orb/models/invoice_line_item_create_params.rbs +43 -0
  525. data/sig/orb/models/invoice_line_item_create_response.rbs +546 -0
  526. data/sig/orb/models/invoice_list_params.rbs +122 -0
  527. data/sig/orb/models/invoice_mark_paid_params.rbs +27 -0
  528. data/sig/orb/models/invoice_pay_params.rbs +14 -0
  529. data/sig/orb/models/invoice_update_params.rbs +20 -0
  530. data/sig/orb/models/invoice_void_params.rbs +14 -0
  531. data/sig/orb/models/item.rbs +72 -0
  532. data/sig/orb/models/item_create_params.rbs +19 -0
  533. data/sig/orb/models/item_fetch_params.rbs +14 -0
  534. data/sig/orb/models/item_list_params.rbs +25 -0
  535. data/sig/orb/models/item_update_params.rbs +69 -0
  536. data/sig/orb/models/metric_create_params.rbs +39 -0
  537. data/sig/orb/models/metric_fetch_params.rbs +14 -0
  538. data/sig/orb/models/metric_list_params.rbs +45 -0
  539. data/sig/orb/models/metric_update_params.rbs +20 -0
  540. data/sig/orb/models/pagination_metadata.rbs +15 -0
  541. data/sig/orb/models/percentage_discount.rbs +40 -0
  542. data/sig/orb/models/plan.rbs +529 -0
  543. data/sig/orb/models/plan_create_params.rbs +3991 -0
  544. data/sig/orb/models/plan_fetch_params.rbs +14 -0
  545. data/sig/orb/models/plan_list_params.rbs +65 -0
  546. data/sig/orb/models/plan_update_params.rbs +24 -0
  547. data/sig/orb/models/plans/external_plan_id_fetch_params.rbs +16 -0
  548. data/sig/orb/models/plans/external_plan_id_update_params.rbs +26 -0
  549. data/sig/orb/models/price.rbs +8108 -0
  550. data/sig/orb/models/price_create_params.rbs +520 -0
  551. data/sig/orb/models/price_evaluate_params.rbs +45 -0
  552. data/sig/orb/models/price_evaluate_response.rbs +14 -0
  553. data/sig/orb/models/price_fetch_params.rbs +14 -0
  554. data/sig/orb/models/price_list_params.rbs +25 -0
  555. data/sig/orb/models/price_update_params.rbs +20 -0
  556. data/sig/orb/models/prices/external_price_id_fetch_params.rbs +16 -0
  557. data/sig/orb/models/prices/external_price_id_update_params.rbs +22 -0
  558. data/sig/orb/models/subscription.rbs +687 -0
  559. data/sig/orb/models/subscription_cancel_params.rbs +44 -0
  560. data/sig/orb/models/subscription_cancel_response.rbs +687 -0
  561. data/sig/orb/models/subscription_create_params.rbs +9141 -0
  562. data/sig/orb/models/subscription_create_response.rbs +687 -0
  563. data/sig/orb/models/subscription_fetch_costs_params.rbs +46 -0
  564. data/sig/orb/models/subscription_fetch_costs_response.rbs +78 -0
  565. data/sig/orb/models/subscription_fetch_params.rbs +14 -0
  566. data/sig/orb/models/subscription_fetch_schedule_params.rbs +45 -0
  567. data/sig/orb/models/subscription_fetch_schedule_response.rbs +48 -0
  568. data/sig/orb/models/subscription_fetch_usage_params.rbs +80 -0
  569. data/sig/orb/models/subscription_list_params.rbs +69 -0
  570. data/sig/orb/models/subscription_price_intervals_params.rbs +5117 -0
  571. data/sig/orb/models/subscription_price_intervals_response.rbs +687 -0
  572. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +9133 -0
  573. data/sig/orb/models/subscription_schedule_plan_change_response.rbs +687 -0
  574. data/sig/orb/models/subscription_trigger_phase_params.rbs +24 -0
  575. data/sig/orb/models/subscription_trigger_phase_response.rbs +687 -0
  576. data/sig/orb/models/subscription_unschedule_cancellation_params.rbs +15 -0
  577. data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +687 -0
  578. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs +20 -0
  579. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +687 -0
  580. data/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs +15 -0
  581. data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +687 -0
  582. data/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs +55 -0
  583. data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +687 -0
  584. data/sig/orb/models/subscription_update_params.rbs +39 -0
  585. data/sig/orb/models/subscription_update_trial_params.rbs +39 -0
  586. data/sig/orb/models/subscription_update_trial_response.rbs +687 -0
  587. data/sig/orb/models/subscription_usage.rbs +196 -0
  588. data/sig/orb/models/subscriptions.rbs +22 -0
  589. data/sig/orb/models/top_level_ping_params.rbs +14 -0
  590. data/sig/orb/models/top_level_ping_response.rbs +13 -0
  591. data/sig/orb/models/trial_discount.rbs +44 -0
  592. data/sig/orb/models/usage_discount.rbs +40 -0
  593. data/sig/orb/page.rbs +22 -0
  594. data/sig/orb/request_options.rbs +32 -0
  595. data/sig/orb/resources/alerts.rbs +67 -0
  596. data/sig/orb/resources/coupons/subscriptions.rbs +16 -0
  597. data/sig/orb/resources/coupons.rbs +35 -0
  598. data/sig/orb/resources/credit_notes.rbs +29 -0
  599. data/sig/orb/resources/customers/balance_transactions.rbs +28 -0
  600. data/sig/orb/resources/customers/costs.rbs +27 -0
  601. data/sig/orb/resources/customers/credits/ledger.rbs +75 -0
  602. data/sig/orb/resources/customers/credits/top_ups.rbs +63 -0
  603. data/sig/orb/resources/customers/credits.rbs +31 -0
  604. data/sig/orb/resources/customers.rbs +114 -0
  605. data/sig/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbs +14 -0
  606. data/sig/orb/resources/dimensional_price_groups.rbs +29 -0
  607. data/sig/orb/resources/events/backfills.rbs +41 -0
  608. data/sig/orb/resources/events/volume.rbs +17 -0
  609. data/sig/orb/resources/events.rbs +40 -0
  610. data/sig/orb/resources/invoice_line_items.rbs +17 -0
  611. data/sig/orb/resources/invoices.rbs +84 -0
  612. data/sig/orb/resources/items.rbs +30 -0
  613. data/sig/orb/resources/metrics.rbs +37 -0
  614. data/sig/orb/resources/plans/external_plan_id.rbs +21 -0
  615. data/sig/orb/resources/plans.rbs +44 -0
  616. data/sig/orb/resources/prices/external_price_id.rbs +20 -0
  617. data/sig/orb/resources/prices.rbs +83 -0
  618. data/sig/orb/resources/subscriptions.rbs +194 -0
  619. data/sig/orb/resources/top_level.rbs +11 -0
  620. data/sig/orb/transport/base_client.rbs +110 -0
  621. data/sig/orb/transport/pooled_net_requester.rbs +39 -0
  622. data/sig/orb/type/array_of.rbs +36 -0
  623. data/sig/orb/type/base_model.rbs +77 -0
  624. data/sig/orb/type/base_page.rbs +22 -0
  625. data/sig/orb/type/boolean_model.rbs +18 -0
  626. data/sig/orb/type/converter.rbs +36 -0
  627. data/sig/orb/type/enum.rbs +22 -0
  628. data/sig/orb/type/hash_of.rbs +36 -0
  629. data/sig/orb/type/request_parameters.rbs +13 -0
  630. data/sig/orb/type/union.rbs +37 -0
  631. data/sig/orb/type/unknown.rbs +15 -0
  632. data/sig/orb/type.rbs +22 -0
  633. data/sig/orb/util.rbs +132 -0
  634. data/sig/orb/version.rbs +3 -0
  635. metadata +692 -0
@@ -0,0 +1,2646 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ class InvoiceFetchUpcomingResponse < Orb::BaseModel
6
+ sig { returns(String) }
7
+ attr_accessor :id
8
+
9
+ # This is the final amount required to be charged to the customer and reflects the
10
+ # application of the customer balance to the `total` of the invoice.
11
+ sig { returns(String) }
12
+ attr_accessor :amount_due
13
+
14
+ sig { returns(Orb::Models::InvoiceFetchUpcomingResponse::AutoCollection) }
15
+ attr_reader :auto_collection
16
+
17
+ sig do
18
+ params(
19
+ auto_collection: T.any(Orb::Models::InvoiceFetchUpcomingResponse::AutoCollection, Orb::Util::AnyHash)
20
+ )
21
+ .void
22
+ end
23
+ attr_writer :auto_collection
24
+
25
+ sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::BillingAddress)) }
26
+ attr_reader :billing_address
27
+
28
+ sig do
29
+ params(
30
+ billing_address: T.nilable(T.any(Orb::Models::InvoiceFetchUpcomingResponse::BillingAddress, Orb::Util::AnyHash))
31
+ )
32
+ .void
33
+ end
34
+ attr_writer :billing_address
35
+
36
+ # The creation time of the resource in Orb.
37
+ sig { returns(Time) }
38
+ attr_accessor :created_at
39
+
40
+ # A list of credit notes associated with the invoice
41
+ sig { returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::CreditNote]) }
42
+ attr_accessor :credit_notes
43
+
44
+ # An ISO 4217 currency string or `credits`
45
+ sig { returns(String) }
46
+ attr_accessor :currency
47
+
48
+ sig { returns(Orb::Models::InvoiceFetchUpcomingResponse::Customer) }
49
+ attr_reader :customer
50
+
51
+ sig { params(customer: T.any(Orb::Models::InvoiceFetchUpcomingResponse::Customer, Orb::Util::AnyHash)).void }
52
+ attr_writer :customer
53
+
54
+ sig { returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction]) }
55
+ attr_accessor :customer_balance_transactions
56
+
57
+ # Tax IDs are commonly required to be displayed on customer invoices, which are
58
+ # added to the headers of invoices.
59
+ #
60
+ # ### Supported Tax ID Countries and Types
61
+ #
62
+ # | Country | Type | Description |
63
+ # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
64
+ # | Andorra | `ad_nrt` | Andorran NRT Number |
65
+ # | Argentina | `ar_cuit` | Argentinian Tax ID Number |
66
+ # | Australia | `au_abn` | Australian Business Number (AU ABN) |
67
+ # | Australia | `au_arn` | Australian Taxation Office Reference Number |
68
+ # | Austria | `eu_vat` | European VAT Number |
69
+ # | Bahrain | `bh_vat` | Bahraini VAT Number |
70
+ # | Belgium | `eu_vat` | European VAT Number |
71
+ # | Bolivia | `bo_tin` | Bolivian Tax ID |
72
+ # | Brazil | `br_cnpj` | Brazilian CNPJ Number |
73
+ # | Brazil | `br_cpf` | Brazilian CPF Number |
74
+ # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
75
+ # | Bulgaria | `eu_vat` | European VAT Number |
76
+ # | Canada | `ca_bn` | Canadian BN |
77
+ # | Canada | `ca_gst_hst` | Canadian GST/HST Number |
78
+ # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) |
79
+ # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) |
80
+ # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) |
81
+ # | Canada | `ca_qst` | Canadian QST Number (Québec) |
82
+ # | Chile | `cl_tin` | Chilean TIN |
83
+ # | China | `cn_tin` | Chinese Tax ID |
84
+ # | Colombia | `co_nit` | Colombian NIT Number |
85
+ # | Costa Rica | `cr_tin` | Costa Rican Tax ID |
86
+ # | Croatia | `eu_vat` | European VAT Number |
87
+ # | Cyprus | `eu_vat` | European VAT Number |
88
+ # | Czech Republic | `eu_vat` | European VAT Number |
89
+ # | Denmark | `eu_vat` | European VAT Number |
90
+ # | Dominican Republic | `do_rcn` | Dominican RCN Number |
91
+ # | Ecuador | `ec_ruc` | Ecuadorian RUC Number |
92
+ # | Egypt | `eg_tin` | Egyptian Tax Identification Number |
93
+ # | El Salvador | `sv_nit` | El Salvadorian NIT Number |
94
+ # | Estonia | `eu_vat` | European VAT Number |
95
+ # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
96
+ # | Finland | `eu_vat` | European VAT Number |
97
+ # | France | `eu_vat` | European VAT Number |
98
+ # | Georgia | `ge_vat` | Georgian VAT |
99
+ # | Germany | `eu_vat` | European VAT Number |
100
+ # | Greece | `eu_vat` | European VAT Number |
101
+ # | Hong Kong | `hk_br` | Hong Kong BR Number |
102
+ # | Hungary | `eu_vat` | European VAT Number |
103
+ # | Hungary | `hu_tin` | Hungary Tax Number (adószám) |
104
+ # | Iceland | `is_vat` | Icelandic VAT |
105
+ # | India | `in_gst` | Indian GST Number |
106
+ # | Indonesia | `id_npwp` | Indonesian NPWP Number |
107
+ # | Ireland | `eu_vat` | European VAT Number |
108
+ # | Israel | `il_vat` | Israel VAT |
109
+ # | Italy | `eu_vat` | European VAT Number |
110
+ # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
111
+ # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
112
+ # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
113
+ # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number |
114
+ # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
115
+ # | Latvia | `eu_vat` | European VAT Number |
116
+ # | Liechtenstein | `li_uid` | Liechtensteinian UID Number |
117
+ # | Lithuania | `eu_vat` | European VAT Number |
118
+ # | Luxembourg | `eu_vat` | European VAT Number |
119
+ # | Malaysia | `my_frp` | Malaysian FRP Number |
120
+ # | Malaysia | `my_itn` | Malaysian ITN |
121
+ # | Malaysia | `my_sst` | Malaysian SST Number |
122
+ # | Malta | `eu_vat ` | European VAT Number |
123
+ # | Mexico | `mx_rfc` | Mexican RFC Number |
124
+ # | Netherlands | `eu_vat` | European VAT Number |
125
+ # | New Zealand | `nz_gst` | New Zealand GST Number |
126
+ # | Nigeria | `ng_tin` | Nigerian Tax Identification Number |
127
+ # | Norway | `no_vat` | Norwegian VAT Number |
128
+ # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
129
+ # | Oman | `om_vat` | Omani VAT Number |
130
+ # | Peru | `pe_ruc` | Peruvian RUC Number |
131
+ # | Philippines | `ph_tin ` | Philippines Tax Identification Number |
132
+ # | Poland | `eu_vat` | European VAT Number |
133
+ # | Portugal | `eu_vat` | European VAT Number |
134
+ # | Romania | `eu_vat` | European VAT Number |
135
+ # | Romania | `ro_tin` | Romanian Tax ID Number |
136
+ # | Russia | `ru_inn` | Russian INN |
137
+ # | Russia | `ru_kpp` | Russian KPP |
138
+ # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT |
139
+ # | Serbia | `rs_pib` | Serbian PIB Number |
140
+ # | Singapore | `sg_gst` | Singaporean GST |
141
+ # | Singapore | `sg_uen` | Singaporean UEN |
142
+ # | Slovakia | `eu_vat` | European VAT Number |
143
+ # | Slovenia | `eu_vat` | European VAT Number |
144
+ # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) |
145
+ # | South Africa | `za_vat` | South African VAT Number |
146
+ # | South Korea | `kr_brn` | Korean BRN |
147
+ # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
148
+ # | Spain | `eu_vat` | European VAT Number |
149
+ # | Sweden | `eu_vat` | European VAT Number |
150
+ # | Switzerland | `ch_vat` | Switzerland VAT Number |
151
+ # | Taiwan | `tw_vat` | Taiwanese VAT |
152
+ # | Thailand | `th_vat` | Thai VAT |
153
+ # | Turkey | `tr_tin` | Turkish Tax Identification Number |
154
+ # | Ukraine | `ua_vat` | Ukrainian VAT |
155
+ # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
156
+ # | United Kingdom | `eu_vat` | Northern Ireland VAT Number |
157
+ # | United Kingdom | `gb_vat` | United Kingdom VAT Number |
158
+ # | United States | `us_ein` | United States EIN |
159
+ # | Uruguay | `uy_ruc` | Uruguayan RUC Number |
160
+ # | Venezuela | `ve_rif` | Venezuelan RIF Number |
161
+ # | Vietnam | `vn_tin` | Vietnamese Tax ID Number |
162
+ sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID)) }
163
+ attr_reader :customer_tax_id
164
+
165
+ sig do
166
+ params(
167
+ customer_tax_id: T.nilable(T.any(Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID, Orb::Util::AnyHash))
168
+ )
169
+ .void
170
+ end
171
+ attr_writer :customer_tax_id
172
+
173
+ # This field is deprecated in favor of `discounts`. If a `discounts` list is
174
+ # provided, the first discount in the list will be returned. If the list is empty,
175
+ # `None` will be returned.
176
+ sig { returns(T.anything) }
177
+ attr_accessor :discount
178
+
179
+ sig do
180
+ returns(
181
+ T::Array[T.any(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount)]
182
+ )
183
+ end
184
+ attr_accessor :discounts
185
+
186
+ # When the invoice payment is due. The due date is null if the invoice is not yet
187
+ # finalized.
188
+ sig { returns(T.nilable(Time)) }
189
+ attr_accessor :due_date
190
+
191
+ # If the invoice has a status of `draft`, this will be the time that the invoice
192
+ # will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is
193
+ # true, the invoice will automatically begin issuing at this time.
194
+ sig { returns(T.nilable(Time)) }
195
+ attr_accessor :eligible_to_issue_at
196
+
197
+ # A URL for the customer-facing invoice portal. This URL expires 30 days after the
198
+ # invoice's due date, or 60 days after being re-generated through the UI.
199
+ sig { returns(T.nilable(String)) }
200
+ attr_accessor :hosted_invoice_url
201
+
202
+ # Automatically generated invoice number to help track and reconcile invoices.
203
+ # Invoice numbers have a prefix such as `RFOBWG`. These can be sequential per
204
+ # account or customer.
205
+ sig { returns(String) }
206
+ attr_accessor :invoice_number
207
+
208
+ # The link to download the PDF representation of the `Invoice`.
209
+ sig { returns(T.nilable(String)) }
210
+ attr_accessor :invoice_pdf
211
+
212
+ sig { returns(Orb::Models::InvoiceFetchUpcomingResponse::InvoiceSource::TaggedSymbol) }
213
+ attr_accessor :invoice_source
214
+
215
+ # If the invoice failed to issue, this will be the last time it failed to issue
216
+ # (even if it is now in a different state.)
217
+ sig { returns(T.nilable(Time)) }
218
+ attr_accessor :issue_failed_at
219
+
220
+ # If the invoice has been issued, this will be the time it transitioned to
221
+ # `issued` (even if it is now in a different state.)
222
+ sig { returns(T.nilable(Time)) }
223
+ attr_accessor :issued_at
224
+
225
+ # The breakdown of prices in this invoice.
226
+ sig { returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem]) }
227
+ attr_accessor :line_items
228
+
229
+ sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Maximum)) }
230
+ attr_reader :maximum
231
+
232
+ sig do
233
+ params(maximum: T.nilable(T.any(Orb::Models::InvoiceFetchUpcomingResponse::Maximum, Orb::Util::AnyHash)))
234
+ .void
235
+ end
236
+ attr_writer :maximum
237
+
238
+ sig { returns(T.nilable(String)) }
239
+ attr_accessor :maximum_amount
240
+
241
+ # Free-form text which is available on the invoice PDF and the Orb invoice portal.
242
+ sig { returns(T.nilable(String)) }
243
+ attr_accessor :memo
244
+
245
+ # User specified key-value pairs for the resource. If not present, this defaults
246
+ # to an empty dictionary. Individual keys can be removed by setting the value to
247
+ # `null`, and the entire metadata mapping can be cleared by setting `metadata` to
248
+ # `null`.
249
+ sig { returns(T::Hash[Symbol, String]) }
250
+ attr_accessor :metadata
251
+
252
+ sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Minimum)) }
253
+ attr_reader :minimum
254
+
255
+ sig do
256
+ params(minimum: T.nilable(T.any(Orb::Models::InvoiceFetchUpcomingResponse::Minimum, Orb::Util::AnyHash)))
257
+ .void
258
+ end
259
+ attr_writer :minimum
260
+
261
+ sig { returns(T.nilable(String)) }
262
+ attr_accessor :minimum_amount
263
+
264
+ # If the invoice has a status of `paid`, this gives a timestamp when the invoice
265
+ # was paid.
266
+ sig { returns(T.nilable(Time)) }
267
+ attr_accessor :paid_at
268
+
269
+ # A list of payment attempts associated with the invoice
270
+ sig { returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt]) }
271
+ attr_accessor :payment_attempts
272
+
273
+ # If payment was attempted on this invoice but failed, this will be the time of
274
+ # the most recent attempt.
275
+ sig { returns(T.nilable(Time)) }
276
+ attr_accessor :payment_failed_at
277
+
278
+ # If payment was attempted on this invoice, this will be the start time of the
279
+ # most recent attempt. This field is especially useful for delayed-notification
280
+ # payment mechanisms (like bank transfers), where payment can take 3 days or more.
281
+ sig { returns(T.nilable(Time)) }
282
+ attr_accessor :payment_started_at
283
+
284
+ # If the invoice is in draft, this timestamp will reflect when the invoice is
285
+ # scheduled to be issued.
286
+ sig { returns(T.nilable(Time)) }
287
+ attr_accessor :scheduled_issue_at
288
+
289
+ sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::ShippingAddress)) }
290
+ attr_reader :shipping_address
291
+
292
+ sig do
293
+ params(
294
+ shipping_address: T.nilable(T.any(Orb::Models::InvoiceFetchUpcomingResponse::ShippingAddress, Orb::Util::AnyHash))
295
+ )
296
+ .void
297
+ end
298
+ attr_writer :shipping_address
299
+
300
+ sig { returns(Orb::Models::InvoiceFetchUpcomingResponse::Status::TaggedSymbol) }
301
+ attr_accessor :status
302
+
303
+ sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Subscription)) }
304
+ attr_reader :subscription
305
+
306
+ sig do
307
+ params(
308
+ subscription: T.nilable(T.any(Orb::Models::InvoiceFetchUpcomingResponse::Subscription, Orb::Util::AnyHash))
309
+ )
310
+ .void
311
+ end
312
+ attr_writer :subscription
313
+
314
+ # The total before any discounts and minimums are applied.
315
+ sig { returns(String) }
316
+ attr_accessor :subtotal
317
+
318
+ # If the invoice failed to sync, this will be the last time an external invoicing
319
+ # provider sync was attempted. This field will always be `null` for invoices using
320
+ # Orb Invoicing.
321
+ sig { returns(T.nilable(Time)) }
322
+ attr_accessor :sync_failed_at
323
+
324
+ # The scheduled date of the invoice
325
+ sig { returns(Time) }
326
+ attr_accessor :target_date
327
+
328
+ # The total after any minimums and discounts have been applied.
329
+ sig { returns(String) }
330
+ attr_accessor :total
331
+
332
+ # If the invoice has a status of `void`, this gives a timestamp when the invoice
333
+ # was voided.
334
+ sig { returns(T.nilable(Time)) }
335
+ attr_accessor :voided_at
336
+
337
+ # This is true if the invoice will be automatically issued in the future, and
338
+ # false otherwise.
339
+ sig { returns(T::Boolean) }
340
+ attr_accessor :will_auto_issue
341
+
342
+ sig do
343
+ params(
344
+ id: String,
345
+ amount_due: String,
346
+ auto_collection: T.any(Orb::Models::InvoiceFetchUpcomingResponse::AutoCollection, Orb::Util::AnyHash),
347
+ billing_address: T.nilable(T.any(Orb::Models::InvoiceFetchUpcomingResponse::BillingAddress, Orb::Util::AnyHash)),
348
+ created_at: Time,
349
+ credit_notes: T::Array[T.any(Orb::Models::InvoiceFetchUpcomingResponse::CreditNote, Orb::Util::AnyHash)],
350
+ currency: String,
351
+ customer: T.any(Orb::Models::InvoiceFetchUpcomingResponse::Customer, Orb::Util::AnyHash),
352
+ customer_balance_transactions: T::Array[T.any(Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction, Orb::Util::AnyHash)],
353
+ customer_tax_id: T.nilable(T.any(Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID, Orb::Util::AnyHash)),
354
+ discount: T.anything,
355
+ discounts: T::Array[
356
+ T.any(
357
+ Orb::Models::PercentageDiscount,
358
+ Orb::Util::AnyHash,
359
+ Orb::Models::AmountDiscount,
360
+ Orb::Models::TrialDiscount
361
+ )
362
+ ],
363
+ due_date: T.nilable(Time),
364
+ eligible_to_issue_at: T.nilable(Time),
365
+ hosted_invoice_url: T.nilable(String),
366
+ invoice_number: String,
367
+ invoice_pdf: T.nilable(String),
368
+ invoice_source: Orb::Models::InvoiceFetchUpcomingResponse::InvoiceSource::OrSymbol,
369
+ issue_failed_at: T.nilable(Time),
370
+ issued_at: T.nilable(Time),
371
+ line_items: T::Array[T.any(Orb::Models::InvoiceFetchUpcomingResponse::LineItem, Orb::Util::AnyHash)],
372
+ maximum: T.nilable(T.any(Orb::Models::InvoiceFetchUpcomingResponse::Maximum, Orb::Util::AnyHash)),
373
+ maximum_amount: T.nilable(String),
374
+ memo: T.nilable(String),
375
+ metadata: T::Hash[Symbol, String],
376
+ minimum: T.nilable(T.any(Orb::Models::InvoiceFetchUpcomingResponse::Minimum, Orb::Util::AnyHash)),
377
+ minimum_amount: T.nilable(String),
378
+ paid_at: T.nilable(Time),
379
+ payment_attempts: T::Array[T.any(Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt, Orb::Util::AnyHash)],
380
+ payment_failed_at: T.nilable(Time),
381
+ payment_started_at: T.nilable(Time),
382
+ scheduled_issue_at: T.nilable(Time),
383
+ shipping_address: T.nilable(T.any(Orb::Models::InvoiceFetchUpcomingResponse::ShippingAddress, Orb::Util::AnyHash)),
384
+ status: Orb::Models::InvoiceFetchUpcomingResponse::Status::OrSymbol,
385
+ subscription: T.nilable(T.any(Orb::Models::InvoiceFetchUpcomingResponse::Subscription, Orb::Util::AnyHash)),
386
+ subtotal: String,
387
+ sync_failed_at: T.nilable(Time),
388
+ target_date: Time,
389
+ total: String,
390
+ voided_at: T.nilable(Time),
391
+ will_auto_issue: T::Boolean
392
+ )
393
+ .returns(T.attached_class)
394
+ end
395
+ def self.new(
396
+ id:,
397
+ amount_due:,
398
+ auto_collection:,
399
+ billing_address:,
400
+ created_at:,
401
+ credit_notes:,
402
+ currency:,
403
+ customer:,
404
+ customer_balance_transactions:,
405
+ customer_tax_id:,
406
+ discount:,
407
+ discounts:,
408
+ due_date:,
409
+ eligible_to_issue_at:,
410
+ hosted_invoice_url:,
411
+ invoice_number:,
412
+ invoice_pdf:,
413
+ invoice_source:,
414
+ issue_failed_at:,
415
+ issued_at:,
416
+ line_items:,
417
+ maximum:,
418
+ maximum_amount:,
419
+ memo:,
420
+ metadata:,
421
+ minimum:,
422
+ minimum_amount:,
423
+ paid_at:,
424
+ payment_attempts:,
425
+ payment_failed_at:,
426
+ payment_started_at:,
427
+ scheduled_issue_at:,
428
+ shipping_address:,
429
+ status:,
430
+ subscription:,
431
+ subtotal:,
432
+ sync_failed_at:,
433
+ target_date:,
434
+ total:,
435
+ voided_at:,
436
+ will_auto_issue:
437
+ )
438
+ end
439
+
440
+ sig do
441
+ override
442
+ .returns(
443
+ {
444
+ id: String,
445
+ amount_due: String,
446
+ auto_collection: Orb::Models::InvoiceFetchUpcomingResponse::AutoCollection,
447
+ billing_address: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::BillingAddress),
448
+ created_at: Time,
449
+ credit_notes: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::CreditNote],
450
+ currency: String,
451
+ customer: Orb::Models::InvoiceFetchUpcomingResponse::Customer,
452
+ customer_balance_transactions: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction],
453
+ customer_tax_id: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID),
454
+ discount: T.anything,
455
+ discounts: T::Array[T.any(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount)],
456
+ due_date: T.nilable(Time),
457
+ eligible_to_issue_at: T.nilable(Time),
458
+ hosted_invoice_url: T.nilable(String),
459
+ invoice_number: String,
460
+ invoice_pdf: T.nilable(String),
461
+ invoice_source: Orb::Models::InvoiceFetchUpcomingResponse::InvoiceSource::TaggedSymbol,
462
+ issue_failed_at: T.nilable(Time),
463
+ issued_at: T.nilable(Time),
464
+ line_items: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem],
465
+ maximum: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Maximum),
466
+ maximum_amount: T.nilable(String),
467
+ memo: T.nilable(String),
468
+ metadata: T::Hash[Symbol, String],
469
+ minimum: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Minimum),
470
+ minimum_amount: T.nilable(String),
471
+ paid_at: T.nilable(Time),
472
+ payment_attempts: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt],
473
+ payment_failed_at: T.nilable(Time),
474
+ payment_started_at: T.nilable(Time),
475
+ scheduled_issue_at: T.nilable(Time),
476
+ shipping_address: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::ShippingAddress),
477
+ status: Orb::Models::InvoiceFetchUpcomingResponse::Status::TaggedSymbol,
478
+ subscription: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::Subscription),
479
+ subtotal: String,
480
+ sync_failed_at: T.nilable(Time),
481
+ target_date: Time,
482
+ total: String,
483
+ voided_at: T.nilable(Time),
484
+ will_auto_issue: T::Boolean
485
+ }
486
+ )
487
+ end
488
+ def to_hash
489
+ end
490
+
491
+ class AutoCollection < Orb::BaseModel
492
+ # True only if auto-collection is enabled for this invoice.
493
+ sig { returns(T.nilable(T::Boolean)) }
494
+ attr_accessor :enabled
495
+
496
+ # If the invoice is scheduled for auto-collection, this field will reflect when
497
+ # the next attempt will occur. If dunning has been exhausted, or auto-collection
498
+ # is not enabled for this invoice, this field will be `null`.
499
+ sig { returns(T.nilable(Time)) }
500
+ attr_accessor :next_attempt_at
501
+
502
+ # Number of auto-collection payment attempts.
503
+ sig { returns(T.nilable(Integer)) }
504
+ attr_accessor :num_attempts
505
+
506
+ # If Orb has ever attempted payment auto-collection for this invoice, this field
507
+ # will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
508
+ # this can be used to tell whether the invoice is currently in dunning (that is,
509
+ # `previously_attempted_at` is non-null, and `next_attempt_time` is non-null), or
510
+ # if dunning has been exhausted (`previously_attempted_at` is non-null, but
511
+ # `next_attempt_time` is null).
512
+ sig { returns(T.nilable(Time)) }
513
+ attr_accessor :previously_attempted_at
514
+
515
+ sig do
516
+ params(
517
+ enabled: T.nilable(T::Boolean),
518
+ next_attempt_at: T.nilable(Time),
519
+ num_attempts: T.nilable(Integer),
520
+ previously_attempted_at: T.nilable(Time)
521
+ )
522
+ .returns(T.attached_class)
523
+ end
524
+ def self.new(enabled:, next_attempt_at:, num_attempts:, previously_attempted_at:)
525
+ end
526
+
527
+ sig do
528
+ override
529
+ .returns(
530
+ {
531
+ enabled: T.nilable(T::Boolean),
532
+ next_attempt_at: T.nilable(Time),
533
+ num_attempts: T.nilable(Integer),
534
+ previously_attempted_at: T.nilable(Time)
535
+ }
536
+ )
537
+ end
538
+ def to_hash
539
+ end
540
+ end
541
+
542
+ class BillingAddress < Orb::BaseModel
543
+ sig { returns(T.nilable(String)) }
544
+ attr_accessor :city
545
+
546
+ sig { returns(T.nilable(String)) }
547
+ attr_accessor :country
548
+
549
+ sig { returns(T.nilable(String)) }
550
+ attr_accessor :line1
551
+
552
+ sig { returns(T.nilable(String)) }
553
+ attr_accessor :line2
554
+
555
+ sig { returns(T.nilable(String)) }
556
+ attr_accessor :postal_code
557
+
558
+ sig { returns(T.nilable(String)) }
559
+ attr_accessor :state
560
+
561
+ sig do
562
+ params(
563
+ city: T.nilable(String),
564
+ country: T.nilable(String),
565
+ line1: T.nilable(String),
566
+ line2: T.nilable(String),
567
+ postal_code: T.nilable(String),
568
+ state: T.nilable(String)
569
+ )
570
+ .returns(T.attached_class)
571
+ end
572
+ def self.new(city:, country:, line1:, line2:, postal_code:, state:)
573
+ end
574
+
575
+ sig do
576
+ override
577
+ .returns(
578
+ {
579
+ city: T.nilable(String),
580
+ country: T.nilable(String),
581
+ line1: T.nilable(String),
582
+ line2: T.nilable(String),
583
+ postal_code: T.nilable(String),
584
+ state: T.nilable(String)
585
+ }
586
+ )
587
+ end
588
+ def to_hash
589
+ end
590
+ end
591
+
592
+ class CreditNote < Orb::BaseModel
593
+ sig { returns(String) }
594
+ attr_accessor :id
595
+
596
+ sig { returns(String) }
597
+ attr_accessor :credit_note_number
598
+
599
+ # An optional memo supplied on the credit note.
600
+ sig { returns(T.nilable(String)) }
601
+ attr_accessor :memo
602
+
603
+ sig { returns(String) }
604
+ attr_accessor :reason
605
+
606
+ sig { returns(String) }
607
+ attr_accessor :total
608
+
609
+ sig { returns(String) }
610
+ attr_accessor :type
611
+
612
+ # If the credit note has a status of `void`, this gives a timestamp when the
613
+ # credit note was voided.
614
+ sig { returns(T.nilable(Time)) }
615
+ attr_accessor :voided_at
616
+
617
+ sig do
618
+ params(
619
+ id: String,
620
+ credit_note_number: String,
621
+ memo: T.nilable(String),
622
+ reason: String,
623
+ total: String,
624
+ type: String,
625
+ voided_at: T.nilable(Time)
626
+ )
627
+ .returns(T.attached_class)
628
+ end
629
+ def self.new(id:, credit_note_number:, memo:, reason:, total:, type:, voided_at:)
630
+ end
631
+
632
+ sig do
633
+ override
634
+ .returns(
635
+ {
636
+ id: String,
637
+ credit_note_number: String,
638
+ memo: T.nilable(String),
639
+ reason: String,
640
+ total: String,
641
+ type: String,
642
+ voided_at: T.nilable(Time)
643
+ }
644
+ )
645
+ end
646
+ def to_hash
647
+ end
648
+ end
649
+
650
+ class Customer < Orb::BaseModel
651
+ sig { returns(String) }
652
+ attr_accessor :id
653
+
654
+ sig { returns(T.nilable(String)) }
655
+ attr_accessor :external_customer_id
656
+
657
+ sig { params(id: String, external_customer_id: T.nilable(String)).returns(T.attached_class) }
658
+ def self.new(id:, external_customer_id:)
659
+ end
660
+
661
+ sig { override.returns({id: String, external_customer_id: T.nilable(String)}) }
662
+ def to_hash
663
+ end
664
+ end
665
+
666
+ class CustomerBalanceTransaction < Orb::BaseModel
667
+ # A unique id for this transaction.
668
+ sig { returns(String) }
669
+ attr_accessor :id
670
+
671
+ sig { returns(Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Action::TaggedSymbol) }
672
+ attr_accessor :action
673
+
674
+ # The value of the amount changed in the transaction.
675
+ sig { returns(String) }
676
+ attr_accessor :amount
677
+
678
+ # The creation time of this transaction.
679
+ sig { returns(Time) }
680
+ attr_accessor :created_at
681
+
682
+ sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::CreditNote)) }
683
+ attr_reader :credit_note
684
+
685
+ sig do
686
+ params(
687
+ credit_note: T.nilable(
688
+ T.any(
689
+ Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::CreditNote,
690
+ Orb::Util::AnyHash
691
+ )
692
+ )
693
+ )
694
+ .void
695
+ end
696
+ attr_writer :credit_note
697
+
698
+ # An optional description provided for manual customer balance adjustments.
699
+ sig { returns(T.nilable(String)) }
700
+ attr_accessor :description
701
+
702
+ # The new value of the customer's balance prior to the transaction, in the
703
+ # customer's currency.
704
+ sig { returns(String) }
705
+ attr_accessor :ending_balance
706
+
707
+ sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Invoice)) }
708
+ attr_reader :invoice
709
+
710
+ sig do
711
+ params(
712
+ invoice: T.nilable(
713
+ T.any(Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Invoice, Orb::Util::AnyHash)
714
+ )
715
+ )
716
+ .void
717
+ end
718
+ attr_writer :invoice
719
+
720
+ # The original value of the customer's balance prior to the transaction, in the
721
+ # customer's currency.
722
+ sig { returns(String) }
723
+ attr_accessor :starting_balance
724
+
725
+ sig { returns(Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Type::TaggedSymbol) }
726
+ attr_accessor :type
727
+
728
+ sig do
729
+ params(
730
+ id: String,
731
+ action: Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Action::OrSymbol,
732
+ amount: String,
733
+ created_at: Time,
734
+ credit_note: T.nilable(
735
+ T.any(
736
+ Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::CreditNote,
737
+ Orb::Util::AnyHash
738
+ )
739
+ ),
740
+ description: T.nilable(String),
741
+ ending_balance: String,
742
+ invoice: T.nilable(
743
+ T.any(Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Invoice, Orb::Util::AnyHash)
744
+ ),
745
+ starting_balance: String,
746
+ type: Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Type::OrSymbol
747
+ )
748
+ .returns(T.attached_class)
749
+ end
750
+ def self.new(
751
+ id:,
752
+ action:,
753
+ amount:,
754
+ created_at:,
755
+ credit_note:,
756
+ description:,
757
+ ending_balance:,
758
+ invoice:,
759
+ starting_balance:,
760
+ type:
761
+ )
762
+ end
763
+
764
+ sig do
765
+ override
766
+ .returns(
767
+ {
768
+ id: String,
769
+ action: Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Action::TaggedSymbol,
770
+ amount: String,
771
+ created_at: Time,
772
+ credit_note: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::CreditNote),
773
+ description: T.nilable(String),
774
+ ending_balance: String,
775
+ invoice: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Invoice),
776
+ starting_balance: String,
777
+ type: Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Type::TaggedSymbol
778
+ }
779
+ )
780
+ end
781
+ def to_hash
782
+ end
783
+
784
+ module Action
785
+ extend Orb::Enum
786
+
787
+ TaggedSymbol =
788
+ T.type_alias { T.all(Symbol, Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Action) }
789
+ OrSymbol =
790
+ T.type_alias do
791
+ T.any(
792
+ Symbol,
793
+ String,
794
+ Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Action::TaggedSymbol
795
+ )
796
+ end
797
+
798
+ APPLIED_TO_INVOICE =
799
+ T.let(
800
+ :applied_to_invoice,
801
+ Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Action::TaggedSymbol
802
+ )
803
+ MANUAL_ADJUSTMENT =
804
+ T.let(
805
+ :manual_adjustment,
806
+ Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Action::TaggedSymbol
807
+ )
808
+ PRORATED_REFUND =
809
+ T.let(
810
+ :prorated_refund,
811
+ Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Action::TaggedSymbol
812
+ )
813
+ REVERT_PRORATED_REFUND =
814
+ T.let(
815
+ :revert_prorated_refund,
816
+ Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Action::TaggedSymbol
817
+ )
818
+ RETURN_FROM_VOIDING =
819
+ T.let(
820
+ :return_from_voiding,
821
+ Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Action::TaggedSymbol
822
+ )
823
+ CREDIT_NOTE_APPLIED =
824
+ T.let(
825
+ :credit_note_applied,
826
+ Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Action::TaggedSymbol
827
+ )
828
+ CREDIT_NOTE_VOIDED =
829
+ T.let(
830
+ :credit_note_voided,
831
+ Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Action::TaggedSymbol
832
+ )
833
+ OVERPAYMENT_REFUND =
834
+ T.let(
835
+ :overpayment_refund,
836
+ Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Action::TaggedSymbol
837
+ )
838
+ EXTERNAL_PAYMENT =
839
+ T.let(
840
+ :external_payment,
841
+ Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Action::TaggedSymbol
842
+ )
843
+
844
+ sig do
845
+ override
846
+ .returns(
847
+ T::Array[Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Action::TaggedSymbol]
848
+ )
849
+ end
850
+ def self.values
851
+ end
852
+ end
853
+
854
+ class CreditNote < Orb::BaseModel
855
+ # The id of the Credit note
856
+ sig { returns(String) }
857
+ attr_accessor :id
858
+
859
+ sig { params(id: String).returns(T.attached_class) }
860
+ def self.new(id:)
861
+ end
862
+
863
+ sig { override.returns({id: String}) }
864
+ def to_hash
865
+ end
866
+ end
867
+
868
+ class Invoice < Orb::BaseModel
869
+ # The Invoice id
870
+ sig { returns(String) }
871
+ attr_accessor :id
872
+
873
+ sig { params(id: String).returns(T.attached_class) }
874
+ def self.new(id:)
875
+ end
876
+
877
+ sig { override.returns({id: String}) }
878
+ def to_hash
879
+ end
880
+ end
881
+
882
+ module Type
883
+ extend Orb::Enum
884
+
885
+ TaggedSymbol =
886
+ T.type_alias { T.all(Symbol, Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Type) }
887
+ OrSymbol =
888
+ T.type_alias do
889
+ T.any(
890
+ Symbol,
891
+ String,
892
+ Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Type::TaggedSymbol
893
+ )
894
+ end
895
+
896
+ INCREMENT =
897
+ T.let(
898
+ :increment,
899
+ Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Type::TaggedSymbol
900
+ )
901
+ DECREMENT =
902
+ T.let(
903
+ :decrement,
904
+ Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Type::TaggedSymbol
905
+ )
906
+
907
+ sig do
908
+ override
909
+ .returns(
910
+ T::Array[Orb::Models::InvoiceFetchUpcomingResponse::CustomerBalanceTransaction::Type::TaggedSymbol]
911
+ )
912
+ end
913
+ def self.values
914
+ end
915
+ end
916
+ end
917
+
918
+ class CustomerTaxID < Orb::BaseModel
919
+ sig { returns(Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol) }
920
+ attr_accessor :country
921
+
922
+ sig { returns(Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol) }
923
+ attr_accessor :type
924
+
925
+ sig { returns(String) }
926
+ attr_accessor :value
927
+
928
+ # Tax IDs are commonly required to be displayed on customer invoices, which are
929
+ # added to the headers of invoices.
930
+ #
931
+ # ### Supported Tax ID Countries and Types
932
+ #
933
+ # | Country | Type | Description |
934
+ # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
935
+ # | Andorra | `ad_nrt` | Andorran NRT Number |
936
+ # | Argentina | `ar_cuit` | Argentinian Tax ID Number |
937
+ # | Australia | `au_abn` | Australian Business Number (AU ABN) |
938
+ # | Australia | `au_arn` | Australian Taxation Office Reference Number |
939
+ # | Austria | `eu_vat` | European VAT Number |
940
+ # | Bahrain | `bh_vat` | Bahraini VAT Number |
941
+ # | Belgium | `eu_vat` | European VAT Number |
942
+ # | Bolivia | `bo_tin` | Bolivian Tax ID |
943
+ # | Brazil | `br_cnpj` | Brazilian CNPJ Number |
944
+ # | Brazil | `br_cpf` | Brazilian CPF Number |
945
+ # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
946
+ # | Bulgaria | `eu_vat` | European VAT Number |
947
+ # | Canada | `ca_bn` | Canadian BN |
948
+ # | Canada | `ca_gst_hst` | Canadian GST/HST Number |
949
+ # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) |
950
+ # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) |
951
+ # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) |
952
+ # | Canada | `ca_qst` | Canadian QST Number (Québec) |
953
+ # | Chile | `cl_tin` | Chilean TIN |
954
+ # | China | `cn_tin` | Chinese Tax ID |
955
+ # | Colombia | `co_nit` | Colombian NIT Number |
956
+ # | Costa Rica | `cr_tin` | Costa Rican Tax ID |
957
+ # | Croatia | `eu_vat` | European VAT Number |
958
+ # | Cyprus | `eu_vat` | European VAT Number |
959
+ # | Czech Republic | `eu_vat` | European VAT Number |
960
+ # | Denmark | `eu_vat` | European VAT Number |
961
+ # | Dominican Republic | `do_rcn` | Dominican RCN Number |
962
+ # | Ecuador | `ec_ruc` | Ecuadorian RUC Number |
963
+ # | Egypt | `eg_tin` | Egyptian Tax Identification Number |
964
+ # | El Salvador | `sv_nit` | El Salvadorian NIT Number |
965
+ # | Estonia | `eu_vat` | European VAT Number |
966
+ # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
967
+ # | Finland | `eu_vat` | European VAT Number |
968
+ # | France | `eu_vat` | European VAT Number |
969
+ # | Georgia | `ge_vat` | Georgian VAT |
970
+ # | Germany | `eu_vat` | European VAT Number |
971
+ # | Greece | `eu_vat` | European VAT Number |
972
+ # | Hong Kong | `hk_br` | Hong Kong BR Number |
973
+ # | Hungary | `eu_vat` | European VAT Number |
974
+ # | Hungary | `hu_tin` | Hungary Tax Number (adószám) |
975
+ # | Iceland | `is_vat` | Icelandic VAT |
976
+ # | India | `in_gst` | Indian GST Number |
977
+ # | Indonesia | `id_npwp` | Indonesian NPWP Number |
978
+ # | Ireland | `eu_vat` | European VAT Number |
979
+ # | Israel | `il_vat` | Israel VAT |
980
+ # | Italy | `eu_vat` | European VAT Number |
981
+ # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
982
+ # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
983
+ # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
984
+ # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number |
985
+ # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
986
+ # | Latvia | `eu_vat` | European VAT Number |
987
+ # | Liechtenstein | `li_uid` | Liechtensteinian UID Number |
988
+ # | Lithuania | `eu_vat` | European VAT Number |
989
+ # | Luxembourg | `eu_vat` | European VAT Number |
990
+ # | Malaysia | `my_frp` | Malaysian FRP Number |
991
+ # | Malaysia | `my_itn` | Malaysian ITN |
992
+ # | Malaysia | `my_sst` | Malaysian SST Number |
993
+ # | Malta | `eu_vat ` | European VAT Number |
994
+ # | Mexico | `mx_rfc` | Mexican RFC Number |
995
+ # | Netherlands | `eu_vat` | European VAT Number |
996
+ # | New Zealand | `nz_gst` | New Zealand GST Number |
997
+ # | Nigeria | `ng_tin` | Nigerian Tax Identification Number |
998
+ # | Norway | `no_vat` | Norwegian VAT Number |
999
+ # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
1000
+ # | Oman | `om_vat` | Omani VAT Number |
1001
+ # | Peru | `pe_ruc` | Peruvian RUC Number |
1002
+ # | Philippines | `ph_tin ` | Philippines Tax Identification Number |
1003
+ # | Poland | `eu_vat` | European VAT Number |
1004
+ # | Portugal | `eu_vat` | European VAT Number |
1005
+ # | Romania | `eu_vat` | European VAT Number |
1006
+ # | Romania | `ro_tin` | Romanian Tax ID Number |
1007
+ # | Russia | `ru_inn` | Russian INN |
1008
+ # | Russia | `ru_kpp` | Russian KPP |
1009
+ # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT |
1010
+ # | Serbia | `rs_pib` | Serbian PIB Number |
1011
+ # | Singapore | `sg_gst` | Singaporean GST |
1012
+ # | Singapore | `sg_uen` | Singaporean UEN |
1013
+ # | Slovakia | `eu_vat` | European VAT Number |
1014
+ # | Slovenia | `eu_vat` | European VAT Number |
1015
+ # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) |
1016
+ # | South Africa | `za_vat` | South African VAT Number |
1017
+ # | South Korea | `kr_brn` | Korean BRN |
1018
+ # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
1019
+ # | Spain | `eu_vat` | European VAT Number |
1020
+ # | Sweden | `eu_vat` | European VAT Number |
1021
+ # | Switzerland | `ch_vat` | Switzerland VAT Number |
1022
+ # | Taiwan | `tw_vat` | Taiwanese VAT |
1023
+ # | Thailand | `th_vat` | Thai VAT |
1024
+ # | Turkey | `tr_tin` | Turkish Tax Identification Number |
1025
+ # | Ukraine | `ua_vat` | Ukrainian VAT |
1026
+ # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
1027
+ # | United Kingdom | `eu_vat` | Northern Ireland VAT Number |
1028
+ # | United Kingdom | `gb_vat` | United Kingdom VAT Number |
1029
+ # | United States | `us_ein` | United States EIN |
1030
+ # | Uruguay | `uy_ruc` | Uruguayan RUC Number |
1031
+ # | Venezuela | `ve_rif` | Venezuelan RIF Number |
1032
+ # | Vietnam | `vn_tin` | Vietnamese Tax ID Number |
1033
+ sig do
1034
+ params(
1035
+ country: Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::OrSymbol,
1036
+ type: Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::OrSymbol,
1037
+ value: String
1038
+ )
1039
+ .returns(T.attached_class)
1040
+ end
1041
+ def self.new(country:, type:, value:)
1042
+ end
1043
+
1044
+ sig do
1045
+ override
1046
+ .returns(
1047
+ {
1048
+ country: Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol,
1049
+ type: Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol,
1050
+ value: String
1051
+ }
1052
+ )
1053
+ end
1054
+ def to_hash
1055
+ end
1056
+
1057
+ module Country
1058
+ extend Orb::Enum
1059
+
1060
+ TaggedSymbol =
1061
+ T.type_alias { T.all(Symbol, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country) }
1062
+ OrSymbol =
1063
+ T.type_alias { T.any(Symbol, String, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol) }
1064
+
1065
+ AD = T.let(:AD, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1066
+ AE = T.let(:AE, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1067
+ AR = T.let(:AR, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1068
+ AT = T.let(:AT, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1069
+ AU = T.let(:AU, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1070
+ BE = T.let(:BE, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1071
+ BG = T.let(:BG, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1072
+ BH = T.let(:BH, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1073
+ BO = T.let(:BO, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1074
+ BR = T.let(:BR, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1075
+ CA = T.let(:CA, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1076
+ CH = T.let(:CH, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1077
+ CL = T.let(:CL, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1078
+ CN = T.let(:CN, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1079
+ CO = T.let(:CO, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1080
+ CR = T.let(:CR, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1081
+ CY = T.let(:CY, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1082
+ CZ = T.let(:CZ, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1083
+ DE = T.let(:DE, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1084
+ DK = T.let(:DK, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1085
+ EE = T.let(:EE, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1086
+ DO = T.let(:DO, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1087
+ EC = T.let(:EC, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1088
+ EG = T.let(:EG, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1089
+ ES = T.let(:ES, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1090
+ EU = T.let(:EU, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1091
+ FI = T.let(:FI, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1092
+ FR = T.let(:FR, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1093
+ GB = T.let(:GB, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1094
+ GE = T.let(:GE, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1095
+ GR = T.let(:GR, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1096
+ HK = T.let(:HK, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1097
+ HR = T.let(:HR, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1098
+ HU = T.let(:HU, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1099
+ ID = T.let(:ID, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1100
+ IE = T.let(:IE, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1101
+ IL = T.let(:IL, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1102
+ IN = T.let(:IN, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1103
+ IS = T.let(:IS, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1104
+ IT = T.let(:IT, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1105
+ JP = T.let(:JP, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1106
+ KE = T.let(:KE, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1107
+ KR = T.let(:KR, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1108
+ KZ = T.let(:KZ, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1109
+ LI = T.let(:LI, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1110
+ LT = T.let(:LT, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1111
+ LU = T.let(:LU, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1112
+ LV = T.let(:LV, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1113
+ MT = T.let(:MT, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1114
+ MX = T.let(:MX, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1115
+ MY = T.let(:MY, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1116
+ NG = T.let(:NG, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1117
+ NL = T.let(:NL, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1118
+ NO = T.let(:NO, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1119
+ NZ = T.let(:NZ, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1120
+ OM = T.let(:OM, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1121
+ PE = T.let(:PE, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1122
+ PH = T.let(:PH, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1123
+ PL = T.let(:PL, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1124
+ PT = T.let(:PT, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1125
+ RO = T.let(:RO, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1126
+ RS = T.let(:RS, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1127
+ RU = T.let(:RU, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1128
+ SA = T.let(:SA, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1129
+ SE = T.let(:SE, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1130
+ SG = T.let(:SG, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1131
+ SI = T.let(:SI, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1132
+ SK = T.let(:SK, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1133
+ SV = T.let(:SV, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1134
+ TH = T.let(:TH, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1135
+ TR = T.let(:TR, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1136
+ TW = T.let(:TW, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1137
+ UA = T.let(:UA, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1138
+ US = T.let(:US, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1139
+ UY = T.let(:UY, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1140
+ VE = T.let(:VE, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1141
+ VN = T.let(:VN, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1142
+ ZA = T.let(:ZA, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol)
1143
+
1144
+ sig do
1145
+ override.returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Country::TaggedSymbol])
1146
+ end
1147
+ def self.values
1148
+ end
1149
+ end
1150
+
1151
+ module Type
1152
+ extend Orb::Enum
1153
+
1154
+ TaggedSymbol =
1155
+ T.type_alias { T.all(Symbol, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type) }
1156
+ OrSymbol =
1157
+ T.type_alias { T.any(Symbol, String, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol) }
1158
+
1159
+ AD_NRT = T.let(:ad_nrt, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1160
+ AE_TRN = T.let(:ae_trn, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1161
+ AR_CUIT = T.let(:ar_cuit, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1162
+ EU_VAT = T.let(:eu_vat, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1163
+ AU_ABN = T.let(:au_abn, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1164
+ AU_ARN = T.let(:au_arn, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1165
+ BG_UIC = T.let(:bg_uic, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1166
+ BH_VAT = T.let(:bh_vat, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1167
+ BO_TIN = T.let(:bo_tin, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1168
+ BR_CNPJ = T.let(:br_cnpj, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1169
+ BR_CPF = T.let(:br_cpf, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1170
+ CA_BN = T.let(:ca_bn, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1171
+ CA_GST_HST =
1172
+ T.let(:ca_gst_hst, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1173
+ CA_PST_BC =
1174
+ T.let(:ca_pst_bc, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1175
+ CA_PST_MB =
1176
+ T.let(:ca_pst_mb, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1177
+ CA_PST_SK =
1178
+ T.let(:ca_pst_sk, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1179
+ CA_QST = T.let(:ca_qst, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1180
+ CH_VAT = T.let(:ch_vat, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1181
+ CL_TIN = T.let(:cl_tin, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1182
+ CN_TIN = T.let(:cn_tin, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1183
+ CO_NIT = T.let(:co_nit, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1184
+ CR_TIN = T.let(:cr_tin, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1185
+ DO_RCN = T.let(:do_rcn, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1186
+ EC_RUC = T.let(:ec_ruc, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1187
+ EG_TIN = T.let(:eg_tin, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1188
+ ES_CIF = T.let(:es_cif, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1189
+ EU_OSS_VAT =
1190
+ T.let(:eu_oss_vat, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1191
+ GB_VAT = T.let(:gb_vat, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1192
+ GE_VAT = T.let(:ge_vat, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1193
+ HK_BR = T.let(:hk_br, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1194
+ HU_TIN = T.let(:hu_tin, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1195
+ ID_NPWP = T.let(:id_npwp, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1196
+ IL_VAT = T.let(:il_vat, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1197
+ IN_GST = T.let(:in_gst, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1198
+ IS_VAT = T.let(:is_vat, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1199
+ JP_CN = T.let(:jp_cn, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1200
+ JP_RN = T.let(:jp_rn, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1201
+ JP_TRN = T.let(:jp_trn, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1202
+ KE_PIN = T.let(:ke_pin, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1203
+ KR_BRN = T.let(:kr_brn, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1204
+ KZ_BIN = T.let(:kz_bin, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1205
+ LI_UID = T.let(:li_uid, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1206
+ MX_RFC = T.let(:mx_rfc, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1207
+ MY_FRP = T.let(:my_frp, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1208
+ MY_ITN = T.let(:my_itn, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1209
+ MY_SST = T.let(:my_sst, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1210
+ NG_TIN = T.let(:ng_tin, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1211
+ NO_VAT = T.let(:no_vat, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1212
+ NO_VOEC = T.let(:no_voec, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1213
+ NZ_GST = T.let(:nz_gst, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1214
+ OM_VAT = T.let(:om_vat, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1215
+ PE_RUC = T.let(:pe_ruc, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1216
+ PH_TIN = T.let(:ph_tin, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1217
+ RO_TIN = T.let(:ro_tin, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1218
+ RS_PIB = T.let(:rs_pib, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1219
+ RU_INN = T.let(:ru_inn, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1220
+ RU_KPP = T.let(:ru_kpp, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1221
+ SA_VAT = T.let(:sa_vat, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1222
+ SG_GST = T.let(:sg_gst, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1223
+ SG_UEN = T.let(:sg_uen, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1224
+ SI_TIN = T.let(:si_tin, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1225
+ SV_NIT = T.let(:sv_nit, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1226
+ TH_VAT = T.let(:th_vat, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1227
+ TR_TIN = T.let(:tr_tin, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1228
+ TW_VAT = T.let(:tw_vat, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1229
+ UA_VAT = T.let(:ua_vat, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1230
+ US_EIN = T.let(:us_ein, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1231
+ UY_RUC = T.let(:uy_ruc, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1232
+ VE_RIF = T.let(:ve_rif, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1233
+ VN_TIN = T.let(:vn_tin, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1234
+ ZA_VAT = T.let(:za_vat, Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol)
1235
+
1236
+ sig { override.returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID::Type::TaggedSymbol]) }
1237
+ def self.values
1238
+ end
1239
+ end
1240
+ end
1241
+
1242
+ module InvoiceSource
1243
+ extend Orb::Enum
1244
+
1245
+ TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::InvoiceFetchUpcomingResponse::InvoiceSource) }
1246
+ OrSymbol =
1247
+ T.type_alias { T.any(Symbol, String, Orb::Models::InvoiceFetchUpcomingResponse::InvoiceSource::TaggedSymbol) }
1248
+
1249
+ SUBSCRIPTION =
1250
+ T.let(:subscription, Orb::Models::InvoiceFetchUpcomingResponse::InvoiceSource::TaggedSymbol)
1251
+ PARTIAL = T.let(:partial, Orb::Models::InvoiceFetchUpcomingResponse::InvoiceSource::TaggedSymbol)
1252
+ ONE_OFF = T.let(:one_off, Orb::Models::InvoiceFetchUpcomingResponse::InvoiceSource::TaggedSymbol)
1253
+
1254
+ sig { override.returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::InvoiceSource::TaggedSymbol]) }
1255
+ def self.values
1256
+ end
1257
+ end
1258
+
1259
+ class LineItem < Orb::BaseModel
1260
+ # A unique ID for this line item.
1261
+ sig { returns(String) }
1262
+ attr_accessor :id
1263
+
1264
+ # The line amount after any adjustments and before overage conversion, credits and
1265
+ # partial invoicing.
1266
+ sig { returns(String) }
1267
+ attr_accessor :adjusted_subtotal
1268
+
1269
+ # All adjustments applied to the line item in the order they were applied based on
1270
+ # invoice calculations (ie. usage discounts -> amount discounts -> percentage
1271
+ # discounts -> minimums -> maximums).
1272
+ sig do
1273
+ returns(
1274
+ T::Array[
1275
+ T.any(
1276
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryUsageDiscountAdjustment,
1277
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryAmountDiscountAdjustment,
1278
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment,
1279
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMinimumAdjustment,
1280
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMaximumAdjustment
1281
+ )
1282
+ ]
1283
+ )
1284
+ end
1285
+ attr_accessor :adjustments
1286
+
1287
+ # The final amount for a line item after all adjustments and pre paid credits have
1288
+ # been applied.
1289
+ sig { returns(String) }
1290
+ attr_accessor :amount
1291
+
1292
+ # The number of prepaid credits applied.
1293
+ sig { returns(String) }
1294
+ attr_accessor :credits_applied
1295
+
1296
+ sig do
1297
+ returns(
1298
+ T.nilable(
1299
+ T.any(
1300
+ Orb::Models::PercentageDiscount,
1301
+ Orb::Models::TrialDiscount,
1302
+ Orb::Models::UsageDiscount,
1303
+ Orb::Models::AmountDiscount
1304
+ )
1305
+ )
1306
+ )
1307
+ end
1308
+ attr_accessor :discount
1309
+
1310
+ # The end date of the range of time applied for this line item's price.
1311
+ sig { returns(Time) }
1312
+ attr_accessor :end_date
1313
+
1314
+ # An additional filter that was used to calculate the usage for this line item.
1315
+ sig { returns(T.nilable(String)) }
1316
+ attr_accessor :filter
1317
+
1318
+ # [DEPRECATED] For configured prices that are split by a grouping key, this will
1319
+ # be populated with the key and a value. The `amount` and `subtotal` will be the
1320
+ # values for this particular grouping.
1321
+ sig { returns(T.nilable(String)) }
1322
+ attr_accessor :grouping
1323
+
1324
+ # This field is deprecated in favor of `adjustments`.
1325
+ sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Maximum)) }
1326
+ attr_reader :maximum
1327
+
1328
+ sig do
1329
+ params(
1330
+ maximum: T.nilable(T.any(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Maximum, Orb::Util::AnyHash))
1331
+ )
1332
+ .void
1333
+ end
1334
+ attr_writer :maximum
1335
+
1336
+ # This field is deprecated in favor of `adjustments`.
1337
+ sig { returns(T.nilable(String)) }
1338
+ attr_accessor :maximum_amount
1339
+
1340
+ # This field is deprecated in favor of `adjustments`.
1341
+ sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Minimum)) }
1342
+ attr_reader :minimum
1343
+
1344
+ sig do
1345
+ params(
1346
+ minimum: T.nilable(T.any(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Minimum, Orb::Util::AnyHash))
1347
+ )
1348
+ .void
1349
+ end
1350
+ attr_writer :minimum
1351
+
1352
+ # This field is deprecated in favor of `adjustments`.
1353
+ sig { returns(T.nilable(String)) }
1354
+ attr_accessor :minimum_amount
1355
+
1356
+ # The name of the price associated with this line item.
1357
+ sig { returns(String) }
1358
+ attr_accessor :name
1359
+
1360
+ # Any amount applied from a partial invoice
1361
+ sig { returns(String) }
1362
+ attr_accessor :partially_invoiced_amount
1363
+
1364
+ # The Price resource represents a price that can be billed on a subscription,
1365
+ # resulting in a charge on an invoice in the form of an invoice line item. Prices
1366
+ # take a quantity and determine an amount to bill.
1367
+ #
1368
+ # Orb supports a few different pricing models out of the box. Each of these models
1369
+ # is serialized differently in a given Price object. The model_type field
1370
+ # determines the key for the configuration object that is present.
1371
+ #
1372
+ # For more on the types of prices, see
1373
+ # [the core concepts documentation](/core-concepts#plan-and-price)
1374
+ sig do
1375
+ returns(
1376
+ T.nilable(
1377
+ T.any(
1378
+ Orb::Models::Price::UnitPrice,
1379
+ Orb::Models::Price::PackagePrice,
1380
+ Orb::Models::Price::MatrixPrice,
1381
+ Orb::Models::Price::TieredPrice,
1382
+ Orb::Models::Price::TieredBpsPrice,
1383
+ Orb::Models::Price::BpsPrice,
1384
+ Orb::Models::Price::BulkBpsPrice,
1385
+ Orb::Models::Price::BulkPrice,
1386
+ Orb::Models::Price::ThresholdTotalAmountPrice,
1387
+ Orb::Models::Price::TieredPackagePrice,
1388
+ Orb::Models::Price::GroupedTieredPrice,
1389
+ Orb::Models::Price::TieredWithMinimumPrice,
1390
+ Orb::Models::Price::TieredPackageWithMinimumPrice,
1391
+ Orb::Models::Price::PackageWithAllocationPrice,
1392
+ Orb::Models::Price::UnitWithPercentPrice,
1393
+ Orb::Models::Price::MatrixWithAllocationPrice,
1394
+ Orb::Models::Price::TieredWithProrationPrice,
1395
+ Orb::Models::Price::UnitWithProrationPrice,
1396
+ Orb::Models::Price::GroupedAllocationPrice,
1397
+ Orb::Models::Price::GroupedWithProratedMinimumPrice,
1398
+ Orb::Models::Price::GroupedWithMeteredMinimumPrice,
1399
+ Orb::Models::Price::MatrixWithDisplayNamePrice,
1400
+ Orb::Models::Price::BulkWithProrationPrice,
1401
+ Orb::Models::Price::GroupedTieredPackagePrice,
1402
+ Orb::Models::Price::MaxGroupTieredPackagePrice,
1403
+ Orb::Models::Price::ScalableMatrixWithUnitPricingPrice,
1404
+ Orb::Models::Price::ScalableMatrixWithTieredPricingPrice,
1405
+ Orb::Models::Price::CumulativeGroupedBulkPrice
1406
+ )
1407
+ )
1408
+ )
1409
+ end
1410
+ attr_accessor :price
1411
+
1412
+ # Either the fixed fee quantity or the usage during the service period.
1413
+ sig { returns(Float) }
1414
+ attr_accessor :quantity
1415
+
1416
+ # The start date of the range of time applied for this line item's price.
1417
+ sig { returns(Time) }
1418
+ attr_accessor :start_date
1419
+
1420
+ # For complex pricing structures, the line item can be broken down further in
1421
+ # `sub_line_items`.
1422
+ sig do
1423
+ returns(
1424
+ T::Array[
1425
+ T.any(
1426
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem,
1427
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem,
1428
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem
1429
+ )
1430
+ ]
1431
+ )
1432
+ end
1433
+ attr_accessor :sub_line_items
1434
+
1435
+ # The line amount before before any adjustments.
1436
+ sig { returns(String) }
1437
+ attr_accessor :subtotal
1438
+
1439
+ # An array of tax rates and their incurred tax amounts. Empty if no tax
1440
+ # integration is configured.
1441
+ sig { returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::TaxAmount]) }
1442
+ attr_accessor :tax_amounts
1443
+
1444
+ # A list of customer ids that were used to calculate the usage for this line item.
1445
+ sig { returns(T.nilable(T::Array[String])) }
1446
+ attr_accessor :usage_customer_ids
1447
+
1448
+ sig do
1449
+ params(
1450
+ id: String,
1451
+ adjusted_subtotal: String,
1452
+ adjustments: T::Array[
1453
+ T.any(
1454
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryUsageDiscountAdjustment,
1455
+ Orb::Util::AnyHash,
1456
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryAmountDiscountAdjustment,
1457
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment,
1458
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMinimumAdjustment,
1459
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMaximumAdjustment
1460
+ )
1461
+ ],
1462
+ amount: String,
1463
+ credits_applied: String,
1464
+ discount: T.nilable(
1465
+ T.any(
1466
+ Orb::Models::PercentageDiscount,
1467
+ Orb::Util::AnyHash,
1468
+ Orb::Models::TrialDiscount,
1469
+ Orb::Models::UsageDiscount,
1470
+ Orb::Models::AmountDiscount
1471
+ )
1472
+ ),
1473
+ end_date: Time,
1474
+ filter: T.nilable(String),
1475
+ grouping: T.nilable(String),
1476
+ maximum: T.nilable(T.any(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Maximum, Orb::Util::AnyHash)),
1477
+ maximum_amount: T.nilable(String),
1478
+ minimum: T.nilable(T.any(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Minimum, Orb::Util::AnyHash)),
1479
+ minimum_amount: T.nilable(String),
1480
+ name: String,
1481
+ partially_invoiced_amount: String,
1482
+ price: T.nilable(
1483
+ T.any(
1484
+ Orb::Models::Price::UnitPrice,
1485
+ Orb::Util::AnyHash,
1486
+ Orb::Models::Price::PackagePrice,
1487
+ Orb::Models::Price::MatrixPrice,
1488
+ Orb::Models::Price::TieredPrice,
1489
+ Orb::Models::Price::TieredBpsPrice,
1490
+ Orb::Models::Price::BpsPrice,
1491
+ Orb::Models::Price::BulkBpsPrice,
1492
+ Orb::Models::Price::BulkPrice,
1493
+ Orb::Models::Price::ThresholdTotalAmountPrice,
1494
+ Orb::Models::Price::TieredPackagePrice,
1495
+ Orb::Models::Price::GroupedTieredPrice,
1496
+ Orb::Models::Price::TieredWithMinimumPrice,
1497
+ Orb::Models::Price::TieredPackageWithMinimumPrice,
1498
+ Orb::Models::Price::PackageWithAllocationPrice,
1499
+ Orb::Models::Price::UnitWithPercentPrice,
1500
+ Orb::Models::Price::MatrixWithAllocationPrice,
1501
+ Orb::Models::Price::TieredWithProrationPrice,
1502
+ Orb::Models::Price::UnitWithProrationPrice,
1503
+ Orb::Models::Price::GroupedAllocationPrice,
1504
+ Orb::Models::Price::GroupedWithProratedMinimumPrice,
1505
+ Orb::Models::Price::GroupedWithMeteredMinimumPrice,
1506
+ Orb::Models::Price::MatrixWithDisplayNamePrice,
1507
+ Orb::Models::Price::BulkWithProrationPrice,
1508
+ Orb::Models::Price::GroupedTieredPackagePrice,
1509
+ Orb::Models::Price::MaxGroupTieredPackagePrice,
1510
+ Orb::Models::Price::ScalableMatrixWithUnitPricingPrice,
1511
+ Orb::Models::Price::ScalableMatrixWithTieredPricingPrice,
1512
+ Orb::Models::Price::CumulativeGroupedBulkPrice
1513
+ )
1514
+ ),
1515
+ quantity: Float,
1516
+ start_date: Time,
1517
+ sub_line_items: T::Array[
1518
+ T.any(
1519
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem,
1520
+ Orb::Util::AnyHash,
1521
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem,
1522
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem
1523
+ )
1524
+ ],
1525
+ subtotal: String,
1526
+ tax_amounts: T::Array[T.any(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::TaxAmount, Orb::Util::AnyHash)],
1527
+ usage_customer_ids: T.nilable(T::Array[String])
1528
+ )
1529
+ .returns(T.attached_class)
1530
+ end
1531
+ def self.new(
1532
+ id:,
1533
+ adjusted_subtotal:,
1534
+ adjustments:,
1535
+ amount:,
1536
+ credits_applied:,
1537
+ discount:,
1538
+ end_date:,
1539
+ filter:,
1540
+ grouping:,
1541
+ maximum:,
1542
+ maximum_amount:,
1543
+ minimum:,
1544
+ minimum_amount:,
1545
+ name:,
1546
+ partially_invoiced_amount:,
1547
+ price:,
1548
+ quantity:,
1549
+ start_date:,
1550
+ sub_line_items:,
1551
+ subtotal:,
1552
+ tax_amounts:,
1553
+ usage_customer_ids:
1554
+ )
1555
+ end
1556
+
1557
+ sig do
1558
+ override
1559
+ .returns(
1560
+ {
1561
+ id: String,
1562
+ adjusted_subtotal: String,
1563
+ adjustments: T::Array[
1564
+ T.any(
1565
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryUsageDiscountAdjustment,
1566
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryAmountDiscountAdjustment,
1567
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment,
1568
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMinimumAdjustment,
1569
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMaximumAdjustment
1570
+ )
1571
+ ],
1572
+ amount: String,
1573
+ credits_applied: String,
1574
+ discount: T.nilable(
1575
+ T.any(
1576
+ Orb::Models::PercentageDiscount,
1577
+ Orb::Models::TrialDiscount,
1578
+ Orb::Models::UsageDiscount,
1579
+ Orb::Models::AmountDiscount
1580
+ )
1581
+ ),
1582
+ end_date: Time,
1583
+ filter: T.nilable(String),
1584
+ grouping: T.nilable(String),
1585
+ maximum: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Maximum),
1586
+ maximum_amount: T.nilable(String),
1587
+ minimum: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Minimum),
1588
+ minimum_amount: T.nilable(String),
1589
+ name: String,
1590
+ partially_invoiced_amount: String,
1591
+ price: T.nilable(
1592
+ T.any(
1593
+ Orb::Models::Price::UnitPrice,
1594
+ Orb::Models::Price::PackagePrice,
1595
+ Orb::Models::Price::MatrixPrice,
1596
+ Orb::Models::Price::TieredPrice,
1597
+ Orb::Models::Price::TieredBpsPrice,
1598
+ Orb::Models::Price::BpsPrice,
1599
+ Orb::Models::Price::BulkBpsPrice,
1600
+ Orb::Models::Price::BulkPrice,
1601
+ Orb::Models::Price::ThresholdTotalAmountPrice,
1602
+ Orb::Models::Price::TieredPackagePrice,
1603
+ Orb::Models::Price::GroupedTieredPrice,
1604
+ Orb::Models::Price::TieredWithMinimumPrice,
1605
+ Orb::Models::Price::TieredPackageWithMinimumPrice,
1606
+ Orb::Models::Price::PackageWithAllocationPrice,
1607
+ Orb::Models::Price::UnitWithPercentPrice,
1608
+ Orb::Models::Price::MatrixWithAllocationPrice,
1609
+ Orb::Models::Price::TieredWithProrationPrice,
1610
+ Orb::Models::Price::UnitWithProrationPrice,
1611
+ Orb::Models::Price::GroupedAllocationPrice,
1612
+ Orb::Models::Price::GroupedWithProratedMinimumPrice,
1613
+ Orb::Models::Price::GroupedWithMeteredMinimumPrice,
1614
+ Orb::Models::Price::MatrixWithDisplayNamePrice,
1615
+ Orb::Models::Price::BulkWithProrationPrice,
1616
+ Orb::Models::Price::GroupedTieredPackagePrice,
1617
+ Orb::Models::Price::MaxGroupTieredPackagePrice,
1618
+ Orb::Models::Price::ScalableMatrixWithUnitPricingPrice,
1619
+ Orb::Models::Price::ScalableMatrixWithTieredPricingPrice,
1620
+ Orb::Models::Price::CumulativeGroupedBulkPrice
1621
+ )
1622
+ ),
1623
+ quantity: Float,
1624
+ start_date: Time,
1625
+ sub_line_items: T::Array[
1626
+ T.any(
1627
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem,
1628
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem,
1629
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem
1630
+ )
1631
+ ],
1632
+ subtotal: String,
1633
+ tax_amounts: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::TaxAmount],
1634
+ usage_customer_ids: T.nilable(T::Array[String])
1635
+ }
1636
+ )
1637
+ end
1638
+ def to_hash
1639
+ end
1640
+
1641
+ module Adjustment
1642
+ extend Orb::Union
1643
+
1644
+ class MonetaryUsageDiscountAdjustment < Orb::BaseModel
1645
+ sig { returns(String) }
1646
+ attr_accessor :id
1647
+
1648
+ sig { returns(Symbol) }
1649
+ attr_accessor :adjustment_type
1650
+
1651
+ # The value applied by an adjustment.
1652
+ sig { returns(String) }
1653
+ attr_accessor :amount
1654
+
1655
+ # The price IDs that this adjustment applies to.
1656
+ sig { returns(T::Array[String]) }
1657
+ attr_accessor :applies_to_price_ids
1658
+
1659
+ # True for adjustments that apply to an entire invocice, false for adjustments
1660
+ # that apply to only one price.
1661
+ sig { returns(T::Boolean) }
1662
+ attr_accessor :is_invoice_level
1663
+
1664
+ # The reason for the adjustment.
1665
+ sig { returns(T.nilable(String)) }
1666
+ attr_accessor :reason
1667
+
1668
+ # The number of usage units by which to discount the price this adjustment applies
1669
+ # to in a given billing period.
1670
+ sig { returns(Float) }
1671
+ attr_accessor :usage_discount
1672
+
1673
+ sig do
1674
+ params(
1675
+ id: String,
1676
+ amount: String,
1677
+ applies_to_price_ids: T::Array[String],
1678
+ is_invoice_level: T::Boolean,
1679
+ reason: T.nilable(String),
1680
+ usage_discount: Float,
1681
+ adjustment_type: Symbol
1682
+ )
1683
+ .returns(T.attached_class)
1684
+ end
1685
+ def self.new(
1686
+ id:,
1687
+ amount:,
1688
+ applies_to_price_ids:,
1689
+ is_invoice_level:,
1690
+ reason:,
1691
+ usage_discount:,
1692
+ adjustment_type: :usage_discount
1693
+ )
1694
+ end
1695
+
1696
+ sig do
1697
+ override
1698
+ .returns(
1699
+ {
1700
+ id: String,
1701
+ adjustment_type: Symbol,
1702
+ amount: String,
1703
+ applies_to_price_ids: T::Array[String],
1704
+ is_invoice_level: T::Boolean,
1705
+ reason: T.nilable(String),
1706
+ usage_discount: Float
1707
+ }
1708
+ )
1709
+ end
1710
+ def to_hash
1711
+ end
1712
+ end
1713
+
1714
+ class MonetaryAmountDiscountAdjustment < Orb::BaseModel
1715
+ sig { returns(String) }
1716
+ attr_accessor :id
1717
+
1718
+ sig { returns(Symbol) }
1719
+ attr_accessor :adjustment_type
1720
+
1721
+ # The value applied by an adjustment.
1722
+ sig { returns(String) }
1723
+ attr_accessor :amount
1724
+
1725
+ # The amount by which to discount the prices this adjustment applies to in a given
1726
+ # billing period.
1727
+ sig { returns(String) }
1728
+ attr_accessor :amount_discount
1729
+
1730
+ # The price IDs that this adjustment applies to.
1731
+ sig { returns(T::Array[String]) }
1732
+ attr_accessor :applies_to_price_ids
1733
+
1734
+ # True for adjustments that apply to an entire invocice, false for adjustments
1735
+ # that apply to only one price.
1736
+ sig { returns(T::Boolean) }
1737
+ attr_accessor :is_invoice_level
1738
+
1739
+ # The reason for the adjustment.
1740
+ sig { returns(T.nilable(String)) }
1741
+ attr_accessor :reason
1742
+
1743
+ sig do
1744
+ params(
1745
+ id: String,
1746
+ amount: String,
1747
+ amount_discount: String,
1748
+ applies_to_price_ids: T::Array[String],
1749
+ is_invoice_level: T::Boolean,
1750
+ reason: T.nilable(String),
1751
+ adjustment_type: Symbol
1752
+ )
1753
+ .returns(T.attached_class)
1754
+ end
1755
+ def self.new(
1756
+ id:,
1757
+ amount:,
1758
+ amount_discount:,
1759
+ applies_to_price_ids:,
1760
+ is_invoice_level:,
1761
+ reason:,
1762
+ adjustment_type: :amount_discount
1763
+ )
1764
+ end
1765
+
1766
+ sig do
1767
+ override
1768
+ .returns(
1769
+ {
1770
+ id: String,
1771
+ adjustment_type: Symbol,
1772
+ amount: String,
1773
+ amount_discount: String,
1774
+ applies_to_price_ids: T::Array[String],
1775
+ is_invoice_level: T::Boolean,
1776
+ reason: T.nilable(String)
1777
+ }
1778
+ )
1779
+ end
1780
+ def to_hash
1781
+ end
1782
+ end
1783
+
1784
+ class MonetaryPercentageDiscountAdjustment < Orb::BaseModel
1785
+ sig { returns(String) }
1786
+ attr_accessor :id
1787
+
1788
+ sig { returns(Symbol) }
1789
+ attr_accessor :adjustment_type
1790
+
1791
+ # The value applied by an adjustment.
1792
+ sig { returns(String) }
1793
+ attr_accessor :amount
1794
+
1795
+ # The price IDs that this adjustment applies to.
1796
+ sig { returns(T::Array[String]) }
1797
+ attr_accessor :applies_to_price_ids
1798
+
1799
+ # True for adjustments that apply to an entire invocice, false for adjustments
1800
+ # that apply to only one price.
1801
+ sig { returns(T::Boolean) }
1802
+ attr_accessor :is_invoice_level
1803
+
1804
+ # The percentage (as a value between 0 and 1) by which to discount the price
1805
+ # intervals this adjustment applies to in a given billing period.
1806
+ sig { returns(Float) }
1807
+ attr_accessor :percentage_discount
1808
+
1809
+ # The reason for the adjustment.
1810
+ sig { returns(T.nilable(String)) }
1811
+ attr_accessor :reason
1812
+
1813
+ sig do
1814
+ params(
1815
+ id: String,
1816
+ amount: String,
1817
+ applies_to_price_ids: T::Array[String],
1818
+ is_invoice_level: T::Boolean,
1819
+ percentage_discount: Float,
1820
+ reason: T.nilable(String),
1821
+ adjustment_type: Symbol
1822
+ )
1823
+ .returns(T.attached_class)
1824
+ end
1825
+ def self.new(
1826
+ id:,
1827
+ amount:,
1828
+ applies_to_price_ids:,
1829
+ is_invoice_level:,
1830
+ percentage_discount:,
1831
+ reason:,
1832
+ adjustment_type: :percentage_discount
1833
+ )
1834
+ end
1835
+
1836
+ sig do
1837
+ override
1838
+ .returns(
1839
+ {
1840
+ id: String,
1841
+ adjustment_type: Symbol,
1842
+ amount: String,
1843
+ applies_to_price_ids: T::Array[String],
1844
+ is_invoice_level: T::Boolean,
1845
+ percentage_discount: Float,
1846
+ reason: T.nilable(String)
1847
+ }
1848
+ )
1849
+ end
1850
+ def to_hash
1851
+ end
1852
+ end
1853
+
1854
+ class MonetaryMinimumAdjustment < Orb::BaseModel
1855
+ sig { returns(String) }
1856
+ attr_accessor :id
1857
+
1858
+ sig { returns(Symbol) }
1859
+ attr_accessor :adjustment_type
1860
+
1861
+ # The value applied by an adjustment.
1862
+ sig { returns(String) }
1863
+ attr_accessor :amount
1864
+
1865
+ # The price IDs that this adjustment applies to.
1866
+ sig { returns(T::Array[String]) }
1867
+ attr_accessor :applies_to_price_ids
1868
+
1869
+ # True for adjustments that apply to an entire invocice, false for adjustments
1870
+ # that apply to only one price.
1871
+ sig { returns(T::Boolean) }
1872
+ attr_accessor :is_invoice_level
1873
+
1874
+ # The item ID that revenue from this minimum will be attributed to.
1875
+ sig { returns(String) }
1876
+ attr_accessor :item_id
1877
+
1878
+ # The minimum amount to charge in a given billing period for the prices this
1879
+ # adjustment applies to.
1880
+ sig { returns(String) }
1881
+ attr_accessor :minimum_amount
1882
+
1883
+ # The reason for the adjustment.
1884
+ sig { returns(T.nilable(String)) }
1885
+ attr_accessor :reason
1886
+
1887
+ sig do
1888
+ params(
1889
+ id: String,
1890
+ amount: String,
1891
+ applies_to_price_ids: T::Array[String],
1892
+ is_invoice_level: T::Boolean,
1893
+ item_id: String,
1894
+ minimum_amount: String,
1895
+ reason: T.nilable(String),
1896
+ adjustment_type: Symbol
1897
+ )
1898
+ .returns(T.attached_class)
1899
+ end
1900
+ def self.new(
1901
+ id:,
1902
+ amount:,
1903
+ applies_to_price_ids:,
1904
+ is_invoice_level:,
1905
+ item_id:,
1906
+ minimum_amount:,
1907
+ reason:,
1908
+ adjustment_type: :minimum
1909
+ )
1910
+ end
1911
+
1912
+ sig do
1913
+ override
1914
+ .returns(
1915
+ {
1916
+ id: String,
1917
+ adjustment_type: Symbol,
1918
+ amount: String,
1919
+ applies_to_price_ids: T::Array[String],
1920
+ is_invoice_level: T::Boolean,
1921
+ item_id: String,
1922
+ minimum_amount: String,
1923
+ reason: T.nilable(String)
1924
+ }
1925
+ )
1926
+ end
1927
+ def to_hash
1928
+ end
1929
+ end
1930
+
1931
+ class MonetaryMaximumAdjustment < Orb::BaseModel
1932
+ sig { returns(String) }
1933
+ attr_accessor :id
1934
+
1935
+ sig { returns(Symbol) }
1936
+ attr_accessor :adjustment_type
1937
+
1938
+ # The value applied by an adjustment.
1939
+ sig { returns(String) }
1940
+ attr_accessor :amount
1941
+
1942
+ # The price IDs that this adjustment applies to.
1943
+ sig { returns(T::Array[String]) }
1944
+ attr_accessor :applies_to_price_ids
1945
+
1946
+ # True for adjustments that apply to an entire invocice, false for adjustments
1947
+ # that apply to only one price.
1948
+ sig { returns(T::Boolean) }
1949
+ attr_accessor :is_invoice_level
1950
+
1951
+ # The maximum amount to charge in a given billing period for the prices this
1952
+ # adjustment applies to.
1953
+ sig { returns(String) }
1954
+ attr_accessor :maximum_amount
1955
+
1956
+ # The reason for the adjustment.
1957
+ sig { returns(T.nilable(String)) }
1958
+ attr_accessor :reason
1959
+
1960
+ sig do
1961
+ params(
1962
+ id: String,
1963
+ amount: String,
1964
+ applies_to_price_ids: T::Array[String],
1965
+ is_invoice_level: T::Boolean,
1966
+ maximum_amount: String,
1967
+ reason: T.nilable(String),
1968
+ adjustment_type: Symbol
1969
+ )
1970
+ .returns(T.attached_class)
1971
+ end
1972
+ def self.new(
1973
+ id:,
1974
+ amount:,
1975
+ applies_to_price_ids:,
1976
+ is_invoice_level:,
1977
+ maximum_amount:,
1978
+ reason:,
1979
+ adjustment_type: :maximum
1980
+ )
1981
+ end
1982
+
1983
+ sig do
1984
+ override
1985
+ .returns(
1986
+ {
1987
+ id: String,
1988
+ adjustment_type: Symbol,
1989
+ amount: String,
1990
+ applies_to_price_ids: T::Array[String],
1991
+ is_invoice_level: T::Boolean,
1992
+ maximum_amount: String,
1993
+ reason: T.nilable(String)
1994
+ }
1995
+ )
1996
+ end
1997
+ def to_hash
1998
+ end
1999
+ end
2000
+
2001
+ sig do
2002
+ override
2003
+ .returns(
2004
+ [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryUsageDiscountAdjustment, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryAmountDiscountAdjustment, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMinimumAdjustment, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMaximumAdjustment]
2005
+ )
2006
+ end
2007
+ def self.variants
2008
+ end
2009
+ end
2010
+
2011
+ class Maximum < Orb::BaseModel
2012
+ # List of price_ids that this maximum amount applies to. For plan/plan phase
2013
+ # maximums, this can be a subset of prices.
2014
+ sig { returns(T::Array[String]) }
2015
+ attr_accessor :applies_to_price_ids
2016
+
2017
+ # Maximum amount applied
2018
+ sig { returns(String) }
2019
+ attr_accessor :maximum_amount
2020
+
2021
+ # This field is deprecated in favor of `adjustments`.
2022
+ sig do
2023
+ params(applies_to_price_ids: T::Array[String], maximum_amount: String).returns(T.attached_class)
2024
+ end
2025
+ def self.new(applies_to_price_ids:, maximum_amount:)
2026
+ end
2027
+
2028
+ sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) }
2029
+ def to_hash
2030
+ end
2031
+ end
2032
+
2033
+ class Minimum < Orb::BaseModel
2034
+ # List of price_ids that this minimum amount applies to. For plan/plan phase
2035
+ # minimums, this can be a subset of prices.
2036
+ sig { returns(T::Array[String]) }
2037
+ attr_accessor :applies_to_price_ids
2038
+
2039
+ # Minimum amount applied
2040
+ sig { returns(String) }
2041
+ attr_accessor :minimum_amount
2042
+
2043
+ # This field is deprecated in favor of `adjustments`.
2044
+ sig do
2045
+ params(applies_to_price_ids: T::Array[String], minimum_amount: String).returns(T.attached_class)
2046
+ end
2047
+ def self.new(applies_to_price_ids:, minimum_amount:)
2048
+ end
2049
+
2050
+ sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) }
2051
+ def to_hash
2052
+ end
2053
+ end
2054
+
2055
+ module SubLineItem
2056
+ extend Orb::Union
2057
+
2058
+ class MatrixSubLineItem < Orb::BaseModel
2059
+ # The total amount for this sub line item.
2060
+ sig { returns(String) }
2061
+ attr_accessor :amount
2062
+
2063
+ sig do
2064
+ returns(
2065
+ T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::Grouping)
2066
+ )
2067
+ end
2068
+ attr_reader :grouping
2069
+
2070
+ sig do
2071
+ params(
2072
+ grouping: T.nilable(
2073
+ T.any(
2074
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::Grouping,
2075
+ Orb::Util::AnyHash
2076
+ )
2077
+ )
2078
+ )
2079
+ .void
2080
+ end
2081
+ attr_writer :grouping
2082
+
2083
+ sig { returns(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig) }
2084
+ attr_reader :matrix_config
2085
+
2086
+ sig do
2087
+ params(
2088
+ matrix_config: T.any(
2089
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig,
2090
+ Orb::Util::AnyHash
2091
+ )
2092
+ )
2093
+ .void
2094
+ end
2095
+ attr_writer :matrix_config
2096
+
2097
+ sig { returns(String) }
2098
+ attr_accessor :name
2099
+
2100
+ sig { returns(Float) }
2101
+ attr_accessor :quantity
2102
+
2103
+ sig { returns(Symbol) }
2104
+ attr_accessor :type
2105
+
2106
+ sig do
2107
+ params(
2108
+ amount: String,
2109
+ grouping: T.nilable(
2110
+ T.any(
2111
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::Grouping,
2112
+ Orb::Util::AnyHash
2113
+ )
2114
+ ),
2115
+ matrix_config: T.any(
2116
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig,
2117
+ Orb::Util::AnyHash
2118
+ ),
2119
+ name: String,
2120
+ quantity: Float,
2121
+ type: Symbol
2122
+ )
2123
+ .returns(T.attached_class)
2124
+ end
2125
+ def self.new(amount:, grouping:, matrix_config:, name:, quantity:, type: :matrix)
2126
+ end
2127
+
2128
+ sig do
2129
+ override
2130
+ .returns(
2131
+ {
2132
+ amount: String,
2133
+ grouping: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::Grouping),
2134
+ matrix_config: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem::MatrixConfig,
2135
+ name: String,
2136
+ quantity: Float,
2137
+ type: Symbol
2138
+ }
2139
+ )
2140
+ end
2141
+ def to_hash
2142
+ end
2143
+
2144
+ class Grouping < Orb::BaseModel
2145
+ sig { returns(String) }
2146
+ attr_accessor :key
2147
+
2148
+ # No value indicates the default group
2149
+ sig { returns(T.nilable(String)) }
2150
+ attr_accessor :value
2151
+
2152
+ sig { params(key: String, value: T.nilable(String)).returns(T.attached_class) }
2153
+ def self.new(key:, value:)
2154
+ end
2155
+
2156
+ sig { override.returns({key: String, value: T.nilable(String)}) }
2157
+ def to_hash
2158
+ end
2159
+ end
2160
+
2161
+ class MatrixConfig < Orb::BaseModel
2162
+ # The ordered dimension values for this line item.
2163
+ sig { returns(T::Array[T.nilable(String)]) }
2164
+ attr_accessor :dimension_values
2165
+
2166
+ sig { params(dimension_values: T::Array[T.nilable(String)]).returns(T.attached_class) }
2167
+ def self.new(dimension_values:)
2168
+ end
2169
+
2170
+ sig { override.returns({dimension_values: T::Array[T.nilable(String)]}) }
2171
+ def to_hash
2172
+ end
2173
+ end
2174
+ end
2175
+
2176
+ class TierSubLineItem < Orb::BaseModel
2177
+ # The total amount for this sub line item.
2178
+ sig { returns(String) }
2179
+ attr_accessor :amount
2180
+
2181
+ sig do
2182
+ returns(
2183
+ T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::Grouping)
2184
+ )
2185
+ end
2186
+ attr_reader :grouping
2187
+
2188
+ sig do
2189
+ params(
2190
+ grouping: T.nilable(
2191
+ T.any(
2192
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::Grouping,
2193
+ Orb::Util::AnyHash
2194
+ )
2195
+ )
2196
+ )
2197
+ .void
2198
+ end
2199
+ attr_writer :grouping
2200
+
2201
+ sig { returns(String) }
2202
+ attr_accessor :name
2203
+
2204
+ sig { returns(Float) }
2205
+ attr_accessor :quantity
2206
+
2207
+ sig { returns(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::TierConfig) }
2208
+ attr_reader :tier_config
2209
+
2210
+ sig do
2211
+ params(
2212
+ tier_config: T.any(
2213
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::TierConfig,
2214
+ Orb::Util::AnyHash
2215
+ )
2216
+ )
2217
+ .void
2218
+ end
2219
+ attr_writer :tier_config
2220
+
2221
+ sig { returns(Symbol) }
2222
+ attr_accessor :type
2223
+
2224
+ sig do
2225
+ params(
2226
+ amount: String,
2227
+ grouping: T.nilable(
2228
+ T.any(
2229
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::Grouping,
2230
+ Orb::Util::AnyHash
2231
+ )
2232
+ ),
2233
+ name: String,
2234
+ quantity: Float,
2235
+ tier_config: T.any(
2236
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::TierConfig,
2237
+ Orb::Util::AnyHash
2238
+ ),
2239
+ type: Symbol
2240
+ )
2241
+ .returns(T.attached_class)
2242
+ end
2243
+ def self.new(amount:, grouping:, name:, quantity:, tier_config:, type: :tier)
2244
+ end
2245
+
2246
+ sig do
2247
+ override
2248
+ .returns(
2249
+ {
2250
+ amount: String,
2251
+ grouping: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::Grouping),
2252
+ name: String,
2253
+ quantity: Float,
2254
+ tier_config: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem::TierConfig,
2255
+ type: Symbol
2256
+ }
2257
+ )
2258
+ end
2259
+ def to_hash
2260
+ end
2261
+
2262
+ class Grouping < Orb::BaseModel
2263
+ sig { returns(String) }
2264
+ attr_accessor :key
2265
+
2266
+ # No value indicates the default group
2267
+ sig { returns(T.nilable(String)) }
2268
+ attr_accessor :value
2269
+
2270
+ sig { params(key: String, value: T.nilable(String)).returns(T.attached_class) }
2271
+ def self.new(key:, value:)
2272
+ end
2273
+
2274
+ sig { override.returns({key: String, value: T.nilable(String)}) }
2275
+ def to_hash
2276
+ end
2277
+ end
2278
+
2279
+ class TierConfig < Orb::BaseModel
2280
+ sig { returns(Float) }
2281
+ attr_accessor :first_unit
2282
+
2283
+ sig { returns(T.nilable(Float)) }
2284
+ attr_accessor :last_unit
2285
+
2286
+ sig { returns(String) }
2287
+ attr_accessor :unit_amount
2288
+
2289
+ sig do
2290
+ params(
2291
+ first_unit: Float,
2292
+ last_unit: T.nilable(Float),
2293
+ unit_amount: String
2294
+ ).returns(T.attached_class)
2295
+ end
2296
+ def self.new(first_unit:, last_unit:, unit_amount:)
2297
+ end
2298
+
2299
+ sig { override.returns({first_unit: Float, last_unit: T.nilable(Float), unit_amount: String}) }
2300
+ def to_hash
2301
+ end
2302
+ end
2303
+ end
2304
+
2305
+ class OtherSubLineItem < Orb::BaseModel
2306
+ # The total amount for this sub line item.
2307
+ sig { returns(String) }
2308
+ attr_accessor :amount
2309
+
2310
+ sig do
2311
+ returns(
2312
+ T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem::Grouping)
2313
+ )
2314
+ end
2315
+ attr_reader :grouping
2316
+
2317
+ sig do
2318
+ params(
2319
+ grouping: T.nilable(
2320
+ T.any(
2321
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem::Grouping,
2322
+ Orb::Util::AnyHash
2323
+ )
2324
+ )
2325
+ )
2326
+ .void
2327
+ end
2328
+ attr_writer :grouping
2329
+
2330
+ sig { returns(String) }
2331
+ attr_accessor :name
2332
+
2333
+ sig { returns(Float) }
2334
+ attr_accessor :quantity
2335
+
2336
+ sig { returns(Symbol) }
2337
+ attr_accessor :type
2338
+
2339
+ sig do
2340
+ params(
2341
+ amount: String,
2342
+ grouping: T.nilable(
2343
+ T.any(
2344
+ Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem::Grouping,
2345
+ Orb::Util::AnyHash
2346
+ )
2347
+ ),
2348
+ name: String,
2349
+ quantity: Float,
2350
+ type: Symbol
2351
+ )
2352
+ .returns(T.attached_class)
2353
+ end
2354
+ def self.new(amount:, grouping:, name:, quantity:, type: :"'null'")
2355
+ end
2356
+
2357
+ sig do
2358
+ override
2359
+ .returns(
2360
+ {
2361
+ amount: String,
2362
+ grouping: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem::Grouping),
2363
+ name: String,
2364
+ quantity: Float,
2365
+ type: Symbol
2366
+ }
2367
+ )
2368
+ end
2369
+ def to_hash
2370
+ end
2371
+
2372
+ class Grouping < Orb::BaseModel
2373
+ sig { returns(String) }
2374
+ attr_accessor :key
2375
+
2376
+ # No value indicates the default group
2377
+ sig { returns(T.nilable(String)) }
2378
+ attr_accessor :value
2379
+
2380
+ sig { params(key: String, value: T.nilable(String)).returns(T.attached_class) }
2381
+ def self.new(key:, value:)
2382
+ end
2383
+
2384
+ sig { override.returns({key: String, value: T.nilable(String)}) }
2385
+ def to_hash
2386
+ end
2387
+ end
2388
+ end
2389
+
2390
+ sig do
2391
+ override
2392
+ .returns(
2393
+ [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem]
2394
+ )
2395
+ end
2396
+ def self.variants
2397
+ end
2398
+ end
2399
+
2400
+ class TaxAmount < Orb::BaseModel
2401
+ # The amount of additional tax incurred by this tax rate.
2402
+ sig { returns(String) }
2403
+ attr_accessor :amount
2404
+
2405
+ # The human-readable description of the applied tax rate.
2406
+ sig { returns(String) }
2407
+ attr_accessor :tax_rate_description
2408
+
2409
+ # The tax rate percentage, out of 100.
2410
+ sig { returns(T.nilable(String)) }
2411
+ attr_accessor :tax_rate_percentage
2412
+
2413
+ sig do
2414
+ params(amount: String, tax_rate_description: String, tax_rate_percentage: T.nilable(String))
2415
+ .returns(T.attached_class)
2416
+ end
2417
+ def self.new(amount:, tax_rate_description:, tax_rate_percentage:)
2418
+ end
2419
+
2420
+ sig do
2421
+ override.returns(
2422
+ {
2423
+ amount: String,
2424
+ tax_rate_description: String,
2425
+ tax_rate_percentage: T.nilable(String)
2426
+ }
2427
+ )
2428
+ end
2429
+ def to_hash
2430
+ end
2431
+ end
2432
+ end
2433
+
2434
+ class Maximum < Orb::BaseModel
2435
+ # List of price_ids that this maximum amount applies to. For plan/plan phase
2436
+ # maximums, this can be a subset of prices.
2437
+ sig { returns(T::Array[String]) }
2438
+ attr_accessor :applies_to_price_ids
2439
+
2440
+ # Maximum amount applied
2441
+ sig { returns(String) }
2442
+ attr_accessor :maximum_amount
2443
+
2444
+ sig do
2445
+ params(applies_to_price_ids: T::Array[String], maximum_amount: String).returns(T.attached_class)
2446
+ end
2447
+ def self.new(applies_to_price_ids:, maximum_amount:)
2448
+ end
2449
+
2450
+ sig { override.returns({applies_to_price_ids: T::Array[String], maximum_amount: String}) }
2451
+ def to_hash
2452
+ end
2453
+ end
2454
+
2455
+ class Minimum < Orb::BaseModel
2456
+ # List of price_ids that this minimum amount applies to. For plan/plan phase
2457
+ # minimums, this can be a subset of prices.
2458
+ sig { returns(T::Array[String]) }
2459
+ attr_accessor :applies_to_price_ids
2460
+
2461
+ # Minimum amount applied
2462
+ sig { returns(String) }
2463
+ attr_accessor :minimum_amount
2464
+
2465
+ sig do
2466
+ params(applies_to_price_ids: T::Array[String], minimum_amount: String).returns(T.attached_class)
2467
+ end
2468
+ def self.new(applies_to_price_ids:, minimum_amount:)
2469
+ end
2470
+
2471
+ sig { override.returns({applies_to_price_ids: T::Array[String], minimum_amount: String}) }
2472
+ def to_hash
2473
+ end
2474
+ end
2475
+
2476
+ class PaymentAttempt < Orb::BaseModel
2477
+ # The ID of the payment attempt.
2478
+ sig { returns(String) }
2479
+ attr_accessor :id
2480
+
2481
+ # The amount of the payment attempt.
2482
+ sig { returns(String) }
2483
+ attr_accessor :amount
2484
+
2485
+ # The time at which the payment attempt was created.
2486
+ sig { returns(Time) }
2487
+ attr_accessor :created_at
2488
+
2489
+ # The payment provider that attempted to collect the payment.
2490
+ sig do
2491
+ returns(
2492
+ T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt::PaymentProvider::TaggedSymbol)
2493
+ )
2494
+ end
2495
+ attr_accessor :payment_provider
2496
+
2497
+ # The ID of the payment attempt in the payment provider.
2498
+ sig { returns(T.nilable(String)) }
2499
+ attr_accessor :payment_provider_id
2500
+
2501
+ # Whether the payment attempt succeeded.
2502
+ sig { returns(T::Boolean) }
2503
+ attr_accessor :succeeded
2504
+
2505
+ sig do
2506
+ params(
2507
+ id: String,
2508
+ amount: String,
2509
+ created_at: Time,
2510
+ payment_provider: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt::PaymentProvider::OrSymbol),
2511
+ payment_provider_id: T.nilable(String),
2512
+ succeeded: T::Boolean
2513
+ )
2514
+ .returns(T.attached_class)
2515
+ end
2516
+ def self.new(id:, amount:, created_at:, payment_provider:, payment_provider_id:, succeeded:)
2517
+ end
2518
+
2519
+ sig do
2520
+ override
2521
+ .returns(
2522
+ {
2523
+ id: String,
2524
+ amount: String,
2525
+ created_at: Time,
2526
+ payment_provider: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt::PaymentProvider::TaggedSymbol),
2527
+ payment_provider_id: T.nilable(String),
2528
+ succeeded: T::Boolean
2529
+ }
2530
+ )
2531
+ end
2532
+ def to_hash
2533
+ end
2534
+
2535
+ # The payment provider that attempted to collect the payment.
2536
+ module PaymentProvider
2537
+ extend Orb::Enum
2538
+
2539
+ TaggedSymbol =
2540
+ T.type_alias { T.all(Symbol, Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt::PaymentProvider) }
2541
+ OrSymbol =
2542
+ T.type_alias do
2543
+ T.any(
2544
+ Symbol,
2545
+ String,
2546
+ Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt::PaymentProvider::TaggedSymbol
2547
+ )
2548
+ end
2549
+
2550
+ STRIPE =
2551
+ T.let(:stripe, Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt::PaymentProvider::TaggedSymbol)
2552
+
2553
+ sig do
2554
+ override
2555
+ .returns(
2556
+ T::Array[Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt::PaymentProvider::TaggedSymbol]
2557
+ )
2558
+ end
2559
+ def self.values
2560
+ end
2561
+ end
2562
+ end
2563
+
2564
+ class ShippingAddress < Orb::BaseModel
2565
+ sig { returns(T.nilable(String)) }
2566
+ attr_accessor :city
2567
+
2568
+ sig { returns(T.nilable(String)) }
2569
+ attr_accessor :country
2570
+
2571
+ sig { returns(T.nilable(String)) }
2572
+ attr_accessor :line1
2573
+
2574
+ sig { returns(T.nilable(String)) }
2575
+ attr_accessor :line2
2576
+
2577
+ sig { returns(T.nilable(String)) }
2578
+ attr_accessor :postal_code
2579
+
2580
+ sig { returns(T.nilable(String)) }
2581
+ attr_accessor :state
2582
+
2583
+ sig do
2584
+ params(
2585
+ city: T.nilable(String),
2586
+ country: T.nilable(String),
2587
+ line1: T.nilable(String),
2588
+ line2: T.nilable(String),
2589
+ postal_code: T.nilable(String),
2590
+ state: T.nilable(String)
2591
+ )
2592
+ .returns(T.attached_class)
2593
+ end
2594
+ def self.new(city:, country:, line1:, line2:, postal_code:, state:)
2595
+ end
2596
+
2597
+ sig do
2598
+ override
2599
+ .returns(
2600
+ {
2601
+ city: T.nilable(String),
2602
+ country: T.nilable(String),
2603
+ line1: T.nilable(String),
2604
+ line2: T.nilable(String),
2605
+ postal_code: T.nilable(String),
2606
+ state: T.nilable(String)
2607
+ }
2608
+ )
2609
+ end
2610
+ def to_hash
2611
+ end
2612
+ end
2613
+
2614
+ module Status
2615
+ extend Orb::Enum
2616
+
2617
+ TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::InvoiceFetchUpcomingResponse::Status) }
2618
+ OrSymbol =
2619
+ T.type_alias { T.any(Symbol, String, Orb::Models::InvoiceFetchUpcomingResponse::Status::TaggedSymbol) }
2620
+
2621
+ ISSUED = T.let(:issued, Orb::Models::InvoiceFetchUpcomingResponse::Status::TaggedSymbol)
2622
+ PAID = T.let(:paid, Orb::Models::InvoiceFetchUpcomingResponse::Status::TaggedSymbol)
2623
+ SYNCED = T.let(:synced, Orb::Models::InvoiceFetchUpcomingResponse::Status::TaggedSymbol)
2624
+ VOID = T.let(:void, Orb::Models::InvoiceFetchUpcomingResponse::Status::TaggedSymbol)
2625
+ DRAFT = T.let(:draft, Orb::Models::InvoiceFetchUpcomingResponse::Status::TaggedSymbol)
2626
+
2627
+ sig { override.returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::Status::TaggedSymbol]) }
2628
+ def self.values
2629
+ end
2630
+ end
2631
+
2632
+ class Subscription < Orb::BaseModel
2633
+ sig { returns(String) }
2634
+ attr_accessor :id
2635
+
2636
+ sig { params(id: String).returns(T.attached_class) }
2637
+ def self.new(id:)
2638
+ end
2639
+
2640
+ sig { override.returns({id: String}) }
2641
+ def to_hash
2642
+ end
2643
+ end
2644
+ end
2645
+ end
2646
+ end