orb-billing 0.1.0.pre.alpha.37 → 0.1.0.pre.alpha.39

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 (402) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +29 -5
  3. data/lib/orb/client.rb +4 -0
  4. data/lib/orb/internal/page.rb +6 -2
  5. data/lib/orb/internal/transport/base_client.rb +3 -3
  6. data/lib/orb/internal/transport/pooled_net_requester.rb +2 -2
  7. data/lib/orb/internal/type/array_of.rb +5 -3
  8. data/lib/orb/internal/type/base_model.rb +19 -16
  9. data/lib/orb/internal/type/base_page.rb +4 -1
  10. data/lib/orb/internal/type/{boolean_model.rb → boolean.rb} +2 -2
  11. data/lib/orb/internal/type/converter.rb +26 -23
  12. data/lib/orb/internal/type/enum.rb +10 -8
  13. data/lib/orb/internal/type/hash_of.rb +3 -1
  14. data/lib/orb/internal/util.rb +29 -50
  15. data/lib/orb/models/alert.rb +10 -10
  16. data/lib/orb/models/alert_create_for_customer_params.rb +3 -3
  17. data/lib/orb/models/alert_create_for_external_customer_params.rb +3 -3
  18. data/lib/orb/models/alert_create_for_subscription_params.rb +3 -3
  19. data/lib/orb/models/alert_list_params.rb +5 -5
  20. data/lib/orb/models/alert_update_params.rb +3 -3
  21. data/lib/orb/models/amount_discount.rb +1 -1
  22. data/lib/orb/models/billable_metric.rb +7 -7
  23. data/lib/orb/models/coupon.rb +7 -7
  24. data/lib/orb/models/coupon_create_params.rb +2 -2
  25. data/lib/orb/models/coupon_list_params.rb +3 -3
  26. data/lib/orb/models/coupons/subscription_list_params.rb +1 -1
  27. data/lib/orb/models/credit_note.rb +1 -1
  28. data/lib/orb/models/credit_note_list_params.rb +5 -5
  29. data/lib/orb/models/customer.rb +237 -237
  30. data/lib/orb/models/customer_create_params.rb +229 -229
  31. data/lib/orb/models/customer_list_params.rb +5 -5
  32. data/lib/orb/models/customer_update_by_external_id_params.rb +230 -230
  33. data/lib/orb/models/customer_update_params.rb +230 -230
  34. data/lib/orb/models/customers/balance_transaction_create_response.rb +2 -2
  35. data/lib/orb/models/customers/balance_transaction_list_params.rb +5 -5
  36. data/lib/orb/models/customers/balance_transaction_list_response.rb +2 -2
  37. data/lib/orb/models/customers/cost_list_by_external_id_params.rb +6 -6
  38. data/lib/orb/models/customers/cost_list_params.rb +6 -6
  39. data/lib/orb/models/customers/credit_list_by_external_id_params.rb +3 -3
  40. data/lib/orb/models/customers/credit_list_params.rb +3 -3
  41. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +22 -22
  42. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +22 -22
  43. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +22 -22
  44. data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +22 -22
  45. data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +5 -5
  46. data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +22 -22
  47. data/lib/orb/models/customers/credits/ledger_list_params.rb +5 -5
  48. data/lib/orb/models/customers/credits/ledger_list_response.rb +22 -22
  49. data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +10 -10
  50. data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +9 -9
  51. data/lib/orb/models/customers/credits/top_up_create_params.rb +10 -10
  52. data/lib/orb/models/customers/credits/top_up_create_response.rb +9 -9
  53. data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +1 -1
  54. data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +9 -9
  55. data/lib/orb/models/customers/credits/top_up_list_params.rb +1 -1
  56. data/lib/orb/models/customers/credits/top_up_list_response.rb +9 -9
  57. data/lib/orb/models/dimensional_price_group.rb +7 -7
  58. data/lib/orb/models/dimensional_price_group_create_params.rb +2 -2
  59. data/lib/orb/models/dimensional_price_group_list_params.rb +1 -1
  60. data/lib/orb/models/evaluate_price_group.rb +1 -1
  61. data/lib/orb/models/event_ingest_params.rb +8 -8
  62. data/lib/orb/models/event_ingest_response.rb +4 -4
  63. data/lib/orb/models/event_search_params.rb +5 -5
  64. data/lib/orb/models/event_search_response.rb +9 -9
  65. data/lib/orb/models/event_update_params.rb +4 -4
  66. data/lib/orb/models/events/backfill_close_response.rb +8 -8
  67. data/lib/orb/models/events/backfill_create_params.rb +12 -12
  68. data/lib/orb/models/events/backfill_create_response.rb +8 -8
  69. data/lib/orb/models/events/backfill_fetch_response.rb +8 -8
  70. data/lib/orb/models/events/backfill_list_params.rb +1 -1
  71. data/lib/orb/models/events/backfill_list_response.rb +8 -8
  72. data/lib/orb/models/events/backfill_revert_response.rb +8 -8
  73. data/lib/orb/models/events/event_volumes.rb +1 -1
  74. data/lib/orb/models/events/volume_list_params.rb +7 -7
  75. data/lib/orb/models/invoice.rb +278 -278
  76. data/lib/orb/models/invoice_create_params.rb +13 -12
  77. data/lib/orb/models/invoice_fetch_upcoming_response.rb +274 -274
  78. data/lib/orb/models/invoice_issue_params.rb +5 -5
  79. data/lib/orb/models/invoice_line_item_create_params.rb +1 -1
  80. data/lib/orb/models/invoice_line_item_create_response.rb +32 -32
  81. data/lib/orb/models/invoice_list_params.rb +13 -13
  82. data/lib/orb/models/invoice_update_params.rb +2 -2
  83. data/lib/orb/models/item.rb +2 -2
  84. data/lib/orb/models/item_list_params.rb +1 -1
  85. data/lib/orb/models/metric_create_params.rb +2 -2
  86. data/lib/orb/models/metric_list_params.rb +5 -5
  87. data/lib/orb/models/metric_update_params.rb +2 -2
  88. data/lib/orb/models/pagination_metadata.rb +1 -1
  89. data/lib/orb/models/percentage_discount.rb +2 -2
  90. data/lib/orb/models/plan.rb +40 -40
  91. data/lib/orb/models/plan_create_params.rb +292 -292
  92. data/lib/orb/models/plan_list_params.rb +5 -5
  93. data/lib/orb/models/plan_update_params.rb +4 -4
  94. data/lib/orb/models/plans/external_plan_id_update_params.rb +4 -4
  95. data/lib/orb/models/price.rb +186 -186
  96. data/lib/orb/models/price_create_params.rb +21 -21
  97. data/lib/orb/models/price_evaluate_params.rb +4 -4
  98. data/lib/orb/models/price_list_params.rb +1 -1
  99. data/lib/orb/models/price_update_params.rb +2 -2
  100. data/lib/orb/models/prices/external_price_id_update_params.rb +2 -2
  101. data/lib/orb/models/subscription.rb +120 -93
  102. data/lib/orb/models/subscription_cancel_params.rb +4 -4
  103. data/lib/orb/models/subscription_cancel_response.rb +156 -78
  104. data/lib/orb/models/subscription_change_apply_params.rb +33 -0
  105. data/lib/orb/models/subscription_change_apply_response.rb +1372 -0
  106. data/lib/orb/models/subscription_change_cancel_params.rb +19 -0
  107. data/lib/orb/models/subscription_change_cancel_response.rb +1372 -0
  108. data/lib/orb/models/subscription_change_retrieve_params.rb +19 -0
  109. data/lib/orb/models/subscription_change_retrieve_response.rb +1372 -0
  110. data/lib/orb/models/subscription_create_params.rb +705 -705
  111. data/lib/orb/models/subscription_create_response.rb +156 -78
  112. data/lib/orb/models/subscription_fetch_costs_params.rb +6 -6
  113. data/lib/orb/models/subscription_fetch_schedule_params.rb +5 -5
  114. data/lib/orb/models/subscription_fetch_schedule_response.rb +2 -2
  115. data/lib/orb/models/subscription_fetch_usage_params.rb +8 -8
  116. data/lib/orb/models/subscription_list_params.rb +5 -5
  117. data/lib/orb/models/subscription_price_intervals_params.rb +358 -358
  118. data/lib/orb/models/subscription_price_intervals_response.rb +158 -78
  119. data/lib/orb/models/subscription_schedule_plan_change_params.rb +715 -715
  120. data/lib/orb/models/subscription_schedule_plan_change_response.rb +158 -78
  121. data/lib/orb/models/subscription_trigger_phase_params.rb +4 -4
  122. data/lib/orb/models/subscription_trigger_phase_response.rb +158 -78
  123. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +158 -78
  124. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +159 -79
  125. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +158 -78
  126. data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +9 -9
  127. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +158 -78
  128. data/lib/orb/models/subscription_update_params.rb +11 -11
  129. data/lib/orb/models/subscription_update_trial_params.rb +4 -4
  130. data/lib/orb/models/subscription_update_trial_response.rb +158 -78
  131. data/lib/orb/models/trial_discount.rb +1 -1
  132. data/lib/orb/models/usage_discount.rb +2 -2
  133. data/lib/orb/request_options.rb +7 -7
  134. data/lib/orb/resources/alerts.rb +40 -35
  135. data/lib/orb/resources/coupons/subscriptions.rb +3 -3
  136. data/lib/orb/resources/coupons.rb +9 -9
  137. data/lib/orb/resources/credit_notes.rb +10 -5
  138. data/lib/orb/resources/customers/balance_transactions.rb +28 -23
  139. data/lib/orb/resources/customers/costs.rb +232 -232
  140. data/lib/orb/resources/customers/credits/ledger.rb +348 -338
  141. data/lib/orb/resources/customers/credits/top_ups.rb +12 -12
  142. data/lib/orb/resources/customers/credits.rb +8 -8
  143. data/lib/orb/resources/customers.rb +61 -56
  144. data/lib/orb/resources/dimensional_price_groups.rb +6 -6
  145. data/lib/orb/resources/events/backfills.rb +49 -49
  146. data/lib/orb/resources/events/volume.rb +10 -10
  147. data/lib/orb/resources/events.rb +295 -295
  148. data/lib/orb/resources/invoice_line_items.rb +1 -1
  149. data/lib/orb/resources/invoices.rb +40 -31
  150. data/lib/orb/resources/items.rb +1 -1
  151. data/lib/orb/resources/metrics.rb +13 -8
  152. data/lib/orb/resources/plans/external_plan_id.rb +14 -14
  153. data/lib/orb/resources/plans.rb +24 -19
  154. data/lib/orb/resources/prices/external_price_id.rb +4 -4
  155. data/lib/orb/resources/prices.rb +30 -30
  156. data/lib/orb/resources/subscription_changes.rb +87 -0
  157. data/lib/orb/resources/subscriptions.rb +817 -807
  158. data/lib/orb/resources/top_level.rb +4 -4
  159. data/lib/orb/version.rb +1 -1
  160. data/lib/orb.rb +8 -1
  161. data/rbi/lib/orb/client.rbi +5 -4
  162. data/rbi/lib/orb/errors.rbi +3 -6
  163. data/rbi/lib/orb/internal/page.rbi +3 -6
  164. data/rbi/lib/orb/internal/transport/base_client.rbi +13 -27
  165. data/rbi/lib/orb/internal/transport/pooled_net_requester.rbi +7 -13
  166. data/rbi/lib/orb/internal/type/array_of.rbi +10 -18
  167. data/rbi/lib/orb/internal/type/base_model.rbi +45 -64
  168. data/rbi/lib/orb/internal/type/base_page.rbi +5 -10
  169. data/rbi/lib/orb/internal/type/{boolean_model.rbi → boolean.rbi} +5 -9
  170. data/rbi/lib/orb/internal/type/converter.rbi +25 -31
  171. data/rbi/lib/orb/internal/type/enum.rbi +14 -20
  172. data/rbi/lib/orb/internal/type/hash_of.rbi +8 -16
  173. data/rbi/lib/orb/internal/type/request_parameters.rbi +1 -2
  174. data/rbi/lib/orb/internal/type/union.rbi +10 -20
  175. data/rbi/lib/orb/internal/type/unknown.rbi +4 -8
  176. data/rbi/lib/orb/internal/util.rbi +40 -72
  177. data/rbi/lib/orb/internal.rbi +1 -1
  178. data/rbi/lib/orb/models/alert.rbi +21 -33
  179. data/rbi/lib/orb/models/alert_create_for_customer_params.rbi +8 -13
  180. data/rbi/lib/orb/models/alert_create_for_external_customer_params.rbi +8 -13
  181. data/rbi/lib/orb/models/alert_create_for_subscription_params.rbi +8 -13
  182. data/rbi/lib/orb/models/alert_disable_params.rbi +2 -4
  183. data/rbi/lib/orb/models/alert_enable_params.rbi +2 -4
  184. data/rbi/lib/orb/models/alert_list_params.rbi +3 -6
  185. data/rbi/lib/orb/models/alert_retrieve_params.rbi +2 -4
  186. data/rbi/lib/orb/models/alert_update_params.rbi +7 -11
  187. data/rbi/lib/orb/models/amount_discount.rbi +4 -7
  188. data/rbi/lib/orb/models/billable_metric.rbi +10 -13
  189. data/rbi/lib/orb/models/billing_cycle_relative_date.rbi +1 -2
  190. data/rbi/lib/orb/models/coupon.rbi +9 -11
  191. data/rbi/lib/orb/models/coupon_archive_params.rbi +2 -4
  192. data/rbi/lib/orb/models/coupon_create_params.rbi +8 -14
  193. data/rbi/lib/orb/models/coupon_fetch_params.rbi +2 -4
  194. data/rbi/lib/orb/models/coupon_list_params.rbi +3 -4
  195. data/rbi/lib/orb/models/coupons/subscription_list_params.rbi +3 -5
  196. data/rbi/lib/orb/models/credit_note.rbi +22 -45
  197. data/rbi/lib/orb/models/credit_note_create_params.rbi +5 -10
  198. data/rbi/lib/orb/models/credit_note_fetch_params.rbi +2 -4
  199. data/rbi/lib/orb/models/credit_note_list_params.rbi +3 -6
  200. data/rbi/lib/orb/models/customer.rbi +256 -281
  201. data/rbi/lib/orb/models/customer_create_params.rbi +251 -276
  202. data/rbi/lib/orb/models/customer_delete_params.rbi +2 -4
  203. data/rbi/lib/orb/models/customer_fetch_by_external_id_params.rbi +2 -4
  204. data/rbi/lib/orb/models/customer_fetch_params.rbi +2 -4
  205. data/rbi/lib/orb/models/customer_list_params.rbi +3 -6
  206. data/rbi/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +2 -4
  207. data/rbi/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +2 -4
  208. data/rbi/lib/orb/models/customer_update_by_external_id_params.rbi +252 -277
  209. data/rbi/lib/orb/models/customer_update_params.rbi +252 -277
  210. data/rbi/lib/orb/models/customers/balance_transaction_create_params.rbi +3 -6
  211. data/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi +10 -19
  212. data/rbi/lib/orb/models/customers/balance_transaction_list_params.rbi +3 -6
  213. data/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi +10 -19
  214. data/rbi/lib/orb/models/customers/cost_list_by_external_id_params.rbi +8 -10
  215. data/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi +6 -12
  216. data/rbi/lib/orb/models/customers/cost_list_params.rbi +8 -10
  217. data/rbi/lib/orb/models/customers/cost_list_response.rbi +6 -12
  218. data/rbi/lib/orb/models/customers/credit_list_by_external_id_params.rbi +3 -4
  219. data/rbi/lib/orb/models/customers/credit_list_by_external_id_response.rbi +2 -4
  220. data/rbi/lib/orb/models/customers/credit_list_params.rbi +3 -4
  221. data/rbi/lib/orb/models/customers/credit_list_response.rbi +2 -4
  222. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +26 -33
  223. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +79 -136
  224. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_params.rbi +26 -33
  225. data/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi +78 -135
  226. data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +5 -10
  227. data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +79 -136
  228. data/rbi/lib/orb/models/customers/credits/ledger_list_params.rbi +5 -10
  229. data/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi +74 -131
  230. data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +13 -19
  231. data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +12 -18
  232. data/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi +13 -19
  233. data/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi +12 -18
  234. data/rbi/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +2 -4
  235. data/rbi/lib/orb/models/customers/credits/top_up_delete_params.rbi +2 -4
  236. data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +3 -5
  237. data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +12 -18
  238. data/rbi/lib/orb/models/customers/credits/top_up_list_params.rbi +3 -5
  239. data/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi +12 -18
  240. data/rbi/lib/orb/models/dimensional_price_group.rbi +8 -9
  241. data/rbi/lib/orb/models/dimensional_price_group_create_params.rbi +4 -7
  242. data/rbi/lib/orb/models/dimensional_price_group_list_params.rbi +3 -5
  243. data/rbi/lib/orb/models/dimensional_price_group_retrieve_params.rbi +2 -4
  244. data/rbi/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +2 -4
  245. data/rbi/lib/orb/models/dimensional_price_groups.rbi +2 -4
  246. data/rbi/lib/orb/models/discount.rbi +1 -2
  247. data/rbi/lib/orb/models/evaluate_price_group.rbi +3 -6
  248. data/rbi/lib/orb/models/event_deprecate_params.rbi +2 -4
  249. data/rbi/lib/orb/models/event_deprecate_response.rbi +2 -4
  250. data/rbi/lib/orb/models/event_ingest_params.rbi +10 -13
  251. data/rbi/lib/orb/models/event_ingest_response.rbi +10 -16
  252. data/rbi/lib/orb/models/event_search_params.rbi +7 -9
  253. data/rbi/lib/orb/models/event_search_response.rbi +11 -14
  254. data/rbi/lib/orb/models/event_update_params.rbi +5 -6
  255. data/rbi/lib/orb/models/event_update_response.rbi +2 -4
  256. data/rbi/lib/orb/models/events/backfill_close_params.rbi +2 -4
  257. data/rbi/lib/orb/models/events/backfill_close_response.rbi +10 -14
  258. data/rbi/lib/orb/models/events/backfill_create_params.rbi +13 -16
  259. data/rbi/lib/orb/models/events/backfill_create_response.rbi +10 -14
  260. data/rbi/lib/orb/models/events/backfill_fetch_params.rbi +2 -4
  261. data/rbi/lib/orb/models/events/backfill_fetch_response.rbi +10 -14
  262. data/rbi/lib/orb/models/events/backfill_list_params.rbi +3 -5
  263. data/rbi/lib/orb/models/events/backfill_list_response.rbi +10 -14
  264. data/rbi/lib/orb/models/events/backfill_revert_params.rbi +2 -4
  265. data/rbi/lib/orb/models/events/backfill_revert_response.rbi +10 -14
  266. data/rbi/lib/orb/models/events/event_volumes.rbi +5 -9
  267. data/rbi/lib/orb/models/events/volume_list_params.rbi +9 -11
  268. data/rbi/lib/orb/models/invoice.rbi +388 -465
  269. data/rbi/lib/orb/models/invoice_create_params.rbi +19 -26
  270. data/rbi/lib/orb/models/invoice_fetch_params.rbi +2 -4
  271. data/rbi/lib/orb/models/invoice_fetch_upcoming_params.rbi +2 -4
  272. data/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi +381 -460
  273. data/rbi/lib/orb/models/invoice_issue_params.rbi +6 -8
  274. data/rbi/lib/orb/models/invoice_level_discount.rbi +1 -2
  275. data/rbi/lib/orb/models/invoice_line_item_create_params.rbi +3 -5
  276. data/rbi/lib/orb/models/invoice_line_item_create_response.rbi +101 -143
  277. data/rbi/lib/orb/models/invoice_list_params.rbi +8 -13
  278. data/rbi/lib/orb/models/invoice_mark_paid_params.rbi +2 -4
  279. data/rbi/lib/orb/models/invoice_pay_params.rbi +2 -4
  280. data/rbi/lib/orb/models/invoice_update_params.rbi +4 -6
  281. data/rbi/lib/orb/models/invoice_void_params.rbi +2 -4
  282. data/rbi/lib/orb/models/item.rbi +7 -12
  283. data/rbi/lib/orb/models/item_create_params.rbi +2 -4
  284. data/rbi/lib/orb/models/item_fetch_params.rbi +2 -4
  285. data/rbi/lib/orb/models/item_list_params.rbi +3 -5
  286. data/rbi/lib/orb/models/item_update_params.rbi +5 -10
  287. data/rbi/lib/orb/models/metric_create_params.rbi +4 -6
  288. data/rbi/lib/orb/models/metric_fetch_params.rbi +2 -4
  289. data/rbi/lib/orb/models/metric_list_params.rbi +3 -6
  290. data/rbi/lib/orb/models/metric_update_params.rbi +4 -6
  291. data/rbi/lib/orb/models/pagination_metadata.rbi +2 -4
  292. data/rbi/lib/orb/models/percentage_discount.rbi +5 -8
  293. data/rbi/lib/orb/models/plan.rbi +180 -219
  294. data/rbi/lib/orb/models/plan_create_params.rbi +670 -951
  295. data/rbi/lib/orb/models/plan_fetch_params.rbi +2 -4
  296. data/rbi/lib/orb/models/plan_list_params.rbi +4 -8
  297. data/rbi/lib/orb/models/plan_update_params.rbi +6 -8
  298. data/rbi/lib/orb/models/plans/external_plan_id_fetch_params.rbi +2 -4
  299. data/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi +6 -8
  300. data/rbi/lib/orb/models/price.rbi +827 -1494
  301. data/rbi/lib/orb/models/price_create_params.rbi +60 -101
  302. data/rbi/lib/orb/models/price_evaluate_params.rbi +6 -9
  303. data/rbi/lib/orb/models/price_evaluate_response.rbi +2 -4
  304. data/rbi/lib/orb/models/price_fetch_params.rbi +2 -4
  305. data/rbi/lib/orb/models/price_list_params.rbi +3 -5
  306. data/rbi/lib/orb/models/price_update_params.rbi +4 -6
  307. data/rbi/lib/orb/models/prices/external_price_id_fetch_params.rbi +2 -4
  308. data/rbi/lib/orb/models/prices/external_price_id_update_params.rbi +4 -6
  309. data/rbi/lib/orb/models/subscription.rbi +167 -187
  310. data/rbi/lib/orb/models/subscription_cancel_params.rbi +5 -7
  311. data/rbi/lib/orb/models/subscription_cancel_response.rbi +224 -178
  312. data/rbi/lib/orb/models/subscription_change_apply_params.rbi +40 -0
  313. data/rbi/lib/orb/models/subscription_change_apply_response.rbi +1554 -0
  314. data/rbi/lib/orb/models/subscription_change_cancel_params.rbi +18 -0
  315. data/rbi/lib/orb/models/subscription_change_cancel_response.rbi +1565 -0
  316. data/rbi/lib/orb/models/subscription_change_retrieve_params.rbi +18 -0
  317. data/rbi/lib/orb/models/subscription_change_retrieve_response.rbi +1581 -0
  318. data/rbi/lib/orb/models/subscription_create_params.rbi +1372 -1968
  319. data/rbi/lib/orb/models/subscription_create_response.rbi +224 -178
  320. data/rbi/lib/orb/models/subscription_fetch_costs_params.rbi +8 -10
  321. data/rbi/lib/orb/models/subscription_fetch_costs_response.rbi +6 -12
  322. data/rbi/lib/orb/models/subscription_fetch_params.rbi +2 -4
  323. data/rbi/lib/orb/models/subscription_fetch_schedule_params.rbi +3 -6
  324. data/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi +6 -10
  325. data/rbi/lib/orb/models/subscription_fetch_usage_params.rbi +12 -17
  326. data/rbi/lib/orb/models/subscription_list_params.rbi +4 -8
  327. data/rbi/lib/orb/models/subscription_price_intervals_params.rbi +772 -1124
  328. data/rbi/lib/orb/models/subscription_price_intervals_response.rbi +228 -178
  329. data/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi +1396 -1993
  330. data/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi +238 -182
  331. data/rbi/lib/orb/models/subscription_trigger_phase_params.rbi +5 -7
  332. data/rbi/lib/orb/models/subscription_trigger_phase_response.rbi +224 -178
  333. data/rbi/lib/orb/models/subscription_unschedule_cancellation_params.rbi +2 -4
  334. data/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi +238 -182
  335. data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +2 -4
  336. data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +265 -199
  337. data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +2 -4
  338. data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +264 -198
  339. data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_params.rbi +11 -15
  340. data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi +238 -182
  341. data/rbi/lib/orb/models/subscription_update_params.rbi +12 -15
  342. data/rbi/lib/orb/models/subscription_update_trial_params.rbi +6 -9
  343. data/rbi/lib/orb/models/subscription_update_trial_response.rbi +224 -178
  344. data/rbi/lib/orb/models/subscription_usage.rbi +24 -43
  345. data/rbi/lib/orb/models/subscriptions.rbi +2 -4
  346. data/rbi/lib/orb/models/top_level_ping_params.rbi +2 -4
  347. data/rbi/lib/orb/models/top_level_ping_response.rbi +2 -4
  348. data/rbi/lib/orb/models/trial_discount.rbi +4 -8
  349. data/rbi/lib/orb/models/usage_discount.rbi +5 -8
  350. data/rbi/lib/orb/request_options.rbi +9 -11
  351. data/rbi/lib/orb/resources/alerts.rbi +44 -60
  352. data/rbi/lib/orb/resources/coupons/subscriptions.rbi +6 -9
  353. data/rbi/lib/orb/resources/coupons.rbi +18 -25
  354. data/rbi/lib/orb/resources/credit_notes.rbi +9 -15
  355. data/rbi/lib/orb/resources/customers/balance_transactions.rbi +26 -31
  356. data/rbi/lib/orb/resources/customers/costs.rbi +241 -246
  357. data/rbi/lib/orb/resources/customers/credits/ledger.rbi +387 -396
  358. data/rbi/lib/orb/resources/customers/credits/top_ups.rbi +29 -40
  359. data/rbi/lib/orb/resources/customers/credits.rbi +15 -20
  360. data/rbi/lib/orb/resources/customers.rbi +407 -417
  361. data/rbi/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi +2 -4
  362. data/rbi/lib/orb/resources/dimensional_price_groups.rbi +13 -19
  363. data/rbi/lib/orb/resources/events/backfills.rbi +61 -69
  364. data/rbi/lib/orb/resources/events/volume.rbi +19 -22
  365. data/rbi/lib/orb/resources/events.rbi +311 -319
  366. data/rbi/lib/orb/resources/invoice_line_items.rbi +4 -7
  367. data/rbi/lib/orb/resources/invoices.rbi +62 -76
  368. data/rbi/lib/orb/resources/items.rbi +7 -14
  369. data/rbi/lib/orb/resources/metrics.rbi +17 -25
  370. data/rbi/lib/orb/resources/plans/external_plan_id.rbi +21 -25
  371. data/rbi/lib/orb/resources/plans.rbi +63 -71
  372. data/rbi/lib/orb/resources/prices/external_price_id.rbi +9 -13
  373. data/rbi/lib/orb/resources/prices.rbi +77 -87
  374. data/rbi/lib/orb/resources/subscription_changes.rbi +61 -0
  375. data/rbi/lib/orb/resources/subscriptions.rbi +933 -963
  376. data/rbi/lib/orb/resources/top_level.rbi +6 -8
  377. data/rbi/lib/orb/version.rbi +1 -1
  378. data/sig/orb/client.rbs +2 -0
  379. data/sig/orb/internal/type/array_of.rbs +2 -2
  380. data/sig/orb/internal/type/{boolean_model.rbs → boolean.rbs} +1 -1
  381. data/sig/orb/internal/util.rbs +5 -5
  382. data/sig/orb/models/subscription.rbs +14 -0
  383. data/sig/orb/models/subscription_cancel_response.rbs +47 -2
  384. data/sig/orb/models/subscription_change_apply_params.rbs +24 -0
  385. data/sig/orb/models/subscription_change_apply_response.rbs +784 -0
  386. data/sig/orb/models/subscription_change_cancel_params.rbs +15 -0
  387. data/sig/orb/models/subscription_change_cancel_response.rbs +784 -0
  388. data/sig/orb/models/subscription_change_retrieve_params.rbs +15 -0
  389. data/sig/orb/models/subscription_change_retrieve_response.rbs +784 -0
  390. data/sig/orb/models/subscription_create_response.rbs +47 -2
  391. data/sig/orb/models/subscription_price_intervals_response.rbs +47 -2
  392. data/sig/orb/models/subscription_schedule_plan_change_response.rbs +47 -2
  393. data/sig/orb/models/subscription_trigger_phase_response.rbs +47 -2
  394. data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +47 -2
  395. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +47 -2
  396. data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +47 -2
  397. data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +47 -2
  398. data/sig/orb/models/subscription_update_trial_response.rbs +47 -2
  399. data/sig/orb/resources/customers.rbs +2 -2
  400. data/sig/orb/resources/subscription_changes.rbs +24 -0
  401. data/sig/orb/version.rbs +1 -1
  402. metadata +26 -5
