orb-billing 0.1.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. checksums.yaml +4 -4
  2. data/.ignore +2 -0
  3. data/CHANGELOG.md +65 -0
  4. data/README.md +61 -51
  5. data/lib/orb/client.rb +7 -6
  6. data/lib/orb/file_part.rb +55 -0
  7. data/lib/orb/internal/page.rb +37 -39
  8. data/lib/orb/internal/transport/base_client.rb +21 -11
  9. data/lib/orb/internal/transport/pooled_net_requester.rb +3 -3
  10. data/lib/orb/internal/type/array_of.rb +28 -2
  11. data/lib/orb/internal/type/base_model.rb +83 -21
  12. data/lib/orb/internal/type/base_page.rb +10 -1
  13. data/lib/orb/internal/type/boolean.rb +6 -0
  14. data/lib/orb/internal/type/converter.rb +28 -1
  15. data/lib/orb/internal/type/enum.rb +28 -8
  16. data/lib/orb/internal/type/{io_like.rb → file_input.rb} +35 -15
  17. data/lib/orb/internal/type/hash_of.rb +28 -2
  18. data/lib/orb/internal/type/request_parameters.rb +1 -2
  19. data/lib/orb/internal/type/union.rb +27 -4
  20. data/lib/orb/internal/type/unknown.rb +6 -0
  21. data/lib/orb/internal/util.rb +105 -70
  22. data/lib/orb/internal.rb +5 -2
  23. data/lib/orb/models/alert.rb +68 -71
  24. data/lib/orb/models/alert_create_for_customer_params.rb +20 -25
  25. data/lib/orb/models/alert_create_for_external_customer_params.rb +20 -25
  26. data/lib/orb/models/alert_create_for_subscription_params.rb +20 -25
  27. data/lib/orb/models/alert_disable_params.rb +5 -9
  28. data/lib/orb/models/alert_enable_params.rb +5 -9
  29. data/lib/orb/models/alert_list_params.rb +26 -36
  30. data/lib/orb/models/alert_retrieve_params.rb +3 -8
  31. data/lib/orb/models/alert_update_params.rb +14 -18
  32. data/lib/orb/models/amount_discount.rb +14 -14
  33. data/lib/orb/models/billable_metric.rb +23 -20
  34. data/lib/orb/models/billing_cycle_relative_date.rb +2 -5
  35. data/lib/orb/models/coupon.rb +28 -21
  36. data/lib/orb/models/coupon_archive_params.rb +3 -8
  37. data/lib/orb/models/coupon_create_params.rb +24 -29
  38. data/lib/orb/models/coupon_fetch_params.rb +3 -8
  39. data/lib/orb/models/coupon_list_params.rb +17 -17
  40. data/lib/orb/models/coupons/subscription_list_params.rb +12 -15
  41. data/lib/orb/models/credit_note.rb +100 -166
  42. data/lib/orb/models/credit_note_create_params.rb +15 -23
  43. data/lib/orb/models/credit_note_fetch_params.rb +3 -8
  44. data/lib/orb/models/credit_note_list_params.rb +20 -30
  45. data/lib/orb/models/customer.rb +224 -271
  46. data/lib/orb/models/customer_create_params.rb +211 -252
  47. data/lib/orb/models/customer_delete_params.rb +3 -8
  48. data/lib/orb/models/customer_fetch_by_external_id_params.rb +3 -8
  49. data/lib/orb/models/customer_fetch_params.rb +3 -8
  50. data/lib/orb/models/customer_list_params.rb +20 -30
  51. data/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rb +3 -8
  52. data/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rb +3 -8
  53. data/lib/orb/models/customer_update_by_external_id_params.rb +207 -250
  54. data/lib/orb/models/customer_update_params.rb +207 -250
  55. data/lib/orb/models/customers/balance_transaction_create_params.rb +11 -16
  56. data/lib/orb/models/customers/balance_transaction_create_response.rb +33 -51
  57. data/lib/orb/models/customers/balance_transaction_list_params.rb +20 -30
  58. data/lib/orb/models/customers/balance_transaction_list_response.rb +33 -51
  59. data/lib/orb/models/customers/cost_list_by_external_id_params.rb +17 -17
  60. data/lib/orb/models/customers/cost_list_by_external_id_response.rb +22 -26
  61. data/lib/orb/models/customers/cost_list_params.rb +17 -17
  62. data/lib/orb/models/customers/cost_list_response.rb +22 -26
  63. data/lib/orb/models/customers/credit_list_by_external_id_params.rb +18 -22
  64. data/lib/orb/models/customers/credit_list_by_external_id_response.rb +10 -17
  65. data/lib/orb/models/customers/credit_list_params.rb +18 -22
  66. data/lib/orb/models/customers/credit_list_response.rb +10 -17
  67. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +64 -66
  68. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +300 -406
  69. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +63 -66
  70. data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +300 -406
  71. data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +33 -48
  72. data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +300 -406
  73. data/lib/orb/models/customers/credits/ledger_list_params.rb +32 -48
  74. data/lib/orb/models/customers/credits/ledger_list_response.rb +300 -406
  75. data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +47 -50
  76. data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +43 -46
  77. data/lib/orb/models/customers/credits/top_up_create_params.rb +46 -50
  78. data/lib/orb/models/customers/credits/top_up_create_response.rb +42 -46
  79. data/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rb +4 -9
  80. data/lib/orb/models/customers/credits/top_up_delete_params.rb +4 -9
  81. data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +12 -15
  82. data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +43 -46
  83. data/lib/orb/models/customers/credits/top_up_list_params.rb +12 -15
  84. data/lib/orb/models/customers/credits/top_up_list_response.rb +42 -46
  85. data/lib/orb/models/dimensional_price_group.rb +21 -15
  86. data/lib/orb/models/dimensional_price_group_create_params.rb +17 -23
  87. data/lib/orb/models/dimensional_price_group_list_params.rb +12 -15
  88. data/lib/orb/models/dimensional_price_group_retrieve_params.rb +3 -8
  89. data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rb +3 -8
  90. data/lib/orb/models/dimensional_price_groups.rb +3 -7
  91. data/lib/orb/models/discount.rb +2 -3
  92. data/lib/orb/models/evaluate_price_group.rb +8 -11
  93. data/lib/orb/models/event_deprecate_params.rb +3 -8
  94. data/lib/orb/models/event_deprecate_response.rb +2 -6
  95. data/lib/orb/models/event_ingest_params.rb +33 -27
  96. data/lib/orb/models/event_ingest_response.rb +23 -24
  97. data/lib/orb/models/event_search_params.rb +15 -11
  98. data/lib/orb/models/event_search_response.rb +27 -22
  99. data/lib/orb/models/event_update_params.rb +19 -13
  100. data/lib/orb/models/event_update_response.rb +2 -6
  101. data/lib/orb/models/events/backfill_close_params.rb +3 -8
  102. data/lib/orb/models/events/backfill_close_response.rb +34 -39
  103. data/lib/orb/models/events/backfill_create_params.rb +28 -32
  104. data/lib/orb/models/events/backfill_create_response.rb +34 -39
  105. data/lib/orb/models/events/backfill_fetch_params.rb +3 -8
  106. data/lib/orb/models/events/backfill_fetch_response.rb +34 -39
  107. data/lib/orb/models/events/backfill_list_params.rb +12 -15
  108. data/lib/orb/models/events/backfill_list_response.rb +34 -39
  109. data/lib/orb/models/events/backfill_revert_params.rb +3 -8
  110. data/lib/orb/models/events/backfill_revert_response.rb +34 -39
  111. data/lib/orb/models/events/event_volumes.rb +11 -17
  112. data/lib/orb/models/events/volume_list_params.rb +19 -22
  113. data/lib/orb/models/invoice.rb +589 -637
  114. data/lib/orb/models/invoice_create_params.rb +52 -61
  115. data/lib/orb/models/invoice_fetch_params.rb +3 -8
  116. data/lib/orb/models/invoice_fetch_upcoming_params.rb +4 -9
  117. data/lib/orb/models/invoice_fetch_upcoming_response.rb +584 -631
  118. data/lib/orb/models/invoice_issue_params.rb +10 -14
  119. data/lib/orb/models/invoice_level_discount.rb +2 -3
  120. data/lib/orb/models/invoice_line_item_create_params.rb +19 -14
  121. data/lib/orb/models/invoice_line_item_create_response.rb +247 -269
  122. data/lib/orb/models/invoice_list_params.rb +51 -66
  123. data/lib/orb/models/invoice_mark_paid_params.rb +9 -11
  124. data/lib/orb/models/invoice_pay_params.rb +3 -8
  125. data/lib/orb/models/invoice_update_params.rb +9 -9
  126. data/lib/orb/models/invoice_void_params.rb +3 -8
  127. data/lib/orb/models/item.rb +14 -25
  128. data/lib/orb/models/item_create_params.rb +5 -9
  129. data/lib/orb/models/item_fetch_params.rb +3 -8
  130. data/lib/orb/models/item_list_params.rb +12 -15
  131. data/lib/orb/models/item_update_params.rb +10 -22
  132. data/lib/orb/models/metric_create_params.rb +17 -13
  133. data/lib/orb/models/metric_fetch_params.rb +3 -8
  134. data/lib/orb/models/metric_list_params.rb +20 -30
  135. data/lib/orb/models/metric_update_params.rb +9 -9
  136. data/lib/orb/models/pagination_metadata.rb +3 -7
  137. data/lib/orb/models/percentage_discount.rb +15 -14
  138. data/lib/orb/models/plan.rb +250 -279
  139. data/lib/orb/models/plan_create_params.rb +1623 -1984
  140. data/lib/orb/models/plan_fetch_params.rb +3 -8
  141. data/lib/orb/models/plan_list_params.rb +25 -42
  142. data/lib/orb/models/plan_update_params.rb +12 -10
  143. data/lib/orb/models/plans/external_plan_id_fetch_params.rb +3 -8
  144. data/lib/orb/models/plans/external_plan_id_update_params.rb +12 -10
  145. data/lib/orb/models/price.rb +2709 -3820
  146. data/lib/orb/models/price_create_params.rb +203 -244
  147. data/lib/orb/models/price_evaluate_params.rb +21 -30
  148. data/lib/orb/models/price_evaluate_response.rb +2 -6
  149. data/lib/orb/models/price_fetch_params.rb +3 -8
  150. data/lib/orb/models/price_list_params.rb +12 -15
  151. data/lib/orb/models/price_update_params.rb +9 -9
  152. data/lib/orb/models/prices/external_price_id_fetch_params.rb +3 -8
  153. data/lib/orb/models/prices/external_price_id_update_params.rb +9 -9
  154. data/lib/orb/models/subscription.rb +343 -382
  155. data/lib/orb/models/subscription_cancel_params.rb +16 -16
  156. data/lib/orb/models/subscription_cancel_response.rb +339 -377
  157. data/lib/orb/models/subscription_change_apply_params.rb +7 -10
  158. data/lib/orb/models/subscription_change_apply_response.rb +365 -398
  159. data/lib/orb/models/subscription_change_cancel_params.rb +3 -8
  160. data/lib/orb/models/subscription_change_cancel_response.rb +365 -398
  161. data/lib/orb/models/subscription_change_retrieve_params.rb +3 -8
  162. data/lib/orb/models/subscription_change_retrieve_response.rb +366 -398
  163. data/lib/orb/models/subscription_create_params.rb +3771 -4402
  164. data/lib/orb/models/subscription_create_response.rb +339 -377
  165. data/lib/orb/models/subscription_fetch_costs_params.rb +17 -17
  166. data/lib/orb/models/subscription_fetch_costs_response.rb +22 -26
  167. data/lib/orb/models/subscription_fetch_params.rb +3 -8
  168. data/lib/orb/models/subscription_fetch_schedule_params.rb +20 -30
  169. data/lib/orb/models/subscription_fetch_schedule_response.rb +15 -17
  170. data/lib/orb/models/subscription_fetch_usage_params.rb +32 -43
  171. data/lib/orb/models/subscription_list_params.rb +28 -41
  172. data/lib/orb/models/subscription_price_intervals_params.rb +2018 -2472
  173. data/lib/orb/models/subscription_price_intervals_response.rb +342 -377
  174. data/lib/orb/models/subscription_schedule_plan_change_params.rb +3764 -4392
  175. data/lib/orb/models/subscription_schedule_plan_change_response.rb +342 -377
  176. data/lib/orb/models/subscription_trigger_phase_params.rb +12 -10
  177. data/lib/orb/models/subscription_trigger_phase_response.rb +341 -377
  178. data/lib/orb/models/subscription_unschedule_cancellation_params.rb +3 -8
  179. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +342 -377
  180. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rb +5 -9
  181. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +343 -377
  182. data/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb +3 -8
  183. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +343 -377
  184. data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +22 -33
  185. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +342 -377
  186. data/lib/orb/models/subscription_update_params.rb +21 -23
  187. data/lib/orb/models/subscription_update_trial_params.rb +15 -18
  188. data/lib/orb/models/subscription_update_trial_response.rb +341 -377
  189. data/lib/orb/models/subscription_usage.rb +37 -80
  190. data/lib/orb/models/subscriptions.rb +3 -7
  191. data/lib/orb/models/top_level_ping_params.rb +3 -8
  192. data/lib/orb/models/top_level_ping_response.rb +2 -6
  193. data/lib/orb/models/trial_discount.rb +16 -24
  194. data/lib/orb/models/usage_discount.rb +15 -14
  195. data/lib/orb/request_options.rb +3 -4
  196. data/lib/orb/resources/alerts.rb +48 -17
  197. data/lib/orb/resources/coupons/subscriptions.rb +9 -2
  198. data/lib/orb/resources/coupons.rb +25 -7
  199. data/lib/orb/resources/credit_notes.rb +17 -4
  200. data/lib/orb/resources/customers/balance_transactions.rb +18 -3
  201. data/lib/orb/resources/customers/costs.rb +26 -8
  202. data/lib/orb/resources/customers/credits/ledger.rb +108 -28
  203. data/lib/orb/resources/customers/credits/top_ups.rb +67 -20
  204. data/lib/orb/resources/customers/credits.rb +28 -8
  205. data/lib/orb/resources/customers.rb +135 -36
  206. data/lib/orb/resources/dimensional_price_groups.rb +19 -4
  207. data/lib/orb/resources/events/backfills.rb +32 -9
  208. data/lib/orb/resources/events/volume.rb +14 -4
  209. data/lib/orb/resources/events.rb +40 -11
  210. data/lib/orb/resources/invoice_line_items.rb +16 -6
  211. data/lib/orb/resources/invoices.rb +77 -17
  212. data/lib/orb/resources/items.rb +10 -3
  213. data/lib/orb/resources/metrics.rb +33 -8
  214. data/lib/orb/resources/plans/external_plan_id.rb +10 -2
  215. data/lib/orb/resources/plans.rb +47 -11
  216. data/lib/orb/resources/prices/external_price_id.rb +7 -1
  217. data/lib/orb/resources/prices.rb +97 -22
  218. data/lib/orb/resources/subscription_changes.rb +5 -2
  219. data/lib/orb/resources/subscriptions.rb +292 -78
  220. data/lib/orb/version.rb +1 -1
  221. data/lib/orb.rb +2 -10
  222. data/rbi/lib/orb/client.rbi +7 -6
  223. data/rbi/lib/orb/file_part.rbi +34 -0
  224. data/rbi/lib/orb/internal/page.rbi +1 -0
  225. data/rbi/lib/orb/internal/transport/base_client.rbi +18 -3
  226. data/rbi/lib/orb/internal/type/array_of.rbi +15 -9
  227. data/rbi/lib/orb/internal/type/base_model.rbi +22 -0
  228. data/rbi/lib/orb/internal/type/base_page.rbi +2 -0
  229. data/rbi/lib/orb/internal/type/boolean.rbi +4 -5
  230. data/rbi/lib/orb/internal/type/converter.rbi +8 -0
  231. data/rbi/lib/orb/internal/type/enum.rbi +7 -6
  232. data/rbi/lib/orb/internal/type/{io_like.rbi → file_input.rbi} +9 -7
  233. data/rbi/lib/orb/internal/type/hash_of.rbi +15 -9
  234. data/rbi/lib/orb/internal/type/union.rbi +7 -0
  235. data/rbi/lib/orb/internal/type/unknown.rbi +4 -5
  236. data/rbi/lib/orb/internal/util.rbi +39 -19
  237. data/rbi/lib/orb/internal.rbi +1 -2
  238. data/rbi/lib/orb/models/alert.rbi +28 -8
  239. data/rbi/lib/orb/models/alert_create_for_customer_params.rbi +16 -6
  240. data/rbi/lib/orb/models/alert_create_for_external_customer_params.rbi +16 -6
  241. data/rbi/lib/orb/models/alert_create_for_subscription_params.rbi +16 -6
  242. data/rbi/lib/orb/models/alert_disable_params.rbi +5 -2
  243. data/rbi/lib/orb/models/alert_enable_params.rbi +5 -2
  244. data/rbi/lib/orb/models/alert_list_params.rbi +6 -0
  245. data/rbi/lib/orb/models/alert_update_params.rbi +11 -4
  246. data/rbi/lib/orb/models/amount_discount.rbi +10 -4
  247. data/rbi/lib/orb/models/billable_metric.rbi +16 -3
  248. data/rbi/lib/orb/models/billing_cycle_relative_date.rbi +1 -1
  249. data/rbi/lib/orb/models/coupon.rbi +10 -3
  250. data/rbi/lib/orb/models/coupon_create_params.rbi +6 -3
  251. data/rbi/lib/orb/models/coupon_list_params.rbi +13 -3
  252. data/rbi/lib/orb/models/coupons/subscription_list_params.rbi +8 -2
  253. data/rbi/lib/orb/models/credit_note.rbi +44 -12
  254. data/rbi/lib/orb/models/credit_note_create_params.rbi +15 -6
  255. data/rbi/lib/orb/models/credit_note_list_params.rbi +3 -0
  256. data/rbi/lib/orb/models/customer.rbi +130 -11
  257. data/rbi/lib/orb/models/customer_create_params.rbi +142 -8
  258. data/rbi/lib/orb/models/customer_list_params.rbi +3 -0
  259. data/rbi/lib/orb/models/customer_update_by_external_id_params.rbi +140 -8
  260. data/rbi/lib/orb/models/customer_update_params.rbi +140 -8
  261. data/rbi/lib/orb/models/customers/balance_transaction_create_params.rbi +8 -4
  262. data/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi +18 -8
  263. data/rbi/lib/orb/models/customers/balance_transaction_list_params.rbi +3 -0
  264. data/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi +18 -8
  265. data/rbi/lib/orb/models/customers/cost_list_by_external_id_params.rbi +9 -5
  266. data/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi +21 -4
  267. data/rbi/lib/orb/models/customers/cost_list_params.rbi +9 -5
  268. data/rbi/lib/orb/models/customers/cost_list_response.rbi +21 -4
  269. data/rbi/lib/orb/models/customers/credit_list_by_external_id_params.rbi +13 -3
  270. data/rbi/lib/orb/models/customers/credit_list_by_external_id_response.rbi +1 -2
  271. data/rbi/lib/orb/models/customers/credit_list_params.rbi +13 -3
  272. data/rbi/lib/orb/models/customers/credit_list_response.rbi +1 -2
  273. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +40 -18
  274. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +35 -56
  275. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_params.rbi +40 -6
  276. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi +35 -56
  277. data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +6 -16
  278. data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +35 -56
  279. data/rbi/lib/orb/models/customers/credits/ledger_list_params.rbi +6 -4
  280. data/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi +35 -56
  281. data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +27 -10
  282. data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +25 -10
  283. data/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi +27 -4
  284. data/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi +25 -10
  285. data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +8 -2
  286. data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +25 -10
  287. data/rbi/lib/orb/models/customers/credits/top_up_list_params.rbi +8 -2
  288. data/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi +25 -4
  289. data/rbi/lib/orb/models/dimensional_price_group.rbi +11 -3
  290. data/rbi/lib/orb/models/dimensional_price_group_create_params.rbi +4 -0
  291. data/rbi/lib/orb/models/dimensional_price_group_list_params.rbi +8 -2
  292. data/rbi/lib/orb/models/evaluate_price_group.rbi +8 -2
  293. data/rbi/lib/orb/models/event_deprecate_response.rbi +4 -2
  294. data/rbi/lib/orb/models/event_ingest_params.rbi +22 -5
  295. data/rbi/lib/orb/models/event_ingest_response.rbi +15 -4
  296. data/rbi/lib/orb/models/event_search_params.rbi +14 -2
  297. data/rbi/lib/orb/models/event_search_response.rbi +14 -3
  298. data/rbi/lib/orb/models/event_update_params.rbi +10 -3
  299. data/rbi/lib/orb/models/event_update_response.rbi +4 -2
  300. data/rbi/lib/orb/models/events/backfill_close_response.rbi +14 -2
  301. data/rbi/lib/orb/models/events/backfill_create_params.rbi +18 -0
  302. data/rbi/lib/orb/models/events/backfill_create_response.rbi +14 -2
  303. data/rbi/lib/orb/models/events/backfill_fetch_response.rbi +14 -2
  304. data/rbi/lib/orb/models/events/backfill_list_params.rbi +8 -2
  305. data/rbi/lib/orb/models/events/backfill_list_response.rbi +14 -2
  306. data/rbi/lib/orb/models/events/backfill_revert_response.rbi +14 -2
  307. data/rbi/lib/orb/models/events/event_volumes.rbi +6 -2
  308. data/rbi/lib/orb/models/events/volume_list_params.rbi +18 -2
  309. data/rbi/lib/orb/models/invoice.rbi +375 -46
  310. data/rbi/lib/orb/models/invoice_create_params.rbi +38 -6
  311. data/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi +375 -66
  312. data/rbi/lib/orb/models/invoice_issue_params.rbi +9 -2
  313. data/rbi/lib/orb/models/invoice_line_item_create_params.rbi +16 -2
  314. data/rbi/lib/orb/models/invoice_line_item_create_response.rbi +141 -20
  315. data/rbi/lib/orb/models/invoice_list_params.rbi +9 -2
  316. data/rbi/lib/orb/models/invoice_mark_paid_params.rbi +9 -2
  317. data/rbi/lib/orb/models/invoice_update_params.rbi +7 -2
  318. data/rbi/lib/orb/models/item.rbi +1 -2
  319. data/rbi/lib/orb/models/item_create_params.rbi +5 -2
  320. data/rbi/lib/orb/models/item_list_params.rbi +8 -2
  321. data/rbi/lib/orb/models/item_update_params.rbi +1 -8
  322. data/rbi/lib/orb/models/metric_create_params.rbi +15 -2
  323. data/rbi/lib/orb/models/metric_list_params.rbi +3 -0
  324. data/rbi/lib/orb/models/metric_update_params.rbi +7 -2
  325. data/rbi/lib/orb/models/percentage_discount.rbi +11 -4
  326. data/rbi/lib/orb/models/plan.rbi +102 -15
  327. data/rbi/lib/orb/models/plan_create_params.rbi +997 -679
  328. data/rbi/lib/orb/models/plan_list_params.rbi +5 -1
  329. data/rbi/lib/orb/models/plan_update_params.rbi +11 -2
  330. data/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi +11 -2
  331. data/rbi/lib/orb/models/price.rbi +717 -688
  332. data/rbi/lib/orb/models/price_create_params.rbi +137 -53
  333. data/rbi/lib/orb/models/price_evaluate_params.rbi +10 -0
  334. data/rbi/lib/orb/models/price_list_params.rbi +8 -2
  335. data/rbi/lib/orb/models/price_update_params.rbi +7 -2
  336. data/rbi/lib/orb/models/prices/external_price_id_update_params.rbi +7 -2
  337. data/rbi/lib/orb/models/subscription.rbi +174 -11
  338. data/rbi/lib/orb/models/subscription_cancel_params.rbi +8 -5
  339. data/rbi/lib/orb/models/subscription_cancel_response.rbi +187 -14
  340. data/rbi/lib/orb/models/subscription_change_apply_params.rbi +7 -2
  341. data/rbi/lib/orb/models/subscription_change_apply_response.rbi +199 -18
  342. data/rbi/lib/orb/models/subscription_change_cancel_response.rbi +199 -18
  343. data/rbi/lib/orb/models/subscription_change_retrieve_response.rbi +199 -18
  344. data/rbi/lib/orb/models/subscription_create_params.rbi +2282 -1536
  345. data/rbi/lib/orb/models/subscription_create_response.rbi +187 -14
  346. data/rbi/lib/orb/models/subscription_fetch_costs_params.rbi +9 -5
  347. data/rbi/lib/orb/models/subscription_fetch_costs_response.rbi +21 -4
  348. data/rbi/lib/orb/models/subscription_fetch_schedule_params.rbi +3 -0
  349. data/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi +8 -2
  350. data/rbi/lib/orb/models/subscription_fetch_usage_params.rbi +13 -4
  351. data/rbi/lib/orb/models/subscription_list_params.rbi +4 -2
  352. data/rbi/lib/orb/models/subscription_price_intervals_params.rbi +1228 -861
  353. data/rbi/lib/orb/models/subscription_price_intervals_response.rbi +187 -14
  354. data/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi +2288 -1544
  355. data/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi +187 -14
  356. data/rbi/lib/orb/models/subscription_trigger_phase_params.rbi +10 -2
  357. data/rbi/lib/orb/models/subscription_trigger_phase_response.rbi +187 -14
  358. data/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi +187 -14
  359. data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +5 -2
  360. data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +187 -20
  361. data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +187 -14
  362. data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_params.rbi +11 -2
  363. data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi +187 -14
  364. data/rbi/lib/orb/models/subscription_update_params.rbi +15 -0
  365. data/rbi/lib/orb/models/subscription_update_trial_params.rbi +11 -5
  366. data/rbi/lib/orb/models/subscription_update_trial_response.rbi +187 -14
  367. data/rbi/lib/orb/models/subscription_usage.rbi +2 -16
  368. data/rbi/lib/orb/models/trial_discount.rbi +5 -1
  369. data/rbi/lib/orb/models/usage_discount.rbi +11 -3
  370. data/sig/orb/file_part.rbs +21 -0
  371. data/sig/orb/internal/transport/base_client.rbs +9 -3
  372. data/sig/orb/internal/type/array_of.rbs +4 -0
  373. data/sig/orb/internal/type/base_model.rbs +12 -0
  374. data/sig/orb/internal/type/converter.rbs +4 -0
  375. data/sig/orb/internal/type/enum.rbs +4 -2
  376. data/sig/orb/internal/type/{io_like.rbs → file_input.rbs} +1 -1
  377. data/sig/orb/internal/type/hash_of.rbs +4 -0
  378. data/sig/orb/internal/type/union.rbs +4 -0
  379. data/sig/orb/internal/util.rbs +16 -12
  380. data/sig/orb/internal.rbs +1 -1
  381. metadata +9 -5
