orb-billing 1.15.0 → 1.16.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.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/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/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: 28a3bc55f24e56e4adc14a7dd606c73d3e9f5bcecd9dc5b3b612edaeae0d1dde
|
|
4
|
+
data.tar.gz: '0802343430a012448114f06a65d13838b5f92c7126991f110267b8f8c772b568'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c0d019735276a10d982178a77035c844b1336d4bfe57b091da02e4348b4e2cd35754b1860acbbdf8588d361af43e67b71ea831f3256eaf61a5b91e2da598901e
|
|
7
|
+
data.tar.gz: 171a65e34e8057e27a9f196cbc67fb844ac9425422cbf5c3a9c74bf29393b2956871ec5ff4f89975722feba8ba9574c314a8b28d43a7e8af7a417004b336286a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.16.0](https://github.com/orbcorp/orb-ruby/compare/v1.15.0...v1.16.0) (2026-07-14)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **api:** add `commitment` credit block source and `credit_commitment` field ([e094d85](https://github.com/orbcorp/orb-ruby/commit/e094d856b497ebc13b962e45e504b3596198c156))
|
|
9
|
+
* **api:** api update ([9c391e2](https://github.com/orbcorp/orb-ruby/commit/9c391e2ae05b0e0579b7807b63d08d0d4da9f37b))
|
|
10
|
+
|
|
3
11
|
## [1.15.0](https://github.com/orbcorp/orb-ruby/compare/v1.14.0...v1.15.0) (2026-07-10)
|
|
4
12
|
|
|
5
13
|
|
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
|
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
|
|
@@ -18,7 +18,8 @@ module Orb
|
|
|
18
18
|
attr_accessor :balance
|
|
19
19
|
|
|
20
20
|
# How this credit block was created: `allocation` (a subscription's recurring
|
|
21
|
-
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
21
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
22
|
+
# `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
22
23
|
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
23
24
|
# off another block).
|
|
24
25
|
sig do
|
|
@@ -76,6 +77,25 @@ module Orb
|
|
|
76
77
|
end
|
|
77
78
|
attr_writer :credit_allocation
|
|
78
79
|
|
|
80
|
+
# The subscription commitment whose true-up rolled forward into this credit block.
|
|
81
|
+
# Present only when `credit_block_source` is `commitment`.
|
|
82
|
+
sig do
|
|
83
|
+
returns(
|
|
84
|
+
T.nilable(Orb::Models::CreditBlockRetrieveResponse::CreditCommitment)
|
|
85
|
+
)
|
|
86
|
+
end
|
|
87
|
+
attr_reader :credit_commitment
|
|
88
|
+
|
|
89
|
+
sig do
|
|
90
|
+
params(
|
|
91
|
+
credit_commitment:
|
|
92
|
+
T.nilable(
|
|
93
|
+
Orb::Models::CreditBlockRetrieveResponse::CreditCommitment::OrHash
|
|
94
|
+
)
|
|
95
|
+
).void
|
|
96
|
+
end
|
|
97
|
+
attr_writer :credit_commitment
|
|
98
|
+
|
|
79
99
|
# The Credit Block resource models prepaid credits within Orb.
|
|
80
100
|
sig do
|
|
81
101
|
params(
|
|
@@ -94,6 +114,10 @@ module Orb
|
|
|
94
114
|
credit_allocation:
|
|
95
115
|
T.nilable(
|
|
96
116
|
Orb::Models::CreditBlockRetrieveResponse::CreditAllocation::OrHash
|
|
117
|
+
),
|
|
118
|
+
credit_commitment:
|
|
119
|
+
T.nilable(
|
|
120
|
+
Orb::Models::CreditBlockRetrieveResponse::CreditCommitment::OrHash
|
|
97
121
|
)
|
|
98
122
|
).returns(T.attached_class)
|
|
99
123
|
end
|
|
@@ -101,7 +125,8 @@ module Orb
|
|
|
101
125
|
id:,
|
|
102
126
|
balance:,
|
|
103
127
|
# How this credit block was created: `allocation` (a subscription's recurring
|
|
104
|
-
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
128
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
129
|
+
# `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
105
130
|
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
106
131
|
# off another block).
|
|
107
132
|
credit_block_source:,
|
|
@@ -118,7 +143,10 @@ module Orb
|
|
|
118
143
|
status:,
|
|
119
144
|
# The credit allocation that funded a block. Extends the allocation resource
|
|
120
145
|
# serialized on prices with the catalog-item attribution of the funding price.
|
|
121
|
-
credit_allocation: nil
|
|
146
|
+
credit_allocation: nil,
|
|
147
|
+
# The subscription commitment whose true-up rolled forward into this credit block.
|
|
148
|
+
# Present only when `credit_block_source` is `commitment`.
|
|
149
|
+
credit_commitment: nil
|
|
122
150
|
)
|
|
123
151
|
end
|
|
124
152
|
|
|
@@ -140,6 +168,10 @@ module Orb
|
|
|
140
168
|
credit_allocation:
|
|
141
169
|
T.nilable(
|
|
142
170
|
Orb::Models::CreditBlockRetrieveResponse::CreditAllocation
|
|
171
|
+
),
|
|
172
|
+
credit_commitment:
|
|
173
|
+
T.nilable(
|
|
174
|
+
Orb::Models::CreditBlockRetrieveResponse::CreditCommitment
|
|
143
175
|
)
|
|
144
176
|
}
|
|
145
177
|
)
|
|
@@ -148,7 +180,8 @@ module Orb
|
|
|
148
180
|
end
|
|
149
181
|
|
|
150
182
|
# How this credit block was created: `allocation` (a subscription's recurring
|
|
151
|
-
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
183
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
184
|
+
# `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
152
185
|
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
153
186
|
# off another block).
|
|
154
187
|
module CreditBlockSource
|
|
@@ -173,6 +206,11 @@ module Orb
|
|
|
173
206
|
:top_up,
|
|
174
207
|
Orb::Models::CreditBlockRetrieveResponse::CreditBlockSource::TaggedSymbol
|
|
175
208
|
)
|
|
209
|
+
COMMITMENT =
|
|
210
|
+
T.let(
|
|
211
|
+
:commitment,
|
|
212
|
+
Orb::Models::CreditBlockRetrieveResponse::CreditBlockSource::TaggedSymbol
|
|
213
|
+
)
|
|
176
214
|
MANUAL =
|
|
177
215
|
T.let(
|
|
178
216
|
:manual,
|
|
@@ -616,6 +654,45 @@ module Orb
|
|
|
616
654
|
end
|
|
617
655
|
end
|
|
618
656
|
end
|
|
657
|
+
|
|
658
|
+
class CreditCommitment < Orb::Internal::Type::BaseModel
|
|
659
|
+
OrHash =
|
|
660
|
+
T.type_alias do
|
|
661
|
+
T.any(
|
|
662
|
+
Orb::Models::CreditBlockRetrieveResponse::CreditCommitment,
|
|
663
|
+
Orb::Internal::AnyHash
|
|
664
|
+
)
|
|
665
|
+
end
|
|
666
|
+
|
|
667
|
+
# The ID of the subscription commitment this block was rolled forward from.
|
|
668
|
+
sig { returns(String) }
|
|
669
|
+
attr_accessor :id
|
|
670
|
+
|
|
671
|
+
# The subscription the commitment belongs to.
|
|
672
|
+
sig { returns(T.nilable(String)) }
|
|
673
|
+
attr_accessor :subscription_id
|
|
674
|
+
|
|
675
|
+
# The subscription commitment whose true-up rolled forward into this credit block.
|
|
676
|
+
# Present only when `credit_block_source` is `commitment`.
|
|
677
|
+
sig do
|
|
678
|
+
params(id: String, subscription_id: T.nilable(String)).returns(
|
|
679
|
+
T.attached_class
|
|
680
|
+
)
|
|
681
|
+
end
|
|
682
|
+
def self.new(
|
|
683
|
+
# The ID of the subscription commitment this block was rolled forward from.
|
|
684
|
+
id:,
|
|
685
|
+
# The subscription the commitment belongs to.
|
|
686
|
+
subscription_id: nil
|
|
687
|
+
)
|
|
688
|
+
end
|
|
689
|
+
|
|
690
|
+
sig do
|
|
691
|
+
override.returns({ id: String, subscription_id: T.nilable(String) })
|
|
692
|
+
end
|
|
693
|
+
def to_hash
|
|
694
|
+
end
|
|
695
|
+
end
|
|
619
696
|
end
|
|
620
697
|
end
|
|
621
698
|
end
|
|
@@ -19,7 +19,8 @@ module Orb
|
|
|
19
19
|
attr_accessor :balance
|
|
20
20
|
|
|
21
21
|
# How this credit block was created: `allocation` (a subscription's recurring
|
|
22
|
-
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
22
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
23
|
+
# `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
23
24
|
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
24
25
|
# off another block).
|
|
25
26
|
sig do
|
|
@@ -85,6 +86,27 @@ module Orb
|
|
|
85
86
|
end
|
|
86
87
|
attr_writer :credit_allocation
|
|
87
88
|
|
|
89
|
+
# The subscription commitment whose true-up rolled forward into this credit block.
|
|
90
|
+
# Present only when `credit_block_source` is `commitment`.
|
|
91
|
+
sig do
|
|
92
|
+
returns(
|
|
93
|
+
T.nilable(
|
|
94
|
+
Orb::Models::Customers::CreditListByExternalIDResponse::CreditCommitment
|
|
95
|
+
)
|
|
96
|
+
)
|
|
97
|
+
end
|
|
98
|
+
attr_reader :credit_commitment
|
|
99
|
+
|
|
100
|
+
sig do
|
|
101
|
+
params(
|
|
102
|
+
credit_commitment:
|
|
103
|
+
T.nilable(
|
|
104
|
+
Orb::Models::Customers::CreditListByExternalIDResponse::CreditCommitment::OrHash
|
|
105
|
+
)
|
|
106
|
+
).void
|
|
107
|
+
end
|
|
108
|
+
attr_writer :credit_commitment
|
|
109
|
+
|
|
88
110
|
sig do
|
|
89
111
|
params(
|
|
90
112
|
id: String,
|
|
@@ -105,6 +127,10 @@ module Orb
|
|
|
105
127
|
credit_allocation:
|
|
106
128
|
T.nilable(
|
|
107
129
|
Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::OrHash
|
|
130
|
+
),
|
|
131
|
+
credit_commitment:
|
|
132
|
+
T.nilable(
|
|
133
|
+
Orb::Models::Customers::CreditListByExternalIDResponse::CreditCommitment::OrHash
|
|
108
134
|
)
|
|
109
135
|
).returns(T.attached_class)
|
|
110
136
|
end
|
|
@@ -112,7 +138,8 @@ module Orb
|
|
|
112
138
|
id:,
|
|
113
139
|
balance:,
|
|
114
140
|
# How this credit block was created: `allocation` (a subscription's recurring
|
|
115
|
-
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
141
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
142
|
+
# `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
116
143
|
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
117
144
|
# off another block).
|
|
118
145
|
credit_block_source:,
|
|
@@ -129,7 +156,10 @@ module Orb
|
|
|
129
156
|
status:,
|
|
130
157
|
# The credit allocation that funded a block. Extends the allocation resource
|
|
131
158
|
# serialized on prices with the catalog-item attribution of the funding price.
|
|
132
|
-
credit_allocation: nil
|
|
159
|
+
credit_allocation: nil,
|
|
160
|
+
# The subscription commitment whose true-up rolled forward into this credit block.
|
|
161
|
+
# Present only when `credit_block_source` is `commitment`.
|
|
162
|
+
credit_commitment: nil
|
|
133
163
|
)
|
|
134
164
|
end
|
|
135
165
|
|
|
@@ -154,6 +184,10 @@ module Orb
|
|
|
154
184
|
credit_allocation:
|
|
155
185
|
T.nilable(
|
|
156
186
|
Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation
|
|
187
|
+
),
|
|
188
|
+
credit_commitment:
|
|
189
|
+
T.nilable(
|
|
190
|
+
Orb::Models::Customers::CreditListByExternalIDResponse::CreditCommitment
|
|
157
191
|
)
|
|
158
192
|
}
|
|
159
193
|
)
|
|
@@ -162,7 +196,8 @@ module Orb
|
|
|
162
196
|
end
|
|
163
197
|
|
|
164
198
|
# How this credit block was created: `allocation` (a subscription's recurring
|
|
165
|
-
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
199
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
200
|
+
# `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
166
201
|
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
167
202
|
# off another block).
|
|
168
203
|
module CreditBlockSource
|
|
@@ -187,6 +222,11 @@ module Orb
|
|
|
187
222
|
:top_up,
|
|
188
223
|
Orb::Models::Customers::CreditListByExternalIDResponse::CreditBlockSource::TaggedSymbol
|
|
189
224
|
)
|
|
225
|
+
COMMITMENT =
|
|
226
|
+
T.let(
|
|
227
|
+
:commitment,
|
|
228
|
+
Orb::Models::Customers::CreditListByExternalIDResponse::CreditBlockSource::TaggedSymbol
|
|
229
|
+
)
|
|
190
230
|
MANUAL =
|
|
191
231
|
T.let(
|
|
192
232
|
:manual,
|
|
@@ -614,6 +654,45 @@ module Orb
|
|
|
614
654
|
end
|
|
615
655
|
end
|
|
616
656
|
end
|
|
657
|
+
|
|
658
|
+
class CreditCommitment < Orb::Internal::Type::BaseModel
|
|
659
|
+
OrHash =
|
|
660
|
+
T.type_alias do
|
|
661
|
+
T.any(
|
|
662
|
+
Orb::Models::Customers::CreditListByExternalIDResponse::CreditCommitment,
|
|
663
|
+
Orb::Internal::AnyHash
|
|
664
|
+
)
|
|
665
|
+
end
|
|
666
|
+
|
|
667
|
+
# The ID of the subscription commitment this block was rolled forward from.
|
|
668
|
+
sig { returns(String) }
|
|
669
|
+
attr_accessor :id
|
|
670
|
+
|
|
671
|
+
# The subscription the commitment belongs to.
|
|
672
|
+
sig { returns(T.nilable(String)) }
|
|
673
|
+
attr_accessor :subscription_id
|
|
674
|
+
|
|
675
|
+
# The subscription commitment whose true-up rolled forward into this credit block.
|
|
676
|
+
# Present only when `credit_block_source` is `commitment`.
|
|
677
|
+
sig do
|
|
678
|
+
params(id: String, subscription_id: T.nilable(String)).returns(
|
|
679
|
+
T.attached_class
|
|
680
|
+
)
|
|
681
|
+
end
|
|
682
|
+
def self.new(
|
|
683
|
+
# The ID of the subscription commitment this block was rolled forward from.
|
|
684
|
+
id:,
|
|
685
|
+
# The subscription the commitment belongs to.
|
|
686
|
+
subscription_id: nil
|
|
687
|
+
)
|
|
688
|
+
end
|
|
689
|
+
|
|
690
|
+
sig do
|
|
691
|
+
override.returns({ id: String, subscription_id: T.nilable(String) })
|
|
692
|
+
end
|
|
693
|
+
def to_hash
|
|
694
|
+
end
|
|
695
|
+
end
|
|
617
696
|
end
|
|
618
697
|
end
|
|
619
698
|
end
|
|
@@ -19,7 +19,8 @@ module Orb
|
|
|
19
19
|
attr_accessor :balance
|
|
20
20
|
|
|
21
21
|
# How this credit block was created: `allocation` (a subscription's recurring
|
|
22
|
-
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
22
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
23
|
+
# `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
23
24
|
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
24
25
|
# off another block).
|
|
25
26
|
sig do
|
|
@@ -81,6 +82,27 @@ module Orb
|
|
|
81
82
|
end
|
|
82
83
|
attr_writer :credit_allocation
|
|
83
84
|
|
|
85
|
+
# The subscription commitment whose true-up rolled forward into this credit block.
|
|
86
|
+
# Present only when `credit_block_source` is `commitment`.
|
|
87
|
+
sig do
|
|
88
|
+
returns(
|
|
89
|
+
T.nilable(
|
|
90
|
+
Orb::Models::Customers::CreditListResponse::CreditCommitment
|
|
91
|
+
)
|
|
92
|
+
)
|
|
93
|
+
end
|
|
94
|
+
attr_reader :credit_commitment
|
|
95
|
+
|
|
96
|
+
sig do
|
|
97
|
+
params(
|
|
98
|
+
credit_commitment:
|
|
99
|
+
T.nilable(
|
|
100
|
+
Orb::Models::Customers::CreditListResponse::CreditCommitment::OrHash
|
|
101
|
+
)
|
|
102
|
+
).void
|
|
103
|
+
end
|
|
104
|
+
attr_writer :credit_commitment
|
|
105
|
+
|
|
84
106
|
sig do
|
|
85
107
|
params(
|
|
86
108
|
id: String,
|
|
@@ -101,6 +123,10 @@ module Orb
|
|
|
101
123
|
credit_allocation:
|
|
102
124
|
T.nilable(
|
|
103
125
|
Orb::Models::Customers::CreditListResponse::CreditAllocation::OrHash
|
|
126
|
+
),
|
|
127
|
+
credit_commitment:
|
|
128
|
+
T.nilable(
|
|
129
|
+
Orb::Models::Customers::CreditListResponse::CreditCommitment::OrHash
|
|
104
130
|
)
|
|
105
131
|
).returns(T.attached_class)
|
|
106
132
|
end
|
|
@@ -108,7 +134,8 @@ module Orb
|
|
|
108
134
|
id:,
|
|
109
135
|
balance:,
|
|
110
136
|
# How this credit block was created: `allocation` (a subscription's recurring
|
|
111
|
-
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
137
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
138
|
+
# `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
112
139
|
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
113
140
|
# off another block).
|
|
114
141
|
credit_block_source:,
|
|
@@ -125,7 +152,10 @@ module Orb
|
|
|
125
152
|
status:,
|
|
126
153
|
# The credit allocation that funded a block. Extends the allocation resource
|
|
127
154
|
# serialized on prices with the catalog-item attribution of the funding price.
|
|
128
|
-
credit_allocation: nil
|
|
155
|
+
credit_allocation: nil,
|
|
156
|
+
# The subscription commitment whose true-up rolled forward into this credit block.
|
|
157
|
+
# Present only when `credit_block_source` is `commitment`.
|
|
158
|
+
credit_commitment: nil
|
|
129
159
|
)
|
|
130
160
|
end
|
|
131
161
|
|
|
@@ -148,6 +178,10 @@ module Orb
|
|
|
148
178
|
credit_allocation:
|
|
149
179
|
T.nilable(
|
|
150
180
|
Orb::Models::Customers::CreditListResponse::CreditAllocation
|
|
181
|
+
),
|
|
182
|
+
credit_commitment:
|
|
183
|
+
T.nilable(
|
|
184
|
+
Orb::Models::Customers::CreditListResponse::CreditCommitment
|
|
151
185
|
)
|
|
152
186
|
}
|
|
153
187
|
)
|
|
@@ -156,7 +190,8 @@ module Orb
|
|
|
156
190
|
end
|
|
157
191
|
|
|
158
192
|
# How this credit block was created: `allocation` (a subscription's recurring
|
|
159
|
-
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
193
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up),
|
|
194
|
+
# `commitment` (a subscription commitment true-up rolled forward as credit), or
|
|
160
195
|
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
161
196
|
# off another block).
|
|
162
197
|
module CreditBlockSource
|
|
@@ -181,6 +216,11 @@ module Orb
|
|
|
181
216
|
:top_up,
|
|
182
217
|
Orb::Models::Customers::CreditListResponse::CreditBlockSource::TaggedSymbol
|
|
183
218
|
)
|
|
219
|
+
COMMITMENT =
|
|
220
|
+
T.let(
|
|
221
|
+
:commitment,
|
|
222
|
+
Orb::Models::Customers::CreditListResponse::CreditBlockSource::TaggedSymbol
|
|
223
|
+
)
|
|
184
224
|
MANUAL =
|
|
185
225
|
T.let(
|
|
186
226
|
:manual,
|
|
@@ -605,6 +645,45 @@ module Orb
|
|
|
605
645
|
end
|
|
606
646
|
end
|
|
607
647
|
end
|
|
648
|
+
|
|
649
|
+
class CreditCommitment < Orb::Internal::Type::BaseModel
|
|
650
|
+
OrHash =
|
|
651
|
+
T.type_alias do
|
|
652
|
+
T.any(
|
|
653
|
+
Orb::Models::Customers::CreditListResponse::CreditCommitment,
|
|
654
|
+
Orb::Internal::AnyHash
|
|
655
|
+
)
|
|
656
|
+
end
|
|
657
|
+
|
|
658
|
+
# The ID of the subscription commitment this block was rolled forward from.
|
|
659
|
+
sig { returns(String) }
|
|
660
|
+
attr_accessor :id
|
|
661
|
+
|
|
662
|
+
# The subscription the commitment belongs to.
|
|
663
|
+
sig { returns(T.nilable(String)) }
|
|
664
|
+
attr_accessor :subscription_id
|
|
665
|
+
|
|
666
|
+
# The subscription commitment whose true-up rolled forward into this credit block.
|
|
667
|
+
# Present only when `credit_block_source` is `commitment`.
|
|
668
|
+
sig do
|
|
669
|
+
params(id: String, subscription_id: T.nilable(String)).returns(
|
|
670
|
+
T.attached_class
|
|
671
|
+
)
|
|
672
|
+
end
|
|
673
|
+
def self.new(
|
|
674
|
+
# The ID of the subscription commitment this block was rolled forward from.
|
|
675
|
+
id:,
|
|
676
|
+
# The subscription the commitment belongs to.
|
|
677
|
+
subscription_id: nil
|
|
678
|
+
)
|
|
679
|
+
end
|
|
680
|
+
|
|
681
|
+
sig do
|
|
682
|
+
override.returns({ id: String, subscription_id: T.nilable(String) })
|
|
683
|
+
end
|
|
684
|
+
def to_hash
|
|
685
|
+
end
|
|
686
|
+
end
|
|
608
687
|
end
|
|
609
688
|
end
|
|
610
689
|
end
|
|
@@ -7,6 +7,7 @@ module Orb
|
|
|
7
7
|
item: Orb::Item,
|
|
8
8
|
metadata: ::Hash[Symbol, String],
|
|
9
9
|
name: String,
|
|
10
|
+
sql: String,
|
|
10
11
|
status: Orb::Models::BillableMetric::status,
|
|
11
12
|
parameter_definitions: ::Array[::Hash[Symbol, top]]?
|
|
12
13
|
}
|
|
@@ -22,6 +23,8 @@ module Orb
|
|
|
22
23
|
|
|
23
24
|
attr_accessor name: String
|
|
24
25
|
|
|
26
|
+
attr_accessor sql: String
|
|
27
|
+
|
|
25
28
|
attr_accessor status: Orb::Models::BillableMetric::status
|
|
26
29
|
|
|
27
30
|
attr_accessor parameter_definitions: ::Array[::Hash[Symbol, top]]?
|
|
@@ -32,6 +35,7 @@ module Orb
|
|
|
32
35
|
item: Orb::Item,
|
|
33
36
|
metadata: ::Hash[Symbol, String],
|
|
34
37
|
name: String,
|
|
38
|
+
sql: String,
|
|
35
39
|
status: Orb::Models::BillableMetric::status,
|
|
36
40
|
?parameter_definitions: ::Array[::Hash[Symbol, top]]?
|
|
37
41
|
) -> void
|
|
@@ -42,6 +46,7 @@ module Orb
|
|
|
42
46
|
item: Orb::Item,
|
|
43
47
|
metadata: ::Hash[Symbol, String],
|
|
44
48
|
name: String,
|
|
49
|
+
sql: String,
|
|
45
50
|
status: Orb::Models::BillableMetric::status,
|
|
46
51
|
parameter_definitions: ::Array[::Hash[Symbol, top]]?
|
|
47
52
|
}
|
|
@@ -33,7 +33,8 @@ module Orb
|
|
|
33
33
|
metadata: ::Hash[Symbol, String],
|
|
34
34
|
per_unit_cost_basis: String?,
|
|
35
35
|
status: Orb::Models::CreditBlockListInvoicesResponse::Block::status,
|
|
36
|
-
credit_allocation: Orb::Models::CreditBlockListInvoicesResponse::Block::CreditAllocation
|
|
36
|
+
credit_allocation: Orb::Models::CreditBlockListInvoicesResponse::Block::CreditAllocation?,
|
|
37
|
+
credit_commitment: Orb::Models::CreditBlockListInvoicesResponse::Block::CreditCommitment?
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
class Block < Orb::Internal::Type::BaseModel
|
|
@@ -59,6 +60,8 @@ module Orb
|
|
|
59
60
|
|
|
60
61
|
attr_accessor credit_allocation: Orb::Models::CreditBlockListInvoicesResponse::Block::CreditAllocation?
|
|
61
62
|
|
|
63
|
+
attr_accessor credit_commitment: Orb::Models::CreditBlockListInvoicesResponse::Block::CreditCommitment?
|
|
64
|
+
|
|
62
65
|
def initialize: (
|
|
63
66
|
id: String,
|
|
64
67
|
balance: Float,
|
|
@@ -70,7 +73,8 @@ module Orb
|
|
|
70
73
|
metadata: ::Hash[Symbol, String],
|
|
71
74
|
per_unit_cost_basis: String?,
|
|
72
75
|
status: Orb::Models::CreditBlockListInvoicesResponse::Block::status,
|
|
73
|
-
?credit_allocation: Orb::Models::CreditBlockListInvoicesResponse::Block::CreditAllocation
|
|
76
|
+
?credit_allocation: Orb::Models::CreditBlockListInvoicesResponse::Block::CreditAllocation?,
|
|
77
|
+
?credit_commitment: Orb::Models::CreditBlockListInvoicesResponse::Block::CreditCommitment?
|
|
74
78
|
) -> void
|
|
75
79
|
|
|
76
80
|
def to_hash: -> {
|
|
@@ -84,16 +88,18 @@ module Orb
|
|
|
84
88
|
metadata: ::Hash[Symbol, String],
|
|
85
89
|
per_unit_cost_basis: String?,
|
|
86
90
|
status: Orb::Models::CreditBlockListInvoicesResponse::Block::status,
|
|
87
|
-
credit_allocation: Orb::Models::CreditBlockListInvoicesResponse::Block::CreditAllocation
|
|
91
|
+
credit_allocation: Orb::Models::CreditBlockListInvoicesResponse::Block::CreditAllocation?,
|
|
92
|
+
credit_commitment: Orb::Models::CreditBlockListInvoicesResponse::Block::CreditCommitment?
|
|
88
93
|
}
|
|
89
94
|
|
|
90
|
-
type credit_block_source = :allocation | :top_up | :manual
|
|
95
|
+
type credit_block_source = :allocation | :top_up | :commitment | :manual
|
|
91
96
|
|
|
92
97
|
module CreditBlockSource
|
|
93
98
|
extend Orb::Internal::Type::Enum
|
|
94
99
|
|
|
95
100
|
ALLOCATION: :allocation
|
|
96
101
|
TOP_UP: :top_up
|
|
102
|
+
COMMITMENT: :commitment
|
|
97
103
|
MANUAL: :manual
|
|
98
104
|
|
|
99
105
|
def self?.values: -> ::Array[Orb::Models::CreditBlockListInvoicesResponse::Block::credit_block_source]
|
|
@@ -261,6 +267,18 @@ module Orb
|
|
|
261
267
|
end
|
|
262
268
|
end
|
|
263
269
|
end
|
|
270
|
+
|
|
271
|
+
type credit_commitment = { id: String, subscription_id: String? }
|
|
272
|
+
|
|
273
|
+
class CreditCommitment < Orb::Internal::Type::BaseModel
|
|
274
|
+
attr_accessor id: String
|
|
275
|
+
|
|
276
|
+
attr_accessor subscription_id: String?
|
|
277
|
+
|
|
278
|
+
def initialize: (id: String, ?subscription_id: String?) -> void
|
|
279
|
+
|
|
280
|
+
def to_hash: -> { id: String, subscription_id: String? }
|
|
281
|
+
end
|
|
264
282
|
end
|
|
265
283
|
|
|
266
284
|
type invoice =
|
|
@@ -12,7 +12,8 @@ module Orb
|
|
|
12
12
|
metadata: ::Hash[Symbol, String],
|
|
13
13
|
per_unit_cost_basis: String?,
|
|
14
14
|
status: Orb::Models::CreditBlockRetrieveResponse::status,
|
|
15
|
-
credit_allocation: Orb::Models::CreditBlockRetrieveResponse::CreditAllocation
|
|
15
|
+
credit_allocation: Orb::Models::CreditBlockRetrieveResponse::CreditAllocation?,
|
|
16
|
+
credit_commitment: Orb::Models::CreditBlockRetrieveResponse::CreditCommitment?
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
class CreditBlockRetrieveResponse < Orb::Internal::Type::BaseModel
|
|
@@ -38,6 +39,8 @@ module Orb
|
|
|
38
39
|
|
|
39
40
|
attr_accessor credit_allocation: Orb::Models::CreditBlockRetrieveResponse::CreditAllocation?
|
|
40
41
|
|
|
42
|
+
attr_accessor credit_commitment: Orb::Models::CreditBlockRetrieveResponse::CreditCommitment?
|
|
43
|
+
|
|
41
44
|
def initialize: (
|
|
42
45
|
id: String,
|
|
43
46
|
balance: Float,
|
|
@@ -49,7 +52,8 @@ module Orb
|
|
|
49
52
|
metadata: ::Hash[Symbol, String],
|
|
50
53
|
per_unit_cost_basis: String?,
|
|
51
54
|
status: Orb::Models::CreditBlockRetrieveResponse::status,
|
|
52
|
-
?credit_allocation: Orb::Models::CreditBlockRetrieveResponse::CreditAllocation
|
|
55
|
+
?credit_allocation: Orb::Models::CreditBlockRetrieveResponse::CreditAllocation?,
|
|
56
|
+
?credit_commitment: Orb::Models::CreditBlockRetrieveResponse::CreditCommitment?
|
|
53
57
|
) -> void
|
|
54
58
|
|
|
55
59
|
def to_hash: -> {
|
|
@@ -63,16 +67,18 @@ module Orb
|
|
|
63
67
|
metadata: ::Hash[Symbol, String],
|
|
64
68
|
per_unit_cost_basis: String?,
|
|
65
69
|
status: Orb::Models::CreditBlockRetrieveResponse::status,
|
|
66
|
-
credit_allocation: Orb::Models::CreditBlockRetrieveResponse::CreditAllocation
|
|
70
|
+
credit_allocation: Orb::Models::CreditBlockRetrieveResponse::CreditAllocation?,
|
|
71
|
+
credit_commitment: Orb::Models::CreditBlockRetrieveResponse::CreditCommitment?
|
|
67
72
|
}
|
|
68
73
|
|
|
69
|
-
type credit_block_source = :allocation | :top_up | :manual
|
|
74
|
+
type credit_block_source = :allocation | :top_up | :commitment | :manual
|
|
70
75
|
|
|
71
76
|
module CreditBlockSource
|
|
72
77
|
extend Orb::Internal::Type::Enum
|
|
73
78
|
|
|
74
79
|
ALLOCATION: :allocation
|
|
75
80
|
TOP_UP: :top_up
|
|
81
|
+
COMMITMENT: :commitment
|
|
76
82
|
MANUAL: :manual
|
|
77
83
|
|
|
78
84
|
def self?.values: -> ::Array[Orb::Models::CreditBlockRetrieveResponse::credit_block_source]
|
|
@@ -240,6 +246,18 @@ module Orb
|
|
|
240
246
|
end
|
|
241
247
|
end
|
|
242
248
|
end
|
|
249
|
+
|
|
250
|
+
type credit_commitment = { id: String, subscription_id: String? }
|
|
251
|
+
|
|
252
|
+
class CreditCommitment < Orb::Internal::Type::BaseModel
|
|
253
|
+
attr_accessor id: String
|
|
254
|
+
|
|
255
|
+
attr_accessor subscription_id: String?
|
|
256
|
+
|
|
257
|
+
def initialize: (id: String, ?subscription_id: String?) -> void
|
|
258
|
+
|
|
259
|
+
def to_hash: -> { id: String, subscription_id: String? }
|
|
260
|
+
end
|
|
243
261
|
end
|
|
244
262
|
end
|
|
245
263
|
end
|
|
@@ -13,7 +13,8 @@ module Orb
|
|
|
13
13
|
metadata: ::Hash[Symbol, String],
|
|
14
14
|
per_unit_cost_basis: String?,
|
|
15
15
|
status: Orb::Models::Customers::CreditListByExternalIDResponse::status,
|
|
16
|
-
credit_allocation: Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation
|
|
16
|
+
credit_allocation: Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation?,
|
|
17
|
+
credit_commitment: Orb::Models::Customers::CreditListByExternalIDResponse::CreditCommitment?
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
class CreditListByExternalIDResponse < Orb::Internal::Type::BaseModel
|
|
@@ -39,6 +40,8 @@ module Orb
|
|
|
39
40
|
|
|
40
41
|
attr_accessor credit_allocation: Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation?
|
|
41
42
|
|
|
43
|
+
attr_accessor credit_commitment: Orb::Models::Customers::CreditListByExternalIDResponse::CreditCommitment?
|
|
44
|
+
|
|
42
45
|
def initialize: (
|
|
43
46
|
id: String,
|
|
44
47
|
balance: Float,
|
|
@@ -50,7 +53,8 @@ module Orb
|
|
|
50
53
|
metadata: ::Hash[Symbol, String],
|
|
51
54
|
per_unit_cost_basis: String?,
|
|
52
55
|
status: Orb::Models::Customers::CreditListByExternalIDResponse::status,
|
|
53
|
-
?credit_allocation: Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation
|
|
56
|
+
?credit_allocation: Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation?,
|
|
57
|
+
?credit_commitment: Orb::Models::Customers::CreditListByExternalIDResponse::CreditCommitment?
|
|
54
58
|
) -> void
|
|
55
59
|
|
|
56
60
|
def to_hash: -> {
|
|
@@ -64,16 +68,18 @@ module Orb
|
|
|
64
68
|
metadata: ::Hash[Symbol, String],
|
|
65
69
|
per_unit_cost_basis: String?,
|
|
66
70
|
status: Orb::Models::Customers::CreditListByExternalIDResponse::status,
|
|
67
|
-
credit_allocation: Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation
|
|
71
|
+
credit_allocation: Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation?,
|
|
72
|
+
credit_commitment: Orb::Models::Customers::CreditListByExternalIDResponse::CreditCommitment?
|
|
68
73
|
}
|
|
69
74
|
|
|
70
|
-
type credit_block_source = :allocation | :top_up | :manual
|
|
75
|
+
type credit_block_source = :allocation | :top_up | :commitment | :manual
|
|
71
76
|
|
|
72
77
|
module CreditBlockSource
|
|
73
78
|
extend Orb::Internal::Type::Enum
|
|
74
79
|
|
|
75
80
|
ALLOCATION: :allocation
|
|
76
81
|
TOP_UP: :top_up
|
|
82
|
+
COMMITMENT: :commitment
|
|
77
83
|
MANUAL: :manual
|
|
78
84
|
|
|
79
85
|
def self?.values: -> ::Array[Orb::Models::Customers::CreditListByExternalIDResponse::credit_block_source]
|
|
@@ -236,6 +242,18 @@ module Orb
|
|
|
236
242
|
end
|
|
237
243
|
end
|
|
238
244
|
end
|
|
245
|
+
|
|
246
|
+
type credit_commitment = { id: String, subscription_id: String? }
|
|
247
|
+
|
|
248
|
+
class CreditCommitment < Orb::Internal::Type::BaseModel
|
|
249
|
+
attr_accessor id: String
|
|
250
|
+
|
|
251
|
+
attr_accessor subscription_id: String?
|
|
252
|
+
|
|
253
|
+
def initialize: (id: String, ?subscription_id: String?) -> void
|
|
254
|
+
|
|
255
|
+
def to_hash: -> { id: String, subscription_id: String? }
|
|
256
|
+
end
|
|
239
257
|
end
|
|
240
258
|
end
|
|
241
259
|
end
|
|
@@ -13,7 +13,8 @@ module Orb
|
|
|
13
13
|
metadata: ::Hash[Symbol, String],
|
|
14
14
|
per_unit_cost_basis: String?,
|
|
15
15
|
status: Orb::Models::Customers::CreditListResponse::status,
|
|
16
|
-
credit_allocation: Orb::Models::Customers::CreditListResponse::CreditAllocation
|
|
16
|
+
credit_allocation: Orb::Models::Customers::CreditListResponse::CreditAllocation?,
|
|
17
|
+
credit_commitment: Orb::Models::Customers::CreditListResponse::CreditCommitment?
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
class CreditListResponse < Orb::Internal::Type::BaseModel
|
|
@@ -39,6 +40,8 @@ module Orb
|
|
|
39
40
|
|
|
40
41
|
attr_accessor credit_allocation: Orb::Models::Customers::CreditListResponse::CreditAllocation?
|
|
41
42
|
|
|
43
|
+
attr_accessor credit_commitment: Orb::Models::Customers::CreditListResponse::CreditCommitment?
|
|
44
|
+
|
|
42
45
|
def initialize: (
|
|
43
46
|
id: String,
|
|
44
47
|
balance: Float,
|
|
@@ -50,7 +53,8 @@ module Orb
|
|
|
50
53
|
metadata: ::Hash[Symbol, String],
|
|
51
54
|
per_unit_cost_basis: String?,
|
|
52
55
|
status: Orb::Models::Customers::CreditListResponse::status,
|
|
53
|
-
?credit_allocation: Orb::Models::Customers::CreditListResponse::CreditAllocation
|
|
56
|
+
?credit_allocation: Orb::Models::Customers::CreditListResponse::CreditAllocation?,
|
|
57
|
+
?credit_commitment: Orb::Models::Customers::CreditListResponse::CreditCommitment?
|
|
54
58
|
) -> void
|
|
55
59
|
|
|
56
60
|
def to_hash: -> {
|
|
@@ -64,16 +68,18 @@ module Orb
|
|
|
64
68
|
metadata: ::Hash[Symbol, String],
|
|
65
69
|
per_unit_cost_basis: String?,
|
|
66
70
|
status: Orb::Models::Customers::CreditListResponse::status,
|
|
67
|
-
credit_allocation: Orb::Models::Customers::CreditListResponse::CreditAllocation
|
|
71
|
+
credit_allocation: Orb::Models::Customers::CreditListResponse::CreditAllocation?,
|
|
72
|
+
credit_commitment: Orb::Models::Customers::CreditListResponse::CreditCommitment?
|
|
68
73
|
}
|
|
69
74
|
|
|
70
|
-
type credit_block_source = :allocation | :top_up | :manual
|
|
75
|
+
type credit_block_source = :allocation | :top_up | :commitment | :manual
|
|
71
76
|
|
|
72
77
|
module CreditBlockSource
|
|
73
78
|
extend Orb::Internal::Type::Enum
|
|
74
79
|
|
|
75
80
|
ALLOCATION: :allocation
|
|
76
81
|
TOP_UP: :top_up
|
|
82
|
+
COMMITMENT: :commitment
|
|
77
83
|
MANUAL: :manual
|
|
78
84
|
|
|
79
85
|
def self?.values: -> ::Array[Orb::Models::Customers::CreditListResponse::credit_block_source]
|
|
@@ -236,6 +242,18 @@ module Orb
|
|
|
236
242
|
end
|
|
237
243
|
end
|
|
238
244
|
end
|
|
245
|
+
|
|
246
|
+
type credit_commitment = { id: String, subscription_id: String? }
|
|
247
|
+
|
|
248
|
+
class CreditCommitment < Orb::Internal::Type::BaseModel
|
|
249
|
+
attr_accessor id: String
|
|
250
|
+
|
|
251
|
+
attr_accessor subscription_id: String?
|
|
252
|
+
|
|
253
|
+
def initialize: (id: String, ?subscription_id: String?) -> void
|
|
254
|
+
|
|
255
|
+
def to_hash: -> { id: String, subscription_id: String? }
|
|
256
|
+
end
|
|
239
257
|
end
|
|
240
258
|
end
|
|
241
259
|
end
|