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
|
@@ -206,12 +206,6 @@ module MetronomeSDK
|
|
|
206
206
|
# @return [String, nil]
|
|
207
207
|
optional :netsuite_sales_order_id, String
|
|
208
208
|
|
|
209
|
-
# @!attribute payment_gate_config
|
|
210
|
-
# optionally payment gate this commit
|
|
211
|
-
#
|
|
212
|
-
# @return [MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig, nil]
|
|
213
|
-
optional :payment_gate_config, -> { MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig }
|
|
214
|
-
|
|
215
209
|
# @!attribute priority
|
|
216
210
|
# If multiple commits are applicable, the one with the lower priority will apply
|
|
217
211
|
# first.
|
|
@@ -239,6 +233,13 @@ module MetronomeSDK
|
|
|
239
233
|
# @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
|
|
240
234
|
optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
|
|
241
235
|
|
|
236
|
+
# @!attribute spend_tracker_attributes
|
|
237
|
+
# Optional attributes for spend tracker integration. Immutable after creation.
|
|
238
|
+
#
|
|
239
|
+
# @return [MetronomeSDK::Models::V1::ContractAmendParams::Commit::SpendTrackerAttributes, nil]
|
|
240
|
+
optional :spend_tracker_attributes,
|
|
241
|
+
-> { MetronomeSDK::V1::ContractAmendParams::Commit::SpendTrackerAttributes }
|
|
242
|
+
|
|
242
243
|
# @!attribute temporary_id
|
|
243
244
|
# A temporary ID for the commit that can be used to reference the commit for
|
|
244
245
|
# commit specific overrides.
|
|
@@ -246,7 +247,7 @@ module MetronomeSDK
|
|
|
246
247
|
# @return [String, nil]
|
|
247
248
|
optional :temporary_id, String
|
|
248
249
|
|
|
249
|
-
# @!method initialize(product_id:, type:, access_schedule: nil, amount: nil, applicable_product_ids: nil, applicable_product_tags: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil,
|
|
250
|
+
# @!method initialize(product_id:, type:, access_schedule: nil, amount: nil, applicable_product_ids: nil, applicable_product_tags: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, rollover_fraction: nil, specifiers: nil, spend_tracker_attributes: nil, temporary_id: nil)
|
|
250
251
|
# Some parameter documentations has been truncated, see
|
|
251
252
|
# {MetronomeSDK::Models::V1::ContractAmendParams::Commit} for more details.
|
|
252
253
|
#
|
|
@@ -274,8 +275,6 @@ module MetronomeSDK
|
|
|
274
275
|
#
|
|
275
276
|
# @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
|
|
276
277
|
#
|
|
277
|
-
# @param payment_gate_config [MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig] optionally payment gate this commit
|
|
278
|
-
#
|
|
279
278
|
# @param priority [Float] If multiple commits are applicable, the one with the lower priority will apply f
|
|
280
279
|
#
|
|
281
280
|
# @param rate_type [Symbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::RateType]
|
|
@@ -284,6 +283,8 @@ module MetronomeSDK
|
|
|
284
283
|
#
|
|
285
284
|
# @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
|
|
286
285
|
#
|
|
286
|
+
# @param spend_tracker_attributes [MetronomeSDK::Models::V1::ContractAmendParams::Commit::SpendTrackerAttributes] Optional attributes for spend tracker integration. Immutable after creation.
|
|
287
|
+
#
|
|
287
288
|
# @param temporary_id [String] A temporary ID for the commit that can be used to reference the commit for commi
|
|
288
289
|
|
|
289
290
|
# @see MetronomeSDK::Models::V1::ContractAmendParams::Commit#type
|
|
@@ -541,174 +542,6 @@ module MetronomeSDK
|
|
|
541
542
|
end
|
|
542
543
|
end
|
|
543
544
|
|
|
544
|
-
# @see MetronomeSDK::Models::V1::ContractAmendParams::Commit#payment_gate_config
|
|
545
|
-
class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
546
|
-
# @!attribute payment_gate_type
|
|
547
|
-
# Gate access to the commit balance based on successful collection of payment.
|
|
548
|
-
# Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
549
|
-
# facilitate payment using your own payment integration. Select NONE if you do not
|
|
550
|
-
# wish to payment gate the commit balance.
|
|
551
|
-
#
|
|
552
|
-
# @return [Symbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::PaymentGateType]
|
|
553
|
-
required :payment_gate_type,
|
|
554
|
-
enum: -> { MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::PaymentGateType }
|
|
555
|
-
|
|
556
|
-
# @!attribute precalculated_tax_config
|
|
557
|
-
# Only applicable if using PRECALCULATED as your tax type.
|
|
558
|
-
#
|
|
559
|
-
# @return [MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig, nil]
|
|
560
|
-
optional :precalculated_tax_config,
|
|
561
|
-
-> { MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig }
|
|
562
|
-
|
|
563
|
-
# @!attribute stripe_config
|
|
564
|
-
# Only applicable if using STRIPE as your payment gate type.
|
|
565
|
-
#
|
|
566
|
-
# @return [MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig, nil]
|
|
567
|
-
optional :stripe_config,
|
|
568
|
-
-> { MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig }
|
|
569
|
-
|
|
570
|
-
# @!attribute tax_type
|
|
571
|
-
# Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
572
|
-
# not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
573
|
-
# will default to NONE.
|
|
574
|
-
#
|
|
575
|
-
# @return [Symbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::TaxType, nil]
|
|
576
|
-
optional :tax_type, enum: -> { MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::TaxType }
|
|
577
|
-
|
|
578
|
-
# @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
|
|
579
|
-
# Some parameter documentations has been truncated, see
|
|
580
|
-
# {MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig} for
|
|
581
|
-
# more details.
|
|
582
|
-
#
|
|
583
|
-
# optionally payment gate this commit
|
|
584
|
-
#
|
|
585
|
-
# @param payment_gate_type [Symbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::PaymentGateType] Gate access to the commit balance based on successful collection of payment. Sel
|
|
586
|
-
#
|
|
587
|
-
# @param precalculated_tax_config [MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
|
|
588
|
-
#
|
|
589
|
-
# @param stripe_config [MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gate type.
|
|
590
|
-
#
|
|
591
|
-
# @param tax_type [Symbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::TaxType] Stripe tax is only supported for Stripe payment gateway. Select NONE if you do n
|
|
592
|
-
|
|
593
|
-
# Gate access to the commit balance based on successful collection of payment.
|
|
594
|
-
# Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
595
|
-
# facilitate payment using your own payment integration. Select NONE if you do not
|
|
596
|
-
# wish to payment gate the commit balance.
|
|
597
|
-
#
|
|
598
|
-
# @see MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig#payment_gate_type
|
|
599
|
-
module PaymentGateType
|
|
600
|
-
extend MetronomeSDK::Internal::Type::Enum
|
|
601
|
-
|
|
602
|
-
NONE = :NONE
|
|
603
|
-
STRIPE = :STRIPE
|
|
604
|
-
EXTERNAL = :EXTERNAL
|
|
605
|
-
|
|
606
|
-
# @!method self.values
|
|
607
|
-
# @return [Array<Symbol>]
|
|
608
|
-
end
|
|
609
|
-
|
|
610
|
-
# @see MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig#precalculated_tax_config
|
|
611
|
-
class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
612
|
-
# @!attribute tax_amount
|
|
613
|
-
# Amount of tax to be applied. This should be in the same currency and
|
|
614
|
-
# denomination as the commit's invoice schedule
|
|
615
|
-
#
|
|
616
|
-
# @return [Float]
|
|
617
|
-
required :tax_amount, Float
|
|
618
|
-
|
|
619
|
-
# @!attribute tax_name
|
|
620
|
-
# Name of the tax to be applied. This may be used in an invoice line item
|
|
621
|
-
# description.
|
|
622
|
-
#
|
|
623
|
-
# @return [String, nil]
|
|
624
|
-
optional :tax_name, String
|
|
625
|
-
|
|
626
|
-
# @!method initialize(tax_amount:, tax_name: nil)
|
|
627
|
-
# Some parameter documentations has been truncated, see
|
|
628
|
-
# {MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig}
|
|
629
|
-
# for more details.
|
|
630
|
-
#
|
|
631
|
-
# Only applicable if using PRECALCULATED as your tax type.
|
|
632
|
-
#
|
|
633
|
-
# @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
|
|
634
|
-
#
|
|
635
|
-
# @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
|
|
636
|
-
end
|
|
637
|
-
|
|
638
|
-
# @see MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig#stripe_config
|
|
639
|
-
class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
640
|
-
# @!attribute payment_type
|
|
641
|
-
# If left blank, will default to INVOICE
|
|
642
|
-
#
|
|
643
|
-
# @return [Symbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig::PaymentType]
|
|
644
|
-
required :payment_type,
|
|
645
|
-
enum: -> { MetronomeSDK::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig::PaymentType }
|
|
646
|
-
|
|
647
|
-
# @!attribute invoice_metadata
|
|
648
|
-
# Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
649
|
-
# your payment type.
|
|
650
|
-
#
|
|
651
|
-
# @return [Hash{Symbol=>String}, nil]
|
|
652
|
-
optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
|
|
653
|
-
|
|
654
|
-
# @!attribute on_session_payment
|
|
655
|
-
# If true, the payment will be made assuming the customer is present (i.e. on
|
|
656
|
-
# session).
|
|
657
|
-
#
|
|
658
|
-
# If false, the payment will be made assuming the customer is not present (i.e.
|
|
659
|
-
# off session). For cardholders from a country with an e-mandate requirement (e.g.
|
|
660
|
-
# India), the payment may be declined.
|
|
661
|
-
#
|
|
662
|
-
# If left blank, will default to false.
|
|
663
|
-
#
|
|
664
|
-
# @return [Boolean, nil]
|
|
665
|
-
optional :on_session_payment, MetronomeSDK::Internal::Type::Boolean
|
|
666
|
-
|
|
667
|
-
# @!method initialize(payment_type:, invoice_metadata: nil, on_session_payment: nil)
|
|
668
|
-
# Some parameter documentations has been truncated, see
|
|
669
|
-
# {MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig}
|
|
670
|
-
# for more details.
|
|
671
|
-
#
|
|
672
|
-
# Only applicable if using STRIPE as your payment gate type.
|
|
673
|
-
#
|
|
674
|
-
# @param payment_type [Symbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
|
|
675
|
-
#
|
|
676
|
-
# @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
677
|
-
#
|
|
678
|
-
# @param on_session_payment [Boolean] If true, the payment will be made assuming the customer is present (i.e. on sess
|
|
679
|
-
|
|
680
|
-
# If left blank, will default to INVOICE
|
|
681
|
-
#
|
|
682
|
-
# @see MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig#payment_type
|
|
683
|
-
module PaymentType
|
|
684
|
-
extend MetronomeSDK::Internal::Type::Enum
|
|
685
|
-
|
|
686
|
-
INVOICE = :INVOICE
|
|
687
|
-
PAYMENT_INTENT = :PAYMENT_INTENT
|
|
688
|
-
|
|
689
|
-
# @!method self.values
|
|
690
|
-
# @return [Array<Symbol>]
|
|
691
|
-
end
|
|
692
|
-
end
|
|
693
|
-
|
|
694
|
-
# Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
695
|
-
# not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
696
|
-
# will default to NONE.
|
|
697
|
-
#
|
|
698
|
-
# @see MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig#tax_type
|
|
699
|
-
module TaxType
|
|
700
|
-
extend MetronomeSDK::Internal::Type::Enum
|
|
701
|
-
|
|
702
|
-
NONE = :NONE
|
|
703
|
-
STRIPE = :STRIPE
|
|
704
|
-
ANROK = :ANROK
|
|
705
|
-
PRECALCULATED = :PRECALCULATED
|
|
706
|
-
|
|
707
|
-
# @!method self.values
|
|
708
|
-
# @return [Array<Symbol>]
|
|
709
|
-
end
|
|
710
|
-
end
|
|
711
|
-
|
|
712
545
|
# @see MetronomeSDK::Models::V1::ContractAmendParams::Commit#rate_type
|
|
713
546
|
module RateType
|
|
714
547
|
extend MetronomeSDK::Internal::Type::Enum
|
|
@@ -719,6 +552,25 @@ module MetronomeSDK
|
|
|
719
552
|
# @!method self.values
|
|
720
553
|
# @return [Array<Symbol>]
|
|
721
554
|
end
|
|
555
|
+
|
|
556
|
+
# @see MetronomeSDK::Models::V1::ContractAmendParams::Commit#spend_tracker_attributes
|
|
557
|
+
class SpendTrackerAttributes < MetronomeSDK::Internal::Type::BaseModel
|
|
558
|
+
# @!attribute counts_as_discounted
|
|
559
|
+
# If true, this commit will be included in spend trackers with discounted set to
|
|
560
|
+
# DISCOUNTED_ONLY
|
|
561
|
+
#
|
|
562
|
+
# @return [Boolean]
|
|
563
|
+
required :counts_as_discounted, MetronomeSDK::Internal::Type::Boolean
|
|
564
|
+
|
|
565
|
+
# @!method initialize(counts_as_discounted:)
|
|
566
|
+
# Some parameter documentations has been truncated, see
|
|
567
|
+
# {MetronomeSDK::Models::V1::ContractAmendParams::Commit::SpendTrackerAttributes}
|
|
568
|
+
# for more details.
|
|
569
|
+
#
|
|
570
|
+
# Optional attributes for spend tracker integration. Immutable after creation.
|
|
571
|
+
#
|
|
572
|
+
# @param counts_as_discounted [Boolean] If true, this commit will be included in spend trackers with discounted set to D
|
|
573
|
+
end
|
|
722
574
|
end
|
|
723
575
|
|
|
724
576
|
class Credit < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -105,7 +105,7 @@ module MetronomeSDK
|
|
|
105
105
|
# @!attribute package_id
|
|
106
106
|
# If provided, provisions a customer on a package instead of creating a
|
|
107
107
|
# traditional contract. When specified, only customer_id, starting_at, package_id,
|
|
108
|
-
# and
|
|
108
|
+
# uniqueness_key, transition, and custom_fields are allowed.
|
|
109
109
|
#
|
|
110
110
|
# @return [String, nil]
|
|
111
111
|
optional :package_id, String
|
|
@@ -190,6 +190,14 @@ module MetronomeSDK
|
|
|
190
190
|
# @return [MetronomeSDK::Models::SpendThresholdConfiguration, nil]
|
|
191
191
|
optional :spend_threshold_configuration, -> { MetronomeSDK::SpendThresholdConfiguration }
|
|
192
192
|
|
|
193
|
+
# @!attribute spend_trackers
|
|
194
|
+
# Spend trackers to attach to this contract. Aliases must be unique within a
|
|
195
|
+
# contract.
|
|
196
|
+
#
|
|
197
|
+
# @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::SpendTracker>, nil]
|
|
198
|
+
optional :spend_trackers,
|
|
199
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::SpendTracker] }
|
|
200
|
+
|
|
193
201
|
# @!attribute subscriptions
|
|
194
202
|
# Optional list of
|
|
195
203
|
# [subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/)
|
|
@@ -228,7 +236,7 @@ module MetronomeSDK
|
|
|
228
236
|
# @return [MetronomeSDK::Models::V1::ContractCreateParams::UsageStatementSchedule, nil]
|
|
229
237
|
optional :usage_statement_schedule, -> { MetronomeSDK::V1::ContractCreateParams::UsageStatementSchedule }
|
|
230
238
|
|
|
231
|
-
# @!method initialize(customer_id:, starting_at:, billing_provider_configuration: nil, commits: nil, credits: nil, custom_fields: nil, discounts: nil, ending_before: nil, hierarchy_configuration: nil, multiplier_override_prioritization: nil, name: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, overrides: nil, package_alias: nil, package_id: nil, prepaid_balance_threshold_configuration: nil, professional_services: nil, rate_card_alias: nil, rate_card_id: nil, recurring_commits: nil, recurring_credits: nil, reseller_royalties: nil, revenue_system_configuration: nil, salesforce_opportunity_id: nil, scheduled_charges: nil, scheduled_charges_on_usage_invoices: nil, spend_threshold_configuration: nil, subscriptions: nil, total_contract_value: nil, transition: nil, uniqueness_key: nil, usage_filter: nil, usage_statement_schedule: nil, request_options: {})
|
|
239
|
+
# @!method initialize(customer_id:, starting_at:, billing_provider_configuration: nil, commits: nil, credits: nil, custom_fields: nil, discounts: nil, ending_before: nil, hierarchy_configuration: nil, multiplier_override_prioritization: nil, name: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, overrides: nil, package_alias: nil, package_id: nil, prepaid_balance_threshold_configuration: nil, professional_services: nil, rate_card_alias: nil, rate_card_id: nil, recurring_commits: nil, recurring_credits: nil, reseller_royalties: nil, revenue_system_configuration: nil, salesforce_opportunity_id: nil, scheduled_charges: nil, scheduled_charges_on_usage_invoices: nil, spend_threshold_configuration: nil, spend_trackers: nil, subscriptions: nil, total_contract_value: nil, transition: nil, uniqueness_key: nil, usage_filter: nil, usage_statement_schedule: nil, request_options: {})
|
|
232
240
|
# Some parameter documentations has been truncated, see
|
|
233
241
|
# {MetronomeSDK::Models::V1::ContractCreateParams} for more details.
|
|
234
242
|
#
|
|
@@ -288,6 +296,8 @@ module MetronomeSDK
|
|
|
288
296
|
#
|
|
289
297
|
# @param spend_threshold_configuration [MetronomeSDK::Models::SpendThresholdConfiguration]
|
|
290
298
|
#
|
|
299
|
+
# @param spend_trackers [Array<MetronomeSDK::Models::V1::ContractCreateParams::SpendTracker>] Spend trackers to attach to this contract. Aliases must be unique within a contr
|
|
300
|
+
#
|
|
291
301
|
# @param subscriptions [Array<MetronomeSDK::Models::V1::ContractCreateParams::Subscription>] Optional list of [subscriptions](https://docs.metronome.com/manage-product-acces
|
|
292
302
|
#
|
|
293
303
|
# @param total_contract_value [Float] This field's availability is dependent on your client's configuration.
|
|
@@ -451,12 +461,6 @@ module MetronomeSDK
|
|
|
451
461
|
# @return [String, nil]
|
|
452
462
|
optional :netsuite_sales_order_id, String
|
|
453
463
|
|
|
454
|
-
# @!attribute payment_gate_config
|
|
455
|
-
# optionally payment gate this commit
|
|
456
|
-
#
|
|
457
|
-
# @return [MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig, nil]
|
|
458
|
-
optional :payment_gate_config, -> { MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig }
|
|
459
|
-
|
|
460
464
|
# @!attribute priority
|
|
461
465
|
# If multiple commits are applicable, the one with the lower priority will apply
|
|
462
466
|
# first.
|
|
@@ -484,6 +488,13 @@ module MetronomeSDK
|
|
|
484
488
|
# @return [Array<MetronomeSDK::Models::CommitSpecifierInput>, nil]
|
|
485
489
|
optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }
|
|
486
490
|
|
|
491
|
+
# @!attribute spend_tracker_attributes
|
|
492
|
+
# Optional attributes for spend tracker integration. Immutable after creation.
|
|
493
|
+
#
|
|
494
|
+
# @return [MetronomeSDK::Models::V1::ContractCreateParams::Commit::SpendTrackerAttributes, nil]
|
|
495
|
+
optional :spend_tracker_attributes,
|
|
496
|
+
-> { MetronomeSDK::V1::ContractCreateParams::Commit::SpendTrackerAttributes }
|
|
497
|
+
|
|
487
498
|
# @!attribute temporary_id
|
|
488
499
|
# A temporary ID for the commit that can be used to reference the commit for
|
|
489
500
|
# commit specific overrides.
|
|
@@ -491,7 +502,7 @@ module MetronomeSDK
|
|
|
491
502
|
# @return [String, nil]
|
|
492
503
|
optional :temporary_id, String
|
|
493
504
|
|
|
494
|
-
# @!method initialize(product_id:, type:, access_schedule: nil, amount: nil, applicable_product_ids: nil, applicable_product_tags: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil,
|
|
505
|
+
# @!method initialize(product_id:, type:, access_schedule: nil, amount: nil, applicable_product_ids: nil, applicable_product_tags: nil, custom_fields: nil, description: nil, hierarchy_configuration: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil, priority: nil, rate_type: nil, rollover_fraction: nil, specifiers: nil, spend_tracker_attributes: nil, temporary_id: nil)
|
|
495
506
|
# Some parameter documentations has been truncated, see
|
|
496
507
|
# {MetronomeSDK::Models::V1::ContractCreateParams::Commit} for more details.
|
|
497
508
|
#
|
|
@@ -519,8 +530,6 @@ module MetronomeSDK
|
|
|
519
530
|
#
|
|
520
531
|
# @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
|
|
521
532
|
#
|
|
522
|
-
# @param payment_gate_config [MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig] optionally payment gate this commit
|
|
523
|
-
#
|
|
524
533
|
# @param priority [Float] If multiple commits are applicable, the one with the lower priority will apply f
|
|
525
534
|
#
|
|
526
535
|
# @param rate_type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Commit::RateType]
|
|
@@ -529,6 +538,8 @@ module MetronomeSDK
|
|
|
529
538
|
#
|
|
530
539
|
# @param specifiers [Array<MetronomeSDK::Models::CommitSpecifierInput>] List of filters that determine what kind of customer usage draws down a commit o
|
|
531
540
|
#
|
|
541
|
+
# @param spend_tracker_attributes [MetronomeSDK::Models::V1::ContractCreateParams::Commit::SpendTrackerAttributes] Optional attributes for spend tracker integration. Immutable after creation.
|
|
542
|
+
#
|
|
532
543
|
# @param temporary_id [String] A temporary ID for the commit that can be used to reference the commit for commi
|
|
533
544
|
|
|
534
545
|
# @see MetronomeSDK::Models::V1::ContractCreateParams::Commit#type
|
|
@@ -786,175 +797,6 @@ module MetronomeSDK
|
|
|
786
797
|
end
|
|
787
798
|
end
|
|
788
799
|
|
|
789
|
-
# @see MetronomeSDK::Models::V1::ContractCreateParams::Commit#payment_gate_config
|
|
790
|
-
class PaymentGateConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
791
|
-
# @!attribute payment_gate_type
|
|
792
|
-
# Gate access to the commit balance based on successful collection of payment.
|
|
793
|
-
# Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
794
|
-
# facilitate payment using your own payment integration. Select NONE if you do not
|
|
795
|
-
# wish to payment gate the commit balance.
|
|
796
|
-
#
|
|
797
|
-
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig::PaymentGateType]
|
|
798
|
-
required :payment_gate_type,
|
|
799
|
-
enum: -> { MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::PaymentGateType }
|
|
800
|
-
|
|
801
|
-
# @!attribute precalculated_tax_config
|
|
802
|
-
# Only applicable if using PRECALCULATED as your tax type.
|
|
803
|
-
#
|
|
804
|
-
# @return [MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig, nil]
|
|
805
|
-
optional :precalculated_tax_config,
|
|
806
|
-
-> { MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig }
|
|
807
|
-
|
|
808
|
-
# @!attribute stripe_config
|
|
809
|
-
# Only applicable if using STRIPE as your payment gate type.
|
|
810
|
-
#
|
|
811
|
-
# @return [MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig, nil]
|
|
812
|
-
optional :stripe_config,
|
|
813
|
-
-> { MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig }
|
|
814
|
-
|
|
815
|
-
# @!attribute tax_type
|
|
816
|
-
# Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
817
|
-
# not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
818
|
-
# will default to NONE.
|
|
819
|
-
#
|
|
820
|
-
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig::TaxType, nil]
|
|
821
|
-
optional :tax_type,
|
|
822
|
-
enum: -> { MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::TaxType }
|
|
823
|
-
|
|
824
|
-
# @!method initialize(payment_gate_type:, precalculated_tax_config: nil, stripe_config: nil, tax_type: nil)
|
|
825
|
-
# Some parameter documentations has been truncated, see
|
|
826
|
-
# {MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig} for
|
|
827
|
-
# more details.
|
|
828
|
-
#
|
|
829
|
-
# optionally payment gate this commit
|
|
830
|
-
#
|
|
831
|
-
# @param payment_gate_type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig::PaymentGateType] Gate access to the commit balance based on successful collection of payment. Sel
|
|
832
|
-
#
|
|
833
|
-
# @param precalculated_tax_config [MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig] Only applicable if using PRECALCULATED as your tax type.
|
|
834
|
-
#
|
|
835
|
-
# @param stripe_config [MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig] Only applicable if using STRIPE as your payment gate type.
|
|
836
|
-
#
|
|
837
|
-
# @param tax_type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig::TaxType] Stripe tax is only supported for Stripe payment gateway. Select NONE if you do n
|
|
838
|
-
|
|
839
|
-
# Gate access to the commit balance based on successful collection of payment.
|
|
840
|
-
# Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
841
|
-
# facilitate payment using your own payment integration. Select NONE if you do not
|
|
842
|
-
# wish to payment gate the commit balance.
|
|
843
|
-
#
|
|
844
|
-
# @see MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig#payment_gate_type
|
|
845
|
-
module PaymentGateType
|
|
846
|
-
extend MetronomeSDK::Internal::Type::Enum
|
|
847
|
-
|
|
848
|
-
NONE = :NONE
|
|
849
|
-
STRIPE = :STRIPE
|
|
850
|
-
EXTERNAL = :EXTERNAL
|
|
851
|
-
|
|
852
|
-
# @!method self.values
|
|
853
|
-
# @return [Array<Symbol>]
|
|
854
|
-
end
|
|
855
|
-
|
|
856
|
-
# @see MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig#precalculated_tax_config
|
|
857
|
-
class PrecalculatedTaxConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
858
|
-
# @!attribute tax_amount
|
|
859
|
-
# Amount of tax to be applied. This should be in the same currency and
|
|
860
|
-
# denomination as the commit's invoice schedule
|
|
861
|
-
#
|
|
862
|
-
# @return [Float]
|
|
863
|
-
required :tax_amount, Float
|
|
864
|
-
|
|
865
|
-
# @!attribute tax_name
|
|
866
|
-
# Name of the tax to be applied. This may be used in an invoice line item
|
|
867
|
-
# description.
|
|
868
|
-
#
|
|
869
|
-
# @return [String, nil]
|
|
870
|
-
optional :tax_name, String
|
|
871
|
-
|
|
872
|
-
# @!method initialize(tax_amount:, tax_name: nil)
|
|
873
|
-
# Some parameter documentations has been truncated, see
|
|
874
|
-
# {MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig::PrecalculatedTaxConfig}
|
|
875
|
-
# for more details.
|
|
876
|
-
#
|
|
877
|
-
# Only applicable if using PRECALCULATED as your tax type.
|
|
878
|
-
#
|
|
879
|
-
# @param tax_amount [Float] Amount of tax to be applied. This should be in the same currency and denominatio
|
|
880
|
-
#
|
|
881
|
-
# @param tax_name [String] Name of the tax to be applied. This may be used in an invoice line item descript
|
|
882
|
-
end
|
|
883
|
-
|
|
884
|
-
# @see MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig#stripe_config
|
|
885
|
-
class StripeConfig < MetronomeSDK::Internal::Type::BaseModel
|
|
886
|
-
# @!attribute payment_type
|
|
887
|
-
# If left blank, will default to INVOICE
|
|
888
|
-
#
|
|
889
|
-
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig::PaymentType]
|
|
890
|
-
required :payment_type,
|
|
891
|
-
enum: -> { MetronomeSDK::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig::PaymentType }
|
|
892
|
-
|
|
893
|
-
# @!attribute invoice_metadata
|
|
894
|
-
# Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
895
|
-
# your payment type.
|
|
896
|
-
#
|
|
897
|
-
# @return [Hash{Symbol=>String}, nil]
|
|
898
|
-
optional :invoice_metadata, MetronomeSDK::Internal::Type::HashOf[String]
|
|
899
|
-
|
|
900
|
-
# @!attribute on_session_payment
|
|
901
|
-
# If true, the payment will be made assuming the customer is present (i.e. on
|
|
902
|
-
# session).
|
|
903
|
-
#
|
|
904
|
-
# If false, the payment will be made assuming the customer is not present (i.e.
|
|
905
|
-
# off session). For cardholders from a country with an e-mandate requirement (e.g.
|
|
906
|
-
# India), the payment may be declined.
|
|
907
|
-
#
|
|
908
|
-
# If left blank, will default to false.
|
|
909
|
-
#
|
|
910
|
-
# @return [Boolean, nil]
|
|
911
|
-
optional :on_session_payment, MetronomeSDK::Internal::Type::Boolean
|
|
912
|
-
|
|
913
|
-
# @!method initialize(payment_type:, invoice_metadata: nil, on_session_payment: nil)
|
|
914
|
-
# Some parameter documentations has been truncated, see
|
|
915
|
-
# {MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig}
|
|
916
|
-
# for more details.
|
|
917
|
-
#
|
|
918
|
-
# Only applicable if using STRIPE as your payment gate type.
|
|
919
|
-
#
|
|
920
|
-
# @param payment_type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig::PaymentType] If left blank, will default to INVOICE
|
|
921
|
-
#
|
|
922
|
-
# @param invoice_metadata [Hash{Symbol=>String}] Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
923
|
-
#
|
|
924
|
-
# @param on_session_payment [Boolean] If true, the payment will be made assuming the customer is present (i.e. on sess
|
|
925
|
-
|
|
926
|
-
# If left blank, will default to INVOICE
|
|
927
|
-
#
|
|
928
|
-
# @see MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig#payment_type
|
|
929
|
-
module PaymentType
|
|
930
|
-
extend MetronomeSDK::Internal::Type::Enum
|
|
931
|
-
|
|
932
|
-
INVOICE = :INVOICE
|
|
933
|
-
PAYMENT_INTENT = :PAYMENT_INTENT
|
|
934
|
-
|
|
935
|
-
# @!method self.values
|
|
936
|
-
# @return [Array<Symbol>]
|
|
937
|
-
end
|
|
938
|
-
end
|
|
939
|
-
|
|
940
|
-
# Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
941
|
-
# not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
942
|
-
# will default to NONE.
|
|
943
|
-
#
|
|
944
|
-
# @see MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig#tax_type
|
|
945
|
-
module TaxType
|
|
946
|
-
extend MetronomeSDK::Internal::Type::Enum
|
|
947
|
-
|
|
948
|
-
NONE = :NONE
|
|
949
|
-
STRIPE = :STRIPE
|
|
950
|
-
ANROK = :ANROK
|
|
951
|
-
PRECALCULATED = :PRECALCULATED
|
|
952
|
-
|
|
953
|
-
# @!method self.values
|
|
954
|
-
# @return [Array<Symbol>]
|
|
955
|
-
end
|
|
956
|
-
end
|
|
957
|
-
|
|
958
800
|
# @see MetronomeSDK::Models::V1::ContractCreateParams::Commit#rate_type
|
|
959
801
|
module RateType
|
|
960
802
|
extend MetronomeSDK::Internal::Type::Enum
|
|
@@ -965,6 +807,25 @@ module MetronomeSDK
|
|
|
965
807
|
# @!method self.values
|
|
966
808
|
# @return [Array<Symbol>]
|
|
967
809
|
end
|
|
810
|
+
|
|
811
|
+
# @see MetronomeSDK::Models::V1::ContractCreateParams::Commit#spend_tracker_attributes
|
|
812
|
+
class SpendTrackerAttributes < MetronomeSDK::Internal::Type::BaseModel
|
|
813
|
+
# @!attribute counts_as_discounted
|
|
814
|
+
# If true, this commit will be included in spend trackers with discounted set to
|
|
815
|
+
# DISCOUNTED_ONLY
|
|
816
|
+
#
|
|
817
|
+
# @return [Boolean]
|
|
818
|
+
required :counts_as_discounted, MetronomeSDK::Internal::Type::Boolean
|
|
819
|
+
|
|
820
|
+
# @!method initialize(counts_as_discounted:)
|
|
821
|
+
# Some parameter documentations has been truncated, see
|
|
822
|
+
# {MetronomeSDK::Models::V1::ContractCreateParams::Commit::SpendTrackerAttributes}
|
|
823
|
+
# for more details.
|
|
824
|
+
#
|
|
825
|
+
# Optional attributes for spend tracker integration. Immutable after creation.
|
|
826
|
+
#
|
|
827
|
+
# @param counts_as_discounted [Boolean] If true, this commit will be included in spend trackers with discounted set to D
|
|
828
|
+
end
|
|
968
829
|
end
|
|
969
830
|
|
|
970
831
|
class Credit < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -3100,6 +2961,112 @@ module MetronomeSDK
|
|
|
3100
2961
|
# @return [Array<Symbol>]
|
|
3101
2962
|
end
|
|
3102
2963
|
|
|
2964
|
+
class SpendTracker < MetronomeSDK::Internal::Type::BaseModel
|
|
2965
|
+
# @!attribute alias_
|
|
2966
|
+
# Human-readable identifier, unique per contract.
|
|
2967
|
+
#
|
|
2968
|
+
# @return [String]
|
|
2969
|
+
required :alias_, String, api_name: :alias
|
|
2970
|
+
|
|
2971
|
+
# @!attribute applicable_spend_specifiers
|
|
2972
|
+
#
|
|
2973
|
+
# @return [Array<MetronomeSDK::Models::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier>]
|
|
2974
|
+
required :applicable_spend_specifiers,
|
|
2975
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier] }
|
|
2976
|
+
|
|
2977
|
+
# @!attribute credit_type_id
|
|
2978
|
+
#
|
|
2979
|
+
# @return [String]
|
|
2980
|
+
required :credit_type_id, String
|
|
2981
|
+
|
|
2982
|
+
# @!attribute reset_frequency
|
|
2983
|
+
#
|
|
2984
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::SpendTracker::ResetFrequency]
|
|
2985
|
+
required :reset_frequency,
|
|
2986
|
+
enum: -> { MetronomeSDK::V1::ContractCreateParams::SpendTracker::ResetFrequency }
|
|
2987
|
+
|
|
2988
|
+
# @!method initialize(alias_:, applicable_spend_specifiers:, credit_type_id:, reset_frequency:)
|
|
2989
|
+
# @param alias_ [String] Human-readable identifier, unique per contract.
|
|
2990
|
+
#
|
|
2991
|
+
# @param applicable_spend_specifiers [Array<MetronomeSDK::Models::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier>]
|
|
2992
|
+
#
|
|
2993
|
+
# @param credit_type_id [String]
|
|
2994
|
+
#
|
|
2995
|
+
# @param reset_frequency [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::SpendTracker::ResetFrequency]
|
|
2996
|
+
|
|
2997
|
+
class ApplicableSpendSpecifier < MetronomeSDK::Internal::Type::BaseModel
|
|
2998
|
+
# @!attribute sources
|
|
2999
|
+
#
|
|
3000
|
+
# @return [Array<Symbol, MetronomeSDK::Models::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Source>]
|
|
3001
|
+
required :sources,
|
|
3002
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[enum: MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Source] }
|
|
3003
|
+
|
|
3004
|
+
# @!attribute spend_type
|
|
3005
|
+
#
|
|
3006
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::SpendType]
|
|
3007
|
+
required :spend_type,
|
|
3008
|
+
enum: -> { MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::SpendType }
|
|
3009
|
+
|
|
3010
|
+
# @!attribute discounted
|
|
3011
|
+
# Filter by whether the spend was discounted. Defaults to ANY if omitted.
|
|
3012
|
+
#
|
|
3013
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Discounted, nil]
|
|
3014
|
+
optional :discounted,
|
|
3015
|
+
enum: -> { MetronomeSDK::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Discounted }
|
|
3016
|
+
|
|
3017
|
+
# @!method initialize(sources:, spend_type:, discounted: nil)
|
|
3018
|
+
# @param sources [Array<Symbol, MetronomeSDK::Models::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Source>]
|
|
3019
|
+
#
|
|
3020
|
+
# @param spend_type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::SpendType]
|
|
3021
|
+
#
|
|
3022
|
+
# @param discounted [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier::Discounted] Filter by whether the spend was discounted. Defaults to ANY if omitted.
|
|
3023
|
+
|
|
3024
|
+
module Source
|
|
3025
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
3026
|
+
|
|
3027
|
+
THRESHOLD_RECHARGE = :THRESHOLD_RECHARGE
|
|
3028
|
+
MANUAL = :MANUAL
|
|
3029
|
+
|
|
3030
|
+
# @!method self.values
|
|
3031
|
+
# @return [Array<Symbol>]
|
|
3032
|
+
end
|
|
3033
|
+
|
|
3034
|
+
# @see MetronomeSDK::Models::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier#spend_type
|
|
3035
|
+
module SpendType
|
|
3036
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
3037
|
+
|
|
3038
|
+
COMMIT_PURCHASE = :COMMIT_PURCHASE
|
|
3039
|
+
|
|
3040
|
+
# @!method self.values
|
|
3041
|
+
# @return [Array<Symbol>]
|
|
3042
|
+
end
|
|
3043
|
+
|
|
3044
|
+
# Filter by whether the spend was discounted. Defaults to ANY if omitted.
|
|
3045
|
+
#
|
|
3046
|
+
# @see MetronomeSDK::Models::V1::ContractCreateParams::SpendTracker::ApplicableSpendSpecifier#discounted
|
|
3047
|
+
module Discounted
|
|
3048
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
3049
|
+
|
|
3050
|
+
ANY = :ANY
|
|
3051
|
+
DISCOUNTED_ONLY = :DISCOUNTED_ONLY
|
|
3052
|
+
UNDISCOUNTED_ONLY = :UNDISCOUNTED_ONLY
|
|
3053
|
+
|
|
3054
|
+
# @!method self.values
|
|
3055
|
+
# @return [Array<Symbol>]
|
|
3056
|
+
end
|
|
3057
|
+
end
|
|
3058
|
+
|
|
3059
|
+
# @see MetronomeSDK::Models::V1::ContractCreateParams::SpendTracker#reset_frequency
|
|
3060
|
+
module ResetFrequency
|
|
3061
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
3062
|
+
|
|
3063
|
+
BILLING_PERIOD = :BILLING_PERIOD
|
|
3064
|
+
|
|
3065
|
+
# @!method self.values
|
|
3066
|
+
# @return [Array<Symbol>]
|
|
3067
|
+
end
|
|
3068
|
+
end
|
|
3069
|
+
|
|
3103
3070
|
class Subscription < MetronomeSDK::Internal::Type::BaseModel
|
|
3104
3071
|
# @!attribute collection_schedule
|
|
3105
3072
|
#
|