@@ -77,13 +77,25 @@ module Orb
77
77
  .returns(T.attached_class)
78
78
  end
79
79
  def self.new(
80
+ # The amount to increment when the threshold is reached.
80
81
  amount:,
82
+ # The currency or custom pricing unit to use for this top-up. If this is a
83
+ # real-world currency, it must match the customer's invoicing currency.
81
84
  currency:,
85
+ # Settings for invoices generated by triggered top-ups.
82
86
  invoice_settings:,
87
+ # How much, in the customer's currency, to charge for each unit.
83
88
  per_unit_cost_basis:,
89
+ # The threshold at which to trigger the top-up. If the balance is at or below this
90
+ # threshold, the top-up will be triggered.
84
91
  threshold:,
92
+ # The date from which the top-up is active. If unspecified, the top-up is active
93
+ # immediately.
85
94
  active_from: nil,
95
+ # The number of days or months after which the top-up expires. If unspecified, it
96
+ # does not expire.
86
97
  expires_after: nil,
98
+ # The unit of expires_after.
87
99
  expires_after_unit: nil,
88
100
  request_options: {}
89
101
  ); end
@@ -139,8 +151,20 @@ module Orb
139
151
  )
140
152
  .returns(T.attached_class)
141
153
  end
142
- def self.new(auto_collection:, net_terms:, memo: nil, require_successful_payment: nil); end
143
-
154
+ def self.new(
155
+ # Whether the credits purchase invoice should auto collect with the customer's
156
+ # saved payment method.
157
+ auto_collection:,
158
+ # The net terms determines the difference between the invoice date and the issue
159
+ # date for the invoice. If you intend the invoice to be due on issue, set this
160
+ # to 0.
161
+ net_terms:,
162
+ # An optional memo to display on the invoice.
163
+ memo: nil,
164
+ # If true, new credit blocks created by this top-up will require that the
165
+ # corresponding invoice is paid before they can be drawn down from.
166
+ require_successful_payment: nil
167
+ ); end
144
168
  sig do
