metronome-sdk 3.7.0 → 3.9.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 (99) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +46 -0
  3. data/README.md +1 -1
  4. data/lib/metronome_sdk/internal/transport/base_client.rb +4 -1
  5. data/lib/metronome_sdk/models/commit.rb +10 -1
  6. data/lib/metronome_sdk/models/contract.rb +46 -16
  7. data/lib/metronome_sdk/models/contract_v2.rb +645 -16
  8. data/lib/metronome_sdk/models/contract_without_amendments.rb +178 -4
  9. data/lib/metronome_sdk/models/credit.rb +10 -1
  10. data/lib/metronome_sdk/models/override.rb +7 -1
  11. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +10 -2
  12. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +3 -1
  13. data/lib/metronome_sdk/models/subscription.rb +90 -2
  14. data/lib/metronome_sdk/models/v1/alert_create_params.rb +127 -1
  15. data/lib/metronome_sdk/models/v1/contract_amend_params.rb +17 -4
  16. data/lib/metronome_sdk/models/v1/contract_create_params.rb +290 -10
  17. data/lib/metronome_sdk/models/v1/contract_create_response.rb +243 -17
  18. data/lib/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rb +88 -0
  19. data/lib/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rb +62 -0
  20. data/lib/metronome_sdk/models/v1/contract_list_seat_balances_params.rb +10 -1
  21. data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +127 -1
  22. data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +130 -3
  23. data/lib/metronome_sdk/models/v1/customers/invoice_list_params.rb +10 -1
  24. data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +2 -0
  25. data/lib/metronome_sdk/models/v1/package_create_params.rb +279 -10
  26. data/lib/metronome_sdk/models/v1/package_list_response.rb +264 -7
  27. data/lib/metronome_sdk/models/v1/package_retrieve_response.rb +264 -7
  28. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +517 -9
  29. data/lib/metronome_sdk/models/v2/contract_edit_response.rb +456 -8
  30. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +456 -8
  31. data/lib/metronome_sdk/resources/v1/alerts.rb +3 -1
  32. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +4 -0
  33. data/lib/metronome_sdk/resources/v1/contracts.rb +68 -1
  34. data/lib/metronome_sdk/resources/v1/customers/alerts.rb +4 -2
  35. data/lib/metronome_sdk/resources/v1/customers/invoices.rb +3 -1
  36. data/lib/metronome_sdk/resources/v1/dashboards.rb +7 -2
  37. data/lib/metronome_sdk/version.rb +1 -1
  38. data/lib/metronome_sdk.rb +2 -0
  39. data/rbi/metronome_sdk/models/commit.rbi +13 -0
  40. data/rbi/metronome_sdk/models/contract.rbi +47 -22
  41. data/rbi/metronome_sdk/models/contract_v2.rbi +1472 -96
  42. data/rbi/metronome_sdk/models/contract_without_amendments.rbi +463 -0
  43. data/rbi/metronome_sdk/models/credit.rbi +13 -0
  44. data/rbi/metronome_sdk/models/override.rbi +9 -0
  45. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +11 -1
  46. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +4 -0
  47. data/rbi/metronome_sdk/models/subscription.rbi +212 -3
  48. data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +373 -0
  49. data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +27 -6
  50. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +719 -9
  51. data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +523 -32
  52. data/rbi/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rbi +112 -0
  53. data/rbi/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rbi +119 -0
  54. data/rbi/metronome_sdk/models/v1/contract_list_seat_balances_params.rbi +13 -0
  55. data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +360 -0
  56. data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +379 -2
  57. data/rbi/metronome_sdk/models/v1/customers/invoice_list_params.rbi +13 -0
  58. data/rbi/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbi +10 -0
  59. data/rbi/metronome_sdk/models/v1/package_create_params.rbi +706 -9
  60. data/rbi/metronome_sdk/models/v1/package_list_response.rbi +693 -3
  61. data/rbi/metronome_sdk/models/v1/package_retrieve_response.rbi +693 -3
  62. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +1372 -69
  63. data/rbi/metronome_sdk/models/v2/contract_edit_response.rbi +1204 -67
  64. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1204 -67
  65. data/rbi/metronome_sdk/resources/v1/alerts.rbi +8 -0
  66. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +4 -0
  67. data/rbi/metronome_sdk/resources/v1/contracts.rbi +70 -0
  68. data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +8 -1
  69. data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +4 -0
  70. data/rbi/metronome_sdk/resources/v1/dashboards.rbi +7 -2
  71. data/sig/metronome_sdk/models/commit.rbs +7 -0
  72. data/sig/metronome_sdk/models/contract.rbs +22 -11
  73. data/sig/metronome_sdk/models/contract_v2.rbs +559 -8
  74. data/sig/metronome_sdk/models/contract_without_amendments.rbs +169 -2
  75. data/sig/metronome_sdk/models/credit.rbs +7 -0
  76. data/sig/metronome_sdk/models/override.rbs +7 -0
  77. data/sig/metronome_sdk/models/subscription.rbs +88 -3
  78. data/sig/metronome_sdk/models/v1/alert_create_params.rbs +144 -0
  79. data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +7 -0
  80. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +278 -5
  81. data/sig/metronome_sdk/models/v1/contract_create_response.rbs +197 -17
  82. data/sig/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rbs +63 -0
  83. data/sig/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rbs +59 -0
  84. data/sig/metronome_sdk/models/v1/contract_list_seat_balances_params.rbs +7 -0
  85. data/sig/metronome_sdk/models/v1/customers/alert_retrieve_params.rbs +141 -0
  86. data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +150 -0
  87. data/sig/metronome_sdk/models/v1/customers/invoice_list_params.rbs +8 -1
  88. data/sig/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbs +4 -0
  89. data/sig/metronome_sdk/models/v1/package_create_params.rbs +271 -5
  90. data/sig/metronome_sdk/models/v1/package_list_response.rbs +265 -5
  91. data/sig/metronome_sdk/models/v1/package_retrieve_response.rbs +263 -5
  92. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +472 -7
  93. data/sig/metronome_sdk/models/v2/contract_edit_response.rbs +428 -5
  94. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +427 -5
  95. data/sig/metronome_sdk/resources/v1/alerts.rbs +1 -0
  96. data/sig/metronome_sdk/resources/v1/contracts.rbs +13 -0
  97. data/sig/metronome_sdk/resources/v1/customers/alerts.rbs +1 -0
  98. data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +1 -0
  99. metadata +8 -2
@@ -1182,6 +1182,11 @@ module MetronomeSDK
1182
1182
  :START_OF_CURRENT_PERIOD,
1183
1183
  MetronomeSDK::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::Schedule::EffectiveAt::TaggedSymbol
1184
1184
  )
1185
+ START_OF_NEXT_PERIOD =
1186
+ T.let(
1187
+ :START_OF_NEXT_PERIOD,
1188
+ MetronomeSDK::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::Schedule::EffectiveAt::TaggedSymbol
1189
+ )
1185
1190
 
1186
1191
  sig do
1187
1192
  override.returns(
@@ -3601,6 +3606,17 @@ module MetronomeSDK
3601
3606
  )
3602
3607
  end
3603
3608
 
3609
+ # Can only be used for commit specific overrides. Must be used in conjunction with
3610
+ # one of `product_id`, `product_tags`, `pricing_group_values`, or
3611
+ # `presentation_group_values`. Must be used instead of both `commit_ids` and
3612
+ # `recurring_commit_ids` If provided, the override will apply to any specified
3613
+ # commit, credit, recurring commit or recurring credit IDs.
3614
+ sig { returns(T.nilable(T::Array[String])) }
3615
+ attr_reader :any_commit_or_credit_ids
3616
+
3617
+ sig { params(any_commit_or_credit_ids: T::Array[String]).void }
3618
+ attr_writer :any_commit_or_credit_ids
3619
+
3604
3620
  sig do