@@ -6,12 +6,12 @@ module Orb
6
6
  class Credits
7
7
  class TopUps
8
8
  # This endpoint allows you to create a new top-up for a specified customer's
9
- # balance. While this top-up is active, the customer's balance will added in
10
- # increments of the specified amount whenever the balance reaches the specified
11
- # threshold.
9
+ # balance. While this top-up is active, the customer's balance will added in
10
+ # increments of the specified amount whenever the balance reaches the specified
11
+ # threshold.
12
12
  #
13
- # If a top-up already exists for this customer in the same currency, the existing
14
- # top-up will be replaced.
13
+ # If a top-up already exists for this customer in the same currency, the existing
14
+ # top-up will be replaced.
15
15
  #
16
16
  # @overload create(customer_id, amount:, currency:, invoice_settings:, per_unit_cost_basis:, threshold:, active_from: nil, expires_after: nil, expires_after_unit: nil, request_options: {})
17
17
  #
@@ -65,7 +65,7 @@ module Orb
65
65
  end
66
66
 
67
67
  # This deactivates the top-up and voids any invoices associated with pending
68
- # credit blocks purchased through the top-up.
68
+ # credit blocks purchased through the top-up.
69
69
  #
70
70
  # @overload delete(top_up_id, customer_id:, request_options: {})