145
169
  override
146
170
  .returns(
@@ -161,14 +185,7 @@ module Orb
161
185
 
162
186
  TaggedSymbol =
163
187
  T.type_alias { T.all(Symbol, Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams::ExpiresAfterUnit) }
164
- OrSymbol =
165
- T.type_alias do
166
- T.any(
167
- Symbol,
168
- String,
169
- Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams::ExpiresAfterUnit::TaggedSymbol
170
- )
171
- end
188
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
172
189
 
173
190
  DAY =
174
191
  T.let(
@@ -74,12 +74,22 @@ module Orb
74
74
  end
75
75
  def self.new(
76
76
  id:,
77
+ # The amount to increment when the threshold is reached.
77
78
  amount:,
79
+ # The currency or custom pricing unit to use for this top-up. If this is a
80
+ # real-world currency, it must match the customer's invoicing currency.
78
81
  currency:,
82
+ # Settings for invoices generated by triggered top-ups.
79
83
  invoice_settings:,
84
+ # How much, in the customer's currency, to charge for each unit.
80
85
  per_unit_cost_basis:,
86
+ # The threshold at which to trigger the top-up. If the balance is at or below this
87
+ # threshold, the top-up will be triggered.
81
88
  threshold:,
89
+ # The number of days or months after which the top-up expires. If unspecified, it
90
+ # does not expire.
82
91
  expires_after: nil,
92
+ # The unit of expires_after.
83
93
  expires_after_unit: nil
84
94
  ); end
85
95
  sig do
@@ -135,8 +145,20 @@ module Orb
135
145
  )
136
146
  .returns(T.attached_class)
137
147
  end
138
- def self.new(auto_collection:, net_terms:, memo: nil, require_successful_payment: nil); end
139
-
148
+ def self.new(
149
+ # Whether the credits purchase invoice should auto collect with the customer's
150
+ # saved payment method.
151
+ auto_collection:,
152
+ # The net terms determines the difference between the invoice date and the issue
153
+ # date for the invoice. If you intend the invoice to be due on issue, set this
154
+ # to 0.
155
+ net_terms:,
156
+ # An optional memo to display on the invoice.
157
+ memo: nil,
158
+ # If true, new credit blocks created by this top-up will require that the
159
+ # corresponding invoice is paid before they can be drawn down from.
160
+ require_successful_payment: nil
161
+ ); end
140
162
  sig do
141
163
  override
142
164
  .returns(
@@ -157,14 +179,7 @@ module Orb
157
179
 
158
180
  TaggedSymbol =
159
181
  T.type_alias { T.all(Symbol, Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::ExpiresAfterUnit) }
160
- OrSymbol =
161
- T.type_alias do
162
- T.any(
163
- Symbol,
164
- String,
165
- Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::ExpiresAfterUnit::TaggedSymbol
166
- )
167
- end
182
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
168
183
 
169
184
  DAY =
170
185
  T.let(
@@ -67,13 +67,25 @@ module Orb
67
67
  .returns(T.attached_class)
68
68
  end
69
69
  def self.new(
70
+ # The amount to increment when the threshold is reached.
70
71
  amount:,
72
+ # The currency or custom pricing unit to use for this top-up. If this is a
73
+ # real-world currency, it must match the customer's invoicing currency.
71
74
  currency:,
75
+ # Settings for invoices generated by triggered top-ups.
72
76
  invoice_settings:,
77
+ # How much, in the customer's currency, to charge for each unit.
73
78
  per_unit_cost_basis:,
79
+ # The threshold at which to trigger the top-up. If the balance is at or below this
80
+ # threshold, the top-up will be triggered.
74
81
  threshold:,
82
+ # The date from which the top-up is active. If unspecified, the top-up is active
83
+ # immediately.
75
84
  active_from: nil,
85
+ # The number of days or months after which the top-up expires. If unspecified, it
86
+ # does not expire.
76
87
  expires_after: nil,
88
+ # The unit of expires_after.
77
89
  expires_after_unit: nil,
78
90
  request_options: {}
79
91
  ); end
@@ -129,8 +141,20 @@ module Orb
129
141
  )
130
142
  .returns(T.attached_class)
131
143
  end
132
- def self.new(auto_collection:, net_terms:, memo: nil, require_successful_payment: nil); end
133
-
144
+ def self.new(
145
+ # Whether the credits purchase invoice should auto collect with the customer's
146
+ # saved payment method.
147
+ auto_collection:,
148
+ # The net terms determines the difference between the invoice date and the issue
149
+ # date for the invoice. If you intend the invoice to be due on issue, set this
150
+ # to 0.
151
+ net_terms:,
152
+ # An optional memo to display on the invoice.
153
+ memo: nil,
154
+ # If true, new credit blocks created by this top-up will require that the
155
+ # corresponding invoice is paid before they can be drawn down from.
156
+ require_successful_payment: nil
157
+ ); end
134
158
  sig do
135
159
  override
136
160
  .returns(
@@ -151,8 +175,7 @@ module Orb
151
175
 
152
176
  TaggedSymbol =
153
177
  T.type_alias { T.all(Symbol, Orb::Models::Customers::Credits::TopUpCreateParams::ExpiresAfterUnit) }
154
- OrSymbol =
155
- T.type_alias { T.any(Symbol, String, Orb::Models::Customers::Credits::TopUpCreateParams::ExpiresAfterUnit::TaggedSymbol) }
178
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
156
179
 
157
180
  DAY = T.let(:day, Orb::Models::Customers::Credits::TopUpCreateParams::ExpiresAfterUnit::TaggedSymbol)
158
181
  MONTH = T.let(:month, Orb::Models::Customers::Credits::TopUpCreateParams::ExpiresAfterUnit::TaggedSymbol)
@@ -62,12 +62,22 @@ module Orb
62
62
  end
63
63
  def self.new(
64
64
  id:,
65
+ # The amount to increment when the threshold is reached.
65
66
  amount:,
67
+ # The currency or custom pricing unit to use for this top-up. If this is a
68
+ # real-world currency, it must match the customer's invoicing currency.
66
69
  currency:,
70
+ # Settings for invoices generated by triggered top-ups.
67
71
  invoice_settings:,
72
+ # How much, in the customer's currency, to charge for each unit.
68
73
  per_unit_cost_basis:,
74
+ # The threshold at which to trigger the top-up. If the balance is at or below this
75
+ # threshold, the top-up will be triggered.
69
76
  threshold:,
77
+ # The number of days or months after which the top-up expires. If unspecified, it
78
+ # does not expire.
70
79
  expires_after: nil,
80
+ # The unit of expires_after.
71
81
  expires_after_unit: nil
72
82
  ); end
73
83
  sig do
@@ -121,8 +131,20 @@ module Orb
121
131
  )
122
132
  .returns(T.attached_class)
123
133
  end
124
- def self.new(auto_collection:, net_terms:, memo: nil, require_successful_payment: nil); end
125
-
134
+ def self.new(
135
+ # Whether the credits purchase invoice should auto collect with the customer's
136
+ # saved payment method.
137
+ auto_collection:,
138
+ # The net terms determines the difference between the invoice date and the issue
139
+ # date for the invoice. If you intend the invoice to be due on issue, set this
140
+ # to 0.
141
+ net_terms:,
142
+ # An optional memo to display on the invoice.
143
+ memo: nil,
144
+ # If true, new credit blocks created by this top-up will require that the
145
+ # corresponding invoice is paid before they can be drawn down from.
146
+ require_successful_payment: nil
147
+ ); end
126
148
  sig do
127
149
  override
128
150
  .returns(
@@ -143,14 +165,7 @@ module Orb
143
165
 
144
166
  TaggedSymbol =
145
167
  T.type_alias { T.all(Symbol, Orb::Models::Customers::Credits::TopUpCreateResponse::ExpiresAfterUnit) }
146
- OrSymbol =
147
- T.type_alias do
148
- T.any(
149
- Symbol,
150
- String,
151
- Orb::Models::Customers::Credits::TopUpCreateResponse::ExpiresAfterUnit::TaggedSymbol
152
- )
153
- end
168
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
154
169
 
155
170
  DAY = T.let(:day, Orb::Models::Customers::Credits::TopUpCreateResponse::ExpiresAfterUnit::TaggedSymbol)
156
171
  MONTH =
@@ -28,8 +28,14 @@ module Orb
28
28
  )
29
29
  .returns(T.attached_class)
30
30
  end
31
- def self.new(cursor: nil, limit: nil, request_options: {}); end
32
-
31
+ def self.new(
32
+ # Cursor for pagination. This can be populated by the `next_cursor` value returned
33
+ # from the initial request.
34
+ cursor: nil,
35
+ # The number of items to fetch. Defaults to 20.
36
+ limit: nil,
37
+ request_options: {}
38
+ ); end
33
39
  sig do
34
40
  override.returns(
35
41
  {
@@ -72,12 +72,22 @@ module Orb
72
72
  end
73
73
  def self.new(
74
74
  id:,
75
+ # The amount to increment when the threshold is reached.
75
76
  amount:,
77
+ # The currency or custom pricing unit to use for this top-up. If this is a
78
+ # real-world currency, it must match the customer's invoicing currency.
76
79
  currency:,
80
+ # Settings for invoices generated by triggered top-ups.
77
81
  invoice_settings:,
82
+ # How much, in the customer's currency, to charge for each unit.
78
83
  per_unit_cost_basis:,
84
+ # The threshold at which to trigger the top-up. If the balance is at or below this
85
+ # threshold, the top-up will be triggered.
79
86
  threshold:,
87
+ # The number of days or months after which the top-up expires. If unspecified, it
88
+ # does not expire.
80
89
  expires_after: nil,
90
+ # The unit of expires_after.
81
91
  expires_after_unit: nil
82
92
  ); end
83
93
  sig do
@@ -131,8 +141,20 @@ module Orb
131
141
  )
132
142
  .returns(T.attached_class)
133
143
  end
134
- def self.new(auto_collection:, net_terms:, memo: nil, require_successful_payment: nil); end
135
-
144
+ def self.new(
145
+ # Whether the credits purchase invoice should auto collect with the customer's
146
+ # saved payment method.
147
+ auto_collection:,
148
+ # The net terms determines the difference between the invoice date and the issue
149
+ # date for the invoice. If you intend the invoice to be due on issue, set this
150
+ # to 0.
151
+ net_terms:,
152
+ # An optional memo to display on the invoice.
153
+ memo: nil,
154
+ # If true, new credit blocks created by this top-up will require that the
155
+ # corresponding invoice is paid before they can be drawn down from.
156
+ require_successful_payment: nil
157
+ ); end
136
158
  sig do
137
159
  override
138
160
  .returns(
@@ -153,14 +175,7 @@ module Orb
153
175
 
154
176
  TaggedSymbol =
155
177
  T.type_alias { T.all(Symbol, Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::ExpiresAfterUnit) }
156
- OrSymbol =
157
- T.type_alias do
158
- T.any(
159
- Symbol,
160
- String,
161
- Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::ExpiresAfterUnit::TaggedSymbol
162
- )
163
- end
178
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
164
179
 
165
180
  DAY =
166
181
  T.let(
@@ -28,8 +28,14 @@ module Orb
28
28
  )
29
29
  .returns(T.attached_class)
30
30
  end
31
- def self.new(cursor: nil, limit: nil, request_options: {}); end
32
-
31
+ def self.new(
32
+ # Cursor for pagination. This can be populated by the `next_cursor` value returned
33
+ # from the initial request.
34
+ cursor: nil,
35
+ # The number of items to fetch. Defaults to 20.
36
+ limit: nil,
37
+ request_options: {}
38
+ ); end
33
39
  sig do
34
40
  override.returns(
35
41
  {
@@ -62,12 +62,22 @@ module Orb
62
62
  end
63
63
  def self.new(
64
64
  id:,
65
+ # The amount to increment when the threshold is reached.
65
66
  amount:,
67
+ # The currency or custom pricing unit to use for this top-up. If this is a
68
+ # real-world currency, it must match the customer's invoicing currency.
66
69
  currency:,
70
+ # Settings for invoices generated by triggered top-ups.
67
71
  invoice_settings:,
72
+ # How much, in the customer's currency, to charge for each unit.
68
73
  per_unit_cost_basis:,
74
+ # The threshold at which to trigger the top-up. If the balance is at or below this
75
+ # threshold, the top-up will be triggered.
69
76
  threshold:,
77
+ # The number of days or months after which the top-up expires. If unspecified, it
78
+ # does not expire.
70
79
  expires_after: nil,
80
+ # The unit of expires_after.
71
81
  expires_after_unit: nil
72
82
  ); end
73
83
  sig do
@@ -121,8 +131,20 @@ module Orb
121
131
  )
122
132
  .returns(T.attached_class)
123
133
  end
124
- def self.new(auto_collection:, net_terms:, memo: nil, require_successful_payment: nil); end
125
-
134
+ def self.new(
135
+ # Whether the credits purchase invoice should auto collect with the customer's
136
+ # saved payment method.
137
+ auto_collection:,
138
+ # The net terms determines the difference between the invoice date and the issue
139
+ # date for the invoice. If you intend the invoice to be due on issue, set this
140
+ # to 0.
141
+ net_terms:,
142
+ # An optional memo to display on the invoice.
143
+ memo: nil,
144
+ # If true, new credit blocks created by this top-up will require that the
145
+ # corresponding invoice is paid before they can be drawn down from.
146
+ require_successful_payment: nil
147
+ ); end
126
148
  sig do
127
149
  override
128
150
  .returns(
@@ -143,8 +165,7 @@ module Orb
143
165
 
144
166
  TaggedSymbol =
145
167
  T.type_alias { T.all(Symbol, Orb::Models::Customers::Credits::TopUpListResponse::ExpiresAfterUnit) }
146
- OrSymbol =
147
- T.type_alias { T.any(Symbol, String, Orb::Models::Customers::Credits::TopUpListResponse::ExpiresAfterUnit::TaggedSymbol) }
168
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
148
169
 
149
170
  DAY = T.let(:day, Orb::Models::Customers::Credits::TopUpListResponse::ExpiresAfterUnit::TaggedSymbol)
150
171
  MONTH = T.let(:month, Orb::Models::Customers::Credits::TopUpListResponse::ExpiresAfterUnit::TaggedSymbol)
@@ -47,14 +47,22 @@ module Orb
47
47
  end
48
48
  def self.new(
49
49
  id:,
50
+ # The billable metric associated with this dimensional price group. All prices
51
+ # associated with this dimensional price group will be computed using this
52
+ # billable metric.
50
53
  billable_metric_id:,
54
+ # The dimensions that this dimensional price group is defined over
51
55
  dimensions:,
56
+ # An alias for the dimensional price group
52
57
  external_dimensional_price_group_id:,
58
+ # User specified key-value pairs for the resource. If not present, this defaults
59
+ # to an empty dictionary. Individual keys can be removed by setting the value to
60
+ # `null`, and the entire metadata mapping can be cleared by setting `metadata` to
61
+ # `null`.
53
62
  metadata:,
63
+ # The name of the dimensional price group
54
64
  name:
55
- )
56
- end
57
-
65
+ ); end
58
66
  sig do
59
67
  override
60
68
  .returns(
@@ -38,9 +38,13 @@ module Orb
38
38
  end
39
39
  def self.new(
40
40
  billable_metric_id:,
41
+ # The set of keys (in order) used to disambiguate prices in the group.
41
42
  dimensions:,
42
43
  name:,
43
44
  external_dimensional_price_group_id: nil,
45
+ # User-specified key/value pairs for the resource. Individual keys can be removed
46
+ # by setting the value to `null`, and the entire metadata mapping can be cleared
47
+ # by setting `metadata` to `null`.
44
48
  metadata: nil,
45
49
  request_options: {}
46
50
  ); end
@@ -26,8 +26,14 @@ module Orb
26
26
  )
27
27
  .returns(T.attached_class)
28
28
  end
29
- def self.new(cursor: nil, limit: nil, request_options: {}); end
30
-
29
+ def self.new(
30
+ # Cursor for pagination. This can be populated by the `next_cursor` value returned
31
+ # from the initial request.
32
+ cursor: nil,
33
+ # The number of items to fetch. Defaults to 20.
34
+ limit: nil,
35
+ request_options: {}
36
+ ); end
31
37
  sig do
32
38
  override.returns({cursor: T.nilable(String), limit: Integer, request_options: Orb::RequestOptions})
33
39
  end
@@ -19,8 +19,14 @@ module Orb
19
19
  params(amount: String, grouping_values: T::Array[T.any(String, Float, T::Boolean)], quantity: Float)
20
20
  .returns(T.attached_class)
21
21
  end
22
- def self.new(amount:, grouping_values:, quantity:); end
23
-
22
+ def self.new(
23
+ # The price's output for the group
24
+ amount:,
25
+ # The values for the group in the order specified by `grouping_keys`
26
+ grouping_values:,
27
+ # The price's usage quantity for the group
28
+ quantity:
29
+ ); end
24
30
  sig do
25
31
  override
26
32
  .returns({
@@ -8,8 +8,10 @@ module Orb
8
8
  attr_accessor :deprecated
9
9
 
10
10
  sig { params(deprecated: String).returns(T.attached_class) }
11
- def self.new(deprecated:); end
12
-
11
+ def self.new(
12
+ # event_id of the deprecated event, if successfully updated
13
+ deprecated:
14
+ ); end
13
15
  sig { override.returns({deprecated: String}) }
14
16
  def to_hash; end
15
17
  end
@@ -30,8 +30,15 @@ module Orb
30
30
  )
31
31
  .returns(T.attached_class)
32
32
  end
33
- def self.new(events:, backfill_id: nil, debug: nil, request_options: {}); end
34
-
33
+ def self.new(
34
+ events:,
35
+ # If this ingestion request is part of a backfill, this parameter ties the
36
+ # ingested events to the backfill
37
+ backfill_id: nil,
38
+ # Flag to enable additional debug information in the endpoint response
39
+ debug: nil,
40
+ request_options: {}
41
+ ); end
35
42
  sig do
36
43
  override
37
44
  .returns(
@@ -88,15 +95,25 @@ module Orb
88
95
  .returns(T.attached_class)
89
96
  end
90
97
  def self.new(
98
+ # A name to meaningfully identify the action or event type.
91
99
  event_name:,
100
+ # A unique value, generated by the client, that is used to de-duplicate events.
101
+ # Exactly one event with a given idempotency key will be ingested, which allows
102
+ # for safe request retries.
92
103
  idempotency_key:,
104
+ # A dictionary of custom properties. Values in this dictionary must be numeric,
105
+ # boolean, or strings. Nested dictionaries are disallowed.
93
106
  properties:,
107
+ # An ISO 8601 format date with no timezone offset (i.e. UTC). This should
108
+ # represent the time that usage was recorded, and is particularly important to
109
+ # attribute usage to a given billing period.
94
110
  timestamp:,
111
+ # The Orb Customer identifier
95
112
  customer_id: nil,
113
+ # An alias for the Orb customer, whose mapping is specified when creating the
114
+ # customer
96
115
  external_customer_id: nil
97
- )
98
- end
99
-
116
+ ); end
100
117
  sig do
101
118
  override
102
119
  .returns(
@@ -23,8 +23,14 @@ module Orb
23
23
  )
24
24
  .returns(T.attached_class)
25
25
  end
26
- def self.new(validation_failed:, debug: nil); end
27
-
26
+ def self.new(
27
+ # Contains all failing validation events. In the case of a 200, this array will
28
+ # always be empty. This field will always be present.
29
+ validation_failed:,
30
+ # Optional debug information (only present when debug=true is passed to the
31
+ # endpoint). Contains ingested and duplicate event idempotency keys.
32
+ debug: nil
33
+ ); end
28
34
  sig do
29
35
  override
30
36
  .returns(
@@ -47,8 +53,13 @@ module Orb
47
53
  attr_accessor :validation_errors
48
54
 
49
55
  sig { params(idempotency_key: String, validation_errors: T::Array[String]).returns(T.attached_class) }
50
- def self.new(idempotency_key:, validation_errors:); end
51
-
56
+ def self.new(
57
+ # The passed idempotency_key corresponding to the validation_errors
58
+ idempotency_key:,
59
+ # An array of strings corresponding to validation failures for this
60
+ # idempotency_key.
61
+ validation_errors:
62
+ ); end
52
63
  sig { override.returns({idempotency_key: String, validation_errors: T::Array[String]}) }
53
64
  def to_hash; end
54
65
  end
@@ -32,8 +32,20 @@ module Orb
32
32
  )
33
33
  .returns(T.attached_class)
34
34
  end
35
- def self.new(event_ids:, timeframe_end: nil, timeframe_start: nil, request_options: {}); end
36
-
35
+ def self.new(
36
+ # This is an explicit array of IDs to filter by. Note that an event's ID is the
37
+ # idempotency_key that was originally used for ingestion, and this only supports
38
+ # events that have not been amended. Values in this array will be treated case
39
+ # sensitively.
40
+ event_ids:,
41
+ # The end of the timeframe, exclusive, in which to search events. If not
42
+ # specified, the current time is used.
43
+ timeframe_end: nil,
44
+ # The start of the timeframe, inclusive, in which to search events. If not
45
+ # specified, the one week ago is used.
46
+ timeframe_start: nil,
47
+ request_options: {}
48
+ ); end
37
49
  sig do
38
50
  override
39
51
  .returns(
@@ -66,16 +66,27 @@ module Orb
66
66
  .returns(T.attached_class)
67
67
  end
68
68
  def self.new(
69
+ # A unique value, generated by the client, that is used to de-duplicate events.
70
+ # Exactly one event with a given idempotency key will be ingested, which allows
71
+ # for safe request retries.
69
72
  id:,
73
+ # The Orb Customer identifier
70
74
  customer_id:,
75
+ # A boolean indicating whether the event is currently deprecated.
71
76
  deprecated:,
77
+ # A name to meaningfully identify the action or event type.
72
78
  event_name:,
79
+ # An alias for the Orb customer, whose mapping is specified when creating the
80
+ # customer
73
81
  external_customer_id:,
82
+ # A dictionary of custom properties. Values in this dictionary must be numeric,
83
+ # boolean, or strings. Nested dictionaries are disallowed.
74
84
  properties:,
85
+ # An ISO 8601 format date with no timezone offset (i.e. UTC). This should
86
+ # represent the time that usage was recorded, and is particularly important to
87
+ # attribute usage to a given billing period.
75
88
  timestamp:
76
- )
77
- end
78
-
89
+ ); end
79
90
  sig do
80
91
  override
81
92
  .returns(
@@ -42,15 +42,22 @@ module Orb
42
42
  .returns(T.attached_class)
43
43
  end
44
44
  def self.new(
45
+ # A name to meaningfully identify the action or event type.
45
46
  event_name:,
47
+ # A dictionary of custom properties. Values in this dictionary must be numeric,
48
+ # boolean, or strings. Nested dictionaries are disallowed.
46
49
  properties:,
50
+ # An ISO 8601 format date with no timezone offset (i.e. UTC). This should
51
+ # represent the time that usage was recorded, and is particularly important to
52
+ # attribute usage to a given billing period.
47
53
  timestamp:,
54
+ # The Orb Customer identifier
48
55
  customer_id: nil,
56
+ # An alias for the Orb customer, whose mapping is specified when creating the
57
+ # customer
49
58
  external_customer_id: nil,
50
59
  request_options: {}
51
- )
52
- end
53
-
60
+ ); end
54
61
  sig do
55
62
  override
56
63
  .returns(
@@ -8,8 +8,10 @@ module Orb
8
8
  attr_accessor :amended
9
9
 
10
10
  sig { params(amended: String).returns(T.attached_class) }
11
- def self.new(amended:); end
12
-
11
+ def self.new(
12
+ # event_id of the amended event, if successfully ingested
13
+ amended:
14
+ ); end
13
15
  sig { override.returns({amended: String}) }
14
16
  def to_hash; end
15
17
  end