orb-billing 1.51.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 +15 -0
- data/README.md +1 -1
- data/lib/orb/models/billable_metric_edited_webhook_event.rb +33 -1
- data/lib/orb/models/credit_block_accounting_sync_failed_webhook_event.rb +7 -1
- data/lib/orb/models/credit_block_accounting_sync_succeeded_webhook_event.rb +7 -1
- data/lib/orb/models/credit_block_list_invoices_response.rb +7 -1
- data/lib/orb/models/credit_block_retrieve_response.rb +7 -1
- data/lib/orb/models/credit_block_update_response.rb +7 -1
- data/lib/orb/models/customer_credit_ledger_incremented_webhook_event.rb +7 -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/webhooks/credit_block_accounting_sync_failed_standard_webhook_event.rb +7 -1
- data/lib/orb/models/webhooks/credit_block_accounting_sync_succeeded_standard_webhook_event.rb +7 -1
- data/lib/orb/models/webhooks/customer_credit_ledger_incremented_standard_webhook_event.rb +7 -1
- data/lib/orb/models.rb +2 -0
- data/lib/orb/resources/credit_blocks.rb +2 -1
- 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/credit_block_accounting_sync_failed_webhook_event.rbi +11 -0
- data/rbi/orb/models/credit_block_accounting_sync_succeeded_webhook_event.rbi +11 -0
- data/rbi/orb/models/credit_block_list_invoices_response.rbi +11 -0
- data/rbi/orb/models/credit_block_retrieve_response.rbi +11 -0
- data/rbi/orb/models/credit_block_update_response.rbi +11 -0
- data/rbi/orb/models/customer_credit_ledger_incremented_webhook_event.rbi +11 -0
- 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/webhooks/credit_block_accounting_sync_failed_standard_webhook_event.rbi +11 -0
- data/rbi/orb/models/webhooks/credit_block_accounting_sync_succeeded_standard_webhook_event.rbi +11 -0
- data/rbi/orb/models/webhooks/customer_credit_ledger_incremented_standard_webhook_event.rbi +11 -0
- data/rbi/orb/models.rbi +2 -0
- data/rbi/orb/resources/credit_blocks.rbi +2 -1
- data/rbi/orb/resources/metrics.rbi +31 -0
- data/sig/orb/models/billable_metric_edited_webhook_event.rbs +30 -3
- data/sig/orb/models/credit_block_accounting_sync_failed_webhook_event.rbs +2 -1
- data/sig/orb/models/credit_block_accounting_sync_succeeded_webhook_event.rbs +2 -1
- data/sig/orb/models/credit_block_list_invoices_response.rbs +2 -1
- data/sig/orb/models/credit_block_retrieve_response.rbs +2 -1
- data/sig/orb/models/credit_block_update_response.rbs +2 -1
- data/sig/orb/models/customer_credit_ledger_incremented_webhook_event.rbs +2 -1
- 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/webhooks/credit_block_accounting_sync_failed_standard_webhook_event.rbs +2 -1
- data/sig/orb/models/webhooks/credit_block_accounting_sync_succeeded_standard_webhook_event.rbs +2 -1
- data/sig/orb/models/webhooks/customer_credit_ledger_incremented_standard_webhook_event.rbs +2 -1
- data/sig/orb/models.rbs +2 -0
- data/sig/orb/resources/metrics.rbs +8 -0
- metadata +4 -1
|
@@ -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
|
|
|
@@ -344,6 +344,8 @@ module Orb
|
|
|
344
344
|
sig { returns(T.nilable(String)) }
|
|
345
345
|
attr_accessor :per_unit_cost_basis
|
|
346
346
|
|
|
347
|
+
# `void` means the credit block was deleted. A voided block's `balance` is
|
|
348
|
+
# always 0.
|
|
347
349
|
sig do
|
|
348
350
|
returns(
|
|
349
351
|
Orb::Webhooks::CreditBlockAccountingSyncFailedStandardWebhookEvent::Block::Status::TaggedSymbol
|
|
@@ -440,6 +442,8 @@ module Orb
|
|
|
440
442
|
# `null`.
|
|
441
443
|
metadata:,
|
|
442
444
|
per_unit_cost_basis:,
|
|
445
|
+
# `void` means the credit block was deleted. A voided block's `balance` is
|
|
446
|
+
# always 0.
|
|
443
447
|
status:,
|
|
444
448
|
# The credit allocation that funded a block. Extends the allocation resource
|
|
445
449
|
# serialized on prices with the catalog-item attribution of the funding price.
|
|
@@ -679,6 +683,8 @@ module Orb
|
|
|
679
683
|
end
|
|
680
684
|
end
|
|
681
685
|
|
|
686
|
+
# `void` means the credit block was deleted. A voided block's `balance` is
|
|
687
|
+
# always 0.
|
|
682
688
|
module Status
|
|
683
689
|
extend Orb::Internal::Type::Enum
|
|
684
690
|
|
|
@@ -701,6 +707,11 @@ module Orb
|
|
|
701
707
|
:pending_payment,
|
|
702
708
|
Orb::Webhooks::CreditBlockAccountingSyncFailedStandardWebhookEvent::Block::Status::TaggedSymbol
|
|
703
709
|
)
|
|
710
|
+
VOID =
|
|
711
|
+
T.let(
|
|
712
|
+
:void,
|
|
713
|
+
Orb::Webhooks::CreditBlockAccountingSyncFailedStandardWebhookEvent::Block::Status::TaggedSymbol
|
|
714
|
+
)
|
|
704
715
|
|
|
705
716
|
sig do
|
|
706
717
|
override.returns(
|
data/rbi/orb/models/webhooks/credit_block_accounting_sync_succeeded_standard_webhook_event.rbi
CHANGED
|
@@ -344,6 +344,8 @@ module Orb
|
|
|
344
344
|
sig { returns(T.nilable(String)) }
|
|
345
345
|
attr_accessor :per_unit_cost_basis
|
|
346
346
|
|
|
347
|
+
# `void` means the credit block was deleted. A voided block's `balance` is
|
|
348
|
+
# always 0.
|
|
347
349
|
sig do
|
|
348
350
|
returns(
|
|
349
351
|
Orb::Webhooks::CreditBlockAccountingSyncSucceededStandardWebhookEvent::Block::Status::TaggedSymbol
|
|
@@ -440,6 +442,8 @@ module Orb
|
|
|
440
442
|
# `null`.
|
|
441
443
|
metadata:,
|
|
442
444
|
per_unit_cost_basis:,
|
|
445
|
+
# `void` means the credit block was deleted. A voided block's `balance` is
|
|
446
|
+
# always 0.
|
|
443
447
|
status:,
|
|
444
448
|
# The credit allocation that funded a block. Extends the allocation resource
|
|
445
449
|
# serialized on prices with the catalog-item attribution of the funding price.
|
|
@@ -679,6 +683,8 @@ module Orb
|
|
|
679
683
|
end
|
|
680
684
|
end
|
|
681
685
|
|
|
686
|
+
# `void` means the credit block was deleted. A voided block's `balance` is
|
|
687
|
+
# always 0.
|
|
682
688
|
module Status
|
|
683
689
|
extend Orb::Internal::Type::Enum
|
|
684
690
|
|
|
@@ -701,6 +707,11 @@ module Orb
|
|
|
701
707
|
:pending_payment,
|
|
702
708
|
Orb::Webhooks::CreditBlockAccountingSyncSucceededStandardWebhookEvent::Block::Status::TaggedSymbol
|
|
703
709
|
)
|
|
710
|
+
VOID =
|
|
711
|
+
T.let(
|
|
712
|
+
:void,
|
|
713
|
+
Orb::Webhooks::CreditBlockAccountingSyncSucceededStandardWebhookEvent::Block::Status::TaggedSymbol
|
|
714
|
+
)
|
|
704
715
|
|
|
705
716
|
sig do
|
|
706
717
|
override.returns(
|
|
@@ -302,6 +302,8 @@ module Orb
|
|
|
302
302
|
sig { returns(T.nilable(String)) }
|
|
303
303
|
attr_accessor :per_unit_cost_basis
|
|
304
304
|
|
|
305
|
+
# `void` means the credit block was deleted. A voided block's `balance` is
|
|
306
|
+
# always 0.
|
|
305
307
|
sig do
|
|
306
308
|
returns(
|
|
307
309
|
Orb::Webhooks::CustomerCreditLedgerIncrementedStandardWebhookEvent::Properties::Block::Status::TaggedSymbol
|
|
@@ -398,6 +400,8 @@ module Orb
|
|
|
398
400
|
# `null`.
|
|
399
401
|
metadata:,
|
|
400
402
|
per_unit_cost_basis:,
|
|
403
|
+
# `void` means the credit block was deleted. A voided block's `balance` is
|
|
404
|
+
# always 0.
|
|
401
405
|
status:,
|
|
402
406
|
# The credit allocation that funded a block. Extends the allocation resource
|
|
403
407
|
# serialized on prices with the catalog-item attribution of the funding price.
|
|
@@ -637,6 +641,8 @@ module Orb
|
|
|
637
641
|
end
|
|
638
642
|
end
|
|
639
643
|
|
|
644
|
+
# `void` means the credit block was deleted. A voided block's `balance` is
|
|
645
|
+
# always 0.
|
|
640
646
|
module Status
|
|
641
647
|
extend Orb::Internal::Type::Enum
|
|
642
648
|
|
|
@@ -659,6 +665,11 @@ module Orb
|
|
|
659
665
|
:pending_payment,
|
|
660
666
|
Orb::Webhooks::CustomerCreditLedgerIncrementedStandardWebhookEvent::Properties::Block::Status::TaggedSymbol
|
|
661
667
|
)
|
|
668
|
+
VOID =
|
|
669
|
+
T.let(
|
|
670
|
+
:void,
|
|
671
|
+
Orb::Webhooks::CustomerCreditLedgerIncrementedStandardWebhookEvent::Properties::Block::Status::TaggedSymbol
|
|
672
|
+
)
|
|
662
673
|
|
|
663
674
|
sig do
|
|
664
675
|
override.returns(
|
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
|
|
@@ -5,7 +5,8 @@ module Orb
|
|
|
5
5
|
# The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid
|
|
6
6
|
# credits within Orb.
|
|
7
7
|
class CreditBlocks
|
|
8
|
-
# This endpoint returns a credit block identified by its block_id.
|
|
8
|
+
# This endpoint returns a credit block identified by its block_id. A deleted
|
|
9
|
+
# credit block is returned with a `status` of `void` and a `balance` of 0.
|
|
9
10
|
sig do
|
|
10
11
|
params(
|
|
11
12
|
block_id: String,
|
|
@@ -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
|
|
|
@@ -265,13 +265,14 @@ module Orb
|
|
|
265
265
|
end
|
|
266
266
|
end
|
|
267
267
|
|
|
268
|
-
type status = :active | :pending_payment
|
|
268
|
+
type status = :active | :pending_payment | :void
|
|
269
269
|
|
|
270
270
|
module Status
|
|
271
271
|
extend Orb::Internal::Type::Enum
|
|
272
272
|
|
|
273
273
|
ACTIVE: :active
|
|
274
274
|
PENDING_PAYMENT: :pending_payment
|
|
275
|
+
VOID: :void
|
|
275
276
|
|
|
276
277
|
def self?.values: -> ::Array[Orb::Models::CreditBlockAccountingSyncFailedWebhookEvent::Block::status]
|
|
277
278
|
end
|
|
@@ -265,13 +265,14 @@ module Orb
|
|
|
265
265
|
end
|
|
266
266
|
end
|
|
267
267
|
|
|
268
|
-
type status = :active | :pending_payment
|
|
268
|
+
type status = :active | :pending_payment | :void
|
|
269
269
|
|
|
270
270
|
module Status
|
|
271
271
|
extend Orb::Internal::Type::Enum
|
|
272
272
|
|
|
273
273
|
ACTIVE: :active
|
|
274
274
|
PENDING_PAYMENT: :pending_payment
|
|
275
|
+
VOID: :void
|
|
275
276
|
|
|
276
277
|
def self?.values: -> ::Array[Orb::Models::CreditBlockAccountingSyncSucceededWebhookEvent::Block::status]
|
|
277
278
|
end
|
|
@@ -158,13 +158,14 @@ module Orb
|
|
|
158
158
|
end
|
|
159
159
|
end
|
|
160
160
|
|
|
161
|
-
type status = :active | :pending_payment
|
|
161
|
+
type status = :active | :pending_payment | :void
|
|
162
162
|
|
|
163
163
|
module Status
|
|
164
164
|
extend Orb::Internal::Type::Enum
|
|
165
165
|
|
|
166
166
|
ACTIVE: :active
|
|
167
167
|
PENDING_PAYMENT: :pending_payment
|
|
168
|
+
VOID: :void
|
|
168
169
|
|
|
169
170
|
def self?.values: -> ::Array[Orb::Models::CreditBlockListInvoicesResponse::Block::status]
|
|
170
171
|
end
|
|
@@ -137,13 +137,14 @@ module Orb
|
|
|
137
137
|
end
|
|
138
138
|
end
|
|
139
139
|
|
|
140
|
-
type status = :active | :pending_payment
|
|
140
|
+
type status = :active | :pending_payment | :void
|
|
141
141
|
|
|
142
142
|
module Status
|
|
143
143
|
extend Orb::Internal::Type::Enum
|
|
144
144
|
|
|
145
145
|
ACTIVE: :active
|
|
146
146
|
PENDING_PAYMENT: :pending_payment
|
|
147
|
+
VOID: :void
|
|
147
148
|
|
|
148
149
|
def self?.values: -> ::Array[Orb::Models::CreditBlockRetrieveResponse::status]
|
|
149
150
|
end
|
|
@@ -137,13 +137,14 @@ module Orb
|
|
|
137
137
|
end
|
|
138
138
|
end
|
|
139
139
|
|
|
140
|
-
type status = :active | :pending_payment
|
|
140
|
+
type status = :active | :pending_payment | :void
|
|
141
141
|
|
|
142
142
|
module Status
|
|
143
143
|
extend Orb::Internal::Type::Enum
|
|
144
144
|
|
|
145
145
|
ACTIVE: :active
|
|
146
146
|
PENDING_PAYMENT: :pending_payment
|
|
147
|
+
VOID: :void
|
|
147
148
|
|
|
148
149
|
def self?.values: -> ::Array[Orb::Models::CreditBlockUpdateResponse::status]
|
|
149
150
|
end
|
|
@@ -211,13 +211,14 @@ module Orb
|
|
|
211
211
|
end
|
|
212
212
|
end
|
|
213
213
|
|
|
214
|
-
type status = :active | :pending_payment
|
|
214
|
+
type status = :active | :pending_payment | :void
|
|
215
215
|
|
|
216
216
|
module Status
|
|
217
217
|
extend Orb::Internal::Type::Enum
|
|
218
218
|
|
|
219
219
|
ACTIVE: :active
|
|
220
220
|
PENDING_PAYMENT: :pending_payment
|
|
221
|
+
VOID: :void
|
|
221
222
|
|
|
222
223
|
def self?.values: -> ::Array[Orb::Models::CustomerCreditLedgerIncrementedWebhookEvent::Properties::Block::status]
|
|
223
224
|
end
|
|
@@ -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
|