71
71
  #
@@ -91,12 +91,12 @@ module Orb
91
91
  end
92
92
 
93
93
  # This endpoint allows you to create a new top-up for a specified customer's
94
- # balance. While this top-up is active, the customer's balance will added in
95
- # increments of the specified amount whenever the balance reaches the specified
96
- # threshold.
94
+ # balance. While this top-up is active, the customer's balance will added in
95
+ # increments of the specified amount whenever the balance reaches the specified
96
+ # threshold.
97
97
  #
98
- # If a top-up already exists for this customer in the same currency, the existing
99
- # top-up will be replaced.
98
+ # If a top-up already exists for this customer in the same currency, the existing
99
+ # top-up will be replaced.
100
100
  #
101
101
  # @overload create_by_external_id(external_customer_id, amount:, currency:, invoice_settings:, per_unit_cost_basis:, threshold:, active_from: nil, expires_after: nil, expires_after_unit: nil, request_options: {})
102
102
  #
@@ -126,7 +126,7 @@ module Orb
126
126
  end
127
127
 
128
128
  # This deactivates the top-up and voids any invoices associated with pending
129
- # credit blocks purchased through the top-up.
129
+ # credit blocks purchased through the top-up.
130
130
  #
131
131
  # @overload delete_by_external_id(top_up_id, external_customer_id:, request_options: {})
