metronome-sdk 3.5.0 → 3.7.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 +53 -0
- data/README.md +1 -1
- data/lib/metronome_sdk/client.rb +15 -1
- data/lib/metronome_sdk/internal/transport/base_client.rb +2 -0
- data/lib/metronome_sdk/internal/type/enum.rb +0 -25
- data/lib/metronome_sdk/models/commit.rb +27 -1
- data/lib/metronome_sdk/models/contract.rb +140 -1
- data/lib/metronome_sdk/models/contract_v2.rb +530 -6
- data/lib/metronome_sdk/models/contract_without_amendments.rb +142 -1
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +105 -2
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +103 -2
- data/lib/metronome_sdk/models/spend_threshold_configuration.rb +33 -1
- data/lib/metronome_sdk/models/spend_threshold_configuration_v2.rb +33 -1
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +1 -0
- data/lib/metronome_sdk/models/v1/contract_amend_params.rb +29 -177
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +147 -180
- data/lib/metronome_sdk/models/v1/contract_create_response.rb +1134 -3
- data/lib/metronome_sdk/models/v1/contract_list_seat_balances_params.rb +119 -0
- data/lib/metronome_sdk/models/v1/contract_list_seat_balances_response.rb +315 -0
- data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +31 -1
- data/lib/metronome_sdk/models/v1/contracts/product_update_params.rb +31 -1
- data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +1 -0
- data/lib/metronome_sdk/models/v1/customers/invoice.rb +8 -1
- data/lib/metronome_sdk/models/v1/customers/invoice_list_params.rb +29 -1
- data/lib/metronome_sdk/models/v1/package_create_params.rb +115 -18
- data/lib/metronome_sdk/models/v1/package_list_response.rb +110 -1
- data/lib/metronome_sdk/models/v1/package_retrieve_response.rb +114 -1
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +303 -5
- data/lib/metronome_sdk/models/v2/contract_edit_response.rb +3862 -3
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +507 -6
- data/lib/metronome_sdk/resources/v1/contracts/products.rb +6 -2
- data/lib/metronome_sdk/resources/v1/contracts.rb +72 -3
- data/lib/metronome_sdk/resources/v1/customers/invoices.rb +5 -1
- data/lib/metronome_sdk/resources/v1/packages.rb +6 -7
- data/lib/metronome_sdk/resources/v1.rb +0 -4
- data/lib/metronome_sdk/resources/v2/contracts.rb +5 -1
- data/lib/metronome_sdk/version.rb +1 -1
- data/lib/metronome_sdk.rb +2 -8
- data/rbi/metronome_sdk/models/commit.rbi +48 -0
- data/rbi/metronome_sdk/models/contract.rbi +354 -0
- data/rbi/metronome_sdk/models/contract_v2.rbi +1172 -4
- data/rbi/metronome_sdk/models/contract_without_amendments.rbi +368 -0
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +289 -6
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +283 -6
- data/rbi/metronome_sdk/models/spend_threshold_configuration.rbi +78 -3
- data/rbi/metronome_sdk/models/spend_threshold_configuration_v2.rbi +78 -3
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +54 -396
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +370 -398
- data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +2448 -4
- data/rbi/metronome_sdk/models/v1/contract_list_seat_balances_params.rbi +179 -0
- data/rbi/metronome_sdk/models/v1/contract_list_seat_balances_response.rbi +714 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_create_params.rbi +74 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_update_params.rbi +74 -0
- data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +9 -0
- data/rbi/metronome_sdk/models/v1/customers/invoice_list_params.rbi +75 -0
- data/rbi/metronome_sdk/models/v1/package_create_params.rbi +310 -56
- data/rbi/metronome_sdk/models/v1/package_list_response.rbi +307 -0
- data/rbi/metronome_sdk/models/v1/package_retrieve_response.rbi +307 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +734 -11
- data/rbi/metronome_sdk/models/v2/contract_edit_response.rbi +8612 -4
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1355 -219
- data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +18 -0
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +88 -3
- data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +7 -0
- data/rbi/metronome_sdk/resources/v1/packages.rbi +8 -7
- data/rbi/metronome_sdk/resources/v1.rbi +0 -3
- data/rbi/metronome_sdk/resources/v2/contracts.rbi +10 -0
- data/sig/metronome_sdk/models/commit.rbs +19 -0
- data/sig/metronome_sdk/models/contract.rbs +151 -0
- data/sig/metronome_sdk/models/contract_v2.rbs +494 -6
- data/sig/metronome_sdk/models/contract_without_amendments.rbs +151 -0
- data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration.rbs +116 -6
- data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbs +116 -6
- data/sig/metronome_sdk/models/spend_threshold_configuration.rbs +31 -3
- data/sig/metronome_sdk/models/spend_threshold_configuration_v2.rbs +31 -3
- data/sig/metronome_sdk/models/v1/alert_create_params.rbs +3 -1
- data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +19 -137
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +134 -137
- data/sig/metronome_sdk/models/v1/contract_create_response.rbs +1045 -4
- data/sig/metronome_sdk/models/v1/contract_list_seat_balances_params.rbs +96 -0
- data/sig/metronome_sdk/models/v1/contract_list_seat_balances_response.rbs +299 -0
- data/sig/metronome_sdk/models/v1/contracts/product_create_params.rbs +20 -0
- data/sig/metronome_sdk/models/v1/contracts/product_update_params.rbs +20 -0
- data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +3 -1
- data/sig/metronome_sdk/models/v1/customers/invoice.rbs +7 -0
- data/sig/metronome_sdk/models/v1/customers/invoice_list_params.rbs +29 -1
- data/sig/metronome_sdk/models/v1/package_create_params.rbs +115 -20
- data/sig/metronome_sdk/models/v1/package_list_response.rbs +115 -0
- data/sig/metronome_sdk/models/v1/package_retrieve_response.rbs +115 -0
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +283 -9
- data/sig/metronome_sdk/models/v2/contract_edit_response.rbs +3792 -4
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +461 -15
- data/sig/metronome_sdk/resources/v1/contracts/products.rbs +2 -0
- data/sig/metronome_sdk/resources/v1/contracts.rbs +16 -0
- data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +2 -0
- data/sig/metronome_sdk/resources/v1/packages.rbs +1 -1
- data/sig/metronome_sdk/resources/v1.rbs +0 -2
- data/sig/metronome_sdk/resources/v2/contracts.rbs +2 -0
- metadata +8 -26
- data/lib/metronome_sdk/models/v1/payment.rb +0 -196
- data/lib/metronome_sdk/models/v1/payment_attempt_params.rb +0 -28
- data/lib/metronome_sdk/models/v1/payment_attempt_response.rb +0 -18
- data/lib/metronome_sdk/models/v1/payment_cancel_params.rb +0 -28
- data/lib/metronome_sdk/models/v1/payment_cancel_response.rb +0 -18
- data/lib/metronome_sdk/models/v1/payment_list_params.rb +0 -53
- data/lib/metronome_sdk/models/v1/payment_status.rb +0 -19
- data/lib/metronome_sdk/resources/v1/payments.rb +0 -102
- data/rbi/metronome_sdk/models/v1/payment.rbi +0 -403
- data/rbi/metronome_sdk/models/v1/payment_attempt_params.rbi +0 -48
- data/rbi/metronome_sdk/models/v1/payment_attempt_response.rbi +0 -35
- data/rbi/metronome_sdk/models/v1/payment_cancel_params.rbi +0 -48
- data/rbi/metronome_sdk/models/v1/payment_cancel_response.rbi +0 -35
- data/rbi/metronome_sdk/models/v1/payment_list_params.rbi +0 -91
- data/rbi/metronome_sdk/models/v1/payment_status.rbi +0 -33
- data/rbi/metronome_sdk/resources/v1/payments.rbi +0 -72
- data/sig/metronome_sdk/models/v1/payment.rbs +0 -243
- data/sig/metronome_sdk/models/v1/payment_attempt_params.rbs +0 -30
- data/sig/metronome_sdk/models/v1/payment_attempt_response.rbs +0 -15
- data/sig/metronome_sdk/models/v1/payment_cancel_params.rbs +0 -30
- data/sig/metronome_sdk/models/v1/payment_cancel_response.rbs +0 -15
- data/sig/metronome_sdk/models/v1/payment_list_params.rbs +0 -56
- data/sig/metronome_sdk/models/v1/payment_status.rbs +0 -19
- data/sig/metronome_sdk/resources/v1/payments.rbs +0 -30
|
@@ -12,19 +12,2463 @@ module MetronomeSDK
|
|
|
12
12
|
)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
sig { returns(MetronomeSDK::
|
|
15
|
+
sig { returns(MetronomeSDK::Models::V1::ContractCreateResponse::Data) }
|
|
16
16
|
attr_reader :data
|
|
17
17
|
|
|
18
|
-
sig
|
|
18
|
+
sig do
|
|
19
|
+
params(
|
|
20
|
+
data: MetronomeSDK::Models::V1::ContractCreateResponse::Data::OrHash
|
|
21
|
+
).void
|
|
22
|
+
end
|
|
19
23
|
attr_writer :data
|
|
20
24
|
|
|
21
|
-
sig
|
|
25
|
+
sig do
|
|
26
|
+
params(
|
|
27
|
+
data: MetronomeSDK::Models::V1::ContractCreateResponse::Data::OrHash
|
|
28
|
+
).returns(T.attached_class)
|
|
29
|
+
end
|
|
22
30
|
def self.new(data:)
|
|
23
31
|
end
|
|
24
32
|
|
|
25
|
-
sig
|
|
33
|
+
sig do
|
|
34
|
+
override.returns(
|
|
35
|
+
{ data: MetronomeSDK::Models::V1::ContractCreateResponse::Data }
|
|
36
|
+
)
|
|
37
|
+
end
|
|
26
38
|
def to_hash
|
|
27
39
|
end
|
|
40
|
+
|
|
41
|
+
class Data < MetronomeSDK::Internal::Type::BaseModel
|
|
42
|
+
OrHash =
|
|
43
|
+
T.type_alias do
|
|
44
|
+
T.any(
|
|
45
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data,
|
|
46
|
+
MetronomeSDK::Internal::AnyHash
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
sig { returns(String) }
|
|
51
|
+
attr_accessor :id
|
|
52
|
+
|
|
53
|
+
# The created contract.
|
|
54
|
+
sig do
|
|
55
|
+
returns(
|
|
56
|
+
T.nilable(
|
|
57
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract
|
|
58
|
+
)
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
attr_reader :contract
|
|
62
|
+
|
|
63
|
+
sig do
|
|
64
|
+
params(
|
|
65
|
+
contract:
|
|
66
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::OrHash
|
|
67
|
+
).void
|
|
68
|
+
end
|
|
69
|
+
attr_writer :contract
|
|
70
|
+
|
|
71
|
+
sig do
|
|
72
|
+
params(
|
|
73
|
+
id: String,
|
|
74
|
+
contract:
|
|
75
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::OrHash
|
|
76
|
+
).returns(T.attached_class)
|
|
77
|
+
end
|
|
78
|
+
def self.new(
|
|
79
|
+
id:,
|
|
80
|
+
# The created contract.
|
|
81
|
+
contract: nil
|
|
82
|
+
)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
sig do
|
|
86
|
+
override.returns(
|
|
87
|
+
{
|
|
88
|
+
id: String,
|
|
89
|
+
contract:
|
|
90
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
end
|
|
94
|
+
def to_hash
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
class Contract < MetronomeSDK::Internal::Type::BaseModel
|
|
98
|
+
OrHash =
|
|
99
|
+
T.type_alias do
|
|
100
|
+
T.any(
|
|
101
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract,
|
|
102
|
+
MetronomeSDK::Internal::AnyHash
|
|
103
|
+
)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
sig { returns(String) }
|
|
107
|
+
attr_accessor :id
|
|
108
|
+
|
|
109
|
+
sig { returns(T::Array[MetronomeSDK::Commit]) }
|
|
110
|
+
attr_accessor :commits
|
|
111
|
+
|
|
112
|
+
sig { returns(Time) }
|
|
113
|
+
attr_accessor :created_at
|
|
114
|
+
|
|
115
|
+
sig { returns(String) }
|
|
116
|
+
attr_accessor :created_by
|
|
117
|
+
|
|
118
|
+
sig { returns(String) }
|
|
119
|
+
attr_accessor :customer_id
|
|
120
|
+
|
|
121
|
+
sig { returns(T::Array[MetronomeSDK::Override]) }
|
|
122
|
+
attr_accessor :overrides
|
|
123
|
+
|
|
124
|
+
sig { returns(T::Array[MetronomeSDK::ScheduledCharge]) }
|
|
125
|
+
attr_accessor :scheduled_charges
|
|
126
|
+
|
|
127
|
+
sig { returns(Time) }
|
|
128
|
+
attr_accessor :starting_at
|
|
129
|
+
|
|
130
|
+
sig do
|
|
131
|
+
returns(
|
|
132
|
+
T::Array[
|
|
133
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition
|
|
134
|
+
]
|
|
135
|
+
)
|
|
136
|
+
end
|
|
137
|
+
attr_accessor :transitions
|
|
138
|
+
|
|
139
|
+
sig do
|
|
140
|
+
returns(
|
|
141
|
+
T::Array[
|
|
142
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageFilter
|
|
143
|
+
]
|
|
144
|
+
)
|
|
145
|
+
end
|
|
146
|
+
attr_accessor :usage_filter
|
|
147
|
+
|
|
148
|
+
sig do
|
|
149
|
+
returns(
|
|
150
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule
|
|
151
|
+
)
|
|
152
|
+
end
|
|
153
|
+
attr_reader :usage_statement_schedule
|
|
154
|
+
|
|
155
|
+
sig do
|
|
156
|
+
params(
|
|
157
|
+
usage_statement_schedule:
|
|
158
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::OrHash
|
|
159
|
+
).void
|
|
160
|
+
end
|
|
161
|
+
attr_writer :usage_statement_schedule
|
|
162
|
+
|
|
163
|
+
sig { returns(T.nilable(T::Array[MetronomeSDK::Credit])) }
|
|
164
|
+
attr_reader :credits
|
|
165
|
+
|
|
166
|
+
sig { params(credits: T::Array[MetronomeSDK::Credit::OrHash]).void }
|
|
167
|
+
attr_writer :credits
|
|
168
|
+
|
|
169
|
+
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
170
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
171
|
+
attr_reader :custom_fields
|
|
172
|
+
|
|
173
|
+
sig { params(custom_fields: T::Hash[Symbol, String]).void }
|
|
174
|
+
attr_writer :custom_fields
|
|
175
|
+
|
|
176
|
+
# The billing provider configuration associated with the contract.
|
|
177
|
+
sig do
|
|
178
|
+
returns(
|
|
179
|
+
T.nilable(
|
|
180
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration
|
|
181
|
+
)
|
|
182
|
+
)
|
|
183
|
+
end
|
|
184
|
+
attr_reader :customer_billing_provider_configuration
|
|
185
|
+
|
|
186
|
+
sig do
|
|
187
|
+
params(
|
|
188
|
+
customer_billing_provider_configuration:
|
|
189
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::OrHash
|
|
190
|
+
).void
|
|
191
|
+
end
|
|
192
|
+
attr_writer :customer_billing_provider_configuration
|
|
193
|
+
|
|
194
|
+
sig { returns(T.nilable(Time)) }
|
|
195
|
+
attr_reader :ending_before
|
|
196
|
+
|
|
197
|
+
sig { params(ending_before: Time).void }
|
|
198
|
+
attr_writer :ending_before
|
|
199
|
+
|
|
200
|
+
# Indicates whether there are more items than the limit for this endpoint. Use the
|
|
201
|
+
# respective list endpoints to get the full lists.
|
|
202
|
+
sig do
|
|
203
|
+
returns(
|
|
204
|
+
T.nilable(
|
|
205
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::HasMore
|
|
206
|
+
)
|
|
207
|
+
)
|
|
208
|
+
end
|
|
209
|
+
attr_reader :has_more
|
|
210
|
+
|
|
211
|
+
sig do
|
|
212
|
+
params(
|
|
213
|
+
has_more:
|
|
214
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::HasMore::OrHash
|
|
215
|
+
).void
|
|
216
|
+
end
|
|
217
|
+
attr_writer :has_more
|
|
218
|
+
|
|
219
|
+
# Either a **parent** configuration with a list of children or a **child**
|
|
220
|
+
# configuration with a single parent.
|
|
221
|
+
sig do
|
|
222
|
+
returns(T.nilable(MetronomeSDK::HierarchyConfiguration::Variants))
|
|
223
|
+
end
|
|
224
|
+
attr_reader :hierarchy_configuration
|
|
225
|
+
|
|
226
|
+
sig do
|
|
227
|
+
params(
|
|
228
|
+
hierarchy_configuration:
|
|
229
|
+
T.any(
|
|
230
|
+
MetronomeSDK::HierarchyConfiguration::ParentHierarchyConfiguration::OrHash,
|
|
231
|
+
MetronomeSDK::HierarchyConfiguration::ChildHierarchyConfiguration::OrHash
|
|
232
|
+
)
|
|
233
|
+
).void
|
|
234
|
+
end
|
|
235
|
+
attr_writer :hierarchy_configuration
|
|
236
|
+
|
|
237
|
+
# Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
|
238
|
+
# prices automatically. EXPLICIT prioritization requires specifying priorities for
|
|
239
|
+
# each multiplier; the one with the lowest priority value will be prioritized
|
|
240
|
+
# first.
|
|
241
|
+
sig do
|
|
242
|
+
returns(
|
|
243
|
+
T.nilable(
|
|
244
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization::TaggedSymbol
|
|
245
|
+
)
|
|
246
|
+
)
|
|
247
|
+
end
|
|
248
|
+
attr_reader :multiplier_override_prioritization
|
|
249
|
+
|
|
250
|
+
sig do
|
|
251
|
+
params(
|
|
252
|
+
multiplier_override_prioritization:
|
|
253
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization::OrSymbol
|
|
254
|
+
).void
|
|
255
|
+
end
|
|
256
|
+
attr_writer :multiplier_override_prioritization
|
|
257
|
+
|
|
258
|
+
sig { returns(T.nilable(String)) }
|
|
259
|
+
attr_reader :name
|
|
260
|
+
|
|
261
|
+
sig { params(name: String).void }
|
|
262
|
+
attr_writer :name
|
|
263
|
+
|
|
264
|
+
sig { returns(T.nilable(Float)) }
|
|
265
|
+
attr_reader :net_payment_terms_days
|
|
266
|
+
|
|
267
|
+
sig { params(net_payment_terms_days: Float).void }
|
|
268
|
+
attr_writer :net_payment_terms_days
|
|
269
|
+
|
|
270
|
+
# ID of the package this contract was created from, if applicable.
|
|
271
|
+
sig { returns(T.nilable(String)) }
|
|
272
|
+
attr_reader :package_id
|
|
273
|
+
|
|
274
|
+
sig { params(package_id: String).void }
|
|
275
|
+
attr_writer :package_id
|
|
276
|
+
|
|
277
|
+
sig do
|
|
278
|
+
returns(
|
|
279
|
+
T.nilable(MetronomeSDK::PrepaidBalanceThresholdConfiguration)
|
|
280
|
+
)
|
|
281
|
+
end
|
|
282
|
+
attr_reader :prepaid_balance_threshold_configuration
|
|
283
|
+
|
|
284
|
+
sig do
|
|
285
|
+
params(
|
|
286
|
+
prepaid_balance_threshold_configuration:
|
|
287
|
+
MetronomeSDK::PrepaidBalanceThresholdConfiguration::OrHash
|
|
288
|
+
).void
|
|
289
|
+
end
|
|
290
|
+
attr_writer :prepaid_balance_threshold_configuration
|
|
291
|
+
|
|
292
|
+
sig { returns(T.nilable(String)) }
|
|
293
|
+
attr_reader :rate_card_id
|
|
294
|
+
|
|
295
|
+
sig { params(rate_card_id: String).void }
|
|
296
|
+
attr_writer :rate_card_id
|
|
297
|
+
|
|
298
|
+
sig do
|
|
299
|
+
returns(
|
|
300
|
+
T.nilable(
|
|
301
|
+
T::Array[
|
|
302
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit
|
|
303
|
+
]
|
|
304
|
+
)
|
|
305
|
+
)
|
|
306
|
+
end
|
|
307
|
+
attr_reader :recurring_commits
|
|
308
|
+
|
|
309
|
+
sig do
|
|
310
|
+
params(
|
|
311
|
+
recurring_commits:
|
|
312
|
+
T::Array[
|
|
313
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::OrHash
|
|
314
|
+
]
|
|
315
|
+
).void
|
|
316
|
+
end
|
|
317
|
+
attr_writer :recurring_commits
|
|
318
|
+
|
|
319
|
+
sig do
|
|
320
|
+
returns(
|
|
321
|
+
T.nilable(
|
|
322
|
+
T::Array[
|
|
323
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit
|
|
324
|
+
]
|
|
325
|
+
)
|
|
326
|
+
)
|
|
327
|
+
end
|
|
328
|
+
attr_reader :recurring_credits
|
|
329
|
+
|
|
330
|
+
sig do
|
|
331
|
+
params(
|
|
332
|
+
recurring_credits:
|
|
333
|
+
T::Array[
|
|
334
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::OrHash
|
|
335
|
+
]
|
|
336
|
+
).void
|
|
337
|
+
end
|
|
338
|
+
attr_writer :recurring_credits
|
|
339
|
+
|
|
340
|
+
# Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
341
|
+
# usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
342
|
+
# `ending_before` date for consolidation to occur. This field cannot be modified
|
|
343
|
+
# after a Contract has been created. If this field is omitted, charges will appear
|
|
344
|
+
# on a separate invoice from usage charges.
|
|
345
|
+
sig do
|
|
346
|
+
returns(
|
|
347
|
+
T.nilable(
|
|
348
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::ScheduledChargesOnUsageInvoices::TaggedSymbol
|
|
349
|
+
)
|
|
350
|
+
)
|
|
351
|
+
end
|
|
352
|
+
attr_reader :scheduled_charges_on_usage_invoices
|
|
353
|
+
|
|
354
|
+
sig do
|
|
355
|
+
params(
|
|
356
|
+
scheduled_charges_on_usage_invoices:
|
|
357
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::ScheduledChargesOnUsageInvoices::OrSymbol
|
|
358
|
+
).void
|
|
359
|
+
end
|
|
360
|
+
attr_writer :scheduled_charges_on_usage_invoices
|
|
361
|
+
|
|
362
|
+
sig do
|
|
363
|
+
returns(T.nilable(MetronomeSDK::SpendThresholdConfiguration))
|
|
364
|
+
end
|
|
365
|
+
attr_reader :spend_threshold_configuration
|
|
366
|
+
|
|
367
|
+
sig do
|
|
368
|
+
params(
|
|
369
|
+
spend_threshold_configuration:
|
|
370
|
+
MetronomeSDK::SpendThresholdConfiguration::OrHash
|
|
371
|
+
).void
|
|
372
|
+
end
|
|
373
|
+
attr_writer :spend_threshold_configuration
|
|
374
|
+
|
|
375
|
+
# List of subscriptions on the contract.
|
|
376
|
+
sig { returns(T.nilable(T::Array[MetronomeSDK::Subscription])) }
|
|
377
|
+
attr_reader :subscriptions
|
|
378
|
+
|
|
379
|
+
sig do
|
|
380
|
+
params(
|
|
381
|
+
subscriptions: T::Array[MetronomeSDK::Subscription::OrHash]
|
|
382
|
+
).void
|
|
383
|
+
end
|
|
384
|
+
attr_writer :subscriptions
|
|
385
|
+
|
|
386
|
+
# Optional uniqueness key to prevent duplicate contract creations.
|
|
387
|
+
sig { returns(T.nilable(String)) }
|
|
388
|
+
attr_reader :uniqueness_key
|
|
389
|
+
|
|
390
|
+
sig { params(uniqueness_key: String).void }
|
|
391
|
+
attr_writer :uniqueness_key
|
|
392
|
+
|
|
393
|
+
# The created contract.
|
|
394
|
+
sig do
|
|
395
|
+
params(
|
|
396
|
+
id: String,
|
|
397
|
+
commits: T::Array[MetronomeSDK::Commit::OrHash],
|
|
398
|
+
created_at: Time,
|
|
399
|
+
created_by: String,
|
|
400
|
+
customer_id: String,
|
|
401
|
+
overrides: T::Array[MetronomeSDK::Override::OrHash],
|
|
402
|
+
scheduled_charges:
|
|
403
|
+
T::Array[MetronomeSDK::ScheduledCharge::OrHash],
|
|
404
|
+
starting_at: Time,
|
|
405
|
+
transitions:
|
|
406
|
+
T::Array[
|
|
407
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::OrHash
|
|
408
|
+
],
|
|
409
|
+
usage_filter:
|
|
410
|
+
T::Array[
|
|
411
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageFilter::OrHash
|
|
412
|
+
],
|
|
413
|
+
usage_statement_schedule:
|
|
414
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::OrHash,
|
|
415
|
+
credits: T::Array[MetronomeSDK::Credit::OrHash],
|
|
416
|
+
custom_fields: T::Hash[Symbol, String],
|
|
417
|
+
customer_billing_provider_configuration:
|
|
418
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::OrHash,
|
|
419
|
+
ending_before: Time,
|
|
420
|
+
has_more:
|
|
421
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::HasMore::OrHash,
|
|
422
|
+
hierarchy_configuration:
|
|
423
|
+
T.any(
|
|
424
|
+
MetronomeSDK::HierarchyConfiguration::ParentHierarchyConfiguration::OrHash,
|
|
425
|
+
MetronomeSDK::HierarchyConfiguration::ChildHierarchyConfiguration::OrHash
|
|
426
|
+
),
|
|
427
|
+
multiplier_override_prioritization:
|
|
428
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization::OrSymbol,
|
|
429
|
+
name: String,
|
|
430
|
+
net_payment_terms_days: Float,
|
|
431
|
+
package_id: String,
|
|
432
|
+
prepaid_balance_threshold_configuration:
|
|
433
|
+
MetronomeSDK::PrepaidBalanceThresholdConfiguration::OrHash,
|
|
434
|
+
rate_card_id: String,
|
|
435
|
+
recurring_commits:
|
|
436
|
+
T::Array[
|
|
437
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::OrHash
|
|
438
|
+
],
|
|
439
|
+
recurring_credits:
|
|
440
|
+
T::Array[
|
|
441
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::OrHash
|
|
442
|
+
],
|
|
443
|
+
scheduled_charges_on_usage_invoices:
|
|
444
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::ScheduledChargesOnUsageInvoices::OrSymbol,
|
|
445
|
+
spend_threshold_configuration:
|
|
446
|
+
MetronomeSDK::SpendThresholdConfiguration::OrHash,
|
|
447
|
+
subscriptions: T::Array[MetronomeSDK::Subscription::OrHash],
|
|
448
|
+
uniqueness_key: String
|
|
449
|
+
).returns(T.attached_class)
|
|
450
|
+
end
|
|
451
|
+
def self.new(
|
|
452
|
+
id:,
|
|
453
|
+
commits:,
|
|
454
|
+
created_at:,
|
|
455
|
+
created_by:,
|
|
456
|
+
customer_id:,
|
|
457
|
+
overrides:,
|
|
458
|
+
scheduled_charges:,
|
|
459
|
+
starting_at:,
|
|
460
|
+
transitions:,
|
|
461
|
+
usage_filter:,
|
|
462
|
+
usage_statement_schedule:,
|
|
463
|
+
credits: nil,
|
|
464
|
+
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
465
|
+
custom_fields: nil,
|
|
466
|
+
# The billing provider configuration associated with the contract.
|
|
467
|
+
customer_billing_provider_configuration: nil,
|
|
468
|
+
ending_before: nil,
|
|
469
|
+
# Indicates whether there are more items than the limit for this endpoint. Use the
|
|
470
|
+
# respective list endpoints to get the full lists.
|
|
471
|
+
has_more: nil,
|
|
472
|
+
# Either a **parent** configuration with a list of children or a **child**
|
|
473
|
+
# configuration with a single parent.
|
|
474
|
+
hierarchy_configuration: nil,
|
|
475
|
+
# Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
|
476
|
+
# prices automatically. EXPLICIT prioritization requires specifying priorities for
|
|
477
|
+
# each multiplier; the one with the lowest priority value will be prioritized
|
|
478
|
+
# first.
|
|
479
|
+
multiplier_override_prioritization: nil,
|
|
480
|
+
name: nil,
|
|
481
|
+
net_payment_terms_days: nil,
|
|
482
|
+
# ID of the package this contract was created from, if applicable.
|
|
483
|
+
package_id: nil,
|
|
484
|
+
prepaid_balance_threshold_configuration: nil,
|
|
485
|
+
rate_card_id: nil,
|
|
486
|
+
recurring_commits: nil,
|
|
487
|
+
recurring_credits: nil,
|
|
488
|
+
# Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
489
|
+
# usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
490
|
+
# `ending_before` date for consolidation to occur. This field cannot be modified
|
|
491
|
+
# after a Contract has been created. If this field is omitted, charges will appear
|
|
492
|
+
# on a separate invoice from usage charges.
|
|
493
|
+
scheduled_charges_on_usage_invoices: nil,
|
|
494
|
+
spend_threshold_configuration: nil,
|
|
495
|
+
# List of subscriptions on the contract.
|
|
496
|
+
subscriptions: nil,
|
|
497
|
+
# Optional uniqueness key to prevent duplicate contract creations.
|
|
498
|
+
uniqueness_key: nil
|
|
499
|
+
)
|
|
500
|
+
end
|
|
501
|
+
|
|
502
|
+
sig do
|
|
503
|
+
override.returns(
|
|
504
|
+
{
|
|
505
|
+
id: String,
|
|
506
|
+
commits: T::Array[MetronomeSDK::Commit],
|
|
507
|
+
created_at: Time,
|
|
508
|
+
created_by: String,
|
|
509
|
+
customer_id: String,
|
|
510
|
+
overrides: T::Array[MetronomeSDK::Override],
|
|
511
|
+
scheduled_charges: T::Array[MetronomeSDK::ScheduledCharge],
|
|
512
|
+
starting_at: Time,
|
|
513
|
+
transitions:
|
|
514
|
+
T::Array[
|
|
515
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition
|
|
516
|
+
],
|
|
517
|
+
usage_filter:
|
|
518
|
+
T::Array[
|
|
519
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageFilter
|
|
520
|
+
],
|
|
521
|
+
usage_statement_schedule:
|
|
522
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule,
|
|
523
|
+
credits: T::Array[MetronomeSDK::Credit],
|
|
524
|
+
custom_fields: T::Hash[Symbol, String],
|
|
525
|
+
customer_billing_provider_configuration:
|
|
526
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration,
|
|
527
|
+
ending_before: Time,
|
|
528
|
+
has_more:
|
|
529
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::HasMore,
|
|
530
|
+
hierarchy_configuration:
|
|
531
|
+
MetronomeSDK::HierarchyConfiguration::Variants,
|
|
532
|
+
multiplier_override_prioritization:
|
|
533
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization::TaggedSymbol,
|
|
534
|
+
name: String,
|
|
535
|
+
net_payment_terms_days: Float,
|
|
536
|
+
package_id: String,
|
|
537
|
+
prepaid_balance_threshold_configuration:
|
|
538
|
+
MetronomeSDK::PrepaidBalanceThresholdConfiguration,
|
|
539
|
+
rate_card_id: String,
|
|
540
|
+
recurring_commits:
|
|
541
|
+
T::Array[
|
|
542
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit
|
|
543
|
+
],
|
|
544
|
+
recurring_credits:
|
|
545
|
+
T::Array[
|
|
546
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit
|
|
547
|
+
],
|
|
548
|
+
scheduled_charges_on_usage_invoices:
|
|
549
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::ScheduledChargesOnUsageInvoices::TaggedSymbol,
|
|
550
|
+
spend_threshold_configuration:
|
|
551
|
+
MetronomeSDK::SpendThresholdConfiguration,
|
|
552
|
+
subscriptions: T::Array[MetronomeSDK::Subscription],
|
|
553
|
+
uniqueness_key: String
|
|
554
|
+
}
|
|
555
|
+
)
|
|
556
|
+
end
|
|
557
|
+
def to_hash
|
|
558
|
+
end
|
|
559
|
+
|
|
560
|
+
class Transition < MetronomeSDK::Internal::Type::BaseModel
|
|
561
|
+
OrHash =
|
|
562
|
+
T.type_alias do
|
|
563
|
+
T.any(
|
|
564
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition,
|
|
565
|
+
MetronomeSDK::Internal::AnyHash
|
|
566
|
+
)
|
|
567
|
+
end
|
|
568
|
+
|
|
569
|
+
sig { returns(String) }
|
|
570
|
+
attr_accessor :from_contract_id
|
|
571
|
+
|
|
572
|
+
sig { returns(String) }
|
|
573
|
+
attr_accessor :to_contract_id
|
|
574
|
+
|
|
575
|
+
sig do
|
|
576
|
+
returns(
|
|
577
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type::TaggedSymbol
|
|
578
|
+
)
|
|
579
|
+
end
|
|
580
|
+
attr_accessor :type
|
|
581
|
+
|
|
582
|
+
sig do
|
|
583
|
+
params(
|
|
584
|
+
from_contract_id: String,
|
|
585
|
+
to_contract_id: String,
|
|
586
|
+
type:
|
|
587
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type::OrSymbol
|
|
588
|
+
).returns(T.attached_class)
|
|
589
|
+
end
|
|
590
|
+
def self.new(from_contract_id:, to_contract_id:, type:)
|
|
591
|
+
end
|
|
592
|
+
|
|
593
|
+
sig do
|
|
594
|
+
override.returns(
|
|
595
|
+
{
|
|
596
|
+
from_contract_id: String,
|
|
597
|
+
to_contract_id: String,
|
|
598
|
+
type:
|
|
599
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type::TaggedSymbol
|
|
600
|
+
}
|
|
601
|
+
)
|
|
602
|
+
end
|
|
603
|
+
def to_hash
|
|
604
|
+
end
|
|
605
|
+
|
|
606
|
+
module Type
|
|
607
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
608
|
+
|
|
609
|
+
TaggedSymbol =
|
|
610
|
+
T.type_alias do
|
|
611
|
+
T.all(
|
|
612
|
+
Symbol,
|
|
613
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type
|
|
614
|
+
)
|
|
615
|
+
end
|
|
616
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
617
|
+
|
|
618
|
+
SUPERSEDE =
|
|
619
|
+
T.let(
|
|
620
|
+
:SUPERSEDE,
|
|
621
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type::TaggedSymbol
|
|
622
|
+
)
|
|
623
|
+
RENEWAL =
|
|
624
|
+
T.let(
|
|
625
|
+
:RENEWAL,
|
|
626
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type::TaggedSymbol
|
|
627
|
+
)
|
|
628
|
+
|
|
629
|
+
sig do
|
|
630
|
+
override.returns(
|
|
631
|
+
T::Array[
|
|
632
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type::TaggedSymbol
|
|
633
|
+
]
|
|
634
|
+
)
|
|
635
|
+
end
|
|
636
|
+
def self.values
|
|
637
|
+
end
|
|
638
|
+
end
|
|
639
|
+
end
|
|
640
|
+
|
|
641
|
+
class UsageFilter < MetronomeSDK::Internal::Type::BaseModel
|
|
642
|
+
OrHash =
|
|
643
|
+
T.type_alias do
|
|
644
|
+
T.any(
|
|
645
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageFilter,
|
|
646
|
+
MetronomeSDK::Internal::AnyHash
|
|
647
|
+
)
|
|
648
|
+
end
|
|
649
|
+
|
|
650
|
+
sig { returns(String) }
|
|
651
|
+
attr_accessor :group_key
|
|
652
|
+
|
|
653
|
+
sig { returns(T::Array[String]) }
|
|
654
|
+
attr_accessor :group_values
|
|
655
|
+
|
|
656
|
+
sig { returns(Time) }
|
|
657
|
+
attr_accessor :starting_at
|
|
658
|
+
|
|
659
|
+
sig { returns(T.nilable(Time)) }
|
|
660
|
+
attr_reader :ending_before
|
|
661
|
+
|
|
662
|
+
sig { params(ending_before: Time).void }
|
|
663
|
+
attr_writer :ending_before
|
|
664
|
+
|
|
665
|
+
sig do
|
|
666
|
+
params(
|
|
667
|
+
group_key: String,
|
|
668
|
+
group_values: T::Array[String],
|
|
669
|
+
starting_at: Time,
|
|
670
|
+
ending_before: Time
|
|
671
|
+
).returns(T.attached_class)
|
|
672
|
+
end
|
|
673
|
+
def self.new(
|
|
674
|
+
group_key:,
|
|
675
|
+
group_values:,
|
|
676
|
+
starting_at:,
|
|
677
|
+
ending_before: nil
|
|
678
|
+
)
|
|
679
|
+
end
|
|
680
|
+
|
|
681
|
+
sig do
|
|
682
|
+
override.returns(
|
|
683
|
+
{
|
|
684
|
+
group_key: String,
|
|
685
|
+
group_values: T::Array[String],
|
|
686
|
+
starting_at: Time,
|
|
687
|
+
ending_before: Time
|
|
688
|
+
}
|
|
689
|
+
)
|
|
690
|
+
end
|
|
691
|
+
def to_hash
|
|
692
|
+
end
|
|
693
|
+
end
|
|
694
|
+
|
|
695
|
+
class UsageStatementSchedule < MetronomeSDK::Internal::Type::BaseModel
|
|
696
|
+
OrHash =
|
|
697
|
+
T.type_alias do
|
|
698
|
+
T.any(
|
|
699
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule,
|
|
700
|
+
MetronomeSDK::Internal::AnyHash
|
|
701
|
+
)
|
|
702
|
+
end
|
|
703
|
+
|
|
704
|
+
# Contract usage statements follow a selected cadence based on this date.
|
|
705
|
+
sig { returns(Time) }
|
|
706
|
+
attr_accessor :billing_anchor_date
|
|
707
|
+
|
|
708
|
+
sig do
|
|
709
|
+
returns(
|
|
710
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency::TaggedSymbol
|
|
711
|
+
)
|
|
712
|
+
end
|
|
713
|
+
attr_accessor :frequency
|
|
714
|
+
|
|
715
|
+
sig do
|
|
716
|
+
params(
|
|
717
|
+
billing_anchor_date: Time,
|
|
718
|
+
frequency:
|
|
719
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency::OrSymbol
|
|
720
|
+
).returns(T.attached_class)
|
|
721
|
+
end
|
|
722
|
+
def self.new(
|
|
723
|
+
# Contract usage statements follow a selected cadence based on this date.
|
|
724
|
+
billing_anchor_date:,
|
|
725
|
+
frequency:
|
|
726
|
+
)
|
|
727
|
+
end
|
|
728
|
+
|
|
729
|
+
sig do
|
|
730
|
+
override.returns(
|
|
731
|
+
{
|
|
732
|
+
billing_anchor_date: Time,
|
|
733
|
+
frequency:
|
|
734
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency::TaggedSymbol
|
|
735
|
+
}
|
|
736
|
+
)
|
|
737
|
+
end
|
|
738
|
+
def to_hash
|
|
739
|
+
end
|
|
740
|
+
|
|
741
|
+
module Frequency
|
|
742
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
743
|
+
|
|
744
|
+
TaggedSymbol =
|
|
745
|
+
T.type_alias do
|
|
746
|
+
T.all(
|
|
747
|
+
Symbol,
|
|
748
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency
|
|
749
|
+
)
|
|
750
|
+
end
|
|
751
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
752
|
+
|
|
753
|
+
MONTHLY =
|
|
754
|
+
T.let(
|
|
755
|
+
:MONTHLY,
|
|
756
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency::TaggedSymbol
|
|
757
|
+
)
|
|
758
|
+
QUARTERLY =
|
|
759
|
+
T.let(
|
|
760
|
+
:QUARTERLY,
|
|
761
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency::TaggedSymbol
|
|
762
|
+
)
|
|
763
|
+
ANNUAL =
|
|
764
|
+
T.let(
|
|
765
|
+
:ANNUAL,
|
|
766
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency::TaggedSymbol
|
|
767
|
+
)
|
|
768
|
+
WEEKLY =
|
|
769
|
+
T.let(
|
|
770
|
+
:WEEKLY,
|
|
771
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency::TaggedSymbol
|
|
772
|
+
)
|
|
773
|
+
|
|
774
|
+
sig do
|
|
775
|
+
override.returns(
|
|
776
|
+
T::Array[
|
|
777
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency::TaggedSymbol
|
|
778
|
+
]
|
|
779
|
+
)
|
|
780
|
+
end
|
|
781
|
+
def self.values
|
|
782
|
+
end
|
|
783
|
+
end
|
|
784
|
+
end
|
|
785
|
+
|
|
786
|
+
class CustomerBillingProviderConfiguration < MetronomeSDK::Internal::Type::BaseModel
|
|
787
|
+
OrHash =
|
|
788
|
+
T.type_alias do
|
|
789
|
+
T.any(
|
|
790
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration,
|
|
791
|
+
MetronomeSDK::Internal::AnyHash
|
|
792
|
+
)
|
|
793
|
+
end
|
|
794
|
+
|
|
795
|
+
sig { returns(T.nilable(String)) }
|
|
796
|
+
attr_reader :id
|
|
797
|
+
|
|
798
|
+
sig { params(id: String).void }
|
|
799
|
+
attr_writer :id
|
|
800
|
+
|
|
801
|
+
sig do
|
|
802
|
+
returns(
|
|
803
|
+
T.nilable(
|
|
804
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
|
|
805
|
+
)
|
|
806
|
+
)
|
|
807
|
+
end
|
|
808
|
+
attr_reader :billing_provider
|
|
809
|
+
|
|
810
|
+
sig do
|
|
811
|
+
params(
|
|
812
|
+
billing_provider:
|
|
813
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::OrSymbol
|
|
814
|
+
).void
|
|
815
|
+
end
|
|
816
|
+
attr_writer :billing_provider
|
|
817
|
+
|
|
818
|
+
sig do
|
|
819
|
+
returns(
|
|
820
|
+
T.nilable(
|
|
821
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::TaggedSymbol
|
|
822
|
+
)
|
|
823
|
+
)
|
|
824
|
+
end
|
|
825
|
+
attr_reader :delivery_method
|
|
826
|
+
|
|
827
|
+
sig do
|
|
828
|
+
params(
|
|
829
|
+
delivery_method:
|
|
830
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::OrSymbol
|
|
831
|
+
).void
|
|
832
|
+
end
|
|
833
|
+
attr_writer :delivery_method
|
|
834
|
+
|
|
835
|
+
# The billing provider configuration associated with the contract.
|
|
836
|
+
sig do
|
|
837
|
+
params(
|
|
838
|
+
id: String,
|
|
839
|
+
billing_provider:
|
|
840
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::OrSymbol,
|
|
841
|
+
delivery_method:
|
|
842
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::OrSymbol
|
|
843
|
+
).returns(T.attached_class)
|
|
844
|
+
end
|
|
845
|
+
def self.new(id: nil, billing_provider: nil, delivery_method: nil)
|
|
846
|
+
end
|
|
847
|
+
|
|
848
|
+
sig do
|
|
849
|
+
override.returns(
|
|
850
|
+
{
|
|
851
|
+
id: String,
|
|
852
|
+
billing_provider:
|
|
853
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol,
|
|
854
|
+
delivery_method:
|
|
855
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::TaggedSymbol
|
|
856
|
+
}
|
|
857
|
+
)
|
|
858
|
+
end
|
|
859
|
+
def to_hash
|
|
860
|
+
end
|
|
861
|
+
|
|
862
|
+
module BillingProvider
|
|
863
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
864
|
+
|
|
865
|
+
TaggedSymbol =
|
|
866
|
+
T.type_alias do
|
|
867
|
+
T.all(
|
|
868
|
+
Symbol,
|
|
869
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider
|
|
870
|
+
)
|
|
871
|
+
end
|
|
872
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
873
|
+
|
|
874
|
+
AWS_MARKETPLACE =
|
|
875
|
+
T.let(
|
|
876
|
+
:aws_marketplace,
|
|
877
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
|
|
878
|
+
)
|
|
879
|
+
STRIPE =
|
|
880
|
+
T.let(
|
|
881
|
+
:stripe,
|
|
882
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
|
|
883
|
+
)
|
|
884
|
+
NETSUITE =
|
|
885
|
+
T.let(
|
|
886
|
+
:netsuite,
|
|
887
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
|
|
888
|
+
)
|
|
889
|
+
CUSTOM =
|
|
890
|
+
T.let(
|
|
891
|
+
:custom,
|
|
892
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
|
|
893
|
+
)
|
|
894
|
+
AZURE_MARKETPLACE =
|
|
895
|
+
T.let(
|
|
896
|
+
:azure_marketplace,
|
|
897
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
|
|
898
|
+
)
|
|
899
|
+
QUICKBOOKS_ONLINE =
|
|
900
|
+
T.let(
|
|
901
|
+
:quickbooks_online,
|
|
902
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
|
|
903
|
+
)
|
|
904
|
+
WORKDAY =
|
|
905
|
+
T.let(
|
|
906
|
+
:workday,
|
|
907
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
|
|
908
|
+
)
|
|
909
|
+
GCP_MARKETPLACE =
|
|
910
|
+
T.let(
|
|
911
|
+
:gcp_marketplace,
|
|
912
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
|
|
913
|
+
)
|
|
914
|
+
METRONOME =
|
|
915
|
+
T.let(
|
|
916
|
+
:metronome,
|
|
917
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
|
|
918
|
+
)
|
|
919
|
+
|
|
920
|
+
sig do
|
|
921
|
+
override.returns(
|
|
922
|
+
T::Array[
|
|
923
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
|
|
924
|
+
]
|
|
925
|
+
)
|
|
926
|
+
end
|
|
927
|
+
def self.values
|
|
928
|
+
end
|
|
929
|
+
end
|
|
930
|
+
|
|
931
|
+
module DeliveryMethod
|
|
932
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
933
|
+
|
|
934
|
+
TaggedSymbol =
|
|
935
|
+
T.type_alias do
|
|
936
|
+
T.all(
|
|
937
|
+
Symbol,
|
|
938
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod
|
|
939
|
+
)
|
|
940
|
+
end
|
|
941
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
942
|
+
|
|
943
|
+
DIRECT_TO_BILLING_PROVIDER =
|
|
944
|
+
T.let(
|
|
945
|
+
:direct_to_billing_provider,
|
|
946
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::TaggedSymbol
|
|
947
|
+
)
|
|
948
|
+
AWS_SQS =
|
|
949
|
+
T.let(
|
|
950
|
+
:aws_sqs,
|
|
951
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::TaggedSymbol
|
|
952
|
+
)
|
|
953
|
+
TACKLE =
|
|
954
|
+
T.let(
|
|
955
|
+
:tackle,
|
|
956
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::TaggedSymbol
|
|
957
|
+
)
|
|
958
|
+
AWS_SNS =
|
|
959
|
+
T.let(
|
|
960
|
+
:aws_sns,
|
|
961
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::TaggedSymbol
|
|
962
|
+
)
|
|
963
|
+
|
|
964
|
+
sig do
|
|
965
|
+
override.returns(
|
|
966
|
+
T::Array[
|
|
967
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::TaggedSymbol
|
|
968
|
+
]
|
|
969
|
+
)
|
|
970
|
+
end
|
|
971
|
+
def self.values
|
|
972
|
+
end
|
|
973
|
+
end
|
|
974
|
+
end
|
|
975
|
+
|
|
976
|
+
class HasMore < MetronomeSDK::Internal::Type::BaseModel
|
|
977
|
+
OrHash =
|
|
978
|
+
T.type_alias do
|
|
979
|
+
T.any(
|
|
980
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::HasMore,
|
|
981
|
+
MetronomeSDK::Internal::AnyHash
|
|
982
|
+
)
|
|
983
|
+
end
|
|
984
|
+
|
|
985
|
+
# Whether there are more commits on this contract than the limit for this
|
|
986
|
+
# endpoint. Use the /contracts/customerCommits/list endpoint to get the full list
|
|
987
|
+
# of commits.
|
|
988
|
+
sig { returns(T::Boolean) }
|
|
989
|
+
attr_accessor :commits
|
|
990
|
+
|
|
991
|
+
# Whether there are more credits on this contract than the limit for this
|
|
992
|
+
# endpoint. Use the /contracts/customerCredits/list endpoint to get the full list
|
|
993
|
+
# of credits.
|
|
994
|
+
sig { returns(T::Boolean) }
|
|
995
|
+
attr_accessor :credits
|
|
996
|
+
|
|
997
|
+
# Indicates whether there are more items than the limit for this endpoint. Use the
|
|
998
|
+
# respective list endpoints to get the full lists.
|
|
999
|
+
sig do
|
|
1000
|
+
params(commits: T::Boolean, credits: T::Boolean).returns(
|
|
1001
|
+
T.attached_class
|
|
1002
|
+
)
|
|
1003
|
+
end
|
|
1004
|
+
def self.new(
|
|
1005
|
+
# Whether there are more commits on this contract than the limit for this
|
|
1006
|
+
# endpoint. Use the /contracts/customerCommits/list endpoint to get the full list
|
|
1007
|
+
# of commits.
|
|
1008
|
+
commits:,
|
|
1009
|
+
# Whether there are more credits on this contract than the limit for this
|
|
1010
|
+
# endpoint. Use the /contracts/customerCredits/list endpoint to get the full list
|
|
1011
|
+
# of credits.
|
|
1012
|
+
credits:
|
|
1013
|
+
)
|
|
1014
|
+
end
|
|
1015
|
+
|
|
1016
|
+
sig do
|
|
1017
|
+
override.returns({ commits: T::Boolean, credits: T::Boolean })
|
|
1018
|
+
end
|
|
1019
|
+
def to_hash
|
|
1020
|
+
end
|
|
1021
|
+
end
|
|
1022
|
+
|
|
1023
|
+
# Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
|
1024
|
+
# prices automatically. EXPLICIT prioritization requires specifying priorities for
|
|
1025
|
+
# each multiplier; the one with the lowest priority value will be prioritized
|
|
1026
|
+
# first.
|
|
1027
|
+
module MultiplierOverridePrioritization
|
|
1028
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1029
|
+
|
|
1030
|
+
TaggedSymbol =
|
|
1031
|
+
T.type_alias do
|
|
1032
|
+
T.all(
|
|
1033
|
+
Symbol,
|
|
1034
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization
|
|
1035
|
+
)
|
|
1036
|
+
end
|
|
1037
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1038
|
+
|
|
1039
|
+
LOWEST_MULTIPLIER =
|
|
1040
|
+
T.let(
|
|
1041
|
+
:LOWEST_MULTIPLIER,
|
|
1042
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization::TaggedSymbol
|
|
1043
|
+
)
|
|
1044
|
+
EXPLICIT =
|
|
1045
|
+
T.let(
|
|
1046
|
+
:EXPLICIT,
|
|
1047
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization::TaggedSymbol
|
|
1048
|
+
)
|
|
1049
|
+
|
|
1050
|
+
sig do
|
|
1051
|
+
override.returns(
|
|
1052
|
+
T::Array[
|
|
1053
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization::TaggedSymbol
|
|
1054
|
+
]
|
|
1055
|
+
)
|
|
1056
|
+
end
|
|
1057
|
+
def self.values
|
|
1058
|
+
end
|
|
1059
|
+
end
|
|
1060
|
+
|
|
1061
|
+
class RecurringCommit < MetronomeSDK::Internal::Type::BaseModel
|
|
1062
|
+
OrHash =
|
|
1063
|
+
T.type_alias do
|
|
1064
|
+
T.any(
|
|
1065
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit,
|
|
1066
|
+
MetronomeSDK::Internal::AnyHash
|
|
1067
|
+
)
|
|
1068
|
+
end
|
|
1069
|
+
|
|
1070
|
+
sig { returns(String) }
|
|
1071
|
+
attr_accessor :id
|
|
1072
|
+
|
|
1073
|
+
# The amount of commit to grant.
|
|
1074
|
+
sig do
|
|
1075
|
+
returns(
|
|
1076
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::AccessAmount
|
|
1077
|
+
)
|
|
1078
|
+
end
|
|
1079
|
+
attr_reader :access_amount
|
|
1080
|
+
|
|
1081
|
+
sig do
|
|
1082
|
+
params(
|
|
1083
|
+
access_amount:
|
|
1084
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::AccessAmount::OrHash
|
|
1085
|
+
).void
|
|
1086
|
+
end
|
|
1087
|
+
attr_writer :access_amount
|
|
1088
|
+
|
|
1089
|
+
# The amount of time the created commits will be valid for
|
|
1090
|
+
sig do
|
|
1091
|
+
returns(
|
|
1092
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration
|
|
1093
|
+
)
|
|
1094
|
+
end
|
|
1095
|
+
attr_reader :commit_duration
|
|
1096
|
+
|
|
1097
|
+
sig do
|
|
1098
|
+
params(
|
|
1099
|
+
commit_duration:
|
|
1100
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::OrHash
|
|
1101
|
+
).void
|
|
1102
|
+
end
|
|
1103
|
+
attr_writer :commit_duration
|
|
1104
|
+
|
|
1105
|
+
# Will be passed down to the individual commits
|
|
1106
|
+
sig { returns(Float) }
|
|
1107
|
+
attr_accessor :priority
|
|
1108
|
+
|
|
1109
|
+
sig do
|
|
1110
|
+
returns(
|
|
1111
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Product
|
|
1112
|
+
)
|
|
1113
|
+
end
|
|
1114
|
+
attr_reader :product
|
|
1115
|
+
|
|
1116
|
+
sig do
|
|
1117
|
+
params(
|
|
1118
|
+
product:
|
|
1119
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Product::OrHash
|
|
1120
|
+
).void
|
|
1121
|
+
end
|
|
1122
|
+
attr_writer :product
|
|
1123
|
+
|
|
1124
|
+
# Whether the created commits will use the commit rate or list rate
|
|
1125
|
+
sig do
|
|
1126
|
+
returns(
|
|
1127
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RateType::TaggedSymbol
|
|
1128
|
+
)
|
|
1129
|
+
end
|
|
1130
|
+
attr_accessor :rate_type
|
|
1131
|
+
|
|
1132
|
+
# Determines the start time for the first commit
|
|
1133
|
+
sig { returns(Time) }
|
|
1134
|
+
attr_accessor :starting_at
|
|
1135
|
+
|
|
1136
|
+
# Will be passed down to the individual commits
|
|
1137
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
1138
|
+
attr_reader :applicable_product_ids
|
|
1139
|
+
|
|
1140
|
+
sig { params(applicable_product_ids: T::Array[String]).void }
|
|
1141
|
+
attr_writer :applicable_product_ids
|
|
1142
|
+
|
|
1143
|
+
# Will be passed down to the individual commits
|
|
1144
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
1145
|
+
attr_reader :applicable_product_tags
|
|
1146
|
+
|
|
1147
|
+
sig { params(applicable_product_tags: T::Array[String]).void }
|
|
1148
|
+
attr_writer :applicable_product_tags
|
|
1149
|
+
|
|
1150
|
+
sig do
|
|
1151
|
+
returns(
|
|
1152
|
+
T.nilable(
|
|
1153
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Contract
|
|
1154
|
+
)
|
|
1155
|
+
)
|
|
1156
|
+
end
|
|
1157
|
+
attr_reader :contract
|
|
1158
|
+
|
|
1159
|
+
sig do
|
|
1160
|
+
params(
|
|
1161
|
+
contract:
|
|
1162
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Contract::OrHash
|
|
1163
|
+
).void
|
|
1164
|
+
end
|
|
1165
|
+
attr_writer :contract
|
|
1166
|
+
|
|
1167
|
+
# Will be passed down to the individual commits
|
|
1168
|
+
sig { returns(T.nilable(String)) }
|
|
1169
|
+
attr_reader :description
|
|
1170
|
+
|
|
1171
|
+
sig { params(description: String).void }
|
|
1172
|
+
attr_writer :description
|
|
1173
|
+
|
|
1174
|
+
# Determines when the contract will stop creating recurring commits. Optional
|
|
1175
|
+
sig { returns(T.nilable(Time)) }
|
|
1176
|
+
attr_reader :ending_before
|
|
1177
|
+
|
|
1178
|
+
sig { params(ending_before: Time).void }
|
|
1179
|
+
attr_writer :ending_before
|
|
1180
|
+
|
|
1181
|
+
# Optional configuration for recurring commit/credit hierarchy access control
|
|
1182
|
+
sig do
|
|
1183
|
+
returns(T.nilable(MetronomeSDK::CommitHierarchyConfiguration))
|
|
1184
|
+
end
|
|
1185
|
+
attr_reader :hierarchy_configuration
|
|
1186
|
+
|
|
1187
|
+
sig do
|
|
1188
|
+
params(
|
|
1189
|
+
hierarchy_configuration:
|
|
1190
|
+
MetronomeSDK::CommitHierarchyConfiguration::OrHash
|
|
1191
|
+
).void
|
|
1192
|
+
end
|
|
1193
|
+
attr_writer :hierarchy_configuration
|
|
1194
|
+
|
|
1195
|
+
# The amount the customer should be billed for the commit. Not required.
|
|
1196
|
+
sig do
|
|
1197
|
+
returns(
|
|
1198
|
+
T.nilable(
|
|
1199
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::InvoiceAmount
|
|
1200
|
+
)
|
|
1201
|
+
)
|
|
1202
|
+
end
|
|
1203
|
+
attr_reader :invoice_amount
|
|
1204
|
+
|
|
1205
|
+
sig do
|
|
1206
|
+
params(
|
|
1207
|
+
invoice_amount:
|
|
1208
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::InvoiceAmount::OrHash
|
|
1209
|
+
).void
|
|
1210
|
+
end
|
|
1211
|
+
attr_writer :invoice_amount
|
|
1212
|
+
|
|
1213
|
+
# Displayed on invoices. Will be passed through to the individual commits
|
|
1214
|
+
sig { returns(T.nilable(String)) }
|
|
1215
|
+
attr_reader :name
|
|
1216
|
+
|
|
1217
|
+
sig { params(name: String).void }
|
|
1218
|
+
attr_writer :name
|
|
1219
|
+
|
|
1220
|
+
# Will be passed down to the individual commits
|
|
1221
|
+
sig { returns(T.nilable(String)) }
|
|
1222
|
+
attr_reader :netsuite_sales_order_id
|
|
1223
|
+
|
|
1224
|
+
sig { params(netsuite_sales_order_id: String).void }
|
|
1225
|
+
attr_writer :netsuite_sales_order_id
|
|
1226
|
+
|
|
1227
|
+
# Determines whether the first and last commit will be prorated. If not provided,
|
|
1228
|
+
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1229
|
+
sig do
|
|
1230
|
+
returns(
|
|
1231
|
+
T.nilable(
|
|
1232
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration::TaggedSymbol
|
|
1233
|
+
)
|
|
1234
|
+
)
|
|
1235
|
+
end
|
|
1236
|
+
attr_reader :proration
|
|
1237
|
+
|
|
1238
|
+
sig do
|
|
1239
|
+
params(
|
|
1240
|
+
proration:
|
|
1241
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration::OrSymbol
|
|
1242
|
+
).void
|
|
1243
|
+
end
|
|
1244
|
+
attr_writer :proration
|
|
1245
|
+
|
|
1246
|
+
# The frequency at which the recurring commits will be created. If not provided: -
|
|
1247
|
+
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
1248
|
+
# period defined in the duration will correspond to this frequency. - Commits will
|
|
1249
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
|
1250
|
+
# invoice dates.
|
|
1251
|
+
sig do
|
|
1252
|
+
returns(
|
|
1253
|
+
T.nilable(
|
|
1254
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency::TaggedSymbol
|
|
1255
|
+
)
|
|
1256
|
+
)
|
|
1257
|
+
end
|
|
1258
|
+
attr_reader :recurrence_frequency
|
|
1259
|
+
|
|
1260
|
+
sig do
|
|
1261
|
+
params(
|
|
1262
|
+
recurrence_frequency:
|
|
1263
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency::OrSymbol
|
|
1264
|
+
).void
|
|
1265
|
+
end
|
|
1266
|
+
attr_writer :recurrence_frequency
|
|
1267
|
+
|
|
1268
|
+
# Will be passed down to the individual commits. This controls how much of an
|
|
1269
|
+
# individual unexpired commit will roll over upon contract transition. Must be
|
|
1270
|
+
# between 0 and 1.
|
|
1271
|
+
sig { returns(T.nilable(Float)) }
|
|
1272
|
+
attr_reader :rollover_fraction
|
|
1273
|
+
|
|
1274
|
+
sig { params(rollover_fraction: Float).void }
|
|
1275
|
+
attr_writer :rollover_fraction
|
|
1276
|
+
|
|
1277
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
|
1278
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1279
|
+
# specifiers to contribute to a commit's or credit's drawdown.
|
|
1280
|
+
sig do
|
|
1281
|
+
returns(T.nilable(T::Array[MetronomeSDK::CommitSpecifier]))
|
|
1282
|
+
end
|
|
1283
|
+
attr_reader :specifiers
|
|
1284
|
+
|
|
1285
|
+
sig do
|
|
1286
|
+
params(
|
|
1287
|
+
specifiers: T::Array[MetronomeSDK::CommitSpecifier::OrHash]
|
|
1288
|
+
).void
|
|
1289
|
+
end
|
|
1290
|
+
attr_writer :specifiers
|
|
1291
|
+
|
|
1292
|
+
# Attach a subscription to the recurring commit/credit.
|
|
1293
|
+
sig do
|
|
1294
|
+
returns(
|
|
1295
|
+
T.nilable(MetronomeSDK::RecurringCommitSubscriptionConfig)
|
|
1296
|
+
)
|
|
1297
|
+
end
|
|
1298
|
+
attr_reader :subscription_config
|
|
1299
|
+
|
|
1300
|
+
sig do
|
|
1301
|
+
params(
|
|
1302
|
+
subscription_config:
|
|
1303
|
+
MetronomeSDK::RecurringCommitSubscriptionConfig::OrHash
|
|
1304
|
+
).void
|
|
1305
|
+
end
|
|
1306
|
+
attr_writer :subscription_config
|
|
1307
|
+
|
|
1308
|
+
sig do
|
|
1309
|
+
params(
|
|
1310
|
+
id: String,
|
|
1311
|
+
access_amount:
|
|
1312
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::AccessAmount::OrHash,
|
|
1313
|
+
commit_duration:
|
|
1314
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::OrHash,
|
|
1315
|
+
priority: Float,
|
|
1316
|
+
product:
|
|
1317
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Product::OrHash,
|
|
1318
|
+
rate_type:
|
|
1319
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RateType::OrSymbol,
|
|
1320
|
+
starting_at: Time,
|
|
1321
|
+
applicable_product_ids: T::Array[String],
|
|
1322
|
+
applicable_product_tags: T::Array[String],
|
|
1323
|
+
contract:
|
|
1324
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Contract::OrHash,
|
|
1325
|
+
description: String,
|
|
1326
|
+
ending_before: Time,
|
|
1327
|
+
hierarchy_configuration:
|
|
1328
|
+
MetronomeSDK::CommitHierarchyConfiguration::OrHash,
|
|
1329
|
+
invoice_amount:
|
|
1330
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::InvoiceAmount::OrHash,
|
|
1331
|
+
name: String,
|
|
1332
|
+
netsuite_sales_order_id: String,
|
|
1333
|
+
proration:
|
|
1334
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration::OrSymbol,
|
|
1335
|
+
recurrence_frequency:
|
|
1336
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency::OrSymbol,
|
|
1337
|
+
rollover_fraction: Float,
|
|
1338
|
+
specifiers: T::Array[MetronomeSDK::CommitSpecifier::OrHash],
|
|
1339
|
+
subscription_config:
|
|
1340
|
+
MetronomeSDK::RecurringCommitSubscriptionConfig::OrHash
|
|
1341
|
+
).returns(T.attached_class)
|
|
1342
|
+
end
|
|
1343
|
+
def self.new(
|
|
1344
|
+
id:,
|
|
1345
|
+
# The amount of commit to grant.
|
|
1346
|
+
access_amount:,
|
|
1347
|
+
# The amount of time the created commits will be valid for
|
|
1348
|
+
commit_duration:,
|
|
1349
|
+
# Will be passed down to the individual commits
|
|
1350
|
+
priority:,
|
|
1351
|
+
product:,
|
|
1352
|
+
# Whether the created commits will use the commit rate or list rate
|
|
1353
|
+
rate_type:,
|
|
1354
|
+
# Determines the start time for the first commit
|
|
1355
|
+
starting_at:,
|
|
1356
|
+
# Will be passed down to the individual commits
|
|
1357
|
+
applicable_product_ids: nil,
|
|
1358
|
+
# Will be passed down to the individual commits
|
|
1359
|
+
applicable_product_tags: nil,
|
|
1360
|
+
contract: nil,
|
|
1361
|
+
# Will be passed down to the individual commits
|
|
1362
|
+
description: nil,
|
|
1363
|
+
# Determines when the contract will stop creating recurring commits. Optional
|
|
1364
|
+
ending_before: nil,
|
|
1365
|
+
# Optional configuration for recurring commit/credit hierarchy access control
|
|
1366
|
+
hierarchy_configuration: nil,
|
|
1367
|
+
# The amount the customer should be billed for the commit. Not required.
|
|
1368
|
+
invoice_amount: nil,
|
|
1369
|
+
# Displayed on invoices. Will be passed through to the individual commits
|
|
1370
|
+
name: nil,
|
|
1371
|
+
# Will be passed down to the individual commits
|
|
1372
|
+
netsuite_sales_order_id: nil,
|
|
1373
|
+
# Determines whether the first and last commit will be prorated. If not provided,
|
|
1374
|
+
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1375
|
+
proration: nil,
|
|
1376
|
+
# The frequency at which the recurring commits will be created. If not provided: -
|
|
1377
|
+
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
1378
|
+
# period defined in the duration will correspond to this frequency. - Commits will
|
|
1379
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
|
1380
|
+
# invoice dates.
|
|
1381
|
+
recurrence_frequency: nil,
|
|
1382
|
+
# Will be passed down to the individual commits. This controls how much of an
|
|
1383
|
+
# individual unexpired commit will roll over upon contract transition. Must be
|
|
1384
|
+
# between 0 and 1.
|
|
1385
|
+
rollover_fraction: nil,
|
|
1386
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
|
1387
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1388
|
+
# specifiers to contribute to a commit's or credit's drawdown.
|
|
1389
|
+
specifiers: nil,
|
|
1390
|
+
# Attach a subscription to the recurring commit/credit.
|
|
1391
|
+
subscription_config: nil
|
|
1392
|
+
)
|
|
1393
|
+
end
|
|
1394
|
+
|
|
1395
|
+
sig do
|
|
1396
|
+
override.returns(
|
|
1397
|
+
{
|
|
1398
|
+
id: String,
|
|
1399
|
+
access_amount:
|
|
1400
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::AccessAmount,
|
|
1401
|
+
commit_duration:
|
|
1402
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration,
|
|
1403
|
+
priority: Float,
|
|
1404
|
+
product:
|
|
1405
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Product,
|
|
1406
|
+
rate_type:
|
|
1407
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RateType::TaggedSymbol,
|
|
1408
|
+
starting_at: Time,
|
|
1409
|
+
applicable_product_ids: T::Array[String],
|
|
1410
|
+
applicable_product_tags: T::Array[String],
|
|
1411
|
+
contract:
|
|
1412
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Contract,
|
|
1413
|
+
description: String,
|
|
1414
|
+
ending_before: Time,
|
|
1415
|
+
hierarchy_configuration:
|
|
1416
|
+
MetronomeSDK::CommitHierarchyConfiguration,
|
|
1417
|
+
invoice_amount:
|
|
1418
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::InvoiceAmount,
|
|
1419
|
+
name: String,
|
|
1420
|
+
netsuite_sales_order_id: String,
|
|
1421
|
+
proration:
|
|
1422
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration::TaggedSymbol,
|
|
1423
|
+
recurrence_frequency:
|
|
1424
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency::TaggedSymbol,
|
|
1425
|
+
rollover_fraction: Float,
|
|
1426
|
+
specifiers: T::Array[MetronomeSDK::CommitSpecifier],
|
|
1427
|
+
subscription_config:
|
|
1428
|
+
MetronomeSDK::RecurringCommitSubscriptionConfig
|
|
1429
|
+
}
|
|
1430
|
+
)
|
|
1431
|
+
end
|
|
1432
|
+
def to_hash
|
|
1433
|
+
end
|
|
1434
|
+
|
|
1435
|
+
class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
|
|
1436
|
+
OrHash =
|
|
1437
|
+
T.type_alias do
|
|
1438
|
+
T.any(
|
|
1439
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::AccessAmount,
|
|
1440
|
+
MetronomeSDK::Internal::AnyHash
|
|
1441
|
+
)
|
|
1442
|
+
end
|
|
1443
|
+
|
|
1444
|
+
sig { returns(String) }
|
|
1445
|
+
attr_accessor :credit_type_id
|
|
1446
|
+
|
|
1447
|
+
sig { returns(Float) }
|
|
1448
|
+
attr_accessor :unit_price
|
|
1449
|
+
|
|
1450
|
+
sig { returns(T.nilable(Float)) }
|
|
1451
|
+
attr_reader :quantity
|
|
1452
|
+
|
|
1453
|
+
sig { params(quantity: Float).void }
|
|
1454
|
+
attr_writer :quantity
|
|
1455
|
+
|
|
1456
|
+
# The amount of commit to grant.
|
|
1457
|
+
sig do
|
|
1458
|
+
params(
|
|
1459
|
+
credit_type_id: String,
|
|
1460
|
+
unit_price: Float,
|
|
1461
|
+
quantity: Float
|
|
1462
|
+
).returns(T.attached_class)
|
|
1463
|
+
end
|
|
1464
|
+
def self.new(credit_type_id:, unit_price:, quantity: nil)
|
|
1465
|
+
end
|
|
1466
|
+
|
|
1467
|
+
sig do
|
|
1468
|
+
override.returns(
|
|
1469
|
+
{
|
|
1470
|
+
credit_type_id: String,
|
|
1471
|
+
unit_price: Float,
|
|
1472
|
+
quantity: Float
|
|
1473
|
+
}
|
|
1474
|
+
)
|
|
1475
|
+
end
|
|
1476
|
+
def to_hash
|
|
1477
|
+
end
|
|
1478
|
+
end
|
|
1479
|
+
|
|
1480
|
+
class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
|
|
1481
|
+
OrHash =
|
|
1482
|
+
T.type_alias do
|
|
1483
|
+
T.any(
|
|
1484
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration,
|
|
1485
|
+
MetronomeSDK::Internal::AnyHash
|
|
1486
|
+
)
|
|
1487
|
+
end
|
|
1488
|
+
|
|
1489
|
+
sig { returns(Float) }
|
|
1490
|
+
attr_accessor :value
|
|
1491
|
+
|
|
1492
|
+
sig do
|
|
1493
|
+
returns(
|
|
1494
|
+
T.nilable(
|
|
1495
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::Unit::TaggedSymbol
|
|
1496
|
+
)
|
|
1497
|
+
)
|
|
1498
|
+
end
|
|
1499
|
+
attr_reader :unit
|
|
1500
|
+
|
|
1501
|
+
sig do
|
|
1502
|
+
params(
|
|
1503
|
+
unit:
|
|
1504
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::Unit::OrSymbol
|
|
1505
|
+
).void
|
|
1506
|
+
end
|
|
1507
|
+
attr_writer :unit
|
|
1508
|
+
|
|
1509
|
+
# The amount of time the created commits will be valid for
|
|
1510
|
+
sig do
|
|
1511
|
+
params(
|
|
1512
|
+
value: Float,
|
|
1513
|
+
unit:
|
|
1514
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::Unit::OrSymbol
|
|
1515
|
+
).returns(T.attached_class)
|
|
1516
|
+
end
|
|
1517
|
+
def self.new(value:, unit: nil)
|
|
1518
|
+
end
|
|
1519
|
+
|
|
1520
|
+
sig do
|
|
1521
|
+
override.returns(
|
|
1522
|
+
{
|
|
1523
|
+
value: Float,
|
|
1524
|
+
unit:
|
|
1525
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::Unit::TaggedSymbol
|
|
1526
|
+
}
|
|
1527
|
+
)
|
|
1528
|
+
end
|
|
1529
|
+
def to_hash
|
|
1530
|
+
end
|
|
1531
|
+
|
|
1532
|
+
module Unit
|
|
1533
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1534
|
+
|
|
1535
|
+
TaggedSymbol =
|
|
1536
|
+
T.type_alias do
|
|
1537
|
+
T.all(
|
|
1538
|
+
Symbol,
|
|
1539
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::Unit
|
|
1540
|
+
)
|
|
1541
|
+
end
|
|
1542
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1543
|
+
|
|
1544
|
+
PERIODS =
|
|
1545
|
+
T.let(
|
|
1546
|
+
:PERIODS,
|
|
1547
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::Unit::TaggedSymbol
|
|
1548
|
+
)
|
|
1549
|
+
|
|
1550
|
+
sig do
|
|
1551
|
+
override.returns(
|
|
1552
|
+
T::Array[
|
|
1553
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::Unit::TaggedSymbol
|
|
1554
|
+
]
|
|
1555
|
+
)
|
|
1556
|
+
end
|
|
1557
|
+
def self.values
|
|
1558
|
+
end
|
|
1559
|
+
end
|
|
1560
|
+
end
|
|
1561
|
+
|
|
1562
|
+
class Product < MetronomeSDK::Internal::Type::BaseModel
|
|
1563
|
+
OrHash =
|
|
1564
|
+
T.type_alias do
|
|
1565
|
+
T.any(
|
|
1566
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Product,
|
|
1567
|
+
MetronomeSDK::Internal::AnyHash
|
|
1568
|
+
)
|
|
1569
|
+
end
|
|
1570
|
+
|
|
1571
|
+
sig { returns(String) }
|
|
1572
|
+
attr_accessor :id
|
|
1573
|
+
|
|
1574
|
+
sig { returns(String) }
|
|
1575
|
+
attr_accessor :name
|
|
1576
|
+
|
|
1577
|
+
sig do
|
|
1578
|
+
params(id: String, name: String).returns(T.attached_class)
|
|
1579
|
+
end
|
|
1580
|
+
def self.new(id:, name:)
|
|
1581
|
+
end
|
|
1582
|
+
|
|
1583
|
+
sig { override.returns({ id: String, name: String }) }
|
|
1584
|
+
def to_hash
|
|
1585
|
+
end
|
|
1586
|
+
end
|
|
1587
|
+
|
|
1588
|
+
# Whether the created commits will use the commit rate or list rate
|
|
1589
|
+
module RateType
|
|
1590
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1591
|
+
|
|
1592
|
+
TaggedSymbol =
|
|
1593
|
+
T.type_alias do
|
|
1594
|
+
T.all(
|
|
1595
|
+
Symbol,
|
|
1596
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RateType
|
|
1597
|
+
)
|
|
1598
|
+
end
|
|
1599
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1600
|
+
|
|
1601
|
+
COMMIT_RATE =
|
|
1602
|
+
T.let(
|
|
1603
|
+
:COMMIT_RATE,
|
|
1604
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RateType::TaggedSymbol
|
|
1605
|
+
)
|
|
1606
|
+
LIST_RATE =
|
|
1607
|
+
T.let(
|
|
1608
|
+
:LIST_RATE,
|
|
1609
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RateType::TaggedSymbol
|
|
1610
|
+
)
|
|
1611
|
+
|
|
1612
|
+
sig do
|
|
1613
|
+
override.returns(
|
|
1614
|
+
T::Array[
|
|
1615
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RateType::TaggedSymbol
|
|
1616
|
+
]
|
|
1617
|
+
)
|
|
1618
|
+
end
|
|
1619
|
+
def self.values
|
|
1620
|
+
end
|
|
1621
|
+
end
|
|
1622
|
+
|
|
1623
|
+
class Contract < MetronomeSDK::Internal::Type::BaseModel
|
|
1624
|
+
OrHash =
|
|
1625
|
+
T.type_alias do
|
|
1626
|
+
T.any(
|
|
1627
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Contract,
|
|
1628
|
+
MetronomeSDK::Internal::AnyHash
|
|
1629
|
+
)
|
|
1630
|
+
end
|
|
1631
|
+
|
|
1632
|
+
sig { returns(String) }
|
|
1633
|
+
attr_accessor :id
|
|
1634
|
+
|
|
1635
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
1636
|
+
def self.new(id:)
|
|
1637
|
+
end
|
|
1638
|
+
|
|
1639
|
+
sig { override.returns({ id: String }) }
|
|
1640
|
+
def to_hash
|
|
1641
|
+
end
|
|
1642
|
+
end
|
|
1643
|
+
|
|
1644
|
+
class InvoiceAmount < MetronomeSDK::Internal::Type::BaseModel
|
|
1645
|
+
OrHash =
|
|
1646
|
+
T.type_alias do
|
|
1647
|
+
T.any(
|
|
1648
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::InvoiceAmount,
|
|
1649
|
+
MetronomeSDK::Internal::AnyHash
|
|
1650
|
+
)
|
|
1651
|
+
end
|
|
1652
|
+
|
|
1653
|
+
sig { returns(String) }
|
|
1654
|
+
attr_accessor :credit_type_id
|
|
1655
|
+
|
|
1656
|
+
sig { returns(Float) }
|
|
1657
|
+
attr_accessor :quantity
|
|
1658
|
+
|
|
1659
|
+
sig { returns(Float) }
|
|
1660
|
+
attr_accessor :unit_price
|
|
1661
|
+
|
|
1662
|
+
# The amount the customer should be billed for the commit. Not required.
|
|
1663
|
+
sig do
|
|
1664
|
+
params(
|
|
1665
|
+
credit_type_id: String,
|
|
1666
|
+
quantity: Float,
|
|
1667
|
+
unit_price: Float
|
|
1668
|
+
).returns(T.attached_class)
|
|
1669
|
+
end
|
|
1670
|
+
def self.new(credit_type_id:, quantity:, unit_price:)
|
|
1671
|
+
end
|
|
1672
|
+
|
|
1673
|
+
sig do
|
|
1674
|
+
override.returns(
|
|
1675
|
+
{
|
|
1676
|
+
credit_type_id: String,
|
|
1677
|
+
quantity: Float,
|
|
1678
|
+
unit_price: Float
|
|
1679
|
+
}
|
|
1680
|
+
)
|
|
1681
|
+
end
|
|
1682
|
+
def to_hash
|
|
1683
|
+
end
|
|
1684
|
+
end
|
|
1685
|
+
|
|
1686
|
+
# Determines whether the first and last commit will be prorated. If not provided,
|
|
1687
|
+
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1688
|
+
module Proration
|
|
1689
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1690
|
+
|
|
1691
|
+
TaggedSymbol =
|
|
1692
|
+
T.type_alias do
|
|
1693
|
+
T.all(
|
|
1694
|
+
Symbol,
|
|
1695
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration
|
|
1696
|
+
)
|
|
1697
|
+
end
|
|
1698
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1699
|
+
|
|
1700
|
+
NONE =
|
|
1701
|
+
T.let(
|
|
1702
|
+
:NONE,
|
|
1703
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration::TaggedSymbol
|
|
1704
|
+
)
|
|
1705
|
+
FIRST =
|
|
1706
|
+
T.let(
|
|
1707
|
+
:FIRST,
|
|
1708
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration::TaggedSymbol
|
|
1709
|
+
)
|
|
1710
|
+
LAST =
|
|
1711
|
+
T.let(
|
|
1712
|
+
:LAST,
|
|
1713
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration::TaggedSymbol
|
|
1714
|
+
)
|
|
1715
|
+
FIRST_AND_LAST =
|
|
1716
|
+
T.let(
|
|
1717
|
+
:FIRST_AND_LAST,
|
|
1718
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration::TaggedSymbol
|
|
1719
|
+
)
|
|
1720
|
+
|
|
1721
|
+
sig do
|
|
1722
|
+
override.returns(
|
|
1723
|
+
T::Array[
|
|
1724
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration::TaggedSymbol
|
|
1725
|
+
]
|
|
1726
|
+
)
|
|
1727
|
+
end
|
|
1728
|
+
def self.values
|
|
1729
|
+
end
|
|
1730
|
+
end
|
|
1731
|
+
|
|
1732
|
+
# The frequency at which the recurring commits will be created. If not provided: -
|
|
1733
|
+
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
1734
|
+
# period defined in the duration will correspond to this frequency. - Commits will
|
|
1735
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
|
1736
|
+
# invoice dates.
|
|
1737
|
+
module RecurrenceFrequency
|
|
1738
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1739
|
+
|
|
1740
|
+
TaggedSymbol =
|
|
1741
|
+
T.type_alias do
|
|
1742
|
+
T.all(
|
|
1743
|
+
Symbol,
|
|
1744
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency
|
|
1745
|
+
)
|
|
1746
|
+
end
|
|
1747
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1748
|
+
|
|
1749
|
+
MONTHLY =
|
|
1750
|
+
T.let(
|
|
1751
|
+
:MONTHLY,
|
|
1752
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency::TaggedSymbol
|
|
1753
|
+
)
|
|
1754
|
+
QUARTERLY =
|
|
1755
|
+
T.let(
|
|
1756
|
+
:QUARTERLY,
|
|
1757
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency::TaggedSymbol
|
|
1758
|
+
)
|
|
1759
|
+
ANNUAL =
|
|
1760
|
+
T.let(
|
|
1761
|
+
:ANNUAL,
|
|
1762
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency::TaggedSymbol
|
|
1763
|
+
)
|
|
1764
|
+
WEEKLY =
|
|
1765
|
+
T.let(
|
|
1766
|
+
:WEEKLY,
|
|
1767
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency::TaggedSymbol
|
|
1768
|
+
)
|
|
1769
|
+
|
|
1770
|
+
sig do
|
|
1771
|
+
override.returns(
|
|
1772
|
+
T::Array[
|
|
1773
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency::TaggedSymbol
|
|
1774
|
+
]
|
|
1775
|
+
)
|
|
1776
|
+
end
|
|
1777
|
+
def self.values
|
|
1778
|
+
end
|
|
1779
|
+
end
|
|
1780
|
+
end
|
|
1781
|
+
|
|
1782
|
+
class RecurringCredit < MetronomeSDK::Internal::Type::BaseModel
|
|
1783
|
+
OrHash =
|
|
1784
|
+
T.type_alias do
|
|
1785
|
+
T.any(
|
|
1786
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit,
|
|
1787
|
+
MetronomeSDK::Internal::AnyHash
|
|
1788
|
+
)
|
|
1789
|
+
end
|
|
1790
|
+
|
|
1791
|
+
sig { returns(String) }
|
|
1792
|
+
attr_accessor :id
|
|
1793
|
+
|
|
1794
|
+
# The amount of commit to grant.
|
|
1795
|
+
sig do
|
|
1796
|
+
returns(
|
|
1797
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::AccessAmount
|
|
1798
|
+
)
|
|
1799
|
+
end
|
|
1800
|
+
attr_reader :access_amount
|
|
1801
|
+
|
|
1802
|
+
sig do
|
|
1803
|
+
params(
|
|
1804
|
+
access_amount:
|
|
1805
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::AccessAmount::OrHash
|
|
1806
|
+
).void
|
|
1807
|
+
end
|
|
1808
|
+
attr_writer :access_amount
|
|
1809
|
+
|
|
1810
|
+
# The amount of time the created commits will be valid for
|
|
1811
|
+
sig do
|
|
1812
|
+
returns(
|
|
1813
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration
|
|
1814
|
+
)
|
|
1815
|
+
end
|
|
1816
|
+
attr_reader :commit_duration
|
|
1817
|
+
|
|
1818
|
+
sig do
|
|
1819
|
+
params(
|
|
1820
|
+
commit_duration:
|
|
1821
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::OrHash
|
|
1822
|
+
).void
|
|
1823
|
+
end
|
|
1824
|
+
attr_writer :commit_duration
|
|
1825
|
+
|
|
1826
|
+
# Will be passed down to the individual commits
|
|
1827
|
+
sig { returns(Float) }
|
|
1828
|
+
attr_accessor :priority
|
|
1829
|
+
|
|
1830
|
+
sig do
|
|
1831
|
+
returns(
|
|
1832
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Product
|
|
1833
|
+
)
|
|
1834
|
+
end
|
|
1835
|
+
attr_reader :product
|
|
1836
|
+
|
|
1837
|
+
sig do
|
|
1838
|
+
params(
|
|
1839
|
+
product:
|
|
1840
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Product::OrHash
|
|
1841
|
+
).void
|
|
1842
|
+
end
|
|
1843
|
+
attr_writer :product
|
|
1844
|
+
|
|
1845
|
+
# Whether the created commits will use the commit rate or list rate
|
|
1846
|
+
sig do
|
|
1847
|
+
returns(
|
|
1848
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RateType::TaggedSymbol
|
|
1849
|
+
)
|
|
1850
|
+
end
|
|
1851
|
+
attr_accessor :rate_type
|
|
1852
|
+
|
|
1853
|
+
# Determines the start time for the first commit
|
|
1854
|
+
sig { returns(Time) }
|
|
1855
|
+
attr_accessor :starting_at
|
|
1856
|
+
|
|
1857
|
+
# Will be passed down to the individual commits
|
|
1858
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
1859
|
+
attr_reader :applicable_product_ids
|
|
1860
|
+
|
|
1861
|
+
sig { params(applicable_product_ids: T::Array[String]).void }
|
|
1862
|
+
attr_writer :applicable_product_ids
|
|
1863
|
+
|
|
1864
|
+
# Will be passed down to the individual commits
|
|
1865
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
1866
|
+
attr_reader :applicable_product_tags
|
|
1867
|
+
|
|
1868
|
+
sig { params(applicable_product_tags: T::Array[String]).void }
|
|
1869
|
+
attr_writer :applicable_product_tags
|
|
1870
|
+
|
|
1871
|
+
sig do
|
|
1872
|
+
returns(
|
|
1873
|
+
T.nilable(
|
|
1874
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Contract
|
|
1875
|
+
)
|
|
1876
|
+
)
|
|
1877
|
+
end
|
|
1878
|
+
attr_reader :contract
|
|
1879
|
+
|
|
1880
|
+
sig do
|
|
1881
|
+
params(
|
|
1882
|
+
contract:
|
|
1883
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Contract::OrHash
|
|
1884
|
+
).void
|
|
1885
|
+
end
|
|
1886
|
+
attr_writer :contract
|
|
1887
|
+
|
|
1888
|
+
# Will be passed down to the individual commits
|
|
1889
|
+
sig { returns(T.nilable(String)) }
|
|
1890
|
+
attr_reader :description
|
|
1891
|
+
|
|
1892
|
+
sig { params(description: String).void }
|
|
1893
|
+
attr_writer :description
|
|
1894
|
+
|
|
1895
|
+
# Determines when the contract will stop creating recurring commits. Optional
|
|
1896
|
+
sig { returns(T.nilable(Time)) }
|
|
1897
|
+
attr_reader :ending_before
|
|
1898
|
+
|
|
1899
|
+
sig { params(ending_before: Time).void }
|
|
1900
|
+
attr_writer :ending_before
|
|
1901
|
+
|
|
1902
|
+
# Optional configuration for recurring commit/credit hierarchy access control
|
|
1903
|
+
sig do
|
|
1904
|
+
returns(T.nilable(MetronomeSDK::CommitHierarchyConfiguration))
|
|
1905
|
+
end
|
|
1906
|
+
attr_reader :hierarchy_configuration
|
|
1907
|
+
|
|
1908
|
+
sig do
|
|
1909
|
+
params(
|
|
1910
|
+
hierarchy_configuration:
|
|
1911
|
+
MetronomeSDK::CommitHierarchyConfiguration::OrHash
|
|
1912
|
+
).void
|
|
1913
|
+
end
|
|
1914
|
+
attr_writer :hierarchy_configuration
|
|
1915
|
+
|
|
1916
|
+
# Displayed on invoices. Will be passed through to the individual commits
|
|
1917
|
+
sig { returns(T.nilable(String)) }
|
|
1918
|
+
attr_reader :name
|
|
1919
|
+
|
|
1920
|
+
sig { params(name: String).void }
|
|
1921
|
+
attr_writer :name
|
|
1922
|
+
|
|
1923
|
+
# Will be passed down to the individual commits
|
|
1924
|
+
sig { returns(T.nilable(String)) }
|
|
1925
|
+
attr_reader :netsuite_sales_order_id
|
|
1926
|
+
|
|
1927
|
+
sig { params(netsuite_sales_order_id: String).void }
|
|
1928
|
+
attr_writer :netsuite_sales_order_id
|
|
1929
|
+
|
|
1930
|
+
# Determines whether the first and last commit will be prorated. If not provided,
|
|
1931
|
+
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1932
|
+
sig do
|
|
1933
|
+
returns(
|
|
1934
|
+
T.nilable(
|
|
1935
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration::TaggedSymbol
|
|
1936
|
+
)
|
|
1937
|
+
)
|
|
1938
|
+
end
|
|
1939
|
+
attr_reader :proration
|
|
1940
|
+
|
|
1941
|
+
sig do
|
|
1942
|
+
params(
|
|
1943
|
+
proration:
|
|
1944
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration::OrSymbol
|
|
1945
|
+
).void
|
|
1946
|
+
end
|
|
1947
|
+
attr_writer :proration
|
|
1948
|
+
|
|
1949
|
+
# The frequency at which the recurring commits will be created. If not provided: -
|
|
1950
|
+
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
1951
|
+
# period defined in the duration will correspond to this frequency. - Commits will
|
|
1952
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
|
1953
|
+
# invoice dates.
|
|
1954
|
+
sig do
|
|
1955
|
+
returns(
|
|
1956
|
+
T.nilable(
|
|
1957
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency::TaggedSymbol
|
|
1958
|
+
)
|
|
1959
|
+
)
|
|
1960
|
+
end
|
|
1961
|
+
attr_reader :recurrence_frequency
|
|
1962
|
+
|
|
1963
|
+
sig do
|
|
1964
|
+
params(
|
|
1965
|
+
recurrence_frequency:
|
|
1966
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency::OrSymbol
|
|
1967
|
+
).void
|
|
1968
|
+
end
|
|
1969
|
+
attr_writer :recurrence_frequency
|
|
1970
|
+
|
|
1971
|
+
# Will be passed down to the individual commits. This controls how much of an
|
|
1972
|
+
# individual unexpired commit will roll over upon contract transition. Must be
|
|
1973
|
+
# between 0 and 1.
|
|
1974
|
+
sig { returns(T.nilable(Float)) }
|
|
1975
|
+
attr_reader :rollover_fraction
|
|
1976
|
+
|
|
1977
|
+
sig { params(rollover_fraction: Float).void }
|
|
1978
|
+
attr_writer :rollover_fraction
|
|
1979
|
+
|
|
1980
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
|
1981
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1982
|
+
# specifiers to contribute to a commit's or credit's drawdown.
|
|
1983
|
+
sig do
|
|
1984
|
+
returns(T.nilable(T::Array[MetronomeSDK::CommitSpecifier]))
|
|
1985
|
+
end
|
|
1986
|
+
attr_reader :specifiers
|
|
1987
|
+
|
|
1988
|
+
sig do
|
|
1989
|
+
params(
|
|
1990
|
+
specifiers: T::Array[MetronomeSDK::CommitSpecifier::OrHash]
|
|
1991
|
+
).void
|
|
1992
|
+
end
|
|
1993
|
+
attr_writer :specifiers
|
|
1994
|
+
|
|
1995
|
+
# Attach a subscription to the recurring commit/credit.
|
|
1996
|
+
sig do
|
|
1997
|
+
returns(
|
|
1998
|
+
T.nilable(MetronomeSDK::RecurringCommitSubscriptionConfig)
|
|
1999
|
+
)
|
|
2000
|
+
end
|
|
2001
|
+
attr_reader :subscription_config
|
|
2002
|
+
|
|
2003
|
+
sig do
|
|
2004
|
+
params(
|
|
2005
|
+
subscription_config:
|
|
2006
|
+
MetronomeSDK::RecurringCommitSubscriptionConfig::OrHash
|
|
2007
|
+
).void
|
|
2008
|
+
end
|
|
2009
|
+
attr_writer :subscription_config
|
|
2010
|
+
|
|
2011
|
+
sig do
|
|
2012
|
+
params(
|
|
2013
|
+
id: String,
|
|
2014
|
+
access_amount:
|
|
2015
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::AccessAmount::OrHash,
|
|
2016
|
+
commit_duration:
|
|
2017
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::OrHash,
|
|
2018
|
+
priority: Float,
|
|
2019
|
+
product:
|
|
2020
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Product::OrHash,
|
|
2021
|
+
rate_type:
|
|
2022
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RateType::OrSymbol,
|
|
2023
|
+
starting_at: Time,
|
|
2024
|
+
applicable_product_ids: T::Array[String],
|
|
2025
|
+
applicable_product_tags: T::Array[String],
|
|
2026
|
+
contract:
|
|
2027
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Contract::OrHash,
|
|
2028
|
+
description: String,
|
|
2029
|
+
ending_before: Time,
|
|
2030
|
+
hierarchy_configuration:
|
|
2031
|
+
MetronomeSDK::CommitHierarchyConfiguration::OrHash,
|
|
2032
|
+
name: String,
|
|
2033
|
+
netsuite_sales_order_id: String,
|
|
2034
|
+
proration:
|
|
2035
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration::OrSymbol,
|
|
2036
|
+
recurrence_frequency:
|
|
2037
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency::OrSymbol,
|
|
2038
|
+
rollover_fraction: Float,
|
|
2039
|
+
specifiers: T::Array[MetronomeSDK::CommitSpecifier::OrHash],
|
|
2040
|
+
subscription_config:
|
|
2041
|
+
MetronomeSDK::RecurringCommitSubscriptionConfig::OrHash
|
|
2042
|
+
).returns(T.attached_class)
|
|
2043
|
+
end
|
|
2044
|
+
def self.new(
|
|
2045
|
+
id:,
|
|
2046
|
+
# The amount of commit to grant.
|
|
2047
|
+
access_amount:,
|
|
2048
|
+
# The amount of time the created commits will be valid for
|
|
2049
|
+
commit_duration:,
|
|
2050
|
+
# Will be passed down to the individual commits
|
|
2051
|
+
priority:,
|
|
2052
|
+
product:,
|
|
2053
|
+
# Whether the created commits will use the commit rate or list rate
|
|
2054
|
+
rate_type:,
|
|
2055
|
+
# Determines the start time for the first commit
|
|
2056
|
+
starting_at:,
|
|
2057
|
+
# Will be passed down to the individual commits
|
|
2058
|
+
applicable_product_ids: nil,
|
|
2059
|
+
# Will be passed down to the individual commits
|
|
2060
|
+
applicable_product_tags: nil,
|
|
2061
|
+
contract: nil,
|
|
2062
|
+
# Will be passed down to the individual commits
|
|
2063
|
+
description: nil,
|
|
2064
|
+
# Determines when the contract will stop creating recurring commits. Optional
|
|
2065
|
+
ending_before: nil,
|
|
2066
|
+
# Optional configuration for recurring commit/credit hierarchy access control
|
|
2067
|
+
hierarchy_configuration: nil,
|
|
2068
|
+
# Displayed on invoices. Will be passed through to the individual commits
|
|
2069
|
+
name: nil,
|
|
2070
|
+
# Will be passed down to the individual commits
|
|
2071
|
+
netsuite_sales_order_id: nil,
|
|
2072
|
+
# Determines whether the first and last commit will be prorated. If not provided,
|
|
2073
|
+
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
2074
|
+
proration: nil,
|
|
2075
|
+
# The frequency at which the recurring commits will be created. If not provided: -
|
|
2076
|
+
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
2077
|
+
# period defined in the duration will correspond to this frequency. - Commits will
|
|
2078
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
|
2079
|
+
# invoice dates.
|
|
2080
|
+
recurrence_frequency: nil,
|
|
2081
|
+
# Will be passed down to the individual commits. This controls how much of an
|
|
2082
|
+
# individual unexpired commit will roll over upon contract transition. Must be
|
|
2083
|
+
# between 0 and 1.
|
|
2084
|
+
rollover_fraction: nil,
|
|
2085
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
|
2086
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2087
|
+
# specifiers to contribute to a commit's or credit's drawdown.
|
|
2088
|
+
specifiers: nil,
|
|
2089
|
+
# Attach a subscription to the recurring commit/credit.
|
|
2090
|
+
subscription_config: nil
|
|
2091
|
+
)
|
|
2092
|
+
end
|
|
2093
|
+
|
|
2094
|
+
sig do
|
|
2095
|
+
override.returns(
|
|
2096
|
+
{
|
|
2097
|
+
id: String,
|
|
2098
|
+
access_amount:
|
|
2099
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::AccessAmount,
|
|
2100
|
+
commit_duration:
|
|
2101
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration,
|
|
2102
|
+
priority: Float,
|
|
2103
|
+
product:
|
|
2104
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Product,
|
|
2105
|
+
rate_type:
|
|
2106
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RateType::TaggedSymbol,
|
|
2107
|
+
starting_at: Time,
|
|
2108
|
+
applicable_product_ids: T::Array[String],
|
|
2109
|
+
applicable_product_tags: T::Array[String],
|
|
2110
|
+
contract:
|
|
2111
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Contract,
|
|
2112
|
+
description: String,
|
|
2113
|
+
ending_before: Time,
|
|
2114
|
+
hierarchy_configuration:
|
|
2115
|
+
MetronomeSDK::CommitHierarchyConfiguration,
|
|
2116
|
+
name: String,
|
|
2117
|
+
netsuite_sales_order_id: String,
|
|
2118
|
+
proration:
|
|
2119
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration::TaggedSymbol,
|
|
2120
|
+
recurrence_frequency:
|
|
2121
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency::TaggedSymbol,
|
|
2122
|
+
rollover_fraction: Float,
|
|
2123
|
+
specifiers: T::Array[MetronomeSDK::CommitSpecifier],
|
|
2124
|
+
subscription_config:
|
|
2125
|
+
MetronomeSDK::RecurringCommitSubscriptionConfig
|
|
2126
|
+
}
|
|
2127
|
+
)
|
|
2128
|
+
end
|
|
2129
|
+
def to_hash
|
|
2130
|
+
end
|
|
2131
|
+
|
|
2132
|
+
class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
|
|
2133
|
+
OrHash =
|
|
2134
|
+
T.type_alias do
|
|
2135
|
+
T.any(
|
|
2136
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::AccessAmount,
|
|
2137
|
+
MetronomeSDK::Internal::AnyHash
|
|
2138
|
+
)
|
|
2139
|
+
end
|
|
2140
|
+
|
|
2141
|
+
sig { returns(String) }
|
|
2142
|
+
attr_accessor :credit_type_id
|
|
2143
|
+
|
|
2144
|
+
sig { returns(Float) }
|
|
2145
|
+
attr_accessor :unit_price
|
|
2146
|
+
|
|
2147
|
+
sig { returns(T.nilable(Float)) }
|
|
2148
|
+
attr_reader :quantity
|
|
2149
|
+
|
|
2150
|
+
sig { params(quantity: Float).void }
|
|
2151
|
+
attr_writer :quantity
|
|
2152
|
+
|
|
2153
|
+
# The amount of commit to grant.
|
|
2154
|
+
sig do
|
|
2155
|
+
params(
|
|
2156
|
+
credit_type_id: String,
|
|
2157
|
+
unit_price: Float,
|
|
2158
|
+
quantity: Float
|
|
2159
|
+
).returns(T.attached_class)
|
|
2160
|
+
end
|
|
2161
|
+
def self.new(credit_type_id:, unit_price:, quantity: nil)
|
|
2162
|
+
end
|
|
2163
|
+
|
|
2164
|
+
sig do
|
|
2165
|
+
override.returns(
|
|
2166
|
+
{
|
|
2167
|
+
credit_type_id: String,
|
|
2168
|
+
unit_price: Float,
|
|
2169
|
+
quantity: Float
|
|
2170
|
+
}
|
|
2171
|
+
)
|
|
2172
|
+
end
|
|
2173
|
+
def to_hash
|
|
2174
|
+
end
|
|
2175
|
+
end
|
|
2176
|
+
|
|
2177
|
+
class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
|
|
2178
|
+
OrHash =
|
|
2179
|
+
T.type_alias do
|
|
2180
|
+
T.any(
|
|
2181
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration,
|
|
2182
|
+
MetronomeSDK::Internal::AnyHash
|
|
2183
|
+
)
|
|
2184
|
+
end
|
|
2185
|
+
|
|
2186
|
+
sig { returns(Float) }
|
|
2187
|
+
attr_accessor :value
|
|
2188
|
+
|
|
2189
|
+
sig do
|
|
2190
|
+
returns(
|
|
2191
|
+
T.nilable(
|
|
2192
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::Unit::TaggedSymbol
|
|
2193
|
+
)
|
|
2194
|
+
)
|
|
2195
|
+
end
|
|
2196
|
+
attr_reader :unit
|
|
2197
|
+
|
|
2198
|
+
sig do
|
|
2199
|
+
params(
|
|
2200
|
+
unit:
|
|
2201
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::Unit::OrSymbol
|
|
2202
|
+
).void
|
|
2203
|
+
end
|
|
2204
|
+
attr_writer :unit
|
|
2205
|
+
|
|
2206
|
+
# The amount of time the created commits will be valid for
|
|
2207
|
+
sig do
|
|
2208
|
+
params(
|
|
2209
|
+
value: Float,
|
|
2210
|
+
unit:
|
|
2211
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::Unit::OrSymbol
|
|
2212
|
+
).returns(T.attached_class)
|
|
2213
|
+
end
|
|
2214
|
+
def self.new(value:, unit: nil)
|
|
2215
|
+
end
|
|
2216
|
+
|
|
2217
|
+
sig do
|
|
2218
|
+
override.returns(
|
|
2219
|
+
{
|
|
2220
|
+
value: Float,
|
|
2221
|
+
unit:
|
|
2222
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::Unit::TaggedSymbol
|
|
2223
|
+
}
|
|
2224
|
+
)
|
|
2225
|
+
end
|
|
2226
|
+
def to_hash
|
|
2227
|
+
end
|
|
2228
|
+
|
|
2229
|
+
module Unit
|
|
2230
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2231
|
+
|
|
2232
|
+
TaggedSymbol =
|
|
2233
|
+
T.type_alias do
|
|
2234
|
+
T.all(
|
|
2235
|
+
Symbol,
|
|
2236
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::Unit
|
|
2237
|
+
)
|
|
2238
|
+
end
|
|
2239
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2240
|
+
|
|
2241
|
+
PERIODS =
|
|
2242
|
+
T.let(
|
|
2243
|
+
:PERIODS,
|
|
2244
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::Unit::TaggedSymbol
|
|
2245
|
+
)
|
|
2246
|
+
|
|
2247
|
+
sig do
|
|
2248
|
+
override.returns(
|
|
2249
|
+
T::Array[
|
|
2250
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::Unit::TaggedSymbol
|
|
2251
|
+
]
|
|
2252
|
+
)
|
|
2253
|
+
end
|
|
2254
|
+
def self.values
|
|
2255
|
+
end
|
|
2256
|
+
end
|
|
2257
|
+
end
|
|
2258
|
+
|
|
2259
|
+
class Product < MetronomeSDK::Internal::Type::BaseModel
|
|
2260
|
+
OrHash =
|
|
2261
|
+
T.type_alias do
|
|
2262
|
+
T.any(
|
|
2263
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Product,
|
|
2264
|
+
MetronomeSDK::Internal::AnyHash
|
|
2265
|
+
)
|
|
2266
|
+
end
|
|
2267
|
+
|
|
2268
|
+
sig { returns(String) }
|
|
2269
|
+
attr_accessor :id
|
|
2270
|
+
|
|
2271
|
+
sig { returns(String) }
|
|
2272
|
+
attr_accessor :name
|
|
2273
|
+
|
|
2274
|
+
sig do
|
|
2275
|
+
params(id: String, name: String).returns(T.attached_class)
|
|
2276
|
+
end
|
|
2277
|
+
def self.new(id:, name:)
|
|
2278
|
+
end
|
|
2279
|
+
|
|
2280
|
+
sig { override.returns({ id: String, name: String }) }
|
|
2281
|
+
def to_hash
|
|
2282
|
+
end
|
|
2283
|
+
end
|
|
2284
|
+
|
|
2285
|
+
# Whether the created commits will use the commit rate or list rate
|
|
2286
|
+
module RateType
|
|
2287
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2288
|
+
|
|
2289
|
+
TaggedSymbol =
|
|
2290
|
+
T.type_alias do
|
|
2291
|
+
T.all(
|
|
2292
|
+
Symbol,
|
|
2293
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RateType
|
|
2294
|
+
)
|
|
2295
|
+
end
|
|
2296
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2297
|
+
|
|
2298
|
+
COMMIT_RATE =
|
|
2299
|
+
T.let(
|
|
2300
|
+
:COMMIT_RATE,
|
|
2301
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RateType::TaggedSymbol
|
|
2302
|
+
)
|
|
2303
|
+
LIST_RATE =
|
|
2304
|
+
T.let(
|
|
2305
|
+
:LIST_RATE,
|
|
2306
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RateType::TaggedSymbol
|
|
2307
|
+
)
|
|
2308
|
+
|
|
2309
|
+
sig do
|
|
2310
|
+
override.returns(
|
|
2311
|
+
T::Array[
|
|
2312
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RateType::TaggedSymbol
|
|
2313
|
+
]
|
|
2314
|
+
)
|
|
2315
|
+
end
|
|
2316
|
+
def self.values
|
|
2317
|
+
end
|
|
2318
|
+
end
|
|
2319
|
+
|
|
2320
|
+
class Contract < MetronomeSDK::Internal::Type::BaseModel
|
|
2321
|
+
OrHash =
|
|
2322
|
+
T.type_alias do
|
|
2323
|
+
T.any(
|
|
2324
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Contract,
|
|
2325
|
+
MetronomeSDK::Internal::AnyHash
|
|
2326
|
+
)
|
|
2327
|
+
end
|
|
2328
|
+
|
|
2329
|
+
sig { returns(String) }
|
|
2330
|
+
attr_accessor :id
|
|
2331
|
+
|
|
2332
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
2333
|
+
def self.new(id:)
|
|
2334
|
+
end
|
|
2335
|
+
|
|
2336
|
+
sig { override.returns({ id: String }) }
|
|
2337
|
+
def to_hash
|
|
2338
|
+
end
|
|
2339
|
+
end
|
|
2340
|
+
|
|
2341
|
+
# Determines whether the first and last commit will be prorated. If not provided,
|
|
2342
|
+
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
2343
|
+
module Proration
|
|
2344
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2345
|
+
|
|
2346
|
+
TaggedSymbol =
|
|
2347
|
+
T.type_alias do
|
|
2348
|
+
T.all(
|
|
2349
|
+
Symbol,
|
|
2350
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration
|
|
2351
|
+
)
|
|
2352
|
+
end
|
|
2353
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2354
|
+
|
|
2355
|
+
NONE =
|
|
2356
|
+
T.let(
|
|
2357
|
+
:NONE,
|
|
2358
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration::TaggedSymbol
|
|
2359
|
+
)
|
|
2360
|
+
FIRST =
|
|
2361
|
+
T.let(
|
|
2362
|
+
:FIRST,
|
|
2363
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration::TaggedSymbol
|
|
2364
|
+
)
|
|
2365
|
+
LAST =
|
|
2366
|
+
T.let(
|
|
2367
|
+
:LAST,
|
|
2368
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration::TaggedSymbol
|
|
2369
|
+
)
|
|
2370
|
+
FIRST_AND_LAST =
|
|
2371
|
+
T.let(
|
|
2372
|
+
:FIRST_AND_LAST,
|
|
2373
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration::TaggedSymbol
|
|
2374
|
+
)
|
|
2375
|
+
|
|
2376
|
+
sig do
|
|
2377
|
+
override.returns(
|
|
2378
|
+
T::Array[
|
|
2379
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration::TaggedSymbol
|
|
2380
|
+
]
|
|
2381
|
+
)
|
|
2382
|
+
end
|
|
2383
|
+
def self.values
|
|
2384
|
+
end
|
|
2385
|
+
end
|
|
2386
|
+
|
|
2387
|
+
# The frequency at which the recurring commits will be created. If not provided: -
|
|
2388
|
+
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
2389
|
+
# period defined in the duration will correspond to this frequency. - Commits will
|
|
2390
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
|
2391
|
+
# invoice dates.
|
|
2392
|
+
module RecurrenceFrequency
|
|
2393
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2394
|
+
|
|
2395
|
+
TaggedSymbol =
|
|
2396
|
+
T.type_alias do
|
|
2397
|
+
T.all(
|
|
2398
|
+
Symbol,
|
|
2399
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency
|
|
2400
|
+
)
|
|
2401
|
+
end
|
|
2402
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2403
|
+
|
|
2404
|
+
MONTHLY =
|
|
2405
|
+
T.let(
|
|
2406
|
+
:MONTHLY,
|
|
2407
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency::TaggedSymbol
|
|
2408
|
+
)
|
|
2409
|
+
QUARTERLY =
|
|
2410
|
+
T.let(
|
|
2411
|
+
:QUARTERLY,
|
|
2412
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency::TaggedSymbol
|
|
2413
|
+
)
|
|
2414
|
+
ANNUAL =
|
|
2415
|
+
T.let(
|
|
2416
|
+
:ANNUAL,
|
|
2417
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency::TaggedSymbol
|
|
2418
|
+
)
|
|
2419
|
+
WEEKLY =
|
|
2420
|
+
T.let(
|
|
2421
|
+
:WEEKLY,
|
|
2422
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency::TaggedSymbol
|
|
2423
|
+
)
|
|
2424
|
+
|
|
2425
|
+
sig do
|
|
2426
|
+
override.returns(
|
|
2427
|
+
T::Array[
|
|
2428
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency::TaggedSymbol
|
|
2429
|
+
]
|
|
2430
|
+
)
|
|
2431
|
+
end
|
|
2432
|
+
def self.values
|
|
2433
|
+
end
|
|
2434
|
+
end
|
|
2435
|
+
end
|
|
2436
|
+
|
|
2437
|
+
# Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
2438
|
+
# usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
2439
|
+
# `ending_before` date for consolidation to occur. This field cannot be modified
|
|
2440
|
+
# after a Contract has been created. If this field is omitted, charges will appear
|
|
2441
|
+
# on a separate invoice from usage charges.
|
|
2442
|
+
module ScheduledChargesOnUsageInvoices
|
|
2443
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2444
|
+
|
|
2445
|
+
TaggedSymbol =
|
|
2446
|
+
T.type_alias do
|
|
2447
|
+
T.all(
|
|
2448
|
+
Symbol,
|
|
2449
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::ScheduledChargesOnUsageInvoices
|
|
2450
|
+
)
|
|
2451
|
+
end
|
|
2452
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2453
|
+
|
|
2454
|
+
ALL =
|
|
2455
|
+
T.let(
|
|
2456
|
+
:ALL,
|
|
2457
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::ScheduledChargesOnUsageInvoices::TaggedSymbol
|
|
2458
|
+
)
|
|
2459
|
+
|
|
2460
|
+
sig do
|
|
2461
|
+
override.returns(
|
|
2462
|
+
T::Array[
|
|
2463
|
+
MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::ScheduledChargesOnUsageInvoices::TaggedSymbol
|
|
2464
|
+
]
|
|
2465
|
+
)
|
|
2466
|
+
end
|
|
2467
|
+
def self.values
|
|
2468
|
+
end
|
|
2469
|
+
end
|
|
2470
|
+
end
|
|
2471
|
+
end
|
|
28
2472
|
end
|
|
29
2473
|
end
|
|
30
2474
|
end
|