metronome-sdk 3.5.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 +37 -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/models/contract_v2.rb +362 -4
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +1 -0
- data/lib/metronome_sdk/models/v1/contract_amend_params.rb +1 -177
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +2 -179
- 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 +1 -18
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +362 -3
- data/lib/metronome_sdk/resources/v1/contracts/products.rb +6 -2
- data/lib/metronome_sdk/resources/v1/contracts.rb +69 -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 +2 -0
- data/rbi/metronome_sdk/models/contract_v2.rbi +763 -4
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +0 -396
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +2 -398
- 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 +0 -56
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +792 -4
- data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +18 -0
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +81 -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/models/contract_v2.rbs +324 -6
- data/sig/metronome_sdk/models/v1/alert_create_params.rbs +3 -1
- data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +0 -137
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +0 -137
- 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 +0 -20
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +319 -6
- 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
|
@@ -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.
|
|
@@ -246,7 +240,7 @@ module MetronomeSDK
|
|
|
246
240
|
# @return [String, nil]
|
|
247
241
|
optional :temporary_id, String
|
|
248
242
|
|
|
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,
|
|
243
|
+
# @!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, temporary_id: nil)
|
|
250
244
|
# Some parameter documentations has been truncated, see
|
|
251
245
|
# {MetronomeSDK::Models::V1::ContractAmendParams::Commit} for more details.
|
|
252
246
|
#
|
|
@@ -274,8 +268,6 @@ module MetronomeSDK
|
|
|
274
268
|
#
|
|
275
269
|
# @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
|
|
276
270
|
#
|
|
277
|
-
# @param payment_gate_config [MetronomeSDK::Models::V1::ContractAmendParams::Commit::PaymentGateConfig] optionally payment gate this commit
|
|
278
|
-
#
|
|
279
271
|
# @param priority [Float] If multiple commits are applicable, the one with the lower priority will apply f
|
|
280
272
|
#
|
|
281
273
|
# @param rate_type [Symbol, MetronomeSDK::Models::V1::ContractAmendParams::Commit::RateType]
|
|
@@ -541,174 +533,6 @@ module MetronomeSDK
|
|
|
541
533
|
end
|
|
542
534
|
end
|
|
543
535
|
|
|
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
536
|
# @see MetronomeSDK::Models::V1::ContractAmendParams::Commit#rate_type
|
|
713
537
|
module RateType
|
|
714
538
|
extend MetronomeSDK::Internal::Type::Enum
|
|
@@ -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
|
|
@@ -451,12 +451,6 @@ module MetronomeSDK
|
|
|
451
451
|
# @return [String, nil]
|
|
452
452
|
optional :netsuite_sales_order_id, String
|
|
453
453
|
|
|
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
454
|
# @!attribute priority
|
|
461
455
|
# If multiple commits are applicable, the one with the lower priority will apply
|
|
462
456
|
# first.
|
|
@@ -491,7 +485,7 @@ module MetronomeSDK
|
|
|
491
485
|
# @return [String, nil]
|
|
492
486
|
optional :temporary_id, String
|
|
493
487
|
|
|
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,
|
|
488
|
+
# @!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, temporary_id: nil)
|
|
495
489
|
# Some parameter documentations has been truncated, see
|
|
496
490
|
# {MetronomeSDK::Models::V1::ContractCreateParams::Commit} for more details.
|
|
497
491
|
#
|
|
@@ -519,8 +513,6 @@ module MetronomeSDK
|
|
|
519
513
|
#
|
|
520
514
|
# @param netsuite_sales_order_id [String] This field's availability is dependent on your client's configuration.
|
|
521
515
|
#
|
|
522
|
-
# @param payment_gate_config [MetronomeSDK::Models::V1::ContractCreateParams::Commit::PaymentGateConfig] optionally payment gate this commit
|
|
523
|
-
#
|
|
524
516
|
# @param priority [Float] If multiple commits are applicable, the one with the lower priority will apply f
|
|
525
517
|
#
|
|
526
518
|
# @param rate_type [Symbol, MetronomeSDK::Models::V1::ContractCreateParams::Commit::RateType]
|
|
@@ -786,175 +778,6 @@ module MetronomeSDK
|
|
|
786
778
|
end
|
|
787
779
|
end
|
|
788
780
|
|
|
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
781
|
# @see MetronomeSDK::Models::V1::ContractCreateParams::Commit#rate_type
|
|
959
782
|
module RateType
|
|
960
783
|
extend MetronomeSDK::Internal::Type::Enum
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module MetronomeSDK
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see MetronomeSDK::Resources::V1::Contracts#list_seat_balances
|
|
7
|
+
class ContractListSeatBalancesParams < MetronomeSDK::Internal::Type::BaseModel
|
|
8
|
+
extend MetronomeSDK::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include MetronomeSDK::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute contract_id
|
|
12
|
+
# The contract ID to retrieve seat balances for
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :contract_id, String
|
|
16
|
+
|
|
17
|
+
# @!attribute customer_id
|
|
18
|
+
# The customer ID to retrieve seat balances for
|
|
19
|
+
#
|
|
20
|
+
# @return [String]
|
|
21
|
+
required :customer_id, String
|
|
22
|
+
|
|
23
|
+
# @!attribute covering_date
|
|
24
|
+
# Include only commits or credits with access that cover this specific date
|
|
25
|
+
# (cannot be used with starting_at or ending_before).
|
|
26
|
+
#
|
|
27
|
+
# @return [Time, nil]
|
|
28
|
+
optional :covering_date, Time
|
|
29
|
+
|
|
30
|
+
# @!attribute cursor
|
|
31
|
+
# Page token from a previous response to retrieve the next page
|
|
32
|
+
#
|
|
33
|
+
# @return [String, nil]
|
|
34
|
+
optional :cursor, String
|
|
35
|
+
|
|
36
|
+
# @!attribute effective_before
|
|
37
|
+
# Include only commits or credits with access effective on or before this date
|
|
38
|
+
# (cannot be used with covering_date).
|
|
39
|
+
#
|
|
40
|
+
# @return [Time, nil]
|
|
41
|
+
optional :effective_before, Time
|
|
42
|
+
|
|
43
|
+
# @!attribute include_credits_and_commits
|
|
44
|
+
# Include credits and commits in the response
|
|
45
|
+
#
|
|
46
|
+
# @return [Boolean, nil]
|
|
47
|
+
optional :include_credits_and_commits, MetronomeSDK::Internal::Type::Boolean
|
|
48
|
+
|
|
49
|
+
# @!attribute include_ledgers
|
|
50
|
+
# Include ledger entries for each commit and commit. `include_credits_and_commits`
|
|
51
|
+
# must be set to `true` for `include_ledgers=true` to apply.
|
|
52
|
+
#
|
|
53
|
+
# @return [Boolean, nil]
|
|
54
|
+
optional :include_ledgers, MetronomeSDK::Internal::Type::Boolean
|
|
55
|
+
|
|
56
|
+
# @!attribute limit
|
|
57
|
+
# Maximum number of seats to return. Range: 1-100. Default: 25. When
|
|
58
|
+
# `include_credits_and_commits = true`, if the total commits/credits across all
|
|
59
|
+
# seats exceeds 100, a limit of 100 applies to the total credits and commits.
|
|
60
|
+
# Seats are included greedily to maximize the number of seats returned. Example:
|
|
61
|
+
# if seat 1 has 98 commits and seat 2 has 10 commits, both seats will be returned
|
|
62
|
+
# (total: 108 commits). Each returned seat includes all of its associated credits
|
|
63
|
+
# and commits.
|
|
64
|
+
#
|
|
65
|
+
# @return [Integer, nil]
|
|
66
|
+
optional :limit, Integer
|
|
67
|
+
|
|
68
|
+
# @!attribute seat_ids
|
|
69
|
+
# Optional filter to only include specific seats.
|
|
70
|
+
#
|
|
71
|
+
# @return [Array<String>, nil]
|
|
72
|
+
optional :seat_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
73
|
+
|
|
74
|
+
# @!attribute starting_at
|
|
75
|
+
# Include only commits or credits with access effective on or after this date
|
|
76
|
+
# (cannot be used with covering_date).
|
|
77
|
+
#
|
|
78
|
+
# @return [Time, nil]
|
|
79
|
+
optional :starting_at, Time
|
|
80
|
+
|
|
81
|
+
# @!attribute subscription_ids
|
|
82
|
+
# Optional filter to only include seats from specific subscriptions. If
|
|
83
|
+
# subscriptions ids are not mapped to SEAT_BASED subscriptions, error will be
|
|
84
|
+
# returned.
|
|
85
|
+
#
|
|
86
|
+
# @return [Array<String>, nil]
|
|
87
|
+
optional :subscription_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
88
|
+
|
|
89
|
+
# @!method initialize(contract_id:, customer_id:, covering_date: nil, cursor: nil, effective_before: nil, include_credits_and_commits: nil, include_ledgers: nil, limit: nil, seat_ids: nil, starting_at: nil, subscription_ids: nil, request_options: {})
|
|
90
|
+
# Some parameter documentations has been truncated, see
|
|
91
|
+
# {MetronomeSDK::Models::V1::ContractListSeatBalancesParams} for more details.
|
|
92
|
+
#
|
|
93
|
+
# @param contract_id [String] The contract ID to retrieve seat balances for
|
|
94
|
+
#
|
|
95
|
+
# @param customer_id [String] The customer ID to retrieve seat balances for
|
|
96
|
+
#
|
|
97
|
+
# @param covering_date [Time] Include only commits or credits with access that cover this specific date (canno
|
|
98
|
+
#
|
|
99
|
+
# @param cursor [String] Page token from a previous response to retrieve the next page
|
|
100
|
+
#
|
|
101
|
+
# @param effective_before [Time] Include only commits or credits with access effective on or before this date (ca
|
|
102
|
+
#
|
|
103
|
+
# @param include_credits_and_commits [Boolean] Include credits and commits in the response
|
|
104
|
+
#
|
|
105
|
+
# @param include_ledgers [Boolean] Include ledger entries for each commit and commit. `include_credits_and_commits`
|
|
106
|
+
#
|
|
107
|
+
# @param limit [Integer] Maximum number of seats to return. Range: 1-100. Default: 25.
|
|
108
|
+
#
|
|
109
|
+
# @param seat_ids [Array<String>] Optional filter to only include specific seats.
|
|
110
|
+
#
|
|
111
|
+
# @param starting_at [Time] Include only commits or credits with access effective on or after this date (can
|
|
112
|
+
#
|
|
113
|
+
# @param subscription_ids [Array<String>] Optional filter to only include seats from specific subscriptions. If subscripti
|
|
114
|
+
#
|
|
115
|
+
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|