orb-billing 1.15.0 → 1.17.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.rb +10 -1
- data/lib/orb/models/credit_block_list_invoices_response.rb +40 -3
- data/lib/orb/models/credit_block_retrieve_response.rb +38 -3
- data/lib/orb/models/customers/credit_list_by_external_id_response.rb +40 -3
- data/lib/orb/models/customers/credit_list_response.rb +40 -3
- data/lib/orb/models/event_ingest_response.rb +4 -6
- data/lib/orb/version.rb +1 -1
- data/rbi/orb/models/billable_metric.rbi +10 -0
- data/rbi/orb/models/credit_block_list_invoices_response.rbi +83 -4
- data/rbi/orb/models/credit_block_retrieve_response.rbi +81 -4
- data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +83 -4
- data/rbi/orb/models/customers/credit_list_response.rbi +83 -4
- data/rbi/orb/models/event_ingest_response.rbi +0 -6
- data/sig/orb/models/billable_metric.rbs +5 -0
- data/sig/orb/models/credit_block_list_invoices_response.rbs +22 -4
- data/sig/orb/models/credit_block_retrieve_response.rbs +22 -4
- data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +22 -4
- data/sig/orb/models/customers/credit_list_response.rbs +22 -4
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3ef35d682805182fd540072d1a6829ceddb3e8e438bfee769fa34b2689cc5347
|
|
4
|
+
data.tar.gz: 43a3a581105890a3a7d2e680e7345a7dfccd407df8598ab8c36a1644efa66d17
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dfab4687dfb93e20ee62d120aeebeddee6de07b01dc4232014cbf1bd3870de6b3f2175ba88b3b4e09bfc009416d68ccaaa06cd4dc541f4609a0b8270dad1974d
|
|
7
|
+
data.tar.gz: 52733526759b6679171fae76c1bb136a72c4ea0ecb1f1cd42661ddc4bd7e35c083f0616488304badafe03d9f74887f0b4b1edd4c493b353c2dd14676762ba9db
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.17.0](https://github.com/orbcorp/orb-ruby/compare/v1.16.0...v1.17.0) (2026-07-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **api:** deprecate debug mode ingestion response field ([65ab353](https://github.com/orbcorp/orb-ruby/commit/65ab353b1838ee8e6ed45ac4036601af4f80d10a))
|
|
9
|
+
|
|
10
|
+
## [1.16.0](https://github.com/orbcorp/orb-ruby/compare/v1.15.0...v1.16.0) (2026-07-14)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **api:** add `commitment` credit block source and `credit_commitment` field ([e094d85](https://github.com/orbcorp/orb-ruby/commit/e094d856b497ebc13b962e45e504b3596198c156))
|
|
16
|
+
* **api:** api update ([9c391e2](https://github.com/orbcorp/orb-ruby/commit/9c391e2ae05b0e0579b7807b63d08d0d4da9f37b))
|
|
17
|
+
|
|
3
18
|
## [1.15.0](https://github.com/orbcorp/orb-ruby/compare/v1.14.0...v1.15.0) (2026-07-10)
|
|
4
19
|
|
|
5
20
|
|
data/README.md
CHANGED
|
@@ -36,6 +36,13 @@ module Orb
|
|
|
36
36
|
# @return [String]
|
|
37
37
|
required :name, String
|
|
38
38
|
|
|
39
|
+
# @!attribute sql
|
|
40
|
+
# The SQL definition of the metric. For metrics defined via configuration rather
|
|
41
|
+
# than SQL, this is a derived SQL representation.
|
|
42
|
+
#
|
|
43
|
+
# @return [String]
|
|
44
|
+
required :sql, String
|
|
45
|
+
|
|
39
46
|
# @!attribute status
|
|
40
47
|
#
|
|
41
48
|
# @return [Symbol, Orb::Models::BillableMetric::Status]
|
|
@@ -48,7 +55,7 @@ module Orb
|
|
|
48
55
|
Orb::Internal::Type::ArrayOf[Orb::Internal::Type::HashOf[Orb::Internal::Type::Unknown]],
|
|
49
56
|
nil?: true
|
|
50
57
|
|
|
51
|
-
# @!method initialize(id:, description:, item:, metadata:, name:, status:, parameter_definitions: nil)
|
|
58
|
+
# @!method initialize(id:, description:, item:, metadata:, name:, sql:, status:, parameter_definitions: nil)
|
|
52
59
|
# Some parameter documentations has been truncated, see
|
|
53
60
|
# {Orb::Models::BillableMetric} for more details.
|
|
54
61
|
#
|
|
@@ -66,6 +73,8 @@ module Orb
|
|
|
66
73
|
#
|
|
67
74
|
# @param name [String]
|
|
68
75
|
#
|
|
76
|
+
# @param sql [String] The SQL definition of the metric. For metrics defined via configuration rather t
|
|
77
|
+
#
|
|
69
78
|
# @param status [Symbol, Orb::Models::BillableMetric::Status]
|
|
70
79
|
#
|
|
71
80
|
# @param parameter_definitions [Array<Hash{Symbol=>Object}>, nil]
|
|
@@ -35,7 +35,8 @@ module Orb
|
|
|
35
35
|
|
|
36
36
|
# @!attribute credit_block_source
|
|
37
37
|
# How this credit block was created: `allocation` (a subscription's recurring
|
|
38
|
-
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
38
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
39
|
+
# `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
39
40
|
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
40
41
|
# off another block).
|
|
41
42
|
#
|
|
@@ -92,7 +93,16 @@ module Orb
|
|
|
92
93
|
-> { Orb::Models::CreditBlockListInvoicesResponse::Block::CreditAllocation },
|
|
93
94
|
nil?: true
|
|
94
95
|
|
|
95
|
-
# @!
|
|
96
|
+
# @!attribute credit_commitment
|
|
97
|
+
# The subscription commitment whose true-up rolled forward into this credit block.
|
|
98
|
+
# Present only when `credit_block_source` is `commitment`.
|
|
99
|
+
#
|
|
100
|
+
# @return [Orb::Models::CreditBlockListInvoicesResponse::Block::CreditCommitment, nil]
|
|
101
|
+
optional :credit_commitment,
|
|
102
|
+
-> { Orb::Models::CreditBlockListInvoicesResponse::Block::CreditCommitment },
|
|
103
|
+
nil?: true
|
|
104
|
+
|
|
105
|
+
# @!method initialize(id:, balance:, credit_block_source:, effective_date:, expiry_date:, filters:, maximum_initial_balance:, metadata:, per_unit_cost_basis:, status:, credit_allocation: nil, credit_commitment: nil)
|
|
96
106
|
# Some parameter documentations has been truncated, see
|
|
97
107
|
# {Orb::Models::CreditBlockListInvoicesResponse::Block} for more details.
|
|
98
108
|
#
|
|
@@ -119,9 +129,12 @@ module Orb
|
|
|
119
129
|
# @param status [Symbol, Orb::Models::CreditBlockListInvoicesResponse::Block::Status]
|
|
120
130
|
#
|
|
121
131
|
# @param credit_allocation [Orb::Models::CreditBlockListInvoicesResponse::Block::CreditAllocation, nil] The credit allocation that funded a block. Extends the allocation resource
|
|
132
|
+
#
|
|
133
|
+
# @param credit_commitment [Orb::Models::CreditBlockListInvoicesResponse::Block::CreditCommitment, nil] The subscription commitment whose true-up rolled forward into this credit block.
|
|
122
134
|
|
|
123
135
|
# How this credit block was created: `allocation` (a subscription's recurring
|
|
124
|
-
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
136
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
137
|
+
# `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
125
138
|
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
126
139
|
# off another block).
|
|
127
140
|
#
|
|
@@ -131,6 +144,7 @@ module Orb
|
|
|
131
144
|
|
|
132
145
|
ALLOCATION = :allocation
|
|
133
146
|
TOP_UP = :top_up
|
|
147
|
+
COMMITMENT = :commitment
|
|
134
148
|
MANUAL = :manual
|
|
135
149
|
|
|
136
150
|
# @!method self.values
|
|
@@ -317,6 +331,29 @@ module Orb
|
|
|
317
331
|
end
|
|
318
332
|
end
|
|
319
333
|
end
|
|
334
|
+
|
|
335
|
+
# @see Orb::Models::CreditBlockListInvoicesResponse::Block#credit_commitment
|
|
336
|
+
class CreditCommitment < Orb::Internal::Type::BaseModel
|
|
337
|
+
# @!attribute id
|
|
338
|
+
# The ID of the subscription commitment this block was rolled forward from.
|
|
339
|
+
#
|
|
340
|
+
# @return [String]
|
|
341
|
+
required :id, String
|
|
342
|
+
|
|
343
|
+
# @!attribute subscription_id
|
|
344
|
+
# The subscription the commitment belongs to.
|
|
345
|
+
#
|
|
346
|
+
# @return [String, nil]
|
|
347
|
+
optional :subscription_id, String, nil?: true
|
|
348
|
+
|
|
349
|
+
# @!method initialize(id:, subscription_id: nil)
|
|
350
|
+
# The subscription commitment whose true-up rolled forward into this credit block.
|
|
351
|
+
# Present only when `credit_block_source` is `commitment`.
|
|
352
|
+
#
|
|
353
|
+
# @param id [String] The ID of the subscription commitment this block was rolled forward from.
|
|
354
|
+
#
|
|
355
|
+
# @param subscription_id [String, nil] The subscription the commitment belongs to.
|
|
356
|
+
end
|
|
320
357
|
end
|
|
321
358
|
|
|
322
359
|
class Invoice < Orb::Internal::Type::BaseModel
|
|
@@ -16,7 +16,8 @@ module Orb
|
|
|
16
16
|
|
|
17
17
|
# @!attribute credit_block_source
|
|
18
18
|
# How this credit block was created: `allocation` (a subscription's recurring
|
|
19
|
-
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
19
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
20
|
+
# `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
20
21
|
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
21
22
|
# off another block).
|
|
22
23
|
#
|
|
@@ -69,7 +70,14 @@ module Orb
|
|
|
69
70
|
# @return [Orb::Models::CreditBlockRetrieveResponse::CreditAllocation, nil]
|
|
70
71
|
optional :credit_allocation, -> { Orb::Models::CreditBlockRetrieveResponse::CreditAllocation }, nil?: true
|
|
71
72
|
|
|
72
|
-
# @!
|
|
73
|
+
# @!attribute credit_commitment
|
|
74
|
+
# The subscription commitment whose true-up rolled forward into this credit block.
|
|
75
|
+
# Present only when `credit_block_source` is `commitment`.
|
|
76
|
+
#
|
|
77
|
+
# @return [Orb::Models::CreditBlockRetrieveResponse::CreditCommitment, nil]
|
|
78
|
+
optional :credit_commitment, -> { Orb::Models::CreditBlockRetrieveResponse::CreditCommitment }, nil?: true
|
|
79
|
+
|
|
80
|
+
# @!method initialize(id:, balance:, credit_block_source:, effective_date:, expiry_date:, filters:, maximum_initial_balance:, metadata:, per_unit_cost_basis:, status:, credit_allocation: nil, credit_commitment: nil)
|
|
73
81
|
# Some parameter documentations has been truncated, see
|
|
74
82
|
# {Orb::Models::CreditBlockRetrieveResponse} for more details.
|
|
75
83
|
#
|
|
@@ -96,9 +104,12 @@ module Orb
|
|
|
96
104
|
# @param status [Symbol, Orb::Models::CreditBlockRetrieveResponse::Status]
|
|
97
105
|
#
|
|
98
106
|
# @param credit_allocation [Orb::Models::CreditBlockRetrieveResponse::CreditAllocation, nil] The credit allocation that funded a block. Extends the allocation resource
|
|
107
|
+
#
|
|
108
|
+
# @param credit_commitment [Orb::Models::CreditBlockRetrieveResponse::CreditCommitment, nil] The subscription commitment whose true-up rolled forward into this credit block.
|
|
99
109
|
|
|
100
110
|
# How this credit block was created: `allocation` (a subscription's recurring
|
|
101
|
-
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
111
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
112
|
+
# `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
102
113
|
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
103
114
|
# off another block).
|
|
104
115
|
#
|
|
@@ -108,6 +119,7 @@ module Orb
|
|
|
108
119
|
|
|
109
120
|
ALLOCATION = :allocation
|
|
110
121
|
TOP_UP = :top_up
|
|
122
|
+
COMMITMENT = :commitment
|
|
111
123
|
MANUAL = :manual
|
|
112
124
|
|
|
113
125
|
# @!method self.values
|
|
@@ -292,6 +304,29 @@ module Orb
|
|
|
292
304
|
end
|
|
293
305
|
end
|
|
294
306
|
end
|
|
307
|
+
|
|
308
|
+
# @see Orb::Models::CreditBlockRetrieveResponse#credit_commitment
|
|
309
|
+
class CreditCommitment < Orb::Internal::Type::BaseModel
|
|
310
|
+
# @!attribute id
|
|
311
|
+
# The ID of the subscription commitment this block was rolled forward from.
|
|
312
|
+
#
|
|
313
|
+
# @return [String]
|
|
314
|
+
required :id, String
|
|
315
|
+
|
|
316
|
+
# @!attribute subscription_id
|
|
317
|
+
# The subscription the commitment belongs to.
|
|
318
|
+
#
|
|
319
|
+
# @return [String, nil]
|
|
320
|
+
optional :subscription_id, String, nil?: true
|
|
321
|
+
|
|
322
|
+
# @!method initialize(id:, subscription_id: nil)
|
|
323
|
+
# The subscription commitment whose true-up rolled forward into this credit block.
|
|
324
|
+
# Present only when `credit_block_source` is `commitment`.
|
|
325
|
+
#
|
|
326
|
+
# @param id [String] The ID of the subscription commitment this block was rolled forward from.
|
|
327
|
+
#
|
|
328
|
+
# @param subscription_id [String, nil] The subscription the commitment belongs to.
|
|
329
|
+
end
|
|
295
330
|
end
|
|
296
331
|
end
|
|
297
332
|
end
|
|
@@ -17,7 +17,8 @@ module Orb
|
|
|
17
17
|
|
|
18
18
|
# @!attribute credit_block_source
|
|
19
19
|
# How this credit block was created: `allocation` (a subscription's recurring
|
|
20
|
-
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
20
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
21
|
+
# `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
21
22
|
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
22
23
|
# off another block).
|
|
23
24
|
#
|
|
@@ -74,7 +75,16 @@ module Orb
|
|
|
74
75
|
-> { Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation },
|
|
75
76
|
nil?: true
|
|
76
77
|
|
|
77
|
-
# @!
|
|
78
|
+
# @!attribute credit_commitment
|
|
79
|
+
# The subscription commitment whose true-up rolled forward into this credit block.
|
|
80
|
+
# Present only when `credit_block_source` is `commitment`.
|
|
81
|
+
#
|
|
82
|
+
# @return [Orb::Models::Customers::CreditListByExternalIDResponse::CreditCommitment, nil]
|
|
83
|
+
optional :credit_commitment,
|
|
84
|
+
-> { Orb::Models::Customers::CreditListByExternalIDResponse::CreditCommitment },
|
|
85
|
+
nil?: true
|
|
86
|
+
|
|
87
|
+
# @!method initialize(id:, balance:, credit_block_source:, effective_date:, expiry_date:, filters:, maximum_initial_balance:, metadata:, per_unit_cost_basis:, status:, credit_allocation: nil, credit_commitment: nil)
|
|
78
88
|
# Some parameter documentations has been truncated, see
|
|
79
89
|
# {Orb::Models::Customers::CreditListByExternalIDResponse} for more details.
|
|
80
90
|
#
|
|
@@ -99,9 +109,12 @@ module Orb
|
|
|
99
109
|
# @param status [Symbol, Orb::Models::Customers::CreditListByExternalIDResponse::Status]
|
|
100
110
|
#
|
|
101
111
|
# @param credit_allocation [Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation, nil] The credit allocation that funded a block. Extends the allocation resource
|
|
112
|
+
#
|
|
113
|
+
# @param credit_commitment [Orb::Models::Customers::CreditListByExternalIDResponse::CreditCommitment, nil] The subscription commitment whose true-up rolled forward into this credit block.
|
|
102
114
|
|
|
103
115
|
# How this credit block was created: `allocation` (a subscription's recurring
|
|
104
|
-
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
116
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
117
|
+
# `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
105
118
|
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
106
119
|
# off another block).
|
|
107
120
|
#
|
|
@@ -111,6 +124,7 @@ module Orb
|
|
|
111
124
|
|
|
112
125
|
ALLOCATION = :allocation
|
|
113
126
|
TOP_UP = :top_up
|
|
127
|
+
COMMITMENT = :commitment
|
|
114
128
|
MANUAL = :manual
|
|
115
129
|
|
|
116
130
|
# @!method self.values
|
|
@@ -295,6 +309,29 @@ module Orb
|
|
|
295
309
|
end
|
|
296
310
|
end
|
|
297
311
|
end
|
|
312
|
+
|
|
313
|
+
# @see Orb::Models::Customers::CreditListByExternalIDResponse#credit_commitment
|
|
314
|
+
class CreditCommitment < Orb::Internal::Type::BaseModel
|
|
315
|
+
# @!attribute id
|
|
316
|
+
# The ID of the subscription commitment this block was rolled forward from.
|
|
317
|
+
#
|
|
318
|
+
# @return [String]
|
|
319
|
+
required :id, String
|
|
320
|
+
|
|
321
|
+
# @!attribute subscription_id
|
|
322
|
+
# The subscription the commitment belongs to.
|
|
323
|
+
#
|
|
324
|
+
# @return [String, nil]
|
|
325
|
+
optional :subscription_id, String, nil?: true
|
|
326
|
+
|
|
327
|
+
# @!method initialize(id:, subscription_id: nil)
|
|
328
|
+
# The subscription commitment whose true-up rolled forward into this credit block.
|
|
329
|
+
# Present only when `credit_block_source` is `commitment`.
|
|
330
|
+
#
|
|
331
|
+
# @param id [String] The ID of the subscription commitment this block was rolled forward from.
|
|
332
|
+
#
|
|
333
|
+
# @param subscription_id [String, nil] The subscription the commitment belongs to.
|
|
334
|
+
end
|
|
298
335
|
end
|
|
299
336
|
end
|
|
300
337
|
end
|
|
@@ -17,7 +17,8 @@ module Orb
|
|
|
17
17
|
|
|
18
18
|
# @!attribute credit_block_source
|
|
19
19
|
# How this credit block was created: `allocation` (a subscription's recurring
|
|
20
|
-
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
20
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
21
|
+
# `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
21
22
|
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
22
23
|
# off another block).
|
|
23
24
|
#
|
|
@@ -72,7 +73,16 @@ module Orb
|
|
|
72
73
|
-> { Orb::Models::Customers::CreditListResponse::CreditAllocation },
|
|
73
74
|
nil?: true
|
|
74
75
|
|
|
75
|
-
# @!
|
|
76
|
+
# @!attribute credit_commitment
|
|
77
|
+
# The subscription commitment whose true-up rolled forward into this credit block.
|
|
78
|
+
# Present only when `credit_block_source` is `commitment`.
|
|
79
|
+
#
|
|
80
|
+
# @return [Orb::Models::Customers::CreditListResponse::CreditCommitment, nil]
|
|
81
|
+
optional :credit_commitment,
|
|
82
|
+
-> { Orb::Models::Customers::CreditListResponse::CreditCommitment },
|
|
83
|
+
nil?: true
|
|
84
|
+
|
|
85
|
+
# @!method initialize(id:, balance:, credit_block_source:, effective_date:, expiry_date:, filters:, maximum_initial_balance:, metadata:, per_unit_cost_basis:, status:, credit_allocation: nil, credit_commitment: nil)
|
|
76
86
|
# Some parameter documentations has been truncated, see
|
|
77
87
|
# {Orb::Models::Customers::CreditListResponse} for more details.
|
|
78
88
|
#
|
|
@@ -97,9 +107,12 @@ module Orb
|
|
|
97
107
|
# @param status [Symbol, Orb::Models::Customers::CreditListResponse::Status]
|
|
98
108
|
#
|
|
99
109
|
# @param credit_allocation [Orb::Models::Customers::CreditListResponse::CreditAllocation, nil] The credit allocation that funded a block. Extends the allocation resource
|
|
110
|
+
#
|
|
111
|
+
# @param credit_commitment [Orb::Models::Customers::CreditListResponse::CreditCommitment, nil] The subscription commitment whose true-up rolled forward into this credit block.
|
|
100
112
|
|
|
101
113
|
# How this credit block was created: `allocation` (a subscription's recurring
|
|
102
|
-
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
114
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
115
|
+
# `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
103
116
|
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
104
117
|
# off another block).
|
|
105
118
|
#
|
|
@@ -109,6 +122,7 @@ module Orb
|
|
|
109
122
|
|
|
110
123
|
ALLOCATION = :allocation
|
|
111
124
|
TOP_UP = :top_up
|
|
125
|
+
COMMITMENT = :commitment
|
|
112
126
|
MANUAL = :manual
|
|
113
127
|
|
|
114
128
|
# @!method self.values
|
|
@@ -291,6 +305,29 @@ module Orb
|
|
|
291
305
|
end
|
|
292
306
|
end
|
|
293
307
|
end
|
|
308
|
+
|
|
309
|
+
# @see Orb::Models::Customers::CreditListResponse#credit_commitment
|
|
310
|
+
class CreditCommitment < Orb::Internal::Type::BaseModel
|
|
311
|
+
# @!attribute id
|
|
312
|
+
# The ID of the subscription commitment this block was rolled forward from.
|
|
313
|
+
#
|
|
314
|
+
# @return [String]
|
|
315
|
+
required :id, String
|
|
316
|
+
|
|
317
|
+
# @!attribute subscription_id
|
|
318
|
+
# The subscription the commitment belongs to.
|
|
319
|
+
#
|
|
320
|
+
# @return [String, nil]
|
|
321
|
+
optional :subscription_id, String, nil?: true
|
|
322
|
+
|
|
323
|
+
# @!method initialize(id:, subscription_id: nil)
|
|
324
|
+
# The subscription commitment whose true-up rolled forward into this credit block.
|
|
325
|
+
# Present only when `credit_block_source` is `commitment`.
|
|
326
|
+
#
|
|
327
|
+
# @param id [String] The ID of the subscription commitment this block was rolled forward from.
|
|
328
|
+
#
|
|
329
|
+
# @param subscription_id [String, nil] The subscription the commitment belongs to.
|
|
330
|
+
end
|
|
294
331
|
end
|
|
295
332
|
end
|
|
296
333
|
end
|
|
@@ -13,8 +13,7 @@ module Orb
|
|
|
13
13
|
-> { Orb::Internal::Type::ArrayOf[Orb::Models::EventIngestResponse::ValidationFailed] }
|
|
14
14
|
|
|
15
15
|
# @!attribute debug
|
|
16
|
-
#
|
|
17
|
-
# endpoint). Contains ingested and duplicate event idempotency keys.
|
|
16
|
+
# @deprecated
|
|
18
17
|
#
|
|
19
18
|
# @return [Orb::Models::EventIngestResponse::Debug, nil]
|
|
20
19
|
optional :debug, -> { Orb::Models::EventIngestResponse::Debug }, nil?: true
|
|
@@ -25,7 +24,7 @@ module Orb
|
|
|
25
24
|
#
|
|
26
25
|
# @param validation_failed [Array<Orb::Models::EventIngestResponse::ValidationFailed>] Contains all failing validation events. In the case of a 200, this array will al
|
|
27
26
|
#
|
|
28
|
-
# @param debug [Orb::Models::EventIngestResponse::Debug, nil]
|
|
27
|
+
# @param debug [Orb::Models::EventIngestResponse::Debug, nil]
|
|
29
28
|
|
|
30
29
|
class ValidationFailed < Orb::Internal::Type::BaseModel
|
|
31
30
|
# @!attribute idempotency_key
|
|
@@ -50,6 +49,8 @@ module Orb
|
|
|
50
49
|
# @param validation_errors [Array<String>] An array of strings corresponding to validation failures for this idempotency_ke
|
|
51
50
|
end
|
|
52
51
|
|
|
52
|
+
# @deprecated
|
|
53
|
+
#
|
|
53
54
|
# @see Orb::Models::EventIngestResponse#debug
|
|
54
55
|
class Debug < Orb::Internal::Type::BaseModel
|
|
55
56
|
# @!attribute duplicate
|
|
@@ -63,9 +64,6 @@ module Orb
|
|
|
63
64
|
required :ingested, Orb::Internal::Type::ArrayOf[String]
|
|
64
65
|
|
|
65
66
|
# @!method initialize(duplicate:, ingested:)
|
|
66
|
-
# Optional debug information (only present when debug=true is passed to the
|
|
67
|
-
# endpoint). Contains ingested and duplicate event idempotency keys.
|
|
68
|
-
#
|
|
69
67
|
# @param duplicate [Array<String>]
|
|
70
68
|
# @param ingested [Array<String>]
|
|
71
69
|
end
|
data/lib/orb/version.rb
CHANGED
|
@@ -31,6 +31,11 @@ module Orb
|
|
|
31
31
|
sig { returns(String) }
|
|
32
32
|
attr_accessor :name
|
|
33
33
|
|
|
34
|
+
# The SQL definition of the metric. For metrics defined via configuration rather
|
|
35
|
+
# than SQL, this is a derived SQL representation.
|
|
36
|
+
sig { returns(String) }
|
|
37
|
+
attr_accessor :sql
|
|
38
|
+
|
|
34
39
|
sig { returns(Orb::BillableMetric::Status::TaggedSymbol) }
|
|
35
40
|
attr_accessor :status
|
|
36
41
|
|
|
@@ -47,6 +52,7 @@ module Orb
|
|
|
47
52
|
item: Orb::Item::OrHash,
|
|
48
53
|
metadata: T::Hash[Symbol, String],
|
|
49
54
|
name: String,
|
|
55
|
+
sql: String,
|
|
50
56
|
status: Orb::BillableMetric::Status::OrSymbol,
|
|
51
57
|
parameter_definitions:
|
|
52
58
|
T.nilable(T::Array[T::Hash[Symbol, T.anything]])
|
|
@@ -65,6 +71,9 @@ module Orb
|
|
|
65
71
|
# `null`.
|
|
66
72
|
metadata:,
|
|
67
73
|
name:,
|
|
74
|
+
# The SQL definition of the metric. For metrics defined via configuration rather
|
|
75
|
+
# than SQL, this is a derived SQL representation.
|
|
76
|
+
sql:,
|
|
68
77
|
status:,
|
|
69
78
|
parameter_definitions: nil
|
|
70
79
|
)
|
|
@@ -78,6 +87,7 @@ module Orb
|
|
|
78
87
|
item: Orb::Item,
|
|
79
88
|
metadata: T::Hash[Symbol, String],
|
|
80
89
|
name: String,
|
|
90
|
+
sql: String,
|
|
81
91
|
status: Orb::BillableMetric::Status::TaggedSymbol,
|
|
82
92
|
parameter_definitions:
|
|
83
93
|
T.nilable(T::Array[T::Hash[Symbol, T.anything]])
|
|
@@ -71,7 +71,8 @@ module Orb
|
|
|
71
71
|
attr_accessor :balance
|
|
72
72
|
|
|
73
73
|
# How this credit block was created: `allocation` (a subscription's recurring
|
|
74
|
-
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
74
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
75
|
+
# `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
75
76
|
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
76
77
|
# off another block).
|
|
77
78
|
sig do
|
|
@@ -137,6 +138,27 @@ module Orb
|
|
|
137
138
|
end
|
|
138
139
|
attr_writer :credit_allocation
|
|
139
140
|
|
|
141
|
+
# The subscription commitment whose true-up rolled forward into this credit block.
|
|
142
|
+
# Present only when `credit_block_source` is `commitment`.
|
|
143
|
+
sig do
|
|
144
|
+
returns(
|
|
145
|
+
T.nilable(
|
|
146
|
+
Orb::Models::CreditBlockListInvoicesResponse::Block::CreditCommitment
|
|
147
|
+
)
|
|
148
|
+
)
|
|
149
|
+
end
|
|
150
|
+
attr_reader :credit_commitment
|
|
151
|
+
|
|
152
|
+
sig do
|
|
153
|
+
params(
|
|
154
|
+
credit_commitment:
|
|
155
|
+
T.nilable(
|
|
156
|
+
Orb::Models::CreditBlockListInvoicesResponse::Block::CreditCommitment::OrHash
|
|
157
|
+
)
|
|
158
|
+
).void
|
|
159
|
+
end
|
|
160
|
+
attr_writer :credit_commitment
|
|
161
|
+
|
|
140
162
|
# The Credit Block resource models prepaid credits within Orb.
|
|
141
163
|
sig do
|
|
142
164
|
params(
|
|
@@ -158,6 +180,10 @@ module Orb
|
|
|
158
180
|
credit_allocation:
|
|
159
181
|
T.nilable(
|
|
160
182
|
Orb::Models::CreditBlockListInvoicesResponse::Block::CreditAllocation::OrHash
|
|
183
|
+
),
|
|
184
|
+
credit_commitment:
|
|
185
|
+
T.nilable(
|
|
186
|
+
Orb::Models::CreditBlockListInvoicesResponse::Block::CreditCommitment::OrHash
|
|
161
187
|
)
|
|
162
188
|
).returns(T.attached_class)
|
|
163
189
|
end
|
|
@@ -165,7 +191,8 @@ module Orb
|
|
|
165
191
|
id:,
|
|
166
192
|
balance:,
|
|
167
193
|
# How this credit block was created: `allocation` (a subscription's recurring
|
|
168
|
-
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
194
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
195
|
+
# `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
169
196
|
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
170
197
|
# off another block).
|
|
171
198
|
credit_block_source:,
|
|
@@ -182,7 +209,10 @@ module Orb
|
|
|
182
209
|
status:,
|
|
183
210
|
# The credit allocation that funded a block. Extends the allocation resource
|
|
184
211
|
# serialized on prices with the catalog-item attribution of the funding price.
|
|
185
|
-
credit_allocation: nil
|
|
212
|
+
credit_allocation: nil,
|
|
213
|
+
# The subscription commitment whose true-up rolled forward into this credit block.
|
|
214
|
+
# Present only when `credit_block_source` is `commitment`.
|
|
215
|
+
credit_commitment: nil
|
|
186
216
|
)
|
|
187
217
|
end
|
|
188
218
|
|
|
@@ -207,6 +237,10 @@ module Orb
|
|
|
207
237
|
credit_allocation:
|
|
208
238
|
T.nilable(
|
|
209
239
|
Orb::Models::CreditBlockListInvoicesResponse::Block::CreditAllocation
|
|
240
|
+
),
|
|
241
|
+
credit_commitment:
|
|
242
|
+
T.nilable(
|
|
243
|
+
Orb::Models::CreditBlockListInvoicesResponse::Block::CreditCommitment
|
|
210
244
|
)
|
|
211
245
|
}
|
|
212
246
|
)
|
|
@@ -215,7 +249,8 @@ module Orb
|
|
|
215
249
|
end
|
|
216
250
|
|
|
217
251
|
# How this credit block was created: `allocation` (a subscription's recurring
|
|
218
|
-
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
252
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
253
|
+
# `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
219
254
|
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
220
255
|
# off another block).
|
|
221
256
|
module CreditBlockSource
|
|
@@ -240,6 +275,11 @@ module Orb
|
|
|
240
275
|
:top_up,
|
|
241
276
|
Orb::Models::CreditBlockListInvoicesResponse::Block::CreditBlockSource::TaggedSymbol
|
|
242
277
|
)
|
|
278
|
+
COMMITMENT =
|
|
279
|
+
T.let(
|
|
280
|
+
:commitment,
|
|
281
|
+
Orb::Models::CreditBlockListInvoicesResponse::Block::CreditBlockSource::TaggedSymbol
|
|
282
|
+
)
|
|
243
283
|
MANUAL =
|
|
244
284
|
T.let(
|
|
245
285
|
:manual,
|
|
@@ -686,6 +726,45 @@ module Orb
|
|
|
686
726
|
end
|
|
687
727
|
end
|
|
688
728
|
end
|
|
729
|
+
|
|
730
|
+
class CreditCommitment < Orb::Internal::Type::BaseModel
|
|
731
|
+
OrHash =
|
|
732
|
+
T.type_alias do
|
|
733
|
+
T.any(
|
|
734
|
+
Orb::Models::CreditBlockListInvoicesResponse::Block::CreditCommitment,
|
|
735
|
+
Orb::Internal::AnyHash
|
|
736
|
+
)
|
|
737
|
+
end
|
|
738
|
+
|
|
739
|
+
# The ID of the subscription commitment this block was rolled forward from.
|
|
740
|
+
sig { returns(String) }
|
|
741
|
+
attr_accessor :id
|
|
742
|
+
|
|
743
|
+
# The subscription the commitment belongs to.
|
|
744
|
+
sig { returns(T.nilable(String)) }
|
|
745
|
+
attr_accessor :subscription_id
|
|
746
|
+
|
|
747
|
+
# The subscription commitment whose true-up rolled forward into this credit block.
|
|
748
|
+
# Present only when `credit_block_source` is `commitment`.
|
|
749
|
+
sig do
|
|
750
|
+
params(id: String, subscription_id: T.nilable(String)).returns(
|
|
751
|
+
T.attached_class
|
|
752
|
+
)
|
|
753
|
+
end
|
|
754
|
+
def self.new(
|
|
755
|
+
# The ID of the subscription commitment this block was rolled forward from.
|
|
756
|
+
id:,
|
|
757
|
+
# The subscription the commitment belongs to.
|
|
758
|
+
subscription_id: nil
|
|
759
|
+
)
|
|
760
|
+
end
|
|
761
|
+
|
|
762
|
+
sig do
|
|
763
|
+
override.returns({ id: String, subscription_id: T.nilable(String) })
|
|
764
|
+
end
|
|
765
|
+
def to_hash
|
|
766
|
+
end
|
|
767
|
+
end
|
|
689
768
|
end
|
|
690
769
|
|
|
691
770
|
class Invoice < Orb::Internal::Type::BaseModel
|