metronome-sdk 3.7.0 → 3.8.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 (96) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +38 -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_v2.rb +290 -7
  7. data/lib/metronome_sdk/models/contract_without_amendments.rb +178 -4
  8. data/lib/metronome_sdk/models/credit.rb +10 -1
  9. data/lib/metronome_sdk/models/override.rb +7 -1
  10. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +10 -2
  11. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +3 -1
  12. data/lib/metronome_sdk/models/subscription.rb +90 -2
  13. data/lib/metronome_sdk/models/v1/alert_create_params.rb +127 -1
  14. data/lib/metronome_sdk/models/v1/contract_amend_params.rb +17 -4
  15. data/lib/metronome_sdk/models/v1/contract_create_params.rb +290 -10
  16. data/lib/metronome_sdk/models/v1/contract_create_response.rb +178 -4
  17. data/lib/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rb +88 -0
  18. data/lib/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rb +62 -0
  19. data/lib/metronome_sdk/models/v1/contract_list_seat_balances_params.rb +10 -1
  20. data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +127 -1
  21. data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +130 -3
  22. data/lib/metronome_sdk/models/v1/customers/invoice_list_params.rb +10 -1
  23. data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +2 -0
  24. data/lib/metronome_sdk/models/v1/package_create_params.rb +279 -10
  25. data/lib/metronome_sdk/models/v1/package_list_response.rb +264 -7
  26. data/lib/metronome_sdk/models/v1/package_retrieve_response.rb +264 -7
  27. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +515 -9
  28. data/lib/metronome_sdk/models/v2/contract_edit_response.rb +456 -8
  29. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +456 -8
  30. data/lib/metronome_sdk/resources/v1/alerts.rb +3 -1
  31. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +4 -0
  32. data/lib/metronome_sdk/resources/v1/contracts.rb +68 -1
  33. data/lib/metronome_sdk/resources/v1/customers/alerts.rb +4 -2
  34. data/lib/metronome_sdk/resources/v1/customers/invoices.rb +3 -1
  35. data/lib/metronome_sdk/resources/v1/dashboards.rb +7 -2
  36. data/lib/metronome_sdk/version.rb +1 -1
  37. data/lib/metronome_sdk.rb +2 -0
  38. data/rbi/metronome_sdk/models/commit.rbi +13 -0
  39. data/rbi/metronome_sdk/models/contract_v2.rbi +715 -3
  40. data/rbi/metronome_sdk/models/contract_without_amendments.rbi +463 -0
  41. data/rbi/metronome_sdk/models/credit.rbi +13 -0
  42. data/rbi/metronome_sdk/models/override.rbi +9 -0
  43. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +11 -1
  44. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +4 -0
  45. data/rbi/metronome_sdk/models/subscription.rbi +212 -3
  46. data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +373 -0
  47. data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +27 -6
  48. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +719 -9
  49. data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +463 -0
  50. data/rbi/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rbi +112 -0
  51. data/rbi/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rbi +119 -0
  52. data/rbi/metronome_sdk/models/v1/contract_list_seat_balances_params.rbi +13 -0
  53. data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +360 -0
  54. data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +379 -2
  55. data/rbi/metronome_sdk/models/v1/customers/invoice_list_params.rbi +13 -0
  56. data/rbi/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbi +10 -0
  57. data/rbi/metronome_sdk/models/v1/package_create_params.rbi +706 -9
  58. data/rbi/metronome_sdk/models/v1/package_list_response.rbi +693 -3
  59. data/rbi/metronome_sdk/models/v1/package_retrieve_response.rbi +693 -3
  60. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +1333 -40
  61. data/rbi/metronome_sdk/models/v2/contract_edit_response.rbi +1204 -67
  62. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1204 -67
  63. data/rbi/metronome_sdk/resources/v1/alerts.rbi +8 -0
  64. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +4 -0
  65. data/rbi/metronome_sdk/resources/v1/contracts.rbi +70 -0
  66. data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +8 -1
  67. data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +4 -0
  68. data/rbi/metronome_sdk/resources/v1/dashboards.rbi +7 -2
  69. data/sig/metronome_sdk/models/commit.rbs +7 -0
  70. data/sig/metronome_sdk/models/contract_v2.rbs +278 -5
  71. data/sig/metronome_sdk/models/contract_without_amendments.rbs +169 -2
  72. data/sig/metronome_sdk/models/credit.rbs +7 -0
  73. data/sig/metronome_sdk/models/override.rbs +7 -0
  74. data/sig/metronome_sdk/models/subscription.rbs +88 -3
  75. data/sig/metronome_sdk/models/v1/alert_create_params.rbs +144 -0
  76. data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +7 -0
  77. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +278 -5
  78. data/sig/metronome_sdk/models/v1/contract_create_response.rbs +167 -2
  79. data/sig/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rbs +63 -0
  80. data/sig/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rbs +59 -0
  81. data/sig/metronome_sdk/models/v1/contract_list_seat_balances_params.rbs +7 -0
  82. data/sig/metronome_sdk/models/v1/customers/alert_retrieve_params.rbs +141 -0
  83. data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +150 -0
  84. data/sig/metronome_sdk/models/v1/customers/invoice_list_params.rbs +8 -1
  85. data/sig/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbs +4 -0
  86. data/sig/metronome_sdk/models/v1/package_create_params.rbs +271 -5
  87. data/sig/metronome_sdk/models/v1/package_list_response.rbs +265 -5
  88. data/sig/metronome_sdk/models/v1/package_retrieve_response.rbs +263 -5
  89. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +468 -5
  90. data/sig/metronome_sdk/models/v2/contract_edit_response.rbs +428 -5
  91. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +427 -5
  92. data/sig/metronome_sdk/resources/v1/alerts.rbs +1 -0
  93. data/sig/metronome_sdk/resources/v1/contracts.rbs +13 -0
  94. data/sig/metronome_sdk/resources/v1/customers/alerts.rbs +1 -0
  95. data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +1 -0
  96. metadata +8 -2
@@ -3601,6 +3601,17 @@ module MetronomeSDK
3601
3601
  )
3602
3602
  end
3603
3603
 
3604
+ # Can only be used for commit specific overrides. Must be used in conjunction with
3605
+ # one of `product_id`, `product_tags`, `pricing_group_values`, or
3606
+ # `presentation_group_values`. Must be used instead of both `commit_ids` and
3607
+ # `recurring_commit_ids` If provided, the override will apply to any specified
3608
+ # commit, credit, recurring commit or recurring credit IDs.
3609
+ sig { returns(T.nilable(T::Array[String])) }
3610
+ attr_reader :any_commit_or_credit_ids
3611
+
3612
+ sig { params(any_commit_or_credit_ids: T::Array[String]).void }
3613
+ attr_writer :any_commit_or_credit_ids
3614
+
3604
3615
  sig do
