orb-billing 1.43.0 → 1.44.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/orb/client.rb +6 -0
- data/lib/orb/models/alert_create_for_plan_params.rb +156 -0
- data/lib/orb/models/dimensional_price_groups/price_create_params.rb +147 -0
- data/lib/orb/models/dimensional_price_groups/price_create_response.rb +19 -0
- data/lib/orb/models/dimensional_price_groups/price_list_params.rb +65 -0
- data/lib/orb/models/plan_created_webhook_event.rb +91 -0
- data/lib/orb/models/plan_edited_webhook_event.rb +131 -0
- data/lib/orb/models/tax_amount.rb +32 -1
- data/lib/orb/models/unwrap_webhook_event.rb +7 -1
- data/lib/orb/models/webhook_endpoint.rb +56 -0
- data/lib/orb/models/webhook_endpoint_create_params.rb +34 -0
- data/lib/orb/models/webhook_endpoint_delete_params.rb +20 -0
- data/lib/orb/models/webhook_endpoint_disable_params.rb +20 -0
- data/lib/orb/models/webhook_endpoint_enable_params.rb +20 -0
- data/lib/orb/models/webhook_endpoint_list_params.rb +34 -0
- data/lib/orb/models/webhook_endpoint_retrieve_params.rb +20 -0
- data/lib/orb/models/webhook_endpoint_update_params.rb +41 -0
- data/lib/orb/models/webhook_endpoint_with_secret.rb +65 -0
- data/lib/orb/models.rb +24 -0
- data/lib/orb/resources/alerts.rb +55 -0
- data/lib/orb/resources/dimensional_price_groups/prices.rb +87 -0
- data/lib/orb/resources/dimensional_price_groups.rb +4 -0
- data/lib/orb/resources/webhook_endpoints.rb +183 -0
- data/lib/orb/resources/webhooks.rb +1 -1
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +17 -0
- data/rbi/orb/client.rbi +5 -0
- data/rbi/orb/models/alert_create_for_plan_params.rbi +290 -0
- data/rbi/orb/models/dimensional_price_groups/price_create_params.rbi +298 -0
- data/rbi/orb/models/dimensional_price_groups/price_create_response.rbi +76 -0
- data/rbi/orb/models/dimensional_price_groups/price_list_params.rbi +134 -0
- data/rbi/orb/models/plan_created_webhook_event.rbi +140 -0
- data/rbi/orb/models/plan_edited_webhook_event.rbi +259 -0
- data/rbi/orb/models/tax_amount.rbi +41 -3
- data/rbi/orb/models/unwrap_webhook_event.rbi +2 -0
- data/rbi/orb/models/webhook_endpoint.rbi +71 -0
- data/rbi/orb/models/webhook_endpoint_create_params.rbi +53 -0
- data/rbi/orb/models/webhook_endpoint_delete_params.rbi +35 -0
- data/rbi/orb/models/webhook_endpoint_disable_params.rbi +35 -0
- data/rbi/orb/models/webhook_endpoint_enable_params.rbi +35 -0
- data/rbi/orb/models/webhook_endpoint_list_params.rbi +56 -0
- data/rbi/orb/models/webhook_endpoint_retrieve_params.rbi +35 -0
- data/rbi/orb/models/webhook_endpoint_update_params.rbi +59 -0
- data/rbi/orb/models/webhook_endpoint_with_secret.rbi +83 -0
- data/rbi/orb/models.rbi +24 -0
- data/rbi/orb/resources/alerts.rbi +59 -0
- data/rbi/orb/resources/dimensional_price_groups/prices.rbi +82 -0
- data/rbi/orb/resources/dimensional_price_groups.rbi +3 -0
- data/rbi/orb/resources/webhook_endpoints.rbi +116 -0
- data/rbi/orb/resources/webhooks.rbi +2 -0
- data/sig/orb/client.rbs +2 -0
- data/sig/orb/models/alert_create_for_plan_params.rbs +126 -0
- data/sig/orb/models/dimensional_price_groups/price_create_params.rbs +123 -0
- data/sig/orb/models/dimensional_price_groups/price_create_response.rbs +15 -0
- data/sig/orb/models/dimensional_price_groups/price_list_params.rbs +61 -0
- data/sig/orb/models/plan_created_webhook_event.rbs +72 -0
- data/sig/orb/models/plan_edited_webhook_event.rbs +116 -0
- data/sig/orb/models/tax_amount.rbs +31 -3
- data/sig/orb/models/unwrap_webhook_event.rbs +2 -0
- data/sig/orb/models/webhook_endpoint.rbs +40 -0
- data/sig/orb/models/webhook_endpoint_create_params.rbs +28 -0
- data/sig/orb/models/webhook_endpoint_delete_params.rbs +23 -0
- data/sig/orb/models/webhook_endpoint_disable_params.rbs +23 -0
- data/sig/orb/models/webhook_endpoint_enable_params.rbs +23 -0
- data/sig/orb/models/webhook_endpoint_list_params.rbs +30 -0
- data/sig/orb/models/webhook_endpoint_retrieve_params.rbs +23 -0
- data/sig/orb/models/webhook_endpoint_update_params.rbs +36 -0
- data/sig/orb/models/webhook_endpoint_with_secret.rbs +45 -0
- data/sig/orb/models.rbs +24 -0
- data/sig/orb/resources/alerts.rbs +12 -0
- data/sig/orb/resources/dimensional_price_groups/prices.rbs +28 -0
- data/sig/orb/resources/dimensional_price_groups.rbs +2 -0
- data/sig/orb/resources/webhook_endpoints.rbs +46 -0
- data/sig/orb/resources/webhooks.rbs +2 -0
- metadata +52 -1
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
module DimensionalPriceGroups
|
|
6
|
+
class PriceCreateParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Orb::DimensionalPriceGroups::PriceCreateParams,
|
|
14
|
+
Orb::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :dimensional_price_group_id
|
|
20
|
+
|
|
21
|
+
# Billing cadence for every price
|
|
22
|
+
sig do
|
|
23
|
+
returns(
|
|
24
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::Cadence::OrSymbol
|
|
25
|
+
)
|
|
26
|
+
end
|
|
27
|
+
attr_accessor :cadence
|
|
28
|
+
|
|
29
|
+
# An ISO 4217 currency string for every price.
|
|
30
|
+
sig { returns(String) }
|
|
31
|
+
attr_accessor :currency
|
|
32
|
+
|
|
33
|
+
# The item for every price. Must be the group's billable metric item.
|
|
34
|
+
sig { returns(String) }
|
|
35
|
+
attr_accessor :item_id
|
|
36
|
+
|
|
37
|
+
sig do
|
|
38
|
+
returns(
|
|
39
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::ModelType::OrSymbol
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
attr_accessor :model_type
|
|
43
|
+
|
|
44
|
+
sig do
|
|
45
|
+
returns(
|
|
46
|
+
T::Array[Orb::DimensionalPriceGroups::PriceCreateParams::Price]
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
attr_accessor :prices
|
|
50
|
+
|
|
51
|
+
# Shared tier boundaries. Required for tiered prices and omitted for unit prices.
|
|
52
|
+
sig do
|
|
53
|
+
returns(
|
|
54
|
+
T.nilable(
|
|
55
|
+
T::Array[Orb::DimensionalPriceGroups::PriceCreateParams::Tier]
|
|
56
|
+
)
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
attr_accessor :tiers
|
|
60
|
+
|
|
61
|
+
sig do
|
|
62
|
+
params(
|
|
63
|
+
dimensional_price_group_id: String,
|
|
64
|
+
cadence:
|
|
65
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::Cadence::OrSymbol,
|
|
66
|
+
currency: String,
|
|
67
|
+
item_id: String,
|
|
68
|
+
model_type:
|
|
69
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::ModelType::OrSymbol,
|
|
70
|
+
prices:
|
|
71
|
+
T::Array[
|
|
72
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::Price::OrHash
|
|
73
|
+
],
|
|
74
|
+
tiers:
|
|
75
|
+
T.nilable(
|
|
76
|
+
T::Array[
|
|
77
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::Tier::OrHash
|
|
78
|
+
]
|
|
79
|
+
),
|
|
80
|
+
request_options: Orb::RequestOptions::OrHash
|
|
81
|
+
).returns(T.attached_class)
|
|
82
|
+
end
|
|
83
|
+
def self.new(
|
|
84
|
+
dimensional_price_group_id:,
|
|
85
|
+
# Billing cadence for every price
|
|
86
|
+
cadence:,
|
|
87
|
+
# An ISO 4217 currency string for every price.
|
|
88
|
+
currency:,
|
|
89
|
+
# The item for every price. Must be the group's billable metric item.
|
|
90
|
+
item_id:,
|
|
91
|
+
model_type:,
|
|
92
|
+
prices:,
|
|
93
|
+
# Shared tier boundaries. Required for tiered prices and omitted for unit prices.
|
|
94
|
+
tiers: nil,
|
|
95
|
+
request_options: {}
|
|
96
|
+
)
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
sig do
|
|
100
|
+
override.returns(
|
|
101
|
+
{
|
|
102
|
+
dimensional_price_group_id: String,
|
|
103
|
+
cadence:
|
|
104
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::Cadence::OrSymbol,
|
|
105
|
+
currency: String,
|
|
106
|
+
item_id: String,
|
|
107
|
+
model_type:
|
|
108
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::ModelType::OrSymbol,
|
|
109
|
+
prices:
|
|
110
|
+
T::Array[Orb::DimensionalPriceGroups::PriceCreateParams::Price],
|
|
111
|
+
tiers:
|
|
112
|
+
T.nilable(
|
|
113
|
+
T::Array[Orb::DimensionalPriceGroups::PriceCreateParams::Tier]
|
|
114
|
+
),
|
|
115
|
+
request_options: Orb::RequestOptions
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
end
|
|
119
|
+
def to_hash
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Billing cadence for every price
|
|
123
|
+
module Cadence
|
|
124
|
+
extend Orb::Internal::Type::Enum
|
|
125
|
+
|
|
126
|
+
TaggedSymbol =
|
|
127
|
+
T.type_alias do
|
|
128
|
+
T.all(
|
|
129
|
+
Symbol,
|
|
130
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::Cadence
|
|
131
|
+
)
|
|
132
|
+
end
|
|
133
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
134
|
+
|
|
135
|
+
ONE_TIME =
|
|
136
|
+
T.let(
|
|
137
|
+
:one_time,
|
|
138
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::Cadence::TaggedSymbol
|
|
139
|
+
)
|
|
140
|
+
MONTHLY =
|
|
141
|
+
T.let(
|
|
142
|
+
:monthly,
|
|
143
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::Cadence::TaggedSymbol
|
|
144
|
+
)
|
|
145
|
+
QUARTERLY =
|
|
146
|
+
T.let(
|
|
147
|
+
:quarterly,
|
|
148
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::Cadence::TaggedSymbol
|
|
149
|
+
)
|
|
150
|
+
SEMI_ANNUAL =
|
|
151
|
+
T.let(
|
|
152
|
+
:semi_annual,
|
|
153
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::Cadence::TaggedSymbol
|
|
154
|
+
)
|
|
155
|
+
ANNUAL =
|
|
156
|
+
T.let(
|
|
157
|
+
:annual,
|
|
158
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::Cadence::TaggedSymbol
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
sig do
|
|
162
|
+
override.returns(
|
|
163
|
+
T::Array[
|
|
164
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::Cadence::TaggedSymbol
|
|
165
|
+
]
|
|
166
|
+
)
|
|
167
|
+
end
|
|
168
|
+
def self.values
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
module ModelType
|
|
173
|
+
extend Orb::Internal::Type::Enum
|
|
174
|
+
|
|
175
|
+
TaggedSymbol =
|
|
176
|
+
T.type_alias do
|
|
177
|
+
T.all(
|
|
178
|
+
Symbol,
|
|
179
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::ModelType
|
|
180
|
+
)
|
|
181
|
+
end
|
|
182
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
183
|
+
|
|
184
|
+
UNIT =
|
|
185
|
+
T.let(
|
|
186
|
+
:unit,
|
|
187
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::ModelType::TaggedSymbol
|
|
188
|
+
)
|
|
189
|
+
TIERED =
|
|
190
|
+
T.let(
|
|
191
|
+
:tiered,
|
|
192
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::ModelType::TaggedSymbol
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
sig do
|
|
196
|
+
override.returns(
|
|
197
|
+
T::Array[
|
|
198
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::ModelType::TaggedSymbol
|
|
199
|
+
]
|
|
200
|
+
)
|
|
201
|
+
end
|
|
202
|
+
def self.values
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
class Price < Orb::Internal::Type::BaseModel
|
|
207
|
+
OrHash =
|
|
208
|
+
T.type_alias do
|
|
209
|
+
T.any(
|
|
210
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::Price,
|
|
211
|
+
Orb::Internal::AnyHash
|
|
212
|
+
)
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# One amount for a unit price. One amount per tier for a tiered price, in tier
|
|
216
|
+
# order.
|
|
217
|
+
sig { returns(T::Array[Float]) }
|
|
218
|
+
attr_accessor :amounts
|
|
219
|
+
|
|
220
|
+
# Dimension values, in the group's dimension order.
|
|
221
|
+
sig { returns(T::Array[String]) }
|
|
222
|
+
attr_accessor :dimension_values
|
|
223
|
+
|
|
224
|
+
# Price name. Defaults to the dimension values.
|
|
225
|
+
sig { returns(T.nilable(String)) }
|
|
226
|
+
attr_accessor :name
|
|
227
|
+
|
|
228
|
+
sig do
|
|
229
|
+
params(
|
|
230
|
+
amounts: T::Array[Float],
|
|
231
|
+
dimension_values: T::Array[String],
|
|
232
|
+
name: T.nilable(String)
|
|
233
|
+
).returns(T.attached_class)
|
|
234
|
+
end
|
|
235
|
+
def self.new(
|
|
236
|
+
# One amount for a unit price. One amount per tier for a tiered price, in tier
|
|
237
|
+
# order.
|
|
238
|
+
amounts:,
|
|
239
|
+
# Dimension values, in the group's dimension order.
|
|
240
|
+
dimension_values:,
|
|
241
|
+
# Price name. Defaults to the dimension values.
|
|
242
|
+
name: nil
|
|
243
|
+
)
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
sig do
|
|
247
|
+
override.returns(
|
|
248
|
+
{
|
|
249
|
+
amounts: T::Array[Float],
|
|
250
|
+
dimension_values: T::Array[String],
|
|
251
|
+
name: T.nilable(String)
|
|
252
|
+
}
|
|
253
|
+
)
|
|
254
|
+
end
|
|
255
|
+
def to_hash
|
|
256
|
+
end
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
class Tier < Orb::Internal::Type::BaseModel
|
|
260
|
+
OrHash =
|
|
261
|
+
T.type_alias do
|
|
262
|
+
T.any(
|
|
263
|
+
Orb::DimensionalPriceGroups::PriceCreateParams::Tier,
|
|
264
|
+
Orb::Internal::AnyHash
|
|
265
|
+
)
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# Exclusive tier starting value
|
|
269
|
+
sig { returns(Float) }
|
|
270
|
+
attr_accessor :first_unit
|
|
271
|
+
|
|
272
|
+
# Inclusive tier ending value. Null on the last tier.
|
|
273
|
+
sig { returns(T.nilable(Float)) }
|
|
274
|
+
attr_accessor :last_unit
|
|
275
|
+
|
|
276
|
+
sig do
|
|
277
|
+
params(first_unit: Float, last_unit: T.nilable(Float)).returns(
|
|
278
|
+
T.attached_class
|
|
279
|
+
)
|
|
280
|
+
end
|
|
281
|
+
def self.new(
|
|
282
|
+
# Exclusive tier starting value
|
|
283
|
+
first_unit:,
|
|
284
|
+
# Inclusive tier ending value. Null on the last tier.
|
|
285
|
+
last_unit: nil
|
|
286
|
+
)
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
sig do
|
|
290
|
+
override.returns({ first_unit: Float, last_unit: T.nilable(Float) })
|
|
291
|
+
end
|
|
292
|
+
def to_hash
|
|
293
|
+
end
|
|
294
|
+
end
|
|
295
|
+
end
|
|
296
|
+
end
|
|
297
|
+
end
|
|
298
|
+
end
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
module DimensionalPriceGroups
|
|
6
|
+
class PriceCreateResponse < Orb::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Orb::Models::DimensionalPriceGroups::PriceCreateResponse,
|
|
11
|
+
Orb::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# The prices created by this request, in request order.
|
|
16
|
+
sig { returns(T::Array[Orb::Price::Variants]) }
|
|
17
|
+
attr_accessor :data
|
|
18
|
+
|
|
19
|
+
sig do
|
|
20
|
+
params(
|
|
21
|
+
data:
|
|
22
|
+
T::Array[
|
|
23
|
+
T.any(
|
|
24
|
+
Orb::Price::Unit::OrHash,
|
|
25
|
+
Orb::Price::Tiered::OrHash,
|
|
26
|
+
Orb::Price::Bulk::OrHash,
|
|
27
|
+
Orb::Price::BulkWithFilters::OrHash,
|
|
28
|
+
Orb::Price::Package::OrHash,
|
|
29
|
+
Orb::Price::Matrix::OrHash,
|
|
30
|
+
Orb::Price::ThresholdTotalAmount::OrHash,
|
|
31
|
+
Orb::Price::TieredPackage::OrHash,
|
|
32
|
+
Orb::Price::TieredWithMinimum::OrHash,
|
|
33
|
+
Orb::Price::GroupedTiered::OrHash,
|
|
34
|
+
Orb::Price::GroupedTieredMatrix::OrHash,
|
|
35
|
+
Orb::Price::TieredPackageWithMinimum::OrHash,
|
|
36
|
+
Orb::Price::PackageWithAllocation::OrHash,
|
|
37
|
+
Orb::Price::UnitWithPercent::OrHash,
|
|
38
|
+
Orb::Price::MatrixWithAllocation::OrHash,
|
|
39
|
+
Orb::Price::TieredMatrixWithAllocation::OrHash,
|
|
40
|
+
Orb::Price::MatrixWithThresholdDiscounts::OrHash,
|
|
41
|
+
Orb::Price::TieredWithProration::OrHash,
|
|
42
|
+
Orb::Price::UnitWithProration::OrHash,
|
|
43
|
+
Orb::Price::GroupedAllocation::OrHash,
|
|
44
|
+
Orb::Price::BulkWithProration::OrHash,
|
|
45
|
+
Orb::Price::GroupedWithProratedMinimum::OrHash,
|
|
46
|
+
Orb::Price::GroupedWithMeteredMinimum::OrHash,
|
|
47
|
+
Orb::Price::GroupedWithMinMaxThresholds::OrHash,
|
|
48
|
+
Orb::Price::MatrixWithDisplayName::OrHash,
|
|
49
|
+
Orb::Price::GroupedTieredPackage::OrHash,
|
|
50
|
+
Orb::Price::MaxGroupTieredPackage::OrHash,
|
|
51
|
+
Orb::Price::ScalableMatrixWithUnitPricing::OrHash,
|
|
52
|
+
Orb::Price::ScalableMatrixWithTieredPricing::OrHash,
|
|
53
|
+
Orb::Price::CumulativeGroupedBulk::OrHash,
|
|
54
|
+
Orb::Price::CumulativeGroupedAllocation::OrHash,
|
|
55
|
+
Orb::Price::DailyCreditAllowance::OrHash,
|
|
56
|
+
Orb::Price::MeteredAllowance::OrHash,
|
|
57
|
+
Orb::Price::MinimumComposite::OrHash,
|
|
58
|
+
Orb::Price::Percent::OrHash,
|
|
59
|
+
Orb::Price::EventOutput::OrHash
|
|
60
|
+
)
|
|
61
|
+
]
|
|
62
|
+
).returns(T.attached_class)
|
|
63
|
+
end
|
|
64
|
+
def self.new(
|
|
65
|
+
# The prices created by this request, in request order.
|
|
66
|
+
data:
|
|
67
|
+
)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
sig { override.returns({ data: T::Array[Orb::Price::Variants] }) }
|
|
71
|
+
def to_hash
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
module DimensionalPriceGroups
|
|
6
|
+
class PriceListParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Orb::DimensionalPriceGroups::PriceListParams,
|
|
14
|
+
Orb::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :dimensional_price_group_id
|
|
20
|
+
|
|
21
|
+
# Cursor for pagination. This can be populated by the `next_cursor` value returned
|
|
22
|
+
# from the initial request.
|
|
23
|
+
sig { returns(T.nilable(String)) }
|
|
24
|
+
attr_accessor :cursor
|
|
25
|
+
|
|
26
|
+
# The number of items to fetch. Defaults to 20.
|
|
27
|
+
sig { returns(T.nilable(Integer)) }
|
|
28
|
+
attr_reader :limit
|
|
29
|
+
|
|
30
|
+
sig { params(limit: Integer).void }
|
|
31
|
+
attr_writer :limit
|
|
32
|
+
|
|
33
|
+
# active omits archived prices. archived returns only archived prices. all returns
|
|
34
|
+
# both.
|
|
35
|
+
sig do
|
|
36
|
+
returns(
|
|
37
|
+
T.nilable(
|
|
38
|
+
Orb::DimensionalPriceGroups::PriceListParams::Status::OrSymbol
|
|
39
|
+
)
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
attr_reader :status
|
|
43
|
+
|
|
44
|
+
sig do
|
|
45
|
+
params(
|
|
46
|
+
status:
|
|
47
|
+
Orb::DimensionalPriceGroups::PriceListParams::Status::OrSymbol
|
|
48
|
+
).void
|
|
49
|
+
end
|
|
50
|
+
attr_writer :status
|
|
51
|
+
|
|
52
|
+
sig do
|
|
53
|
+
params(
|
|
54
|
+
dimensional_price_group_id: String,
|
|
55
|
+
cursor: T.nilable(String),
|
|
56
|
+
limit: Integer,
|
|
57
|
+
status:
|
|
58
|
+
Orb::DimensionalPriceGroups::PriceListParams::Status::OrSymbol,
|
|
59
|
+
request_options: Orb::RequestOptions::OrHash
|
|
60
|
+
).returns(T.attached_class)
|
|
61
|
+
end
|
|
62
|
+
def self.new(
|
|
63
|
+
dimensional_price_group_id:,
|
|
64
|
+
# Cursor for pagination. This can be populated by the `next_cursor` value returned
|
|
65
|
+
# from the initial request.
|
|
66
|
+
cursor: nil,
|
|
67
|
+
# The number of items to fetch. Defaults to 20.
|
|
68
|
+
limit: nil,
|
|
69
|
+
# active omits archived prices. archived returns only archived prices. all returns
|
|
70
|
+
# both.
|
|
71
|
+
status: nil,
|
|
72
|
+
request_options: {}
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
sig do
|
|
77
|
+
override.returns(
|
|
78
|
+
{
|
|
79
|
+
dimensional_price_group_id: String,
|
|
80
|
+
cursor: T.nilable(String),
|
|
81
|
+
limit: Integer,
|
|
82
|
+
status:
|
|
83
|
+
Orb::DimensionalPriceGroups::PriceListParams::Status::OrSymbol,
|
|
84
|
+
request_options: Orb::RequestOptions
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
end
|
|
88
|
+
def to_hash
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# active omits archived prices. archived returns only archived prices. all returns
|
|
92
|
+
# both.
|
|
93
|
+
module Status
|
|
94
|
+
extend Orb::Internal::Type::Enum
|
|
95
|
+
|
|
96
|
+
TaggedSymbol =
|
|
97
|
+
T.type_alias do
|
|
98
|
+
T.all(
|
|
99
|
+
Symbol,
|
|
100
|
+
Orb::DimensionalPriceGroups::PriceListParams::Status
|
|
101
|
+
)
|
|
102
|
+
end
|
|
103
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
104
|
+
|
|
105
|
+
ACTIVE =
|
|
106
|
+
T.let(
|
|
107
|
+
:active,
|
|
108
|
+
Orb::DimensionalPriceGroups::PriceListParams::Status::TaggedSymbol
|
|
109
|
+
)
|
|
110
|
+
ARCHIVED =
|
|
111
|
+
T.let(
|
|
112
|
+
:archived,
|
|
113
|
+
Orb::DimensionalPriceGroups::PriceListParams::Status::TaggedSymbol
|
|
114
|
+
)
|
|
115
|
+
ALL =
|
|
116
|
+
T.let(
|
|
117
|
+
:all,
|
|
118
|
+
Orb::DimensionalPriceGroups::PriceListParams::Status::TaggedSymbol
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
sig do
|
|
122
|
+
override.returns(
|
|
123
|
+
T::Array[
|
|
124
|
+
Orb::DimensionalPriceGroups::PriceListParams::Status::TaggedSymbol
|
|
125
|
+
]
|
|
126
|
+
)
|
|
127
|
+
end
|
|
128
|
+
def self.values
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
end
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
class PlanCreatedWebhookEvent < Orb::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Orb::PlanCreatedWebhookEvent, Orb::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# The ID of this webhook event.
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
attr_accessor :id
|
|
14
|
+
|
|
15
|
+
# The time at which this event was created, to the second.
|
|
16
|
+
sig { returns(Time) }
|
|
17
|
+
attr_accessor :created_at
|
|
18
|
+
|
|
19
|
+
sig { returns(Orb::PlanCreatedWebhookEvent::Plan) }
|
|
20
|
+
attr_reader :plan
|
|
21
|
+
|
|
22
|
+
sig { params(plan: Orb::PlanCreatedWebhookEvent::Plan::OrHash).void }
|
|
23
|
+
attr_writer :plan
|
|
24
|
+
|
|
25
|
+
sig { returns(T.anything) }
|
|
26
|
+
attr_accessor :properties
|
|
27
|
+
|
|
28
|
+
# The event this payload describes.
|
|
29
|
+
sig { returns(Orb::PlanCreatedWebhookEvent::Type::TaggedSymbol) }
|
|
30
|
+
attr_accessor :type
|
|
31
|
+
|
|
32
|
+
# Issued when a plan is created, or when a draft plan is published.
|
|
33
|
+
sig do
|
|
34
|
+
params(
|
|
35
|
+
id: String,
|
|
36
|
+
created_at: Time,
|
|
37
|
+
plan: Orb::PlanCreatedWebhookEvent::Plan::OrHash,
|
|
38
|
+
properties: T.anything,
|
|
39
|
+
type: Orb::PlanCreatedWebhookEvent::Type::OrSymbol
|
|
40
|
+
).returns(T.attached_class)
|
|
41
|
+
end
|
|
42
|
+
def self.new(
|
|
43
|
+
# The ID of this webhook event.
|
|
44
|
+
id:,
|
|
45
|
+
# The time at which this event was created, to the second.
|
|
46
|
+
created_at:,
|
|
47
|
+
plan:,
|
|
48
|
+
properties:,
|
|
49
|
+
# The event this payload describes.
|
|
50
|
+
type:
|
|
51
|
+
)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
sig do
|
|
55
|
+
override.returns(
|
|
56
|
+
{
|
|
57
|
+
id: String,
|
|
58
|
+
created_at: Time,
|
|
59
|
+
plan: Orb::PlanCreatedWebhookEvent::Plan,
|
|
60
|
+
properties: T.anything,
|
|
61
|
+
type: Orb::PlanCreatedWebhookEvent::Type::TaggedSymbol
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
def to_hash
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
class Plan < Orb::Internal::Type::BaseModel
|
|
69
|
+
OrHash =
|
|
70
|
+
T.type_alias do
|
|
71
|
+
T.any(Orb::PlanCreatedWebhookEvent::Plan, Orb::Internal::AnyHash)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
sig { returns(T.nilable(String)) }
|
|
75
|
+
attr_accessor :id
|
|
76
|
+
|
|
77
|
+
# An optional user-defined ID for this plan resource, used throughout the system
|
|
78
|
+
# as an alias for this Plan. Use this field to identify a plan by an existing
|
|
79
|
+
# identifier in your system.
|
|
80
|
+
sig { returns(T.nilable(String)) }
|
|
81
|
+
attr_accessor :external_plan_id
|
|
82
|
+
|
|
83
|
+
sig { returns(T.nilable(String)) }
|
|
84
|
+
attr_accessor :name
|
|
85
|
+
|
|
86
|
+
sig do
|
|
87
|
+
params(
|
|
88
|
+
id: T.nilable(String),
|
|
89
|
+
external_plan_id: T.nilable(String),
|
|
90
|
+
name: T.nilable(String)
|
|
91
|
+
).returns(T.attached_class)
|
|
92
|
+
end
|
|
93
|
+
def self.new(
|
|
94
|
+
id:,
|
|
95
|
+
# An optional user-defined ID for this plan resource, used throughout the system
|
|
96
|
+
# as an alias for this Plan. Use this field to identify a plan by an existing
|
|
97
|
+
# identifier in your system.
|
|
98
|
+
external_plan_id:,
|
|
99
|
+
name:
|
|
100
|
+
)
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
sig do
|
|
104
|
+
override.returns(
|
|
105
|
+
{
|
|
106
|
+
id: T.nilable(String),
|
|
107
|
+
external_plan_id: T.nilable(String),
|
|
108
|
+
name: T.nilable(String)
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
end
|
|
112
|
+
def to_hash
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# The event this payload describes.
|
|
117
|
+
module Type
|
|
118
|
+
extend Orb::Internal::Type::Enum
|
|
119
|
+
|
|
120
|
+
TaggedSymbol =
|
|
121
|
+
T.type_alias { T.all(Symbol, Orb::PlanCreatedWebhookEvent::Type) }
|
|
122
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
123
|
+
|
|
124
|
+
PLAN_CREATED =
|
|
125
|
+
T.let(
|
|
126
|
+
:"plan.created",
|
|
127
|
+
Orb::PlanCreatedWebhookEvent::Type::TaggedSymbol
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
sig do
|
|
131
|
+
override.returns(
|
|
132
|
+
T::Array[Orb::PlanCreatedWebhookEvent::Type::TaggedSymbol]
|
|
133
|
+
)
|
|
134
|
+
end
|
|
135
|
+
def self.values
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|