orb-billing 0.3.2 → 0.4.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 (245) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/README.md +1 -1
  4. data/lib/orb/errors.rb +1 -1
  5. data/lib/orb/internal/transport/base_client.rb +74 -5
  6. data/lib/orb/internal/transport/pooled_net_requester.rb +14 -0
  7. data/lib/orb/internal/type/array_of.rb +1 -1
  8. data/lib/orb/internal/type/base_model.rb +62 -30
  9. data/lib/orb/internal/type/converter.rb +18 -0
  10. data/lib/orb/internal/type/enum.rb +1 -0
  11. data/lib/orb/internal/type/hash_of.rb +1 -1
  12. data/lib/orb/internal/type/union.rb +1 -0
  13. data/lib/orb/internal/util.rb +56 -0
  14. data/lib/orb/internal.rb +6 -0
  15. data/lib/orb/models/coupon.rb +4 -0
  16. data/lib/orb/models/coupon_create_params.rb +6 -0
  17. data/lib/orb/models/customer_create_params.rb +9 -0
  18. data/lib/orb/models/customer_update_by_external_id_params.rb +9 -0
  19. data/lib/orb/models/customer_update_params.rb +9 -0
  20. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +14 -0
  21. data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +14 -0
  22. data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +14 -0
  23. data/lib/orb/models/customers/credits/ledger_list_response.rb +14 -0
  24. data/lib/orb/models/discount.rb +6 -0
  25. data/lib/orb/models/evaluate_price_group.rb +4 -0
  26. data/lib/orb/models/invoice.rb +22 -0
  27. data/lib/orb/models/invoice_fetch_upcoming_response.rb +22 -0
  28. data/lib/orb/models/invoice_level_discount.rb +4 -0
  29. data/lib/orb/models/invoice_line_item_create_response.rb +22 -0
  30. data/lib/orb/models/plan.rb +12 -0
  31. data/lib/orb/models/plan_create_params.rb +32 -0
  32. data/lib/orb/models/price.rb +35 -0
  33. data/lib/orb/models/subscription.rb +22 -0
  34. data/lib/orb/models/subscription_cancel_response.rb +22 -0
  35. data/lib/orb/models/subscription_change_apply_response.rb +22 -0
  36. data/lib/orb/models/subscription_change_cancel_response.rb +22 -0
  37. data/lib/orb/models/subscription_change_retrieve_response.rb +22 -0
  38. data/lib/orb/models/subscription_create_params.rb +88 -0
  39. data/lib/orb/models/subscription_create_response.rb +22 -0
  40. data/lib/orb/models/subscription_price_intervals_params.rb +89 -0
  41. data/lib/orb/models/subscription_price_intervals_response.rb +22 -0
  42. data/lib/orb/models/subscription_schedule_plan_change_params.rb +88 -0
  43. data/lib/orb/models/subscription_schedule_plan_change_response.rb +22 -0
  44. data/lib/orb/models/subscription_trigger_phase_response.rb +22 -0
  45. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +22 -0
  46. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +22 -0
  47. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +22 -0
  48. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +22 -0
  49. data/lib/orb/models/subscription_update_trial_params.rb +4 -0
  50. data/lib/orb/models/subscription_update_trial_response.rb +22 -0
  51. data/lib/orb/models/subscription_usage.rb +9 -0
  52. data/lib/orb/models.rb +24 -0
  53. data/lib/orb/request_options.rb +4 -0
  54. data/lib/orb/version.rb +1 -1
  55. data/lib/orb.rb +2 -0
  56. data/rbi/orb/internal/page.rbi +2 -1
  57. data/rbi/orb/internal/transport/base_client.rbi +31 -8
  58. data/rbi/orb/internal/transport/pooled_net_requester.rbi +5 -4
  59. data/rbi/orb/internal/type/base_model.rbi +31 -15
  60. data/rbi/orb/internal/type/base_page.rbi +1 -1
  61. data/rbi/orb/internal/type/converter.rbi +2 -0
  62. data/rbi/orb/internal/type/enum.rbi +1 -0
  63. data/rbi/orb/internal/type/union.rbi +1 -0
  64. data/rbi/orb/internal/util.rbi +28 -7
  65. data/rbi/orb/internal.rbi +2 -0
  66. data/rbi/orb/models/alert.rbi +13 -6
  67. data/rbi/orb/models/alert_create_for_customer_params.rbi +11 -2
  68. data/rbi/orb/models/alert_create_for_external_customer_params.rbi +14 -2
  69. data/rbi/orb/models/alert_create_for_subscription_params.rbi +11 -2
  70. data/rbi/orb/models/alert_disable_params.rbi +2 -1
  71. data/rbi/orb/models/alert_enable_params.rbi +2 -1
  72. data/rbi/orb/models/alert_list_params.rbi +2 -1
  73. data/rbi/orb/models/alert_retrieve_params.rbi +2 -1
  74. data/rbi/orb/models/alert_update_params.rbi +6 -2
  75. data/rbi/orb/models/amount_discount.rbi +2 -1
  76. data/rbi/orb/models/billable_metric.rbi +2 -1
  77. data/rbi/orb/models/coupon.rbi +1 -1
  78. data/rbi/orb/models/coupon_archive_params.rbi +2 -1
  79. data/rbi/orb/models/coupon_create_params.rbi +16 -3
  80. data/rbi/orb/models/coupon_fetch_params.rbi +2 -1
  81. data/rbi/orb/models/coupon_list_params.rbi +2 -1
  82. data/rbi/orb/models/coupons/subscription_list_params.rbi +4 -1
  83. data/rbi/orb/models/credit_note.rbi +45 -9
  84. data/rbi/orb/models/credit_note_create_params.rbi +8 -2
  85. data/rbi/orb/models/credit_note_fetch_params.rbi +4 -1
  86. data/rbi/orb/models/credit_note_list_params.rbi +4 -1
  87. data/rbi/orb/models/customer.rbi +41 -10
  88. data/rbi/orb/models/customer_create_params.rbi +61 -10
  89. data/rbi/orb/models/customer_delete_params.rbi +4 -1
  90. data/rbi/orb/models/customer_fetch_by_external_id_params.rbi +4 -1
  91. data/rbi/orb/models/customer_fetch_params.rbi +2 -1
  92. data/rbi/orb/models/customer_list_params.rbi +2 -1
  93. data/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +7 -1
  94. data/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +7 -1
  95. data/rbi/orb/models/customer_update_by_external_id_params.rbi +67 -10
  96. data/rbi/orb/models/customer_update_params.rbi +61 -10
  97. data/rbi/orb/models/customers/balance_transaction_create_params.rbi +7 -1
  98. data/rbi/orb/models/customers/balance_transaction_create_response.rbi +21 -3
  99. data/rbi/orb/models/customers/balance_transaction_list_params.rbi +7 -1
  100. data/rbi/orb/models/customers/balance_transaction_list_response.rbi +21 -3
  101. data/rbi/orb/models/customers/cost_list_by_external_id_params.rbi +7 -1
  102. data/rbi/orb/models/customers/cost_list_by_external_id_response.rbi +21 -3
  103. data/rbi/orb/models/customers/cost_list_params.rbi +4 -1
  104. data/rbi/orb/models/customers/cost_list_response.rbi +21 -3
  105. data/rbi/orb/models/customers/credit_list_by_external_id_params.rbi +7 -1
  106. data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +7 -1
  107. data/rbi/orb/models/customers/credit_list_params.rbi +4 -1
  108. data/rbi/orb/models/customers/credit_list_response.rbi +7 -1
  109. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +14 -2
  110. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +133 -21
  111. data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +14 -2
  112. data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +133 -21
  113. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +7 -1
  114. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +133 -21
  115. data/rbi/orb/models/customers/credits/ledger_list_params.rbi +7 -1
  116. data/rbi/orb/models/customers/credits/ledger_list_response.rbi +133 -21
  117. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +14 -2
  118. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +14 -2
  119. data/rbi/orb/models/customers/credits/top_up_create_params.rbi +14 -2
  120. data/rbi/orb/models/customers/credits/top_up_create_response.rbi +14 -2
  121. data/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +7 -1
  122. data/rbi/orb/models/customers/credits/top_up_delete_params.rbi +7 -1
  123. data/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +7 -1
  124. data/rbi/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +14 -2
  125. data/rbi/orb/models/customers/credits/top_up_list_params.rbi +7 -1
  126. data/rbi/orb/models/customers/credits/top_up_list_response.rbi +14 -2
  127. data/rbi/orb/models/dimensional_price_group.rbi +4 -1
  128. data/rbi/orb/models/dimensional_price_group_create_params.rbi +4 -1
  129. data/rbi/orb/models/dimensional_price_group_list_params.rbi +4 -1
  130. data/rbi/orb/models/dimensional_price_group_retrieve_params.rbi +7 -1
  131. data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +7 -1
  132. data/rbi/orb/models/dimensional_price_groups.rbi +4 -1
  133. data/rbi/orb/models/evaluate_price_group.rbi +2 -1
  134. data/rbi/orb/models/event_deprecate_params.rbi +4 -1
  135. data/rbi/orb/models/event_deprecate_response.rbi +4 -1
  136. data/rbi/orb/models/event_ingest_params.rbi +6 -2
  137. data/rbi/orb/models/event_ingest_response.rbi +18 -3
  138. data/rbi/orb/models/event_search_params.rbi +2 -1
  139. data/rbi/orb/models/event_search_response.rbi +11 -2
  140. data/rbi/orb/models/event_update_params.rbi +2 -1
  141. data/rbi/orb/models/event_update_response.rbi +4 -1
  142. data/rbi/orb/models/events/backfill_close_params.rbi +4 -1
  143. data/rbi/orb/models/events/backfill_close_response.rbi +7 -1
  144. data/rbi/orb/models/events/backfill_create_params.rbi +4 -1
  145. data/rbi/orb/models/events/backfill_create_response.rbi +7 -1
  146. data/rbi/orb/models/events/backfill_fetch_params.rbi +4 -1
  147. data/rbi/orb/models/events/backfill_fetch_response.rbi +7 -1
  148. data/rbi/orb/models/events/backfill_list_params.rbi +4 -1
  149. data/rbi/orb/models/events/backfill_list_response.rbi +7 -1
  150. data/rbi/orb/models/events/backfill_revert_params.rbi +4 -1
  151. data/rbi/orb/models/events/backfill_revert_response.rbi +7 -1
  152. data/rbi/orb/models/events/event_volumes.rbi +8 -2
  153. data/rbi/orb/models/events/volume_list_params.rbi +4 -1
  154. data/rbi/orb/models/invoice.rbi +156 -31
  155. data/rbi/orb/models/invoice_create_params.rbi +13 -3
  156. data/rbi/orb/models/invoice_fetch_params.rbi +2 -1
  157. data/rbi/orb/models/invoice_fetch_upcoming_params.rbi +4 -1
  158. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +212 -31
  159. data/rbi/orb/models/invoice_issue_params.rbi +2 -1
  160. data/rbi/orb/models/invoice_line_item_create_params.rbi +4 -1
  161. data/rbi/orb/models/invoice_line_item_create_response.rbi +119 -17
  162. data/rbi/orb/models/invoice_list_params.rbi +2 -1
  163. data/rbi/orb/models/invoice_mark_paid_params.rbi +4 -1
  164. data/rbi/orb/models/invoice_pay_params.rbi +2 -1
  165. data/rbi/orb/models/invoice_update_params.rbi +2 -1
  166. data/rbi/orb/models/invoice_void_params.rbi +2 -1
  167. data/rbi/orb/models/item.rbi +5 -2
  168. data/rbi/orb/models/item_create_params.rbi +2 -1
  169. data/rbi/orb/models/item_fetch_params.rbi +2 -1
  170. data/rbi/orb/models/item_list_params.rbi +2 -1
  171. data/rbi/orb/models/item_update_params.rbi +9 -2
  172. data/rbi/orb/models/metric_create_params.rbi +2 -1
  173. data/rbi/orb/models/metric_fetch_params.rbi +2 -1
  174. data/rbi/orb/models/metric_list_params.rbi +2 -1
  175. data/rbi/orb/models/metric_update_params.rbi +2 -1
  176. data/rbi/orb/models/pagination_metadata.rbi +2 -1
  177. data/rbi/orb/models/percentage_discount.rbi +2 -1
  178. data/rbi/orb/models/plan.rbi +50 -14
  179. data/rbi/orb/models/plan_create_params.rbi +604 -89
  180. data/rbi/orb/models/plan_fetch_params.rbi +2 -1
  181. data/rbi/orb/models/plan_list_params.rbi +2 -1
  182. data/rbi/orb/models/plan_update_params.rbi +2 -1
  183. data/rbi/orb/models/plans/external_plan_id_fetch_params.rbi +4 -1
  184. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +7 -1
  185. data/rbi/orb/models/price.rbi +1624 -270
  186. data/rbi/orb/models/price_create_params.rbi +100 -18
  187. data/rbi/orb/models/price_evaluate_params.rbi +2 -1
  188. data/rbi/orb/models/price_evaluate_response.rbi +4 -1
  189. data/rbi/orb/models/price_fetch_params.rbi +2 -1
  190. data/rbi/orb/models/price_list_params.rbi +2 -1
  191. data/rbi/orb/models/price_update_params.rbi +2 -1
  192. data/rbi/orb/models/prices/external_price_id_fetch_params.rbi +7 -1
  193. data/rbi/orb/models/prices/external_price_id_update_params.rbi +7 -1
  194. data/rbi/orb/models/subscription.rbi +109 -19
  195. data/rbi/orb/models/subscription_cancel_params.rbi +4 -1
  196. data/rbi/orb/models/subscription_cancel_response.rbi +137 -20
  197. data/rbi/orb/models/subscription_change_apply_params.rbi +4 -1
  198. data/rbi/orb/models/subscription_change_apply_response.rbi +142 -21
  199. data/rbi/orb/models/subscription_change_cancel_params.rbi +4 -1
  200. data/rbi/orb/models/subscription_change_cancel_response.rbi +142 -21
  201. data/rbi/orb/models/subscription_change_retrieve_params.rbi +4 -1
  202. data/rbi/orb/models/subscription_change_retrieve_response.rbi +142 -21
  203. data/rbi/orb/models/subscription_create_params.rbi +1257 -198
  204. data/rbi/orb/models/subscription_create_response.rbi +137 -20
  205. data/rbi/orb/models/subscription_fetch_costs_params.rbi +4 -1
  206. data/rbi/orb/models/subscription_fetch_costs_response.rbi +21 -3
  207. data/rbi/orb/models/subscription_fetch_params.rbi +4 -1
  208. data/rbi/orb/models/subscription_fetch_schedule_params.rbi +4 -1
  209. data/rbi/orb/models/subscription_fetch_schedule_response.rbi +14 -2
  210. data/rbi/orb/models/subscription_fetch_usage_params.rbi +4 -1
  211. data/rbi/orb/models/subscription_list_params.rbi +4 -1
  212. data/rbi/orb/models/subscription_price_intervals_params.rbi +731 -115
  213. data/rbi/orb/models/subscription_price_intervals_response.rbi +140 -20
  214. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +1260 -198
  215. data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +140 -20
  216. data/rbi/orb/models/subscription_trigger_phase_params.rbi +4 -1
  217. data/rbi/orb/models/subscription_trigger_phase_response.rbi +140 -20
  218. data/rbi/orb/models/subscription_unschedule_cancellation_params.rbi +7 -1
  219. data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +140 -20
  220. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +7 -1
  221. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +140 -20
  222. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +7 -1
  223. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +140 -20
  224. data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +7 -1
  225. data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +140 -20
  226. data/rbi/orb/models/subscription_update_params.rbi +4 -1
  227. data/rbi/orb/models/subscription_update_trial_params.rbi +4 -1
  228. data/rbi/orb/models/subscription_update_trial_response.rbi +140 -20
  229. data/rbi/orb/models/subscription_usage.rbi +63 -9
  230. data/rbi/orb/models/subscriptions.rbi +2 -1
  231. data/rbi/orb/models/top_level_ping_params.rbi +2 -1
  232. data/rbi/orb/models/top_level_ping_response.rbi +4 -1
  233. data/rbi/orb/models/trial_discount.rbi +2 -1
  234. data/rbi/orb/models/usage_discount.rbi +2 -1
  235. data/rbi/orb/request_options.rbi +1 -1
  236. data/sig/orb/internal/transport/base_client.rbs +16 -1
  237. data/sig/orb/internal/transport/pooled_net_requester.rbs +2 -0
  238. data/sig/orb/internal/type/base_model.rbs +11 -5
  239. data/sig/orb/internal/type/base_page.rbs +1 -1
  240. data/sig/orb/internal/type/converter.rbs +2 -0
  241. data/sig/orb/internal/type/enum.rbs +1 -0
  242. data/sig/orb/internal/type/union.rbs +1 -0
  243. data/sig/orb/internal/util.rbs +13 -0
  244. data/sig/orb/internal.rbs +2 -0
  245. metadata +2 -2
