metronome-sdk 3.5.0 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +53 -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/type/enum.rb +0 -25
- data/lib/metronome_sdk/models/commit.rb +27 -1
- data/lib/metronome_sdk/models/contract.rb +140 -1
- data/lib/metronome_sdk/models/contract_v2.rb +530 -6
- data/lib/metronome_sdk/models/contract_without_amendments.rb +142 -1
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +105 -2
- data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +103 -2
- data/lib/metronome_sdk/models/spend_threshold_configuration.rb +33 -1
- data/lib/metronome_sdk/models/spend_threshold_configuration_v2.rb +33 -1
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +1 -0
- data/lib/metronome_sdk/models/v1/contract_amend_params.rb +29 -177
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +147 -180
- data/lib/metronome_sdk/models/v1/contract_create_response.rb +1134 -3
- 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 +115 -18
- data/lib/metronome_sdk/models/v1/package_list_response.rb +110 -1
- data/lib/metronome_sdk/models/v1/package_retrieve_response.rb +114 -1
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +303 -5
- data/lib/metronome_sdk/models/v2/contract_edit_response.rb +3862 -3
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +507 -6
- data/lib/metronome_sdk/resources/v1/contracts/products.rb +6 -2
- data/lib/metronome_sdk/resources/v1/contracts.rb +72 -3
- data/lib/metronome_sdk/resources/v1/customers/invoices.rb +5 -1
- data/lib/metronome_sdk/resources/v1/packages.rb +6 -7
- data/lib/metronome_sdk/resources/v1.rb +0 -4
- data/lib/metronome_sdk/resources/v2/contracts.rb +5 -1
- data/lib/metronome_sdk/version.rb +1 -1
- data/lib/metronome_sdk.rb +2 -8
- data/rbi/metronome_sdk/models/commit.rbi +48 -0
- data/rbi/metronome_sdk/models/contract.rbi +354 -0
- data/rbi/metronome_sdk/models/contract_v2.rbi +1172 -4
- data/rbi/metronome_sdk/models/contract_without_amendments.rbi +368 -0
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +289 -6
- data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +283 -6
- data/rbi/metronome_sdk/models/spend_threshold_configuration.rbi +78 -3
- data/rbi/metronome_sdk/models/spend_threshold_configuration_v2.rbi +78 -3
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +54 -396
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +370 -398
- data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +2448 -4
- 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 +310 -56
- data/rbi/metronome_sdk/models/v1/package_list_response.rbi +307 -0
- data/rbi/metronome_sdk/models/v1/package_retrieve_response.rbi +307 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +734 -11
- data/rbi/metronome_sdk/models/v2/contract_edit_response.rbi +8612 -4
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1355 -219
- 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 +8 -7
- data/rbi/metronome_sdk/resources/v1.rbi +0 -3
- data/rbi/metronome_sdk/resources/v2/contracts.rbi +10 -0
- data/sig/metronome_sdk/models/commit.rbs +19 -0
- data/sig/metronome_sdk/models/contract.rbs +151 -0
- data/sig/metronome_sdk/models/contract_v2.rbs +494 -6
- data/sig/metronome_sdk/models/contract_without_amendments.rbs +151 -0
- data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration.rbs +116 -6
- data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbs +116 -6
- data/sig/metronome_sdk/models/spend_threshold_configuration.rbs +31 -3
- data/sig/metronome_sdk/models/spend_threshold_configuration_v2.rbs +31 -3
- data/sig/metronome_sdk/models/v1/alert_create_params.rbs +3 -1
- data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +19 -137
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +134 -137
- data/sig/metronome_sdk/models/v1/contract_create_response.rbs +1045 -4
- 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 +115 -20
- data/sig/metronome_sdk/models/v1/package_list_response.rbs +115 -0
- data/sig/metronome_sdk/models/v1/package_retrieve_response.rbs +115 -0
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +283 -9
- data/sig/metronome_sdk/models/v2/contract_edit_response.rbs +3792 -4
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +461 -15
- data/sig/metronome_sdk/resources/v1/contracts/products.rbs +2 -0
- data/sig/metronome_sdk/resources/v1/contracts.rbs +16 -0
- data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +2 -0
- data/sig/metronome_sdk/resources/v1/packages.rbs +1 -1
- data/sig/metronome_sdk/resources/v1.rbs +0 -2
- data/sig/metronome_sdk/resources/v2/contracts.rbs +2 -0
- metadata +8 -26
- data/lib/metronome_sdk/models/v1/payment.rb +0 -196
- data/lib/metronome_sdk/models/v1/payment_attempt_params.rb +0 -28
- data/lib/metronome_sdk/models/v1/payment_attempt_response.rb +0 -18
- data/lib/metronome_sdk/models/v1/payment_cancel_params.rb +0 -28
- data/lib/metronome_sdk/models/v1/payment_cancel_response.rb +0 -18
- data/lib/metronome_sdk/models/v1/payment_list_params.rb +0 -53
- data/lib/metronome_sdk/models/v1/payment_status.rb +0 -19
- data/lib/metronome_sdk/resources/v1/payments.rb +0 -102
- data/rbi/metronome_sdk/models/v1/payment.rbi +0 -403
- data/rbi/metronome_sdk/models/v1/payment_attempt_params.rbi +0 -48
- data/rbi/metronome_sdk/models/v1/payment_attempt_response.rbi +0 -35
- data/rbi/metronome_sdk/models/v1/payment_cancel_params.rbi +0 -48
- data/rbi/metronome_sdk/models/v1/payment_cancel_response.rbi +0 -35
- data/rbi/metronome_sdk/models/v1/payment_list_params.rbi +0 -91
- data/rbi/metronome_sdk/models/v1/payment_status.rbi +0 -33
- data/rbi/metronome_sdk/resources/v1/payments.rbi +0 -72
- data/sig/metronome_sdk/models/v1/payment.rbs +0 -243
- data/sig/metronome_sdk/models/v1/payment_attempt_params.rbs +0 -30
- data/sig/metronome_sdk/models/v1/payment_attempt_response.rbs +0 -15
- data/sig/metronome_sdk/models/v1/payment_cancel_params.rbs +0 -30
- data/sig/metronome_sdk/models/v1/payment_cancel_response.rbs +0 -15
- data/sig/metronome_sdk/models/v1/payment_list_params.rbs +0 -56
- data/sig/metronome_sdk/models/v1/payment_status.rbs +0 -19
- data/sig/metronome_sdk/resources/v1/payments.rbs +0 -30
|
@@ -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)) }
|
|
@@ -464,6 +446,24 @@ module MetronomeSDK
|
|
|
464
446
|
end
|
|
465
447
|
attr_writer :specifiers
|
|
466
448
|
|
|
449
|
+
# Optional attributes for spend tracker integration. Immutable after creation.
|
|
450
|
+
sig do
|
|
451
|
+
returns(
|
|
452
|
+
T.nilable(
|
|
453
|
+
MetronomeSDK::V1::ContractAmendParams::Commit::SpendTrackerAttributes
|
|
454
|
+
)
|
|
455
|
+
)
|
|
456
|
+
end
|
|
457
|
+
attr_reader :spend_tracker_attributes
|
|
458
|
+
|
|
459
|
+
sig do
|
|
460
|
+
params(
|
|
461
|
+
spend_tracker_attributes:
|
|
462
|
+
MetronomeSDK::V1::ContractAmendParams::Commit::SpendTrackerAttributes::OrHash
|
|
463
|
+
).void
|
|
464
|
+
end
|
|
465
|
+
attr_writer :spend_tracker_attributes
|
|
466
|
+
|
|
467
467
|
# A temporary ID for the commit that can be used to reference the commit for
|
|
468
468
|
# commit specific overrides.
|
|
469
469
|
sig { returns(T.nilable(String)) }
|
|
@@ -490,13 +490,13 @@ module MetronomeSDK
|
|
|
490
490
|
MetronomeSDK::V1::ContractAmendParams::Commit::InvoiceSchedule::OrHash,
|
|
491
491
|
name: String,
|
|
492
492
|
netsuite_sales_order_id: String,
|
|
493
|
-
payment_gate_config:
|
|
494
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::OrHash,
|
|
495
493
|
priority: Float,
|
|
496
494
|
rate_type:
|
|
497
495
|
MetronomeSDK::V1::ContractAmendParams::Commit::RateType::OrSymbol,
|
|
498
496
|
rollover_fraction: Float,
|
|
499
497
|
specifiers: T::Array[MetronomeSDK::CommitSpecifierInput::OrHash],
|
|
498
|
+
spend_tracker_attributes:
|
|
499
|
+
MetronomeSDK::V1::ContractAmendParams::Commit::SpendTrackerAttributes::OrHash,
|
|
500
500
|
temporary_id: String
|
|
501
501
|
).returns(T.attached_class)
|
|
502
502
|
end
|
|
@@ -532,8 +532,6 @@ module MetronomeSDK
|
|
|
532
532
|
name: nil,
|
|
533
533
|
# This field's availability is dependent on your client's configuration.
|
|
534
534
|
netsuite_sales_order_id: nil,
|
|
535
|
-
# optionally payment gate this commit
|
|
536
|
-
payment_gate_config: nil,
|
|
537
535
|
# If multiple commits are applicable, the one with the lower priority will apply
|
|
538
536
|
# first.
|
|
539
537
|
priority: nil,
|
|
@@ -545,6 +543,8 @@ module MetronomeSDK
|
|
|
545
543
|
# specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
546
544
|
# be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
547
545
|
specifiers: nil,
|
|
546
|
+
# Optional attributes for spend tracker integration. Immutable after creation.
|
|
547
|
+
spend_tracker_attributes: nil,
|
|
548
548
|
# A temporary ID for the commit that can be used to reference the commit for
|
|
549
549
|
# commit specific overrides.
|
|
550
550
|
temporary_id: nil
|
|
@@ -570,13 +570,13 @@ module MetronomeSDK
|
|
|
570
570
|
MetronomeSDK::V1::ContractAmendParams::Commit::InvoiceSchedule,
|
|
571
571
|
name: String,
|
|
572
572
|
netsuite_sales_order_id: String,
|
|
573
|
-
payment_gate_config:
|
|
574
|
-
MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig,
|
|
575
573
|
priority: Float,
|
|
576
574
|
rate_type:
|
|
577
575
|
MetronomeSDK::V1::ContractAmendParams::Commit::RateType::OrSymbol,
|
|
578
576
|
rollover_fraction: Float,
|
|
579
577
|
specifiers: T::Array[MetronomeSDK::CommitSpecifierInput],
|
|
578
|
+
spend_tracker_attributes:
|
|
579
|
+
MetronomeSDK::V1::ContractAmendParams::Commit::SpendTrackerAttributes,
|
|
580
580
|
temporary_id: String
|
|
581
581
|
}
|
|
582
582
|
)
|
|
@@ -1115,378 +1115,6 @@ module MetronomeSDK
|
|
|
1115
1115
|
end
|
|
1116
1116
|
end
|
|
1117
1117
|
|
|
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
1118
|
module RateType
|
|
1491
1119
|
extend MetronomeSDK::Internal::Type::Enum
|
|
1492
1120
|
|
|
@@ -1520,6 +1148,36 @@ module MetronomeSDK
|
|
|
1520
1148
|
def self.values
|
|
1521
1149
|
end
|
|
1522
1150
|
end
|
|
1151
|
+
|
|
1152
|
+
class SpendTrackerAttributes < MetronomeSDK::Internal::Type::BaseModel
|
|
1153
|
+
OrHash =
|
|
1154
|
+
T.type_alias do
|
|
1155
|
+
T.any(
|
|
1156
|
+
MetronomeSDK::V1::ContractAmendParams::Commit::SpendTrackerAttributes,
|
|
1157
|
+
MetronomeSDK::Internal::AnyHash
|
|
1158
|
+
)
|
|
1159
|
+
end
|
|
1160
|
+
|
|
1161
|
+
# If true, this commit will be included in spend trackers with discounted set to
|
|
1162
|
+
# DISCOUNTED_ONLY
|
|
1163
|
+
sig { returns(T::Boolean) }
|
|
1164
|
+
attr_accessor :counts_as_discounted
|
|
1165
|
+
|
|
1166
|
+
# Optional attributes for spend tracker integration. Immutable after creation.
|
|
1167
|
+
sig do
|
|
1168
|
+
params(counts_as_discounted: T::Boolean).returns(T.attached_class)
|
|
1169
|
+
end
|
|
1170
|
+
def self.new(
|
|
1171
|
+
# If true, this commit will be included in spend trackers with discounted set to
|
|
1172
|
+
# DISCOUNTED_ONLY
|
|
1173
|
+
counts_as_discounted:
|
|
1174
|
+
)
|
|
1175
|
+
end
|
|
1176
|
+
|
|
1177
|
+
sig { override.returns({ counts_as_discounted: T::Boolean }) }
|
|
1178
|
+
def to_hash
|
|
1179
|
+
end
|
|
1180
|
+
end
|
|
1523
1181
|
end
|
|
1524
1182
|
|
|
1525
1183
|
class Credit < MetronomeSDK::Internal::Type::BaseModel
|