metronome-sdk 3.8.0 → 3.10.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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +34 -0
  3. data/README.md +1 -1
  4. data/lib/metronome_sdk/models/commit.rb +9 -1
  5. data/lib/metronome_sdk/models/contract.rb +46 -16
  6. data/lib/metronome_sdk/models/contract_v2.rb +378 -15
  7. data/lib/metronome_sdk/models/contract_without_amendments.rb +8 -5
  8. data/lib/metronome_sdk/models/v1/contract_create_params.rb +8 -5
  9. data/lib/metronome_sdk/models/v1/contract_create_response.rb +73 -18
  10. data/lib/metronome_sdk/models/v1/contracts/rate_card_update_params.rb +27 -1
  11. data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +32 -5
  12. data/lib/metronome_sdk/models/v1/package_create_params.rb +8 -4
  13. data/lib/metronome_sdk/models/v1/package_list_response.rb +8 -4
  14. data/lib/metronome_sdk/models/v1/package_retrieve_response.rb +8 -4
  15. data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +11 -1
  16. data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +11 -1
  17. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +14 -8
  18. data/lib/metronome_sdk/models/v2/contract_edit_response.rb +8 -4
  19. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +8 -4
  20. data/lib/metronome_sdk/resources/v1/contracts/rate_cards.rb +11 -14
  21. data/lib/metronome_sdk/resources/v1/dashboards.rb +6 -9
  22. data/lib/metronome_sdk/resources/v2/contracts.rb +6 -2
  23. data/lib/metronome_sdk/version.rb +1 -1
  24. data/rbi/metronome_sdk/models/commit.rbi +11 -0
  25. data/rbi/metronome_sdk/models/contract.rbi +47 -22
  26. data/rbi/metronome_sdk/models/contract_v2.rbi +711 -19
  27. data/rbi/metronome_sdk/models/contract_without_amendments.rbi +12 -11
  28. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +12 -11
  29. data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +72 -43
  30. data/rbi/metronome_sdk/models/v1/contracts/rate_card_update_params.rbi +67 -0
  31. data/rbi/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbi +96 -5
  32. data/rbi/metronome_sdk/models/v1/package_create_params.rbi +12 -6
  33. data/rbi/metronome_sdk/models/v1/package_list_response.rbi +12 -6
  34. data/rbi/metronome_sdk/models/v1/package_retrieve_response.rbi +12 -6
  35. data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +12 -0
  36. data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +12 -0
  37. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +28 -18
  38. data/rbi/metronome_sdk/models/v2/contract_edit_response.rbi +12 -6
  39. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +12 -6
  40. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards.rbi +15 -13
  41. data/rbi/metronome_sdk/resources/v1/dashboards.rbi +6 -9
  42. data/rbi/metronome_sdk/resources/v2/contracts.rbi +10 -0
  43. data/sig/metronome_sdk/models/commit.rbs +7 -0
  44. data/sig/metronome_sdk/models/contract.rbs +22 -11
  45. data/sig/metronome_sdk/models/contract_v2.rbs +289 -5
  46. data/sig/metronome_sdk/models/contract_without_amendments.rbs +1 -2
  47. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +1 -2
  48. data/sig/metronome_sdk/models/v1/contract_create_response.rbs +31 -17
  49. data/sig/metronome_sdk/models/v1/contracts/rate_card_update_params.rbs +28 -0
  50. data/sig/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbs +39 -4
  51. data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +5 -0
  52. data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +5 -0
  53. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +12 -14
  54. data/sig/metronome_sdk/resources/v1/contracts/rate_cards.rbs +1 -0
  55. data/sig/metronome_sdk/resources/v2/contracts.rbs +2 -0
  56. metadata +2 -2
@@ -479,11 +479,6 @@ module MetronomeSDK
479
479
  end
480
480
  OrSymbol = T.type_alias { T.any(Symbol, String) }
481
481
 
482
- SUPERSEDE =
483
- T.let(
484
- :SUPERSEDE,
485
- MetronomeSDK::ContractWithoutAmendments::Transition::Type::TaggedSymbol
486
- )
487
482
  RENEWAL =