132
132
  #
@@ -12,11 +12,11 @@ module Orb
12
12
 
13
13
  # Returns a paginated list of unexpired, non-zero credit blocks for a customer.
14
14
  #
15
- # If `include_all_blocks` is set to `true`, all credit blocks (including expired
16
- # and depleted blocks) will be included in the response.
15
+ # If `include_all_blocks` is set to `true`, all credit blocks (including expired
16
+ # and depleted blocks) will be included in the response.
17
17
  #
18
- # Note that `currency` defaults to credits if not specified. To use a real world
19
- # currency, set `currency` to an ISO 4217 string.
18
+ # Note that `currency` defaults to credits if not specified. To use a real world
19
+ # currency, set `currency` to an ISO 4217 string.
20
20
  #
21
21
  # @overload list(customer_id, currency: nil, cursor: nil, include_all_blocks: nil, limit: nil, request_options: {})
22
22
  #
@@ -44,11 +44,11 @@ module Orb
44
44
 
45
45
  # Returns a paginated list of unexpired, non-zero credit blocks for a customer.
46
46
  #
47
- # If `include_all_blocks` is set to `true`, all credit blocks (including expired
48
- # and depleted blocks) will be included in the response.
47
+ # If `include_all_blocks` is set to `true`, all credit blocks (including expired
48
+ # and depleted blocks) will be included in the response.
49
49
  #