@@ -5,7 +5,13 @@ module Orb
5
5
  module Customers
6
6
  module Credits
7
7
  class TopUpCreateResponse < Orb::Internal::Type::BaseModel
8
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
8
+ OrHash =
9
+ T.type_alias do
10
+ T.any(
11
+ Orb::Models::Customers::Credits::TopUpCreateResponse,
12
+ Orb::Internal::AnyHash
13
+ )
14
+ end
9
15
 
10
16
  sig { returns(String) }
11
17
  attr_accessor :id
@@ -119,7 +125,13 @@ module Orb
119
125
  end
120
126
 
121
127
  class InvoiceSettings < Orb::Internal::Type::BaseModel
122
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
128
+ OrHash =
129
+ T.type_alias do
130
+ T.any(
131
+ Orb::Models::Customers::Credits::TopUpCreateResponse::InvoiceSettings,
132
+ Orb::Internal::AnyHash
133
+ )
134
+ end
123
135
 
124
136
  # Whether the credits purchase invoice should auto collect with the customer's
125
137
  # saved payment method.
@@ -8,7 +8,13 @@ module Orb
8
8
  extend Orb::Internal::Type::RequestParameters::Converter
9
9
  include Orb::Internal::Type::RequestParameters
10
10
 
11
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
11
+ OrHash =
12
+ T.type_alias do
13
+ T.any(
14
+ Orb::Customers::Credits::TopUpDeleteByExternalIDParams,
15
+ Orb::Internal::AnyHash
16
+ )
17
+ end
12
18
 