488
483
  T.let(
489
484
  :RENEWAL,
@@ -800,7 +795,8 @@ module MetronomeSDK
800
795
  # The commits will be created on the usage invoice frequency. If provided: - The
801
796
  # period defined in the duration will correspond to this frequency. - Commits will
802
797
  # be created aligned with the recurring commit's starting_at rather than the usage
803
- # invoice dates.
798
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
799
+ # are unable to be created with seat-based subscriptions
804
800
  sig do
805
801
  returns(
806
802
  T.nilable(
@@ -932,7 +928,8 @@ module MetronomeSDK
932
928
  # The commits will be created on the usage invoice frequency. If provided: - The
933
929
  # period defined in the duration will correspond to this frequency. - Commits will
934
930
  # be created aligned with the recurring commit's starting_at rather than the usage
935
- # invoice dates.
931
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
932
+ # are unable to be created with seat-based subscriptions
936
933
  recurrence_frequency: nil,
937
934
  # Will be passed down to the individual commits. This controls how much of an
938
935
  # individual unexpired commit will roll over upon contract transition. Must be
@@ -1535,7 +1532,8 @@ module MetronomeSDK
1535
1532
  # The commits will be created on the usage invoice frequency. If provided: - The
1536
1533
  # period defined in the duration will correspond to this frequency. - Commits will
1537
1534
  # be created aligned with the recurring commit's starting_at rather than the usage
1538
- # invoice dates.
1535
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
1536
+ # are unable to be created with seat-based subscriptions
1539
1537
  module RecurrenceFrequency
1540
1538
  extend MetronomeSDK::Internal::Type::Enum
1541
1539
 
@@ -1775,7 +1773,8 @@ module MetronomeSDK
1775
1773
  # The commits will be created on the usage invoice frequency. If provided: - The
1776
1774
  # period defined in the duration will correspond to this frequency. - Commits will
1777
1775
  # be created aligned with the recurring commit's starting_at rather than the usage
1778
- # invoice dates.
1776
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
1777
+ # are unable to be created with seat-based subscriptions
1779
1778
  sig do
1780
1779
  returns(
1781
1780
  T.nilable(
@@ -1903,7 +1902,8 @@ module MetronomeSDK
1903
1902
  # The commits will be created on the usage invoice frequency. If provided: - The
1904
1903
  # period defined in the duration will correspond to this frequency. - Commits will
1905
1904
  # be created aligned with the recurring commit's starting_at rather than the usage
1906
- # invoice dates.
1905
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
1906
+ # are unable to be created with seat-based subscriptions
1907
1907
  recurrence_frequency: nil,
1908
1908
  # Will be passed down to the individual commits. This controls how much of an
1909
1909
  # individual unexpired commit will roll over upon contract transition. Must be
@@ -2353,7 +2353,8 @@ module MetronomeSDK
2353
2353
  # The commits will be created on the usage invoice frequency. If provided: - The
2354
2354
  # period defined in the duration will correspond to this frequency. - Commits will
2355
2355
  # be created aligned with the recurring commit's starting_at rather than the usage
2356
- # invoice dates.
2356
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
2357
+ # are unable to be created with seat-based subscriptions
2357
2358
  module RecurrenceFrequency
2358
2359
  extend MetronomeSDK::Internal::Type::Enum
2359
2360
 
@@ -4026,7 +4026,8 @@ module MetronomeSDK
4026
4026
  # The commits will be created on the usage invoice frequency. If provided: - The
4027
4027
  # period defined in the duration will correspond to this frequency. - Commits will
4028
4028
  # be created aligned with the recurring commit's starting_at rather than the usage
4029
- # invoice dates.
4029
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
4030
+ # are unable to be created with seat-based subscriptions
4030
4031
  sig do
4031
4032
  returns(
4032
4033
  T.nilable(
@@ -4168,7 +4169,8 @@ module MetronomeSDK
4168
4169
  # The commits will be created on the usage invoice frequency. If provided: - The
4169
4170
  # period defined in the duration will correspond to this frequency. - Commits will
4170
4171
  # be created aligned with the recurring commit's starting_at rather than the usage
4171
- # invoice dates.
4172
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
4173
+ # are unable to be created with seat-based subscriptions
4172
4174
  recurrence_frequency: nil,
4173
4175
  # Will be passed down to the individual commits. This controls how much of an
4174
4176
  # individual unexpired commit will roll over upon contract transition. Must be
@@ -4735,7 +4737,8 @@ module MetronomeSDK
4735
4737
  # The commits will be created on the usage invoice frequency. If provided: - The
4736
4738
  # period defined in the duration will correspond to this frequency. - Commits will
4737
4739
  # be created aligned with the recurring commit's starting_at rather than the usage
4738
- # invoice dates.
4740
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
4741
+ # are unable to be created with seat-based subscriptions
4739
4742
  module RecurrenceFrequency
4740
4743
  extend MetronomeSDK::Internal::Type::Enum
4741
4744
 
@@ -5096,7 +5099,8 @@ module MetronomeSDK
5096
5099
  # The commits will be created on the usage invoice frequency. If provided: - The
5097
5100
  # period defined in the duration will correspond to this frequency. - Commits will
5098
5101
  # be created aligned with the recurring commit's starting_at rather than the usage
5099
- # invoice dates.
5102
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
5103
+ # are unable to be created with seat-based subscriptions
5100
5104
  sig do
5101
5105
  returns(
5102
5106
  T.nilable(
@@ -5234,7 +5238,8 @@ module MetronomeSDK
5234
5238
  # The commits will be created on the usage invoice frequency. If provided: - The
5235
5239
  # period defined in the duration will correspond to this frequency. - Commits will
5236
5240
  # be created aligned with the recurring commit's starting_at rather than the usage
5237
- # invoice dates.
5241
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
5242
+ # are unable to be created with seat-based subscriptions
5238
5243
  recurrence_frequency: nil,
5239
5244
  # Will be passed down to the individual commits. This controls how much of an
5240
5245
  # individual unexpired commit will roll over upon contract transition. Must be
@@ -5648,7 +5653,8 @@ module MetronomeSDK
5648
5653
  # The commits will be created on the usage invoice frequency. If provided: - The
5649
5654
  # period defined in the duration will correspond to this frequency. - Commits will
5650
5655
  # be created aligned with the recurring commit's starting_at rather than the usage
5651
- # invoice dates.
5656
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
5657
+ # are unable to be created with seat-based subscriptions
5652
5658
  module RecurrenceFrequency
5653
5659
  extend MetronomeSDK::Internal::Type::Enum
5654
5660
 
@@ -7959,11 +7965,6 @@ module MetronomeSDK
7959
7965
  end
7960
7966
  OrSymbol = T.type_alias { T.any(Symbol, String) }
7961
7967
 
7962
- SUPERSEDE =
7963
- T.let(
7964
- :SUPERSEDE,
7965
- MetronomeSDK::V1::ContractCreateParams::Transition::Type::TaggedSymbol
7966
- )
7967
7968
  RENEWAL =
7968
7969
  T.let(
7969
7970
  :RENEWAL,
@@ -173,7 +173,6 @@ module MetronomeSDK
173
173
  sig { params(custom_fields: T::Hash[Symbol, String]).void }
174
174
  attr_writer :custom_fields
175
175
 
176
- # The billing provider configuration associated with the contract.
177
176
  sig do
178
177
  returns(
179
178
  T.nilable(
@@ -463,7 +462,6 @@ module MetronomeSDK
463
462
  credits: nil,
464
463
  # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
465
464
  custom_fields: nil,
466
- # The billing provider configuration associated with the contract.
467
465
  customer_billing_provider_configuration: nil,
468
466
  ending_before: nil,
469
467
  # Indicates whether there are more items than the limit for this endpoint. Use the
@@ -615,11 +613,6 @@ module MetronomeSDK
615
613
  end
616
614
  OrSymbol = T.type_alias { T.any(Symbol, String) }
617
615
 
618
- SUPERSEDE =
619
- T.let(
620
- :SUPERSEDE,
621
- MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type::TaggedSymbol
622
- )
623
616
  RENEWAL =
624
617
  T.let(
625
618
  :RENEWAL,
@@ -792,73 +785,102 @@ module MetronomeSDK
792
785
  )
793
786
  end
794
787
 
795
- sig { returns(T.nilable(String)) }
796
- attr_reader :id
788
+ # ID of this configuration; can be provided as the
789
+ # billing_provider_configuration_id when creating a contract.
790
+ sig { returns(String) }
791
+ attr_accessor :id
797
792
 
798
- sig { params(id: String).void }
799
- attr_writer :id
793
+ sig { returns(T.nilable(Time)) }
794
+ attr_accessor :archived_at
800
795
 
796
+ # The billing provider set for this configuration.
801
797
  sig do
802
798
  returns(
803
- T.nilable(
804
- MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
805
- )
799
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol
806
800
  )
807
801
  end
808
- attr_reader :billing_provider
802
+ attr_accessor :billing_provider
809
803
 
810
- sig do
811
- params(
812
- billing_provider:
813
- MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::OrSymbol
814
- ).void
815
- end
816
- attr_writer :billing_provider
804
+ # Configuration for the billing provider. The structure of this object is specific
805
+ # to the billing provider.
806
+ sig { returns(T::Hash[Symbol, T.anything]) }
807
+ attr_accessor :configuration
808
+
809
+ sig { returns(String) }
810
+ attr_accessor :customer_id
817
811
 
812
+ # The method to use for delivering invoices to this customer.
818
813
  sig do
819
814
  returns(
820
- T.nilable(
821
- MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::TaggedSymbol
822
- )
815
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::TaggedSymbol
823
816
  )
824
817
  end
825
- attr_reader :delivery_method
818
+ attr_accessor :delivery_method
826
819
 
827
- sig do
828
- params(
829
- delivery_method:
830
- MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::OrSymbol
831
- ).void
832
- end
833
- attr_writer :delivery_method
820
+ # Configuration for the delivery method. The structure of this object is specific
821
+ # to the delivery method.
822
+ sig { returns(T::Hash[Symbol, T.anything]) }
823
+ attr_accessor :delivery_method_configuration
824
+
825
+ # ID of the delivery method to use for this customer.
826
+ sig { returns(String) }
827
+ attr_accessor :delivery_method_id
834
828
 
835
- # The billing provider configuration associated with the contract.
836
829
  sig do
837
830
  params(
838
831
  id: String,
832
+ archived_at: T.nilable(Time),
839
833
  billing_provider:
840
834
  MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::OrSymbol,
835
+ configuration: T::Hash[Symbol, T.anything],
836
+ customer_id: String,
841
837
  delivery_method:
842
- MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::OrSymbol
838
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::OrSymbol,
839
+ delivery_method_configuration: T::Hash[Symbol, T.anything],
840
+ delivery_method_id: String
843
841
  ).returns(T.attached_class)
844
842
  end
845
- def self.new(id: nil, billing_provider: nil, delivery_method: nil)
843
+ def self.new(
844
+ # ID of this configuration; can be provided as the
845
+ # billing_provider_configuration_id when creating a contract.
846
+ id:,
847
+ archived_at:,
848
+ # The billing provider set for this configuration.
849
+ billing_provider:,
850
+ # Configuration for the billing provider. The structure of this object is specific
851
+ # to the billing provider.
852
+ configuration:,
853
+ customer_id:,
854
+ # The method to use for delivering invoices to this customer.
855
+ delivery_method:,
856
+ # Configuration for the delivery method. The structure of this object is specific
857
+ # to the delivery method.
858
+ delivery_method_configuration:,
859
+ # ID of the delivery method to use for this customer.
860
+ delivery_method_id:
861
+ )
846
862
  end
847
863
 
848
864
  sig do
849
865
  override.returns(
850
866
  {
851
867
  id: String,
868
+ archived_at: T.nilable(Time),
852
869
  billing_provider:
853
870
  MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider::TaggedSymbol,
871
+ configuration: T::Hash[Symbol, T.anything],
872
+ customer_id: String,
854
873
  delivery_method:
855
- MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::TaggedSymbol
874
+ MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod::TaggedSymbol,
875
+ delivery_method_configuration: T::Hash[Symbol, T.anything],
876
+ delivery_method_id: String
856
877
  }
857
878
  )
858
879
  end
859
880
  def to_hash
860
881
  end
861
882
 
883
+ # The billing provider set for this configuration.
862
884
  module BillingProvider
863
885
  extend MetronomeSDK::Internal::Type::Enum
864
886
 
@@ -928,6 +950,7 @@ module MetronomeSDK
928
950
  end
929
951
  end
930
952
 
953
+ # The method to use for delivering invoices to this customer.
931
954
  module DeliveryMethod
932
955
  extend MetronomeSDK::Internal::Type::Enum
933
956
 
@@ -1267,7 +1290,8 @@ module MetronomeSDK
1267
1290
  # The commits will be created on the usage invoice frequency. If provided: - The
1268
1291
  # period defined in the duration will correspond to this frequency. - Commits will
1269
1292
  # be created aligned with the recurring commit's starting_at rather than the usage
1270
- # invoice dates.
1293
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
1294
+ # are unable to be created with seat-based subscriptions
1271
1295
  sig do
1272
1296
  returns(
1273
1297
  T.nilable(
@@ -1403,7 +1427,8 @@ module MetronomeSDK
1403
1427
  # The commits will be created on the usage invoice frequency. If provided: - The
1404
1428
  # period defined in the duration will correspond to this frequency. - Commits will
1405
1429
  # be created aligned with the recurring commit's starting_at rather than the usage
1406
- # invoice dates.
1430
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
1431
+ # are unable to be created with seat-based subscriptions
1407
1432
  recurrence_frequency: nil,
1408
1433
  # Will be passed down to the individual commits. This controls how much of an
1409
1434
  # individual unexpired commit will roll over upon contract transition. Must be
@@ -2016,7 +2041,8 @@ module MetronomeSDK
2016
2041
  # The commits will be created on the usage invoice frequency. If provided: - The
2017
2042
  # period defined in the duration will correspond to this frequency. - Commits will
2018
2043
  # be created aligned with the recurring commit's starting_at rather than the usage
2019
- # invoice dates.
2044
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
2045
+ # are unable to be created with seat-based subscriptions
2020
2046
  module RecurrenceFrequency
2021
2047
  extend MetronomeSDK::Internal::Type::Enum
2022
2048
 
@@ -2258,7 +2284,8 @@ module MetronomeSDK
2258
2284
  # The commits will be created on the usage invoice frequency. If provided: - The
2259
2285
  # period defined in the duration will correspond to this frequency. - Commits will
2260
2286
  # be created aligned with the recurring commit's starting_at rather than the usage
2261
- # invoice dates.
2287
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
2288
+ # are unable to be created with seat-based subscriptions
2262
2289
  sig do
2263
2290
  returns(
2264
2291
  T.nilable(
@@ -2390,7 +2417,8 @@ module MetronomeSDK
2390
2417
  # The commits will be created on the usage invoice frequency. If provided: - The
2391
2418
  # period defined in the duration will correspond to this frequency. - Commits will
2392
2419
  # be created aligned with the recurring commit's starting_at rather than the usage
2393
- # invoice dates.
2420
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
2421
+ # are unable to be created with seat-based subscriptions
2394
2422
  recurrence_frequency: nil,
2395
2423
  # Will be passed down to the individual commits. This controls how much of an
2396
2424
  # individual unexpired commit will roll over upon contract transition. Must be
@@ -2846,7 +2874,8 @@ module MetronomeSDK
2846
2874
  # The commits will be created on the usage invoice frequency. If provided: - The
2847
2875
  # period defined in the duration will correspond to this frequency. - Commits will
2848
2876
  # be created aligned with the recurring commit's starting_at rather than the usage
2849
- # invoice dates.
2877
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
2878
+ # are unable to be created with seat-based subscriptions
2850
2879
  module RecurrenceFrequency
2851
2880
  extend MetronomeSDK::Internal::Type::Enum
2852
2881
 
@@ -20,6 +20,29 @@ module MetronomeSDK
20
20
  sig { returns(String) }
21
21
  attr_accessor :rate_card_id
22
22
 
23
+ # Add credit type conversions for using custom pricing units in rates. Existing
24
+ # conversions cannot be modified.
25
+ sig do
26
+ returns(
27
+ T.nilable(
28
+ T::Array[
29
+ MetronomeSDK::V1::Contracts::RateCardUpdateParams::AddCreditTypeConversion
30
+ ]
31
+ )
32
+ )
33
+ end
34
+ attr_reader :add_credit_type_conversions
35
+
36
+ sig do
37
+ params(
38
+ add_credit_type_conversions:
39
+ T::Array[
40
+ MetronomeSDK::V1::Contracts::RateCardUpdateParams::AddCreditTypeConversion::OrHash
41
+ ]
42
+ ).void
43
+ end
44
+ attr_writer :add_credit_type_conversions
45
+
23
46
  # Reference this alias when creating a contract. If the same alias is assigned to
24
47
  # multiple rate cards, it will reference the rate card to which it was most
25
48
  # recently assigned. It is not exposed to end customers.
@@ -60,6 +83,10 @@ module MetronomeSDK
60
83
  sig do
61
84
  params(
62
85
  rate_card_id: String,
86
+ add_credit_type_conversions:
87
+ T::Array[
88
+ MetronomeSDK::V1::Contracts::RateCardUpdateParams::AddCreditTypeConversion::OrHash
89
+ ],
63
90
  aliases:
64
91
  T::Array[
65
92
  MetronomeSDK::V1::Contracts::RateCardUpdateParams::Alias::OrHash
@@ -72,6 +99,9 @@ module MetronomeSDK
72
99
  def self.new(
73
100
  # ID of the rate card to update
74
101
  rate_card_id:,
102
+ # Add credit type conversions for using custom pricing units in rates. Existing
103
+ # conversions cannot be modified.
104
+ add_credit_type_conversions: nil,
75
105
  # Reference this alias when creating a contract. If the same alias is assigned to
76
106
  # multiple rate cards, it will reference the rate card to which it was most
77
107
  # recently assigned. It is not exposed to end customers.
@@ -87,6 +117,10 @@ module MetronomeSDK
87
117
  override.returns(
88
118
  {
89
119
  rate_card_id: String,
120
+ add_credit_type_conversions:
121
+ T::Array[
122
+ MetronomeSDK::V1::Contracts::RateCardUpdateParams::AddCreditTypeConversion
123
+ ],
90
124
  aliases:
91
125
  T::Array[
92
126
  MetronomeSDK::V1::Contracts::RateCardUpdateParams::Alias
@@ -100,6 +134,39 @@ module MetronomeSDK
100
134
  def to_hash
101
135
  end
102
136
 
137
+ class AddCreditTypeConversion < MetronomeSDK::Internal::Type::BaseModel
138
+ OrHash =
139
+ T.type_alias do
140
+ T.any(
141
+ MetronomeSDK::V1::Contracts::RateCardUpdateParams::AddCreditTypeConversion,
142
+ MetronomeSDK::Internal::AnyHash
143
+ )
144
+ end
145
+
146
+ sig { returns(String) }
147
+ attr_accessor :custom_credit_type_id
148
+
149
+ sig { returns(Float) }
150
+ attr_accessor :fiat_per_custom_credit
151
+
152
+ sig do
153
+ params(
154
+ custom_credit_type_id: String,
155
+ fiat_per_custom_credit: Float
156
+ ).returns(T.attached_class)
157
+ end
158
+ def self.new(custom_credit_type_id:, fiat_per_custom_credit:)
159
+ end
160
+
161
+ sig do
162
+ override.returns(
163
+ { custom_credit_type_id: String, fiat_per_custom_credit: Float }
164
+ )
165
+ end
166
+ def to_hash
167
+ end
168
+ end
169
+
103
170
  class Alias < MetronomeSDK::Internal::Type::BaseModel
104
171
  OrHash =
105
172
  T.type_alias do
@@ -467,25 +467,116 @@ module MetronomeSDK
467
467
  end
468
468
 
469
469
  # The option key name
470
- sig { returns(String) }
470
+ sig do
471
+ returns(
472
+ MetronomeSDK::V1::DashboardGetEmbeddableURLParams::DashboardOption::Key::OrSymbol
473
+ )
474
+ end
471
475
  attr_accessor :key
472
476
 
473
- # The option value
477
+ # The option value. For show_zero_usage_line_items: "true" or "false" (default
478
+ # "false"). For contract_id: a UUID filtering invoices to a specific contract. For
479
+ # invoice_type: "USAGE" or "SCHEDULED". For invoice_status_filter: "VOID",
480
+ # "FINALIZED", "DRAFT", "FINALIZED_AND_DRAFT", or "ALL". For hide_voided_invoices
481
+ # (deprecated): "true" or "false".
474
482
  sig { returns(String) }
475
483
  attr_accessor :value
476
484
 
477
- sig { params(key: String, value: String).returns(T.attached_class) }
485
+ sig do
486
+ params(
487
+ key:
488
+ MetronomeSDK::V1::DashboardGetEmbeddableURLParams::DashboardOption::Key::OrSymbol,
489
+ value: String
490
+ ).returns(T.attached_class)
491
+ end
478
492
  def self.new(
479
493
  # The option key name
480
494
  key:,
481
- # The option value
495
+ # The option value. For show_zero_usage_line_items: "true" or "false" (default
496
+ # "false"). For contract_id: a UUID filtering invoices to a specific contract. For
497
+ # invoice_type: "USAGE" or "SCHEDULED". For invoice_status_filter: "VOID",
498
+ # "FINALIZED", "DRAFT", "FINALIZED_AND_DRAFT", or "ALL". For hide_voided_invoices
499
+ # (deprecated): "true" or "false".
482
500
  value:
483
501
  )
484
502
  end
485
503
 
486
- sig { override.returns({ key: String, value: String }) }
504
+ sig do
505
+ override.returns(
506
+ {
507
+ key:
508
+ MetronomeSDK::V1::DashboardGetEmbeddableURLParams::DashboardOption::Key::OrSymbol,
509
+ value: String
510
+ }
511
+ )
512
+ end
487
513
  def to_hash
488
514
  end
515
+
516
+ # The option key name
517
+ module Key
518
+ extend MetronomeSDK::Internal::Type::Enum
519
+
520
+ TaggedSymbol =
521
+ T.type_alias do
522
+ T.all(
523
+ Symbol,
524
+ MetronomeSDK::V1::DashboardGetEmbeddableURLParams::DashboardOption::Key
525
+ )
526
+ end
527
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
528
+
529
+ SHOW_ZERO_USAGE_LINE_ITEMS =
530
+ T.let(
531
+ :show_zero_usage_line_items,
532
+ MetronomeSDK::V1::DashboardGetEmbeddableURLParams::DashboardOption::Key::TaggedSymbol
533
+ )
534
+ CONTRACT_ID =
535
+ T.let(
536
+ :contract_id,
537
+ MetronomeSDK::V1::DashboardGetEmbeddableURLParams::DashboardOption::Key::TaggedSymbol
538
+ )
539
+ INVOICE_TYPE =
540
+ T.let(
541
+ :invoice_type,
542
+ MetronomeSDK::V1::DashboardGetEmbeddableURLParams::DashboardOption::Key::TaggedSymbol
543
+ )
544
+ INVOICE_STATUS_FILTER =
545
+ T.let(
546
+ :invoice_status_filter,
547
+ MetronomeSDK::V1::DashboardGetEmbeddableURLParams::DashboardOption::Key::TaggedSymbol
548
+ )
549
+ HIDE_VOIDED_INVOICES =
550
+ T.let(
551
+ :hide_voided_invoices,
552
+ MetronomeSDK::V1::DashboardGetEmbeddableURLParams::DashboardOption::Key::TaggedSymbol
553
+ )
554
+ BILLABLE_STATUS_FILTER =
555
+ T.let(
556
+ :billable_status_filter,
557
+ MetronomeSDK::V1::DashboardGetEmbeddableURLParams::DashboardOption::Key::TaggedSymbol
558
+ )
559
+ HIDE_GRANT_NAME =
560
+ T.let(
561
+ :hide_grant_name,
562
+ MetronomeSDK::V1::DashboardGetEmbeddableURLParams::DashboardOption::Key::TaggedSymbol
563
+ )
564
+ CREDIT_LEDGER_CREDIT_TYPE_ID =
565
+ T.let(
566
+ :credit_ledger_credit_type_id,
567
+ MetronomeSDK::V1::DashboardGetEmbeddableURLParams::DashboardOption::Key::TaggedSymbol
568
+ )
569
+
570
+ sig do
571
+ override.returns(
572
+ T::Array[
573
+ MetronomeSDK::V1::DashboardGetEmbeddableURLParams::DashboardOption::Key::TaggedSymbol
574
+ ]
575
+ )
576
+ end
577
+ def self.values
578
+ end
579
+ end
489
580
  end
490
581
  end
491
582
  end
@@ -3219,7 +3219,8 @@ module MetronomeSDK
3219
3219
  # The commits will be created on the usage invoice frequency. If provided: - The
3220
3220
  # period defined in the duration will correspond to this frequency. - Commits will
3221
3221
  # be created aligned with the recurring commit's starting_at rather than the usage
3222
- # invoice dates.
3222
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
3223
+ # are unable to be created with seat-based subscriptions
3223
3224
  sig do
3224
3225
  returns(
3225
3226
  T.nilable(
@@ -3358,7 +3359,8 @@ module MetronomeSDK
3358
3359
  # The commits will be created on the usage invoice frequency. If provided: - The
3359
3360
  # period defined in the duration will correspond to this frequency. - Commits will
3360
3361
  # be created aligned with the recurring commit's starting_at rather than the usage
3361
- # invoice dates.
3362
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
3363
+ # are unable to be created with seat-based subscriptions
3362
3364
  recurrence_frequency: nil,
3363
3365
  # Will be passed down to the individual commits. This controls how much of an
3364
3366
  # individual unexpired commit will roll over upon contract transition. Must be
@@ -4100,7 +4102,8 @@ module MetronomeSDK
4100
4102
  # The commits will be created on the usage invoice frequency. If provided: - The
4101
4103
  # period defined in the duration will correspond to this frequency. - Commits will
4102
4104
  # be created aligned with the recurring commit's starting_at rather than the usage
4103
- # invoice dates.
4105
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
4106
+ # are unable to be created with seat-based subscriptions
4104
4107
  module RecurrenceFrequency
4105
4108
  extend MetronomeSDK::Internal::Type::Enum
4106
4109
 
@@ -4467,7 +4470,8 @@ module MetronomeSDK
4467
4470
  # The commits will be created on the usage invoice frequency. If provided: - The
4468
4471
  # period defined in the duration will correspond to this frequency. - Commits will
4469
4472
  # be created aligned with the recurring commit's starting_at rather than the usage
4470
- # invoice dates.
4473
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
4474
+ # are unable to be created with seat-based subscriptions
4471
4475
  sig do
4472
4476
  returns(
4473
4477
  T.nilable(
@@ -4602,7 +4606,8 @@ module MetronomeSDK
4602
4606
  # The commits will be created on the usage invoice frequency. If provided: - The
4603
4607
  # period defined in the duration will correspond to this frequency. - Commits will
4604
4608
  # be created aligned with the recurring commit's starting_at rather than the usage
4605
- # invoice dates.
4609
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
4610
+ # are unable to be created with seat-based subscriptions
4606
4611
  recurrence_frequency: nil,
4607
4612
  # Will be passed down to the individual commits. This controls how much of an
4608
4613
  # individual unexpired commit will roll over upon contract transition. Must be
@@ -5191,7 +5196,8 @@ module MetronomeSDK
5191
5196
  # The commits will be created on the usage invoice frequency. If provided: - The
5192
5197
  # period defined in the duration will correspond to this frequency. - Commits will
5193
5198
  # be created aligned with the recurring commit's starting_at rather than the usage
5194
- # invoice dates.
5199
+ # invoice dates. - Daily recurring commits have a limit of one per contract, and
5200
+ # are unable to be created with seat-based subscriptions
5195
5201
  module RecurrenceFrequency
5196
5202
  extend MetronomeSDK::Internal::Type::Enum
5197
5203