50
- # Note that `currency` defaults to credits if not specified. To use a real world
51
- # currency, set `currency` to an ISO 4217 string.
50
+ # Note that `currency` defaults to credits if not specified. To use a real world
51
+ # currency, set `currency` to an ISO 4217 string.
52
52
  #
53
53
  # @overload list_by_external_id(external_customer_id, currency: nil, cursor: nil, include_all_blocks: nil, limit: nil, request_options: {})
54
54
  #
@@ -13,17 +13,17 @@ module Orb
13
13
  attr_reader :balance_transactions
14
14
 
15
15
  # This operation is used to create an Orb customer, who is party to the core
16
- # billing relationship. See [Customer](/core-concepts##customer) for an overview
17
- # of the customer resource.
16
+ # billing relationship. See [Customer](/core-concepts##customer) for an overview
17
+ # of the customer resource.
18
18
  #
19
- # This endpoint is critical in the following Orb functionality:
19
+ # This endpoint is critical in the following Orb functionality:
20
20
  #
21
- # - Automated charges can be configured by setting `payment_provider` and
22
- # `payment_provider_id` to automatically issue invoices
23
- # - [Customer ID Aliases](/events-and-metrics/customer-aliases) can be configured
24
- # by setting `external_customer_id`
25
- # - [Timezone localization](/essentials/timezones) can be configured on a
26
- # per-customer basis by setting the `timezone` parameter
21
+ # - Automated charges can be configured by setting `payment_provider` and
22
+ # `payment_provider_id` to automatically issue invoices
23
+ # - [Customer ID Aliases](/events-and-metrics/customer-aliases) can be configured
24
+ # by setting `external_customer_id`
25
+ # - [Timezone localization](/essentials/timezones) can be configured on a
26
+ # per-customer basis by setting the `timezone` parameter
27
27
  #
