metronome-sdk 3.6.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 +16 -0
- data/README.md +1 -1
- 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 +168 -2
- 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/contract_amend_params.rb +29 -1
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +146 -2
- data/lib/metronome_sdk/models/v1/contract_create_response.rb +1134 -3
- data/lib/metronome_sdk/models/v1/package_create_params.rb +115 -1
- 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 +145 -3
- data/lib/metronome_sdk/resources/v1/contracts.rb +3 -1
- data/lib/metronome_sdk/resources/v1/packages.rb +6 -5
- 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 +0 -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 +409 -0
- 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/contract_amend_params.rbi +54 -0
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +368 -0
- data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +2448 -4
- data/rbi/metronome_sdk/models/v1/package_create_params.rbi +310 -0
- 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 +359 -11
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +7 -0
- data/rbi/metronome_sdk/resources/v1/packages.rbi +8 -4
- 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 +170 -0
- 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/contract_amend_params.rbs +19 -0
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +134 -0
- data/sig/metronome_sdk/models/v1/contract_create_response.rbs +1045 -4
- data/sig/metronome_sdk/models/v1/package_create_params.rbs +115 -0
- 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 +142 -9
- data/sig/metronome_sdk/resources/v1/contracts.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/packages.rbs +1 -0
- data/sig/metronome_sdk/resources/v1.rbs +0 -2
- data/sig/metronome_sdk/resources/v2/contracts.rbs +2 -0
- metadata +2 -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
|
@@ -7,11 +7,1142 @@ module MetronomeSDK
|
|
|
7
7
|
class ContractCreateResponse < MetronomeSDK::Internal::Type::BaseModel
|
|
8
8
|
# @!attribute data
|
|
9
9
|
#
|
|
10
|
-
# @return [MetronomeSDK::Models::
|
|
11
|
-
required :data, -> { MetronomeSDK::
|
|
10
|
+
# @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data]
|
|
11
|
+
required :data, -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data }
|
|
12
12
|
|
|
13
13
|
# @!method initialize(data:)
|
|
14
|
-
# @param data [MetronomeSDK::Models::
|
|
14
|
+
# @param data [MetronomeSDK::Models::V1::ContractCreateResponse::Data]
|
|
15
|
+
|
|
16
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse#data
|
|
17
|
+
class Data < MetronomeSDK::Internal::Type::BaseModel
|
|
18
|
+
# @!attribute id
|
|
19
|
+
#
|
|
20
|
+
# @return [String]
|
|
21
|
+
required :id, String
|
|
22
|
+
|
|
23
|
+
# @!attribute contract
|
|
24
|
+
# The created contract.
|
|
25
|
+
#
|
|
26
|
+
# @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract, nil]
|
|
27
|
+
optional :contract, -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract }
|
|
28
|
+
|
|
29
|
+
# @!method initialize(id:, contract: nil)
|
|
30
|
+
# @param id [String]
|
|
31
|
+
#
|
|
32
|
+
# @param contract [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract] The created contract.
|
|
33
|
+
|
|
34
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data#contract
|
|
35
|
+
class Contract < MetronomeSDK::Internal::Type::BaseModel
|
|
36
|
+
# @!attribute id
|
|
37
|
+
#
|
|
38
|
+
# @return [String]
|
|
39
|
+
required :id, String
|
|
40
|
+
|
|
41
|
+
# @!attribute commits
|
|
42
|
+
#
|
|
43
|
+
# @return [Array<MetronomeSDK::Models::Commit>]
|
|
44
|
+
required :commits, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Commit] }
|
|
45
|
+
|
|
46
|
+
# @!attribute created_at
|
|
47
|
+
#
|
|
48
|
+
# @return [Time]
|
|
49
|
+
required :created_at, Time
|
|
50
|
+
|
|
51
|
+
# @!attribute created_by
|
|
52
|
+
#
|
|
53
|
+
# @return [String]
|
|
54
|
+
required :created_by, String
|
|
55
|
+
|
|
56
|
+
# @!attribute customer_id
|
|
57
|
+
#
|
|
58
|
+
# @return [String]
|
|
59
|
+
required :customer_id, String
|
|
60
|
+
|
|
61
|
+
# @!attribute overrides
|
|
62
|
+
#
|
|
63
|
+
# @return [Array<MetronomeSDK::Models::Override>]
|
|
64
|
+
required :overrides, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Override] }
|
|
65
|
+
|
|
66
|
+
# @!attribute scheduled_charges
|
|
67
|
+
#
|
|
68
|
+
# @return [Array<MetronomeSDK::Models::ScheduledCharge>]
|
|
69
|
+
required :scheduled_charges, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ScheduledCharge] }
|
|
70
|
+
|
|
71
|
+
# @!attribute starting_at
|
|
72
|
+
#
|
|
73
|
+
# @return [Time]
|
|
74
|
+
required :starting_at, Time
|
|
75
|
+
|
|
76
|
+
# @!attribute transitions
|
|
77
|
+
#
|
|
78
|
+
# @return [Array<MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition>]
|
|
79
|
+
required :transitions,
|
|
80
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition] }
|
|
81
|
+
|
|
82
|
+
# @!attribute usage_filter
|
|
83
|
+
#
|
|
84
|
+
# @return [Array<MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageFilter>]
|
|
85
|
+
required :usage_filter,
|
|
86
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageFilter] }
|
|
87
|
+
|
|
88
|
+
# @!attribute usage_statement_schedule
|
|
89
|
+
#
|
|
90
|
+
# @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule]
|
|
91
|
+
required :usage_statement_schedule,
|
|
92
|
+
-> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule }
|
|
93
|
+
|
|
94
|
+
# @!attribute credits
|
|
95
|
+
#
|
|
96
|
+
# @return [Array<MetronomeSDK::Models::Credit>, nil]
|
|
97
|
+
optional :credits, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Credit] }
|
|
98
|
+
|
|
99
|
+
# @!attribute custom_fields
|
|
100
|
+
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
101
|
+
#
|
|
102
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
103
|
+
optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
|
|
104
|
+
|
|
105
|
+
# @!attribute customer_billing_provider_configuration
|
|
106
|
+
# The billing provider configuration associated with the contract.
|
|
107
|
+
#
|
|
108
|
+
# @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration, nil]
|
|
109
|
+
optional :customer_billing_provider_configuration,
|
|
110
|
+
-> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration }
|
|
111
|
+
|
|
112
|
+
# @!attribute ending_before
|
|
113
|
+
#
|
|
114
|
+
# @return [Time, nil]
|
|
115
|
+
optional :ending_before, Time
|
|
116
|
+
|
|
117
|
+
# @!attribute has_more
|
|
118
|
+
# Indicates whether there are more items than the limit for this endpoint. Use the
|
|
119
|
+
# respective list endpoints to get the full lists.
|
|
120
|
+
#
|
|
121
|
+
# @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::HasMore, nil]
|
|
122
|
+
optional :has_more, -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::HasMore }
|
|
123
|
+
|
|
124
|
+
# @!attribute hierarchy_configuration
|
|
125
|
+
# Either a **parent** configuration with a list of children or a **child**
|
|
126
|
+
# configuration with a single parent.
|
|
127
|
+
#
|
|
128
|
+
# @return [MetronomeSDK::Models::HierarchyConfiguration::ParentHierarchyConfiguration, MetronomeSDK::Models::HierarchyConfiguration::ChildHierarchyConfiguration, nil]
|
|
129
|
+
optional :hierarchy_configuration, union: -> { MetronomeSDK::HierarchyConfiguration }
|
|
130
|
+
|
|
131
|
+
# @!attribute multiplier_override_prioritization
|
|
132
|
+
# Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
|
133
|
+
# prices automatically. EXPLICIT prioritization requires specifying priorities for
|
|
134
|
+
# each multiplier; the one with the lowest priority value will be prioritized
|
|
135
|
+
# first.
|
|
136
|
+
#
|
|
137
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization, nil]
|
|
138
|
+
optional :multiplier_override_prioritization,
|
|
139
|
+
enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization }
|
|
140
|
+
|
|
141
|
+
# @!attribute name
|
|
142
|
+
#
|
|
143
|
+
# @return [String, nil]
|
|
144
|
+
optional :name, String
|
|
145
|
+
|
|
146
|
+
# @!attribute net_payment_terms_days
|
|
147
|
+
#
|
|
148
|
+
# @return [Float, nil]
|
|
149
|
+
optional :net_payment_terms_days, Float
|
|
150
|
+
|
|
151
|
+
# @!attribute package_id
|
|
152
|
+
# ID of the package this contract was created from, if applicable.
|
|
153
|
+
#
|
|
154
|
+
# @return [String, nil]
|
|
155
|
+
optional :package_id, String
|
|
156
|
+
|
|
157
|
+
# @!attribute prepaid_balance_threshold_configuration
|
|
158
|
+
#
|
|
159
|
+
# @return [MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration, nil]
|
|
160
|
+
optional :prepaid_balance_threshold_configuration,
|
|
161
|
+
-> { MetronomeSDK::PrepaidBalanceThresholdConfiguration }
|
|
162
|
+
|
|
163
|
+
# @!attribute rate_card_id
|
|
164
|
+
#
|
|
165
|
+
# @return [String, nil]
|
|
166
|
+
optional :rate_card_id, String
|
|
167
|
+
|
|
168
|
+
# @!attribute recurring_commits
|
|
169
|
+
#
|
|
170
|
+
# @return [Array<MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit>, nil]
|
|
171
|
+
optional :recurring_commits,
|
|
172
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit] }
|
|
173
|
+
|
|
174
|
+
# @!attribute recurring_credits
|
|
175
|
+
#
|
|
176
|
+
# @return [Array<MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit>, nil]
|
|
177
|
+
optional :recurring_credits,
|
|
178
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit] }
|
|
179
|
+
|
|
180
|
+
# @!attribute scheduled_charges_on_usage_invoices
|
|
181
|
+
# Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
182
|
+
# usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
183
|
+
# `ending_before` date for consolidation to occur. This field cannot be modified
|
|
184
|
+
# after a Contract has been created. If this field is omitted, charges will appear
|
|
185
|
+
# on a separate invoice from usage charges.
|
|
186
|
+
#
|
|
187
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::ScheduledChargesOnUsageInvoices, nil]
|
|
188
|
+
optional :scheduled_charges_on_usage_invoices,
|
|
189
|
+
enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::ScheduledChargesOnUsageInvoices }
|
|
190
|
+
|
|
191
|
+
# @!attribute spend_threshold_configuration
|
|
192
|
+
#
|
|
193
|
+
# @return [MetronomeSDK::Models::SpendThresholdConfiguration, nil]
|
|
194
|
+
optional :spend_threshold_configuration, -> { MetronomeSDK::SpendThresholdConfiguration }
|
|
195
|
+
|
|
196
|
+
# @!attribute subscriptions
|
|
197
|
+
# List of subscriptions on the contract.
|
|
198
|
+
#
|
|
199
|
+
# @return [Array<MetronomeSDK::Models::Subscription>, nil]
|
|
200
|
+
optional :subscriptions, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Subscription] }
|
|
201
|
+
|
|
202
|
+
# @!attribute uniqueness_key
|
|
203
|
+
# Optional uniqueness key to prevent duplicate contract creations.
|
|
204
|
+
#
|
|
205
|
+
# @return [String, nil]
|
|
206
|
+
optional :uniqueness_key, String
|
|
207
|
+
|
|
208
|
+
# @!method initialize(id:, commits:, created_at:, created_by:, customer_id:, overrides:, scheduled_charges:, starting_at:, transitions:, usage_filter:, usage_statement_schedule:, credits: nil, custom_fields: nil, customer_billing_provider_configuration: nil, ending_before: nil, has_more: nil, hierarchy_configuration: nil, multiplier_override_prioritization: nil, name: nil, net_payment_terms_days: nil, package_id: nil, prepaid_balance_threshold_configuration: nil, rate_card_id: nil, recurring_commits: nil, recurring_credits: nil, scheduled_charges_on_usage_invoices: nil, spend_threshold_configuration: nil, subscriptions: nil, uniqueness_key: nil)
|
|
209
|
+
# Some parameter documentations has been truncated, see
|
|
210
|
+
# {MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract} for more
|
|
211
|
+
# details.
|
|
212
|
+
#
|
|
213
|
+
# The created contract.
|
|
214
|
+
#
|
|
215
|
+
# @param id [String]
|
|
216
|
+
#
|
|
217
|
+
# @param commits [Array<MetronomeSDK::Models::Commit>]
|
|
218
|
+
#
|
|
219
|
+
# @param created_at [Time]
|
|
220
|
+
#
|
|
221
|
+
# @param created_by [String]
|
|
222
|
+
#
|
|
223
|
+
# @param customer_id [String]
|
|
224
|
+
#
|
|
225
|
+
# @param overrides [Array<MetronomeSDK::Models::Override>]
|
|
226
|
+
#
|
|
227
|
+
# @param scheduled_charges [Array<MetronomeSDK::Models::ScheduledCharge>]
|
|
228
|
+
#
|
|
229
|
+
# @param starting_at [Time]
|
|
230
|
+
#
|
|
231
|
+
# @param transitions [Array<MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition>]
|
|
232
|
+
#
|
|
233
|
+
# @param usage_filter [Array<MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageFilter>]
|
|
234
|
+
#
|
|
235
|
+
# @param usage_statement_schedule [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule]
|
|
236
|
+
#
|
|
237
|
+
# @param credits [Array<MetronomeSDK::Models::Credit>]
|
|
238
|
+
#
|
|
239
|
+
# @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
240
|
+
#
|
|
241
|
+
# @param customer_billing_provider_configuration [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration] The billing provider configuration associated with the contract.
|
|
242
|
+
#
|
|
243
|
+
# @param ending_before [Time]
|
|
244
|
+
#
|
|
245
|
+
# @param has_more [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::HasMore] Indicates whether there are more items than the limit for this endpoint. Use the
|
|
246
|
+
#
|
|
247
|
+
# @param hierarchy_configuration [MetronomeSDK::Models::HierarchyConfiguration::ParentHierarchyConfiguration, MetronomeSDK::Models::HierarchyConfiguration::ChildHierarchyConfiguration] Either a **parent** configuration with a list of children or a **child** configu
|
|
248
|
+
#
|
|
249
|
+
# @param multiplier_override_prioritization [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization] Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list price
|
|
250
|
+
#
|
|
251
|
+
# @param name [String]
|
|
252
|
+
#
|
|
253
|
+
# @param net_payment_terms_days [Float]
|
|
254
|
+
#
|
|
255
|
+
# @param package_id [String] ID of the package this contract was created from, if applicable.
|
|
256
|
+
#
|
|
257
|
+
# @param prepaid_balance_threshold_configuration [MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration]
|
|
258
|
+
#
|
|
259
|
+
# @param rate_card_id [String]
|
|
260
|
+
#
|
|
261
|
+
# @param recurring_commits [Array<MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit>]
|
|
262
|
+
#
|
|
263
|
+
# @param recurring_credits [Array<MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit>]
|
|
264
|
+
#
|
|
265
|
+
# @param scheduled_charges_on_usage_invoices [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::ScheduledChargesOnUsageInvoices] Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
266
|
+
#
|
|
267
|
+
# @param spend_threshold_configuration [MetronomeSDK::Models::SpendThresholdConfiguration]
|
|
268
|
+
#
|
|
269
|
+
# @param subscriptions [Array<MetronomeSDK::Models::Subscription>] List of subscriptions on the contract.
|
|
270
|
+
#
|
|
271
|
+
# @param uniqueness_key [String] Optional uniqueness key to prevent duplicate contract creations.
|
|
272
|
+
|
|
273
|
+
class Transition < MetronomeSDK::Internal::Type::BaseModel
|
|
274
|
+
# @!attribute from_contract_id
|
|
275
|
+
#
|
|
276
|
+
# @return [String]
|
|
277
|
+
required :from_contract_id, String
|
|
278
|
+
|
|
279
|
+
# @!attribute to_contract_id
|
|
280
|
+
#
|
|
281
|
+
# @return [String]
|
|
282
|
+
required :to_contract_id, String
|
|
283
|
+
|
|
284
|
+
# @!attribute type
|
|
285
|
+
#
|
|
286
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type]
|
|
287
|
+
required :type,
|
|
288
|
+
enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type }
|
|
289
|
+
|
|
290
|
+
# @!method initialize(from_contract_id:, to_contract_id:, type:)
|
|
291
|
+
# @param from_contract_id [String]
|
|
292
|
+
# @param to_contract_id [String]
|
|
293
|
+
# @param type [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type]
|
|
294
|
+
|
|
295
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition#type
|
|
296
|
+
module Type
|
|
297
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
298
|
+
|
|
299
|
+
SUPERSEDE = :SUPERSEDE
|
|
300
|
+
RENEWAL = :RENEWAL
|
|
301
|
+
|
|
302
|
+
# @!method self.values
|
|
303
|
+
# @return [Array<Symbol>]
|
|
304
|
+
end
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
class UsageFilter < MetronomeSDK::Internal::Type::BaseModel
|
|
308
|
+
# @!attribute group_key
|
|
309
|
+
#
|
|
310
|
+
# @return [String]
|
|
311
|
+
required :group_key, String
|
|
312
|
+
|
|
313
|
+
# @!attribute group_values
|
|
314
|
+
#
|
|
315
|
+
# @return [Array<String>]
|
|
316
|
+
required :group_values, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
317
|
+
|
|
318
|
+
# @!attribute starting_at
|
|
319
|
+
#
|
|
320
|
+
# @return [Time]
|
|
321
|
+
required :starting_at, Time
|
|
322
|
+
|
|
323
|
+
# @!attribute ending_before
|
|
324
|
+
#
|
|
325
|
+
# @return [Time, nil]
|
|
326
|
+
optional :ending_before, Time
|
|
327
|
+
|
|
328
|
+
# @!method initialize(group_key:, group_values:, starting_at:, ending_before: nil)
|
|
329
|
+
# @param group_key [String]
|
|
330
|
+
# @param group_values [Array<String>]
|
|
331
|
+
# @param starting_at [Time]
|
|
332
|
+
# @param ending_before [Time]
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract#usage_statement_schedule
|
|
336
|
+
class UsageStatementSchedule < MetronomeSDK::Internal::Type::BaseModel
|
|
337
|
+
# @!attribute billing_anchor_date
|
|
338
|
+
# Contract usage statements follow a selected cadence based on this date.
|
|
339
|
+
#
|
|
340
|
+
# @return [Time]
|
|
341
|
+
required :billing_anchor_date, Time
|
|
342
|
+
|
|
343
|
+
# @!attribute frequency
|
|
344
|
+
#
|
|
345
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency]
|
|
346
|
+
required :frequency,
|
|
347
|
+
enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency }
|
|
348
|
+
|
|
349
|
+
# @!method initialize(billing_anchor_date:, frequency:)
|
|
350
|
+
# @param billing_anchor_date [Time] Contract usage statements follow a selected cadence based on this date.
|
|
351
|
+
#
|
|
352
|
+
# @param frequency [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency]
|
|
353
|
+
|
|
354
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule#frequency
|
|
355
|
+
module Frequency
|
|
356
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
357
|
+
|
|
358
|
+
MONTHLY = :MONTHLY
|
|
359
|
+
QUARTERLY = :QUARTERLY
|
|
360
|
+
ANNUAL = :ANNUAL
|
|
361
|
+
WEEKLY = :WEEKLY
|
|
362
|
+
|
|
363
|
+
# @!method self.values
|
|
364
|
+
# @return [Array<Symbol>]
|
|
365
|
+
end
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract#customer_billing_provider_configuration
|
|
369
|
+
class CustomerBillingProviderConfiguration < MetronomeSDK::Internal::Type::BaseModel
|
|
370
|
+
# @!attribute id
|
|
371
|
+
#
|
|
372
|
+
# @return [String, nil]
|
|
373
|
+
optional :id, String
|
|
374
|
+
|
|
375
|
+
# @!attribute billing_provider
|
|
376
|
+
#
|
|
377
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider, nil]
|
|
378
|
+
optional :billing_provider,
|
|
379
|
+
enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider }
|
|
380
|
+
|
|
381
|
+
# @!attribute delivery_method
|
|
382
|
+
#
|
|
383
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod, nil]
|
|
384
|
+
optional :delivery_method,
|
|
385
|
+
enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod }
|
|
386
|
+
|
|
387
|
+
# @!method initialize(id: nil, billing_provider: nil, delivery_method: nil)
|
|
388
|
+
# The billing provider configuration associated with the contract.
|
|
389
|
+
#
|
|
390
|
+
# @param id [String]
|
|
391
|
+
# @param billing_provider [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider]
|
|
392
|
+
# @param delivery_method [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod]
|
|
393
|
+
|
|
394
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration#billing_provider
|
|
395
|
+
module BillingProvider
|
|
396
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
397
|
+
|
|
398
|
+
AWS_MARKETPLACE = :aws_marketplace
|
|
399
|
+
STRIPE = :stripe
|
|
400
|
+
NETSUITE = :netsuite
|
|
401
|
+
CUSTOM = :custom
|
|
402
|
+
AZURE_MARKETPLACE = :azure_marketplace
|
|
403
|
+
QUICKBOOKS_ONLINE = :quickbooks_online
|
|
404
|
+
WORKDAY = :workday
|
|
405
|
+
GCP_MARKETPLACE = :gcp_marketplace
|
|
406
|
+
METRONOME = :metronome
|
|
407
|
+
|
|
408
|
+
# @!method self.values
|
|
409
|
+
# @return [Array<Symbol>]
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration#delivery_method
|
|
413
|
+
module DeliveryMethod
|
|
414
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
415
|
+
|
|
416
|
+
DIRECT_TO_BILLING_PROVIDER = :direct_to_billing_provider
|
|
417
|
+
AWS_SQS = :aws_sqs
|
|
418
|
+
TACKLE = :tackle
|
|
419
|
+
AWS_SNS = :aws_sns
|
|
420
|
+
|
|
421
|
+
# @!method self.values
|
|
422
|
+
# @return [Array<Symbol>]
|
|
423
|
+
end
|
|
424
|
+
end
|
|
425
|
+
|
|
426
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract#has_more
|
|
427
|
+
class HasMore < MetronomeSDK::Internal::Type::BaseModel
|
|
428
|
+
# @!attribute commits
|
|
429
|
+
# Whether there are more commits on this contract than the limit for this
|
|
430
|
+
# endpoint. Use the /contracts/customerCommits/list endpoint to get the full list
|
|
431
|
+
# of commits.
|
|
432
|
+
#
|
|
433
|
+
# @return [Boolean]
|
|
434
|
+
required :commits, MetronomeSDK::Internal::Type::Boolean
|
|
435
|
+
|
|
436
|
+
# @!attribute credits
|
|
437
|
+
# Whether there are more credits on this contract than the limit for this
|
|
438
|
+
# endpoint. Use the /contracts/customerCredits/list endpoint to get the full list
|
|
439
|
+
# of credits.
|
|
440
|
+
#
|
|
441
|
+
# @return [Boolean]
|
|
442
|
+
required :credits, MetronomeSDK::Internal::Type::Boolean
|
|
443
|
+
|
|
444
|
+
# @!method initialize(commits:, credits:)
|
|
445
|
+
# Some parameter documentations has been truncated, see
|
|
446
|
+
# {MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::HasMore} for
|
|
447
|
+
# more details.
|
|
448
|
+
#
|
|
449
|
+
# Indicates whether there are more items than the limit for this endpoint. Use the
|
|
450
|
+
# respective list endpoints to get the full lists.
|
|
451
|
+
#
|
|
452
|
+
# @param commits [Boolean] Whether there are more commits on this contract than the limit for this endpoint
|
|
453
|
+
#
|
|
454
|
+
# @param credits [Boolean] Whether there are more credits on this contract than the limit for this endpoint
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
# Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
|
458
|
+
# prices automatically. EXPLICIT prioritization requires specifying priorities for
|
|
459
|
+
# each multiplier; the one with the lowest priority value will be prioritized
|
|
460
|
+
# first.
|
|
461
|
+
#
|
|
462
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract#multiplier_override_prioritization
|
|
463
|
+
module MultiplierOverridePrioritization
|
|
464
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
465
|
+
|
|
466
|
+
LOWEST_MULTIPLIER = :LOWEST_MULTIPLIER
|
|
467
|
+
EXPLICIT = :EXPLICIT
|
|
468
|
+
|
|
469
|
+
# @!method self.values
|
|
470
|
+
# @return [Array<Symbol>]
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
class RecurringCommit < MetronomeSDK::Internal::Type::BaseModel
|
|
474
|
+
# @!attribute id
|
|
475
|
+
#
|
|
476
|
+
# @return [String]
|
|
477
|
+
required :id, String
|
|
478
|
+
|
|
479
|
+
# @!attribute access_amount
|
|
480
|
+
# The amount of commit to grant.
|
|
481
|
+
#
|
|
482
|
+
# @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::AccessAmount]
|
|
483
|
+
required :access_amount,
|
|
484
|
+
-> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::AccessAmount }
|
|
485
|
+
|
|
486
|
+
# @!attribute commit_duration
|
|
487
|
+
# The amount of time the created commits will be valid for
|
|
488
|
+
#
|
|
489
|
+
# @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration]
|
|
490
|
+
required :commit_duration,
|
|
491
|
+
-> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration }
|
|
492
|
+
|
|
493
|
+
# @!attribute priority
|
|
494
|
+
# Will be passed down to the individual commits
|
|
495
|
+
#
|
|
496
|
+
# @return [Float]
|
|
497
|
+
required :priority, Float
|
|
498
|
+
|
|
499
|
+
# @!attribute product
|
|
500
|
+
#
|
|
501
|
+
# @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Product]
|
|
502
|
+
required :product,
|
|
503
|
+
-> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Product }
|
|
504
|
+
|
|
505
|
+
# @!attribute rate_type
|
|
506
|
+
# Whether the created commits will use the commit rate or list rate
|
|
507
|
+
#
|
|
508
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RateType]
|
|
509
|
+
required :rate_type,
|
|
510
|
+
enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RateType }
|
|
511
|
+
|
|
512
|
+
# @!attribute starting_at
|
|
513
|
+
# Determines the start time for the first commit
|
|
514
|
+
#
|
|
515
|
+
# @return [Time]
|
|
516
|
+
required :starting_at, Time
|
|
517
|
+
|
|
518
|
+
# @!attribute applicable_product_ids
|
|
519
|
+
# Will be passed down to the individual commits
|
|
520
|
+
#
|
|
521
|
+
# @return [Array<String>, nil]
|
|
522
|
+
optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
523
|
+
|
|
524
|
+
# @!attribute applicable_product_tags
|
|
525
|
+
# Will be passed down to the individual commits
|
|
526
|
+
#
|
|
527
|
+
# @return [Array<String>, nil]
|
|
528
|
+
optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
529
|
+
|
|
530
|
+
# @!attribute contract
|
|
531
|
+
#
|
|
532
|
+
# @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Contract, nil]
|
|
533
|
+
optional :contract,
|
|
534
|
+
-> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Contract }
|
|
535
|
+
|
|
536
|
+
# @!attribute description
|
|
537
|
+
# Will be passed down to the individual commits
|
|
538
|
+
#
|
|
539
|
+
# @return [String, nil]
|
|
540
|
+
optional :description, String
|
|
541
|
+
|
|
542
|
+
# @!attribute ending_before
|
|
543
|
+
# Determines when the contract will stop creating recurring commits. Optional
|
|
544
|
+
#
|
|
545
|
+
# @return [Time, nil]
|
|
546
|
+
optional :ending_before, Time
|
|
547
|
+
|
|
548
|
+
# @!attribute hierarchy_configuration
|
|
549
|
+
# Optional configuration for recurring commit/credit hierarchy access control
|
|
550
|
+
#
|
|
551
|
+
# @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
|
|
552
|
+
optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
|
|
553
|
+
|
|
554
|
+
# @!attribute invoice_amount
|
|
555
|
+
# The amount the customer should be billed for the commit. Not required.
|
|
556
|
+
#
|
|
557
|
+
# @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::InvoiceAmount, nil]
|
|
558
|
+
optional :invoice_amount,
|
|
559
|
+
-> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::InvoiceAmount }
|
|
560
|
+
|
|
561
|
+
# @!attribute name
|
|
562
|
+
# Displayed on invoices. Will be passed through to the individual commits
|
|
563
|
+
#
|
|
564
|
+
# @return [String, nil]
|
|
565
|
+
optional :name, String
|
|
566
|
+
|
|
567
|
+
# @!attribute netsuite_sales_order_id
|
|
568
|
+
# Will be passed down to the individual commits
|
|
569
|
+
#
|
|
570
|
+
# @return [String, nil]
|
|
571
|
+
optional :netsuite_sales_order_id, String
|
|
572
|
+
|
|
573
|
+
# @!attribute proration
|
|
574
|
+
# Determines whether the first and last commit will be prorated. If not provided,
|
|
575
|
+
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
576
|
+
#
|
|
577
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration, nil]
|
|
578
|
+
optional :proration,
|
|
579
|
+
enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration }
|
|
580
|
+
|
|
581
|
+
# @!attribute recurrence_frequency
|
|
582
|
+
# The frequency at which the recurring commits will be created. If not provided: -
|
|
583
|
+
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
584
|
+
# period defined in the duration will correspond to this frequency. - Commits will
|
|
585
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
|
586
|
+
# invoice dates.
|
|
587
|
+
#
|
|
588
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency, nil]
|
|
589
|
+
optional :recurrence_frequency,
|
|
590
|
+
enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency }
|
|
591
|
+
|
|
592
|
+
# @!attribute rollover_fraction
|
|
593
|
+
# Will be passed down to the individual commits. This controls how much of an
|
|
594
|
+
# individual unexpired commit will roll over upon contract transition. Must be
|
|
595
|
+
# between 0 and 1.
|
|
596
|
+
#
|
|
597
|
+
# @return [Float, nil]
|
|
598
|
+
optional :rollover_fraction, Float
|
|
599
|
+
|
|
600
|
+
# @!attribute specifiers
|
|
601
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
|
602
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
|
603
|
+
# specifiers to contribute to a commit's or credit's drawdown.
|
|
604
|
+
#
|
|
605
|
+
# @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
|
|
606
|
+
optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
|
|
607
|
+
|
|
608
|
+
# @!attribute subscription_config
|
|
609
|
+
# Attach a subscription to the recurring commit/credit.
|
|
610
|
+
#
|
|
611
|
+
# @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
|
|
612
|
+
optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
|
|
613
|
+
|
|
614
|
+
# @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, invoice_amount: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
|
|
615
|
+
# Some parameter documentations has been truncated, see
|
|
616
|
+
# {MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit}
|
|
617
|
+
# for more details.
|
|
618
|
+
#
|
|
619
|
+
# @param id [String]
|
|
620
|
+
#
|
|
621
|
+
# @param access_amount [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::AccessAmount] The amount of commit to grant.
|
|
622
|
+
#
|
|
623
|
+
# @param commit_duration [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration] The amount of time the created commits will be valid for
|
|
624
|
+
#
|
|
625
|
+
# @param priority [Float] Will be passed down to the individual commits
|
|
626
|
+
#
|
|
627
|
+
# @param product [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Product]
|
|
628
|
+
#
|
|
629
|
+
# @param rate_type [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RateType] Whether the created commits will use the commit rate or list rate
|
|
630
|
+
#
|
|
631
|
+
# @param starting_at [Time] Determines the start time for the first commit
|
|
632
|
+
#
|
|
633
|
+
# @param applicable_product_ids [Array<String>] Will be passed down to the individual commits
|
|
634
|
+
#
|
|
635
|
+
# @param applicable_product_tags [Array<String>] Will be passed down to the individual commits
|
|
636
|
+
#
|
|
637
|
+
# @param contract [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Contract]
|
|
638
|
+
#
|
|
639
|
+
# @param description [String] Will be passed down to the individual commits
|
|
640
|
+
#
|
|
641
|
+
# @param ending_before [Time] Determines when the contract will stop creating recurring commits. Optional
|
|
642
|
+
#
|
|
643
|
+
# @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for recurring commit/credit hierarchy access control
|
|
644
|
+
#
|
|
645
|
+
# @param invoice_amount [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::InvoiceAmount] The amount the customer should be billed for the commit. Not required.
|
|
646
|
+
#
|
|
647
|
+
# @param name [String] Displayed on invoices. Will be passed through to the individual commits
|
|
648
|
+
#
|
|
649
|
+
# @param netsuite_sales_order_id [String] Will be passed down to the individual commits
|
|
650
|
+
#
|
|
651
|
+
# @param proration [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration] Determines whether the first and last commit will be prorated. If not provided,
|
|
652
|
+
#
|
|
653
|
+
# @param recurrence_frequency [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided:
|
|
654
|
+
#
|
|
655
|
+
# @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
|
|
656
|
+
#
|
|
657
|
+
# @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
|
|
658
|
+
#
|
|
659
|
+
# @param subscription_config [MetronomeSDK::Models::RecurringCommitSubscriptionConfig] Attach a subscription to the recurring commit/credit.
|
|
660
|
+
|
|
661
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit#access_amount
|
|
662
|
+
class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
|
|
663
|
+
# @!attribute credit_type_id
|
|
664
|
+
#
|
|
665
|
+
# @return [String]
|
|
666
|
+
required :credit_type_id, String
|
|
667
|
+
|
|
668
|
+
# @!attribute unit_price
|
|
669
|
+
#
|
|
670
|
+
# @return [Float]
|
|
671
|
+
required :unit_price, Float
|
|
672
|
+
|
|
673
|
+
# @!attribute quantity
|
|
674
|
+
#
|
|
675
|
+
# @return [Float, nil]
|
|
676
|
+
optional :quantity, Float
|
|
677
|
+
|
|
678
|
+
# @!method initialize(credit_type_id:, unit_price:, quantity: nil)
|
|
679
|
+
# The amount of commit to grant.
|
|
680
|
+
#
|
|
681
|
+
# @param credit_type_id [String]
|
|
682
|
+
# @param unit_price [Float]
|
|
683
|
+
# @param quantity [Float]
|
|
684
|
+
end
|
|
685
|
+
|
|
686
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit#commit_duration
|
|
687
|
+
class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
|
|
688
|
+
# @!attribute value
|
|
689
|
+
#
|
|
690
|
+
# @return [Float]
|
|
691
|
+
required :value, Float
|
|
692
|
+
|
|
693
|
+
# @!attribute unit
|
|
694
|
+
#
|
|
695
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::Unit, nil]
|
|
696
|
+
optional :unit,
|
|
697
|
+
enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::Unit }
|
|
698
|
+
|
|
699
|
+
# @!method initialize(value:, unit: nil)
|
|
700
|
+
# The amount of time the created commits will be valid for
|
|
701
|
+
#
|
|
702
|
+
# @param value [Float]
|
|
703
|
+
# @param unit [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::Unit]
|
|
704
|
+
|
|
705
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration#unit
|
|
706
|
+
module Unit
|
|
707
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
708
|
+
|
|
709
|
+
PERIODS = :PERIODS
|
|
710
|
+
|
|
711
|
+
# @!method self.values
|
|
712
|
+
# @return [Array<Symbol>]
|
|
713
|
+
end
|
|
714
|
+
end
|
|
715
|
+
|
|
716
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit#product
|
|
717
|
+
class Product < MetronomeSDK::Internal::Type::BaseModel
|
|
718
|
+
# @!attribute id
|
|
719
|
+
#
|
|
720
|
+
# @return [String]
|
|
721
|
+
required :id, String
|
|
722
|
+
|
|
723
|
+
# @!attribute name
|
|
724
|
+
#
|
|
725
|
+
# @return [String]
|
|
726
|
+
required :name, String
|
|
727
|
+
|
|
728
|
+
# @!method initialize(id:, name:)
|
|
729
|
+
# @param id [String]
|
|
730
|
+
# @param name [String]
|
|
731
|
+
end
|
|
732
|
+
|
|
733
|
+
# Whether the created commits will use the commit rate or list rate
|
|
734
|
+
#
|
|
735
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit#rate_type
|
|
736
|
+
module RateType
|
|
737
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
738
|
+
|
|
739
|
+
COMMIT_RATE = :COMMIT_RATE
|
|
740
|
+
LIST_RATE = :LIST_RATE
|
|
741
|
+
|
|
742
|
+
# @!method self.values
|
|
743
|
+
# @return [Array<Symbol>]
|
|
744
|
+
end
|
|
745
|
+
|
|
746
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit#contract
|
|
747
|
+
class Contract < MetronomeSDK::Internal::Type::BaseModel
|
|
748
|
+
# @!attribute id
|
|
749
|
+
#
|
|
750
|
+
# @return [String]
|
|
751
|
+
required :id, String
|
|
752
|
+
|
|
753
|
+
# @!method initialize(id:)
|
|
754
|
+
# @param id [String]
|
|
755
|
+
end
|
|
756
|
+
|
|
757
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit#invoice_amount
|
|
758
|
+
class InvoiceAmount < MetronomeSDK::Internal::Type::BaseModel
|
|
759
|
+
# @!attribute credit_type_id
|
|
760
|
+
#
|
|
761
|
+
# @return [String]
|
|
762
|
+
required :credit_type_id, String
|
|
763
|
+
|
|
764
|
+
# @!attribute quantity
|
|
765
|
+
#
|
|
766
|
+
# @return [Float]
|
|
767
|
+
required :quantity, Float
|
|
768
|
+
|
|
769
|
+
# @!attribute unit_price
|
|
770
|
+
#
|
|
771
|
+
# @return [Float]
|
|
772
|
+
required :unit_price, Float
|
|
773
|
+
|
|
774
|
+
# @!method initialize(credit_type_id:, quantity:, unit_price:)
|
|
775
|
+
# The amount the customer should be billed for the commit. Not required.
|
|
776
|
+
#
|
|
777
|
+
# @param credit_type_id [String]
|
|
778
|
+
# @param quantity [Float]
|
|
779
|
+
# @param unit_price [Float]
|
|
780
|
+
end
|
|
781
|
+
|
|
782
|
+
# Determines whether the first and last commit will be prorated. If not provided,
|
|
783
|
+
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
784
|
+
#
|
|
785
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit#proration
|
|
786
|
+
module Proration
|
|
787
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
788
|
+
|
|
789
|
+
NONE = :NONE
|
|
790
|
+
FIRST = :FIRST
|
|
791
|
+
LAST = :LAST
|
|
792
|
+
FIRST_AND_LAST = :FIRST_AND_LAST
|
|
793
|
+
|
|
794
|
+
# @!method self.values
|
|
795
|
+
# @return [Array<Symbol>]
|
|
796
|
+
end
|
|
797
|
+
|
|
798
|
+
# The frequency at which the recurring commits will be created. If not provided: -
|
|
799
|
+
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
800
|
+
# period defined in the duration will correspond to this frequency. - Commits will
|
|
801
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
|
802
|
+
# invoice dates.
|
|
803
|
+
#
|
|
804
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit#recurrence_frequency
|
|
805
|
+
module RecurrenceFrequency
|
|
806
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
807
|
+
|
|
808
|
+
MONTHLY = :MONTHLY
|
|
809
|
+
QUARTERLY = :QUARTERLY
|
|
810
|
+
ANNUAL = :ANNUAL
|
|
811
|
+
WEEKLY = :WEEKLY
|
|
812
|
+
|
|
813
|
+
# @!method self.values
|
|
814
|
+
# @return [Array<Symbol>]
|
|
815
|
+
end
|
|
816
|
+
end
|
|
817
|
+
|
|
818
|
+
class RecurringCredit < MetronomeSDK::Internal::Type::BaseModel
|
|
819
|
+
# @!attribute id
|
|
820
|
+
#
|
|
821
|
+
# @return [String]
|
|
822
|
+
required :id, String
|
|
823
|
+
|
|
824
|
+
# @!attribute access_amount
|
|
825
|
+
# The amount of commit to grant.
|
|
826
|
+
#
|
|
827
|
+
# @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::AccessAmount]
|
|
828
|
+
required :access_amount,
|
|
829
|
+
-> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::AccessAmount }
|
|
830
|
+
|
|
831
|
+
# @!attribute commit_duration
|
|
832
|
+
# The amount of time the created commits will be valid for
|
|
833
|
+
#
|
|
834
|
+
# @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration]
|
|
835
|
+
required :commit_duration,
|
|
836
|
+
-> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration }
|
|
837
|
+
|
|
838
|
+
# @!attribute priority
|
|
839
|
+
# Will be passed down to the individual commits
|
|
840
|
+
#
|
|
841
|
+
# @return [Float]
|
|
842
|
+
required :priority, Float
|
|
843
|
+
|
|
844
|
+
# @!attribute product
|
|
845
|
+
#
|
|
846
|
+
# @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Product]
|
|
847
|
+
required :product,
|
|
848
|
+
-> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Product }
|
|
849
|
+
|
|
850
|
+
# @!attribute rate_type
|
|
851
|
+
# Whether the created commits will use the commit rate or list rate
|
|
852
|
+
#
|
|
853
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RateType]
|
|
854
|
+
required :rate_type,
|
|
855
|
+
enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RateType }
|
|
856
|
+
|
|
857
|
+
# @!attribute starting_at
|
|
858
|
+
# Determines the start time for the first commit
|
|
859
|
+
#
|
|
860
|
+
# @return [Time]
|
|
861
|
+
required :starting_at, Time
|
|
862
|
+
|
|
863
|
+
# @!attribute applicable_product_ids
|
|
864
|
+
# Will be passed down to the individual commits
|
|
865
|
+
#
|
|
866
|
+
# @return [Array<String>, nil]
|
|
867
|
+
optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
868
|
+
|
|
869
|
+
# @!attribute applicable_product_tags
|
|
870
|
+
# Will be passed down to the individual commits
|
|
871
|
+
#
|
|
872
|
+
# @return [Array<String>, nil]
|
|
873
|
+
optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
874
|
+
|
|
875
|
+
# @!attribute contract
|
|
876
|
+
#
|
|
877
|
+
# @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Contract, nil]
|
|
878
|
+
optional :contract,
|
|
879
|
+
-> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Contract }
|
|
880
|
+
|
|
881
|
+
# @!attribute description
|
|
882
|
+
# Will be passed down to the individual commits
|
|
883
|
+
#
|
|
884
|
+
# @return [String, nil]
|
|
885
|
+
optional :description, String
|
|
886
|
+
|
|
887
|
+
# @!attribute ending_before
|
|
888
|
+
# Determines when the contract will stop creating recurring commits. Optional
|
|
889
|
+
#
|
|
890
|
+
# @return [Time, nil]
|
|
891
|
+
optional :ending_before, Time
|
|
892
|
+
|
|
893
|
+
# @!attribute hierarchy_configuration
|
|
894
|
+
# Optional configuration for recurring commit/credit hierarchy access control
|
|
895
|
+
#
|
|
896
|
+
# @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
|
|
897
|
+
optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
|
|
898
|
+
|
|
899
|
+
# @!attribute name
|
|
900
|
+
# Displayed on invoices. Will be passed through to the individual commits
|
|
901
|
+
#
|
|
902
|
+
# @return [String, nil]
|
|
903
|
+
optional :name, String
|
|
904
|
+
|
|
905
|
+
# @!attribute netsuite_sales_order_id
|
|
906
|
+
# Will be passed down to the individual commits
|
|
907
|
+
#
|
|
908
|
+
# @return [String, nil]
|
|
909
|
+
optional :netsuite_sales_order_id, String
|
|
910
|
+
|
|
911
|
+
# @!attribute proration
|
|
912
|
+
# Determines whether the first and last commit will be prorated. If not provided,
|
|
913
|
+
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
914
|
+
#
|
|
915
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration, nil]
|
|
916
|
+
optional :proration,
|
|
917
|
+
enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration }
|
|
918
|
+
|
|
919
|
+
# @!attribute recurrence_frequency
|
|
920
|
+
# The frequency at which the recurring commits will be created. If not provided: -
|
|
921
|
+
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
922
|
+
# period defined in the duration will correspond to this frequency. - Commits will
|
|
923
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
|
924
|
+
# invoice dates.
|
|
925
|
+
#
|
|
926
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency, nil]
|
|
927
|
+
optional :recurrence_frequency,
|
|
928
|
+
enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency }
|
|
929
|
+
|
|
930
|
+
# @!attribute rollover_fraction
|
|
931
|
+
# Will be passed down to the individual commits. This controls how much of an
|
|
932
|
+
# individual unexpired commit will roll over upon contract transition. Must be
|
|
933
|
+
# between 0 and 1.
|
|
934
|
+
#
|
|
935
|
+
# @return [Float, nil]
|
|
936
|
+
optional :rollover_fraction, Float
|
|
937
|
+
|
|
938
|
+
# @!attribute specifiers
|
|
939
|
+
# List of filters that determine what kind of customer usage draws down a commit
|
|
940
|
+
# or credit. A customer's usage needs to meet the condition of at least one of the
|
|
941
|
+
# specifiers to contribute to a commit's or credit's drawdown.
|
|
942
|
+
#
|
|
943
|
+
# @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
|
|
944
|
+
optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
|
|
945
|
+
|
|
946
|
+
# @!attribute subscription_config
|
|
947
|
+
# Attach a subscription to the recurring commit/credit.
|
|
948
|
+
#
|
|
949
|
+
# @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
|
|
950
|
+
optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
|
|
951
|
+
|
|
952
|
+
# @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
|
|
953
|
+
# Some parameter documentations has been truncated, see
|
|
954
|
+
# {MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit}
|
|
955
|
+
# for more details.
|
|
956
|
+
#
|
|
957
|
+
# @param id [String]
|
|
958
|
+
#
|
|
959
|
+
# @param access_amount [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::AccessAmount] The amount of commit to grant.
|
|
960
|
+
#
|
|
961
|
+
# @param commit_duration [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration] The amount of time the created commits will be valid for
|
|
962
|
+
#
|
|
963
|
+
# @param priority [Float] Will be passed down to the individual commits
|
|
964
|
+
#
|
|
965
|
+
# @param product [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Product]
|
|
966
|
+
#
|
|
967
|
+
# @param rate_type [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RateType] Whether the created commits will use the commit rate or list rate
|
|
968
|
+
#
|
|
969
|
+
# @param starting_at [Time] Determines the start time for the first commit
|
|
970
|
+
#
|
|
971
|
+
# @param applicable_product_ids [Array<String>] Will be passed down to the individual commits
|
|
972
|
+
#
|
|
973
|
+
# @param applicable_product_tags [Array<String>] Will be passed down to the individual commits
|
|
974
|
+
#
|
|
975
|
+
# @param contract [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Contract]
|
|
976
|
+
#
|
|
977
|
+
# @param description [String] Will be passed down to the individual commits
|
|
978
|
+
#
|
|
979
|
+
# @param ending_before [Time] Determines when the contract will stop creating recurring commits. Optional
|
|
980
|
+
#
|
|
981
|
+
# @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for recurring commit/credit hierarchy access control
|
|
982
|
+
#
|
|
983
|
+
# @param name [String] Displayed on invoices. Will be passed through to the individual commits
|
|
984
|
+
#
|
|
985
|
+
# @param netsuite_sales_order_id [String] Will be passed down to the individual commits
|
|
986
|
+
#
|
|
987
|
+
# @param proration [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration] Determines whether the first and last commit will be prorated. If not provided,
|
|
988
|
+
#
|
|
989
|
+
# @param recurrence_frequency [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided:
|
|
990
|
+
#
|
|
991
|
+
# @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
|
|
992
|
+
#
|
|
993
|
+
# @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
|
|
994
|
+
#
|
|
995
|
+
# @param subscription_config [MetronomeSDK::Models::RecurringCommitSubscriptionConfig] Attach a subscription to the recurring commit/credit.
|
|
996
|
+
|
|
997
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit#access_amount
|
|
998
|
+
class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
|
|
999
|
+
# @!attribute credit_type_id
|
|
1000
|
+
#
|
|
1001
|
+
# @return [String]
|
|
1002
|
+
required :credit_type_id, String
|
|
1003
|
+
|
|
1004
|
+
# @!attribute unit_price
|
|
1005
|
+
#
|
|
1006
|
+
# @return [Float]
|
|
1007
|
+
required :unit_price, Float
|
|
1008
|
+
|
|
1009
|
+
# @!attribute quantity
|
|
1010
|
+
#
|
|
1011
|
+
# @return [Float, nil]
|
|
1012
|
+
optional :quantity, Float
|
|
1013
|
+
|
|
1014
|
+
# @!method initialize(credit_type_id:, unit_price:, quantity: nil)
|
|
1015
|
+
# The amount of commit to grant.
|
|
1016
|
+
#
|
|
1017
|
+
# @param credit_type_id [String]
|
|
1018
|
+
# @param unit_price [Float]
|
|
1019
|
+
# @param quantity [Float]
|
|
1020
|
+
end
|
|
1021
|
+
|
|
1022
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit#commit_duration
|
|
1023
|
+
class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
|
|
1024
|
+
# @!attribute value
|
|
1025
|
+
#
|
|
1026
|
+
# @return [Float]
|
|
1027
|
+
required :value, Float
|
|
1028
|
+
|
|
1029
|
+
# @!attribute unit
|
|
1030
|
+
#
|
|
1031
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::Unit, nil]
|
|
1032
|
+
optional :unit,
|
|
1033
|
+
enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::Unit }
|
|
1034
|
+
|
|
1035
|
+
# @!method initialize(value:, unit: nil)
|
|
1036
|
+
# The amount of time the created commits will be valid for
|
|
1037
|
+
#
|
|
1038
|
+
# @param value [Float]
|
|
1039
|
+
# @param unit [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::Unit]
|
|
1040
|
+
|
|
1041
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration#unit
|
|
1042
|
+
module Unit
|
|
1043
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1044
|
+
|
|
1045
|
+
PERIODS = :PERIODS
|
|
1046
|
+
|
|
1047
|
+
# @!method self.values
|
|
1048
|
+
# @return [Array<Symbol>]
|
|
1049
|
+
end
|
|
1050
|
+
end
|
|
1051
|
+
|
|
1052
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit#product
|
|
1053
|
+
class Product < MetronomeSDK::Internal::Type::BaseModel
|
|
1054
|
+
# @!attribute id
|
|
1055
|
+
#
|
|
1056
|
+
# @return [String]
|
|
1057
|
+
required :id, String
|
|
1058
|
+
|
|
1059
|
+
# @!attribute name
|
|
1060
|
+
#
|
|
1061
|
+
# @return [String]
|
|
1062
|
+
required :name, String
|
|
1063
|
+
|
|
1064
|
+
# @!method initialize(id:, name:)
|
|
1065
|
+
# @param id [String]
|
|
1066
|
+
# @param name [String]
|
|
1067
|
+
end
|
|
1068
|
+
|
|
1069
|
+
# Whether the created commits will use the commit rate or list rate
|
|
1070
|
+
#
|
|
1071
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit#rate_type
|
|
1072
|
+
module RateType
|
|
1073
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1074
|
+
|
|
1075
|
+
COMMIT_RATE = :COMMIT_RATE
|
|
1076
|
+
LIST_RATE = :LIST_RATE
|
|
1077
|
+
|
|
1078
|
+
# @!method self.values
|
|
1079
|
+
# @return [Array<Symbol>]
|
|
1080
|
+
end
|
|
1081
|
+
|
|
1082
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit#contract
|
|
1083
|
+
class Contract < MetronomeSDK::Internal::Type::BaseModel
|
|
1084
|
+
# @!attribute id
|
|
1085
|
+
#
|
|
1086
|
+
# @return [String]
|
|
1087
|
+
required :id, String
|
|
1088
|
+
|
|
1089
|
+
# @!method initialize(id:)
|
|
1090
|
+
# @param id [String]
|
|
1091
|
+
end
|
|
1092
|
+
|
|
1093
|
+
# Determines whether the first and last commit will be prorated. If not provided,
|
|
1094
|
+
# the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
|
|
1095
|
+
#
|
|
1096
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit#proration
|
|
1097
|
+
module Proration
|
|
1098
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1099
|
+
|
|
1100
|
+
NONE = :NONE
|
|
1101
|
+
FIRST = :FIRST
|
|
1102
|
+
LAST = :LAST
|
|
1103
|
+
FIRST_AND_LAST = :FIRST_AND_LAST
|
|
1104
|
+
|
|
1105
|
+
# @!method self.values
|
|
1106
|
+
# @return [Array<Symbol>]
|
|
1107
|
+
end
|
|
1108
|
+
|
|
1109
|
+
# The frequency at which the recurring commits will be created. If not provided: -
|
|
1110
|
+
# The commits will be created on the usage invoice frequency. If provided: - The
|
|
1111
|
+
# period defined in the duration will correspond to this frequency. - Commits will
|
|
1112
|
+
# be created aligned with the recurring commit's starting_at rather than the usage
|
|
1113
|
+
# invoice dates.
|
|
1114
|
+
#
|
|
1115
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit#recurrence_frequency
|
|
1116
|
+
module RecurrenceFrequency
|
|
1117
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1118
|
+
|
|
1119
|
+
MONTHLY = :MONTHLY
|
|
1120
|
+
QUARTERLY = :QUARTERLY
|
|
1121
|
+
ANNUAL = :ANNUAL
|
|
1122
|
+
WEEKLY = :WEEKLY
|
|
1123
|
+
|
|
1124
|
+
# @!method self.values
|
|
1125
|
+
# @return [Array<Symbol>]
|
|
1126
|
+
end
|
|
1127
|
+
end
|
|
1128
|
+
|
|
1129
|
+
# Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
1130
|
+
# usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
1131
|
+
# `ending_before` date for consolidation to occur. This field cannot be modified
|
|
1132
|
+
# after a Contract has been created. If this field is omitted, charges will appear
|
|
1133
|
+
# on a separate invoice from usage charges.
|
|
1134
|
+
#
|
|
1135
|
+
# @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract#scheduled_charges_on_usage_invoices
|
|
1136
|
+
module ScheduledChargesOnUsageInvoices
|
|
1137
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1138
|
+
|
|
1139
|
+
ALL = :ALL
|
|
1140
|
+
|
|
1141
|
+
# @!method self.values
|
|
1142
|
+
# @return [Array<Symbol>]
|
|
1143
|
+
end
|
|
1144
|
+
end
|
|
1145
|
+
end
|
|
15
1146
|
end
|
|
16
1147
|
end
|
|
17
1148
|
end
|