metronome-sdk 3.4.0 → 3.6.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 +84 -0
- data/README.md +1 -1
- data/lib/metronome_sdk/client.rb +15 -1
- data/lib/metronome_sdk/internal/transport/base_client.rb +2 -0
- data/lib/metronome_sdk/internal/util.rb +22 -7
- data/lib/metronome_sdk/models/base_threshold_commit.rb +10 -1
- data/lib/metronome_sdk/models/contract_v2.rb +443 -15
- data/lib/metronome_sdk/models/credit.rb +74 -4
- data/lib/metronome_sdk/models/override.rb +9 -8
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +27 -1
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +28 -2
- data/lib/metronome_sdk/models/spend_threshold_configuration.rb +26 -1
- data/lib/metronome_sdk/models/spend_threshold_configuration_v2.rb +30 -4
- data/lib/metronome_sdk/models/update_base_threshold_commit.rb +11 -1
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +1 -0
- data/lib/metronome_sdk/models/v1/contract_amend_params.rb +2 -189
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +3 -191
- data/lib/metronome_sdk/models/v1/contract_list_seat_balances_params.rb +119 -0
- data/lib/metronome_sdk/models/v1/contract_list_seat_balances_response.rb +315 -0
- data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +31 -1
- data/lib/metronome_sdk/models/v1/contracts/product_update_params.rb +31 -1
- data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +1 -0
- data/lib/metronome_sdk/models/v1/customers/invoice.rb +8 -1
- data/lib/metronome_sdk/models/v1/customers/invoice_list_params.rb +29 -1
- data/lib/metronome_sdk/models/v1/package_create_params.rb +2 -30
- data/lib/metronome_sdk/models/v1/package_list_response.rb +28 -9
- data/lib/metronome_sdk/models/v1/package_retrieve_response.rb +29 -9
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +67 -20
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +496 -15
- data/lib/metronome_sdk/resources/v1/contracts/products.rb +6 -2
- data/lib/metronome_sdk/resources/v1/contracts.rb +76 -2
- data/lib/metronome_sdk/resources/v1/customers/invoices.rb +5 -1
- data/lib/metronome_sdk/resources/v1/packages.rb +1 -3
- data/lib/metronome_sdk/version.rb +1 -1
- data/lib/metronome_sdk.rb +3 -1
- data/rbi/metronome_sdk/internal/util.rbi +8 -0
- data/rbi/metronome_sdk/models/base_threshold_commit.rbi +24 -5
- data/rbi/metronome_sdk/models/contract_v2.rbi +916 -19
- data/rbi/metronome_sdk/models/credit.rbi +139 -3
- data/rbi/metronome_sdk/models/override.rbi +9 -12
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +54 -3
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +55 -4
- data/rbi/metronome_sdk/models/spend_threshold_configuration.rbi +54 -3
- data/rbi/metronome_sdk/models/spend_threshold_configuration_v2.rbi +58 -9
- data/rbi/metronome_sdk/models/update_base_threshold_commit.rbi +22 -4
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +3 -416
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +5 -418
- data/rbi/metronome_sdk/models/v1/contract_list_seat_balances_params.rbi +179 -0
- data/rbi/metronome_sdk/models/v1/contract_list_seat_balances_response.rbi +714 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_create_params.rbi +74 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_update_params.rbi +74 -0
- data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +9 -0
- data/rbi/metronome_sdk/models/v1/customers/invoice_list_params.rbi +75 -0
- data/rbi/metronome_sdk/models/v1/package_create_params.rbi +3 -76
- data/rbi/metronome_sdk/models/v1/package_list_response.rbi +72 -15
- data/rbi/metronome_sdk/models/v1/package_retrieve_response.rbi +72 -17
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +133 -28
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1174 -145
- data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +18 -0
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +88 -3
- data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +7 -0
- data/rbi/metronome_sdk/resources/v1/packages.rbi +0 -3
- data/sig/metronome_sdk/internal/util.rbs +4 -0
- data/sig/metronome_sdk/models/base_threshold_commit.rbs +13 -3
- data/sig/metronome_sdk/models/contract_v2.rbs +401 -16
- data/sig/metronome_sdk/models/credit.rbs +69 -0
- data/sig/metronome_sdk/models/override.rbs +8 -10
- data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration.rbs +22 -3
- data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbs +23 -4
- data/sig/metronome_sdk/models/spend_threshold_configuration.rbs +22 -3
- data/sig/metronome_sdk/models/spend_threshold_configuration_v2.rbs +26 -7
- data/sig/metronome_sdk/models/update_base_threshold_commit.rbs +15 -2
- data/sig/metronome_sdk/models/v1/alert_create_params.rbs +3 -1
- data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +3 -147
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +3 -147
- data/sig/metronome_sdk/models/v1/contract_list_seat_balances_params.rbs +96 -0
- data/sig/metronome_sdk/models/v1/contract_list_seat_balances_response.rbs +299 -0
- data/sig/metronome_sdk/models/v1/contracts/product_create_params.rbs +20 -0
- data/sig/metronome_sdk/models/v1/contracts/product_update_params.rbs +20 -0
- data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +3 -1
- data/sig/metronome_sdk/models/v1/customers/invoice.rbs +7 -0
- data/sig/metronome_sdk/models/v1/customers/invoice_list_params.rbs +29 -1
- data/sig/metronome_sdk/models/v1/package_create_params.rbs +3 -30
- data/sig/metronome_sdk/models/v1/package_list_response.rbs +33 -15
- data/sig/metronome_sdk/models/v1/package_retrieve_response.rbs +33 -15
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +33 -10
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +409 -19
- data/sig/metronome_sdk/resources/v1/contracts/products.rbs +2 -0
- data/sig/metronome_sdk/resources/v1/contracts.rbs +15 -0
- data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +2 -0
- data/sig/metronome_sdk/resources/v1/packages.rbs +0 -1
- metadata +8 -2
|
@@ -101,6 +101,13 @@ module MetronomeSDK
|
|
|
101
101
|
end
|
|
102
102
|
attr_writer :billing_provider
|
|
103
103
|
|
|
104
|
+
# The name to use for contracts created from this package.
|
|
105
|
+
sig { returns(T.nilable(String)) }
|
|
106
|
+
attr_reader :contract_name
|
|
107
|
+
|
|
108
|
+
sig { params(contract_name: String).void }
|
|
109
|
+
attr_writer :contract_name
|
|
110
|
+
|
|
104
111
|
sig do
|
|
105
112
|
returns(
|
|
106
113
|
T.nilable(
|
|
@@ -335,6 +342,7 @@ module MetronomeSDK
|
|
|
335
342
|
archived_at: Time,
|
|
336
343
|
billing_provider:
|
|
337
344
|
MetronomeSDK::Models::V1::PackageListResponse::BillingProvider::OrSymbol,
|
|
345
|
+
contract_name: String,
|
|
338
346
|
credits:
|
|
339
347
|
T::Array[
|
|
340
348
|
MetronomeSDK::Models::V1::PackageListResponse::Credit::OrHash
|
|
@@ -380,6 +388,8 @@ module MetronomeSDK
|
|
|
380
388
|
aliases: nil,
|
|
381
389
|
archived_at: nil,
|
|
382
390
|
billing_provider: nil,
|
|
391
|
+
# The name to use for contracts created from this package.
|
|
392
|
+
contract_name: nil,
|
|
383
393
|
credits: nil,
|
|
384
394
|
delivery_method: nil,
|
|
385
395
|
duration: nil,
|
|
@@ -432,6 +442,7 @@ module MetronomeSDK
|
|
|
432
442
|
archived_at: Time,
|
|
433
443
|
billing_provider:
|
|
434
444
|
MetronomeSDK::Models::V1::PackageListResponse::BillingProvider::TaggedSymbol,
|
|
445
|
+
contract_name: String,
|
|
435
446
|
credits:
|
|
436
447
|
T::Array[MetronomeSDK::Models::V1::PackageListResponse::Credit],
|
|
437
448
|
delivery_method:
|
|
@@ -1589,12 +1600,6 @@ module MetronomeSDK
|
|
|
1589
1600
|
sig { params(recurring_commit_template_ids: T::Array[String]).void }
|
|
1590
1601
|
attr_writer :recurring_commit_template_ids
|
|
1591
1602
|
|
|
1592
|
-
sig { returns(T.nilable(T::Array[String])) }
|
|
1593
|
-
attr_reader :recurring_credit_template_ids
|
|
1594
|
-
|
|
1595
|
-
sig { params(recurring_credit_template_ids: T::Array[String]).void }
|
|
1596
|
-
attr_writer :recurring_credit_template_ids
|
|
1597
|
-
|
|
1598
1603
|
sig do
|
|
1599
1604
|
params(
|
|
1600
1605
|
billing_frequency:
|
|
@@ -1604,8 +1609,7 @@ module MetronomeSDK
|
|
|
1604
1609
|
pricing_group_values: T::Hash[Symbol, String],
|
|
1605
1610
|
product_id: String,
|
|
1606
1611
|
product_tags: T::Array[String],
|
|
1607
|
-
recurring_commit_template_ids: T::Array[String]
|
|
1608
|
-
recurring_credit_template_ids: T::Array[String]
|
|
1612
|
+
recurring_commit_template_ids: T::Array[String]
|
|
1609
1613
|
).returns(T.attached_class)
|
|
1610
1614
|
end
|
|
1611
1615
|
def self.new(
|
|
@@ -1615,8 +1619,7 @@ module MetronomeSDK
|
|
|
1615
1619
|
pricing_group_values: nil,
|
|
1616
1620
|
product_id: nil,
|
|
1617
1621
|
product_tags: nil,
|
|
1618
|
-
recurring_commit_template_ids: nil
|
|
1619
|
-
recurring_credit_template_ids: nil
|
|
1622
|
+
recurring_commit_template_ids: nil
|
|
1620
1623
|
)
|
|
1621
1624
|
end
|
|
1622
1625
|
|
|
@@ -1630,8 +1633,7 @@ module MetronomeSDK
|
|
|
1630
1633
|
pricing_group_values: T::Hash[Symbol, String],
|
|
1631
1634
|
product_id: String,
|
|
1632
1635
|
product_tags: T::Array[String],
|
|
1633
|
-
recurring_commit_template_ids: T::Array[String]
|
|
1634
|
-
recurring_credit_template_ids: T::Array[String]
|
|
1636
|
+
recurring_commit_template_ids: T::Array[String]
|
|
1635
1637
|
}
|
|
1636
1638
|
)
|
|
1637
1639
|
end
|
|
@@ -2294,20 +2296,41 @@ module MetronomeSDK
|
|
|
2294
2296
|
end
|
|
2295
2297
|
attr_accessor :frequency
|
|
2296
2298
|
|
|
2299
|
+
sig do
|
|
2300
|
+
returns(
|
|
2301
|
+
T.nilable(
|
|
2302
|
+
MetronomeSDK::Models::V1::PackageListResponse::UsageStatementSchedule::Day::TaggedSymbol
|
|
2303
|
+
)
|
|
2304
|
+
)
|
|
2305
|
+
end
|
|
2306
|
+
attr_reader :day
|
|
2307
|
+
|
|
2308
|
+
sig do
|
|
2309
|
+
params(
|
|
2310
|
+
day:
|
|
2311
|
+
MetronomeSDK::Models::V1::PackageListResponse::UsageStatementSchedule::Day::OrSymbol
|
|
2312
|
+
).void
|
|
2313
|
+
end
|
|
2314
|
+
attr_writer :day
|
|
2315
|
+
|
|
2297
2316
|
sig do
|
|
2298
2317
|
params(
|
|
2299
2318
|
frequency:
|
|
2300
|
-
MetronomeSDK::Models::V1::PackageListResponse::UsageStatementSchedule::Frequency::OrSymbol
|
|
2319
|
+
MetronomeSDK::Models::V1::PackageListResponse::UsageStatementSchedule::Frequency::OrSymbol,
|
|
2320
|
+
day:
|
|
2321
|
+
MetronomeSDK::Models::V1::PackageListResponse::UsageStatementSchedule::Day::OrSymbol
|
|
2301
2322
|
).returns(T.attached_class)
|
|
2302
2323
|
end
|
|
2303
|
-
def self.new(frequency:)
|
|
2324
|
+
def self.new(frequency:, day: nil)
|
|
2304
2325
|
end
|
|
2305
2326
|
|
|
2306
2327
|
sig do
|
|
2307
2328
|
override.returns(
|
|
2308
2329
|
{
|
|
2309
2330
|
frequency:
|
|
2310
|
-
MetronomeSDK::Models::V1::PackageListResponse::UsageStatementSchedule::Frequency::TaggedSymbol
|
|
2331
|
+
MetronomeSDK::Models::V1::PackageListResponse::UsageStatementSchedule::Frequency::TaggedSymbol,
|
|
2332
|
+
day:
|
|
2333
|
+
MetronomeSDK::Models::V1::PackageListResponse::UsageStatementSchedule::Day::TaggedSymbol
|
|
2311
2334
|
}
|
|
2312
2335
|
)
|
|
2313
2336
|
end
|
|
@@ -2357,6 +2380,40 @@ module MetronomeSDK
|
|
|
2357
2380
|
def self.values
|
|
2358
2381
|
end
|
|
2359
2382
|
end
|
|
2383
|
+
|
|
2384
|
+
module Day
|
|
2385
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2386
|
+
|
|
2387
|
+
TaggedSymbol =
|
|
2388
|
+
T.type_alias do
|
|
2389
|
+
T.all(
|
|
2390
|
+
Symbol,
|
|
2391
|
+
MetronomeSDK::Models::V1::PackageListResponse::UsageStatementSchedule::Day
|
|
2392
|
+
)
|
|
2393
|
+
end
|
|
2394
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2395
|
+
|
|
2396
|
+
FIRST_OF_MONTH =
|
|
2397
|
+
T.let(
|
|
2398
|
+
:FIRST_OF_MONTH,
|
|
2399
|
+
MetronomeSDK::Models::V1::PackageListResponse::UsageStatementSchedule::Day::TaggedSymbol
|
|
2400
|
+
)
|
|
2401
|
+
CONTRACT_START =
|
|
2402
|
+
T.let(
|
|
2403
|
+
:CONTRACT_START,
|
|
2404
|
+
MetronomeSDK::Models::V1::PackageListResponse::UsageStatementSchedule::Day::TaggedSymbol
|
|
2405
|
+
)
|
|
2406
|
+
|
|
2407
|
+
sig do
|
|
2408
|
+
override.returns(
|
|
2409
|
+
T::Array[
|
|
2410
|
+
MetronomeSDK::Models::V1::PackageListResponse::UsageStatementSchedule::Day::TaggedSymbol
|
|
2411
|
+
]
|
|
2412
|
+
)
|
|
2413
|
+
end
|
|
2414
|
+
def self.values
|
|
2415
|
+
end
|
|
2416
|
+
end
|
|
2360
2417
|
end
|
|
2361
2418
|
|
|
2362
2419
|
class Alias < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -144,6 +144,13 @@ module MetronomeSDK
|
|
|
144
144
|
end
|
|
145
145
|
attr_writer :billing_provider
|
|
146
146
|
|
|
147
|
+
# The name to use for contracts created from this package.
|
|
148
|
+
sig { returns(T.nilable(String)) }
|
|
149
|
+
attr_reader :contract_name
|
|
150
|
+
|
|
151
|
+
sig { params(contract_name: String).void }
|
|
152
|
+
attr_writer :contract_name
|
|
153
|
+
|
|
147
154
|
sig do
|
|
148
155
|
returns(
|
|
149
156
|
T.nilable(
|
|
@@ -384,6 +391,7 @@ module MetronomeSDK
|
|
|
384
391
|
archived_at: Time,
|
|
385
392
|
billing_provider:
|
|
386
393
|
MetronomeSDK::Models::V1::PackageRetrieveResponse::Data::BillingProvider::OrSymbol,
|
|
394
|
+
contract_name: String,
|
|
387
395
|
credits:
|
|
388
396
|
T::Array[
|
|
389
397
|
MetronomeSDK::Models::V1::PackageRetrieveResponse::Data::Credit::OrHash
|
|
@@ -429,6 +437,8 @@ module MetronomeSDK
|
|
|
429
437
|
aliases: nil,
|
|
430
438
|
archived_at: nil,
|
|
431
439
|
billing_provider: nil,
|
|
440
|
+
# The name to use for contracts created from this package.
|
|
441
|
+
contract_name: nil,
|
|
432
442
|
credits: nil,
|
|
433
443
|
delivery_method: nil,
|
|
434
444
|
duration: nil,
|
|
@@ -485,6 +495,7 @@ module MetronomeSDK
|
|
|
485
495
|
archived_at: Time,
|
|
486
496
|
billing_provider:
|
|
487
497
|
MetronomeSDK::Models::V1::PackageRetrieveResponse::Data::BillingProvider::TaggedSymbol,
|
|
498
|
+
contract_name: String,
|
|
488
499
|
credits:
|
|
489
500
|
T::Array[
|
|
490
501
|
MetronomeSDK::Models::V1::PackageRetrieveResponse::Data::Credit
|
|
@@ -1647,14 +1658,6 @@ module MetronomeSDK
|
|
|
1647
1658
|
end
|
|
1648
1659
|
attr_writer :recurring_commit_template_ids
|
|
1649
1660
|
|
|
1650
|
-
sig { returns(T.nilable(T::Array[String])) }
|
|
1651
|
-
attr_reader :recurring_credit_template_ids
|
|
1652
|
-
|
|
1653
|
-
sig do
|
|
1654
|
-
params(recurring_credit_template_ids: T::Array[String]).void
|
|
1655
|
-
end
|
|
1656
|
-
attr_writer :recurring_credit_template_ids
|
|
1657
|
-
|
|
1658
1661
|
sig do
|
|
1659
1662
|
params(
|
|
1660
1663
|
billing_frequency:
|
|
@@ -1664,8 +1667,7 @@ module MetronomeSDK
|
|
|
1664
1667
|
pricing_group_values: T::Hash[Symbol, String],
|
|
1665
1668
|
product_id: String,
|
|
1666
1669
|
product_tags: T::Array[String],
|
|
1667
|
-
recurring_commit_template_ids: T::Array[String]
|
|
1668
|
-
recurring_credit_template_ids: T::Array[String]
|
|
1670
|
+
recurring_commit_template_ids: T::Array[String]
|
|
1669
1671
|
).returns(T.attached_class)
|
|
1670
1672
|
end
|
|
1671
1673
|
def self.new(
|
|
@@ -1675,8 +1677,7 @@ module MetronomeSDK
|
|
|
1675
1677
|
pricing_group_values: nil,
|
|
1676
1678
|
product_id: nil,
|
|
1677
1679
|
product_tags: nil,
|
|
1678
|
-
recurring_commit_template_ids: nil
|
|
1679
|
-
recurring_credit_template_ids: nil
|
|
1680
|
+
recurring_commit_template_ids: nil
|
|
1680
1681
|
)
|
|
1681
1682
|
end
|
|
1682
1683
|
|
|
@@ -1691,8 +1692,7 @@ module MetronomeSDK
|
|
|
1691
1692
|
pricing_group_values: T::Hash[Symbol, String],
|
|
1692
1693
|
product_id: String,
|
|
1693
1694
|
product_tags: T::Array[String],
|
|
1694
|
-
recurring_commit_template_ids: T::Array[String]
|
|
1695
|
-
recurring_credit_template_ids: T::Array[String]
|
|
1695
|
+
recurring_commit_template_ids: T::Array[String]
|
|
1696
1696
|
}
|
|
1697
1697
|
)
|
|
1698
1698
|
end
|
|
@@ -2355,20 +2355,41 @@ module MetronomeSDK
|
|
|
2355
2355
|
end
|
|
2356
2356
|
attr_accessor :frequency
|
|
2357
2357
|
|
|
2358
|
+
sig do
|
|
2359
|
+
returns(
|
|
2360
|
+
T.nilable(
|
|
2361
|
+
MetronomeSDK::Models::V1::PackageRetrieveResponse::Data::UsageStatementSchedule::Day::TaggedSymbol
|
|
2362
|
+
)
|
|
2363
|
+
)
|
|
2364
|
+
end
|
|
2365
|
+
attr_reader :day
|
|
2366
|
+
|
|
2367
|
+
sig do
|
|
2368
|
+
params(
|
|
2369
|
+
day:
|
|
2370
|
+
MetronomeSDK::Models::V1::PackageRetrieveResponse::Data::UsageStatementSchedule::Day::OrSymbol
|
|
2371
|
+
).void
|
|
2372
|
+
end
|
|
2373
|
+
attr_writer :day
|
|
2374
|
+
|
|
2358
2375
|
sig do
|
|
2359
2376
|
params(
|
|
2360
2377
|
frequency:
|
|
2361
|
-
MetronomeSDK::Models::V1::PackageRetrieveResponse::Data::UsageStatementSchedule::Frequency::OrSymbol
|
|
2378
|
+
MetronomeSDK::Models::V1::PackageRetrieveResponse::Data::UsageStatementSchedule::Frequency::OrSymbol,
|
|
2379
|
+
day:
|
|
2380
|
+
MetronomeSDK::Models::V1::PackageRetrieveResponse::Data::UsageStatementSchedule::Day::OrSymbol
|
|
2362
2381
|
).returns(T.attached_class)
|
|
2363
2382
|
end
|
|
2364
|
-
def self.new(frequency:)
|
|
2383
|
+
def self.new(frequency:, day: nil)
|
|
2365
2384
|
end
|
|
2366
2385
|
|
|
2367
2386
|
sig do
|
|
2368
2387
|
override.returns(
|
|
2369
2388
|
{
|
|
2370
2389
|
frequency:
|
|
2371
|
-
MetronomeSDK::Models::V1::PackageRetrieveResponse::Data::UsageStatementSchedule::Frequency::TaggedSymbol
|
|
2390
|
+
MetronomeSDK::Models::V1::PackageRetrieveResponse::Data::UsageStatementSchedule::Frequency::TaggedSymbol,
|
|
2391
|
+
day:
|
|
2392
|
+
MetronomeSDK::Models::V1::PackageRetrieveResponse::Data::UsageStatementSchedule::Day::TaggedSymbol
|
|
2372
2393
|
}
|
|
2373
2394
|
)
|
|
2374
2395
|
end
|
|
@@ -2418,6 +2439,40 @@ module MetronomeSDK
|
|
|
2418
2439
|
def self.values
|
|
2419
2440
|
end
|
|
2420
2441
|
end
|
|
2442
|
+
|
|
2443
|
+
module Day
|
|
2444
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2445
|
+
|
|
2446
|
+
TaggedSymbol =
|
|
2447
|
+
T.type_alias do
|
|
2448
|
+
T.all(
|
|
2449
|
+
Symbol,
|
|
2450
|
+
MetronomeSDK::Models::V1::PackageRetrieveResponse::Data::UsageStatementSchedule::Day
|
|
2451
|
+
)
|
|
2452
|
+
end
|
|
2453
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2454
|
+
|
|
2455
|
+
FIRST_OF_MONTH =
|
|
2456
|
+
T.let(
|
|
2457
|
+
:FIRST_OF_MONTH,
|
|
2458
|
+
MetronomeSDK::Models::V1::PackageRetrieveResponse::Data::UsageStatementSchedule::Day::TaggedSymbol
|
|
2459
|
+
)
|
|
2460
|
+
CONTRACT_START =
|
|
2461
|
+
T.let(
|
|
2462
|
+
:CONTRACT_START,
|
|
2463
|
+
MetronomeSDK::Models::V1::PackageRetrieveResponse::Data::UsageStatementSchedule::Day::TaggedSymbol
|
|
2464
|
+
)
|
|
2465
|
+
|
|
2466
|
+
sig do
|
|
2467
|
+
override.returns(
|
|
2468
|
+
T::Array[
|
|
2469
|
+
MetronomeSDK::Models::V1::PackageRetrieveResponse::Data::UsageStatementSchedule::Day::TaggedSymbol
|
|
2470
|
+
]
|
|
2471
|
+
)
|
|
2472
|
+
end
|
|
2473
|
+
def self.values
|
|
2474
|
+
end
|
|
2475
|
+
end
|
|
2421
2476
|
end
|
|
2422
2477
|
|
|
2423
2478
|
class Alias < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -3576,16 +3576,6 @@ module MetronomeSDK
|
|
|
3576
3576
|
sig { params(recurring_commit_ids: T::Array[String]).void }
|
|
3577
3577
|
attr_writer :recurring_commit_ids
|
|
3578
3578
|
|
|
3579
|
-
# Can only be used for commit specific overrides. Must be used in conjunction with
|
|
3580
|
-
# one of product_id, product_tags, pricing_group_values, or
|
|
3581
|
-
# presentation_group_values. If provided, the override will only apply to commits
|
|
3582
|
-
# created by the specified recurring credit ids.
|
|
3583
|
-
sig { returns(T.nilable(T::Array[String])) }
|
|
3584
|
-
attr_reader :recurring_credit_ids
|
|
3585
|
-
|
|
3586
|
-
sig { params(recurring_credit_ids: T::Array[String]).void }
|
|
3587
|
-
attr_writer :recurring_credit_ids
|
|
3588
|
-
|
|
3589
3579
|
sig do
|
|
3590
3580
|
params(
|
|
3591
3581
|
billing_frequency:
|
|
@@ -3595,8 +3585,7 @@ module MetronomeSDK
|
|
|
3595
3585
|
pricing_group_values: T::Hash[Symbol, String],
|
|
3596
3586
|
product_id: String,
|
|
3597
3587
|
product_tags: T::Array[String],
|
|
3598
|
-
recurring_commit_ids: T::Array[String]
|
|
3599
|
-
recurring_credit_ids: T::Array[String]
|
|
3588
|
+
recurring_commit_ids: T::Array[String]
|
|
3600
3589
|
).returns(T.attached_class)
|
|
3601
3590
|
end
|
|
3602
3591
|
def self.new(
|
|
@@ -3621,12 +3610,7 @@ module MetronomeSDK
|
|
|
3621
3610
|
# one of product_id, product_tags, pricing_group_values, or
|
|
3622
3611
|
# presentation_group_values. If provided, the override will only apply to commits
|
|
3623
3612
|
# created by the specified recurring commit ids.
|
|
3624
|
-
recurring_commit_ids: nil
|
|
3625
|
-
# Can only be used for commit specific overrides. Must be used in conjunction with
|
|
3626
|
-
# one of product_id, product_tags, pricing_group_values, or
|
|
3627
|
-
# presentation_group_values. If provided, the override will only apply to commits
|
|
3628
|
-
# created by the specified recurring credit ids.
|
|
3629
|
-
recurring_credit_ids: nil
|
|
3613
|
+
recurring_commit_ids: nil
|
|
3630
3614
|
)
|
|
3631
3615
|
end
|
|
3632
3616
|
|
|
@@ -3640,8 +3624,7 @@ module MetronomeSDK
|
|
|
3640
3624
|
pricing_group_values: T::Hash[Symbol, String],
|
|
3641
3625
|
product_id: String,
|
|
3642
3626
|
product_tags: T::Array[String],
|
|
3643
|
-
recurring_commit_ids: T::Array[String]
|
|
3644
|
-
recurring_credit_ids: T::Array[String]
|
|
3627
|
+
recurring_commit_ids: T::Array[String]
|
|
3645
3628
|
}
|
|
3646
3629
|
)
|
|
3647
3630
|
end
|
|
@@ -8087,14 +8070,14 @@ module MetronomeSDK
|
|
|
8087
8070
|
end
|
|
8088
8071
|
attr_writer :access_schedule
|
|
8089
8072
|
|
|
8090
|
-
# Which products the
|
|
8091
|
-
# applicable_product_tags or specifiers are not provided, the
|
|
8073
|
+
# Which products the credit applies to. If applicable_product_ids,
|
|
8074
|
+
# applicable_product_tags or specifiers are not provided, the credit applies to
|
|
8092
8075
|
# all products.
|
|
8093
8076
|
sig { returns(T.nilable(T::Array[String])) }
|
|
8094
8077
|
attr_accessor :applicable_product_ids
|
|
8095
8078
|
|
|
8096
|
-
# Which tags the
|
|
8097
|
-
# applicable_product_tags or specifiers are not provided, the
|
|
8079
|
+
# Which tags the credit applies to. If applicable_product_ids,
|
|
8080
|
+
# applicable_product_tags or specifiers are not provided, the credit applies to
|
|
8098
8081
|
# all products.
|
|
8099
8082
|
sig { returns(T.nilable(T::Array[String])) }
|
|
8100
8083
|
attr_accessor :applicable_product_tags
|
|
@@ -8180,12 +8163,12 @@ module MetronomeSDK
|
|
|
8180
8163
|
def self.new(
|
|
8181
8164
|
credit_id:,
|
|
8182
8165
|
access_schedule: nil,
|
|
8183
|
-
# Which products the
|
|
8184
|
-
# applicable_product_tags or specifiers are not provided, the
|
|
8166
|
+
# Which products the credit applies to. If applicable_product_ids,
|
|
8167
|
+
# applicable_product_tags or specifiers are not provided, the credit applies to
|
|
8185
8168
|
# all products.
|
|
8186
8169
|
applicable_product_ids: nil,
|
|
8187
|
-
# Which tags the
|
|
8188
|
-
# applicable_product_tags or specifiers are not provided, the
|
|
8170
|
+
# Which tags the credit applies to. If applicable_product_ids,
|
|
8171
|
+
# applicable_product_tags or specifiers are not provided, the credit applies to
|
|
8189
8172
|
# all products.
|
|
8190
8173
|
applicable_product_tags: nil,
|
|
8191
8174
|
description: nil,
|
|
@@ -8531,6 +8514,25 @@ module MetronomeSDK
|
|
|
8531
8514
|
sig { returns(T.nilable(String)) }
|
|
8532
8515
|
attr_accessor :custom_credit_type_id
|
|
8533
8516
|
|
|
8517
|
+
sig do
|
|
8518
|
+
returns(
|
|
8519
|
+
T.nilable(
|
|
8520
|
+
MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration
|
|
8521
|
+
)
|
|
8522
|
+
)
|
|
8523
|
+
end
|
|
8524
|
+
attr_reader :discount_configuration
|
|
8525
|
+
|
|
8526
|
+
sig do
|
|
8527
|
+
params(
|
|
8528
|
+
discount_configuration:
|
|
8529
|
+
T.nilable(
|
|
8530
|
+
MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration::OrHash
|
|
8531
|
+
)
|
|
8532
|
+
).void
|
|
8533
|
+
end
|
|
8534
|
+
attr_writer :discount_configuration
|
|
8535
|
+
|
|
8534
8536
|
# When set to false, the contract will not be evaluated against the
|
|
8535
8537
|
# threshold_amount. Toggling to true will result an immediate evaluation,
|
|
8536
8538
|
# regardless of prior state.
|
|
@@ -8570,6 +8572,10 @@ module MetronomeSDK
|
|
|
8570
8572
|
commit:
|
|
8571
8573
|
MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::Commit::OrHash,
|
|
8572
8574
|
custom_credit_type_id: T.nilable(String),
|
|
8575
|
+
discount_configuration:
|
|
8576
|
+
T.nilable(
|
|
8577
|
+
MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration::OrHash
|
|
8578
|
+
),
|
|
8573
8579
|
is_enabled: T::Boolean,
|
|
8574
8580
|
payment_gate_config: MetronomeSDK::PaymentGateConfigV2::OrHash,
|
|
8575
8581
|
recharge_to_amount: Float,
|
|
@@ -8581,6 +8587,7 @@ module MetronomeSDK
|
|
|
8581
8587
|
# If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
8582
8588
|
# commit amount will be in terms of this credit type instead of the fiat currency.
|
|
8583
8589
|
custom_credit_type_id: nil,
|
|
8590
|
+
discount_configuration: nil,
|
|
8584
8591
|
# When set to false, the contract will not be evaluated against the
|
|
8585
8592
|
# threshold_amount. Toggling to true will result an immediate evaluation,
|
|
8586
8593
|
# regardless of prior state.
|
|
@@ -8600,6 +8607,10 @@ module MetronomeSDK
|
|
|
8600
8607
|
commit:
|
|
8601
8608
|
MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::Commit,
|
|
8602
8609
|
custom_credit_type_id: T.nilable(String),
|
|
8610
|
+
discount_configuration:
|
|
8611
|
+
T.nilable(
|
|
8612
|
+
MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration
|
|
8613
|
+
),
|
|
8603
8614
|
is_enabled: T::Boolean,
|
|
8604
8615
|
payment_gate_config: MetronomeSDK::PaymentGateConfigV2,
|
|
8605
8616
|
recharge_to_amount: Float,
|
|
@@ -8682,6 +8693,39 @@ module MetronomeSDK
|
|
|
8682
8693
|
def to_hash
|
|
8683
8694
|
end
|
|
8684
8695
|
end
|
|
8696
|
+
|
|
8697
|
+
class DiscountConfiguration < MetronomeSDK::Internal::Type::BaseModel
|
|
8698
|
+
OrHash =
|
|
8699
|
+
T.type_alias do
|
|
8700
|
+
T.any(
|
|
8701
|
+
MetronomeSDK::V2::ContractEditParams::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration,
|
|
8702
|
+
MetronomeSDK::Internal::AnyHash
|
|
8703
|
+
)
|
|
8704
|
+
end
|
|
8705
|
+
|
|
8706
|
+
# The fraction of the original amount that the customer pays after applying the
|
|
8707
|
+
# discount. Set to null to remove the discount fraction. For example, 0.85 means
|
|
8708
|
+
# the customer pays 85% of the original amount (a 15% discount).
|
|
8709
|
+
sig { returns(T.nilable(Float)) }
|
|
8710
|
+
attr_accessor :payment_fraction
|
|
8711
|
+
|
|
8712
|
+
sig do
|
|
8713
|
+
params(payment_fraction: T.nilable(Float)).returns(
|
|
8714
|
+
T.attached_class
|
|
8715
|
+
)
|
|
8716
|
+
end
|
|
8717
|
+
def self.new(
|
|
8718
|
+
# The fraction of the original amount that the customer pays after applying the
|
|
8719
|
+
# discount. Set to null to remove the discount fraction. For example, 0.85 means
|
|
8720
|
+
# the customer pays 85% of the original amount (a 15% discount).
|
|
8721
|
+
payment_fraction: nil
|
|
8722
|
+
)
|
|
8723
|
+
end
|
|
8724
|
+
|
|
8725
|
+
sig { override.returns({ payment_fraction: T.nilable(Float) }) }
|
|
8726
|
+
def to_hash
|
|
8727
|
+
end
|
|
8728
|
+
end
|
|
8685
8729
|
end
|
|
8686
8730
|
|
|
8687
8731
|
class UpdateRecurringCommit < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -9399,6 +9443,25 @@ module MetronomeSDK
|
|
|
9399
9443
|
end
|
|
9400
9444
|
attr_writer :commit
|
|
9401
9445
|
|
|
9446
|
+
sig do
|
|
9447
|
+
returns(
|
|
9448
|
+
T.nilable(
|
|
9449
|
+
MetronomeSDK::V2::ContractEditParams::UpdateSpendThresholdConfiguration::DiscountConfiguration
|
|
9450
|
+
)
|
|
9451
|
+
)
|
|
9452
|
+
end
|
|
9453
|
+
attr_reader :discount_configuration
|
|
9454
|
+
|
|
9455
|
+
sig do
|
|
9456
|
+
params(
|
|
9457
|
+
discount_configuration:
|
|
9458
|
+
T.nilable(
|
|
9459
|
+
MetronomeSDK::V2::ContractEditParams::UpdateSpendThresholdConfiguration::DiscountConfiguration::OrHash
|
|
9460
|
+
)
|
|
9461
|
+
).void
|
|
9462
|
+
end
|
|
9463
|
+
attr_writer :discount_configuration
|
|
9464
|
+
|
|
9402
9465
|
# When set to false, the contract will not be evaluated against the
|
|
9403
9466
|
# threshold_amount. Toggling to true will result an immediate evaluation,
|
|
9404
9467
|
# regardless of prior state.
|
|
@@ -9429,6 +9492,10 @@ module MetronomeSDK
|
|
|
9429
9492
|
sig do
|
|
9430
9493
|
params(
|
|
9431
9494
|
commit: MetronomeSDK::UpdateBaseThresholdCommit::OrHash,
|
|
9495
|
+
discount_configuration:
|
|
9496
|
+
T.nilable(
|
|
9497
|
+
MetronomeSDK::V2::ContractEditParams::UpdateSpendThresholdConfiguration::DiscountConfiguration::OrHash
|
|
9498
|
+
),
|
|
9432
9499
|
is_enabled: T::Boolean,
|
|
9433
9500
|
payment_gate_config: MetronomeSDK::PaymentGateConfigV2::OrHash,
|
|
9434
9501
|
threshold_amount: Float
|
|
@@ -9436,6 +9503,7 @@ module MetronomeSDK
|
|
|
9436
9503
|
end
|
|
9437
9504
|
def self.new(
|
|
9438
9505
|
commit: nil,
|
|
9506
|
+
discount_configuration: nil,
|
|
9439
9507
|
# When set to false, the contract will not be evaluated against the
|
|
9440
9508
|
# threshold_amount. Toggling to true will result an immediate evaluation,
|
|
9441
9509
|
# regardless of prior state.
|
|
@@ -9451,6 +9519,10 @@ module MetronomeSDK
|
|
|
9451
9519
|
override.returns(
|
|
9452
9520
|
{
|
|
9453
9521
|
commit: MetronomeSDK::UpdateBaseThresholdCommit,
|
|
9522
|
+
discount_configuration:
|
|
9523
|
+
T.nilable(
|
|
9524
|
+
MetronomeSDK::V2::ContractEditParams::UpdateSpendThresholdConfiguration::DiscountConfiguration
|
|
9525
|
+
),
|
|
9454
9526
|
is_enabled: T::Boolean,
|
|
9455
9527
|
payment_gate_config: MetronomeSDK::PaymentGateConfigV2,
|
|
9456
9528
|
threshold_amount: Float
|
|
@@ -9459,6 +9531,39 @@ module MetronomeSDK
|
|
|
9459
9531
|
end
|
|
9460
9532
|
def to_hash
|
|
9461
9533
|
end
|
|
9534
|
+
|
|
9535
|
+
class DiscountConfiguration < MetronomeSDK::Internal::Type::BaseModel
|
|
9536
|
+
OrHash =
|
|
9537
|
+
T.type_alias do
|
|
9538
|
+
T.any(
|
|
9539
|
+
MetronomeSDK::V2::ContractEditParams::UpdateSpendThresholdConfiguration::DiscountConfiguration,
|
|
9540
|
+
MetronomeSDK::Internal::AnyHash
|
|
9541
|
+
)
|
|
9542
|
+
end
|
|
9543
|
+
|
|
9544
|
+
# The fraction of the original amount that the customer pays after applying the
|
|
9545
|
+
# discount. Set to null to remove the discount fraction. For example, 0.85 means
|
|
9546
|
+
# the customer pays 85% of the original amount (a 15% discount).
|
|
9547
|
+
sig { returns(T.nilable(Float)) }
|
|
9548
|
+
attr_accessor :payment_fraction
|
|
9549
|
+
|
|
9550
|
+
sig do
|
|
9551
|
+
params(payment_fraction: T.nilable(Float)).returns(
|
|
9552
|
+
T.attached_class
|
|
9553
|
+
)
|
|
9554
|
+
end
|
|
9555
|
+
def self.new(
|
|
9556
|
+
# The fraction of the original amount that the customer pays after applying the
|
|
9557
|
+
# discount. Set to null to remove the discount fraction. For example, 0.85 means
|
|
9558
|
+
# the customer pays 85% of the original amount (a 15% discount).
|
|
9559
|
+
payment_fraction: nil
|
|
9560
|
+
)
|
|
9561
|
+
end
|
|
9562
|
+
|
|
9563
|
+
sig { override.returns({ payment_fraction: T.nilable(Float) }) }
|
|
9564
|
+
def to_hash
|
|
9565
|
+
end
|
|
9566
|
+
end
|
|
9462
9567
|
end
|
|
9463
9568
|
|
|
9464
9569
|
class UpdateSubscription < MetronomeSDK::Internal::Type::BaseModel
|