3605
3616
  returns(
3606
3617
  T.nilable(
@@ -3673,6 +3684,7 @@ module MetronomeSDK
3673
3684
 
3674
3685
  sig do
3675
3686
  params(
3687
+ any_commit_or_credit_ids: T::Array[String],
3676
3688
  billing_frequency:
3677
3689
  MetronomeSDK::V2::ContractEditParams::AddOverride::OverrideSpecifier::BillingFrequency::OrSymbol,
3678
3690
  commit_ids: T::Array[String],
@@ -3684,6 +3696,12 @@ module MetronomeSDK
3684
3696
  ).returns(T.attached_class)
3685
3697
  end
3686
3698
  def self.new(
3699
+ # Can only be used for commit specific overrides. Must be used in conjunction with
3700
+ # one of `product_id`, `product_tags`, `pricing_group_values`, or
3701
+ # `presentation_group_values`. Must be used instead of both `commit_ids` and
3702
+ # `recurring_commit_ids` If provided, the override will apply to any specified
3703
+ # commit, credit, recurring commit or recurring credit IDs.
3704
+ any_commit_or_credit_ids: nil,
3687
3705
  billing_frequency: nil,
3688
3706
  # If provided, the override will only apply to the specified commits. Can only be
3689
3707
  # used for commit specific overrides. If not provided, the override will apply to
@@ -3712,6 +3730,7 @@ module MetronomeSDK
3712
3730
  sig do
3713
3731
  override.returns(
3714
3732
  {
3733
+ any_commit_or_credit_ids: T::Array[String],
3715
3734
  billing_frequency:
3716
3735
  MetronomeSDK::V2::ContractEditParams::AddOverride::OverrideSpecifier::BillingFrequency::OrSymbol,
3717
3736
  commit_ids: T::Array[String],
@@ -4279,6 +4298,24 @@ module MetronomeSDK
4279
4298
  end
4280
4299
  attr_writer :proration
4281
4300
 
4301
+ # Optional rounding configuration for prorated recurring commit amounts.
4302
+ sig do
4303
+ returns(
4304
+ T.nilable(
4305
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding
4306
+ )
4307
+ )
4308
+ end
4309
+ attr_reader :proration_rounding
4310
+
4311
+ sig do
4312
+ params(
4313
+ proration_rounding:
4314
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::OrHash
4315
+ ).void
4316
+ end
4317
+ attr_writer :proration_rounding
4318
+
4282
4319
  # Whether the created commits will use the commit rate or list rate
4283
4320
  sig do
4284
4321
  returns(
@@ -4393,6 +4430,8 @@ module MetronomeSDK
4393
4430
  netsuite_sales_order_id: String,
4394
4431
  proration:
4395
4432
  MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::Proration::OrSymbol,
4433
+ proration_rounding:
4434
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::OrHash,
4396
4435
  rate_type:
4397
4436
  MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::RateType::OrSymbol,
4398
4437
  recurrence_frequency:
@@ -4435,6 +4474,8 @@ module MetronomeSDK
4435
4474
  # Determines whether the first and last commit will be prorated. If not provided,
4436
4475
  # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
4437
4476
  proration: nil,
4477
+ # Optional rounding configuration for prorated recurring commit amounts.
4478
+ proration_rounding: nil,
4438
4479
  # Whether the created commits will use the commit rate or list rate
4439
4480
  rate_type: nil,
4440
4481
  # The frequency at which the recurring commits will be created. If not provided: -
@@ -4484,6 +4525,8 @@ module MetronomeSDK
4484
4525
  netsuite_sales_order_id: String,
4485
4526
  proration:
4486
4527
  MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::Proration::OrSymbol,
4528
+ proration_rounding:
4529
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding,
4487
4530
  rate_type:
4488
4531
  MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::RateType::OrSymbol,
4489
4532
  recurrence_frequency:
@@ -4716,6 +4759,255 @@ module MetronomeSDK
4716
4759
  end
4717
4760
  end
4718
4761
 
4762
+ class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
4763
+ OrHash =
4764
+ T.type_alias do
4765
+ T.any(
4766
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding,
4767
+ MetronomeSDK::Internal::AnyHash
4768
+ )
4769
+ end
4770
+
4771
+ sig do
4772
+ returns(
4773
+ T.nilable(
4774
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access
4775
+ )
4776
+ )
4777
+ end
4778
+ attr_reader :access
4779
+
4780
+ sig do
4781
+ params(
4782
+ access:
4783
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access::OrHash
4784
+ ).void
4785
+ end
4786
+ attr_writer :access
4787
+
4788
+ sig do
4789
+ returns(
4790
+ T.nilable(
4791
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice
4792
+ )
4793
+ )
4794
+ end
4795
+ attr_reader :invoice
4796
+
4797
+ sig do
4798
+ params(
4799
+ invoice:
4800
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice::OrHash
4801
+ ).void
4802
+ end
4803
+ attr_writer :invoice
4804
+
4805
+ # Optional rounding configuration for prorated recurring commit amounts.
4806
+ sig do
4807
+ params(
4808
+ access:
4809
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access::OrHash,
4810
+ invoice:
4811
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice::OrHash
4812
+ ).returns(T.attached_class)
4813
+ end
4814
+ def self.new(access: nil, invoice: nil)
4815
+ end
4816
+
4817
+ sig do
4818
+ override.returns(
4819
+ {
4820
+ access:
4821
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access,
4822
+ invoice:
4823
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice
4824
+ }
4825
+ )
4826
+ end
4827
+ def to_hash
4828
+ end
4829
+
4830
+ class Access < MetronomeSDK::Internal::Type::BaseModel
4831
+ OrHash =
4832
+ T.type_alias do
4833
+ T.any(
4834
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access,
4835
+ MetronomeSDK::Internal::AnyHash
4836
+ )
4837
+ end
4838
+
4839
+ # Number of decimal places to round to. Applied directly to the stored monetary
4840
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
4841
+ # nearest 100 in the stored unit).
4842
+ sig { returns(Float) }
4843
+ attr_accessor :decimal_places
4844
+
4845
+ sig do
4846
+ returns(
4847
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
4848
+ )
4849
+ end
4850
+ attr_accessor :rounding_method
4851
+
4852
+ sig do
4853
+ params(
4854
+ decimal_places: Float,
4855
+ rounding_method:
4856
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
4857
+ ).returns(T.attached_class)
4858
+ end
4859
+ def self.new(
4860
+ # Number of decimal places to round to. Applied directly to the stored monetary
4861
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
4862
+ # nearest 100 in the stored unit).
4863
+ decimal_places:,
4864
+ rounding_method:
4865
+ )
4866
+ end
4867
+
4868
+ sig do
4869
+ override.returns(
4870
+ {
4871
+ decimal_places: Float,
4872
+ rounding_method:
4873
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
4874
+ }
4875
+ )
4876
+ end
4877
+ def to_hash
4878
+ end
4879
+
4880
+ module RoundingMethod
4881
+ extend MetronomeSDK::Internal::Type::Enum
4882
+
4883
+ TaggedSymbol =
4884
+ T.type_alias do
4885
+ T.all(
4886
+ Symbol,
4887
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access::RoundingMethod
4888
+ )
4889
+ end
4890
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
4891
+
4892
+ HALF_UP =
4893
+ T.let(
4894
+ :HALF_UP,
4895
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
4896
+ )
4897
+ FLOOR =
4898
+ T.let(
4899
+ :FLOOR,
4900
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
4901
+ )
4902
+ CEILING =
4903
+ T.let(
4904
+ :CEILING,
4905
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
4906
+ )
4907
+
4908
+ sig do
4909
+ override.returns(
4910
+ T::Array[
4911
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
4912
+ ]
4913
+ )
4914
+ end
4915
+ def self.values
4916
+ end
4917
+ end
4918
+ end
4919
+
4920
+ class Invoice < MetronomeSDK::Internal::Type::BaseModel
4921
+ OrHash =
4922
+ T.type_alias do
4923
+ T.any(
4924
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice,
4925
+ MetronomeSDK::Internal::AnyHash
4926
+ )
4927
+ end
4928
+
4929
+ # Number of decimal places to round to. Applied directly to the stored monetary
4930
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
4931
+ # nearest 100 in the stored unit).
4932
+ sig { returns(Float) }
4933
+ attr_accessor :decimal_places
4934
+
4935
+ sig do
4936
+ returns(
4937
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
4938
+ )
4939
+ end
4940
+ attr_accessor :rounding_method
4941
+
4942
+ sig do
4943
+ params(
4944
+ decimal_places: Float,
4945
+ rounding_method:
4946
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
4947
+ ).returns(T.attached_class)
4948
+ end
4949
+ def self.new(
4950
+ # Number of decimal places to round to. Applied directly to the stored monetary
4951
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
4952
+ # nearest 100 in the stored unit).
4953
+ decimal_places:,
4954
+ rounding_method:
4955
+ )
4956
+ end
4957
+
4958
+ sig do
4959
+ override.returns(
4960
+ {
4961
+ decimal_places: Float,
4962
+ rounding_method:
4963
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
4964
+ }
4965
+ )
4966
+ end
4967
+ def to_hash
4968
+ end
4969
+
4970
+ module RoundingMethod
4971
+ extend MetronomeSDK::Internal::Type::Enum
4972
+
4973
+ TaggedSymbol =
4974
+ T.type_alias do
4975
+ T.all(
4976
+ Symbol,
4977
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice::RoundingMethod
4978
+ )
4979
+ end
4980
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
4981
+
4982
+ HALF_UP =
4983
+ T.let(
4984
+ :HALF_UP,
4985
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
4986
+ )
4987
+ FLOOR =
4988
+ T.let(
4989
+ :FLOOR,
4990
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
4991
+ )
4992
+ CEILING =
4993
+ T.let(
4994
+ :CEILING,
4995
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
4996
+ )
4997
+
4998
+ sig do
4999
+ override.returns(
5000
+ T::Array[
5001
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
5002
+ ]
5003
+ )
5004
+ end
5005
+ def self.values
5006
+ end
5007
+ end
5008
+ end
5009
+ end
5010
+
4719
5011
  # Whether the created commits will use the commit rate or list rate
4720
5012
  module RateType
4721
5013
  extend MetronomeSDK::Internal::Type::Enum
@@ -4788,6 +5080,11 @@ module MetronomeSDK
4788
5080
  :WEEKLY,
4789
5081
  MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::RecurrenceFrequency::TaggedSymbol
4790
5082
  )
5083
+ DAILY =
5084
+ T.let(
5085
+ :DAILY,
5086
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCommit::RecurrenceFrequency::TaggedSymbol
5087
+ )
4791
5088
 
4792
5089
  sig do
4793
5090
  override.returns(
@@ -5071,6 +5368,24 @@ module MetronomeSDK
5071
5368
  end
5072
5369
  attr_writer :proration
5073
5370
 
5371
+ # Optional rounding configuration for prorated recurring credit amounts.
5372
+ sig do
5373
+ returns(
5374
+ T.nilable(
5375
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding
5376
+ )
5377
+ )
5378
+ end
5379
+ attr_reader :proration_rounding
5380
+
5381
+ sig do
5382
+ params(
5383
+ proration_rounding:
5384
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::OrHash
5385
+ ).void
5386
+ end
5387
+ attr_writer :proration_rounding
5388
+
5074
5389
  # Whether the created commits will use the commit rate or list rate
5075
5390
  sig do
5076
5391
  returns(
@@ -5183,6 +5498,8 @@ module MetronomeSDK
5183
5498
  netsuite_sales_order_id: String,
5184
5499
  proration:
5185
5500
  MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::Proration::OrSymbol,
5501
+ proration_rounding:
5502
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::OrHash,
5186
5503
  rate_type:
5187
5504
  MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RateType::OrSymbol,
5188
5505
  recurrence_frequency:
@@ -5223,6 +5540,8 @@ module MetronomeSDK
5223
5540
  # Determines whether the first and last commit will be prorated. If not provided,
5224
5541
  # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
5225
5542
  proration: nil,
5543
+ # Optional rounding configuration for prorated recurring credit amounts.
5544
+ proration_rounding: nil,
5226
5545
  # Whether the created commits will use the commit rate or list rate
5227
5546
  rate_type: nil,
5228
5547
  # The frequency at which the recurring commits will be created. If not provided: -
@@ -5270,6 +5589,8 @@ module MetronomeSDK
5270
5589
  netsuite_sales_order_id: String,
5271
5590
  proration:
5272
5591
  MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::Proration::OrSymbol,
5592
+ proration_rounding:
5593
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding,
5273
5594
  rate_type:
5274
5595
  MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RateType::OrSymbol,
5275
5596
  recurrence_frequency:
@@ -5464,50 +5785,188 @@ module MetronomeSDK
5464
5785
  end
5465
5786
  end
5466
5787
 
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 =
5788
+ class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
5789
+ OrHash =
5472
5790
  T.type_alias do
5473
- T.all(
5474
- Symbol,
5475
- MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RateType
5791
+ T.any(
5792
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding,
5793
+ MetronomeSDK::Internal::AnyHash
5476
5794
  )
5477
5795
  end
5478
- OrSymbol = T.type_alias { T.any(Symbol, String) }
5479
5796
 
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
5797
+ sig do
5798
+ returns(
5799
+ T.nilable(
5800
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access
5801
+ )
5489
5802
  )
5803
+ end
5804
+ attr_reader :access
5805
+
5806
+ sig do
5807
+ params(
5808
+ access:
5809
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access::OrHash
5810
+ ).void
5811
+ end
5812
+ attr_writer :access
5813
+
5814
+ # Optional rounding configuration for prorated recurring credit amounts.
5815
+ sig do
5816
+ params(
5817
+ access:
5818
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access::OrHash
5819
+ ).returns(T.attached_class)
5820
+ end
5821
+ def self.new(access: nil)
5822
+ end
5490
5823
 
5491
5824
  sig do
5492
5825
  override.returns(
5493
- T::Array[
5494
- MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RateType::TaggedSymbol
5495
- ]
5826
+ {
5827
+ access:
5828
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access
5829
+ }
5496
5830
  )
5497
5831
  end
5498
- def self.values
5832
+ def to_hash
5499
5833
  end
5500
- end
5501
5834
 
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
5835
+ class Access < MetronomeSDK::Internal::Type::BaseModel
5836
+ OrHash =
5837
+ T.type_alias do
5838
+ T.any(
5839
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access,
5840
+ MetronomeSDK::Internal::AnyHash
5841
+ )
5842
+ end
5509
5843
 
5510
- TaggedSymbol =
5844
+ # Number of decimal places to round to. Applied directly to the stored monetary
5845
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
5846
+ # nearest 100 in the stored unit).
5847
+ sig { returns(Float) }
5848
+ attr_accessor :decimal_places
5849
+
5850
+ sig do
5851
+ returns(
5852
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
5853
+ )
5854
+ end
5855
+ attr_accessor :rounding_method
5856
+
5857
+ sig do
5858
+ params(
5859
+ decimal_places: Float,
5860
+ rounding_method:
5861
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
5862
+ ).returns(T.attached_class)
5863
+ end
5864
+ def self.new(
5865
+ # Number of decimal places to round to. Applied directly to the stored monetary
5866
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
5867
+ # nearest 100 in the stored unit).
5868
+ decimal_places:,
5869
+ rounding_method:
5870
+ )
5871
+ end
5872
+
5873
+ sig do
5874
+ override.returns(
5875
+ {
5876
+ decimal_places: Float,
5877
+ rounding_method:
5878
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
5879
+ }
5880
+ )
5881
+ end
5882
+ def to_hash
5883
+ end
5884
+
5885
+ module RoundingMethod
5886
+ extend MetronomeSDK::Internal::Type::Enum
5887
+
5888
+ TaggedSymbol =
5889
+ T.type_alias do
5890
+ T.all(
5891
+ Symbol,
5892
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access::RoundingMethod
5893
+ )
5894
+ end
5895
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
5896
+
5897
+ HALF_UP =
5898
+ T.let(
5899
+ :HALF_UP,
5900
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
5901
+ )
5902
+ FLOOR =
5903
+ T.let(
5904
+ :FLOOR,
5905
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
5906
+ )
5907
+ CEILING =
5908
+ T.let(
5909
+ :CEILING,
5910
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
5911
+ )
5912
+
5913
+ sig do
5914
+ override.returns(
5915
+ T::Array[
5916
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
5917
+ ]
5918
+ )
5919
+ end
5920
+ def self.values
5921
+ end
5922
+ end
5923
+ end
5924
+ end
5925
+
5926
+ # Whether the created commits will use the commit rate or list rate
5927
+ module RateType
5928
+ extend MetronomeSDK::Internal::Type::Enum
5929
+
5930
+ TaggedSymbol =
5931
+ T.type_alias do
5932
+ T.all(
5933
+ Symbol,
5934
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RateType
5935
+ )
5936
+ end
5937
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
5938
+
5939
+ COMMIT_RATE =
5940
+ T.let(
5941
+ :COMMIT_RATE,
5942
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RateType::TaggedSymbol
5943
+ )
5944
+ LIST_RATE =
5945
+ T.let(
5946
+ :LIST_RATE,
5947
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RateType::TaggedSymbol
5948
+ )
5949
+
5950
+ sig do
5951
+ override.returns(
5952
+ T::Array[
5953
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RateType::TaggedSymbol
5954
+ ]
5955
+ )
5956
+ end
5957
+ def self.values
5958
+ end
5959
+ end
5960
+
5961
+ # The frequency at which the recurring commits will be created. If not provided: -
5962
+ # The commits will be created on the usage invoice frequency. If provided: - The
5963
+ # period defined in the duration will correspond to this frequency. - Commits will
5964
+ # be created aligned with the recurring commit's starting_at rather than the usage
5965
+ # invoice dates.
5966
+ module RecurrenceFrequency
5967
+ extend MetronomeSDK::Internal::Type::Enum
5968
+
5969
+ TaggedSymbol =
5511
5970
  T.type_alias do
5512
5971
  T.all(
5513
5972
  Symbol,
@@ -5536,6 +5995,11 @@ module MetronomeSDK
5536
5995
  :WEEKLY,
5537
5996
  MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RecurrenceFrequency::TaggedSymbol
5538
5997
  )
5998
+ DAILY =
5999
+ T.let(
6000
+ :DAILY,
6001
+ MetronomeSDK::V2::ContractEditParams::AddRecurringCredit::RecurrenceFrequency::TaggedSymbol
6002
+ )
5539
6003
 
5540
6004
  sig do
5541
6005
  override.returns(
@@ -7082,6 +7546,23 @@ module MetronomeSDK
7082
7546
  end
7083
7547
  attr_writer :subscription_rate
7084
7548
 
7549
+ sig do
7550
+ returns(
7551
+ T.nilable(
7552
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig
7553
+ )
7554
+ )
7555
+ end
7556
+ attr_reader :billing_cycle_config
7557
+
7558
+ sig do
7559
+ params(
7560
+ billing_cycle_config:
7561
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig::OrHash
7562
+ ).void
7563
+ end
7564
+ attr_writer :billing_cycle_config
7565
+
7085
7566
  # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
7086
7567
  sig { returns(T.nilable(T::Hash[Symbol, String])) }
7087
7568
  attr_reader :custom_fields
@@ -7184,6 +7665,8 @@ module MetronomeSDK
7184
7665
  MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::OrHash,
7185
7666
  subscription_rate:
7186
7667
  MetronomeSDK::V2::ContractEditParams::AddSubscription::SubscriptionRate::OrHash,
7668
+ billing_cycle_config:
7669
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig::OrHash,
7187
7670
  custom_fields: T::Hash[Symbol, String],
7188
7671
  description: String,
7189
7672
  ending_before: Time,
@@ -7201,6 +7684,7 @@ module MetronomeSDK
7201
7684
  collection_schedule:,
7202
7685
  proration:,
7203
7686
  subscription_rate:,
7687
+ billing_cycle_config: nil,
7204
7688
  # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
7205
7689
  custom_fields: nil,
7206
7690
  description: nil,
@@ -7240,6 +7724,8 @@ module MetronomeSDK
7240
7724
  MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration,
7241
7725
  subscription_rate:
7242
7726
  MetronomeSDK::V2::ContractEditParams::AddSubscription::SubscriptionRate,
7727
+ billing_cycle_config:
7728
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig,
7243
7729
  custom_fields: T::Hash[Symbol, String],
7244
7730
  description: String,
7245
7731
  ending_before: Time,
@@ -7329,11 +7815,30 @@ module MetronomeSDK
7329
7815
  sig { params(is_prorated: T::Boolean).void }
7330
7816
  attr_writer :is_prorated
7331
7817
 
7818
+ sig do
7819
+ returns(
7820
+ T.nilable(
7821
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding
7822
+ )
7823
+ )
7824
+ end
7825
+ attr_reader :rounding
7826
+
7827
+ sig do
7828
+ params(
7829
+ rounding:
7830
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding::OrHash
7831
+ ).void
7832
+ end
7833
+ attr_writer :rounding
7834
+
7332
7835
  sig do
7333
7836
  params(
7334
7837
  invoice_behavior:
7335
7838
  MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::InvoiceBehavior::OrSymbol,
7336
- is_prorated: T::Boolean
7839
+ is_prorated: T::Boolean,
7840
+ rounding:
7841
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding::OrHash
7337
7842
  ).returns(T.attached_class)
7338
7843
  end
7339
7844
  def self.new(
@@ -7344,7 +7849,8 @@ module MetronomeSDK
7344
7849
  # in-arrears at the end of the period.
7345
7850
  invoice_behavior: nil,
7346
7851
  # Indicates if the partial period will be prorated or charged a full amount.
7347
- is_prorated: nil
7852
+ is_prorated: nil,
7853
+ rounding: nil
7348
7854
  )
7349
7855
  end
7350
7856
 
@@ -7353,7 +7859,9 @@ module MetronomeSDK
7353
7859
  {
7354
7860
  invoice_behavior:
7355
7861
  MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::InvoiceBehavior::OrSymbol,
7356
- is_prorated: T::Boolean
7862
+ is_prorated: T::Boolean,
7863
+ rounding:
7864
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding
7357
7865
  }
7358
7866
  )
7359
7867
  end
@@ -7398,6 +7906,96 @@ module MetronomeSDK
7398
7906
  def self.values
7399
7907
  end
7400
7908
  end
7909
+
7910
+ class Rounding < MetronomeSDK::Internal::Type::BaseModel
7911
+ OrHash =
7912
+ T.type_alias do
7913
+ T.any(
7914
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding,
7915
+ MetronomeSDK::Internal::AnyHash
7916
+ )
7917
+ end
7918
+
7919
+ # Number of decimal places to round to. Applied directly to the stored monetary
7920
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
7921
+ # nearest 100 in the stored unit).
7922
+ sig { returns(Float) }
7923
+ attr_accessor :decimal_places
7924
+
7925
+ sig do
7926
+ returns(
7927
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding::RoundingMethod::OrSymbol
7928
+ )
7929
+ end
7930
+ attr_accessor :rounding_method
7931
+
7932
+ sig do
7933
+ params(
7934
+ decimal_places: Float,
7935
+ rounding_method:
7936
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding::RoundingMethod::OrSymbol
7937
+ ).returns(T.attached_class)
7938
+ end
7939
+ def self.new(
7940
+ # Number of decimal places to round to. Applied directly to the stored monetary
7941
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
7942
+ # nearest 100 in the stored unit).
7943
+ decimal_places:,
7944
+ rounding_method:
7945
+ )
7946
+ end
7947
+
7948
+ sig do
7949
+ override.returns(
7950
+ {
7951
+ decimal_places: Float,
7952
+ rounding_method:
7953
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding::RoundingMethod::OrSymbol
7954
+ }
7955
+ )
7956
+ end
7957
+ def to_hash
7958
+ end
7959
+
7960
+ module RoundingMethod
7961
+ extend MetronomeSDK::Internal::Type::Enum
7962
+
7963
+ TaggedSymbol =
7964
+ T.type_alias do
7965
+ T.all(
7966
+ Symbol,
7967
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding::RoundingMethod
7968
+ )
7969
+ end
7970
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
7971
+
7972
+ HALF_UP =
7973
+ T.let(
7974
+ :HALF_UP,
7975
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding::RoundingMethod::TaggedSymbol
7976
+ )
7977
+ FLOOR =
7978
+ T.let(
7979
+ :FLOOR,
7980
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding::RoundingMethod::TaggedSymbol
7981
+ )
7982
+ CEILING =
7983
+ T.let(
7984
+ :CEILING,
7985
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding::RoundingMethod::TaggedSymbol
7986
+ )
7987
+
7988
+ sig do
7989
+ override.returns(
7990
+ T::Array[
7991
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::Proration::Rounding::RoundingMethod::TaggedSymbol
7992
+ ]
7993
+ )
7994
+ end
7995
+ def self.values
7996
+ end
7997
+ end
7998
+ end
7401
7999
  end
7402
8000
 
7403
8001
  class SubscriptionRate < MetronomeSDK::Internal::Type::BaseModel
@@ -7497,6 +8095,108 @@ module MetronomeSDK
7497
8095
  end
7498
8096
  end
7499
8097
 
8098
+ class BillingCycleConfig < MetronomeSDK::Internal::Type::BaseModel
8099
+ OrHash =
8100
+ T.type_alias do
8101
+ T.any(
8102
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig,
8103
+ MetronomeSDK::Internal::AnyHash
8104
+ )
8105
+ end
8106
+
8107
+ # The date to anchor the billing cycle to. If omitted, defaults to the contract's
8108
+ # usage invoice billing cycle anchor date.
8109
+ sig { returns(T.nilable(Time)) }
8110
+ attr_reader :anchor_date
8111
+
8112
+ sig { params(anchor_date: Time).void }
8113
+ attr_writer :anchor_date
8114
+
8115
+ # Controls whether this subscription consolidates onto usage invoices or gets its
8116
+ # own scheduled invoice. Defaults to ON_USAGE_INVOICE if omitted.
8117
+ sig do
8118
+ returns(
8119
+ T.nilable(
8120
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig::InvoicePlacement::OrSymbol
8121
+ )
8122
+ )
8123
+ end
8124
+ attr_reader :invoice_placement
8125
+
8126
+ sig do
8127
+ params(
8128
+ invoice_placement:
8129
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig::InvoicePlacement::OrSymbol
8130
+ ).void
8131
+ end
8132
+ attr_writer :invoice_placement
8133
+
8134
+ sig do
8135
+ params(
8136
+ anchor_date: Time,
8137
+ invoice_placement:
8138
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig::InvoicePlacement::OrSymbol
8139
+ ).returns(T.attached_class)
8140
+ end
8141
+ def self.new(
8142
+ # The date to anchor the billing cycle to. If omitted, defaults to the contract's
8143
+ # usage invoice billing cycle anchor date.
8144
+ anchor_date: nil,
8145
+ # Controls whether this subscription consolidates onto usage invoices or gets its
8146
+ # own scheduled invoice. Defaults to ON_USAGE_INVOICE if omitted.
8147
+ invoice_placement: nil
8148
+ )
8149
+ end
8150
+
8151
+ sig do
8152
+ override.returns(
8153
+ {
8154
+ anchor_date: Time,
8155
+ invoice_placement:
8156
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig::InvoicePlacement::OrSymbol
8157
+ }
8158
+ )
8159
+ end
8160
+ def to_hash
8161
+ end
8162
+
8163
+ # Controls whether this subscription consolidates onto usage invoices or gets its
8164
+ # own scheduled invoice. Defaults to ON_USAGE_INVOICE if omitted.
8165
+ module InvoicePlacement
8166
+ extend MetronomeSDK::Internal::Type::Enum
8167
+
8168
+ TaggedSymbol =
8169
+ T.type_alias do
8170
+ T.all(
8171
+ Symbol,
8172
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig::InvoicePlacement
8173
+ )
8174
+ end
8175
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
8176
+
8177
+ ON_SCHEDULED_INVOICE =
8178
+ T.let(
8179
+ :ON_SCHEDULED_INVOICE,
8180
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig::InvoicePlacement::TaggedSymbol
8181
+ )
8182
+ ON_USAGE_INVOICE =
8183
+ T.let(
8184
+ :ON_USAGE_INVOICE,
8185
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig::InvoicePlacement::TaggedSymbol
8186
+ )
8187
+
8188
+ sig do
8189
+ override.returns(
8190
+ T::Array[
8191
+ MetronomeSDK::V2::ContractEditParams::AddSubscription::BillingCycleConfig::InvoicePlacement::TaggedSymbol
8192
+ ]
8193
+ )
8194
+ end
8195
+ def self.values
8196
+ end
8197
+ end
8198
+ end
8199
+
7500
8200
  # Determines how the subscription's quantity is controlled. Defaults to
7501
8201
  # QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
7502
8202
  # directly on the subscription. `initial_quantity` must be provided with this
@@ -8946,6 +9646,8 @@ module MetronomeSDK
8946
9646
  sig { params(threshold_amount: Float).void }
8947
9647
  attr_writer :threshold_amount
8948
9648
 
9649
+ # Determines which balances are excluded from remaining balance calculation for
9650
+ # threshold billing.
8949
9651
  sig do
8950
9652
  returns(
8951
9653
  T.nilable(
@@ -8994,6 +9696,8 @@ module MetronomeSDK
8994
9696
  # Specify the threshold amount for the contract. Each time the contract's balance
8995
9697
  # lowers to this amount, a threshold charge will be initiated.
8996
9698
  threshold_amount: nil,
9699
+ # Determines which balances are excluded from remaining balance calculation for
9700
+ # threshold billing.
8997
9701
  threshold_balance_specifiers: nil
8998
9702
  )
8999
9703
  end
@@ -9426,21 +10130,42 @@ module MetronomeSDK
9426
10130
  end
9427
10131
  attr_writer :invoice_amount
9428
10132
 
9429
- # If provided, updates the recurring commit to use the specified rate type when
9430
- # generating future commits.
10133
+ # If provided, updates the rounding config on the recurring commit. Set to null to
10134
+ # clear rounding. Omit to leave unchanged.
9431
10135
  sig do
9432
10136
  returns(
9433
10137
  T.nilable(
9434
- MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::RateType::OrSymbol
10138
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding
9435
10139
  )
9436
10140
  )
9437
10141
  end
9438
- attr_reader :rate_type
10142
+ attr_reader :proration_rounding
9439
10143
 
9440
10144
  sig do
9441
10145
  params(
9442
- rate_type:
9443
- MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::RateType::OrSymbol
10146
+ proration_rounding:
10147
+ T.nilable(
10148
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::OrHash
10149
+ )
10150
+ ).void
10151
+ end
10152
+ attr_writer :proration_rounding
10153
+
10154
+ # If provided, updates the recurring commit to use the specified rate type when
10155
+ # generating future commits.
10156
+ sig do
10157
+ returns(
10158
+ T.nilable(
10159
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::RateType::OrSymbol
10160
+ )
10161
+ )
10162
+ end
10163
+ attr_reader :rate_type
10164
+
10165
+ sig do
10166
+ params(
10167
+ rate_type:
10168
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::RateType::OrSymbol
9444
10169
  ).void
9445
10170
  end
9446
10171
  attr_writer :rate_type
@@ -9453,6 +10178,10 @@ module MetronomeSDK
9453
10178
  ending_before: T.nilable(Time),
9454
10179
  invoice_amount:
9455
10180
  MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::InvoiceAmount::OrHash,
10181
+ proration_rounding:
10182
+ T.nilable(
10183
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::OrHash
10184
+ ),
9456
10185
  rate_type:
9457
10186
  MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::RateType::OrSymbol
9458
10187
  ).returns(T.attached_class)
@@ -9462,6 +10191,9 @@ module MetronomeSDK
9462
10191
  access_amount: nil,
9463
10192
  ending_before: nil,
9464
10193
  invoice_amount: nil,
10194
+ # If provided, updates the rounding config on the recurring commit. Set to null to
10195
+ # clear rounding. Omit to leave unchanged.
10196
+ proration_rounding: nil,
9465
10197
  # If provided, updates the recurring commit to use the specified rate type when
9466
10198
  # generating future commits.
9467
10199
  rate_type: nil
@@ -9477,6 +10209,10 @@ module MetronomeSDK
9477
10209
  ending_before: T.nilable(Time),
9478
10210
  invoice_amount:
9479
10211
  MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::InvoiceAmount,
10212
+ proration_rounding:
10213
+ T.nilable(
10214
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding
10215
+ ),
9480
10216
  rate_type:
9481
10217
  MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::RateType::OrSymbol
9482
10218
  }
@@ -9553,6 +10289,268 @@ module MetronomeSDK
9553
10289
  end
9554
10290
  end
9555
10291
 
10292
+ class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
10293
+ OrHash =
10294
+ T.type_alias do
10295
+ T.any(
10296
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding,
10297
+ MetronomeSDK::Internal::AnyHash
10298
+ )
10299
+ end
10300
+
10301
+ sig do
10302
+ returns(
10303
+ T.nilable(
10304
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access
10305
+ )
10306
+ )
10307
+ end
10308
+ attr_reader :access
10309
+
10310
+ sig do
10311
+ params(
10312
+ access:
10313
+ T.nilable(
10314
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access::OrHash
10315
+ )
10316
+ ).void
10317
+ end
10318
+ attr_writer :access
10319
+
10320
+ sig do
10321
+ returns(
10322
+ T.nilable(
10323
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice
10324
+ )
10325
+ )
10326
+ end
10327
+ attr_reader :invoice
10328
+
10329
+ sig do
10330
+ params(
10331
+ invoice:
10332
+ T.nilable(
10333
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice::OrHash
10334
+ )
10335
+ ).void
10336
+ end
10337
+ attr_writer :invoice
10338
+
10339
+ # If provided, updates the rounding config on the recurring commit. Set to null to
10340
+ # clear rounding. Omit to leave unchanged.
10341
+ sig do
10342
+ params(
10343
+ access:
10344
+ T.nilable(
10345
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access::OrHash
10346
+ ),
10347
+ invoice:
10348
+ T.nilable(
10349
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice::OrHash
10350
+ )
10351
+ ).returns(T.attached_class)
10352
+ end
10353
+ def self.new(access: nil, invoice: nil)
10354
+ end
10355
+
10356
+ sig do
10357
+ override.returns(
10358
+ {
10359
+ access:
10360
+ T.nilable(
10361
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access
10362
+ ),
10363
+ invoice:
10364
+ T.nilable(
10365
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice
10366
+ )
10367
+ }
10368
+ )
10369
+ end
10370
+ def to_hash
10371
+ end
10372
+
10373
+ class Access < MetronomeSDK::Internal::Type::BaseModel
10374
+ OrHash =
10375
+ T.type_alias do
10376
+ T.any(
10377
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access,
10378
+ MetronomeSDK::Internal::AnyHash
10379
+ )
10380
+ end
10381
+
10382
+ # Number of decimal places to round to. Applied directly to the stored monetary
10383
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
10384
+ # nearest 100 in the stored unit).
10385
+ sig { returns(Float) }
10386
+ attr_accessor :decimal_places
10387
+
10388
+ sig do
10389
+ returns(
10390
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
10391
+ )
10392
+ end
10393
+ attr_accessor :rounding_method
10394
+
10395
+ sig do
10396
+ params(
10397
+ decimal_places: Float,
10398
+ rounding_method:
10399
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
10400
+ ).returns(T.attached_class)
10401
+ end
10402
+ def self.new(
10403
+ # Number of decimal places to round to. Applied directly to the stored monetary
10404
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
10405
+ # nearest 100 in the stored unit).
10406
+ decimal_places:,
10407
+ rounding_method:
10408
+ )
10409
+ end
10410
+
10411
+ sig do
10412
+ override.returns(
10413
+ {
10414
+ decimal_places: Float,
10415
+ rounding_method:
10416
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access::RoundingMethod::OrSymbol
10417
+ }
10418
+ )
10419
+ end
10420
+ def to_hash
10421
+ end
10422
+
10423
+ module RoundingMethod
10424
+ extend MetronomeSDK::Internal::Type::Enum
10425
+
10426
+ TaggedSymbol =
10427
+ T.type_alias do
10428
+ T.all(
10429
+ Symbol,
10430
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access::RoundingMethod
10431
+ )
10432
+ end
10433
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
10434
+
10435
+ HALF_UP =
10436
+ T.let(
10437
+ :HALF_UP,
10438
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
10439
+ )
10440
+ FLOOR =
10441
+ T.let(
10442
+ :FLOOR,
10443
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
10444
+ )
10445
+ CEILING =
10446
+ T.let(
10447
+ :CEILING,
10448
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
10449
+ )
10450
+
10451
+ sig do
10452
+ override.returns(
10453
+ T::Array[
10454
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
10455
+ ]
10456
+ )
10457
+ end
10458
+ def self.values
10459
+ end
10460
+ end
10461
+ end
10462
+
10463
+ class Invoice < MetronomeSDK::Internal::Type::BaseModel
10464
+ OrHash =
10465
+ T.type_alias do
10466
+ T.any(
10467
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice,
10468
+ MetronomeSDK::Internal::AnyHash
10469
+ )
10470
+ end
10471
+
10472
+ # Number of decimal places to round to. Applied directly to the stored monetary
10473
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
10474
+ # nearest 100 in the stored unit).
10475
+ sig { returns(Float) }
10476
+ attr_accessor :decimal_places
10477
+
10478
+ sig do
10479
+ returns(
10480
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
10481
+ )
10482
+ end
10483
+ attr_accessor :rounding_method
10484
+
10485
+ sig do
10486
+ params(
10487
+ decimal_places: Float,
10488
+ rounding_method:
10489
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
10490
+ ).returns(T.attached_class)
10491
+ end
10492
+ def self.new(
10493
+ # Number of decimal places to round to. Applied directly to the stored monetary
10494
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
10495
+ # nearest 100 in the stored unit).
10496
+ decimal_places:,
10497
+ rounding_method:
10498
+ )
10499
+ end
10500
+
10501
+ sig do
10502
+ override.returns(
10503
+ {
10504
+ decimal_places: Float,
10505
+ rounding_method:
10506
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice::RoundingMethod::OrSymbol
10507
+ }
10508
+ )
10509
+ end
10510
+ def to_hash
10511
+ end
10512
+
10513
+ module RoundingMethod
10514
+ extend MetronomeSDK::Internal::Type::Enum
10515
+
10516
+ TaggedSymbol =
10517
+ T.type_alias do
10518
+ T.all(
10519
+ Symbol,
10520
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice::RoundingMethod
10521
+ )
10522
+ end
10523
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
10524
+
10525
+ HALF_UP =
10526
+ T.let(
10527
+ :HALF_UP,
10528
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
10529
+ )
10530
+ FLOOR =
10531
+ T.let(
10532
+ :FLOOR,
10533
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
10534
+ )
10535
+ CEILING =
10536
+ T.let(
10537
+ :CEILING,
10538
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
10539
+ )
10540
+
10541
+ sig do
10542
+ override.returns(
10543
+ T::Array[
10544
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCommit::ProrationRounding::Invoice::RoundingMethod::TaggedSymbol
10545
+ ]
10546
+ )
10547
+ end
10548
+ def self.values
10549
+ end
10550
+ end
10551
+ end
10552
+ end
10553
+
9556
10554
  # If provided, updates the recurring commit to use the specified rate type when
9557
10555
  # generating future commits.
9558
10556
  module RateType
@@ -9622,6 +10620,27 @@ module MetronomeSDK
9622
10620
  sig { returns(T.nilable(Time)) }
9623
10621
  attr_accessor :ending_before
9624
10622
 
10623
+ # If provided, updates the rounding config on the recurring credit. Set to null to
10624
+ # clear rounding. Omit to leave unchanged.
10625
+ sig do
10626
+ returns(
10627
+ T.nilable(
10628
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding
10629
+ )
10630
+ )
10631
+ end
10632
+ attr_reader :proration_rounding
10633
+
10634
+ sig do
10635
+ params(
10636
+ proration_rounding:
10637
+ T.nilable(
10638
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::OrHash
10639
+ )
10640
+ ).void
10641
+ end
10642
+ attr_writer :proration_rounding
10643
+
9625
10644
  # If provided, updates the recurring credit to use the specified rate type when
9626
10645
  # generating future credits.
9627
10646
  sig do
@@ -9647,6 +10666,10 @@ module MetronomeSDK
9647
10666
  access_amount:
9648
10667
  MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::AccessAmount::OrHash,
9649
10668
  ending_before: T.nilable(Time),
10669
+ proration_rounding:
10670
+ T.nilable(
10671
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::OrHash
10672
+ ),
9650
10673
  rate_type:
9651
10674
  MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::RateType::OrSymbol
9652
10675
  ).returns(T.attached_class)
@@ -9655,6 +10678,9 @@ module MetronomeSDK
9655
10678
  recurring_credit_id:,
9656
10679
  access_amount: nil,
9657
10680
  ending_before: nil,
10681
+ # If provided, updates the rounding config on the recurring credit. Set to null to
10682
+ # clear rounding. Omit to leave unchanged.
10683
+ proration_rounding: nil,
9658
10684
  # If provided, updates the recurring credit to use the specified rate type when
9659
10685
  # generating future credits.
9660
10686
  rate_type: nil
@@ -9668,6 +10694,10 @@ module MetronomeSDK
9668
10694
  access_amount:
9669
10695
  MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::AccessAmount,
9670
10696
  ending_before: T.nilable(Time),
10697
+ proration_rounding:
10698
+ T.nilable(
10699
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding
10700
+ ),
9671
10701
  rate_type:
9672
10702
  MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::RateType::OrSymbol
9673
10703
  }
@@ -9710,6 +10740,151 @@ module MetronomeSDK
9710
10740
  end
9711
10741
  end
9712
10742
 
10743
+ class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
10744
+ OrHash =
10745
+ T.type_alias do
10746
+ T.any(
10747
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding,
10748
+ MetronomeSDK::Internal::AnyHash
10749
+ )
10750
+ end
10751
+
10752
+ sig do
10753
+ returns(
10754
+ T.nilable(
10755
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access
10756
+ )
10757
+ )
10758
+ end
10759
+ attr_reader :access
10760
+
10761
+ sig do
10762
+ params(
10763
+ access:
10764
+ T.nilable(
10765
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access::OrHash
10766
+ )
10767
+ ).void
10768
+ end
10769
+ attr_writer :access
10770
+
10771
+ # If provided, updates the rounding config on the recurring credit. Set to null to
10772
+ # clear rounding. Omit to leave unchanged.
10773
+ sig do
10774
+ params(
10775
+ access:
10776
+ T.nilable(
10777
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access::OrHash
10778
+ )
10779
+ ).returns(T.attached_class)
10780
+ end
10781
+ def self.new(access: nil)
10782
+ end
10783
+
10784
+ sig do
10785
+ override.returns(
10786
+ {
10787
+ access:
10788
+ T.nilable(
10789
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access
10790
+ )
10791
+ }
10792
+ )
10793
+ end
10794
+ def to_hash
10795
+ end
10796
+
10797
+ class Access < MetronomeSDK::Internal::Type::BaseModel
10798
+ OrHash =
10799
+ T.type_alias do
10800
+ T.any(
10801
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access,
10802
+ MetronomeSDK::Internal::AnyHash
10803
+ )
10804
+ end
10805
+
10806
+ # Number of decimal places to round to. Applied directly to the stored monetary
10807
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
10808
+ # nearest 100 in the stored unit).
10809
+ sig { returns(Float) }
10810
+ attr_accessor :decimal_places
10811
+
10812
+ sig do
10813
+ returns(
10814
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
10815
+ )
10816
+ end
10817
+ attr_accessor :rounding_method
10818
+
10819
+ sig do
10820
+ params(
10821
+ decimal_places: Float,
10822
+ rounding_method:
10823
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
10824
+ ).returns(T.attached_class)
10825
+ end
10826
+ def self.new(
10827
+ # Number of decimal places to round to. Applied directly to the stored monetary
10828
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
10829
+ # nearest 100 in the stored unit).
10830
+ decimal_places:,
10831
+ rounding_method:
10832
+ )
10833
+ end
10834
+
10835
+ sig do
10836
+ override.returns(
10837
+ {
10838
+ decimal_places: Float,
10839
+ rounding_method:
10840
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access::RoundingMethod::OrSymbol
10841
+ }
10842
+ )
10843
+ end
10844
+ def to_hash
10845
+ end
10846
+
10847
+ module RoundingMethod
10848
+ extend MetronomeSDK::Internal::Type::Enum
10849
+
10850
+ TaggedSymbol =
10851
+ T.type_alias do
10852
+ T.all(
10853
+ Symbol,
10854
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access::RoundingMethod
10855
+ )
10856
+ end
10857
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
10858
+
10859
+ HALF_UP =
10860
+ T.let(
10861
+ :HALF_UP,
10862
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
10863
+ )
10864
+ FLOOR =
10865
+ T.let(
10866
+ :FLOOR,
10867
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
10868
+ )
10869
+ CEILING =
10870
+ T.let(
10871
+ :CEILING,
10872
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
10873
+ )
10874
+
10875
+ sig do
10876
+ override.returns(
10877
+ T::Array[
10878
+ MetronomeSDK::V2::ContractEditParams::UpdateRecurringCredit::ProrationRounding::Access::RoundingMethod::TaggedSymbol
10879
+ ]
10880
+ )
10881
+ end
10882
+ def self.values
10883
+ end
10884
+ end
10885
+ end
10886
+ end
10887
+
9713
10888
  # If provided, updates the recurring credit to use the specified rate type when
9714
10889
  # generating future credits.
9715
10890
  module RateType
@@ -10304,6 +11479,25 @@ module MetronomeSDK
10304
11479
  sig { returns(T.nilable(Time)) }
10305
11480
  attr_accessor :ending_before
10306
11481
 
11482
+ sig do
11483
+ returns(
11484
+ T.nilable(
11485
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding
11486
+ )
11487
+ )
11488
+ end
11489
+ attr_reader :proration_rounding
11490
+
11491
+ sig do
11492
+ params(
11493
+ proration_rounding:
11494
+ T.nilable(
11495
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding::OrHash
11496
+ )
11497
+ ).void
11498
+ end
11499
+ attr_writer :proration_rounding
11500
+
10307
11501
  # Update the subscription's quantity management mode from QUANTITY_ONLY to
10308
11502
  # SEAT_BASED with the provided seat_group_key.
10309
11503
  sig do
@@ -10368,6 +11562,10 @@ module MetronomeSDK
10368
11562
  params(
10369
11563
  subscription_id: String,
10370
11564
  ending_before: T.nilable(Time),
11565
+ proration_rounding:
11566
+ T.nilable(
11567
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding::OrHash
11568
+ ),
10371
11569
  quantity_management_mode_update:
10372
11570
  MetronomeSDK::V2::ContractEditParams::UpdateSubscription::QuantityManagementModeUpdate::OrHash,
10373
11571
  quantity_updates:
@@ -10381,6 +11579,7 @@ module MetronomeSDK
10381
11579
  def self.new(
10382
11580
  subscription_id:,
10383
11581
  ending_before: nil,
11582
+ proration_rounding: nil,
10384
11583
  # Update the subscription's quantity management mode from QUANTITY_ONLY to
10385
11584
  # SEAT_BASED with the provided seat_group_key.
10386
11585
  quantity_management_mode_update: nil,
@@ -10397,6 +11596,10 @@ module MetronomeSDK
10397
11596
  {
10398
11597
  subscription_id: String,
10399
11598
  ending_before: T.nilable(Time),
11599
+ proration_rounding:
11600
+ T.nilable(
11601
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding
11602
+ ),
10400
11603
  quantity_management_mode_update:
10401
11604
  MetronomeSDK::V2::ContractEditParams::UpdateSubscription::QuantityManagementModeUpdate,
10402
11605
  quantity_updates:
@@ -10411,6 +11614,96 @@ module MetronomeSDK
10411
11614
  def to_hash
10412
11615
  end
10413
11616
 
11617
+ class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
11618
+ OrHash =
11619
+ T.type_alias do
11620
+ T.any(
11621
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding,
11622
+ MetronomeSDK::Internal::AnyHash
11623
+ )
11624
+ end
11625
+
11626
+ # Number of decimal places to round to. Applied directly to the stored monetary
11627
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
11628
+ # nearest 100 in the stored unit).
11629
+ sig { returns(Float) }
11630
+ attr_accessor :decimal_places
11631
+
11632
+ sig do
11633
+ returns(
11634
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding::RoundingMethod::OrSymbol
11635
+ )
11636
+ end
11637
+ attr_accessor :rounding_method
11638
+
11639
+ sig do
11640
+ params(
11641
+ decimal_places: Float,
11642
+ rounding_method:
11643
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding::RoundingMethod::OrSymbol
11644
+ ).returns(T.attached_class)
11645
+ end
11646
+ def self.new(
11647
+ # Number of decimal places to round to. Applied directly to the stored monetary
11648
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
11649
+ # nearest 100 in the stored unit).
11650
+ decimal_places:,
11651
+ rounding_method:
11652
+ )
11653
+ end
11654
+
11655
+ sig do
11656
+ override.returns(
11657
+ {
11658
+ decimal_places: Float,
11659
+ rounding_method:
11660
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding::RoundingMethod::OrSymbol
11661
+ }
11662
+ )
11663
+ end
11664
+ def to_hash
11665
+ end
11666
+
11667
+ module RoundingMethod
11668
+ extend MetronomeSDK::Internal::Type::Enum
11669
+
11670
+ TaggedSymbol =
11671
+ T.type_alias do
11672
+ T.all(
11673
+ Symbol,
11674
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding::RoundingMethod
11675
+ )
11676
+ end
11677
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
11678
+
11679
+ HALF_UP =
11680
+ T.let(
11681
+ :HALF_UP,
11682
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding::RoundingMethod::TaggedSymbol
11683
+ )
11684
+ FLOOR =
11685
+ T.let(
11686
+ :FLOOR,
11687
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding::RoundingMethod::TaggedSymbol
11688
+ )
11689
+ CEILING =
11690
+ T.let(
11691
+ :CEILING,
11692
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding::RoundingMethod::TaggedSymbol
11693
+ )
11694
+
11695
+ sig do
11696
+ override.returns(
11697
+ T::Array[
11698
+ MetronomeSDK::V2::ContractEditParams::UpdateSubscription::ProrationRounding::RoundingMethod::TaggedSymbol
11699
+ ]
11700
+ )
11701
+ end
11702
+ def self.values
11703
+ end
11704
+ end
11705
+ end
11706
+
10414
11707
  class QuantityManagementModeUpdate < MetronomeSDK::Internal::Type::BaseModel
10415
11708
  OrHash =
10416
11709
  T.type_alias do