3605
3621
  returns(
3606
3622
  T.nilable(
@@ -3673,6 +3689,7 @@ module MetronomeSDK
3673
3689
 
3674
3690
  sig do
3675
3691
  params(
3692
+ any_commit_or_credit_ids: T::Array[String],
3676
3693
  billing_frequency:
3677
3694
  MetronomeSDK::V2::ContractEditParams::AddOverride::OverrideSpecifier::BillingFrequency::OrSymbol,
3678
3695
  commit_ids: T::Array[String],
@@ -3684,6 +3701,12 @@ module MetronomeSDK
3684
3701
  ).returns(T.attached_class)
3685
3702
  end
3686
3703
  def self.new(
3704
+ # Can only be used for commit specific overrides. Must be used in conjunction with
3705
+ # one of `product_id`, `product_tags`, `pricing_group_values`, or
3706
+ # `presentation_group_values`. Must be used instead of both `commit_ids` and
3707
+ # `recurring_commit_ids` If provided, the override will apply to any specified
3708
+ # commit, credit, recurring commit or recurring credit IDs.
3709
+ any_commit_or_credit_ids: nil,
3687
3710
  billing_frequency: nil,
3688
3711
  # If provided, the override will only apply to the specified commits. Can only be
3689
3712
  # used for commit specific overrides. If not provided, the override will apply to
@@ -3712,6 +3735,7 @@ module MetronomeSDK
3712
3735
  sig do
3713
3736
  override.returns(
3714
3737
  {
3738
+ any_commit_or_credit_ids: T::Array[String],
3715
3739
  billing_frequency:
3716
3740
  MetronomeSDK::V2::ContractEditParams::AddOverride::OverrideSpecifier::BillingFrequency::OrSymbol,
3717
3741
  commit_ids: T::Array[String],
@@ -4279,6 +4303,24 @@ module MetronomeSDK
4279
4303
  end
4280
4304
  attr_writer :proration
4281
4305
 
4306
+ # Optional rounding configuration for prorated recurring commit amounts.
4307
+ sig do
4308
+ returns(
4309
+ T.nilable(
4310
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding
4311
+ )
4312
+ )
4313
+ end
4314
+ attr_reader :proration_rounding
4315
+
4316
+ sig do
4317
+ params(
4318
+ proration_rounding:
4319
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::OrHash
4320
+ ).void
4321
+ end
4322
+ attr_writer :proration_rounding
4323
+
4282
4324
  # Whether the created commits will use the commit rate or list rate
4283
4325
  sig do
4284
4326
  returns(
@@ -4393,6 +4435,8 @@ module MetronomeSDK
4393
4435
  netsuite_sales_order_id: String,
4394
4436
  proration:
4395
4437
  MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::Proration::OrSymbol,
4438
+ proration_rounding:
4439
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::OrHash,
4396
4440
  rate_type:
4397
4441
  MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::RateType::OrSymbol,
4398
4442
  recurrence_frequency:
@@ -4435,6 +4479,8 @@ module MetronomeSDK
4435
4479
  # Determines whether the first and last commit will be prorated. If not provided,
4436
4480
  # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
4437
4481
  proration: nil,
4482
+ # Optional rounding configuration for prorated recurring commit amounts.
4483
+ proration_rounding: nil,
4438
4484
  # Whether the created commits will use the commit rate or list rate
4439
4485
  rate_type: nil,
4440
4486
  # The frequency at which the recurring commits will be created. If not provided: -
@@ -4484,6 +4530,8 @@ module MetronomeSDK
4484
4530
  netsuite_sales_order_id: String,
4485
4531
  proration:
4486
4532
  MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::Proration::OrSymbol,
4533
+ proration_rounding:
4534
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding,
4487
4535
  rate_type:
4488
4536
  MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::RateType::OrSymbol,
4489
4537
  recurrence_frequency:
@@ -4716,6 +4764,255 @@ module MetronomeSDK
4716
4764
  end
4717
4765
  end
4718
4766
 
4767
+ class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
4768
+ OrHash =
4769
+ T.type_alias do
4770
+ T.any(
4771
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding,
4772
+ MetronomeSDK::Internal::AnyHash
4773
+ )
4774
+ end
4775
+
4776
+ sig do
4777
+ returns(
4778
+ T.nilable(
4779
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access
4780
+ )
4781
+ )
4782
+ end
4783
+ attr_reader :access
4784
+
4785
+ sig do
4786
+ params(
4787
+ access:
4788
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access::OrHash
4789
+ ).void
4790
+ end
4791
+ attr_writer :access
4792
+
4793
+ sig do
4794
+ returns(
4795
+ T.nilable(
4796
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice
4797
+ )
4798
+ )
4799
+ end
4800
+ attr_reader :invoice
4801
+
4802
+ sig do
4803
+ params(
4804
+ invoice:
4805
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice::OrHash
4806
+ ).void
4807
+ end
4808
+ attr_writer :invoice
4809
+
4810
+ # Optional rounding configuration for prorated recurring commit amounts.
4811
+ sig do
4812
+ params(
4813
+ access:
4814
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access::OrHash,
4815
+ invoice:
4816
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice::OrHash
4817
+ ).returns(T.attached_class)
4818
+ end
4819
+ def self.new(access: nil, invoice: nil)
4820
+ end
4821
+
4822
+ sig do
4823
+ override.returns(
4824
+ {
4825
+ access:
4826
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access,
4827
+ invoice:
4828
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice
4829
+ }
4830
+ )
4831
+ end
4832
+ def to_hash
4833
+ end
4834
+
4835
+ class Access < MetronomeSDK::Internal::Type::BaseModel
4836
+ OrHash =
4837
+ T.type_alias do
4838
+ T.any(
4839
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access,
4840
+ MetronomeSDK::Internal::AnyHash
4841
+ )
4842
+ end
4843
+
4844
+ # Number of decimal places to round to. Applied directly to the stored monetary
4845
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
4846
+ # nearest 100 in the stored unit).
4847
+ sig { returns(Float) }
4848
+ attr_accessor :decimal_places
4849
+
4850
+ sig do
4851
+ returns(
4852
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
4853
+ )
4854
+ end
4855
+ attr_accessor :rounding_method
4856
+
4857
+ sig do
4858
+ params(
4859
+ decimal_places: Float,
4860
+ rounding_method:
4861
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
4862
+ ).returns(T.attached_class)
4863
+ end
4864
+ def self.new(
4865
+ # Number of decimal places to round to. Applied directly to the stored monetary
4866
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
4867
+ # nearest 100 in the stored unit).
4868
+ decimal_places:,
4869
+ rounding_method:
4870
+ )
4871
+ end
4872
+
4873
+ sig do
4874
+ override.returns(
4875
+ {
4876
+ decimal_places: Float,
4877
+ rounding_method:
4878
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
4879
+ }
4880
+ )
4881
+ end
4882
+ def to_hash
4883
+ end
4884
+
4885
+ module RoundingMethod
4886
+ extend MetronomeSDK::Internal::Type::Enum
4887
+
4888
+ TaggedSymbol =
4889
+ T.type_alias do
4890
+ T.all(
4891
+ Symbol,
4892
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access::RoundingMethod
4893
+ )
4894
+ end
4895
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
4896
+
4897
+ HALF_UP =
4898
+ T.let(
4899
+ :HALF_UP,
4900
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
4901
+ )
4902
+ FLOOR =
4903
+ T.let(
4904
+ :FLOOR,
4905
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
4906
+ )
4907
+ CEILING =
4908
+ T.let(
4909
+ :CEILING,
4910
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
4911
+ )
4912
+
4913
+ sig do
4914
+ override.returns(
4915
+ T::Array[
4916
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
4917
+ ]
4918
+ )
4919
+ end
4920
+ def self.values
4921
+ end
4922
+ end
4923
+ end
4924
+
4925
+ class Invoice < MetronomeSDK::Internal::Type::BaseModel
4926
+ OrHash =
4927
+ T.type_alias do
4928
+ T.any(
4929
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice,
4930
+ MetronomeSDK::Internal::AnyHash
4931
+ )
4932
+ end
4933
+
4934
+ # Number of decimal places to round to. Applied directly to the stored monetary
4935
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
4936
+ # nearest 100 in the stored unit).
4937
+ sig { returns(Float) }
4938
+ attr_accessor :decimal_places
4939
+
4940
+ sig do
4941
+ returns(
4942
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
4943
+ )
4944
+ end
4945
+ attr_accessor :rounding_method
4946
+
4947
+ sig do
4948
+ params(
4949
+ decimal_places: Float,
4950
+ rounding_method:
4951
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
4952
+ ).returns(T.attached_class)
4953
+ end
4954
+ def self.new(
4955
+ # Number of decimal places to round to. Applied directly to the stored monetary
4956
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
4957
+ # nearest 100 in the stored unit).
4958
+ decimal_places:,
4959
+ rounding_method:
4960
+ )
4961
+ end
4962
+
4963
+ sig do
4964
+ override.returns(
4965
+ {
4966
+ decimal_places: Float,
4967
+ rounding_method:
4968
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
4969
+ }
4970
+ )
4971
+ end
4972
+ def to_hash
4973
+ end
4974
+
4975
+ module RoundingMethod
4976
+ extend MetronomeSDK::Internal::Type::Enum
4977
+
4978
+ TaggedSymbol =
4979
+ T.type_alias do
4980
+ T.all(
4981
+ Symbol,
4982
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice::RoundingMethod
4983
+ )
4984
+ end
4985
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
4986
+
4987
+ HALF_UP =
4988
+ T.let(
4989
+ :HALF_UP,
4990
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
4991
+ )
4992
+ FLOOR =
4993
+ T.let(
4994
+ :FLOOR,
4995
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
4996
+ )
4997
+ CEILING =
4998
+ T.let(
4999
+ :CEILING,
5000
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
5001
+ )
5002
+
5003
+ sig do
5004
+ override.returns(
5005
+ T::Array[
5006
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
5007
+ ]
5008
+ )
5009
+ end
5010
+ def self.values
5011
+ end
5012
+ end
5013
+ end
5014
+ end
5015
+
4719
5016
  # Whether the created commits will use the commit rate or list rate
4720
5017
  module RateType
4721
5018
  extend MetronomeSDK::Internal::Type::Enum
@@ -4788,6 +5085,11 @@ module MetronomeSDK
4788
5085
  :WEEKLY,
4789
5086
  MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::RecurrenceFrequency::TaggedSymbol
4790
5087
  )
5088
+ DAILY =
5089
+ T.let(
5090
+ :DAILY,
5091
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::RecurrenceFrequency::TaggedSymbol
5092
+ )
4791
5093
 
4792
5094
  sig do
4793
5095
  override.returns(
@@ -5071,6 +5373,24 @@ module MetronomeSDK
5071
5373
  end
5072
5374
  attr_writer :proration
5073
5375
 
5376
+ # Optional rounding configuration for prorated recurring credit amounts.
5377
+ sig do
5378
+ returns(
5379
+ T.nilable(
5380
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding
5381
+ )
5382
+ )
5383
+ end
5384
+ attr_reader :proration_rounding
5385
+
5386
+ sig do
5387
+ params(
5388
+ proration_rounding:
5389
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::OrHash
5390
+ ).void
5391
+ end
5392
+ attr_writer :proration_rounding
5393
+
5074
5394
  # Whether the created commits will use the commit rate or list rate
5075
5395
  sig do
5076
5396
  returns(
@@ -5183,6 +5503,8 @@ module MetronomeSDK
5183
5503
  netsuite_sales_order_id: String,
5184
5504
  proration:
5185
5505
  MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::Proration::OrSymbol,
5506
+ proration_rounding:
5507
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::OrHash,
5186
5508
  rate_type:
5187
5509
  MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RateType::OrSymbol,
5188
5510
  recurrence_frequency:
@@ -5223,6 +5545,8 @@ module MetronomeSDK
5223
5545
  # Determines whether the first and last commit will be prorated. If not provided,
5224
5546
  # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
5225
5547
  proration: nil,
5548
+ # Optional rounding configuration for prorated recurring credit amounts.
5549
+ proration_rounding: nil,
5226
5550
  # Whether the created commits will use the commit rate or list rate
5227
5551
  rate_type: nil,
5228
5552
  # The frequency at which the recurring commits will be created. If not provided: -
@@ -5270,6 +5594,8 @@ module MetronomeSDK
5270
5594
  netsuite_sales_order_id: String,
5271
5595
  proration:
5272
5596
  MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::Proration::OrSymbol,
5597
+ proration_rounding:
5598
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding,
5273
5599
  rate_type:
5274
5600
  MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RateType::OrSymbol,
5275
5601
  recurrence_frequency:
@@ -5464,52 +5790,190 @@ module MetronomeSDK
5464
5790
  end
5465
5791
  end
5466
5792
 
5467
- # Whether the created commits will use the commit rate or list rate
5468
- module RateType
5469
- extend MetronomeSDK::Internal::Type::Enum
5470
-
5471
- TaggedSymbol =
5793
+ class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
5794
+ OrHash =
5472
5795
  T.type_alias do
5473
- T.all(
5474
- Symbol,
5475
- MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RateType
5796
+ T.any(
5797
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding,
5798
+ MetronomeSDK::Internal::AnyHash
5476
5799
  )
5477
5800
  end
5478
- OrSymbol = T.type_alias { T.any(Symbol, String) }
5479
5801
 
5480
- COMMIT_RATE =
5481
- T.let(
5482
- :COMMIT_RATE,
5483
- MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RateType::TaggedSymbol
5484
- )
5485
- LIST_RATE =
5486
- T.let(
5487
- :LIST_RATE,
5488
- MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RateType::TaggedSymbol
5802
+ sig do
5803
+ returns(
5804
+ T.nilable(
5805
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access
5806
+ )
5489
5807
  )
5808
+ end
5809
+ attr_reader :access
5810
+
5811
+ sig do
5812
+ params(
5813
+ access:
5814
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access::OrHash
5815
+ ).void
5816
+ end
5817
+ attr_writer :access
5818
+
5819
+ # Optional rounding configuration for prorated recurring credit amounts.
5820
+ sig do
5821
+ params(
5822
+ access:
5823
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access::OrHash
5824
+ ).returns(T.attached_class)
5825
+ end
5826
+ def self.new(access: nil)
5827
+ end
5490
5828
 
5491
5829
  sig do
5492
5830
  override.returns(
5493
- T::Array[
5494
- MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RateType::TaggedSymbol
5495
- ]
5831
+ {
5832
+ access:
5833
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access
5834
+ }
5496
5835
  )
5497
5836
  end
5498
- def self.values
5837
+ def to_hash
5499
5838
  end
5500
- end
5501
-
5502
- # The frequency at which the recurring commits will be created. If not provided: -
5503
- # The commits will be created on the usage invoice frequency. If provided: - The
5504
- # period defined in the duration will correspond to this frequency. - Commits will
5505
- # be created aligned with the recurring commit's starting_at rather than the usage
5506
- # invoice dates.
5507
- module RecurrenceFrequency
5508
- extend MetronomeSDK::Internal::Type::Enum
5509
5839
 
5510
- TaggedSymbol =
5511
- T.type_alias do
5512
- T.all(
5840
+ class Access < MetronomeSDK::Internal::Type::BaseModel
5841
+ OrHash =
5842
+ T.type_alias do
5843
+ T.any(
5844
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access,
5845
+ MetronomeSDK::Internal::AnyHash
5846
+ )
5847
+ end
5848
+
5849
+ # Number of decimal places to round to. Applied directly to the stored monetary
5850
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
5851
+ # nearest 100 in the stored unit).
5852
+ sig { returns(Float) }
5853
+ attr_accessor :decimal_places
5854
+
5855
+ sig do
5856
+ returns(
5857
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
5858
+ )
5859
+ end
5860
+ attr_accessor :rounding_method
5861
+
5862
+ sig do
5863
+ params(
5864
+ decimal_places: Float,
5865
+ rounding_method:
5866
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
5867
+ ).returns(T.attached_class)
5868
+ end
5869
+ def self.new(
5870
+ # Number of decimal places to round to. Applied directly to the stored monetary
5871
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
5872
+ # nearest 100 in the stored unit).
5873
+ decimal_places:,
5874
+ rounding_method:
5875
+ )
5876
+ end
5877
+
5878
+ sig do
5879
+ override.returns(
5880
+ {
5881
+ decimal_places: Float,
5882
+ rounding_method:
5883
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
5884
+ }
5885
+ )
5886
+ end
5887
+ def to_hash
5888
+ end
5889
+
5890
+ module RoundingMethod
5891
+ extend MetronomeSDK::Internal::Type::Enum
5892
+
5893
+ TaggedSymbol =
5894
+ T.type_alias do
5895
+ T.all(
5896
+ Symbol,
5897
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access::RoundingMethod
5898
+ )
5899
+ end
5900
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
5901
+
5902
+ HALF_UP =
5903
+ T.let(
5904
+ :HALF_UP,
5905
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
5906
+ )
5907
+ FLOOR =
5908
+ T.let(
5909
+ :FLOOR,
5910
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
5911
+ )
5912
+ CEILING =
5913
+ T.let(
5914
+ :CEILING,
5915
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
5916
+ )
5917
+
5918
+ sig do
5919
+ override.returns(
5920
+ T::Array[
5921
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
5922
+ ]
5923
+ )
5924
+ end
5925
+ def self.values
5926
+ end
5927
+ end
5928
+ end
5929
+ end
5930
+
5931
+ # Whether the created commits will use the commit rate or list rate
5932
+ module RateType
5933
+ extend MetronomeSDK::Internal::Type::Enum
5934
+
5935
+ TaggedSymbol =
5936
+ T.type_alias do
5937
+ T.all(
5938
+ Symbol,
5939
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RateType
5940
+ )
5941
+ end
5942
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
5943
+
5944
+ COMMIT_RATE =
5945
+ T.let(
5946
+ :COMMIT_RATE,
5947
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RateType::TaggedSymbol
5948
+ )
5949
+ LIST_RATE =
5950
+ T.let(
5951
+ :LIST_RATE,
5952
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RateType::TaggedSymbol
5953
+ )
5954
+
5955
+ sig do
5956
+ override.returns(
5957
+ T::Array[
5958
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RateType::TaggedSymbol
5959
+ ]
5960
+ )
5961
+ end
5962
+ def self.values
5963
+ end
5964
+ end
5965
+
5966
+ # The frequency at which the recurring commits will be created. If not provided: -
5967
+ # The commits will be created on the usage invoice frequency. If provided: - The
5968
+ # period defined in the duration will correspond to this frequency. - Commits will
5969
+ # be created aligned with the recurring commit's starting_at rather than the usage
5970
+ # invoice dates.
5971
+ module RecurrenceFrequency
5972
+ extend MetronomeSDK::Internal::Type::Enum
5973
+
5974
+ TaggedSymbol =
5975
+ T.type_alias do
5976
+ T.all(
5513
5977
  Symbol,
5514
5978
  MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RecurrenceFrequency
5515
5979
  )
@@ -5536,6 +6000,11 @@ module MetronomeSDK
5536
6000
  :WEEKLY,
5537
6001
  MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RecurrenceFrequency::TaggedSymbol
5538
6002
  )
6003
+ DAILY =
6004
+ T.let(
6005
+ :DAILY,
6006
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RecurrenceFrequency::TaggedSymbol
6007
+ )
5539
6008
 
5540
6009
  sig do
5541
6010
  override.returns(
@@ -6255,6 +6724,11 @@ module MetronomeSDK
6255
6724
  :START_OF_CURRENT_PERIOD,
6256
6725
  MetronomeSDK::V2::ContractEditParams::AddRevenueSystemConfigurationUpdate::Schedule::EffectiveAt::TaggedSymbol
6257
6726
  )
6727
+ START_OF_NEXT_PERIOD =
6728
+ T.let(
6729
+ :START_OF_NEXT_PERIOD,
6730
+ MetronomeSDK::V2::ContractEditParams::AddRevenueSystemConfigurationUpdate::Schedule::EffectiveAt::TaggedSymbol
6731
+ )
6258
6732
 
6259
6733
  sig do
6260
6734
  override.returns(
@@ -7082,6 +7556,23 @@ module MetronomeSDK
7082
7556
  end
7083
7557
  attr_writer :subscription_rate
7084
7558
 
7559
+ sig do
7560
+ returns(
7561
+ T.nilable(
7562
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig
7563
+ )
7564
+ )
7565
+ end
7566
+ attr_reader :billing_cycle_config
7567
+
7568
+ sig do
7569
+ params(
7570
+ billing_cycle_config:
7571
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig::OrHash
7572
+ ).void
7573
+ end
7574
+ attr_writer :billing_cycle_config
7575
+
7085
7576
  # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
7086
7577
  sig { returns(T.nilable(T::Hash[Symbol, String])) }
7087
7578
  attr_reader :custom_fields
@@ -7184,6 +7675,8 @@ module MetronomeSDK
7184
7675
  MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::OrHash,
7185
7676
  subscription_rate:
7186
7677
  MetronomeSDK::V2::ContractEditParams::AddSubscription::SubscriptionRate::OrHash,
7678
+ billing_cycle_config:
7679
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig::OrHash,
7187
7680
  custom_fields: T::Hash[Symbol, String],
7188
7681
  description: String,
7189
7682
  ending_before: Time,
@@ -7201,6 +7694,7 @@ module MetronomeSDK
7201
7694
  collection_schedule:,
7202
7695
  proration:,
7203
7696
  subscription_rate:,
7697
+ billing_cycle_config: nil,
7204
7698
  # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
7205
7699
  custom_fields: nil,
7206
7700
  description: nil,
@@ -7240,6 +7734,8 @@ module MetronomeSDK
7240
7734
  MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration,
7241
7735
  subscription_rate:
7242
7736
  MetronomeSDK::V2::ContractEditParams::AddSubscription::SubscriptionRate,
7737
+ billing_cycle_config:
7738
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig,
7243
7739
  custom_fields: T::Hash[Symbol, String],
7244
7740
  description: String,
7245
7741
  ending_before: Time,
@@ -7329,11 +7825,30 @@ module MetronomeSDK
7329
7825
  sig { params(is_prorated: T::Boolean).void }
7330
7826
  attr_writer :is_prorated
7331
7827
 
7828
+ sig do
7829
+ returns(
7830
+ T.nilable(
7831
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding
7832
+ )
7833
+ )
7834
+ end
7835
+ attr_reader :rounding
7836
+
7837
+ sig do
7838
+ params(
7839
+ rounding:
7840
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding::OrHash
7841
+ ).void
7842
+ end
7843
+ attr_writer :rounding
7844
+
7332
7845
  sig do
7333
7846
  params(
7334
7847
  invoice_behavior:
7335
7848
  MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::InvoiceBehavior::OrSymbol,
7336
- is_prorated: T::Boolean
7849
+ is_prorated: T::Boolean,
7850
+ rounding:
7851
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding::OrHash
7337
7852
  ).returns(T.attached_class)
7338
7853
  end
7339
7854
  def self.new(
@@ -7344,7 +7859,8 @@ module MetronomeSDK
7344
7859
  # in-arrears at the end of the period.
7345
7860
  invoice_behavior: nil,
7346
7861
  # Indicates if the partial period will be prorated or charged a full amount.
7347
- is_prorated: nil
7862
+ is_prorated: nil,
7863
+ rounding: nil
7348
7864
  )
7349
7865
  end
7350
7866
 
@@ -7353,7 +7869,9 @@ module MetronomeSDK
7353
7869
  {
7354
7870
  invoice_behavior:
7355
7871
  MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::InvoiceBehavior::OrSymbol,
7356
- is_prorated: T::Boolean
7872
+ is_prorated: T::Boolean,
7873
+ rounding:
7874
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding
7357
7875
  }
7358
7876
  )
7359
7877
  end
@@ -7398,6 +7916,96 @@ module MetronomeSDK
7398
7916
  def self.values
7399
7917
  end
7400
7918
  end
7919
+
7920
+ class Rounding < MetronomeSDK::Internal::Type::BaseModel
7921
+ OrHash =
7922
+ T.type_alias do
7923
+ T.any(
7924
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding,
7925
+ MetronomeSDK::Internal::AnyHash
7926
+ )
7927
+ end
7928
+
7929
+ # Number of decimal places to round to. Applied directly to the stored monetary
7930
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
7931
+ # nearest 100 in the stored unit).
7932
+ sig { returns(Float) }
7933
+ attr_accessor :decimal_places
7934
+
7935
+ sig do
7936
+ returns(
7937
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding::RoundingMethod::OrSymbol
7938
+ )
7939
+ end
7940
+ attr_accessor :rounding_method
7941
+
7942
+ sig do
7943
+ params(
7944
+ decimal_places: Float,
7945
+ rounding_method:
7946
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding::RoundingMethod::OrSymbol
7947
+ ).returns(T.attached_class)
7948
+ end
7949
+ def self.new(
7950
+ # Number of decimal places to round to. Applied directly to the stored monetary
7951
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
7952
+ # nearest 100 in the stored unit).
7953
+ decimal_places:,
7954
+ rounding_method:
7955
+ )
7956
+ end
7957
+
7958
+ sig do
7959
+ override.returns(
7960
+ {
7961
+ decimal_places: Float,
7962
+ rounding_method:
7963
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding::RoundingMethod::OrSymbol
7964
+ }
7965
+ )
7966
+ end
7967
+ def to_hash
7968
+ end
7969
+
7970
+ module RoundingMethod
7971
+ extend MetronomeSDK::Internal::Type::Enum
7972
+
7973
+ TaggedSymbol =
7974
+ T.type_alias do
7975
+ T.all(
7976
+ Symbol,
7977
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding::RoundingMethod
7978
+ )
7979
+ end
7980
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
7981
+
7982
+ HALF_UP =
7983
+ T.let(
7984
+ :HALF_UP,
7985
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding::RoundingMethod::TaggedSymbol
7986
+ )
7987
+ FLOOR =
7988
+ T.let(
7989
+ :FLOOR,
7990
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding::RoundingMethod::TaggedSymbol
7991
+ )
7992
+ CEILING =
7993
+ T.let(
7994
+ :CEILING,
7995
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding::RoundingMethod::TaggedSymbol
7996
+ )
7997
+
7998
+ sig do
7999
+ override.returns(
8000
+ T::Array[
8001
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding::RoundingMethod::TaggedSymbol
8002
+ ]
8003
+ )
8004
+ end
8005
+ def self.values
8006
+ end
8007
+ end
8008
+ end
7401
8009
  end
7402
8010
 
7403
8011
  class SubscriptionRate < MetronomeSDK::Internal::Type::BaseModel
@@ -7497,50 +8105,152 @@ module MetronomeSDK
7497
8105
  end
7498
8106
  end
7499
8107
 
7500
- # Determines how the subscription's quantity is controlled. Defaults to
7501
- # QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
7502
- # directly on the subscription. `initial_quantity` must be provided with this
7503
- # option. Compatible with recurring commits/credits that use POOLED allocation.
7504
- # **SEAT_BASED**: Use when you want to pass specific seat identifiers (e.g. add
7505
- # user_123) to increment and decrement a subscription quantity, rather than
7506
- # directly providing the quantity. You must use a **SEAT_BASED** subscription to
7507
- # use a linked recurring credit with an allocation per seat. `seat_config` must be
7508
- # provided with this option.
7509
- module QuantityManagementMode
7510
- extend MetronomeSDK::Internal::Type::Enum
7511
-
7512
- TaggedSymbol =
8108
+ class BillingCycleConfig < MetronomeSDK::Internal::Type::BaseModel
8109
+ OrHash =
7513
8110
  T.type_alias do
7514
- T.all(
7515
- Symbol,
7516
- MetronomeSDK::V2::ContractEditParams::AddSubscription::QuantityManagementMode
8111
+ T.any(
8112
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig,
8113
+ MetronomeSDK::Internal::AnyHash
7517
8114
  )
7518
8115
  end
7519
- OrSymbol = T.type_alias { T.any(Symbol, String) }
7520
8116
 
7521
- SEAT_BASED =
7522
- T.let(
7523
- :SEAT_BASED,
7524
- MetronomeSDK::V2::ContractEditParams::AddSubscription::QuantityManagementMode::TaggedSymbol
7525
- )
7526
- QUANTITY_ONLY =
7527
- T.let(
7528
- :QUANTITY_ONLY,
7529
- MetronomeSDK::V2::ContractEditParams::AddSubscription::QuantityManagementMode::TaggedSymbol
8117
+ # The date to anchor the billing cycle to. If omitted, defaults to the contract's
8118
+ # usage invoice billing cycle anchor date.
8119
+ sig { returns(T.nilable(Time)) }
8120
+ attr_reader :anchor_date
8121
+
8122
+ sig { params(anchor_date: Time).void }
8123
+ attr_writer :anchor_date
8124
+
8125
+ # Controls whether this subscription consolidates onto usage invoices or gets its
8126
+ # own scheduled invoice. Defaults to ON_USAGE_INVOICE if omitted.
8127
+ sig do
8128
+ returns(
8129
+ T.nilable(
8130
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig::InvoicePlacement::OrSymbol
8131
+ )
7530
8132
  )
8133
+ end
8134
+ attr_reader :invoice_placement
8135
+
8136
+ sig do
8137
+ params(
8138
+ invoice_placement:
8139
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig::InvoicePlacement::OrSymbol
8140
+ ).void
8141
+ end
8142
+ attr_writer :invoice_placement
8143
+
8144
+ sig do
8145
+ params(
8146
+ anchor_date: Time,
8147
+ invoice_placement:
8148
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig::InvoicePlacement::OrSymbol
8149
+ ).returns(T.attached_class)
8150
+ end
8151
+ def self.new(
8152
+ # The date to anchor the billing cycle to. If omitted, defaults to the contract's
8153
+ # usage invoice billing cycle anchor date.
8154
+ anchor_date: nil,
8155
+ # Controls whether this subscription consolidates onto usage invoices or gets its
8156
+ # own scheduled invoice. Defaults to ON_USAGE_INVOICE if omitted.
8157
+ invoice_placement: nil
8158
+ )
8159
+ end
7531
8160
 
7532
8161
  sig do
7533
8162
  override.returns(
7534
- T::Array[
7535
- MetronomeSDK::V2::ContractEditParams::AddSubscription::QuantityManagementMode::TaggedSymbol
7536
- ]
8163
+ {
8164
+ anchor_date: Time,
8165
+ invoice_placement:
8166
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig::InvoicePlacement::OrSymbol
8167
+ }
7537
8168
  )
7538
8169
  end
7539
- def self.values
8170
+ def to_hash
7540
8171
  end
7541
- end
7542
8172
 
7543
- class SeatConfig < MetronomeSDK::Internal::Type::BaseModel
8173
+ # Controls whether this subscription consolidates onto usage invoices or gets its
8174
+ # own scheduled invoice. Defaults to ON_USAGE_INVOICE if omitted.
8175
+ module InvoicePlacement
8176
+ extend MetronomeSDK::Internal::Type::Enum
8177
+
8178
+ TaggedSymbol =
8179
+ T.type_alias do
8180
+ T.all(
8181
+ Symbol,
8182
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig::InvoicePlacement
8183
+ )
8184
+ end
8185
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
8186
+
8187
+ ON_SCHEDULED_INVOICE =
8188
+ T.let(
8189
+ :ON_SCHEDULED_INVOICE,
8190
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig::InvoicePlacement::TaggedSymbol
8191
+ )
8192
+ ON_USAGE_INVOICE =
8193
+ T.let(
8194
+ :ON_USAGE_INVOICE,
8195
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig::InvoicePlacement::TaggedSymbol
8196
+ )
8197
+
8198
+ sig do
8199
+ override.returns(
8200
+ T::Array[
8201
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig::InvoicePlacement::TaggedSymbol
8202
+ ]
8203
+ )
8204
+ end
8205
+ def self.values
8206
+ end
8207
+ end
8208
+ end
8209
+
8210
+ # Determines how the subscription's quantity is controlled. Defaults to
8211
+ # QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
8212
+ # directly on the subscription. `initial_quantity` must be provided with this
8213
+ # option. Compatible with recurring commits/credits that use POOLED allocation.
8214
+ # **SEAT_BASED**: Use when you want to pass specific seat identifiers (e.g. add
8215
+ # user_123) to increment and decrement a subscription quantity, rather than
8216
+ # directly providing the quantity. You must use a **SEAT_BASED** subscription to
8217
+ # use a linked recurring credit with an allocation per seat. `seat_config` must be
8218
+ # provided with this option.
8219
+ module QuantityManagementMode
8220
+ extend MetronomeSDK::Internal::Type::Enum
8221
+
8222
+ TaggedSymbol =
8223
+ T.type_alias do
8224
+ T.all(
8225
+ Symbol,
8226
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::QuantityManagementMode
8227
+ )
8228
+ end
8229
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
8230
+
8231
+ SEAT_BASED =
8232
+ T.let(
8233
+ :SEAT_BASED,
8234
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::QuantityManagementMode::TaggedSymbol
8235
+ )
8236
+ QUANTITY_ONLY =
8237
+ T.let(
8238
+ :QUANTITY_ONLY,
8239
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::QuantityManagementMode::TaggedSymbol
8240
+ )
8241
+
8242
+ sig do
8243
+ override.returns(
8244
+ T::Array[
8245
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::QuantityManagementMode::TaggedSymbol
8246
+ ]
8247
+ )
8248
+ end
8249
+ def self.values
8250
+ end
8251
+ end
8252
+
8253
+ class SeatConfig < MetronomeSDK::Internal::Type::BaseModel
7544
8254
  OrHash =
7545
8255
  T.type_alias do
7546
8256
  T.any(
@@ -8946,6 +9656,8 @@ module MetronomeSDK
8946
9656
  sig { params(threshold_amount: Float).void }
8947
9657
  attr_writer :threshold_amount
8948
9658
 
9659
+ # Determines which balances are excluded from remaining balance calculation for
9660
+ # threshold billing.
8949
9661
  sig do
8950
9662
  returns(
8951
9663
  T.nilable(
@@ -8994,6 +9706,8 @@ module MetronomeSDK
8994
9706
  # Specify the threshold amount for the contract. Each time the contract's balance
8995
9707
  # lowers to this amount, a threshold charge will be initiated.
8996
9708
  threshold_amount: nil,
9709
+ # Determines which balances are excluded from remaining balance calculation for
9710
+ # threshold billing.
8997
9711
  threshold_balance_specifiers: nil
8998
9712
  )
8999
9713
  end
@@ -9426,6 +10140,27 @@ module MetronomeSDK
9426
10140
  end
9427
10141
  attr_writer :invoice_amount
9428
10142
 
10143
+ # If provided, updates the rounding config on the recurring commit. Set to null to
10144
+ # clear rounding. Omit to leave unchanged.
10145
+ sig do
10146
+ returns(
10147
+ T.nilable(
10148
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding
10149
+ )
10150
+ )
10151
+ end
10152
+ attr_reader :proration_rounding
10153
+
10154
+ sig do
10155
+ params(
10156
+ proration_rounding:
10157
+ T.nilable(
10158
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::OrHash
10159
+ )
10160
+ ).void
10161
+ end
10162
+ attr_writer :proration_rounding
10163
+
9429
10164
  # If provided, updates the recurring commit to use the specified rate type when
9430
10165
  # generating future commits.
9431
10166
  sig do
@@ -9453,6 +10188,10 @@ module MetronomeSDK
9453
10188
  ending_before: T.nilable(Time),
9454
10189
  invoice_amount:
9455
10190
  MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::InvoiceAmount::OrHash,
10191
+ proration_rounding:
10192
+ T.nilable(
10193
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::OrHash
10194
+ ),
9456
10195
  rate_type:
9457
10196
  MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::RateType::OrSymbol
9458
10197
  ).returns(T.attached_class)
@@ -9462,6 +10201,9 @@ module MetronomeSDK
9462
10201
  access_amount: nil,
9463
10202
  ending_before: nil,
9464
10203
  invoice_amount: nil,
10204
+ # If provided, updates the rounding config on the recurring commit. Set to null to
10205
+ # clear rounding. Omit to leave unchanged.
10206
+ proration_rounding: nil,
9465
10207
  # If provided, updates the recurring commit to use the specified rate type when
9466
10208
  # generating future commits.
9467
10209
  rate_type: nil
@@ -9477,6 +10219,10 @@ module MetronomeSDK
9477
10219
  ending_before: T.nilable(Time),
9478
10220
  invoice_amount:
9479
10221
  MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::InvoiceAmount,
10222
+ proration_rounding:
10223
+ T.nilable(
10224
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding
10225
+ ),
9480
10226
  rate_type:
9481
10227
  MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::RateType::OrSymbol
9482
10228
  }
@@ -9553,6 +10299,268 @@ module MetronomeSDK
9553
10299
  end
9554
10300
  end
9555
10301
 
10302
+ class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
10303
+ OrHash =
10304
+ T.type_alias do
10305
+ T.any(
10306
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding,
10307
+ MetronomeSDK::Internal::AnyHash
10308
+ )
10309
+ end
10310
+
10311
+ sig do
10312
+ returns(
10313
+ T.nilable(
10314
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access
10315
+ )
10316
+ )
10317
+ end
10318
+ attr_reader :access
10319
+
10320
+ sig do
10321
+ params(
10322
+ access:
10323
+ T.nilable(
10324
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access::OrHash
10325
+ )
10326
+ ).void
10327
+ end
10328
+ attr_writer :access
10329
+
10330
+ sig do
10331
+ returns(
10332
+ T.nilable(
10333
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice
10334
+ )
10335
+ )
10336
+ end
10337
+ attr_reader :invoice
10338
+
10339
+ sig do
10340
+ params(
10341
+ invoice:
10342
+ T.nilable(
10343
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice::OrHash
10344
+ )
10345
+ ).void
10346
+ end
10347
+ attr_writer :invoice
10348
+
10349
+ # If provided, updates the rounding config on the recurring commit. Set to null to
10350
+ # clear rounding. Omit to leave unchanged.
10351
+ sig do
10352
+ params(
10353
+ access:
10354
+ T.nilable(
10355
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access::OrHash
10356
+ ),
10357
+ invoice:
10358
+ T.nilable(
10359
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice::OrHash
10360
+ )
10361
+ ).returns(T.attached_class)
10362
+ end
10363
+ def self.new(access: nil, invoice: nil)
10364
+ end
10365
+
10366
+ sig do
10367
+ override.returns(
10368
+ {
10369
+ access:
10370
+ T.nilable(
10371
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access
10372
+ ),
10373
+ invoice:
10374
+ T.nilable(
10375
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice
10376
+ )
10377
+ }
10378
+ )
10379
+ end
10380
+ def to_hash
10381
+ end
10382
+
10383
+ class Access < MetronomeSDK::Internal::Type::BaseModel
10384
+ OrHash =
10385
+ T.type_alias do
10386
+ T.any(
10387
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access,
10388
+ MetronomeSDK::Internal::AnyHash
10389
+ )
10390
+ end
10391
+
10392
+ # Number of decimal places to round to. Applied directly to the stored monetary
10393
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
10394
+ # nearest 100 in the stored unit).
10395
+ sig { returns(Float) }
10396
+ attr_accessor :decimal_places
10397
+
10398
+ sig do
10399
+ returns(
10400
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
10401
+ )
10402
+ end
10403
+ attr_accessor :rounding_method
10404
+
10405
+ sig do
10406
+ params(
10407
+ decimal_places: Float,
10408
+ rounding_method:
10409
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
10410
+ ).returns(T.attached_class)
10411
+ end
10412
+ def self.new(
10413
+ # Number of decimal places to round to. Applied directly to the stored monetary
10414
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
10415
+ # nearest 100 in the stored unit).
10416
+ decimal_places:,
10417
+ rounding_method:
10418
+ )
10419
+ end
10420
+
10421
+ sig do
10422
+ override.returns(
10423
+ {
10424
+ decimal_places: Float,
10425
+ rounding_method:
10426
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
10427
+ }
10428
+ )
10429
+ end
10430
+ def to_hash
10431
+ end
10432
+
10433
+ module RoundingMethod
10434
+ extend MetronomeSDK::Internal::Type::Enum
10435
+
10436
+ TaggedSymbol =
10437
+ T.type_alias do
10438
+ T.all(
10439
+ Symbol,
10440
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access::RoundingMethod
10441
+ )
10442
+ end
10443
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
10444
+
10445
+ HALF_UP =
10446
+ T.let(
10447
+ :HALF_UP,
10448
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
10449
+ )
10450
+ FLOOR =
10451
+ T.let(
10452
+ :FLOOR,
10453
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
10454
+ )
10455
+ CEILING =
10456
+ T.let(
10457
+ :CEILING,
10458
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
10459
+ )
10460
+
10461
+ sig do
10462
+ override.returns(
10463
+ T::Array[
10464
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
10465
+ ]
10466
+ )
10467
+ end
10468
+ def self.values
10469
+ end
10470
+ end
10471
+ end
10472
+
10473
+ class Invoice < MetronomeSDK::Internal::Type::BaseModel
10474
+ OrHash =
10475
+ T.type_alias do
10476
+ T.any(
10477
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice,
10478
+ MetronomeSDK::Internal::AnyHash
10479
+ )
10480
+ end
10481
+
10482
+ # Number of decimal places to round to. Applied directly to the stored monetary
10483
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
10484
+ # nearest 100 in the stored unit).
10485
+ sig { returns(Float) }
10486
+ attr_accessor :decimal_places
10487
+
10488
+ sig do
10489
+ returns(
10490
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
10491
+ )
10492
+ end
10493
+ attr_accessor :rounding_method
10494
+
10495
+ sig do
10496
+ params(
10497
+ decimal_places: Float,
10498
+ rounding_method:
10499
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
10500
+ ).returns(T.attached_class)
10501
+ end
10502
+ def self.new(
10503
+ # Number of decimal places to round to. Applied directly to the stored monetary
10504
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
10505
+ # nearest 100 in the stored unit).
10506
+ decimal_places:,
10507
+ rounding_method:
10508
+ )
10509
+ end
10510
+
10511
+ sig do
10512
+ override.returns(
10513
+ {
10514
+ decimal_places: Float,
10515
+ rounding_method:
10516
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
10517
+ }
10518
+ )
10519
+ end
10520
+ def to_hash
10521
+ end
10522
+
10523
+ module RoundingMethod
10524
+ extend MetronomeSDK::Internal::Type::Enum
10525
+
10526
+ TaggedSymbol =
10527
+ T.type_alias do
10528
+ T.all(
10529
+ Symbol,
10530
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice::RoundingMethod
10531
+ )
10532
+ end
10533
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
10534
+
10535
+ HALF_UP =
10536
+ T.let(
10537
+ :HALF_UP,
10538
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
10539
+ )
10540
+ FLOOR =
10541
+ T.let(
10542
+ :FLOOR,
10543
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
10544
+ )
10545
+ CEILING =
10546
+ T.let(
10547
+ :CEILING,
10548
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
10549
+ )
10550
+
10551
+ sig do
10552
+ override.returns(
10553
+ T::Array[
10554
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
10555
+ ]
10556
+ )
10557
+ end
10558
+ def self.values
10559
+ end
10560
+ end
10561
+ end
10562
+ end
10563
+
9556
10564
  # If provided, updates the recurring commit to use the specified rate type when
9557
10565
  # generating future commits.
9558
10566
  module RateType
@@ -9622,6 +10630,27 @@ module MetronomeSDK
9622
10630
  sig { returns(T.nilable(Time)) }
9623
10631
  attr_accessor :ending_before
9624
10632
 
10633
+ # If provided, updates the rounding config on the recurring credit. Set to null to
10634
+ # clear rounding. Omit to leave unchanged.
10635
+ sig do
10636
+ returns(
10637
+ T.nilable(
10638
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding
10639
+ )
10640
+ )
10641
+ end
10642
+ attr_reader :proration_rounding
10643
+
10644
+ sig do
10645
+ params(
10646
+ proration_rounding:
10647
+ T.nilable(
10648
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::OrHash
10649
+ )
10650
+ ).void
10651
+ end
10652
+ attr_writer :proration_rounding
10653
+
9625
10654
  # If provided, updates the recurring credit to use the specified rate type when
9626
10655
  # generating future credits.
9627
10656
  sig do
@@ -9647,6 +10676,10 @@ module MetronomeSDK
9647
10676
  access_amount:
9648
10677
  MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::AccessAmount::OrHash,
9649
10678
  ending_before: T.nilable(Time),
10679
+ proration_rounding:
10680
+ T.nilable(
10681
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::OrHash
10682
+ ),
9650
10683
  rate_type:
9651
10684
  MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::RateType::OrSymbol
9652
10685
  ).returns(T.attached_class)
@@ -9655,6 +10688,9 @@ module MetronomeSDK
9655
10688
  recurring_credit_id:,
9656
10689
  access_amount: nil,
9657
10690
  ending_before: nil,
10691
+ # If provided, updates the rounding config on the recurring credit. Set to null to
10692
+ # clear rounding. Omit to leave unchanged.
10693
+ proration_rounding: nil,
9658
10694
  # If provided, updates the recurring credit to use the specified rate type when
9659
10695
  # generating future credits.
9660
10696
  rate_type: nil
@@ -9668,6 +10704,10 @@ module MetronomeSDK
9668
10704
  access_amount:
9669
10705
  MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::AccessAmount,
9670
10706
  ending_before: T.nilable(Time),
10707
+ proration_rounding:
10708
+ T.nilable(
10709
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding
10710
+ ),
9671
10711
  rate_type:
9672
10712
  MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::RateType::OrSymbol
9673
10713
  }
@@ -9710,6 +10750,151 @@ module MetronomeSDK
9710
10750
  end
9711
10751
  end
9712
10752
 
10753
+ class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
10754
+ OrHash =
10755
+ T.type_alias do
10756
+ T.any(
10757
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding,
10758
+ MetronomeSDK::Internal::AnyHash
10759
+ )
10760
+ end
10761
+
10762
+ sig do
10763
+ returns(
10764
+ T.nilable(
10765
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access
10766
+ )
10767
+ )
10768
+ end
10769
+ attr_reader :access
10770
+
10771
+ sig do
10772
+ params(
10773
+ access:
10774
+ T.nilable(
10775
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access::OrHash
10776
+ )
10777
+ ).void
10778
+ end
10779
+ attr_writer :access
10780
+
10781
+ # If provided, updates the rounding config on the recurring credit. Set to null to
10782
+ # clear rounding. Omit to leave unchanged.
10783
+ sig do
10784
+ params(
10785
+ access:
10786
+ T.nilable(
10787
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access::OrHash
10788
+ )
10789
+ ).returns(T.attached_class)
10790
+ end
10791
+ def self.new(access: nil)
10792
+ end
10793
+
10794
+ sig do
10795
+ override.returns(
10796
+ {
10797
+ access:
10798
+ T.nilable(
10799
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access
10800
+ )
10801
+ }
10802
+ )
10803
+ end
10804
+ def to_hash
10805
+ end
10806
+
10807
+ class Access < MetronomeSDK::Internal::Type::BaseModel
10808
+ OrHash =
10809
+ T.type_alias do
10810
+ T.any(
10811
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access,
10812
+ MetronomeSDK::Internal::AnyHash
10813
+ )
10814
+ end
10815
+
10816
+ # Number of decimal places to round to. Applied directly to the stored monetary
10817
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
10818
+ # nearest 100 in the stored unit).
10819
+ sig { returns(Float) }
10820
+ attr_accessor :decimal_places
10821
+
10822
+ sig do
10823
+ returns(
10824
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
10825
+ )
10826
+ end
10827
+ attr_accessor :rounding_method
10828
+
10829
+ sig do
10830
+ params(
10831
+ decimal_places: Float,
10832
+ rounding_method:
10833
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
10834
+ ).returns(T.attached_class)
10835
+ end
10836
+ def self.new(
10837
+ # Number of decimal places to round to. Applied directly to the stored monetary
10838
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
10839
+ # nearest 100 in the stored unit).
10840
+ decimal_places:,
10841
+ rounding_method:
10842
+ )
10843
+ end
10844
+
10845
+ sig do
10846
+ override.returns(
10847
+ {
10848
+ decimal_places: Float,
10849
+ rounding_method:
10850
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
10851
+ }
10852
+ )
10853
+ end
10854
+ def to_hash
10855
+ end
10856
+
10857
+ module RoundingMethod
10858
+ extend MetronomeSDK::Internal::Type::Enum
10859
+
10860
+ TaggedSymbol =
10861
+ T.type_alias do
10862
+ T.all(
10863
+ Symbol,
10864
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access::RoundingMethod
10865
+ )
10866
+ end
10867
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
10868
+
10869
+ HALF_UP =
10870
+ T.let(
10871
+ :HALF_UP,
10872
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
10873
+ )
10874
+ FLOOR =
10875
+ T.let(
10876
+ :FLOOR,
10877
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
10878
+ )
10879
+ CEILING =
10880
+ T.let(
10881
+ :CEILING,
10882
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
10883
+ )
10884
+
10885
+ sig do
10886
+ override.returns(
10887
+ T::Array[
10888
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
10889
+ ]
10890
+ )
10891
+ end
10892
+ def self.values
10893
+ end
10894
+ end
10895
+ end
10896
+ end
10897
+
9713
10898
  # If provided, updates the recurring credit to use the specified rate type when
9714
10899
  # generating future credits.
9715
10900
  module RateType
@@ -10304,6 +11489,25 @@ module MetronomeSDK
10304
11489
  sig { returns(T.nilable(Time)) }
10305
11490
  attr_accessor :ending_before
10306
11491
 
11492
+ sig do
11493
+ returns(
11494
+ T.nilable(
11495
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding
11496
+ )
11497
+ )
11498
+ end
11499
+ attr_reader :proration_rounding
11500
+
11501
+ sig do
11502
+ params(
11503
+ proration_rounding:
11504
+ T.nilable(
11505
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding::OrHash
11506
+ )
11507
+ ).void
11508
+ end
11509
+ attr_writer :proration_rounding
11510
+
10307
11511
  # Update the subscription's quantity management mode from QUANTITY_ONLY to
10308
11512
  # SEAT_BASED with the provided seat_group_key.
10309
11513
  sig do
@@ -10368,6 +11572,10 @@ module MetronomeSDK
10368
11572
  params(
10369
11573
  subscription_id: String,
10370
11574
  ending_before: T.nilable(Time),
11575
+ proration_rounding:
11576
+ T.nilable(
11577
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding::OrHash
11578
+ ),
10371
11579
  quantity_management_mode_update:
10372
11580
  MetronomeSDK::V2::ContractEditParams::UpdateSubscription::QuantityManagementModeUpdate::OrHash,
10373
11581
  quantity_updates:
@@ -10381,6 +11589,7 @@ module MetronomeSDK
10381
11589
  def self.new(
10382
11590
  subscription_id:,
10383
11591
  ending_before: nil,
11592
+ proration_rounding: nil,
10384
11593
  # Update the subscription's quantity management mode from QUANTITY_ONLY to
10385
11594
  # SEAT_BASED with the provided seat_group_key.
10386
11595
  quantity_management_mode_update: nil,
@@ -10397,6 +11606,10 @@ module MetronomeSDK
10397
11606
  {
10398
11607
  subscription_id: String,
10399
11608
  ending_before: T.nilable(Time),
11609
+ proration_rounding:
11610
+ T.nilable(
11611
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding
11612
+ ),
10400
11613
  quantity_management_mode_update:
10401
11614
  MetronomeSDK::V2::ContractEditParams::UpdateSubscription::QuantityManagementModeUpdate,
10402
11615
  quantity_updates:
@@ -10411,6 +11624,96 @@ module MetronomeSDK
10411
11624
  def to_hash
10412
11625
  end
10413
11626
 
11627
+ class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
11628
+ OrHash =
11629
+ T.type_alias do
11630
+ T.any(
11631
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding,
11632
+ MetronomeSDK::Internal::AnyHash
11633
+ )
11634
+ end
11635
+
11636
+ # Number of decimal places to round to. Applied directly to the stored monetary
11637
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
11638
+ # nearest 100 in the stored unit).
11639
+ sig { returns(Float) }
11640
+ attr_accessor :decimal_places
11641
+
11642
+ sig do
11643
+ returns(
11644
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding::RoundingMethod::OrSymbol
11645
+ )
11646
+ end
11647
+ attr_accessor :rounding_method
11648
+
11649
+ sig do
11650
+ params(
11651
+ decimal_places: Float,
11652
+ rounding_method:
11653
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding::RoundingMethod::OrSymbol
11654
+ ).returns(T.attached_class)
11655
+ end
11656
+ def self.new(
11657
+ # Number of decimal places to round to. Applied directly to the stored monetary
11658
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
11659
+ # nearest 100 in the stored unit).
11660
+ decimal_places:,
11661
+ rounding_method:
11662
+ )
11663
+ end
11664
+
11665
+ sig do
11666
+ override.returns(
11667
+ {
11668
+ decimal_places: Float,
11669
+ rounding_method:
11670
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding::RoundingMethod::OrSymbol
11671
+ }
11672
+ )
11673
+ end
11674
+ def to_hash
11675
+ end
11676
+
11677
+ module RoundingMethod
11678
+ extend MetronomeSDK::Internal::Type::Enum
11679
+
11680
+ TaggedSymbol =
11681
+ T.type_alias do
11682
+ T.all(
11683
+ Symbol,
11684
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding::RoundingMethod
11685
+ )
11686
+ end
11687
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
11688
+
11689
+ HALF_UP =
11690
+ T.let(
11691
+ :HALF_UP,
11692
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding::RoundingMethod::TaggedSymbol
11693
+ )
11694
+ FLOOR =
11695
+ T.let(
11696
+ :FLOOR,
11697
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding::RoundingMethod::TaggedSymbol
11698
+ )
11699
+ CEILING =
11700
+ T.let(
11701
+ :CEILING,
11702
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding::RoundingMethod::TaggedSymbol
11703
+ )
11704
+
11705
+ sig do
11706
+ override.returns(
11707
+ T::Array[
11708
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding::RoundingMethod::TaggedSymbol
11709
+ ]
11710
+ )
11711
+ end
11712
+ def self.values
11713
+ end
11714
+ end
11715
+ end
11716
+
10414
11717
  class QuantityManagementModeUpdate < MetronomeSDK::Internal::Type::BaseModel
10415
11718
  OrHash =
10416
11719
  T.type_alias do