28
28
  # @overload create(email:, name:, accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, billing_address: nil, currency: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, timezone: nil, request_options: {})
29
29
  #
@@ -62,10 +62,10 @@ module Orb
62
62
  end
63
63
 
64
64
  # This endpoint can be used to update the `payment_provider`,
65
- # `payment_provider_id`, `name`, `email`, `email_delivery`, `tax_id`,
66
- # `auto_collection`, `metadata`, `shipping_address`, `billing_address`, and
67
- # `additional_emails` of an existing customer. Other fields on a customer are
68
- # currently immutable.
65
+ # `payment_provider_id`, `name`, `email`, `email_delivery`, `tax_id`,
66
+ # `auto_collection`, `metadata`, `shipping_address`, `billing_address`, and
67
+ # `additional_emails` of an existing customer. Other fields on a customer are
68
+ # currently immutable.
69
69
  #
70
70
  # @overload update(customer_id, accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, billing_address: nil, currency: nil, email: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, name: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, request_options: {})
71
71
  #
@@ -104,11 +104,11 @@ module Orb
104
104
  end
105
105
 
106
106
  # This endpoint returns a list of all customers for an account. The list of
107
- # customers is ordered starting from the most recently created customer. This
108
- # endpoint follows Orb's
109
- # [standardized pagination format](/api-reference/pagination).
107
+ # customers is ordered starting from the most recently created customer. This
108
+ # endpoint follows Orb's
109
+ # [standardized pagination format](/api-reference/pagination).
110
110
  #
111
- # See [Customer](/core-concepts##customer) for an overview of the customer model.
111
+ # See [Customer](/core-concepts##customer) for an overview of the customer model.
112
112
  #
113
113
  # @overload list(created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, cursor: nil, limit: nil, request_options: {})
114
114
  #