13
19
  sig { returns(String) }
14
20
  attr_accessor :external_customer_id
@@ -8,7 +8,13 @@ module Orb
8
8
  extend Orb::Internal::Type::RequestParameters::Converter
9
9
  include Orb::Internal::Type::RequestParameters
10
10
 
11
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
11
+ OrHash =
12
+ T.type_alias do
13
+ T.any(
14
+ Orb::Customers::Credits::TopUpDeleteParams,
15
+ Orb::Internal::AnyHash
16
+ )
17
+ end
12
18
 
13
19
  sig { returns(String) }
14
20
  attr_accessor :customer_id
@@ -8,7 +8,13 @@ module Orb
8
8
  extend Orb::Internal::Type::RequestParameters::Converter
9
9
  include Orb::Internal::Type::RequestParameters
10
10
 
11
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
11
+ OrHash =
12
+ T.type_alias do
13
+ T.any(
14
+ Orb::Customers::Credits::TopUpListByExternalIDParams,
15
+ Orb::Internal::AnyHash
16
+ )
17
+ end
12
18
 
13
19
  # Cursor for pagination. This can be populated by the `next_cursor` value returned
14
20
  # from the initial request.
@@ -5,7 +5,13 @@ module Orb
5
5
  module Customers
6
6
  module Credits
