orb-billing 1.52.0 → 1.53.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/models/billable_metric_edited_webhook_event.rb +33 -1
- data/lib/orb/models/metric_create_params.rb +24 -1
- data/lib/orb/models/metric_list_params.rb +1 -1
- data/lib/orb/models/metric_publish_params.rb +20 -0
- data/lib/orb/models/metric_update_params.rb +20 -1
- data/lib/orb/models/plan.rb +9 -1
- data/lib/orb/models/plan_version_phase.rb +9 -1
- data/lib/orb/models/webhooks/billable_metric_edited_standard_webhook_event.rb +35 -1
- data/lib/orb/models.rb +2 -0
- data/lib/orb/resources/metrics.rb +34 -2
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +1 -0
- data/rbi/orb/models/billable_metric_edited_webhook_event.rbi +76 -3
- data/rbi/orb/models/metric_create_params.rbi +37 -0
- data/rbi/orb/models/metric_list_params.rbi +1 -1
- data/rbi/orb/models/metric_publish_params.rbi +33 -0
- data/rbi/orb/models/metric_update_params.rbi +22 -0
- data/rbi/orb/models/plan.rbi +11 -3
- data/rbi/orb/models/plan_version_phase.rbi +11 -3
- data/rbi/orb/models/webhooks/billable_metric_edited_standard_webhook_event.rbi +76 -3
- data/rbi/orb/models.rbi +2 -0
- data/rbi/orb/resources/metrics.rbi +31 -0
- data/sig/orb/models/billable_metric_edited_webhook_event.rbs +30 -3
- data/sig/orb/models/metric_create_params.rbs +21 -1
- data/sig/orb/models/metric_list_params.rbs +2 -2
- data/sig/orb/models/metric_publish_params.rbs +23 -0
- data/sig/orb/models/metric_update_params.rbs +11 -1
- data/sig/orb/models/plan.rbs +8 -3
- data/sig/orb/models/plan_version_phase.rbs +8 -3
- data/sig/orb/models/webhooks/billable_metric_edited_standard_webhook_event.rbs +30 -3
- data/sig/orb/models.rbs +2 -0
- data/sig/orb/resources/metrics.rbs +8 -0
- metadata +4 -1
|
@@ -16,6 +16,11 @@ module Orb
|
|
|
16
16
|
sig { returns(T.nilable(String)) }
|
|
17
17
|
attr_accessor :description
|
|
18
18
|
|
|
19
|
+
# The id of the item to associate the metric with. Can only be changed while the
|
|
20
|
+
# metric is in `draft` status.
|
|
21
|
+
sig { returns(T.nilable(String)) }
|
|
22
|
+
attr_accessor :item_id
|
|
23
|
+
|
|
19
24
|
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
20
25
|
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
21
26
|
# by setting `metadata` to `null`.
|
|
@@ -26,12 +31,20 @@ module Orb
|
|
|
26
31
|
sig { returns(T.nilable(String)) }
|
|
27
32
|
attr_accessor :name
|
|
28
33
|
|
|
34
|
+
# A new sql string defining the metric. Can only be changed while the metric is in
|
|
35
|
+
# `draft` status and no price uses it. If the metric has parameters, the new sql
|
|
36
|
+
# must use the same ones.
|
|
37
|
+
sig { returns(T.nilable(String)) }
|
|
38
|
+
attr_accessor :sql
|
|
39
|
+
|
|
29
40
|
sig do
|
|
30
41
|
params(
|
|
31
42
|
metric_id: String,
|
|
32
43
|
description: T.nilable(String),
|
|
44
|
+
item_id: T.nilable(String),
|
|
33
45
|
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
34
46
|
name: T.nilable(String),
|
|
47
|
+
sql: T.nilable(String),
|
|
35
48
|
request_options: Orb::RequestOptions::OrHash
|
|
36
49
|
).returns(T.attached_class)
|
|
37
50
|
end
|
|
@@ -39,12 +52,19 @@ module Orb
|
|
|
39
52
|
metric_id:,
|
|
40
53
|
# A description of the metric.
|
|
41
54
|
description: nil,
|
|
55
|
+
# The id of the item to associate the metric with. Can only be changed while the
|
|
56
|
+
# metric is in `draft` status.
|
|
57
|
+
item_id: nil,
|
|
42
58
|
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
43
59
|
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
44
60
|
# by setting `metadata` to `null`.
|
|
45
61
|
metadata: nil,
|
|
46
62
|
# The name of the metric.
|
|
47
63
|
name: nil,
|
|
64
|
+
# A new sql string defining the metric. Can only be changed while the metric is in
|
|
65
|
+
# `draft` status and no price uses it. If the metric has parameters, the new sql
|
|
66
|
+
# must use the same ones.
|
|
67
|
+
sql: nil,
|
|
48
68
|
request_options: {}
|
|
49
69
|
)
|
|
50
70
|
end
|
|
@@ -54,8 +74,10 @@ module Orb
|
|
|
54
74
|
{
|
|
55
75
|
metric_id: String,
|
|
56
76
|
description: T.nilable(String),
|
|
77
|
+
item_id: T.nilable(String),
|
|
57
78
|
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
58
79
|
name: T.nilable(String),
|
|
80
|
+
sql: T.nilable(String),
|
|
59
81
|
request_options: Orb::RequestOptions
|
|
60
82
|
}
|
|
61
83
|
)
|
data/rbi/orb/models/plan.rbi
CHANGED
|
@@ -742,6 +742,10 @@ module Orb
|
|
|
742
742
|
sig { returns(Integer) }
|
|
743
743
|
attr_accessor :order
|
|
744
744
|
|
|
745
|
+
# The IDs of the prices active in this phase.
|
|
746
|
+
sig { returns(T::Array[String]) }
|
|
747
|
+
attr_accessor :price_ids
|
|
748
|
+
|
|
745
749
|
sig do
|
|
746
750
|
params(
|
|
747
751
|
id: String,
|
|
@@ -764,7 +768,8 @@ module Orb
|
|
|
764
768
|
minimum: T.nilable(Orb::Minimum::OrHash),
|
|
765
769
|
minimum_amount: T.nilable(String),
|
|
766
770
|
name: String,
|
|
767
|
-
order: Integer
|
|
771
|
+
order: Integer,
|
|
772
|
+
price_ids: T::Array[String]
|
|
768
773
|
).returns(T.attached_class)
|
|
769
774
|
end
|
|
770
775
|
def self.new(
|
|
@@ -781,7 +786,9 @@ module Orb
|
|
|
781
786
|
minimum_amount:,
|
|
782
787
|
name:,
|
|
783
788
|
# Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.
|
|
784
|
-
order
|
|
789
|
+
order:,
|
|
790
|
+
# The IDs of the prices active in this phase.
|
|
791
|
+
price_ids:
|
|
785
792
|
)
|
|
786
793
|
end
|
|
787
794
|
|
|
@@ -799,7 +806,8 @@ module Orb
|
|
|
799
806
|
minimum: T.nilable(Orb::Minimum),
|
|
800
807
|
minimum_amount: T.nilable(String),
|
|
801
808
|
name: String,
|
|
802
|
-
order: Integer
|
|
809
|
+
order: Integer,
|
|
810
|
+
price_ids: T::Array[String]
|
|
803
811
|
}
|
|
804
812
|
)
|
|
805
813
|
end
|
|
@@ -29,6 +29,10 @@ module Orb
|
|
|
29
29
|
sig { returns(Integer) }
|
|
30
30
|
attr_accessor :order
|
|
31
31
|
|
|
32
|
+
# The IDs of the prices active in this phase.
|
|
33
|
+
sig { returns(T::Array[String]) }
|
|
34
|
+
attr_accessor :price_ids
|
|
35
|
+
|
|
32
36
|
sig do
|
|
33
37
|
params(
|
|
34
38
|
id: String,
|
|
@@ -37,7 +41,8 @@ module Orb
|
|
|
37
41
|
duration_unit:
|
|
38
42
|
T.nilable(Orb::PlanVersionPhase::DurationUnit::OrSymbol),
|
|
39
43
|
name: String,
|
|
40
|
-
order: Integer
|
|
44
|
+
order: Integer,
|
|
45
|
+
price_ids: T::Array[String]
|
|
41
46
|
).returns(T.attached_class)
|
|
42
47
|
end
|
|
43
48
|
def self.new(
|
|
@@ -49,7 +54,9 @@ module Orb
|
|
|
49
54
|
duration_unit:,
|
|
50
55
|
name:,
|
|
51
56
|
# Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.
|
|
52
|
-
order
|
|
57
|
+
order:,
|
|
58
|
+
# The IDs of the prices active in this phase.
|
|
59
|
+
price_ids:
|
|
53
60
|
)
|
|
54
61
|
end
|
|
55
62
|
|
|
@@ -62,7 +69,8 @@ module Orb
|
|
|
62
69
|
duration_unit:
|
|
63
70
|
T.nilable(Orb::PlanVersionPhase::DurationUnit::TaggedSymbol),
|
|
64
71
|
name: String,
|
|
65
|
-
order: Integer
|
|
72
|
+
order: Integer,
|
|
73
|
+
price_ids: T::Array[String]
|
|
66
74
|
}
|
|
67
75
|
)
|
|
68
76
|
end
|
|
@@ -207,34 +207,107 @@ module Orb
|
|
|
207
207
|
sig { returns(T.nilable(String)) }
|
|
208
208
|
attr_accessor :description
|
|
209
209
|
|
|
210
|
+
sig { returns(T.nilable(String)) }
|
|
211
|
+
attr_accessor :item_id
|
|
212
|
+
|
|
210
213
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
211
214
|
attr_accessor :metadata
|
|
212
215
|
|
|
213
216
|
sig { returns(T.nilable(String)) }
|
|
214
217
|
attr_accessor :name
|
|
215
218
|
|
|
219
|
+
sig { returns(T.nilable(String)) }
|
|
220
|
+
attr_accessor :sql
|
|
221
|
+
|
|
222
|
+
sig do
|
|
223
|
+
returns(
|
|
224
|
+
T.nilable(
|
|
225
|
+
Orb::Webhooks::BillableMetricEditedStandardWebhookEvent::Properties::PreviousAttributes::Status::TaggedSymbol
|
|
226
|
+
)
|
|
227
|
+
)
|
|
228
|
+
end
|
|
229
|
+
attr_accessor :status
|
|
230
|
+
|
|
216
231
|
# metadata values are non-null on the wire, as on the price event.
|
|
217
232
|
sig do
|
|
218
233
|
params(
|
|
219
234
|
description: T.nilable(String),
|
|
235
|
+
item_id: T.nilable(String),
|
|
220
236
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
221
|
-
name: T.nilable(String)
|
|
237
|
+
name: T.nilable(String),
|
|
238
|
+
sql: T.nilable(String),
|
|
239
|
+
status:
|
|
240
|
+
T.nilable(
|
|
241
|
+
Orb::Webhooks::BillableMetricEditedStandardWebhookEvent::Properties::PreviousAttributes::Status::OrSymbol
|
|
242
|
+
)
|
|
222
243
|
).returns(T.attached_class)
|
|
223
244
|
end
|
|
224
|
-
def self.new(
|
|
245
|
+
def self.new(
|
|
246
|
+
description: nil,
|
|
247
|
+
item_id: nil,
|
|
248
|
+
metadata: nil,
|
|
249
|
+
name: nil,
|
|
250
|
+
sql: nil,
|
|
251
|
+
status: nil
|
|
252
|
+
)
|
|
225
253
|
end
|
|
226
254
|
|
|
227
255
|
sig do
|
|
228
256
|
override.returns(
|
|
229
257
|
{
|
|
230
258
|
description: T.nilable(String),
|
|
259
|
+
item_id: T.nilable(String),
|
|
231
260
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
232
|
-
name: T.nilable(String)
|
|
261
|
+
name: T.nilable(String),
|
|
262
|
+
sql: T.nilable(String),
|
|
263
|
+
status:
|
|
264
|
+
T.nilable(
|
|
265
|
+
Orb::Webhooks::BillableMetricEditedStandardWebhookEvent::Properties::PreviousAttributes::Status::TaggedSymbol
|
|
266
|
+
)
|
|
233
267
|
}
|
|
234
268
|
)
|
|
235
269
|
end
|
|
236
270
|
def to_hash
|
|
237
271
|
end
|
|
272
|
+
|
|
273
|
+
module Status
|
|
274
|
+
extend Orb::Internal::Type::Enum
|
|
275
|
+
|
|
276
|
+
TaggedSymbol =
|
|
277
|
+
T.type_alias do
|
|
278
|
+
T.all(
|
|
279
|
+
Symbol,
|
|
280
|
+
Orb::Webhooks::BillableMetricEditedStandardWebhookEvent::Properties::PreviousAttributes::Status
|
|
281
|
+
)
|
|
282
|
+
end
|
|
283
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
284
|
+
|
|
285
|
+
ACTIVE =
|
|
286
|
+
T.let(
|
|
287
|
+
:active,
|
|
288
|
+
Orb::Webhooks::BillableMetricEditedStandardWebhookEvent::Properties::PreviousAttributes::Status::TaggedSymbol
|
|
289
|
+
)
|
|
290
|
+
ARCHIVED =
|
|
291
|
+
T.let(
|
|
292
|
+
:archived,
|
|
293
|
+
Orb::Webhooks::BillableMetricEditedStandardWebhookEvent::Properties::PreviousAttributes::Status::TaggedSymbol
|
|
294
|
+
)
|
|
295
|
+
DRAFT =
|
|
296
|
+
T.let(
|
|
297
|
+
:draft,
|
|
298
|
+
Orb::Webhooks::BillableMetricEditedStandardWebhookEvent::Properties::PreviousAttributes::Status::TaggedSymbol
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
sig do
|
|
302
|
+
override.returns(
|
|
303
|
+
T::Array[
|
|
304
|
+
Orb::Webhooks::BillableMetricEditedStandardWebhookEvent::Properties::PreviousAttributes::Status::TaggedSymbol
|
|
305
|
+
]
|
|
306
|
+
)
|
|
307
|
+
end
|
|
308
|
+
def self.values
|
|
309
|
+
end
|
|
310
|
+
end
|
|
238
311
|
end
|
|
239
312
|
end
|
|
240
313
|
|
data/rbi/orb/models.rbi
CHANGED
|
@@ -405,6 +405,8 @@ module Orb
|
|
|
405
405
|
|
|
406
406
|
MetricListParams = Orb::Models::MetricListParams
|
|
407
407
|
|
|
408
|
+
MetricPublishParams = Orb::Models::MetricPublishParams
|
|
409
|
+
|
|
408
410
|
MetricUnarchiveParams = Orb::Models::MetricUnarchiveParams
|
|
409
411
|
|
|
410
412
|
MetricUpdateParams = Orb::Models::MetricUpdateParams
|
|
@@ -16,6 +16,7 @@ module Orb
|
|
|
16
16
|
name: String,
|
|
17
17
|
sql: String,
|
|
18
18
|
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
19
|
+
status: Orb::MetricCreateParams::Status::OrSymbol,
|
|
19
20
|
request_options: Orb::RequestOptions::OrHash
|
|
20
21
|
).returns(Orb::BillableMetric)
|
|
21
22
|
end
|
|
@@ -32,6 +33,10 @@ module Orb
|
|
|
32
33
|
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
33
34
|
# by setting `metadata` to `null`.
|
|
34
35
|
metadata: nil,
|
|
36
|
+
# The status of the metric to create (either active or draft). If not specified,
|
|
37
|
+
# this defaults to active. A draft metric's `sql` and `item_id` can be changed
|
|
38
|
+
# until it's published.
|
|
39
|
+
status: nil,
|
|
35
40
|
request_options: {}
|
|
36
41
|
)
|
|
37
42
|
end
|
|
@@ -40,12 +45,18 @@ module Orb
|
|
|
40
45
|
# properties on a metric. Fields left out of the request are not changed, and
|
|
41
46
|
# `name` cannot be empty. If you pass `null` for the metadata value, it will clear
|
|
42
47
|
# any existing metadata for that metric.
|
|
48
|
+
#
|
|
49
|
+
# While a metric is in `draft` status, its `sql` and `item_id` can also be
|
|
50
|
+
# changed. Use [publish metric](/api-reference/metric/publish-metric) to make a
|
|
51
|
+
# draft metric active.
|
|
43
52
|
sig do
|
|
44
53
|
params(
|
|
45
54
|
metric_id: String,
|
|
46
55
|
description: T.nilable(String),
|
|
56
|
+
item_id: T.nilable(String),
|
|
47
57
|
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
48
58
|
name: T.nilable(String),
|
|
59
|
+
sql: T.nilable(String),
|
|
49
60
|
request_options: Orb::RequestOptions::OrHash
|
|
50
61
|
).returns(Orb::BillableMetric)
|
|
51
62
|
end
|
|
@@ -53,12 +64,19 @@ module Orb
|
|
|
53
64
|
metric_id,
|
|
54
65
|
# A description of the metric.
|
|
55
66
|
description: nil,
|
|
67
|
+
# The id of the item to associate the metric with. Can only be changed while the
|
|
68
|
+
# metric is in `draft` status.
|
|
69
|
+
item_id: nil,
|
|
56
70
|
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
57
71
|
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
58
72
|
# by setting `metadata` to `null`.
|
|
59
73
|
metadata: nil,
|
|
60
74
|
# The name of the metric.
|
|
61
75
|
name: nil,
|
|
76
|
+
# A new sql string defining the metric. Can only be changed while the metric is in
|
|
77
|
+
# `draft` status and no price uses it. If the metric has parameters, the new sql
|
|
78
|
+
# must use the same ones.
|
|
79
|
+
sql: nil,
|
|
62
80
|
request_options: {}
|
|
63
81
|
)
|
|
64
82
|
end
|
|
@@ -124,6 +142,19 @@ module Orb
|
|
|
124
142
|
def fetch(metric_id, request_options: {})
|
|
125
143
|
end
|
|
126
144
|
|
|
145
|
+
# This endpoint publishes a [metric](/core-concepts#metric) in `draft` status,
|
|
146
|
+
# making it `active`. Only draft metrics can be published, and an active metric
|
|
147
|
+
# can't be moved back into `draft`, so its `sql` and `item_id` can no longer be
|
|
148
|
+
# changed.
|
|
149
|
+
sig do
|
|
150
|
+
params(
|
|
151
|
+
metric_id: String,
|
|
152
|
+
request_options: Orb::RequestOptions::OrHash
|
|
153
|
+
).returns(Orb::BillableMetric)
|
|
154
|
+
end
|
|
155
|
+
def publish(metric_id, request_options: {})
|
|
156
|
+
end
|
|
157
|
+
|
|
127
158
|
# This endpoint restores an archived [metric](/core-concepts#metric) to `active`,
|
|
128
159
|
# so it can be chosen for new plans again. Only archived metrics can be
|
|
129
160
|
# unarchived.
|
|
@@ -71,28 +71,55 @@ module Orb
|
|
|
71
71
|
type previous_attributes =
|
|
72
72
|
{
|
|
73
73
|
description: String?,
|
|
74
|
+
item_id: String?,
|
|
74
75
|
metadata: ::Hash[Symbol, String]?,
|
|
75
|
-
name: String
|
|
76
|
+
name: String?,
|
|
77
|
+
sql: String?,
|
|
78
|
+
status: Orb::Models::BillableMetricEditedWebhookEvent::Properties::PreviousAttributes::status?
|
|
76
79
|
}
|
|
77
80
|
|
|
78
81
|
class PreviousAttributes < Orb::Internal::Type::BaseModel
|
|
79
82
|
attr_accessor description: String?
|
|
80
83
|
|
|
84
|
+
attr_accessor item_id: String?
|
|
85
|
+
|
|
81
86
|
attr_accessor metadata: ::Hash[Symbol, String]?
|
|
82
87
|
|
|
83
88
|
attr_accessor name: String?
|
|
84
89
|
|
|
90
|
+
attr_accessor sql: String?
|
|
91
|
+
|
|
92
|
+
attr_accessor status: Orb::Models::BillableMetricEditedWebhookEvent::Properties::PreviousAttributes::status?
|
|
93
|
+
|
|
85
94
|
def initialize: (
|
|
86
95
|
?description: String?,
|
|
96
|
+
?item_id: String?,
|
|
87
97
|
?metadata: ::Hash[Symbol, String]?,
|
|
88
|
-
?name: String
|
|
98
|
+
?name: String?,
|
|
99
|
+
?sql: String?,
|
|
100
|
+
?status: Orb::Models::BillableMetricEditedWebhookEvent::Properties::PreviousAttributes::status?
|
|
89
101
|
) -> void
|
|
90
102
|
|
|
91
103
|
def to_hash: -> {
|
|
92
104
|
description: String?,
|
|
105
|
+
item_id: String?,
|
|
93
106
|
metadata: ::Hash[Symbol, String]?,
|
|
94
|
-
name: String
|
|
107
|
+
name: String?,
|
|
108
|
+
sql: String?,
|
|
109
|
+
status: Orb::Models::BillableMetricEditedWebhookEvent::Properties::PreviousAttributes::status?
|
|
95
110
|
}
|
|
111
|
+
|
|
112
|
+
type status = :active | :archived | :draft
|
|
113
|
+
|
|
114
|
+
module Status
|
|
115
|
+
extend Orb::Internal::Type::Enum
|
|
116
|
+
|
|
117
|
+
ACTIVE: :active
|
|
118
|
+
ARCHIVED: :archived
|
|
119
|
+
DRAFT: :draft
|
|
120
|
+
|
|
121
|
+
def self?.values: -> ::Array[Orb::Models::BillableMetricEditedWebhookEvent::Properties::PreviousAttributes::status]
|
|
122
|
+
end
|
|
96
123
|
end
|
|
97
124
|
end
|
|
98
125
|
|
|
@@ -6,7 +6,8 @@ module Orb
|
|
|
6
6
|
item_id: String,
|
|
7
7
|
name: String,
|
|
8
8
|
sql: String,
|
|
9
|
-
metadata: ::Hash[Symbol, String?]
|
|
9
|
+
metadata: ::Hash[Symbol, String?]?,
|
|
10
|
+
status: Orb::Models::MetricCreateParams::status
|
|
10
11
|
}
|
|
11
12
|
& Orb::Internal::Type::request_parameters
|
|
12
13
|
|
|
@@ -24,12 +25,19 @@ module Orb
|
|
|
24
25
|
|
|
25
26
|
attr_accessor metadata: ::Hash[Symbol, String?]?
|
|
26
27
|
|
|
28
|
+
attr_reader status: Orb::Models::MetricCreateParams::status?
|
|
29
|
+
|
|
30
|
+
def status=: (
|
|
31
|
+
Orb::Models::MetricCreateParams::status
|
|
32
|
+
) -> Orb::Models::MetricCreateParams::status
|
|
33
|
+
|
|
27
34
|
def initialize: (
|
|
28
35
|
description: String?,
|
|
29
36
|
item_id: String,
|
|
30
37
|
name: String,
|
|
31
38
|
sql: String,
|
|
32
39
|
?metadata: ::Hash[Symbol, String?]?,
|
|
40
|
+
?status: Orb::Models::MetricCreateParams::status,
|
|
33
41
|
?request_options: Orb::request_opts
|
|
34
42
|
) -> void
|
|
35
43
|
|
|
@@ -39,8 +47,20 @@ module Orb
|
|
|
39
47
|
name: String,
|
|
40
48
|
sql: String,
|
|
41
49
|
metadata: ::Hash[Symbol, String?]?,
|
|
50
|
+
status: Orb::Models::MetricCreateParams::status,
|
|
42
51
|
request_options: Orb::RequestOptions
|
|
43
52
|
}
|
|
53
|
+
|
|
54
|
+
type status = :active | :draft
|
|
55
|
+
|
|
56
|
+
module Status
|
|
57
|
+
extend Orb::Internal::Type::Enum
|
|
58
|
+
|
|
59
|
+
ACTIVE: :active
|
|
60
|
+
DRAFT: :draft
|
|
61
|
+
|
|
62
|
+
def self?.values: -> ::Array[Orb::Models::MetricCreateParams::status]
|
|
63
|
+
end
|
|
44
64
|
end
|
|
45
65
|
end
|
|
46
66
|
end
|
|
@@ -54,14 +54,14 @@ module Orb
|
|
|
54
54
|
request_options: Orb::RequestOptions
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
type status = :active | :
|
|
57
|
+
type status = :active | :draft | :archived
|
|
58
58
|
|
|
59
59
|
module Status
|
|
60
60
|
extend Orb::Internal::Type::Enum
|
|
61
61
|
|
|
62
62
|
ACTIVE: :active
|
|
63
|
-
ARCHIVED: :archived
|
|
64
63
|
DRAFT: :draft
|
|
64
|
+
ARCHIVED: :archived
|
|
65
65
|
|
|
66
66
|
def self?.values: -> ::Array[Orb::Models::MetricListParams::status]
|
|
67
67
|
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
type metric_publish_params =
|
|
4
|
+
{ metric_id: String } & Orb::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class MetricPublishParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
attr_accessor metric_id: String
|
|
11
|
+
|
|
12
|
+
def initialize: (
|
|
13
|
+
metric_id: String,
|
|
14
|
+
?request_options: Orb::request_opts
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> {
|
|
18
|
+
metric_id: String,
|
|
19
|
+
request_options: Orb::RequestOptions
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -4,8 +4,10 @@ module Orb
|
|
|
4
4
|
{
|
|
5
5
|
metric_id: String,
|
|
6
6
|
description: String?,
|
|
7
|
+
item_id: String?,
|
|
7
8
|
metadata: ::Hash[Symbol, String?]?,
|
|
8
|
-
name: String
|
|
9
|
+
name: String?,
|
|
10
|
+
sql: String?
|
|
9
11
|
}
|
|
10
12
|
& Orb::Internal::Type::request_parameters
|
|
11
13
|
|
|
@@ -17,23 +19,31 @@ module Orb
|
|
|
17
19
|
|
|
18
20
|
attr_accessor description: String?
|
|
19
21
|
|
|
22
|
+
attr_accessor item_id: String?
|
|
23
|
+
|
|
20
24
|
attr_accessor metadata: ::Hash[Symbol, String?]?
|
|
21
25
|
|
|
22
26
|
attr_accessor name: String?
|
|
23
27
|
|
|
28
|
+
attr_accessor sql: String?
|
|
29
|
+
|
|
24
30
|
def initialize: (
|
|
25
31
|
metric_id: String,
|
|
26
32
|
?description: String?,
|
|
33
|
+
?item_id: String?,
|
|
27
34
|
?metadata: ::Hash[Symbol, String?]?,
|
|
28
35
|
?name: String?,
|
|
36
|
+
?sql: String?,
|
|
29
37
|
?request_options: Orb::request_opts
|
|
30
38
|
) -> void
|
|
31
39
|
|
|
32
40
|
def to_hash: -> {
|
|
33
41
|
metric_id: String,
|
|
34
42
|
description: String?,
|
|
43
|
+
item_id: String?,
|
|
35
44
|
metadata: ::Hash[Symbol, String?]?,
|
|
36
45
|
name: String?,
|
|
46
|
+
sql: String?,
|
|
37
47
|
request_options: Orb::RequestOptions
|
|
38
48
|
}
|
|
39
49
|
end
|
data/sig/orb/models/plan.rbs
CHANGED
|
@@ -312,7 +312,8 @@ module Orb
|
|
|
312
312
|
minimum: Orb::Minimum?,
|
|
313
313
|
minimum_amount: String?,
|
|
314
314
|
name: String,
|
|
315
|
-
order: Integer
|
|
315
|
+
order: Integer,
|
|
316
|
+
price_ids: ::Array[String]
|
|
316
317
|
}
|
|
317
318
|
|
|
318
319
|
class PlanPhase < Orb::Internal::Type::BaseModel
|
|
@@ -338,6 +339,8 @@ module Orb
|
|
|
338
339
|
|
|
339
340
|
attr_accessor order: Integer
|
|
340
341
|
|
|
342
|
+
attr_accessor price_ids: ::Array[String]
|
|
343
|
+
|
|
341
344
|
def initialize: (
|
|
342
345
|
id: String,
|
|
343
346
|
description: String?,
|
|
@@ -349,7 +352,8 @@ module Orb
|
|
|
349
352
|
minimum: Orb::Minimum?,
|
|
350
353
|
minimum_amount: String?,
|
|
351
354
|
name: String,
|
|
352
|
-
order: Integer
|
|
355
|
+
order: Integer,
|
|
356
|
+
price_ids: ::Array[String]
|
|
353
357
|
) -> void
|
|
354
358
|
|
|
355
359
|
def to_hash: -> {
|
|
@@ -363,7 +367,8 @@ module Orb
|
|
|
363
367
|
minimum: Orb::Minimum?,
|
|
364
368
|
minimum_amount: String?,
|
|
365
369
|
name: String,
|
|
366
|
-
order: Integer
|
|
370
|
+
order: Integer,
|
|
371
|
+
price_ids: ::Array[String]
|
|
367
372
|
}
|
|
368
373
|
|
|
369
374
|
type duration_unit =
|
|
@@ -7,7 +7,8 @@ module Orb
|
|
|
7
7
|
duration: Integer?,
|
|
8
8
|
duration_unit: Orb::Models::PlanVersionPhase::duration_unit?,
|
|
9
9
|
name: String,
|
|
10
|
-
order: Integer
|
|
10
|
+
order: Integer,
|
|
11
|
+
price_ids: ::Array[String]
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
class PlanVersionPhase < Orb::Internal::Type::BaseModel
|
|
@@ -23,13 +24,16 @@ module Orb
|
|
|
23
24
|
|
|
24
25
|
attr_accessor order: Integer
|
|
25
26
|
|
|
27
|
+
attr_accessor price_ids: ::Array[String]
|
|
28
|
+
|
|
26
29
|
def initialize: (
|
|
27
30
|
id: String,
|
|
28
31
|
description: String?,
|
|
29
32
|
duration: Integer?,
|
|
30
33
|
duration_unit: Orb::Models::PlanVersionPhase::duration_unit?,
|
|
31
34
|
name: String,
|
|
32
|
-
order: Integer
|
|
35
|
+
order: Integer,
|
|
36
|
+
price_ids: ::Array[String]
|
|
33
37
|
) -> void
|
|
34
38
|
|
|
35
39
|
def to_hash: -> {
|
|
@@ -38,7 +42,8 @@ module Orb
|
|
|
38
42
|
duration: Integer?,
|
|
39
43
|
duration_unit: Orb::Models::PlanVersionPhase::duration_unit?,
|
|
40
44
|
name: String,
|
|
41
|
-
order: Integer
|
|
45
|
+
order: Integer,
|
|
46
|
+
price_ids: ::Array[String]
|
|
42
47
|
}
|
|
43
48
|
|
|
44
49
|
type duration_unit =
|
|
@@ -72,28 +72,55 @@ module Orb
|
|
|
72
72
|
type previous_attributes =
|
|
73
73
|
{
|
|
74
74
|
description: String?,
|
|
75
|
+
item_id: String?,
|
|
75
76
|
metadata: ::Hash[Symbol, String]?,
|
|
76
|
-
name: String
|
|
77
|
+
name: String?,
|
|
78
|
+
sql: String?,
|
|
79
|
+
status: Orb::Models::Webhooks::BillableMetricEditedStandardWebhookEvent::Properties::PreviousAttributes::status?
|
|
77
80
|
}
|
|
78
81
|
|
|
79
82
|
class PreviousAttributes < Orb::Internal::Type::BaseModel
|
|
80
83
|
attr_accessor description: String?
|
|
81
84
|
|
|
85
|
+
attr_accessor item_id: String?
|
|
86
|
+
|
|
82
87
|
attr_accessor metadata: ::Hash[Symbol, String]?
|
|
83
88
|
|
|
84
89
|
attr_accessor name: String?
|
|
85
90
|
|
|
91
|
+
attr_accessor sql: String?
|
|
92
|
+
|
|
93
|
+
attr_accessor status: Orb::Models::Webhooks::BillableMetricEditedStandardWebhookEvent::Properties::PreviousAttributes::status?
|
|
94
|
+
|
|
86
95
|
def initialize: (
|
|
87
96
|
?description: String?,
|
|
97
|
+
?item_id: String?,
|
|
88
98
|
?metadata: ::Hash[Symbol, String]?,
|
|
89
|
-
?name: String
|
|
99
|
+
?name: String?,
|
|
100
|
+
?sql: String?,
|
|
101
|
+
?status: Orb::Models::Webhooks::BillableMetricEditedStandardWebhookEvent::Properties::PreviousAttributes::status?
|
|
90
102
|
) -> void
|
|
91
103
|
|
|
92
104
|
def to_hash: -> {
|
|
93
105
|
description: String?,
|
|
106
|
+
item_id: String?,
|
|
94
107
|
metadata: ::Hash[Symbol, String]?,
|
|
95
|
-
name: String
|
|
108
|
+
name: String?,
|
|
109
|
+
sql: String?,
|
|
110
|
+
status: Orb::Models::Webhooks::BillableMetricEditedStandardWebhookEvent::Properties::PreviousAttributes::status?
|
|
96
111
|
}
|
|
112
|
+
|
|
113
|
+
type status = :active | :archived | :draft
|
|
114
|
+
|
|
115
|
+
module Status
|
|
116
|
+
extend Orb::Internal::Type::Enum
|
|
117
|
+
|
|
118
|
+
ACTIVE: :active
|
|
119
|
+
ARCHIVED: :archived
|
|
120
|
+
DRAFT: :draft
|
|
121
|
+
|
|
122
|
+
def self?.values: -> ::Array[Orb::Models::Webhooks::BillableMetricEditedStandardWebhookEvent::Properties::PreviousAttributes::status]
|
|
123
|
+
end
|
|
97
124
|
end
|
|
98
125
|
end
|
|
99
126
|
|
data/sig/orb/models.rbs
CHANGED
|
@@ -353,6 +353,8 @@ module Orb
|
|
|
353
353
|
|
|
354
354
|
class MetricListParams = Orb::Models::MetricListParams
|
|
355
355
|
|
|
356
|
+
class MetricPublishParams = Orb::Models::MetricPublishParams
|
|
357
|
+
|
|
356
358
|
class MetricUnarchiveParams = Orb::Models::MetricUnarchiveParams
|
|
357
359
|
|
|
358
360
|
class MetricUpdateParams = Orb::Models::MetricUpdateParams
|