metronome-sdk 2.1.0 → 2.2.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 +39 -0
- data/README.md +1 -1
- data/lib/metronome_sdk/internal/transport/base_client.rb +7 -1
- data/lib/metronome_sdk/internal/transport/pooled_net_requester.rb +18 -12
- data/lib/metronome_sdk/internal/util.rb +7 -2
- data/lib/metronome_sdk/models/contract_v2.rb +29 -2
- data/lib/metronome_sdk/models/subscription.rb +32 -5
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +33 -1
- data/lib/metronome_sdk/models/v1/contract_add_manual_balance_entry_params.rb +10 -1
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +136 -20
- data/lib/metronome_sdk/models/v1/customer_create_params.rb +94 -2
- data/lib/metronome_sdk/models/v1/customer_set_billing_configurations_response.rb +111 -0
- data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +32 -1
- data/lib/metronome_sdk/models/v1/customers/billing_config_create_params.rb +15 -1
- data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rb +15 -1
- data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +33 -1
- data/lib/metronome_sdk/models/v1/customers/invoice.rb +20 -2
- data/lib/metronome_sdk/models/v1/customers/plan_list_price_adjustments_response.rb +8 -1
- data/lib/metronome_sdk/models/v1/setting_upsert_avalara_credentials_params.rb +10 -1
- data/lib/metronome_sdk/models/v1/settings/billing_provider_create_params.rb +1 -0
- data/lib/metronome_sdk/models/v1/usage_search_response.rb +6 -3
- data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +17 -1
- data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +17 -1
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +285 -22
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +177 -3
- data/lib/metronome_sdk/resources/v1/alerts.rb +3 -1
- data/lib/metronome_sdk/resources/v1/contracts.rb +6 -2
- data/lib/metronome_sdk/resources/v1/customers/alerts.rb +3 -1
- data/lib/metronome_sdk/resources/v1/customers/billing_config.rb +5 -1
- data/lib/metronome_sdk/resources/v1/customers.rb +5 -3
- data/lib/metronome_sdk/resources/v1/settings.rb +3 -1
- data/lib/metronome_sdk/resources/v2/contracts.rb +10 -2
- data/lib/metronome_sdk/version.rb +1 -1
- data/lib/metronome_sdk.rb +3 -0
- data/manifest.yaml +2 -0
- data/rbi/metronome_sdk/internal/transport/base_client.rbi +5 -0
- data/rbi/metronome_sdk/internal/transport/pooled_net_requester.rbi +6 -2
- data/rbi/metronome_sdk/internal/type/base_model.rbi +8 -4
- data/rbi/metronome_sdk/models/contract_v2.rbi +63 -6
- data/rbi/metronome_sdk/models/subscription.rbi +55 -9
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +69 -0
- data/rbi/metronome_sdk/models/v1/contract_add_manual_balance_entry_params.rbi +13 -0
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +288 -24
- data/rbi/metronome_sdk/models/v1/customer_create_params.rbi +204 -0
- data/rbi/metronome_sdk/models/v1/customer_set_billing_configurations_response.rbi +281 -0
- data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +67 -0
- data/rbi/metronome_sdk/models/v1/customers/billing_config_create_params.rbi +18 -0
- data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbi +18 -0
- data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +71 -0
- data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +32 -0
- data/rbi/metronome_sdk/models/v1/customers/plan_list_price_adjustments_response.rbi +9 -0
- data/rbi/metronome_sdk/models/v1/setting_upsert_avalara_credentials_params.rbi +13 -0
- data/rbi/metronome_sdk/models/v1/settings/billing_provider_create_params.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/usage_search_response.rbi +11 -3
- data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +22 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +22 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +616 -27
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +367 -3
- data/rbi/metronome_sdk/resources/v1/alerts.rbi +5 -0
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +9 -0
- data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +5 -0
- data/rbi/metronome_sdk/resources/v1/customers/billing_config.rbi +6 -0
- data/rbi/metronome_sdk/resources/v1/customers.rbi +8 -1
- data/rbi/metronome_sdk/resources/v1/settings.rbi +4 -0
- data/rbi/metronome_sdk/resources/v2/contracts.rbi +12 -0
- data/sig/metronome_sdk/internal/transport/base_client.rbs +2 -0
- data/sig/metronome_sdk/internal/transport/pooled_net_requester.rbs +4 -1
- data/sig/metronome_sdk/models/contract_v2.rbs +31 -6
- data/sig/metronome_sdk/models/subscription.rbs +22 -3
- data/sig/metronome_sdk/models/v1/alert_create_params.rbs +28 -0
- data/sig/metronome_sdk/models/v1/contract_add_manual_balance_entry_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +104 -0
- data/sig/metronome_sdk/models/v1/customer_create_params.rbs +83 -0
- data/sig/metronome_sdk/models/v1/customer_set_billing_configurations_response.rbs +119 -0
- data/sig/metronome_sdk/models/v1/customers/alert_retrieve_params.rbs +26 -1
- data/sig/metronome_sdk/models/v1/customers/billing_config_create_params.rbs +14 -0
- data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbs +14 -0
- data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +30 -0
- data/sig/metronome_sdk/models/v1/customers/invoice.rbs +18 -0
- data/sig/metronome_sdk/models/v1/customers/plan_list_price_adjustments_response.rbs +7 -0
- data/sig/metronome_sdk/models/v1/setting_upsert_avalara_credentials_params.rbs +8 -1
- data/sig/metronome_sdk/models/v1/settings/billing_provider_create_params.rbs +3 -1
- data/sig/metronome_sdk/models/v1/usage_search_response.rbs +3 -1
- data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +14 -0
- data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +14 -0
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +232 -3
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +131 -3
- data/sig/metronome_sdk/resources/v1/alerts.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/contracts.rbs +2 -0
- data/sig/metronome_sdk/resources/v1/customers/alerts.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/customers/billing_config.rbs +2 -0
- data/sig/metronome_sdk/resources/v1/customers.rbs +2 -1
- data/sig/metronome_sdk/resources/v1/settings.rbs +1 -0
- data/sig/metronome_sdk/resources/v2/contracts.rbs +4 -0
- metadata +5 -2
|
@@ -147,6 +147,12 @@ module MetronomeSDK
|
|
|
147
147
|
end
|
|
148
148
|
attr_accessor :adjustment_type
|
|
149
149
|
|
|
150
|
+
sig { returns(T.nilable(Float)) }
|
|
151
|
+
attr_reader :quantity
|
|
152
|
+
|
|
153
|
+
sig { params(quantity: Float).void }
|
|
154
|
+
attr_writer :quantity
|
|
155
|
+
|
|
150
156
|
# Used in pricing tiers. Indicates at what metric value the price applies.
|
|
151
157
|
sig { returns(T.nilable(Float)) }
|
|
152
158
|
attr_reader :tier
|
|
@@ -164,6 +170,7 @@ module MetronomeSDK
|
|
|
164
170
|
params(
|
|
165
171
|
adjustment_type:
|
|
166
172
|
MetronomeSDK::Models::V1::Customers::PlanListPriceAdjustmentsResponse::Price::AdjustmentType::OrSymbol,
|
|
173
|
+
quantity: Float,
|
|
167
174
|
tier: Float,
|
|
168
175
|
value: Float
|
|
169
176
|
).returns(T.attached_class)
|
|
@@ -171,6 +178,7 @@ module MetronomeSDK
|
|
|
171
178
|
def self.new(
|
|
172
179
|
# Determines how the value will be applied.
|
|
173
180
|
adjustment_type:,
|
|
181
|
+
quantity: nil,
|
|
174
182
|
# Used in pricing tiers. Indicates at what metric value the price applies.
|
|
175
183
|
tier: nil,
|
|
176
184
|
value: nil
|
|
@@ -182,6 +190,7 @@ module MetronomeSDK
|
|
|
182
190
|
{
|
|
183
191
|
adjustment_type:
|
|
184
192
|
MetronomeSDK::Models::V1::Customers::PlanListPriceAdjustmentsResponse::Price::AdjustmentType::TaggedSymbol,
|
|
193
|
+
quantity: Float,
|
|
185
194
|
tier: Float,
|
|
186
195
|
value: Float
|
|
187
196
|
}
|
|
@@ -36,6 +36,14 @@ module MetronomeSDK
|
|
|
36
36
|
sig { returns(T::Array[String]) }
|
|
37
37
|
attr_accessor :delivery_method_ids
|
|
38
38
|
|
|
39
|
+
# Commit transactions if you want Metronome tax calculations used for reporting
|
|
40
|
+
# and tax filings.
|
|
41
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
42
|
+
attr_reader :commit_transactions
|
|
43
|
+
|
|
44
|
+
sig { params(commit_transactions: T::Boolean).void }
|
|
45
|
+
attr_writer :commit_transactions
|
|
46
|
+
|
|
39
47
|
sig do
|
|
40
48
|
params(
|
|
41
49
|
avalara_environment:
|
|
@@ -43,6 +51,7 @@ module MetronomeSDK
|
|
|
43
51
|
avalara_password: String,
|
|
44
52
|
avalara_username: String,
|
|
45
53
|
delivery_method_ids: T::Array[String],
|
|
54
|
+
commit_transactions: T::Boolean,
|
|
46
55
|
request_options: MetronomeSDK::RequestOptions::OrHash
|
|
47
56
|
).returns(T.attached_class)
|
|
48
57
|
end
|
|
@@ -56,6 +65,9 @@ module MetronomeSDK
|
|
|
56
65
|
# The delivery method IDs of the billing provider configurations to update, can be
|
|
57
66
|
# found in the response of the `/listConfiguredBillingProviders` endpoint.
|
|
58
67
|
delivery_method_ids:,
|
|
68
|
+
# Commit transactions if you want Metronome tax calculations used for reporting
|
|
69
|
+
# and tax filings.
|
|
70
|
+
commit_transactions: nil,
|
|
59
71
|
request_options: {}
|
|
60
72
|
)
|
|
61
73
|
end
|
|
@@ -68,6 +80,7 @@ module MetronomeSDK
|
|
|
68
80
|
avalara_password: String,
|
|
69
81
|
avalara_username: String,
|
|
70
82
|
delivery_method_ids: T::Array[String],
|
|
83
|
+
commit_transactions: T::Boolean,
|
|
71
84
|
request_options: MetronomeSDK::RequestOptions
|
|
72
85
|
}
|
|
73
86
|
)
|
|
@@ -99,6 +99,11 @@ module MetronomeSDK
|
|
|
99
99
|
:azure_marketplace,
|
|
100
100
|
MetronomeSDK::V1::Settings::BillingProviderCreateParams::BillingProvider::TaggedSymbol
|
|
101
101
|
)
|
|
102
|
+
GCP_MARKETPLACE =
|
|
103
|
+
T.let(
|
|
104
|
+
:gcp_marketplace,
|
|
105
|
+
MetronomeSDK::V1::Settings::BillingProviderCreateParams::BillingProvider::TaggedSymbol
|
|
106
|
+
)
|
|
102
107
|
|
|
103
108
|
sig do
|
|
104
109
|
override.returns(
|
|
@@ -180,7 +180,8 @@ module MetronomeSDK
|
|
|
180
180
|
sig { params(aggregation_key: String).void }
|
|
181
181
|
attr_writer :aggregation_key
|
|
182
182
|
|
|
183
|
-
# Specifies the type of aggregation performed on matching events.
|
|
183
|
+
# Specifies the type of aggregation performed on matching events. Includes
|
|
184
|
+
# "custom_sql" for events search endpoint responses.
|
|
184
185
|
sig do
|
|
185
186
|
returns(
|
|
186
187
|
T.nilable(
|
|
@@ -296,7 +297,8 @@ module MetronomeSDK
|
|
|
296
297
|
# key must be one of the property filter names and is not applicable when the
|
|
297
298
|
# aggregation type is 'count'.
|
|
298
299
|
aggregation_key: nil,
|
|
299
|
-
# Specifies the type of aggregation performed on matching events.
|
|
300
|
+
# Specifies the type of aggregation performed on matching events. Includes
|
|
301
|
+
# "custom_sql" for events search endpoint responses.
|
|
300
302
|
aggregation_type: nil,
|
|
301
303
|
# RFC 3339 timestamp indicating when the billable metric was archived. If not
|
|
302
304
|
# provided, the billable metric is not archived.
|
|
@@ -345,7 +347,8 @@ module MetronomeSDK
|
|
|
345
347
|
def to_hash
|
|
346
348
|
end
|
|
347
349
|
|
|
348
|
-
# Specifies the type of aggregation performed on matching events.
|
|
350
|
+
# Specifies the type of aggregation performed on matching events. Includes
|
|
351
|
+
# "custom_sql" for events search endpoint responses.
|
|
349
352
|
module AggregationType
|
|
350
353
|
extend MetronomeSDK::Internal::Type::Enum
|
|
351
354
|
|
|
@@ -383,6 +386,11 @@ module MetronomeSDK
|
|
|
383
386
|
:UNIQUE,
|
|
384
387
|
MetronomeSDK::Models::V1::UsageSearchResponseItem::MatchedBillableMetric::AggregationType::TaggedSymbol
|
|
385
388
|
)
|
|
389
|
+
CUSTOM_SQL =
|
|
390
|
+
T.let(
|
|
391
|
+
:custom_sql,
|
|
392
|
+
MetronomeSDK::Models::V1::UsageSearchResponseItem::MatchedBillableMetric::AggregationType::TaggedSymbol
|
|
393
|
+
)
|
|
386
394
|
|
|
387
395
|
sig do
|
|
388
396
|
override.returns(
|
|
@@ -52,6 +52,13 @@ module MetronomeSDK
|
|
|
52
52
|
sig { returns(T.nilable(T::Array[String])) }
|
|
53
53
|
attr_accessor :applicable_product_tags
|
|
54
54
|
|
|
55
|
+
# Updated description for the commit
|
|
56
|
+
sig { returns(T.nilable(String)) }
|
|
57
|
+
attr_reader :description
|
|
58
|
+
|
|
59
|
+
sig { params(description: String).void }
|
|
60
|
+
attr_writer :description
|
|
61
|
+
|
|
55
62
|
# Optional configuration for commit hierarchy access control
|
|
56
63
|
sig { returns(T.nilable(MetronomeSDK::CommitHierarchyConfiguration)) }
|
|
57
64
|
attr_reader :hierarchy_configuration
|
|
@@ -88,6 +95,13 @@ module MetronomeSDK
|
|
|
88
95
|
end
|
|
89
96
|
attr_writer :invoice_schedule
|
|
90
97
|
|
|
98
|
+
# Updated name for the commit
|
|
99
|
+
sig { returns(T.nilable(String)) }
|
|
100
|
+
attr_reader :name
|
|
101
|
+
|
|
102
|
+
sig { params(name: String).void }
|
|
103
|
+
attr_writer :name
|
|
104
|
+
|
|
91
105
|
# If multiple commits are applicable, the one with the lower priority will apply
|
|
92
106
|
# first.
|
|
93
107
|
sig { returns(T.nilable(Float)) }
|
|
@@ -136,11 +150,13 @@ module MetronomeSDK
|
|
|
136
150
|
MetronomeSDK::V2::ContractEditCommitParams::AccessSchedule::OrHash,
|
|
137
151
|
applicable_product_ids: T.nilable(T::Array[String]),
|
|
138
152
|
applicable_product_tags: T.nilable(T::Array[String]),
|
|
153
|
+
description: String,
|
|
139
154
|
hierarchy_configuration:
|
|
140
155
|
MetronomeSDK::CommitHierarchyConfiguration::OrHash,
|
|
141
156
|
invoice_contract_id: String,
|
|
142
157
|
invoice_schedule:
|
|
143
158
|
MetronomeSDK::V2::ContractEditCommitParams::InvoiceSchedule::OrHash,
|
|
159
|
+
name: String,
|
|
144
160
|
priority: T.nilable(Float),
|
|
145
161
|
product_id: String,
|
|
146
162
|
rate_type:
|
|
@@ -164,11 +180,15 @@ module MetronomeSDK
|
|
|
164
180
|
# applicable_product_tags or specifiers are not provided, the commit applies to
|
|
165
181
|
# all products.
|
|
166
182
|
applicable_product_tags: nil,
|
|
183
|
+
# Updated description for the commit
|
|
184
|
+
description: nil,
|
|
167
185
|
# Optional configuration for commit hierarchy access control
|
|
168
186
|
hierarchy_configuration: nil,
|
|
169
187
|
# ID of contract to use for invoicing
|
|
170
188
|
invoice_contract_id: nil,
|
|
171
189
|
invoice_schedule: nil,
|
|
190
|
+
# Updated name for the commit
|
|
191
|
+
name: nil,
|
|
172
192
|
# If multiple commits are applicable, the one with the lower priority will apply
|
|
173
193
|
# first.
|
|
174
194
|
priority: nil,
|
|
@@ -197,11 +217,13 @@ module MetronomeSDK
|
|
|
197
217
|
MetronomeSDK::V2::ContractEditCommitParams::AccessSchedule,
|
|
198
218
|
applicable_product_ids: T.nilable(T::Array[String]),
|
|
199
219
|
applicable_product_tags: T.nilable(T::Array[String]),
|
|
220
|
+
description: String,
|
|
200
221
|
hierarchy_configuration:
|
|
201
222
|
MetronomeSDK::CommitHierarchyConfiguration,
|
|
202
223
|
invoice_contract_id: String,
|
|
203
224
|
invoice_schedule:
|
|
204
225
|
MetronomeSDK::V2::ContractEditCommitParams::InvoiceSchedule,
|
|
226
|
+
name: String,
|
|
205
227
|
priority: T.nilable(Float),
|
|
206
228
|
product_id: String,
|
|
207
229
|
rate_type:
|
|
@@ -50,6 +50,13 @@ module MetronomeSDK
|
|
|
50
50
|
sig { returns(T.nilable(T::Array[String])) }
|
|
51
51
|
attr_accessor :applicable_product_tags
|
|
52
52
|
|
|
53
|
+
# Updated description for the credit
|
|
54
|
+
sig { returns(T.nilable(String)) }
|
|
55
|
+
attr_reader :description
|
|
56
|
+
|
|
57
|
+
sig { params(description: String).void }
|
|
58
|
+
attr_writer :description
|
|
59
|
+
|
|
53
60
|
# Optional configuration for credit hierarchy access control
|
|
54
61
|
sig { returns(T.nilable(MetronomeSDK::CommitHierarchyConfiguration)) }
|
|
55
62
|
attr_reader :hierarchy_configuration
|
|
@@ -62,6 +69,13 @@ module MetronomeSDK
|
|
|
62
69
|
end
|
|
63
70
|
attr_writer :hierarchy_configuration
|
|
64
71
|
|
|
72
|
+
# Updated name for the credit
|
|
73
|
+
sig { returns(T.nilable(String)) }
|
|
74
|
+
attr_reader :name
|
|
75
|
+
|
|
76
|
+
sig { params(name: String).void }
|
|
77
|
+
attr_writer :name
|
|
78
|
+
|
|
65
79
|
# If multiple commits are applicable, the one with the lower priority will apply
|
|
66
80
|
# first.
|
|
67
81
|
sig { returns(T.nilable(Float)) }
|
|
@@ -110,8 +124,10 @@ module MetronomeSDK
|
|
|
110
124
|
MetronomeSDK::V2::ContractEditCreditParams::AccessSchedule::OrHash,
|
|
111
125
|
applicable_product_ids: T.nilable(T::Array[String]),
|
|
112
126
|
applicable_product_tags: T.nilable(T::Array[String]),
|
|
127
|
+
description: String,
|
|
113
128
|
hierarchy_configuration:
|
|
114
129
|
MetronomeSDK::CommitHierarchyConfiguration::OrHash,
|
|
130
|
+
name: String,
|
|
115
131
|
priority: T.nilable(Float),
|
|
116
132
|
product_id: String,
|
|
117
133
|
rate_type:
|
|
@@ -133,8 +149,12 @@ module MetronomeSDK
|
|
|
133
149
|
# Which tags the credit applies to. If both applicable_product_ids and
|
|
134
150
|
# applicable_product_tags are not provided, the credit applies to all products.
|
|
135
151
|
applicable_product_tags: nil,
|
|
152
|
+
# Updated description for the credit
|
|
153
|
+
description: nil,
|
|
136
154
|
# Optional configuration for credit hierarchy access control
|
|
137
155
|
hierarchy_configuration: nil,
|
|
156
|
+
# Updated name for the credit
|
|
157
|
+
name: nil,
|
|
138
158
|
# If multiple commits are applicable, the one with the lower priority will apply
|
|
139
159
|
# first.
|
|
140
160
|
priority: nil,
|
|
@@ -163,8 +183,10 @@ module MetronomeSDK
|
|
|
163
183
|
MetronomeSDK::V2::ContractEditCreditParams::AccessSchedule,
|
|
164
184
|
applicable_product_ids: T.nilable(T::Array[String]),
|
|
165
185
|
applicable_product_tags: T.nilable(T::Array[String]),
|
|
186
|
+
description: String,
|
|
166
187
|
hierarchy_configuration:
|
|
167
188
|
MetronomeSDK::CommitHierarchyConfiguration,
|
|
189
|
+
name: String,
|
|
168
190
|
priority: T.nilable(Float),
|
|
169
191
|
product_id: String,
|
|
170
192
|
rate_type:
|