7
7
  class TopUpListByExternalIDResponse < Orb::Internal::Type::BaseModel
8
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
8
+ OrHash =
9
+ T.type_alias do
10
+ T.any(
11
+ Orb::Models::Customers::Credits::TopUpListByExternalIDResponse,
12
+ Orb::Internal::AnyHash
13
+ )
14
+ end
9
15
 
10
16
  sig { returns(String) }
11
17
  attr_accessor :id
@@ -119,7 +125,13 @@ module Orb
119
125
  end
120
126
 
121
127
  class InvoiceSettings < Orb::Internal::Type::BaseModel
122
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
128
+ OrHash =
129
+ T.type_alias do
130
+ T.any(
131
+ Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::InvoiceSettings,
132
+ Orb::Internal::AnyHash
133
+ )
134
+ end
123
135
 
124
136
  # Whether the credits purchase invoice should auto collect with the customer's
125
137
  # saved payment method.
@@ -8,7 +8,13 @@ module Orb
8
8
  extend Orb::Internal::Type::RequestParameters::Converter
9
9
  include Orb::Internal::Type::RequestParameters
10
10
 
11
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
11
+ OrHash =
12
+ T.type_alias do
13
+ T.any(
14
+ Orb::Customers::Credits::TopUpListParams,
15
+ Orb::Internal::AnyHash
16
+ )
17
+ end
12
18
 
