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
|
@@ -25,6 +25,12 @@ module MetronomeSDK
|
|
|
25
25
|
sig { params(name: String).void }
|
|
26
26
|
attr_writer :name
|
|
27
27
|
|
|
28
|
+
# The priority of the commit, used to determine drawdown order. Lower priority
|
|
29
|
+
# commits are consumed first. Defaults to 100 if not specified. On updates, set to
|
|
30
|
+
# null to clear a previously configured priority.
|
|
31
|
+
sig { returns(T.nilable(Float)) }
|
|
32
|
+
attr_accessor :priority
|
|
33
|
+
|
|
28
34
|
# The commit product that will be used to generate the line item for commit
|
|
29
35
|
# payment.
|
|
30
36
|
sig { returns(T.nilable(String)) }
|
|
@@ -34,15 +40,22 @@ module MetronomeSDK
|
|
|
34
40
|
attr_writer :product_id
|
|
35
41
|
|
|
36
42
|
sig do
|
|
37
|
-
params(
|
|
38
|
-
|
|
39
|
-
|
|
43
|
+
params(
|
|
44
|
+
description: String,
|
|
45
|
+
name: String,
|
|
46
|
+
priority: T.nilable(Float),
|
|
47
|
+
product_id: String
|
|
48
|
+
).returns(T.attached_class)
|
|
40
49
|
end
|
|
41
50
|
def self.new(
|
|
42
51
|
description: nil,
|
|
43
52
|
# Specify the name of the line item for the threshold charge. If left blank, it
|
|
44
53
|
# will default to the commit product name.
|
|
45
54
|
name: nil,
|
|
55
|
+
# The priority of the commit, used to determine drawdown order. Lower priority
|
|
56
|
+
# commits are consumed first. Defaults to 100 if not specified. On updates, set to
|
|
57
|
+
# null to clear a previously configured priority.
|
|
58
|
+
priority: nil,
|
|
46
59
|
# The commit product that will be used to generate the line item for commit
|
|
47
60
|
# payment.
|
|
48
61
|
product_id: nil
|
|
@@ -51,7 +64,12 @@ module MetronomeSDK
|
|
|
51
64
|
|
|
52
65
|
sig do
|
|
53
66
|
override.returns(
|
|
54
|
-
{
|
|
67
|
+
{
|
|
68
|
+
description: String,
|
|
69
|
+
name: String,
|
|
70
|
+
priority: T.nilable(Float),
|
|
71
|
+
product_id: String
|
|
72
|
+
}
|
|
55
73
|
)
|
|
56
74
|
end
|
|
57
75
|
def to_hash
|
|
@@ -427,6 +427,11 @@ module MetronomeSDK
|
|
|
427
427
|
:ContractCredit,
|
|
428
428
|
MetronomeSDK::V1::AlertCreateParams::CustomFieldFilter::Entity::TaggedSymbol
|
|
429
429
|
)
|
|
430
|
+
CONTRACT_CREDIT_OR_COMMIT =
|
|
431
|
+
T.let(
|
|
432
|
+
:ContractCreditOrCommit,
|
|
433
|
+
MetronomeSDK::V1::AlertCreateParams::CustomFieldFilter::Entity::TaggedSymbol
|
|
434
|
+
)
|
|
430
435
|
|
|
431
436
|
sig do
|
|
432
437
|
override.returns(
|
|
@@ -398,24 +398,6 @@ module MetronomeSDK
|
|
|
398
398
|
sig { params(netsuite_sales_order_id: String).void }
|
|
399
399
|
attr_writer :netsuite_sales_order_id
|
|
400
400
|
|
|
401
|
-
# optionally payment gate this commit
|
|
402
|
-
sig do
|
|
403
|
-
returns(
|
|
404
|
-
T.nilable(
|
|
405
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig
|
|
406
|
-
)
|
|
407
|
-
)
|
|
408
|
-
end
|
|
409
|
-
attr_reader :payment_gate_config
|
|
410
|
-
|
|
411
|
-
sig do
|
|
412
|
-
params(
|
|
413
|
-
payment_gate_config:
|
|
414
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::OrHash
|
|
415
|
-
).void
|
|
416
|
-
end
|
|
417
|
-
attr_writer :payment_gate_config
|
|
418
|
-
|
|
419
401
|
# If multiple commits are applicable, the one with the lower priority will apply
|
|
420
402
|
# first.
|
|
421
403
|
sig { returns(T.nilable(Float)) }
|
|
@@ -490,8 +472,6 @@ module MetronomeSDK
|
|
|
490
472
|
MetronomeSDK::V1::ContractAmendParams::Commit::InvoiceSchedule::OrHash,
|
|
491
473
|
name: String,
|
|
492
474
|
netsuite_sales_order_id: String,
|
|
493
|
-
payment_gate_config:
|
|
494
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::OrHash,
|
|
495
475
|
priority: Float,
|
|
496
476
|
rate_type:
|
|
497
477
|
MetronomeSDK::V1::ContractAmendParams::Commit::RateType::OrSymbol,
|
|
@@ -532,8 +512,6 @@ module MetronomeSDK
|
|
|
532
512
|
name: nil,
|
|
533
513
|
# This field's availability is dependent on your client's configuration.
|
|
534
514
|
netsuite_sales_order_id: nil,
|
|
535
|
-
# optionally payment gate this commit
|
|
536
|
-
payment_gate_config: nil,
|
|
537
515
|
# If multiple commits are applicable, the one with the lower priority will apply
|
|
538
516
|
# first.
|
|
539
517
|
priority: nil,
|
|
@@ -570,8 +548,6 @@ module MetronomeSDK
|
|
|
570
548
|
MetronomeSDK::V1::ContractAmendParams::Commit::InvoiceSchedule,
|
|
571
549
|
name: String,
|
|
572
550
|
netsuite_sales_order_id: String,
|
|
573
|
-
payment_gate_config:
|
|
574
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig,
|
|
575
551
|
priority: Float,
|
|
576
552
|
rate_type:
|
|
577
553
|
MetronomeSDK::V1::ContractAmendParams::Commit::RateType::OrSymbol,
|
|
@@ -1115,378 +1091,6 @@ module MetronomeSDK
|
|
|
1115
1091
|
end
|
|
1116
1092
|
end
|
|
1117
1093
|
|
|
1118
|
-
class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
1119
|
-
OrHash =
|
|
1120
|
-
T.type_alias do
|
|
1121
|
-
T.any(
|
|
1122
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig,
|
|
1123
|
-
MetronomeSDK::Internal::AnyHash
|
|
1124
|
-
)
|
|
1125
|
-
end
|
|
1126
|
-
|
|
1127
|
-
# Gate access to the commit balance based on successful collection of payment.
|
|
1128
|
-
# Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
1129
|
-
# facilitate payment using your own payment integration. Select NONE if you do not
|
|
1130
|
-
# wish to payment gate the commit balance.
|
|
1131
|
-
sig do
|
|
1132
|
-
returns(
|
|
1133
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::PaymentGateType::OrSymbol
|
|
1134
|
-
)
|
|
1135
|
-
end
|
|
1136
|
-
attr_accessor :payment_gate_type
|
|
1137
|
-
|
|
1138
|
-
# Only applicable if using PRECALCULATED as your tax type.
|
|
1139
|
-
sig do
|
|
1140
|
-
returns(
|
|
1141
|
-
T.nilable(
|
|
1142
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig
|
|
1143
|
-
)
|
|
1144
|
-
)
|
|
1145
|
-
end
|
|
1146
|
-
attr_reader :precalculated_tax_config
|
|
1147
|
-
|
|
1148
|
-
sig do
|
|
1149
|
-
params(
|
|
1150
|
-
precalculated_tax_config:
|
|
1151
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig::OrHash
|
|
1152
|
-
).void
|
|
1153
|
-
end
|
|
1154
|
-
attr_writer :precalculated_tax_config
|
|
1155
|
-
|
|
1156
|
-
# Only applicable if using STRIPE as your payment gate type.
|
|
1157
|
-
sig do
|
|
1158
|
-
returns(
|
|
1159
|
-
T.nilable(
|
|
1160
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig
|
|
1161
|
-
)
|
|
1162
|
-
)
|
|
1163
|
-
end
|
|
1164
|
-
attr_reader :stripe_config
|
|
1165
|
-
|
|
1166
|
-
sig do
|
|
1167
|
-
params(
|
|
1168
|
-
stripe_config:
|
|
1169
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig::OrHash
|
|
1170
|
-
).void
|
|
1171
|
-
end
|
|
1172
|
-
attr_writer :stripe_config
|
|
1173
|
-
|
|
1174
|
-
# Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
1175
|
-
# not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
1176
|
-
# will default to NONE.
|
|
1177
|
-
sig do
|
|
1178
|
-
returns(
|
|
1179
|
-
T.nilable(
|
|
1180
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::TaxType::OrSymbol
|
|
1181
|
-
)
|
|
1182
|
-
)
|
|
1183
|
-
end
|
|
1184
|
-
attr_reader :tax_type
|
|
1185
|
-
|
|
1186
|
-
sig do
|
|
1187
|
-
params(
|
|
1188
|
-
tax_type:
|
|
1189
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::TaxType::OrSymbol
|
|
1190
|
-
).void
|
|
1191
|
-
end
|
|
1192
|
-
attr_writer :tax_type
|
|
1193
|
-
|
|
1194
|
-
# optionally payment gate this commit
|
|
1195
|
-
sig do
|
|
1196
|
-
params(
|
|
1197
|
-
payment_gate_type:
|
|
1198
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::PaymentGateType::OrSymbol,
|
|
1199
|
-
precalculated_tax_config:
|
|
1200
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig::OrHash,
|
|
1201
|
-
stripe_config:
|
|
1202
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig::OrHash,
|
|
1203
|
-
tax_type:
|
|
1204
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::TaxType::OrSymbol
|
|
1205
|
-
).returns(T.attached_class)
|
|
1206
|
-
end
|
|
1207
|
-
def self.new(
|
|
1208
|
-
# Gate access to the commit balance based on successful collection of payment.
|
|
1209
|
-
# Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
1210
|
-
# facilitate payment using your own payment integration. Select NONE if you do not
|
|
1211
|
-
# wish to payment gate the commit balance.
|
|
1212
|
-
payment_gate_type:,
|
|
1213
|
-
# Only applicable if using PRECALCULATED as your tax type.
|
|
1214
|
-
precalculated_tax_config: nil,
|
|
1215
|
-
# Only applicable if using STRIPE as your payment gate type.
|
|
1216
|
-
stripe_config: nil,
|
|
1217
|
-
# Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
1218
|
-
# not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
1219
|
-
# will default to NONE.
|
|
1220
|
-
tax_type: nil
|
|
1221
|
-
)
|
|
1222
|
-
end
|
|
1223
|
-
|
|
1224
|
-
sig do
|
|
1225
|
-
override.returns(
|
|
1226
|
-
{
|
|
1227
|
-
payment_gate_type:
|
|
1228
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::PaymentGateType::OrSymbol,
|
|
1229
|
-
precalculated_tax_config:
|
|
1230
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig,
|
|
1231
|
-
stripe_config:
|
|
1232
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig,
|
|
1233
|
-
tax_type:
|
|
1234
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::TaxType::OrSymbol
|
|
1235
|
-
}
|
|
1236
|
-
)
|
|
1237
|
-
end
|
|
1238
|
-
def to_hash
|
|
1239
|
-
end
|
|
1240
|
-
|
|
1241
|
-
# Gate access to the commit balance based on successful collection of payment.
|
|
1242
|
-
# Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
1243
|
-
# facilitate payment using your own payment integration. Select NONE if you do not
|
|
1244
|
-
# wish to payment gate the commit balance.
|
|
1245
|
-
module PaymentGateType
|
|
1246
|
-
extend MetronomeSDK::Internal::Type::Enum
|
|
1247
|
-
|
|
1248
|
-
TaggedSymbol =
|
|
1249
|
-
T.type_alias do
|
|
1250
|
-
T.all(
|
|
1251
|
-
Symbol,
|
|
1252
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::PaymentGateType
|
|
1253
|
-
)
|
|
1254
|
-
end
|
|
1255
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1256
|
-
|
|
1257
|
-
NONE =
|
|
1258
|
-
T.let(
|
|
1259
|
-
:NONE,
|
|
1260
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::PaymentGateType::TaggedSymbol
|
|
1261
|
-
)
|
|
1262
|
-
STRIPE =
|
|
1263
|
-
T.let(
|
|
1264
|
-
:STRIPE,
|
|
1265
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::PaymentGateType::TaggedSymbol
|
|
1266
|
-
)
|
|
1267
|
-
EXTERNAL =
|
|
1268
|
-
T.let(
|
|
1269
|
-
:EXTERNAL,
|
|
1270
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::PaymentGateType::TaggedSymbol
|
|
1271
|
-
)
|
|
1272
|
-
|
|
1273
|
-
sig do
|
|
1274
|
-
override.returns(
|
|
1275
|
-
T::Array[
|
|
1276
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::PaymentGateType::TaggedSymbol
|
|
1277
|
-
]
|
|
1278
|
-
)
|
|
1279
|
-
end
|
|
1280
|
-
def self.values
|
|
1281
|
-
end
|
|
1282
|
-
end
|
|
1283
|
-
|
|
1284
|
-
class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
1285
|
-
OrHash =
|
|
1286
|
-
T.type_alias do
|
|
1287
|
-
T.any(
|
|
1288
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig,
|
|
1289
|
-
MetronomeSDK::Internal::AnyHash
|
|
1290
|
-
)
|
|
1291
|
-
end
|
|
1292
|
-
|
|
1293
|
-
# Amount of tax to be applied. This should be in the same currency and
|
|
1294
|
-
# denomination as the commit's invoice schedule
|
|
1295
|
-
sig { returns(Float) }
|
|
1296
|
-
attr_accessor :tax_amount
|
|
1297
|
-
|
|
1298
|
-
# Name of the tax to be applied. This may be used in an invoice line item
|
|
1299
|
-
# description.
|
|
1300
|
-
sig { returns(T.nilable(String)) }
|
|
1301
|
-
attr_reader :tax_name
|
|
1302
|
-
|
|
1303
|
-
sig { params(tax_name: String).void }
|
|
1304
|
-
attr_writer :tax_name
|
|
1305
|
-
|
|
1306
|
-
# Only applicable if using PRECALCULATED as your tax type.
|
|
1307
|
-
sig do
|
|
1308
|
-
params(tax_amount: Float, tax_name: String).returns(
|
|
1309
|
-
T.attached_class
|
|
1310
|
-
)
|
|
1311
|
-
end
|
|
1312
|
-
def self.new(
|
|
1313
|
-
# Amount of tax to be applied. This should be in the same currency and
|
|
1314
|
-
# denomination as the commit's invoice schedule
|
|
1315
|
-
tax_amount:,
|
|
1316
|
-
# Name of the tax to be applied. This may be used in an invoice line item
|
|
1317
|
-
# description.
|
|
1318
|
-
tax_name: nil
|
|
1319
|
-
)
|
|
1320
|
-
end
|
|
1321
|
-
|
|
1322
|
-
sig { override.returns({ tax_amount: Float, tax_name: String }) }
|
|
1323
|
-
def to_hash
|
|
1324
|
-
end
|
|
1325
|
-
end
|
|
1326
|
-
|
|
1327
|
-
class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
1328
|
-
OrHash =
|
|
1329
|
-
T.type_alias do
|
|
1330
|
-
T.any(
|
|
1331
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig,
|
|
1332
|
-
MetronomeSDK::Internal::AnyHash
|
|
1333
|
-
)
|
|
1334
|
-
end
|
|
1335
|
-
|
|
1336
|
-
# If left blank, will default to INVOICE
|
|
1337
|
-
sig do
|
|
1338
|
-
returns(
|
|
1339
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol
|
|
1340
|
-
)
|
|
1341
|
-
end
|
|
1342
|
-
attr_accessor :payment_type
|
|
1343
|
-
|
|
1344
|
-
# Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
1345
|
-
# your payment type.
|
|
1346
|
-
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
1347
|
-
attr_reader :invoice_metadata
|
|
1348
|
-
|
|
1349
|
-
sig { params(invoice_metadata: T::Hash[Symbol, String]).void }
|
|
1350
|
-
attr_writer :invoice_metadata
|
|
1351
|
-
|
|
1352
|
-
# If true, the payment will be made assuming the customer is present (i.e. on
|
|
1353
|
-
# session).
|
|
1354
|
-
#
|
|
1355
|
-
# If false, the payment will be made assuming the customer is not present (i.e.
|
|
1356
|
-
# off session). For cardholders from a country with an e-mandate requirement (e.g.
|
|
1357
|
-
# India), the payment may be declined.
|
|
1358
|
-
#
|
|
1359
|
-
# If left blank, will default to false.
|
|
1360
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
1361
|
-
attr_reader :on_session_payment
|
|
1362
|
-
|
|
1363
|
-
sig { params(on_session_payment: T::Boolean).void }
|
|
1364
|
-
attr_writer :on_session_payment
|
|
1365
|
-
|
|
1366
|
-
# Only applicable if using STRIPE as your payment gate type.
|
|
1367
|
-
sig do
|
|
1368
|
-
params(
|
|
1369
|
-
payment_type:
|
|
1370
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol,
|
|
1371
|
-
invoice_metadata: T::Hash[Symbol, String],
|
|
1372
|
-
on_session_payment: T::Boolean
|
|
1373
|
-
).returns(T.attached_class)
|
|
1374
|
-
end
|
|
1375
|
-
def self.new(
|
|
1376
|
-
# If left blank, will default to INVOICE
|
|
1377
|
-
payment_type:,
|
|
1378
|
-
# Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
1379
|
-
# your payment type.
|
|
1380
|
-
invoice_metadata: nil,
|
|
1381
|
-
# If true, the payment will be made assuming the customer is present (i.e. on
|
|
1382
|
-
# session).
|
|
1383
|
-
#
|
|
1384
|
-
# If false, the payment will be made assuming the customer is not present (i.e.
|
|
1385
|
-
# off session). For cardholders from a country with an e-mandate requirement (e.g.
|
|
1386
|
-
# India), the payment may be declined.
|
|
1387
|
-
#
|
|
1388
|
-
# If left blank, will default to false.
|
|
1389
|
-
on_session_payment: nil
|
|
1390
|
-
)
|
|
1391
|
-
end
|
|
1392
|
-
|
|
1393
|
-
sig do
|
|
1394
|
-
override.returns(
|
|
1395
|
-
{
|
|
1396
|
-
payment_type:
|
|
1397
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig::PaymentType::OrSymbol,
|
|
1398
|
-
invoice_metadata: T::Hash[Symbol, String],
|
|
1399
|
-
on_session_payment: T::Boolean
|
|
1400
|
-
}
|
|
1401
|
-
)
|
|
1402
|
-
end
|
|
1403
|
-
def to_hash
|
|
1404
|
-
end
|
|
1405
|
-
|
|
1406
|
-
# If left blank, will default to INVOICE
|
|
1407
|
-
module PaymentType
|
|
1408
|
-
extend MetronomeSDK::Internal::Type::Enum
|
|
1409
|
-
|
|
1410
|
-
TaggedSymbol =
|
|
1411
|
-
T.type_alias do
|
|
1412
|
-
T.all(
|
|
1413
|
-
Symbol,
|
|
1414
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig::PaymentType
|
|
1415
|
-
)
|
|
1416
|
-
end
|
|
1417
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1418
|
-
|
|
1419
|
-
INVOICE =
|
|
1420
|
-
T.let(
|
|
1421
|
-
:INVOICE,
|
|
1422
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig::PaymentType::TaggedSymbol
|
|
1423
|
-
)
|
|
1424
|
-
PAYMENT_INTENT =
|
|
1425
|
-
T.let(
|
|
1426
|
-
:PAYMENT_INTENT,
|
|
1427
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig::PaymentType::TaggedSymbol
|
|
1428
|
-
)
|
|
1429
|
-
|
|
1430
|
-
sig do
|
|
1431
|
-
override.returns(
|
|
1432
|
-
T::Array[
|
|
1433
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig::PaymentType::TaggedSymbol
|
|
1434
|
-
]
|
|
1435
|
-
)
|
|
1436
|
-
end
|
|
1437
|
-
def self.values
|
|
1438
|
-
end
|
|
1439
|
-
end
|
|
1440
|
-
end
|
|
1441
|
-
|
|
1442
|
-
# Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
1443
|
-
# not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
1444
|
-
# will default to NONE.
|
|
1445
|
-
module TaxType
|
|
1446
|
-
extend MetronomeSDK::Internal::Type::Enum
|
|
1447
|
-
|
|
1448
|
-
TaggedSymbol =
|
|
1449
|
-
T.type_alias do
|
|
1450
|
-
T.all(
|
|
1451
|
-
Symbol,
|
|
1452
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::TaxType
|
|
1453
|
-
)
|
|
1454
|
-
end
|
|
1455
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1456
|
-
|
|
1457
|
-
NONE =
|
|
1458
|
-
T.let(
|
|
1459
|
-
:NONE,
|
|
1460
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::TaxType::TaggedSymbol
|
|
1461
|
-
)
|
|
1462
|
-
STRIPE =
|
|
1463
|
-
T.let(
|
|
1464
|
-
:STRIPE,
|
|
1465
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::TaxType::TaggedSymbol
|
|
1466
|
-
)
|
|
1467
|
-
ANROK =
|
|
1468
|
-
T.let(
|
|
1469
|
-
:ANROK,
|
|
1470
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::TaxType::TaggedSymbol
|
|
1471
|
-
)
|
|
1472
|
-
PRECALCULATED =
|
|
1473
|
-
T.let(
|
|
1474
|
-
:PRECALCULATED,
|
|
1475
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::TaxType::TaggedSymbol
|
|
1476
|
-
)
|
|
1477
|
-
|
|
1478
|
-
sig do
|
|
1479
|
-
override.returns(
|
|
1480
|
-
T::Array[
|
|
1481
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::TaxType::TaggedSymbol
|
|
1482
|
-
]
|
|
1483
|
-
)
|
|
1484
|
-
end
|
|
1485
|
-
def self.values
|
|
1486
|
-
end
|
|
1487
|
-
end
|
|
1488
|
-
end
|
|
1489
|
-
|
|
1490
1094
|
module RateType
|
|
1491
1095
|
extend MetronomeSDK::Internal::Type::Enum
|
|
1492
1096
|
|
|
@@ -2690,16 +2294,6 @@ module MetronomeSDK
|
|
|
2690
2294
|
sig { params(recurring_commit_ids: T::Array[String]).void }
|
|
2691
2295
|
attr_writer :recurring_commit_ids
|
|
2692
2296
|
|
|
2693
|
-
# Can only be used for commit specific overrides. Must be used in conjunction with
|
|
2694
|
-
# one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
2695
|
-
# `presentation_group_values`. If provided, the override will only apply to
|
|
2696
|
-
# credits created by the specified recurring credit ids.
|
|
2697
|
-
sig { returns(T.nilable(T::Array[String])) }
|
|
2698
|
-
attr_reader :recurring_credit_ids
|
|
2699
|
-
|
|
2700
|
-
sig { params(recurring_credit_ids: T::Array[String]).void }
|
|
2701
|
-
attr_writer :recurring_credit_ids
|
|
2702
|
-
|
|
2703
2297
|
sig do
|
|
2704
2298
|
params(
|
|
2705
2299
|
billing_frequency:
|
|
@@ -2709,8 +2303,7 @@ module MetronomeSDK
|
|
|
2709
2303
|
pricing_group_values: T::Hash[Symbol, String],
|
|
2710
2304
|
product_id: String,
|
|
2711
2305
|
product_tags: T::Array[String],
|
|
2712
|
-
recurring_commit_ids: T::Array[String]
|
|
2713
|
-
recurring_credit_ids: T::Array[String]
|
|
2306
|
+
recurring_commit_ids: T::Array[String]
|
|
2714
2307
|
).returns(T.attached_class)
|
|
2715
2308
|
end
|
|
2716
2309
|
def self.new(
|
|
@@ -2735,12 +2328,7 @@ module MetronomeSDK
|
|
|
2735
2328
|
# one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
2736
2329
|
# `presentation_group_values`. If provided, the override will only apply to
|
|
2737
2330
|
# commits created by the specified recurring commit ids.
|
|
2738
|
-
recurring_commit_ids: nil
|
|
2739
|
-
# Can only be used for commit specific overrides. Must be used in conjunction with
|
|
2740
|
-
# one of `product_id`, `product_tags`, `pricing_group_values`, or
|
|
2741
|
-
# `presentation_group_values`. If provided, the override will only apply to
|
|
2742
|
-
# credits created by the specified recurring credit ids.
|
|
2743
|
-
recurring_credit_ids: nil
|
|
2331
|
+
recurring_commit_ids: nil
|
|
2744
2332
|
)
|
|
2745
2333
|
end
|
|
2746
2334
|
|
|
@@ -2754,8 +2342,7 @@ module MetronomeSDK
|
|
|
2754
2342
|
pricing_group_values: T::Hash[Symbol, String],
|
|
2755
2343
|
product_id: String,
|
|
2756
2344
|
product_tags: T::Array[String],
|
|
2757
|
-
recurring_commit_ids: T::Array[String]
|
|
2758
|
-
recurring_credit_ids: T::Array[String]
|
|
2345
|
+
recurring_commit_ids: T::Array[String]
|
|
2759
2346
|
}
|
|
2760
2347
|
)
|
|
2761
2348
|
end
|