@@ -128,7 +128,12 @@ module Orb
128
128
  @client.request(
129
129
  method: :get,
130
130
  path: "customers",
131
- query: parsed,
131
+ query: parsed.transform_keys(
132
+ created_at_gt: "created_at[gt]",
133
+ created_at_gte: "created_at[gte]",
134
+ created_at_lt: "created_at[lt]",
135
+ created_at_lte: "created_at[lte]"
136
+ ),
132
137
  page: Orb::Internal::Page,
133
138
  model: Orb::Models::Customer,
134
139
  options: options
@@ -136,20 +141,20 @@ module Orb
136
141
  end
137
142
 
138
143
  # This performs a deletion of this customer, its subscriptions, and its invoices,
139
- # provided the customer does not have any issued invoices. Customers with issued
140
- # invoices cannot be deleted. This operation is irreversible. Note that this is a
141
- # _soft_ deletion, but the data will be inaccessible through the API and Orb
142
- # dashboard.
144
+ # provided the customer does not have any issued invoices. Customers with issued
145
+ # invoices cannot be deleted. This operation is irreversible. Note that this is a
146
+ # _soft_ deletion, but the data will be inaccessible through the API and Orb
147
+ # dashboard.
143
148
  #
144
- # For a hard-deletion, please reach out to the Orb team directly.
149
+ # For a hard-deletion, please reach out to the Orb team directly.
145
150
  #
146
- # **Note**: This operation happens asynchronously and can be expected to take a
147
- # few minutes to propagate to related resources. However, querying for the
148
- # customer on subsequent GET requests while deletion is in process will reflect
149
- # its deletion with a `deleted: true` property. Once the customer deletion has
150
- # been fully processed, the customer will not be returned in the API.
151
+ # **Note**: This operation happens asynchronously and can be expected to take a
152
+ # few minutes to propagate to related resources. However, querying for the
153
+ # customer on subsequent GET requests while deletion is in process will reflect
154
+ # its deletion with a `deleted: true` property. Once the customer deletion has
155
+ # been fully processed, the customer will not be returned in the API.
151
156
  #
152
- # On successful processing, this returns an empty dictionary (`{}`) in the API.
157
+ # On successful processing, this returns an empty dictionary (`{}`) in the API.
153
158
  #
154
159
  # @overload delete(customer_id, request_options: {})
155
160
  #
@@ -169,11 +174,11 @@ module Orb
169
174
  end
170
175
 
171
176
  # This endpoint is used to fetch customer details given an identifier. If the
172
- # `Customer` is in the process of being deleted, only the properties `id` and
173
- # `deleted: true` will be returned.
177
+ # `Customer` is in the process of being deleted, only the properties `id` and
178
+ # `deleted: true` will be returned.
174
179
  #
175
- # See the [Customer resource](/core-concepts#customer) for a full discussion of
176
- # the Customer model.
180
+ # See the [Customer resource](/core-concepts#customer) for a full discussion of
181
+ # the Customer model.
177
182
  #
178
183
  # @overload fetch(customer_id, request_options: {})
179
184
  #
@@ -193,10 +198,10 @@ module Orb
193
198
  end
194
199
 
195
200
  # This endpoint is used to fetch customer details given an `external_customer_id`
196
- # (see [Customer ID Aliases](/events-and-metrics/customer-aliases)).
201
+ # (see [Customer ID Aliases](/events-and-metrics/customer-aliases)).
197
202
  #
198
- # Note that the resource and semantics of this endpoint exactly mirror
199
- # [Get Customer](fetch-customer).
203
+ # Note that the resource and semantics of this endpoint exactly mirror
204
+ # [Get Customer](fetch-customer).
200
205
  #
201
206
  # @overload fetch_by_external_id(external_customer_id, request_options: {})
202
207
  #
@@ -217,26 +222,23 @@ module Orb
217
222
 
218
223
  # Sync Orb's payment methods for the customer with their gateway.
219
224
  #
220
- # This method can be called before taking an action that may cause the customer to
221
- # be charged, ensuring that the most up-to-date payment method is charged.
225
+ # This method can be called before taking an action that may cause the customer to
226
+ # be charged, ensuring that the most up-to-date payment method is charged.
222
227
  #
223
- # **Note**: This functionality is currently only available for Stripe.
228
+ # **Note**: This functionality is currently only available for Stripe.
224
229
  #
225
- # @overload sync_payment_methods_from_gateway(external_customer_id, request_options: {})
230
+ # @overload sync_payment_methods_from_gateway(customer_id, request_options: {})
226
231
  #
227
- # @param external_customer_id [String]
232
+ # @param customer_id [String]
228
233
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
229
234
  #
230
235
  # @return [nil]
231
236
  #
232
237
  # @see Orb::Models::CustomerSyncPaymentMethodsFromGatewayParams
233
- def sync_payment_methods_from_gateway(external_customer_id, params = {})
238
+ def sync_payment_methods_from_gateway(customer_id, params = {})
234
239
  @client.request(
235
240
  method: :post,
236
- path: [
237
- "customers/external_customer_id/%1$s/sync_payment_methods_from_gateway",
238
- external_customer_id
239
- ],
241
+ path: ["customers/%1$s/sync_payment_methods_from_gateway", customer_id],
240
242
  model: NilClass,
241
243
  options: params[:request_options]
242
244
  )
@@ -244,32 +246,35 @@ module Orb
244
246
 
245
247
  # Sync Orb's payment methods for the customer with their gateway.
246
248
  #
247
- # This method can be called before taking an action that may cause the customer to
248
- # be charged, ensuring that the most up-to-date payment method is charged.
249
+ # This method can be called before taking an action that may cause the customer to
250
+ # be charged, ensuring that the most up-to-date payment method is charged.
249
251
  #
250
- # **Note**: This functionality is currently only available for Stripe.
252
+ # **Note**: This functionality is currently only available for Stripe.
251
253
  #
252
- # @overload sync_payment_methods_from_gateway_by_external_customer_id(customer_id, request_options: {})
254
+ # @overload sync_payment_methods_from_gateway_by_external_customer_id(external_customer_id, request_options: {})
253
255
  #
254
- # @param customer_id [String]
256
+ # @param external_customer_id [String]
255
257
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
256
258
  #
257
259
  # @return [nil]
258
260
  #
259
261
  # @see Orb::Models::CustomerSyncPaymentMethodsFromGatewayByExternalCustomerIDParams
260
- def sync_payment_methods_from_gateway_by_external_customer_id(customer_id, params = {})
262
+ def sync_payment_methods_from_gateway_by_external_customer_id(external_customer_id, params = {})
261
263
  @client.request(
262
264
  method: :post,
263
- path: ["customers/%1$s/sync_payment_methods_from_gateway", customer_id],
265
+ path: [
266
+ "customers/external_customer_id/%1$s/sync_payment_methods_from_gateway",
267
+ external_customer_id
268
+ ],
264
269
  model: NilClass,
265
270
  options: params[:request_options]
266
271
  )
267
272
  end
268
273
 
269
274
  # This endpoint is used to update customer details given an `external_customer_id`
270
- # (see [Customer ID Aliases](/events-and-metrics/customer-aliases)). Note that the
271
- # resource and semantics of this endpoint exactly mirror
272
- # [Update Customer](update-customer).
275
+ # (see [Customer ID Aliases](/events-and-metrics/customer-aliases)). Note that the
276
+ # resource and semantics of this endpoint exactly mirror
277
+ # [Update Customer](update-customer).
273
278
  #
274
279
  # @overload update_by_external_id(id, accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, billing_address: nil, currency: nil, email: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, name: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, request_options: {})
275
280
  #
@@ -7,13 +7,13 @@ module Orb
7
7
  attr_reader :external_dimensional_price_group_id
8
8
 
9
9
  # A dimensional price group is used to partition the result of a billable metric
10
- # by a set of dimensions. Prices in a price group must specify the parition used
11
- # to derive their usage.
10
+ # by a set of dimensions. Prices in a price group must specify the parition used
11
+ # to derive their usage.
12
12
  #
13
- # For example, suppose we have a billable metric that measures the number of
14
- # widgets used and we want to charge differently depending on the color of the
15
- # widget. We can create a price group with a dimension "color" and two prices: one
16
- # that charges $10 per red widget and one that charges $20 per blue widget.
13
+ # For example, suppose we have a billable metric that measures the number of
14
+ # widgets used and we want to charge differently depending on the color of the
15
+ # widget. We can create a price group with a dimension "color" and two prices: one
16
+ # that charges $10 per red widget and one that charges $20 per blue widget.
17
17
  #
18
18
  # @overload create(billable_metric_id:, dimensions:, name:, external_dimensional_price_group_id: nil, metadata: nil, request_options: {})
19
19
  #
@@ -5,42 +5,42 @@ module Orb
5
5
  class Events
6
6
  class Backfills
7
7
  # Creating the backfill enables adding or replacing past events, even those that
8
- # are older than the ingestion grace period. Performing a backfill in Orb involves
9
- # 3 steps:
10
- #
11
- # 1. Create the backfill, specifying its parameters.
12
- # 2. [Ingest](ingest) usage events, referencing the backfill (query parameter
13
- # `backfill_id`).
14
- # 3. [Close](close-backfill) the backfill, propagating the update in past usage
15
- # throughout Orb.
16
- #
17
- # Changes from a backfill are not reflected until the backfill is closed, so you
18
- # won’t need to worry about your customers seeing partially updated usage data.
19
- # Backfills are also reversible, so you’ll be able to revert a backfill if you’ve
20
- # made a mistake.
21
- #
22
- # This endpoint will return a backfill object, which contains an `id`. That `id`
23
- # can then be used as the `backfill_id` query parameter to the event ingestion
24
- # endpoint to associate ingested events with this backfill. The effects (e.g.
25
- # updated usage graphs) of this backfill will not take place until the backfill is
26
- # closed.
27
- #
28
- # If the `replace_existing_events` is `true`, existing events in the backfill's
29
- # timeframe will be replaced with the newly ingested events associated with the
30
- # backfill. If `false`, newly ingested events will be added to the existing
31
- # events.
32
- #
33
- # If a `customer_id` or `external_customer_id` is specified, the backfill will
34
- # only affect events for that customer. If neither is specified, the backfill will
35
- # affect all customers.
36
- #
37
- # When `replace_existing_events` is `true`, this indicates that existing events in
38
- # the timeframe should no longer be counted towards invoiced usage. In this
39
- # scenario, the parameter `filter` can be optionally added which enables filtering
40
- # using
41
- # [computed properties](/extensibility/advanced-metrics#computed-properties). The
42
- # expressiveness of computed properties allows you to deprecate existing events
43
- # based on both a period of time and specific property values.
8
+ # are older than the ingestion grace period. Performing a backfill in Orb involves
9
+ # 3 steps:
10
+ #
11
+ # 1. Create the backfill, specifying its parameters.
12
+ # 2. [Ingest](ingest) usage events, referencing the backfill (query parameter
13
+ # `backfill_id`).
14
+ # 3. [Close](close-backfill) the backfill, propagating the update in past usage
15
+ # throughout Orb.
16
+ #
17
+ # Changes from a backfill are not reflected until the backfill is closed, so you
18
+ # won’t need to worry about your customers seeing partially updated usage data.
19
+ # Backfills are also reversible, so you’ll be able to revert a backfill if you’ve
20
+ # made a mistake.
21
+ #
22
+ # This endpoint will return a backfill object, which contains an `id`. That `id`
23
+ # can then be used as the `backfill_id` query parameter to the event ingestion
24
+ # endpoint to associate ingested events with this backfill. The effects (e.g.
25
+ # updated usage graphs) of this backfill will not take place until the backfill is
26
+ # closed.
27
+ #
28
+ # If the `replace_existing_events` is `true`, existing events in the backfill's
29
+ # timeframe will be replaced with the newly ingested events associated with the
30
+ # backfill. If `false`, newly ingested events will be added to the existing
31
+ # events.
32
+ #
33
+ # If a `customer_id` or `external_customer_id` is specified, the backfill will
34
+ # only affect events for that customer. If neither is specified, the backfill will
35
+ # affect all customers.
36
+ #
37
+ # When `replace_existing_events` is `true`, this indicates that existing events in
38
+ # the timeframe should no longer be counted towards invoiced usage. In this
39
+ # scenario, the parameter `filter` can be optionally added which enables filtering
40
+ # using
41
+ # [computed properties](/extensibility/advanced-metrics#computed-properties). The
42
+ # expressiveness of computed properties allows you to deprecate existing events
43
+ # based on both a period of time and specific property values.
44
44
  #
45
45
  # @overload create(timeframe_end:, timeframe_start:, close_time: nil, customer_id: nil, deprecation_filter: nil, external_customer_id: nil, replace_existing_events: nil, request_options: {})
46
46
  #
@@ -69,11 +69,11 @@ module Orb
69
69
 
70
70
  # This endpoint returns a list of all backfills in a list format.
71
71
  #
72
- # The list of backfills is ordered starting from the most recently created
73
- # backfill. The response also includes
74
- # [`pagination_metadata`](/api-reference/pagination), which lets the caller
75
- # retrieve the next page of results if they exist. More information about
76
- # pagination can be found in the [Pagination-metadata schema](pagination).
72
+ # The list of backfills is ordered starting from the most recently created
73
+ # backfill. The response also includes
74
+ # [`pagination_metadata`](/api-reference/pagination), which lets the caller
75
+ # retrieve the next page of results if they exist. More information about
76
+ # pagination can be found in the [Pagination-metadata schema](pagination).
77
77
  #
78
78
  # @overload list(cursor: nil, limit: nil, request_options: {})
79
79
  #
@@ -97,9 +97,9 @@ module Orb
97
97
  end
98
98
 
99
99
  # Closing a backfill makes the updated usage visible in Orb. Upon closing a
100
- # backfill, Orb will asynchronously reflect the updated usage in invoice amounts
101
- # and usage graphs. Once all of the updates are complete, the backfill's status
102
- # will transition to `reflected`.
100
+ # backfill, Orb will asynchronously reflect the updated usage in invoice amounts
101
+ # and usage graphs. Once all of the updates are complete, the backfill's status
102
+ # will transition to `reflected`.
103
103
  #
104
104
  # @overload close(backfill_id, request_options: {})
105
105
  #
@@ -138,12 +138,12 @@ module Orb
138
138
  end
139
139
 
140
140
  # Reverting a backfill undoes all the effects of closing the backfill. If the
141
- # backfill is reflected, the status will transition to `pending_revert` while the
142
- # effects of the backfill are undone. Once all effects are undone, the backfill
143
- # will transition to `reverted`.
141
+ # backfill is reflected, the status will transition to `pending_revert` while the
142
+ # effects of the backfill are undone. Once all effects are undone, the backfill
143
+ # will transition to `reverted`.
144
144
  #
145
- # If a backfill is reverted before its closed, no usage will be updated as a
146
- # result of the backfill and it will immediately transition to `reverted`.
145
+ # If a backfill is reverted before its closed, no usage will be updated as a
146
+ # result of the backfill and it will immediately transition to `reverted`.
147
147
  #
148
148
  # @overload revert(backfill_id, request_options: {})
149
149
  #
@@ -5,18 +5,18 @@ module Orb
5
5
  class Events
6
6
  class Volume
7
7
  # This endpoint returns the event volume for an account in a
8
- # [paginated list format](/api-reference/pagination).
8
+ # [paginated list format](/api-reference/pagination).
9
9
  #
10
- # The event volume is aggregated by the hour and the
11
- # [timestamp](/api-reference/event/ingest-events) field is used to determine which
12
- # hour an event is associated with. Note, this means that late-arriving events
13
- # increment the volume count for the hour window the timestamp is in, not the
14
- # latest hour window.
10
+ # The event volume is aggregated by the hour and the
11
+ # [timestamp](/api-reference/event/ingest-events) field is used to determine which
12
+ # hour an event is associated with. Note, this means that late-arriving events
13
+ # increment the volume count for the hour window the timestamp is in, not the
14
+ # latest hour window.
15
15
  #
16
- # Each item in the response contains the count of events aggregated by the hour
17
- # where the start and end time are hour-aligned and in UTC. When a specific
18
- # timestamp is passed in for either start or end time, the response includes the
19
- # hours the timestamp falls in.
16
+ # Each item in the response contains the count of events aggregated by the hour
17
+ # where the start and end time are hour-aligned and in UTC. When a specific
18
+ # timestamp is passed in for either start or end time, the response includes the
19
+ # hours the timestamp falls in.
20
20
  #
21
21
  # @overload list(timeframe_start:, cursor: nil, limit: nil, timeframe_end: nil, request_options: {})
22
22
  #