metronome-sdk 2.2.0 → 3.0.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 +26 -0
- data/README.md +10 -1
- data/lib/metronome_sdk/models/commit.rb +69 -1
- data/lib/metronome_sdk/models/contract_v2.rb +18 -2
- data/lib/metronome_sdk/models/credit.rb +69 -1
- data/lib/metronome_sdk/models/rate.rb +1 -11
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb +1 -11
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rb +1 -11
- data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rb +1 -11
- data/lib/metronome_sdk/models/v1/custom_field_add_key_params.rb +4 -0
- data/lib/metronome_sdk/models/v1/custom_field_delete_values_params.rb +4 -0
- data/lib/metronome_sdk/models/v1/custom_field_list_keys_params.rb +4 -0
- data/lib/metronome_sdk/models/v1/custom_field_list_keys_response.rb +4 -0
- data/lib/metronome_sdk/models/v1/custom_field_remove_key_params.rb +4 -0
- data/lib/metronome_sdk/models/v1/custom_field_set_values_params.rb +4 -0
- data/lib/metronome_sdk/models/v1/customers/invoice.rb +51 -1
- data/lib/metronome_sdk/models/v1/payment.rb +40 -1
- data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +1 -3
- data/lib/metronome_sdk/resources/v1/contracts/rate_cards.rb +1 -1
- data/lib/metronome_sdk/resources/v1/customers/billing_config.rb +5 -5
- data/lib/metronome_sdk/resources/v1/customers/invoices.rb +7 -7
- data/lib/metronome_sdk/resources/v1/customers/plans.rb +5 -5
- data/lib/metronome_sdk/resources/v1/customers.rb +7 -7
- data/lib/metronome_sdk/resources/v1/plans.rb +2 -2
- data/lib/metronome_sdk/resources/v1/usage.rb +7 -7
- data/lib/metronome_sdk/version.rb +1 -1
- data/rbi/metronome_sdk/models/commit.rbi +171 -0
- data/rbi/metronome_sdk/models/contract_v2.rbi +22 -0
- data/rbi/metronome_sdk/models/credit.rbi +171 -0
- data/rbi/metronome_sdk/models/rate.rbi +3 -18
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbi +3 -18
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbi +0 -15
- data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbi +3 -18
- data/rbi/metronome_sdk/models/v1/custom_field_add_key_params.rbi +20 -0
- data/rbi/metronome_sdk/models/v1/custom_field_delete_values_params.rbi +20 -0
- data/rbi/metronome_sdk/models/v1/custom_field_list_keys_params.rbi +20 -0
- data/rbi/metronome_sdk/models/v1/custom_field_list_keys_response.rbi +20 -0
- data/rbi/metronome_sdk/models/v1/custom_field_remove_key_params.rbi +20 -0
- data/rbi/metronome_sdk/models/v1/custom_field_set_values_params.rbi +20 -0
- data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +89 -0
- data/rbi/metronome_sdk/models/v1/payment.rbi +79 -0
- data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +0 -5
- data/rbi/metronome_sdk/resources/v1/contracts/rate_cards.rbi +1 -1
- data/rbi/metronome_sdk/resources/v1/customers/billing_config.rbi +5 -5
- data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +7 -7
- data/rbi/metronome_sdk/resources/v1/customers/plans.rbi +5 -5
- data/rbi/metronome_sdk/resources/v1/customers.rbi +7 -7
- data/rbi/metronome_sdk/resources/v1/plans.rbi +2 -2
- data/rbi/metronome_sdk/resources/v1/usage.rbi +7 -7
- data/sig/metronome_sdk/models/commit.rbs +74 -0
- data/sig/metronome_sdk/models/contract_v2.rbs +14 -0
- data/sig/metronome_sdk/models/credit.rbs +74 -0
- data/sig/metronome_sdk/models/rate.rbs +3 -10
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbs +3 -10
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbs +1 -8
- data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_response.rbs +3 -10
- data/sig/metronome_sdk/models/v1/custom_field_add_key_params.rbs +8 -0
- data/sig/metronome_sdk/models/v1/custom_field_delete_values_params.rbs +8 -0
- data/sig/metronome_sdk/models/v1/custom_field_list_keys_params.rbs +8 -0
- data/sig/metronome_sdk/models/v1/custom_field_list_keys_response.rbs +8 -0
- data/sig/metronome_sdk/models/v1/custom_field_remove_key_params.rbs +8 -0
- data/sig/metronome_sdk/models/v1/custom_field_set_values_params.rbs +8 -0
- data/sig/metronome_sdk/models/v1/customers/invoice.rbs +46 -0
- data/sig/metronome_sdk/models/v1/payment.rbs +45 -0
- data/sig/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbs +0 -1
- metadata +16 -2
|
@@ -238,6 +238,17 @@ module MetronomeSDK
|
|
|
238
238
|
end
|
|
239
239
|
attr_writer :reseller_royalty
|
|
240
240
|
|
|
241
|
+
sig do
|
|
242
|
+
returns(
|
|
243
|
+
T.nilable(
|
|
244
|
+
T::Array[
|
|
245
|
+
MetronomeSDK::V1::Customers::Invoice::RevenueSystemInvoice
|
|
246
|
+
]
|
|
247
|
+
)
|
|
248
|
+
)
|
|
249
|
+
end
|
|
250
|
+
attr_accessor :revenue_system_invoices
|
|
251
|
+
|
|
241
252
|
# This field's availability is dependent on your client's configuration.
|
|
242
253
|
sig { returns(T.nilable(String)) }
|
|
243
254
|
attr_reader :salesforce_opportunity_id
|
|
@@ -301,6 +312,12 @@ module MetronomeSDK
|
|
|
301
312
|
plan_name: String,
|
|
302
313
|
reseller_royalty:
|
|
303
314
|
MetronomeSDK::V1::Customers::Invoice::ResellerRoyalty::OrHash,
|
|
315
|
+
revenue_system_invoices:
|
|
316
|
+
T.nilable(
|
|
317
|
+
T::Array[
|
|
318
|
+
MetronomeSDK::V1::Customers::Invoice::RevenueSystemInvoice::OrHash
|
|
319
|
+
]
|
|
320
|
+
),
|
|
304
321
|
salesforce_opportunity_id: String,
|
|
305
322
|
start_timestamp: Time,
|
|
306
323
|
subtotal: Float
|
|
@@ -348,6 +365,7 @@ module MetronomeSDK
|
|
|
348
365
|
plan_name: nil,
|
|
349
366
|
# Only present for contract invoices with reseller royalties.
|
|
350
367
|
reseller_royalty: nil,
|
|
368
|
+
revenue_system_invoices: nil,
|
|
351
369
|
# This field's availability is dependent on your client's configuration.
|
|
352
370
|
salesforce_opportunity_id: nil,
|
|
353
371
|
# Beginning of the usage period this invoice covers (UTC)
|
|
@@ -398,6 +416,12 @@ module MetronomeSDK
|
|
|
398
416
|
plan_name: String,
|
|
399
417
|
reseller_royalty:
|
|
400
418
|
MetronomeSDK::V1::Customers::Invoice::ResellerRoyalty,
|
|
419
|
+
revenue_system_invoices:
|
|
420
|
+
T.nilable(
|
|
421
|
+
T::Array[
|
|
422
|
+
MetronomeSDK::V1::Customers::Invoice::RevenueSystemInvoice
|
|
423
|
+
]
|
|
424
|
+
),
|
|
401
425
|
salesforce_opportunity_id: String,
|
|
402
426
|
start_timestamp: Time,
|
|
403
427
|
subtotal: Float
|
|
@@ -2705,6 +2729,71 @@ module MetronomeSDK
|
|
|
2705
2729
|
end
|
|
2706
2730
|
end
|
|
2707
2731
|
end
|
|
2732
|
+
|
|
2733
|
+
class RevenueSystemInvoice < MetronomeSDK::Internal::Type::BaseModel
|
|
2734
|
+
OrHash =
|
|
2735
|
+
T.type_alias do
|
|
2736
|
+
T.any(
|
|
2737
|
+
MetronomeSDK::V1::Customers::Invoice::RevenueSystemInvoice,
|
|
2738
|
+
MetronomeSDK::Internal::AnyHash
|
|
2739
|
+
)
|
|
2740
|
+
end
|
|
2741
|
+
|
|
2742
|
+
sig { returns(String) }
|
|
2743
|
+
attr_accessor :revenue_system_external_entity_type
|
|
2744
|
+
|
|
2745
|
+
sig { returns(String) }
|
|
2746
|
+
attr_accessor :revenue_system_provider
|
|
2747
|
+
|
|
2748
|
+
sig { returns(String) }
|
|
2749
|
+
attr_accessor :sync_status
|
|
2750
|
+
|
|
2751
|
+
# The error message from the revenue system, if available.
|
|
2752
|
+
sig { returns(T.nilable(String)) }
|
|
2753
|
+
attr_reader :error_message
|
|
2754
|
+
|
|
2755
|
+
sig { params(error_message: String).void }
|
|
2756
|
+
attr_writer :error_message
|
|
2757
|
+
|
|
2758
|
+
sig { returns(T.nilable(String)) }
|
|
2759
|
+
attr_reader :revenue_system_external_entity_id
|
|
2760
|
+
|
|
2761
|
+
sig { params(revenue_system_external_entity_id: String).void }
|
|
2762
|
+
attr_writer :revenue_system_external_entity_id
|
|
2763
|
+
|
|
2764
|
+
sig do
|
|
2765
|
+
params(
|
|
2766
|
+
revenue_system_external_entity_type: String,
|
|
2767
|
+
revenue_system_provider: String,
|
|
2768
|
+
sync_status: String,
|
|
2769
|
+
error_message: String,
|
|
2770
|
+
revenue_system_external_entity_id: String
|
|
2771
|
+
).returns(T.attached_class)
|
|
2772
|
+
end
|
|
2773
|
+
def self.new(
|
|
2774
|
+
revenue_system_external_entity_type:,
|
|
2775
|
+
revenue_system_provider:,
|
|
2776
|
+
sync_status:,
|
|
2777
|
+
# The error message from the revenue system, if available.
|
|
2778
|
+
error_message: nil,
|
|
2779
|
+
revenue_system_external_entity_id: nil
|
|
2780
|
+
)
|
|
2781
|
+
end
|
|
2782
|
+
|
|
2783
|
+
sig do
|
|
2784
|
+
override.returns(
|
|
2785
|
+
{
|
|
2786
|
+
revenue_system_external_entity_type: String,
|
|
2787
|
+
revenue_system_provider: String,
|
|
2788
|
+
sync_status: String,
|
|
2789
|
+
error_message: String,
|
|
2790
|
+
revenue_system_external_entity_id: String
|
|
2791
|
+
}
|
|
2792
|
+
)
|
|
2793
|
+
end
|
|
2794
|
+
def to_hash
|
|
2795
|
+
end
|
|
2796
|
+
end
|
|
2708
2797
|
end
|
|
2709
2798
|
end
|
|
2710
2799
|
end
|
|
@@ -72,6 +72,21 @@ module MetronomeSDK
|
|
|
72
72
|
end
|
|
73
73
|
attr_writer :payment_gateway
|
|
74
74
|
|
|
75
|
+
sig do
|
|
76
|
+
returns(
|
|
77
|
+
T.nilable(T::Array[MetronomeSDK::V1::Payment::RevenueSystemPayment])
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
attr_reader :revenue_system_payments
|
|
81
|
+
|
|
82
|
+
sig do
|
|
83
|
+
params(
|
|
84
|
+
revenue_system_payments:
|
|
85
|
+
T::Array[MetronomeSDK::V1::Payment::RevenueSystemPayment::OrHash]
|
|
86
|
+
).void
|
|
87
|
+
end
|
|
88
|
+
attr_writer :revenue_system_payments
|
|
89
|
+
|
|
75
90
|
sig do
|
|
76
91
|
returns(T.nilable(MetronomeSDK::V1::PaymentStatus::TaggedSymbol))
|
|
77
92
|
end
|
|
@@ -98,6 +113,8 @@ module MetronomeSDK
|
|
|
98
113
|
fiat_credit_type: MetronomeSDK::CreditTypeData::OrHash,
|
|
99
114
|
invoice_id: String,
|
|
100
115
|
payment_gateway: MetronomeSDK::V1::Payment::PaymentGateway::OrHash,
|
|
116
|
+
revenue_system_payments:
|
|
117
|
+
T::Array[MetronomeSDK::V1::Payment::RevenueSystemPayment::OrHash],
|
|
101
118
|
status: MetronomeSDK::V1::PaymentStatus::OrSymbol,
|
|
102
119
|
updated_at: Time
|
|
103
120
|
).returns(T.attached_class)
|
|
@@ -113,6 +130,7 @@ module MetronomeSDK
|
|
|
113
130
|
fiat_credit_type: nil,
|
|
114
131
|
invoice_id: nil,
|
|
115
132
|
payment_gateway: nil,
|
|
133
|
+
revenue_system_payments: nil,
|
|
116
134
|
status: nil,
|
|
117
135
|
updated_at: nil
|
|
118
136
|
)
|
|
@@ -131,6 +149,8 @@ module MetronomeSDK
|
|
|
131
149
|
fiat_credit_type: MetronomeSDK::CreditTypeData,
|
|
132
150
|
invoice_id: String,
|
|
133
151
|
payment_gateway: MetronomeSDK::V1::Payment::PaymentGateway,
|
|
152
|
+
revenue_system_payments:
|
|
153
|
+
T::Array[MetronomeSDK::V1::Payment::RevenueSystemPayment],
|
|
134
154
|
status: MetronomeSDK::V1::PaymentStatus::TaggedSymbol,
|
|
135
155
|
updated_at: Time
|
|
136
156
|
}
|
|
@@ -318,6 +338,65 @@ module MetronomeSDK
|
|
|
318
338
|
end
|
|
319
339
|
end
|
|
320
340
|
end
|
|
341
|
+
|
|
342
|
+
class RevenueSystemPayment < MetronomeSDK::Internal::Type::BaseModel
|
|
343
|
+
OrHash =
|
|
344
|
+
T.type_alias do
|
|
345
|
+
T.any(
|
|
346
|
+
MetronomeSDK::V1::Payment::RevenueSystemPayment,
|
|
347
|
+
MetronomeSDK::Internal::AnyHash
|
|
348
|
+
)
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
sig { returns(String) }
|
|
352
|
+
attr_accessor :revenue_system_provider
|
|
353
|
+
|
|
354
|
+
sig { returns(String) }
|
|
355
|
+
attr_accessor :sync_status
|
|
356
|
+
|
|
357
|
+
# The error message from the revenue system, if available.
|
|
358
|
+
sig { returns(T.nilable(String)) }
|
|
359
|
+
attr_reader :error_message
|
|
360
|
+
|
|
361
|
+
sig { params(error_message: String).void }
|
|
362
|
+
attr_writer :error_message
|
|
363
|
+
|
|
364
|
+
sig { returns(T.nilable(String)) }
|
|
365
|
+
attr_reader :revenue_system_external_payment_id
|
|
366
|
+
|
|
367
|
+
sig { params(revenue_system_external_payment_id: String).void }
|
|
368
|
+
attr_writer :revenue_system_external_payment_id
|
|
369
|
+
|
|
370
|
+
sig do
|
|
371
|
+
params(
|
|
372
|
+
revenue_system_provider: String,
|
|
373
|
+
sync_status: String,
|
|
374
|
+
error_message: String,
|
|
375
|
+
revenue_system_external_payment_id: String
|
|
376
|
+
).returns(T.attached_class)
|
|
377
|
+
end
|
|
378
|
+
def self.new(
|
|
379
|
+
revenue_system_provider:,
|
|
380
|
+
sync_status:,
|
|
381
|
+
# The error message from the revenue system, if available.
|
|
382
|
+
error_message: nil,
|
|
383
|
+
revenue_system_external_payment_id: nil
|
|
384
|
+
)
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
sig do
|
|
388
|
+
override.returns(
|
|
389
|
+
{
|
|
390
|
+
revenue_system_provider: String,
|
|
391
|
+
sync_status: String,
|
|
392
|
+
error_message: String,
|
|
393
|
+
revenue_system_external_payment_id: String
|
|
394
|
+
}
|
|
395
|
+
)
|
|
396
|
+
end
|
|
397
|
+
def to_hash
|
|
398
|
+
end
|
|
399
|
+
end
|
|
321
400
|
end
|
|
322
401
|
end
|
|
323
402
|
end
|
|
@@ -69,7 +69,6 @@ module MetronomeSDK
|
|
|
69
69
|
pricing_group_values: T::Hash[Symbol, String],
|
|
70
70
|
quantity: Float,
|
|
71
71
|
tiers: T::Array[MetronomeSDK::Tier::OrHash],
|
|
72
|
-
use_list_prices: T::Boolean,
|
|
73
72
|
request_options: MetronomeSDK::RequestOptions::OrHash
|
|
74
73
|
).returns(
|
|
75
74
|
MetronomeSDK::Models::V1::Contracts::RateCards::RateAddResponse
|
|
@@ -113,10 +112,6 @@ module MetronomeSDK
|
|
|
113
112
|
quantity: nil,
|
|
114
113
|
# Only set for TIERED rate_type.
|
|
115
114
|
tiers: nil,
|
|
116
|
-
# Only set for PERCENTAGE rate_type. Defaults to false. If true, rate is computed
|
|
117
|
-
# using list prices rather than the standard rates for this product on the
|
|
118
|
-
# contract.
|
|
119
|
-
use_list_prices: nil,
|
|
120
115
|
request_options: {}
|
|
121
116
|
)
|
|
122
117
|
end
|
|
@@ -24,20 +24,20 @@ module MetronomeSDK
|
|
|
24
24
|
).void
|
|
25
25
|
end
|
|
26
26
|
def create(
|
|
27
|
-
# Path param
|
|
27
|
+
# Path param
|
|
28
28
|
customer_id:,
|
|
29
29
|
# Path param: The billing provider (e.g. stripe)
|
|
30
30
|
billing_provider_type:,
|
|
31
31
|
# Body param: The customer ID in the billing provider's system. For Azure, this is
|
|
32
32
|
# the subscription ID.
|
|
33
33
|
billing_provider_customer_id:,
|
|
34
|
-
# Body param
|
|
34
|
+
# Body param
|
|
35
35
|
aws_customer_account_id: nil,
|
|
36
|
-
# Body param
|
|
36
|
+
# Body param
|
|
37
37
|
aws_customer_id: nil,
|
|
38
|
-
# Body param
|
|
38
|
+
# Body param
|
|
39
39
|
aws_product_code: nil,
|
|
40
|
-
# Body param
|
|
40
|
+
# Body param
|
|
41
41
|
aws_region: nil,
|
|
42
42
|
# Body param: The collection method for the customer's invoices. NOTE:
|
|
43
43
|
# `auto_charge_payment_intent` and `manually_charge_payment_intent` are in beta.
|
|
@@ -56,9 +56,9 @@ module MetronomeSDK
|
|
|
56
56
|
)
|
|
57
57
|
end
|
|
58
58
|
def retrieve(
|
|
59
|
-
# Path param
|
|
59
|
+
# Path param
|
|
60
60
|
customer_id:,
|
|
61
|
-
# Path param
|
|
61
|
+
# Path param
|
|
62
62
|
invoice_id:,
|
|
63
63
|
# Query param: If set, all zero quantity line items will be filtered out of the
|
|
64
64
|
# response
|
|
@@ -133,7 +133,7 @@ module MetronomeSDK
|
|
|
133
133
|
)
|
|
134
134
|
end
|
|
135
135
|
def list(
|
|
136
|
-
# Path param
|
|
136
|
+
# Path param
|
|
137
137
|
customer_id:,
|
|
138
138
|
# Query param: Only return invoices for the specified credit type
|
|
139
139
|
credit_type_id: nil,
|
|
@@ -176,7 +176,7 @@ module MetronomeSDK
|
|
|
176
176
|
)
|
|
177
177
|
end
|
|
178
178
|
def add_charge(
|
|
179
|
-
# Path param
|
|
179
|
+
# Path param
|
|
180
180
|
customer_id:,
|
|
181
181
|
# Body param: The Metronome ID of the charge to add to the invoice. Note that the
|
|
182
182
|
# charge must be on a product that is not on the current plan, and the product
|
|
@@ -184,14 +184,14 @@ module MetronomeSDK
|
|
|
184
184
|
charge_id:,
|
|
185
185
|
# Body param: The Metronome ID of the customer plan to add the charge to.
|
|
186
186
|
customer_plan_id:,
|
|
187
|
-
# Body param
|
|
187
|
+
# Body param
|
|
188
188
|
description:,
|
|
189
189
|
# Body param: The start_timestamp of the invoice to add the charge to.
|
|
190
190
|
invoice_start_timestamp:,
|
|
191
191
|
# Body param: The price of the charge. This price will match the currency on the
|
|
192
192
|
# invoice, e.g. USD cents.
|
|
193
193
|
price:,
|
|
194
|
-
# Body param
|
|
194
|
+
# Body param
|
|
195
195
|
quantity:,
|
|
196
196
|
request_options: {}
|
|
197
197
|
)
|
|
@@ -257,7 +257,7 @@ module MetronomeSDK
|
|
|
257
257
|
)
|
|
258
258
|
end
|
|
259
259
|
def list_breakdowns(
|
|
260
|
-
# Path param
|
|
260
|
+
# Path param
|
|
261
261
|
customer_id:,
|
|
262
262
|
# Query param: RFC 3339 timestamp. Breakdowns will only be returned for time
|
|
263
263
|
# windows that end on or before this time.
|
|
@@ -20,7 +20,7 @@ module MetronomeSDK
|
|
|
20
20
|
)
|
|
21
21
|
end
|
|
22
22
|
def list(
|
|
23
|
-
# Path param
|
|
23
|
+
# Path param
|
|
24
24
|
customer_id:,
|
|
25
25
|
# Query param: Max number of results that should be returned
|
|
26
26
|
limit: nil,
|
|
@@ -55,9 +55,9 @@ module MetronomeSDK
|
|
|
55
55
|
).returns(MetronomeSDK::Models::V1::Customers::PlanAddResponse)
|
|
56
56
|
end
|
|
57
57
|
def add(
|
|
58
|
-
# Path param
|
|
58
|
+
# Path param
|
|
59
59
|
customer_id:,
|
|
60
|
-
# Body param
|
|
60
|
+
# Body param
|
|
61
61
|
plan_id:,
|
|
62
62
|
# Body param: RFC 3339 timestamp for when the plan becomes active for this
|
|
63
63
|
# customer. Must be at 0:00 UTC (midnight).
|
|
@@ -97,7 +97,7 @@ module MetronomeSDK
|
|
|
97
97
|
).returns(MetronomeSDK::Models::V1::Customers::PlanEndResponse)
|
|
98
98
|
end
|
|
99
99
|
def end_(
|
|
100
|
-
# Path param
|
|
100
|
+
# Path param
|
|
101
101
|
customer_id:,
|
|
102
102
|
# Path param: the ID of a customer-plan relationship
|
|
103
103
|
customer_plan_id:,
|
|
@@ -135,7 +135,7 @@ module MetronomeSDK
|
|
|
135
135
|
)
|
|
136
136
|
end
|
|
137
137
|
def list_price_adjustments(
|
|
138
|
-
# Path param
|
|
138
|
+
# Path param
|
|
139
139
|
customer_id:,
|
|
140
140
|
# Path param: the ID of a customer-plan relationship
|
|
141
141
|
customer_plan_id:,
|
|
@@ -190,7 +190,7 @@ module MetronomeSDK
|
|
|
190
190
|
)
|
|
191
191
|
end
|
|
192
192
|
def list_billable_metrics(
|
|
193
|
-
# Path param
|
|
193
|
+
# Path param
|
|
194
194
|
customer_id:,
|
|
195
195
|
# Query param: If true, the list of returned metrics will include archived metrics
|
|
196
196
|
include_archived: nil,
|
|
@@ -224,7 +224,7 @@ module MetronomeSDK
|
|
|
224
224
|
)
|
|
225
225
|
end
|
|
226
226
|
def list_costs(
|
|
227
|
-
# Path param
|
|
227
|
+
# Path param
|
|
228
228
|
customer_id:,
|
|
229
229
|
# Query param: RFC 3339 timestamp (exclusive)
|
|
230
230
|
ending_before:,
|
|
@@ -256,7 +256,7 @@ module MetronomeSDK
|
|
|
256
256
|
).returns(MetronomeSDK::Models::V1::CustomerPreviewEventsResponse)
|
|
257
257
|
end
|
|
258
258
|
def preview_events(
|
|
259
|
-
# Path param
|
|
259
|
+
# Path param
|
|
260
260
|
customer_id:,
|
|
261
261
|
# Body param: Array of usage events to include in the preview calculation. Must
|
|
262
262
|
# contain at least one event in `merge` mode.
|
|
@@ -368,9 +368,9 @@ module MetronomeSDK
|
|
|
368
368
|
).void
|
|
369
369
|
end
|
|
370
370
|
def set_ingest_aliases(
|
|
371
|
-
# Path param
|
|
371
|
+
# Path param
|
|
372
372
|
customer_id:,
|
|
373
|
-
# Body param
|
|
373
|
+
# Body param
|
|
374
374
|
ingest_aliases:,
|
|
375
375
|
request_options: {}
|
|
376
376
|
)
|
|
@@ -389,7 +389,7 @@ module MetronomeSDK
|
|
|
389
389
|
).returns(MetronomeSDK::Models::V1::CustomerSetNameResponse)
|
|
390
390
|
end
|
|
391
391
|
def set_name(
|
|
392
|
-
# Path param
|
|
392
|
+
# Path param
|
|
393
393
|
customer_id:,
|
|
394
394
|
# Body param: The new name for the customer. This will be truncated to 160
|
|
395
395
|
# characters if the provided name is longer.
|
|
@@ -411,7 +411,7 @@ module MetronomeSDK
|
|
|
411
411
|
).void
|
|
412
412
|
end
|
|
413
413
|
def update_config(
|
|
414
|
-
# Path param
|
|
414
|
+
# Path param
|
|
415
415
|
customer_id:,
|
|
416
416
|
# Body param: Leave in draft or set to auto-advance on invoices sent to Stripe.
|
|
417
417
|
# Falls back to the client-level config if unset, which defaults to true if unset.
|
|
@@ -52,7 +52,7 @@ module MetronomeSDK
|
|
|
52
52
|
)
|
|
53
53
|
end
|
|
54
54
|
def list_charges(
|
|
55
|
-
# Path param
|
|
55
|
+
# Path param
|
|
56
56
|
plan_id:,
|
|
57
57
|
# Query param: Max number of results that should be returned
|
|
58
58
|
limit: nil,
|
|
@@ -79,7 +79,7 @@ module MetronomeSDK
|
|
|
79
79
|
)
|
|
80
80
|
end
|
|
81
81
|
def list_customers(
|
|
82
|
-
# Path param
|
|
82
|
+
# Path param
|
|
83
83
|
plan_id:,
|
|
84
84
|
# Query param: Max number of results that should be returned
|
|
85
85
|
limit: nil,
|
|
@@ -57,9 +57,9 @@ module MetronomeSDK
|
|
|
57
57
|
)
|
|
58
58
|
end
|
|
59
59
|
def list(
|
|
60
|
-
# Body param
|
|
60
|
+
# Body param
|
|
61
61
|
ending_before:,
|
|
62
|
-
# Body param
|
|
62
|
+
# Body param
|
|
63
63
|
starting_on:,
|
|
64
64
|
# Body param: A window_size of "day" or "hour" will return the usage for the
|
|
65
65
|
# specified period segmented into daily or hourly aggregates. A window_size of
|
|
@@ -228,9 +228,9 @@ module MetronomeSDK
|
|
|
228
228
|
)
|
|
229
229
|
end
|
|
230
230
|
def list_with_groups(
|
|
231
|
-
# Body param
|
|
231
|
+
# Body param
|
|
232
232
|
billable_metric_id:,
|
|
233
|
-
# Body param
|
|
233
|
+
# Body param
|
|
234
234
|
customer_id:,
|
|
235
235
|
# Body param: A window_size of "day" or "hour" will return the usage for the
|
|
236
236
|
# specified period segmented into daily or hourly aggregates. A window_size of
|
|
@@ -245,11 +245,11 @@ module MetronomeSDK
|
|
|
245
245
|
# return an error if the customer is currently uncontracted or starting_on and
|
|
246
246
|
# ending_before are specified when this is true.
|
|
247
247
|
current_period: nil,
|
|
248
|
-
# Body param
|
|
248
|
+
# Body param
|
|
249
249
|
ending_before: nil,
|
|
250
|
-
# Body param
|
|
250
|
+
# Body param
|
|
251
251
|
group_by: nil,
|
|
252
|
-
# Body param
|
|
252
|
+
# Body param
|
|
253
253
|
starting_on: nil,
|
|
254
254
|
request_options: {}
|
|
255
255
|
)
|
|
@@ -24,10 +24,12 @@ module MetronomeSDK
|
|
|
24
24
|
netsuite_sales_order_id: String,
|
|
25
25
|
priority: Float,
|
|
26
26
|
rate_type: MetronomeSDK::Models::Commit::rate_type,
|
|
27
|
+
recurring_commit_id: String,
|
|
27
28
|
rolled_over_from: MetronomeSDK::Commit::RolledOverFrom,
|
|
28
29
|
rollover_fraction: Float,
|
|
29
30
|
salesforce_opportunity_id: String,
|
|
30
31
|
specifiers: ::Array[MetronomeSDK::CommitSpecifier],
|
|
32
|
+
subscription_config: MetronomeSDK::Commit::SubscriptionConfig,
|
|
31
33
|
uniqueness_key: String
|
|
32
34
|
}
|
|
33
35
|
|
|
@@ -126,6 +128,10 @@ module MetronomeSDK
|
|
|
126
128
|
MetronomeSDK::Models::Commit::rate_type
|
|
127
129
|
) -> MetronomeSDK::Models::Commit::rate_type
|
|
128
130
|
|
|
131
|
+
attr_reader recurring_commit_id: String?
|
|
132
|
+
|
|
133
|
+
def recurring_commit_id=: (String) -> String
|
|
134
|
+
|
|
129
135
|
attr_reader rolled_over_from: MetronomeSDK::Commit::RolledOverFrom?
|
|
130
136
|
|
|
131
137
|
def rolled_over_from=: (
|
|
@@ -146,6 +152,12 @@ module MetronomeSDK
|
|
|
146
152
|
::Array[MetronomeSDK::CommitSpecifier]
|
|
147
153
|
) -> ::Array[MetronomeSDK::CommitSpecifier]
|
|
148
154
|
|
|
155
|
+
attr_reader subscription_config: MetronomeSDK::Commit::SubscriptionConfig?
|
|
156
|
+
|
|
157
|
+
def subscription_config=: (
|
|
158
|
+
MetronomeSDK::Commit::SubscriptionConfig
|
|
159
|
+
) -> MetronomeSDK::Commit::SubscriptionConfig
|
|
160
|
+
|
|
149
161
|
attr_reader uniqueness_key: String?
|
|
150
162
|
|
|
151
163
|
def uniqueness_key=: (String) -> String
|
|
@@ -173,10 +185,12 @@ module MetronomeSDK
|
|
|
173
185
|
?netsuite_sales_order_id: String,
|
|
174
186
|
?priority: Float,
|
|
175
187
|
?rate_type: MetronomeSDK::Models::Commit::rate_type,
|
|
188
|
+
?recurring_commit_id: String,
|
|
176
189
|
?rolled_over_from: MetronomeSDK::Commit::RolledOverFrom,
|
|
177
190
|
?rollover_fraction: Float,
|
|
178
191
|
?salesforce_opportunity_id: String,
|
|
179
192
|
?specifiers: ::Array[MetronomeSDK::CommitSpecifier],
|
|
193
|
+
?subscription_config: MetronomeSDK::Commit::SubscriptionConfig,
|
|
180
194
|
?uniqueness_key: String
|
|
181
195
|
) -> void
|
|
182
196
|
|
|
@@ -203,10 +217,12 @@ module MetronomeSDK
|
|
|
203
217
|
netsuite_sales_order_id: String,
|
|
204
218
|
priority: Float,
|
|
205
219
|
rate_type: MetronomeSDK::Models::Commit::rate_type,
|
|
220
|
+
recurring_commit_id: String,
|
|
206
221
|
rolled_over_from: MetronomeSDK::Commit::RolledOverFrom,
|
|
207
222
|
rollover_fraction: Float,
|
|
208
223
|
salesforce_opportunity_id: String,
|
|
209
224
|
specifiers: ::Array[MetronomeSDK::CommitSpecifier],
|
|
225
|
+
subscription_config: MetronomeSDK::Commit::SubscriptionConfig,
|
|
210
226
|
uniqueness_key: String
|
|
211
227
|
}
|
|
212
228
|
|
|
@@ -940,6 +956,64 @@ module MetronomeSDK
|
|
|
940
956
|
|
|
941
957
|
def to_hash: -> { commit_id: String, contract_id: String }
|
|
942
958
|
end
|
|
959
|
+
|
|
960
|
+
type subscription_config =
|
|
961
|
+
{
|
|
962
|
+
allocation: MetronomeSDK::Models::Commit::SubscriptionConfig::allocation,
|
|
963
|
+
apply_seat_increase_config: MetronomeSDK::Commit::SubscriptionConfig::ApplySeatIncreaseConfig,
|
|
964
|
+
subscription_id: String
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
968
|
+
attr_reader allocation: MetronomeSDK::Models::Commit::SubscriptionConfig::allocation?
|
|
969
|
+
|
|
970
|
+
def allocation=: (
|
|
971
|
+
MetronomeSDK::Models::Commit::SubscriptionConfig::allocation
|
|
972
|
+
) -> MetronomeSDK::Models::Commit::SubscriptionConfig::allocation
|
|
973
|
+
|
|
974
|
+
attr_reader apply_seat_increase_config: MetronomeSDK::Commit::SubscriptionConfig::ApplySeatIncreaseConfig?
|
|
975
|
+
|
|
976
|
+
def apply_seat_increase_config=: (
|
|
977
|
+
MetronomeSDK::Commit::SubscriptionConfig::ApplySeatIncreaseConfig
|
|
978
|
+
) -> MetronomeSDK::Commit::SubscriptionConfig::ApplySeatIncreaseConfig
|
|
979
|
+
|
|
980
|
+
attr_reader subscription_id: String?
|
|
981
|
+
|
|
982
|
+
def subscription_id=: (String) -> String
|
|
983
|
+
|
|
984
|
+
def initialize: (
|
|
985
|
+
?allocation: MetronomeSDK::Models::Commit::SubscriptionConfig::allocation,
|
|
986
|
+
?apply_seat_increase_config: MetronomeSDK::Commit::SubscriptionConfig::ApplySeatIncreaseConfig,
|
|
987
|
+
?subscription_id: String
|
|
988
|
+
) -> void
|
|
989
|
+
|
|
990
|
+
def to_hash: -> {
|
|
991
|
+
allocation: MetronomeSDK::Models::Commit::SubscriptionConfig::allocation,
|
|
992
|
+
apply_seat_increase_config: MetronomeSDK::Commit::SubscriptionConfig::ApplySeatIncreaseConfig,
|
|
993
|
+
subscription_id: String
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
type allocation = :INDIVIDUAL | :POOLED
|
|
997
|
+
|
|
998
|
+
module Allocation
|
|
999
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
1000
|
+
|
|
1001
|
+
INDIVIDUAL: :INDIVIDUAL
|
|
1002
|
+
POOLED: :POOLED
|
|
1003
|
+
|
|
1004
|
+
def self?.values: -> ::Array[MetronomeSDK::Models::Commit::SubscriptionConfig::allocation]
|
|
1005
|
+
end
|
|
1006
|
+
|
|
1007
|
+
type apply_seat_increase_config = { is_prorated: bool }
|
|
1008
|
+
|
|
1009
|
+
class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
1010
|
+
attr_accessor is_prorated: bool
|
|
1011
|
+
|
|
1012
|
+
def initialize: (is_prorated: bool) -> void
|
|
1013
|
+
|
|
1014
|
+
def to_hash: -> { is_prorated: bool }
|
|
1015
|
+
end
|
|
1016
|
+
end
|
|
943
1017
|
end
|
|
944
1018
|
end
|
|
945
1019
|
end
|
|
@@ -292,6 +292,7 @@ module MetronomeSDK
|
|
|
292
292
|
netsuite_sales_order_id: String,
|
|
293
293
|
priority: Float,
|
|
294
294
|
rate_type: MetronomeSDK::Models::ContractV2::Commit::rate_type,
|
|
295
|
+
recurring_commit_id: String,
|
|
295
296
|
rolled_over_from: MetronomeSDK::ContractV2::Commit::RolledOverFrom,
|
|
296
297
|
rollover_fraction: Float,
|
|
297
298
|
salesforce_opportunity_id: String,
|
|
@@ -390,6 +391,10 @@ module MetronomeSDK
|
|
|
390
391
|
MetronomeSDK::Models::ContractV2::Commit::rate_type
|
|
391
392
|
) -> MetronomeSDK::Models::ContractV2::Commit::rate_type
|
|
392
393
|
|
|
394
|
+
attr_reader recurring_commit_id: String?
|
|
395
|
+
|
|
396
|
+
def recurring_commit_id=: (String) -> String
|
|
397
|
+
|
|
393
398
|
attr_reader rolled_over_from: MetronomeSDK::ContractV2::Commit::RolledOverFrom?
|
|
394
399
|
|
|
395
400
|
def rolled_over_from=: (
|
|
@@ -438,6 +443,7 @@ module MetronomeSDK
|
|
|
438
443
|
?netsuite_sales_order_id: String,
|
|
439
444
|
?priority: Float,
|
|
440
445
|
?rate_type: MetronomeSDK::Models::ContractV2::Commit::rate_type,
|
|
446
|
+
?recurring_commit_id: String,
|
|
441
447
|
?rolled_over_from: MetronomeSDK::ContractV2::Commit::RolledOverFrom,
|
|
442
448
|
?rollover_fraction: Float,
|
|
443
449
|
?salesforce_opportunity_id: String,
|
|
@@ -467,6 +473,7 @@ module MetronomeSDK
|
|
|
467
473
|
netsuite_sales_order_id: String,
|
|
468
474
|
priority: Float,
|
|
469
475
|
rate_type: MetronomeSDK::Models::ContractV2::Commit::rate_type,
|
|
476
|
+
recurring_commit_id: String,
|
|
470
477
|
rolled_over_from: MetronomeSDK::ContractV2::Commit::RolledOverFrom,
|
|
471
478
|
rollover_fraction: Float,
|
|
472
479
|
salesforce_opportunity_id: String,
|
|
@@ -1650,6 +1657,7 @@ module MetronomeSDK
|
|
|
1650
1657
|
name: String,
|
|
1651
1658
|
netsuite_sales_order_id: String,
|
|
1652
1659
|
priority: Float,
|
|
1660
|
+
recurring_credit_id: String,
|
|
1653
1661
|
salesforce_opportunity_id: String,
|
|
1654
1662
|
specifiers: ::Array[MetronomeSDK::CommitSpecifier],
|
|
1655
1663
|
subscription_config: MetronomeSDK::RecurringCommitSubscriptionConfig
|
|
@@ -1726,6 +1734,10 @@ module MetronomeSDK
|
|
|
1726
1734
|
|
|
1727
1735
|
def priority=: (Float) -> Float
|
|
1728
1736
|
|
|
1737
|
+
attr_reader recurring_credit_id: String?
|
|
1738
|
+
|
|
1739
|
+
def recurring_credit_id=: (String) -> String
|
|
1740
|
+
|
|
1729
1741
|
attr_reader salesforce_opportunity_id: String?
|
|
1730
1742
|
|
|
1731
1743
|
def salesforce_opportunity_id=: (String) -> String
|
|
@@ -1760,6 +1772,7 @@ module MetronomeSDK
|
|
|
1760
1772
|
?name: String,
|
|
1761
1773
|
?netsuite_sales_order_id: String,
|
|
1762
1774
|
?priority: Float,
|
|
1775
|
+
?recurring_credit_id: String,
|
|
1763
1776
|
?salesforce_opportunity_id: String,
|
|
1764
1777
|
?specifiers: ::Array[MetronomeSDK::CommitSpecifier],
|
|
1765
1778
|
?subscription_config: MetronomeSDK::RecurringCommitSubscriptionConfig
|
|
@@ -1783,6 +1796,7 @@ module MetronomeSDK
|
|
|
1783
1796
|
name: String,
|
|
1784
1797
|
netsuite_sales_order_id: String,
|
|
1785
1798
|
priority: Float,
|
|
1799
|
+
recurring_credit_id: String,
|
|
1786
1800
|
salesforce_opportunity_id: String,
|
|
1787
1801
|
specifiers: ::Array[MetronomeSDK::CommitSpecifier],
|
|
1788
1802
|
subscription_config: MetronomeSDK::RecurringCommitSubscriptionConfig
|