13
19
  # Cursor for pagination. This can be populated by the `next_cursor` value returned
14
20
  # from the initial request.
@@ -5,7 +5,13 @@ module Orb
5
5
  module Customers
6
6
  module Credits
7
7
  class TopUpListResponse < Orb::Internal::Type::BaseModel
8
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
8
+ OrHash =
9
+ T.type_alias do
10
+ T.any(
11
+ Orb::Models::Customers::Credits::TopUpListResponse,
12
+ Orb::Internal::AnyHash
13
+ )
14
+ end
9
15
 
10
16
  sig { returns(String) }
11
17
  attr_accessor :id
@@ -119,7 +125,13 @@ module Orb
119
125
  end
120
126
 
121
127
  class InvoiceSettings < Orb::Internal::Type::BaseModel
122
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
128
+ OrHash =
129
+ T.type_alias do
130
+ T.any(
131
+ Orb::Models::Customers::Credits::TopUpListResponse::InvoiceSettings,
132
+ Orb::Internal::AnyHash
133
+ )
134
+ end
123
135
 
124
136
  # Whether the credits purchase invoice should auto collect with the customer's
125
137
  # saved payment method.
@@ -3,7 +3,10 @@
3
3
  module Orb
4
4
  module Models
5
5
  class DimensionalPriceGroup < Orb::Internal::Type::BaseModel
