metronome-sdk 1.0.0 → 2.0.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 +55 -0
- data/README.md +1 -1
- data/lib/metronome_sdk/errors.rb +25 -11
- data/lib/metronome_sdk/file_part.rb +10 -7
- data/lib/metronome_sdk/internal/body_cursor_page.rb +1 -1
- data/lib/metronome_sdk/internal/cursor_page.rb +1 -1
- data/lib/metronome_sdk/internal/cursor_page_without_limit.rb +1 -1
- data/lib/metronome_sdk/internal/transport/base_client.rb +11 -7
- data/lib/metronome_sdk/internal/transport/pooled_net_requester.rb +7 -10
- data/lib/metronome_sdk/internal/type/base_page.rb +1 -1
- data/lib/metronome_sdk/internal/type/enum.rb +25 -0
- data/lib/metronome_sdk/internal/type/file_input.rb +7 -4
- data/lib/metronome_sdk/internal/util.rb +8 -7
- data/lib/metronome_sdk/models/contract_v2.rb +256 -6
- data/lib/metronome_sdk/models/contract_without_amendments.rb +2 -2
- data/lib/metronome_sdk/models/hierarchy_configuration.rb +99 -2
- data/lib/metronome_sdk/models/payment_gate_config.rb +1 -0
- data/lib/metronome_sdk/models/payment_gate_config_v2.rb +1 -0
- data/lib/metronome_sdk/models/subscription.rb +85 -1
- data/lib/metronome_sdk/models/v1/alert_archive_params.rb +8 -4
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +38 -36
- data/lib/metronome_sdk/models/v1/contract_amend_params.rb +1 -0
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +101 -3
- data/lib/metronome_sdk/models/v1/customer_detail.rb +9 -1
- data/lib/metronome_sdk/models/v1/customer_preview_events_params.rb +5 -15
- data/lib/metronome_sdk/models/v1/customer_preview_events_response.rb +3 -3
- data/lib/metronome_sdk/models/v1/customers/alert_list_params.rb +3 -3
- data/lib/metronome_sdk/models/v1/customers/alert_reset_params.rb +2 -2
- data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +12 -12
- data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +40 -38
- data/lib/metronome_sdk/models/v1/customers/invoice.rb +136 -18
- data/lib/metronome_sdk/models/v1/customers/invoice_retrieve_pdf_params.rb +30 -0
- data/lib/metronome_sdk/models/v1/payment.rb +151 -0
- data/lib/metronome_sdk/models/v1/payment_attempt_params.rb +28 -0
- data/lib/metronome_sdk/models/v1/payment_attempt_response.rb +18 -0
- data/lib/metronome_sdk/models/v1/payment_cancel_params.rb +28 -0
- data/lib/metronome_sdk/models/v1/payment_cancel_response.rb +18 -0
- data/lib/metronome_sdk/models/v1/payment_list_params.rb +53 -0
- data/lib/metronome_sdk/models/v1/payment_status.rb +19 -0
- data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +9 -1
- data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +9 -1
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +186 -3
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +195 -8
- data/lib/metronome_sdk/resources/v1/alerts.rb +57 -53
- data/lib/metronome_sdk/resources/v1/contracts.rb +4 -3
- data/lib/metronome_sdk/resources/v1/customers/alerts.rb +70 -51
- data/lib/metronome_sdk/resources/v1/customers/invoices.rb +55 -0
- data/lib/metronome_sdk/resources/v1/customers.rb +7 -4
- data/lib/metronome_sdk/resources/v1/payments.rb +102 -0
- data/lib/metronome_sdk/resources/v1/usage.rb +4 -2
- data/lib/metronome_sdk/resources/v1.rb +4 -0
- data/lib/metronome_sdk/resources/v2/contracts.rb +9 -3
- data/lib/metronome_sdk/version.rb +1 -1
- data/lib/metronome_sdk.rb +9 -0
- data/rbi/metronome_sdk/errors.rbi +29 -2
- data/rbi/metronome_sdk/file_part.rbi +1 -1
- data/rbi/metronome_sdk/internal/transport/base_client.rbi +4 -5
- data/rbi/metronome_sdk/internal/type/base_page.rbi +1 -1
- data/rbi/metronome_sdk/internal/util.rbi +1 -1
- data/rbi/metronome_sdk/models/contract_v2.rbi +603 -10
- data/rbi/metronome_sdk/models/contract_without_amendments.rbi +2 -2
- data/rbi/metronome_sdk/models/hierarchy_configuration.rbi +250 -6
- data/rbi/metronome_sdk/models/payment_gate_config.rbi +5 -0
- data/rbi/metronome_sdk/models/payment_gate_config_v2.rbi +5 -0
- data/rbi/metronome_sdk/models/subscription.rbi +175 -0
- data/rbi/metronome_sdk/models/v1/alert_archive_params.rbi +6 -4
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +51 -47
- data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +257 -4
- data/rbi/metronome_sdk/models/v1/customer_detail.rbi +8 -0
- data/rbi/metronome_sdk/models/v1/customer_preview_events_params.rbi +6 -21
- data/rbi/metronome_sdk/models/v1/customer_preview_events_response.rbi +10 -9
- data/rbi/metronome_sdk/models/v1/customers/alert_list_params.rbi +4 -4
- data/rbi/metronome_sdk/models/v1/customers/alert_reset_params.rbi +2 -2
- data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +14 -14
- data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +48 -44
- data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +246 -58
- data/rbi/metronome_sdk/models/v1/customers/invoice_retrieve_pdf_params.rbi +50 -0
- data/rbi/metronome_sdk/models/v1/payment.rbi +316 -0
- data/rbi/metronome_sdk/models/v1/payment_attempt_params.rbi +48 -0
- data/rbi/metronome_sdk/models/v1/payment_attempt_response.rbi +35 -0
- data/rbi/metronome_sdk/models/v1/payment_cancel_params.rbi +48 -0
- data/rbi/metronome_sdk/models/v1/payment_cancel_response.rbi +35 -0
- data/rbi/metronome_sdk/models/v1/payment_list_params.rbi +91 -0
- data/rbi/metronome_sdk/models/v1/payment_status.rbi +33 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +18 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +18 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +498 -6
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +462 -14
- data/rbi/metronome_sdk/resources/v1/alerts.rbi +68 -64
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +4 -3
- data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +73 -54
- data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +36 -0
- data/rbi/metronome_sdk/resources/v1/customers.rbi +7 -4
- data/rbi/metronome_sdk/resources/v1/payments.rbi +72 -0
- data/rbi/metronome_sdk/resources/v1/usage.rbi +4 -2
- data/rbi/metronome_sdk/resources/v1.rbi +3 -0
- data/rbi/metronome_sdk/resources/v2/contracts.rbi +14 -0
- data/sig/metronome_sdk/errors.rbs +7 -0
- data/sig/metronome_sdk/file_part.rbs +1 -1
- data/sig/metronome_sdk/models/contract_v2.rbs +239 -12
- data/sig/metronome_sdk/models/hierarchy_configuration.rbs +87 -6
- data/sig/metronome_sdk/models/payment_gate_config.rbs +2 -1
- data/sig/metronome_sdk/models/payment_gate_config_v2.rbs +2 -1
- data/sig/metronome_sdk/models/subscription.rbs +80 -0
- data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +2 -1
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +91 -5
- data/sig/metronome_sdk/models/v1/customer_detail.rbs +5 -0
- data/sig/metronome_sdk/models/v1/customer_preview_events_params.rbs +0 -7
- data/sig/metronome_sdk/models/v1/customer_preview_events_response.rbs +6 -4
- data/sig/metronome_sdk/models/v1/customers/invoice.rbs +137 -24
- data/sig/metronome_sdk/models/v1/customers/invoice_retrieve_pdf_params.rbs +32 -0
- data/sig/metronome_sdk/models/v1/payment.rbs +191 -0
- data/sig/metronome_sdk/models/v1/payment_attempt_params.rbs +30 -0
- data/sig/metronome_sdk/models/v1/payment_attempt_response.rbs +15 -0
- data/sig/metronome_sdk/models/v1/payment_cancel_params.rbs +30 -0
- data/sig/metronome_sdk/models/v1/payment_cancel_response.rbs +15 -0
- data/sig/metronome_sdk/models/v1/payment_list_params.rbs +56 -0
- data/sig/metronome_sdk/models/v1/payment_status.rbs +19 -0
- data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +9 -0
- data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +9 -0
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +182 -7
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +221 -18
- data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +6 -0
- data/sig/metronome_sdk/resources/v1/payments.rbs +30 -0
- data/sig/metronome_sdk/resources/v1.rbs +2 -0
- data/sig/metronome_sdk/resources/v2/contracts.rbs +3 -0
- metadata +29 -2
|
@@ -323,8 +323,9 @@ module MetronomeSDK
|
|
|
323
323
|
# @!attribute invoice_schedule
|
|
324
324
|
# The schedule that the customer will be invoiced for this commit.
|
|
325
325
|
#
|
|
326
|
-
# @return [MetronomeSDK::Models::
|
|
327
|
-
optional :invoice_schedule,
|
|
326
|
+
# @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule, nil]
|
|
327
|
+
optional :invoice_schedule,
|
|
328
|
+
-> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule }
|
|
328
329
|
|
|
329
330
|
# @!attribute name
|
|
330
331
|
#
|
|
@@ -393,7 +394,7 @@ module MetronomeSDK
|
|
|
393
394
|
#
|
|
394
395
|
# @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for commit hierarchy access control
|
|
395
396
|
#
|
|
396
|
-
# @param invoice_schedule [MetronomeSDK::Models::
|
|
397
|
+
# @param invoice_schedule [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule] The schedule that the customer will be invoiced for this commit.
|
|
397
398
|
#
|
|
398
399
|
# @param name [String]
|
|
399
400
|
#
|
|
@@ -437,6 +438,75 @@ module MetronomeSDK
|
|
|
437
438
|
# @return [Array<Symbol>]
|
|
438
439
|
end
|
|
439
440
|
|
|
441
|
+
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit#invoice_schedule
|
|
442
|
+
class InvoiceSchedule < MetronomeSDK::Internal::Type::BaseModel
|
|
443
|
+
# @!attribute credit_type
|
|
444
|
+
#
|
|
445
|
+
# @return [MetronomeSDK::Models::CreditTypeData, nil]
|
|
446
|
+
optional :credit_type, -> { MetronomeSDK::CreditTypeData }
|
|
447
|
+
|
|
448
|
+
# @!attribute do_not_invoice
|
|
449
|
+
# If true, this schedule will not generate an invoice.
|
|
450
|
+
#
|
|
451
|
+
# @return [Boolean, nil]
|
|
452
|
+
optional :do_not_invoice, MetronomeSDK::Internal::Type::Boolean
|
|
453
|
+
|
|
454
|
+
# @!attribute schedule_items
|
|
455
|
+
#
|
|
456
|
+
# @return [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule::ScheduleItem>, nil]
|
|
457
|
+
optional :schedule_items,
|
|
458
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule::ScheduleItem] }
|
|
459
|
+
|
|
460
|
+
# @!method initialize(credit_type: nil, do_not_invoice: nil, schedule_items: nil)
|
|
461
|
+
# The schedule that the customer will be invoiced for this commit.
|
|
462
|
+
#
|
|
463
|
+
# @param credit_type [MetronomeSDK::Models::CreditTypeData]
|
|
464
|
+
#
|
|
465
|
+
# @param do_not_invoice [Boolean] If true, this schedule will not generate an invoice.
|
|
466
|
+
#
|
|
467
|
+
# @param schedule_items [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::InvoiceSchedule::ScheduleItem>]
|
|
468
|
+
|
|
469
|
+
class ScheduleItem < MetronomeSDK::Internal::Type::BaseModel
|
|
470
|
+
# @!attribute id
|
|
471
|
+
#
|
|
472
|
+
# @return [String]
|
|
473
|
+
required :id, String
|
|
474
|
+
|
|
475
|
+
# @!attribute timestamp
|
|
476
|
+
#
|
|
477
|
+
# @return [Time]
|
|
478
|
+
required :timestamp, Time
|
|
479
|
+
|
|
480
|
+
# @!attribute amount
|
|
481
|
+
#
|
|
482
|
+
# @return [Float, nil]
|
|
483
|
+
optional :amount, Float
|
|
484
|
+
|
|
485
|
+
# @!attribute invoice_id
|
|
486
|
+
#
|
|
487
|
+
# @return [String, nil]
|
|
488
|
+
optional :invoice_id, String, nil?: true
|
|
489
|
+
|
|
490
|
+
# @!attribute quantity
|
|
491
|
+
#
|
|
492
|
+
# @return [Float, nil]
|
|
493
|
+
optional :quantity, Float
|
|
494
|
+
|
|
495
|
+
# @!attribute unit_price
|
|
496
|
+
#
|
|
497
|
+
# @return [Float, nil]
|
|
498
|
+
optional :unit_price, Float
|
|
499
|
+
|
|
500
|
+
# @!method initialize(id:, timestamp:, amount: nil, invoice_id: nil, quantity: nil, unit_price: nil)
|
|
501
|
+
# @param id [String]
|
|
502
|
+
# @param timestamp [Time]
|
|
503
|
+
# @param amount [Float]
|
|
504
|
+
# @param invoice_id [String, nil]
|
|
505
|
+
# @param quantity [Float]
|
|
506
|
+
# @param unit_price [Float]
|
|
507
|
+
end
|
|
508
|
+
end
|
|
509
|
+
|
|
440
510
|
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddCommit#rate_type
|
|
441
511
|
module RateType
|
|
442
512
|
extend MetronomeSDK::Internal::Type::Enum
|
|
@@ -637,8 +707,9 @@ module MetronomeSDK
|
|
|
637
707
|
|
|
638
708
|
# @!attribute overwrite_rate
|
|
639
709
|
#
|
|
640
|
-
# @return [MetronomeSDK::Models::OverwriteRate, nil]
|
|
641
|
-
optional :overwrite_rate,
|
|
710
|
+
# @return [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverwriteRate, nil]
|
|
711
|
+
optional :overwrite_rate,
|
|
712
|
+
-> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverwriteRate }
|
|
642
713
|
|
|
643
714
|
# @!attribute priority
|
|
644
715
|
#
|
|
@@ -673,7 +744,7 @@ module MetronomeSDK
|
|
|
673
744
|
# @param multiplier [Float]
|
|
674
745
|
# @param override_specifiers [Array<MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverrideSpecifier>]
|
|
675
746
|
# @param override_tiers [Array<MetronomeSDK::Models::OverrideTier>]
|
|
676
|
-
# @param overwrite_rate [MetronomeSDK::Models::OverwriteRate]
|
|
747
|
+
# @param overwrite_rate [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverwriteRate]
|
|
677
748
|
# @param priority [Float]
|
|
678
749
|
# @param product [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::Product]
|
|
679
750
|
# @param target [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::Target]
|
|
@@ -745,6 +816,86 @@ module MetronomeSDK
|
|
|
745
816
|
end
|
|
746
817
|
end
|
|
747
818
|
|
|
819
|
+
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride#overwrite_rate
|
|
820
|
+
class OverwriteRate < MetronomeSDK::Internal::Type::BaseModel
|
|
821
|
+
# @!attribute rate_type
|
|
822
|
+
#
|
|
823
|
+
# @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverwriteRate::RateType]
|
|
824
|
+
required :rate_type,
|
|
825
|
+
enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverwriteRate::RateType }
|
|
826
|
+
|
|
827
|
+
# @!attribute credit_type
|
|
828
|
+
#
|
|
829
|
+
# @return [MetronomeSDK::Models::CreditTypeData, nil]
|
|
830
|
+
optional :credit_type, -> { MetronomeSDK::CreditTypeData }
|
|
831
|
+
|
|
832
|
+
# @!attribute custom_rate
|
|
833
|
+
# Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
834
|
+
# processors.
|
|
835
|
+
#
|
|
836
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
837
|
+
optional :custom_rate, MetronomeSDK::Internal::Type::HashOf[MetronomeSDK::Internal::Type::Unknown]
|
|
838
|
+
|
|
839
|
+
# @!attribute is_prorated
|
|
840
|
+
# Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
841
|
+
# set to true.
|
|
842
|
+
#
|
|
843
|
+
# @return [Boolean, nil]
|
|
844
|
+
optional :is_prorated, MetronomeSDK::Internal::Type::Boolean
|
|
845
|
+
|
|
846
|
+
# @!attribute price
|
|
847
|
+
# Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
|
|
848
|
+
# this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
|
|
849
|
+
#
|
|
850
|
+
# @return [Float, nil]
|
|
851
|
+
optional :price, Float
|
|
852
|
+
|
|
853
|
+
# @!attribute quantity
|
|
854
|
+
# Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
|
|
855
|
+
#
|
|
856
|
+
# @return [Float, nil]
|
|
857
|
+
optional :quantity, Float
|
|
858
|
+
|
|
859
|
+
# @!attribute tiers
|
|
860
|
+
# Only set for TIERED rate_type.
|
|
861
|
+
#
|
|
862
|
+
# @return [Array<MetronomeSDK::Models::Tier>, nil]
|
|
863
|
+
optional :tiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Tier] }
|
|
864
|
+
|
|
865
|
+
# @!method initialize(rate_type:, credit_type: nil, custom_rate: nil, is_prorated: nil, price: nil, quantity: nil, tiers: nil)
|
|
866
|
+
# Some parameter documentations has been truncated, see
|
|
867
|
+
# {MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverwriteRate}
|
|
868
|
+
# for more details.
|
|
869
|
+
#
|
|
870
|
+
# @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverwriteRate::RateType]
|
|
871
|
+
#
|
|
872
|
+
# @param credit_type [MetronomeSDK::Models::CreditTypeData]
|
|
873
|
+
#
|
|
874
|
+
# @param custom_rate [Hash{Symbol=>Object}] Only set for CUSTOM rate_type. This field is interpreted by custom rate processo
|
|
875
|
+
#
|
|
876
|
+
# @param is_prorated [Boolean] Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
877
|
+
#
|
|
878
|
+
# @param price [Float] Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type, t
|
|
879
|
+
#
|
|
880
|
+
# @param quantity [Float] Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
|
|
881
|
+
#
|
|
882
|
+
# @param tiers [Array<MetronomeSDK::Models::Tier>] Only set for TIERED rate_type.
|
|
883
|
+
|
|
884
|
+
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverwriteRate#rate_type
|
|
885
|
+
module RateType
|
|
886
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
887
|
+
|
|
888
|
+
FLAT = :FLAT
|
|
889
|
+
PERCENTAGE = :PERCENTAGE
|
|
890
|
+
SUBSCRIPTION = :SUBSCRIPTION
|
|
891
|
+
TIERED = :TIERED
|
|
892
|
+
CUSTOM = :CUSTOM
|
|
893
|
+
|
|
894
|
+
# @!method self.values
|
|
895
|
+
# @return [Array<Symbol>]
|
|
896
|
+
end
|
|
897
|
+
end
|
|
898
|
+
|
|
748
899
|
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::AddOverride#product
|
|
749
900
|
class Product < MetronomeSDK::Internal::Type::BaseModel
|
|
750
901
|
# @!attribute id
|
|
@@ -2570,11 +2721,18 @@ module MetronomeSDK
|
|
|
2570
2721
|
optional :invoice_amount,
|
|
2571
2722
|
-> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::InvoiceAmount }
|
|
2572
2723
|
|
|
2573
|
-
# @!
|
|
2724
|
+
# @!attribute rate_type
|
|
2725
|
+
#
|
|
2726
|
+
# @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::RateType, nil]
|
|
2727
|
+
optional :rate_type,
|
|
2728
|
+
enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::RateType }
|
|
2729
|
+
|
|
2730
|
+
# @!method initialize(id:, access_amount: nil, ending_before: nil, invoice_amount: nil, rate_type: nil)
|
|
2574
2731
|
# @param id [String]
|
|
2575
2732
|
# @param access_amount [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::AccessAmount]
|
|
2576
2733
|
# @param ending_before [Time]
|
|
2577
2734
|
# @param invoice_amount [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::InvoiceAmount]
|
|
2735
|
+
# @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::RateType]
|
|
2578
2736
|
|
|
2579
2737
|
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit#access_amount
|
|
2580
2738
|
class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -2609,6 +2767,17 @@ module MetronomeSDK
|
|
|
2609
2767
|
# @param quantity [Float]
|
|
2610
2768
|
# @param unit_price [Float]
|
|
2611
2769
|
end
|
|
2770
|
+
|
|
2771
|
+
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit#rate_type
|
|
2772
|
+
module RateType
|
|
2773
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2774
|
+
|
|
2775
|
+
LIST_RATE = :LIST_RATE
|
|
2776
|
+
COMMIT_RATE = :COMMIT_RATE
|
|
2777
|
+
|
|
2778
|
+
# @!method self.values
|
|
2779
|
+
# @return [Array<Symbol>]
|
|
2780
|
+
end
|
|
2612
2781
|
end
|
|
2613
2782
|
|
|
2614
2783
|
class UpdateRecurringCredit < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -2628,10 +2797,17 @@ module MetronomeSDK
|
|
|
2628
2797
|
# @return [Time, nil]
|
|
2629
2798
|
optional :ending_before, Time
|
|
2630
2799
|
|
|
2631
|
-
# @!
|
|
2800
|
+
# @!attribute rate_type
|
|
2801
|
+
#
|
|
2802
|
+
# @return [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit::RateType, nil]
|
|
2803
|
+
optional :rate_type,
|
|
2804
|
+
enum: -> { MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit::RateType }
|
|
2805
|
+
|
|
2806
|
+
# @!method initialize(id:, access_amount: nil, ending_before: nil, rate_type: nil)
|
|
2632
2807
|
# @param id [String]
|
|
2633
2808
|
# @param access_amount [MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit::AccessAmount]
|
|
2634
2809
|
# @param ending_before [Time]
|
|
2810
|
+
# @param rate_type [Symbol, MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit::RateType]
|
|
2635
2811
|
|
|
2636
2812
|
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit#access_amount
|
|
2637
2813
|
class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -2649,6 +2825,17 @@ module MetronomeSDK
|
|
|
2649
2825
|
# @param quantity [Float]
|
|
2650
2826
|
# @param unit_price [Float]
|
|
2651
2827
|
end
|
|
2828
|
+
|
|
2829
|
+
# @see MetronomeSDK::Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit#rate_type
|
|
2830
|
+
module RateType
|
|
2831
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
2832
|
+
|
|
2833
|
+
LIST_RATE = :LIST_RATE
|
|
2834
|
+
COMMIT_RATE = :COMMIT_RATE
|
|
2835
|
+
|
|
2836
|
+
# @!method self.values
|
|
2837
|
+
# @return [Array<Symbol>]
|
|
2838
|
+
end
|
|
2652
2839
|
end
|
|
2653
2840
|
|
|
2654
2841
|
class UpdateRefundInvoice < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -7,16 +7,15 @@ module MetronomeSDK
|
|
|
7
7
|
# Some parameter documentations has been truncated, see
|
|
8
8
|
# {MetronomeSDK::Models::V1::AlertCreateParams} for more details.
|
|
9
9
|
#
|
|
10
|
-
# Create a new
|
|
11
|
-
# in real-time. Metronome's
|
|
12
|
-
# immediate evaluation capabilities, enabling you to
|
|
13
|
-
# accounts and prevent revenue leakage.
|
|
10
|
+
# Create a new threshold notification to monitor customer spending, balances, and
|
|
11
|
+
# billing metrics in real-time. Metronome's notification system provides
|
|
12
|
+
# industry-leading speed with immediate evaluation capabilities, enabling you to
|
|
13
|
+
# proactively manage customer accounts and prevent revenue leakage.
|
|
14
14
|
#
|
|
15
|
-
# This endpoint creates configurable
|
|
16
|
-
# billing thresholds including spend limits, credit balances,
|
|
17
|
-
# utilization, and invoice totals.
|
|
18
|
-
# customers or targeted to specific customer accounts.
|
|
19
|
-
# on certain alert types to further target alerts to groups of customers.
|
|
15
|
+
# This endpoint creates configurable threshold notifications that continuously
|
|
16
|
+
# monitor various billing thresholds including spend limits, credit balances,
|
|
17
|
+
# commitment utilization, and invoice totals. Threshold notifications can be
|
|
18
|
+
# configured globally for all customers or targeted to specific customer accounts.
|
|
20
19
|
#
|
|
21
20
|
# ### Use this endpoint to:
|
|
22
21
|
#
|
|
@@ -32,52 +31,53 @@ module MetronomeSDK
|
|
|
32
31
|
#
|
|
33
32
|
# A successful response returns a CustomerAlert object containing:
|
|
34
33
|
#
|
|
35
|
-
# - The
|
|
34
|
+
# - The threshold notification configuration with its unique ID and current status
|
|
36
35
|
# - The customer's evaluation status (ok, in_alarm, or evaluating)
|
|
37
|
-
# -
|
|
36
|
+
# - Threshold notification metadata including type, threshold values, and update
|
|
37
|
+
# timestamps
|
|
38
38
|
#
|
|
39
39
|
# ### Usage guidelines:
|
|
40
40
|
#
|
|
41
41
|
# - Immediate evaluation: Set `evaluate_on_create` : `true` (default) for instant
|
|
42
42
|
# evaluation against existing customers
|
|
43
|
-
# - Uniqueness constraints: Each
|
|
44
|
-
# your organization. Use `release_uniqueness_key` :
|
|
45
|
-
# reuse keys
|
|
46
|
-
# -
|
|
47
|
-
# `billable_metric_id` for usage
|
|
48
|
-
#
|
|
49
|
-
# - Webhook delivery:
|
|
50
|
-
# integration with your systems. Configure webhook endpoints before
|
|
51
|
-
#
|
|
52
|
-
# - Performance at scale: Metronome's event-driven architecture processes
|
|
53
|
-
# evaluations in real-time as usage events stream in,
|
|
54
|
-
# rely on periodic polling or batch evaluation cycles
|
|
43
|
+
# - Uniqueness constraints: Each threshold notification must have a unique
|
|
44
|
+
# `uniqueness_key` within your organization. Use `release_uniqueness_key` :
|
|
45
|
+
# `true` when archiving to reuse keys
|
|
46
|
+
# - Notification type requirements: Different threshold notification types require
|
|
47
|
+
# specific fields (e.g., `billable_metric_id` for usage notifications,
|
|
48
|
+
# `credit_type_id` for credit-based threshold notifications)
|
|
49
|
+
# - Webhook delivery: Threshold notifications trigger webhook notifications for
|
|
50
|
+
# real-time integration with your systems. Configure webhook endpoints before
|
|
51
|
+
# creating threshold notifications
|
|
52
|
+
# - Performance at scale: Metronome's event-driven architecture processes
|
|
53
|
+
# threshold notification evaluations in real-time as usage events stream in,
|
|
54
|
+
# unlike competitors who rely on periodic polling or batch evaluation cycles
|
|
55
55
|
#
|
|
56
56
|
# @overload create(alert_type:, name:, threshold:, billable_metric_id: nil, credit_grant_type_filters: nil, credit_type_id: nil, custom_field_filters: nil, customer_id: nil, evaluate_on_create: nil, group_values: nil, invoice_types_filter: nil, plan_id: nil, uniqueness_key: nil, request_options: {})
|
|
57
57
|
#
|
|
58
|
-
# @param alert_type [Symbol, MetronomeSDK::Models::V1::AlertCreateParams::AlertType] Type of the
|
|
58
|
+
# @param alert_type [Symbol, MetronomeSDK::Models::V1::AlertCreateParams::AlertType] Type of the threshold notification
|
|
59
59
|
#
|
|
60
|
-
# @param name [String] Name of the
|
|
60
|
+
# @param name [String] Name of the threshold notification
|
|
61
61
|
#
|
|
62
|
-
# @param threshold [Float] Threshold value of the
|
|
62
|
+
# @param threshold [Float] Threshold value of the notification policy. Depending upon the notification typ
|
|
63
63
|
#
|
|
64
|
-
# @param billable_metric_id [String] For
|
|
64
|
+
# @param billable_metric_id [String] For threshold notifications of type `usage_threshold_reached`, specifies which b
|
|
65
65
|
#
|
|
66
|
-
# @param credit_grant_type_filters [Array<String>] An array of strings, representing a way to filter the credit grant this
|
|
66
|
+
# @param credit_grant_type_filters [Array<String>] An array of strings, representing a way to filter the credit grant this threshol
|
|
67
67
|
#
|
|
68
|
-
# @param credit_type_id [String] ID of the credit's currency, defaults to USD. If the specific
|
|
68
|
+
# @param credit_type_id [String] ID of the credit's currency, defaults to USD. If the specific notification type
|
|
69
69
|
#
|
|
70
|
-
# @param custom_field_filters [Array<MetronomeSDK::Models::V1::AlertCreateParams::CustomFieldFilter>] A list of custom field filters for
|
|
70
|
+
# @param custom_field_filters [Array<MetronomeSDK::Models::V1::AlertCreateParams::CustomFieldFilter>] A list of custom field filters for threshold notification types that support adv
|
|
71
71
|
#
|
|
72
|
-
# @param customer_id [String] If provided, will create this
|
|
72
|
+
# @param customer_id [String] If provided, will create this threshold notification for this specific customer.
|
|
73
73
|
#
|
|
74
|
-
# @param evaluate_on_create [Boolean] If true, the
|
|
74
|
+
# @param evaluate_on_create [Boolean] If true, the threshold notification will evaluate immediately on customers that
|
|
75
75
|
#
|
|
76
|
-
# @param group_values [Array<MetronomeSDK::Models::V1::AlertCreateParams::GroupValue>] Only present for `spend_threshold_reached`
|
|
76
|
+
# @param group_values [Array<MetronomeSDK::Models::V1::AlertCreateParams::GroupValue>] Only present for `spend_threshold_reached` notifications. Scope notification to
|
|
77
77
|
#
|
|
78
|
-
# @param invoice_types_filter [Array<String>] Only supported for invoice_total_reached
|
|
78
|
+
# @param invoice_types_filter [Array<String>] Only supported for invoice_total_reached threshold notifications. A list of invo
|
|
79
79
|
#
|
|
80
|
-
# @param plan_id [String] If provided, will create this
|
|
80
|
+
# @param plan_id [String] If provided, will create this threshold notification for this specific plan. To
|
|
81
81
|
#
|
|
82
82
|
# @param uniqueness_key [String] Prevents the creation of duplicates. If a request to create a record is made wit
|
|
83
83
|
#
|
|
@@ -97,39 +97,43 @@ module MetronomeSDK
|
|
|
97
97
|
)
|
|
98
98
|
end
|
|
99
99
|
|
|
100
|
-
#
|
|
101
|
-
#
|
|
102
|
-
#
|
|
100
|
+
# Some parameter documentations has been truncated, see
|
|
101
|
+
# {MetronomeSDK::Models::V1::AlertArchiveParams} for more details.
|
|
102
|
+
#
|
|
103
|
+
# Permanently disable a threshold notification and remove it from active
|
|
104
|
+
# monitoring across all customers. Archived threshold notifications stop
|
|
105
|
+
# evaluating immediately and can optionally release their uniqueness key for reuse
|
|
106
|
+
# in future threshold notification configurations.
|
|
103
107
|
#
|
|
104
108
|
# ### Use this endpoint to:
|
|
105
109
|
#
|
|
106
|
-
# - Decommission
|
|
107
|
-
# - Clean up test or deprecated
|
|
108
|
-
# - Free up uniqueness keys for reuse with new
|
|
109
|
-
# - Stop
|
|
110
|
+
# - Decommission threshold notifications that are no longer needed
|
|
111
|
+
# - Clean up test or deprecated threshold notification configurations
|
|
112
|
+
# - Free up uniqueness keys for reuse with new threshold notifications
|
|
113
|
+
# - Stop threshold notification evaluations without losing historical
|
|
114
|
+
# configuration data
|
|
110
115
|
# - Disable outdated monitoring rules during pricing model transitions
|
|
111
116
|
#
|
|
112
117
|
# ### Key response fields:
|
|
113
118
|
#
|
|
114
|
-
# - data: Object containing the archived
|
|
115
|
-
# - Alert evaluation stops immediately for all affected customers
|
|
116
|
-
# - Historical alert data and configurations remain accessible for audit purposes
|
|
119
|
+
# - data: Object containing the archived threshold notification's ID
|
|
117
120
|
#
|
|
118
121
|
# ### Usage guidelines:
|
|
119
122
|
#
|
|
120
|
-
# - Irreversible for evaluation: Archived
|
|
121
|
-
# new
|
|
123
|
+
# - Irreversible for evaluation: Archived threshold notifications cannot be
|
|
124
|
+
# re-enabled; create a new threshold notification to resume monitoring
|
|
122
125
|
# - Uniqueness key handling: Set `release_uniqueness_key` : `true` to reuse the
|
|
123
|
-
# key in future
|
|
124
|
-
# - Immediate effect:
|
|
125
|
-
#
|
|
126
|
-
#
|
|
126
|
+
# key in future threshold notifications
|
|
127
|
+
# - Immediate effect: Threshold notification evaluation stops instantly across all
|
|
128
|
+
# customers
|
|
129
|
+
# - Historical preservation: Archive operation maintains threshold notification
|
|
130
|
+
# history and configuration for compliance and auditing
|
|
127
131
|
#
|
|
128
132
|
# @overload archive(id:, release_uniqueness_key: nil, request_options: {})
|
|
129
133
|
#
|
|
130
|
-
# @param id [String] The Metronome ID of the
|
|
134
|
+
# @param id [String] The Metronome ID of the threshold notification
|
|
131
135
|
#
|
|
132
|
-
# @param release_uniqueness_key [Boolean] If true, resets the uniqueness key on this
|
|
136
|
+
# @param release_uniqueness_key [Boolean] If true, resets the uniqueness key on this threshold notification so it can be r
|
|
133
137
|
#
|
|
134
138
|
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
135
139
|
#
|
|
@@ -709,11 +709,12 @@ module MetronomeSDK
|
|
|
709
709
|
# Some parameter documentations has been truncated, see
|
|
710
710
|
# {MetronomeSDK::Models::V1::ContractUpdateEndDateParams} for more details.
|
|
711
711
|
#
|
|
712
|
-
# Update or
|
|
712
|
+
# Update or add an end date to a contract. Ending a contract early will impact
|
|
713
713
|
# draft usage statements, truncate any terms, and remove upcoming scheduled
|
|
714
714
|
# invoices. Moving the date into the future will only extend the contract length.
|
|
715
|
-
# Terms and scheduled invoices are not extended.
|
|
716
|
-
# has changed or if a perpetual
|
|
715
|
+
# Terms and scheduled invoices are not extended. In-advance subscriptions will not
|
|
716
|
+
# be extended. Use this if a contract's end date has changed or if a perpetual
|
|
717
|
+
# contract ends.
|
|
717
718
|
#
|
|
718
719
|
# @overload update_end_date(contract_id:, customer_id:, allow_ending_before_finalized_invoice: nil, ending_before: nil, request_options: {})
|
|
719
720
|
#
|