6
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Orb::DimensionalPriceGroup, Orb::Internal::AnyHash)
9
+ end
7
10
 
8
11
  sig { returns(String) }
9
12
  attr_accessor :id
@@ -6,7 +6,10 @@ module Orb
6
6
  extend Orb::Internal::Type::RequestParameters::Converter
7
7
  include Orb::Internal::Type::RequestParameters
8
8
 
9
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Orb::DimensionalPriceGroupCreateParams, Orb::Internal::AnyHash)
12
+ end
10
13
 
11
14
  sig { returns(String) }
12
15
  attr_accessor :billable_metric_id
@@ -6,7 +6,10 @@ module Orb
6
6
  extend Orb::Internal::Type::RequestParameters::Converter
7
7
  include Orb::Internal::Type::RequestParameters
8
8
 
9
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Orb::DimensionalPriceGroupListParams, Orb::Internal::AnyHash)
12
+ end
10
13
 
11
14
  # Cursor for pagination. This can be populated by the `next_cursor` value returned
12
15
  # from the initial request.
@@ -6,7 +6,13 @@ module Orb
6
6
  extend Orb::Internal::Type::RequestParameters::Converter
7
7
  include Orb::Internal::Type::RequestParameters
8
8
 
9
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Orb::DimensionalPriceGroupRetrieveParams,
13
+ Orb::Internal::AnyHash
14
+ )
15
+ end
10
16
 
11
17
  sig do
12
18
  params(request_options: Orb::RequestOptions::OrHash).returns(
@@ -7,7 +7,13 @@ module Orb
7
7
  extend Orb::Internal::Type::RequestParameters::Converter
8
8
  include Orb::Internal::Type::RequestParameters
9
9
 
10
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Orb::DimensionalPriceGroups::ExternalDimensionalPriceGroupIDRetrieveParams,
14
+ Orb::Internal::AnyHash
15
+ )
16
+ end
11
17
 
12
18
  sig do
13
19
  params(request_options: Orb::RequestOptions::OrHash).returns(
@@ -3,7 +3,10 @@
3
3
  module Orb
4
4
  module Models
5
5
  class DimensionalPriceGroupsAPI < Orb::Internal::Type::BaseModel
6
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Orb::DimensionalPriceGroupsAPI, Orb::Internal::AnyHash)
9
+ end
7
10
 
8
11
  sig { returns(T::Array[Orb::DimensionalPriceGroup]) }
9
12
  attr_accessor :data
@@ -3,7 +3,8 @@
3
3
  module Orb
4
4
  module Models
5
5
  class EvaluatePriceGroup < Orb::Internal::Type::BaseModel
6
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
6
+ OrHash =
7
+ T.type_alias { T.any(Orb::EvaluatePriceGroup, Orb::Internal::AnyHash) }
7
8
 
8
9
  # The price's output for the group
9
10
  sig { returns(String) }
@@ -6,7 +6,10 @@ module Orb
6
6
  extend Orb::Internal::Type::RequestParameters::Converter
7
7
  include Orb::Internal::Type::RequestParameters
8
8
 
9
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Orb::EventDeprecateParams, Orb::Internal::AnyHash)
12
+ end
10
13
 
11
14
  sig do
12
15
  params(request_options: Orb::RequestOptions::OrHash).returns(
@@ -3,7 +3,10 @@
3
3
  module Orb
4
4
  module Models
5
5
  class EventDeprecateResponse < Orb::Internal::Type::BaseModel
6
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Orb::Models::EventDeprecateResponse, Orb::Internal::AnyHash)
9
+ end
7
10
 
8
11
  # event_id of the deprecated event, if successfully updated
9
12
  sig { returns(String) }
@@ -6,7 +6,8 @@ module Orb
6
6
  extend Orb::Internal::Type::RequestParameters::Converter
7
7
  include Orb::Internal::Type::RequestParameters
8
8
 
9
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
9
+ OrHash =
10
+ T.type_alias { T.any(Orb::EventIngestParams, Orb::Internal::AnyHash) }
10
11
 
11
12
  sig { returns(T::Array[Orb::EventIngestParams::Event]) }
12
13
  attr_accessor :events
@@ -56,7 +57,10 @@ module Orb
56
57
  end
57
58
 
58
59
  class Event < Orb::Internal::Type::BaseModel
59
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
60
+ OrHash =
61
+ T.type_alias do
62
+ T.any(Orb::EventIngestParams::Event, Orb::Internal::AnyHash)
63
+ end
60
64
 
61
65
  # A name to meaningfully identify the action or event type.
62
66
  sig { returns(String) }
@@ -3,7 +3,10 @@
3
3
  module Orb
4
4
  module Models
5
5
  class EventIngestResponse < Orb::Internal::Type::BaseModel
6
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Orb::Models::EventIngestResponse, Orb::Internal::AnyHash)
9
+ end
7
10
 
8
11
  # Contains all failing validation events. In the case of a 200, this array will
9
12
  # always be empty. This field will always be present.
@@ -56,7 +59,13 @@ module Orb
56
59
  end
57
60
 
58
61
  class ValidationFailed < Orb::Internal::Type::BaseModel
59
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
62
+ OrHash =
63
+ T.type_alias do
64
+ T.any(
65
+ Orb::Models::EventIngestResponse::ValidationFailed,
66
+ Orb::Internal::AnyHash
67
+ )
68
+ end
60
69
 
61
70
  # The passed idempotency_key corresponding to the validation_errors
62
71
  sig { returns(String) }
@@ -92,7 +101,13 @@ module Orb
92
101
  end
93
102
 
94
103
  class Debug < Orb::Internal::Type::BaseModel
95
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
104
+ OrHash =
105
+ T.type_alias do
106
+ T.any(
107
+ Orb::Models::EventIngestResponse::Debug,
108
+ Orb::Internal::AnyHash
109
+ )
110
+ end
96
111
 
97
112
  sig { returns(T::Array[String]) }
98
113
  attr_accessor :duplicate
@@ -6,7 +6,8 @@ module Orb
6
6
  extend Orb::Internal::Type::RequestParameters::Converter
7
7
  include Orb::Internal::Type::RequestParameters
8
8
 
9
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
9
+ OrHash =
10
+ T.type_alias { T.any(Orb::EventSearchParams, Orb::Internal::AnyHash) }
10
11
 
11
12
  # This is an explicit array of IDs to filter by. Note that an event's ID is the
12
13
  # idempotency_key that was originally used for ingestion, and this only supports
@@ -3,7 +3,10 @@
3
3
  module Orb
4
4
  module Models
5
5
  class EventSearchResponse < Orb::Internal::Type::BaseModel
6
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Orb::Models::EventSearchResponse, Orb::Internal::AnyHash)
9
+ end
7
10
 
8
11
  sig { returns(T::Array[Orb::Models::EventSearchResponse::Data]) }
9
12
  attr_accessor :data
@@ -25,7 +28,13 @@ module Orb
25
28
  end
26
29
 
27
30
  class Data < Orb::Internal::Type::BaseModel
28
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
31
+ OrHash =
32
+ T.type_alias do
33
+ T.any(
34
+ Orb::Models::EventSearchResponse::Data,
35
+ Orb::Internal::AnyHash
36
+ )
37
+ end
29
38
 
30
39
  # A unique value, generated by the client, that is used to de-duplicate events.
31
40
  # Exactly one event with a given idempotency key will be ingested, which allows
@@ -6,7 +6,8 @@ module Orb
6
6
  extend Orb::Internal::Type::RequestParameters::Converter
7
7
  include Orb::Internal::Type::RequestParameters
8
8
 
9
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
9
+ OrHash =
10
+ T.type_alias { T.any(Orb::EventUpdateParams, Orb::Internal::AnyHash) }
10
11
 
11
12
  # A name to meaningfully identify the action or event type.
12
13
  sig { returns(String) }
@@ -3,7 +3,10 @@
3
3
  module Orb
4
4
  module Models
5
5
  class EventUpdateResponse < Orb::Internal::Type::BaseModel
6
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Orb::Models::EventUpdateResponse, Orb::Internal::AnyHash)
9
+ end
7
10
 
8
11
  # event_id of the amended event, if successfully ingested
9
12
  sig { returns(String) }
@@ -7,7 +7,10 @@ module Orb
7
7
  extend Orb::Internal::Type::RequestParameters::Converter
8
8
  include Orb::Internal::Type::RequestParameters
9
9
 
10
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(Orb::Events::BackfillCloseParams, Orb::Internal::AnyHash)
13
+ end
11
14
 
12
15
  sig do
13
16
  params(request_options: Orb::RequestOptions::OrHash).returns(
@@ -4,7 +4,13 @@ module Orb
4
4
  module Models
5
5
  module Events
6
6
  class BackfillCloseResponse < Orb::Internal::Type::BaseModel
7
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Orb::Models::Events::BackfillCloseResponse,
11
+ Orb::Internal::AnyHash
12
+ )
13
+ end
8
14
 
9
15
  sig { returns(String) }
10
16
  attr_accessor :id
@@ -7,7 +7,10 @@ module Orb
7
7
  extend Orb::Internal::Type::RequestParameters::Converter
8
8
  include Orb::Internal::Type::RequestParameters
9
9
 
10
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(Orb::Events::BackfillCreateParams, Orb::Internal::AnyHash)
13
+ end
11
14
 
12
15
  # The (exclusive) end of the usage timeframe affected by this backfill. By
13
16
  # default, Orb allows backfills up to 10 days in duration at a time. Reach out to
@@ -4,7 +4,13 @@ module Orb
4
4
  module Models
5
5
  module Events
6
6
  class BackfillCreateResponse < Orb::Internal::Type::BaseModel
7
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Orb::Models::Events::BackfillCreateResponse,
11
+ Orb::Internal::AnyHash
12
+ )
13
+ end
8
14
 
9
15
  sig { returns(String) }
10
16
  attr_accessor :id
@@ -7,7 +7,10 @@ module Orb
7
7
  extend Orb::Internal::Type::RequestParameters::Converter
8
8
  include Orb::Internal::Type::RequestParameters
9
9
 
10
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(Orb::Events::BackfillFetchParams, Orb::Internal::AnyHash)
13
+ end
11
14
 
12
15
  sig do
13
16
  params(request_options: Orb::RequestOptions::OrHash).returns(
@@ -4,7 +4,13 @@ module Orb
4
4
  module Models
5
5
  module Events
6
6
  class BackfillFetchResponse < Orb::Internal::Type::BaseModel
7
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Orb::Models::Events::BackfillFetchResponse,
11
+ Orb::Internal::AnyHash
12
+ )
13
+ end
8
14
 
9
15
  sig { returns(String) }
10
16
  attr_accessor :id
@@ -7,7 +7,10 @@ module Orb
7
7
  extend Orb::Internal::Type::RequestParameters::Converter
8
8
  include Orb::Internal::Type::RequestParameters
9
9
 
10
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(Orb::Events::BackfillListParams, Orb::Internal::AnyHash)
13
+ end
11
14
 
12
15
  # Cursor for pagination. This can be populated by the `next_cursor` value returned
13
16
  # from the initial request.
@@ -4,7 +4,13 @@ module Orb
4
4
  module Models
5
5
  module Events
6
6
  class BackfillListResponse < Orb::Internal::Type::BaseModel
7
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Orb::Models::Events::BackfillListResponse,
11
+ Orb::Internal::AnyHash
12
+ )
13
+ end
8
14
 
9
15
  sig { returns(String) }
10
16
  attr_accessor :id
@@ -7,7 +7,10 @@ module Orb
7
7
  extend Orb::Internal::Type::RequestParameters::Converter
8
8
  include Orb::Internal::Type::RequestParameters
9
9
 
10
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(Orb::Events::BackfillRevertParams, Orb::Internal::AnyHash)
13
+ end
11
14
 
12
15
  sig do
13
16
  params(request_options: Orb::RequestOptions::OrHash).returns(
@@ -4,7 +4,13 @@ module Orb
4
4
  module Models
5
5
  module Events
6
6
  class BackfillRevertResponse < Orb::Internal::Type::BaseModel
7
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Orb::Models::Events::BackfillRevertResponse,
11
+ Orb::Internal::AnyHash
12
+ )
13
+ end
8
14
 
9
15
  sig { returns(String) }
10
16
  attr_accessor :id
@@ -6,7 +6,10 @@ module Orb
6
6
 
7
7
  module Events
8
8
  class EventVolumes < Orb::Internal::Type::BaseModel
9
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Orb::Events::EventVolumes, Orb::Internal::AnyHash)
12
+ end
10
13
 
11
14
  sig { returns(T::Array[Orb::Events::EventVolumes::Data]) }
12
15
  attr_accessor :data
@@ -26,7 +29,10 @@ module Orb
26
29
  end
27
30
 
28
31
  class Data < Orb::Internal::Type::BaseModel
29
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
32
+ OrHash =
33
+ T.type_alias do
34
+ T.any(Orb::Events::EventVolumes::Data, Orb::Internal::AnyHash)
35
+ end
30
36
 
31
37
  # The number of events ingested with a timestamp between the timeframe
32
38
  sig { returns(Integer) }
@@ -7,7 +7,10 @@ module Orb
7
7
  extend Orb::Internal::Type::RequestParameters::Converter
8
8
  include Orb::Internal::Type::RequestParameters
9
9
 
10
- OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(Orb::Events::VolumeListParams, Orb::Internal::AnyHash)
13
+ end
11
14
 
12
15
  # The start of the timeframe, inclusive, in which to return event volume. All
13
16
  # datetime values are converted to UTC time. If the specified time isn't