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
@@ -578,6 +578,14 @@ module MetronomeSDK
578
578
  optional :proration,
579
579
  enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration }
580
580
 
581
+ # @!attribute proration_rounding
582
+ # Rounding configuration for prorated recurring commit amounts.
583
+ #
584
+ # @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding, nil]
585
+ optional :proration_rounding,
586
+ -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding },
587
+ nil?: true
588
+
581
589
  # @!attribute recurrence_frequency
582
590
  # The frequency at which the recurring commits will be created. If not provided: -
583
591
  # The commits will be created on the usage invoice frequency. If provided: - The
@@ -611,7 +619,7 @@ module MetronomeSDK
611
619
  # @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
612
620
  optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
613
621
 
614
- # @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, invoice_amount: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
622
+ # @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, invoice_amount: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, proration_rounding: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
615
623
  # Some parameter documentations has been truncated, see
616
624
  # {MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit}
617
625
  # for more details.
@@ -650,7 +658,9 @@ module MetronomeSDK
650
658
  #
651
659
  # @param proration [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration] Determines whether the first and last commit will be prorated. If not provided,
652
660
  #
653
- # @param recurrence_frequency [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided:
661
+ # @param proration_rounding [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding, nil] Rounding configuration for prorated recurring commit amounts.
662
+ #
663
+ # @param recurrence_frequency [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided: -
654
664
  #
655
665
  # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
656
666
  #
@@ -795,6 +805,105 @@ module MetronomeSDK
795
805
  # @return [Array<Symbol>]
796
806
  end
797
807
 
808
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit#proration_rounding
809
+ class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
810
+ # @!attribute access
811
+ #
812
+ # @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access, nil]
813
+ optional :access,
814
+ -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access }
815
+
816
+ # @!attribute invoice
817
+ #
818
+ # @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice, nil]
819
+ optional :invoice,
820
+ -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice }
821
+
822
+ # @!method initialize(access: nil, invoice: nil)
823
+ # Rounding configuration for prorated recurring commit amounts.
824
+ #
825
+ # @param access [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access]
826
+ # @param invoice [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice]
827
+
828
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding#access
829
+ class Access < MetronomeSDK::Internal::Type::BaseModel
830
+ # @!attribute decimal_places
831
+ # Number of decimal places to round to. Applied directly to the stored monetary
832
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
833
+ # nearest 100 in the stored unit. For USD, this means rounding to the nearest
834
+ # dollar).
835
+ #
836
+ # @return [Float]
837
+ required :decimal_places, Float
838
+
839
+ # @!attribute rounding_method
840
+ #
841
+ # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access::RoundingMethod]
842
+ required :rounding_method,
843
+ enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access::RoundingMethod }
844
+
845
+ # @!method initialize(decimal_places:, rounding_method:)
846
+ # Some parameter documentations has been truncated, see
847
+ # {MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access}
848
+ # for more details.
849
+ #
850
+ # @param decimal_places [Float] Number of decimal places to round to. Applied directly to the stored monetary re
851
+ #
852
+ # @param rounding_method [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access::RoundingMethod]
853
+
854
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Access#rounding_method
855
+ module RoundingMethod
856
+ extend MetronomeSDK::Internal::Type::Enum
857
+
858
+ HALF_UP = :HALF_UP
859
+ FLOOR = :FLOOR
860
+ CEILING = :CEILING
861
+
862
+ # @!method self.values
863
+ # @return [Array<Symbol>]
864
+ end
865
+ end
866
+
867
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding#invoice
868
+ class Invoice < MetronomeSDK::Internal::Type::BaseModel
869
+ # @!attribute decimal_places
870
+ # Number of decimal places to round to. Applied directly to the stored monetary
871
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
872
+ # nearest 100 in the stored unit. For USD, this means rounding to the nearest
873
+ # dollar).
874
+ #
875
+ # @return [Float]
876
+ required :decimal_places, Float
877
+
878
+ # @!attribute rounding_method
879
+ #
880
+ # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice::RoundingMethod]
881
+ required :rounding_method,
882
+ enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice::RoundingMethod }
883
+
884
+ # @!method initialize(decimal_places:, rounding_method:)
885
+ # Some parameter documentations has been truncated, see
886
+ # {MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice}
887
+ # for more details.
888
+ #
889
+ # @param decimal_places [Float] Number of decimal places to round to. Applied directly to the stored monetary re
890
+ #
891
+ # @param rounding_method [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice::RoundingMethod]
892
+
893
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::ProrationRounding::Invoice#rounding_method
894
+ module RoundingMethod
895
+ extend MetronomeSDK::Internal::Type::Enum
896
+
897
+ HALF_UP = :HALF_UP
898
+ FLOOR = :FLOOR
899
+ CEILING = :CEILING
900
+
901
+ # @!method self.values
902
+ # @return [Array<Symbol>]
903
+ end
904
+ end
905
+ end
906
+
798
907
  # The frequency at which the recurring commits will be created. If not provided: -
799
908
  # The commits will be created on the usage invoice frequency. If provided: - The
800
909
  # period defined in the duration will correspond to this frequency. - Commits will
@@ -809,6 +918,7 @@ module MetronomeSDK
809
918
  QUARTERLY = :QUARTERLY
810
919
  ANNUAL = :ANNUAL
811
920
  WEEKLY = :WEEKLY
921
+ DAILY = :DAILY
812
922
 
813
923
  # @!method self.values
814
924
  # @return [Array<Symbol>]
@@ -916,6 +1026,14 @@ module MetronomeSDK
916
1026
  optional :proration,
917
1027
  enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration }
918
1028
 
1029
+ # @!attribute proration_rounding
1030
+ # Rounding configuration for prorated recurring credit amounts.
1031
+ #
1032
+ # @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding, nil]
1033
+ optional :proration_rounding,
1034
+ -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding },
1035
+ nil?: true
1036
+
919
1037
  # @!attribute recurrence_frequency
920
1038
  # The frequency at which the recurring commits will be created. If not provided: -
921
1039
  # The commits will be created on the usage invoice frequency. If provided: - The
@@ -949,7 +1067,7 @@ module MetronomeSDK
949
1067
  # @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
950
1068
  optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
951
1069
 
952
- # @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
1070
+ # @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at:, applicable_product_ids: nil, applicable_product_tags: nil, contract: nil, description: nil, ending_before: nil, hierarchy_configuration: nil, name: nil, netsuite_sales_order_id: nil, proration: nil, proration_rounding: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
953
1071
  # Some parameter documentations has been truncated, see
954
1072
  # {MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit}
955
1073
  # for more details.
@@ -986,7 +1104,9 @@ module MetronomeSDK
986
1104
  #
987
1105
  # @param proration [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration] Determines whether the first and last commit will be prorated. If not provided,
988
1106
  #
989
- # @param recurrence_frequency [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided:
1107
+ # @param proration_rounding [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding, nil] Rounding configuration for prorated recurring credit amounts.
1108
+ #
1109
+ # @param recurrence_frequency [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided: -
990
1110
  #
991
1111
  # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
992
1112
  #
@@ -1106,6 +1226,59 @@ module MetronomeSDK
1106
1226
  # @return [Array<Symbol>]
1107
1227
  end
1108
1228
 
1229
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit#proration_rounding
1230
+ class ProrationRounding < MetronomeSDK::Internal::Type::BaseModel
1231
+ # @!attribute access
1232
+ #
1233
+ # @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access, nil]
1234
+ optional :access,
1235
+ -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access }
1236
+
1237
+ # @!method initialize(access: nil)
1238
+ # Rounding configuration for prorated recurring credit amounts.
1239
+ #
1240
+ # @param access [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access]
1241
+
1242
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding#access
1243
+ class Access < MetronomeSDK::Internal::Type::BaseModel
1244
+ # @!attribute decimal_places
1245
+ # Number of decimal places to round to. Applied directly to the stored monetary
1246
+ # representation. Negative values round to powers of 10 (e.g., -2 rounds to
1247
+ # nearest 100 in the stored unit. For USD, this means rounding to the nearest
1248
+ # dollar).
1249
+ #
1250
+ # @return [Float]
1251
+ required :decimal_places, Float
1252
+
1253
+ # @!attribute rounding_method
1254
+ #
1255
+ # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access::RoundingMethod]
1256
+ required :rounding_method,
1257
+ enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access::RoundingMethod }
1258
+
1259
+ # @!method initialize(decimal_places:, rounding_method:)
1260
+ # Some parameter documentations has been truncated, see
1261
+ # {MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access}
1262
+ # for more details.
1263
+ #
1264
+ # @param decimal_places [Float] Number of decimal places to round to. Applied directly to the stored monetary re
1265
+ #
1266
+ # @param rounding_method [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access::RoundingMethod]
1267
+
1268
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::ProrationRounding::Access#rounding_method
1269
+ module RoundingMethod
1270
+ extend MetronomeSDK::Internal::Type::Enum
1271
+
1272
+ HALF_UP = :HALF_UP
1273
+ FLOOR = :FLOOR
1274
+ CEILING = :CEILING
1275
+
1276
+ # @!method self.values
1277
+ # @return [Array<Symbol>]
1278
+ end
1279
+ end
1280
+ end
1281
+
1109
1282
  # The frequency at which the recurring commits will be created. If not provided: -
1110
1283
  # The commits will be created on the usage invoice frequency. If provided: - The
1111
1284
  # period defined in the duration will correspond to this frequency. - Commits will
@@ -1120,6 +1293,7 @@ module MetronomeSDK
1120
1293
  QUARTERLY = :QUARTERLY
1121
1294
  ANNUAL = :ANNUAL
1122
1295
  WEEKLY = :WEEKLY
1296
+ DAILY = :DAILY
1123
1297
 
1124
1298
  # @!method self.values
1125
1299
  # @return [Array<Symbol>]
@@ -0,0 +1,88 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MetronomeSDK
4
+ module Models
5
+ module V1
6
+ # @see MetronomeSDK::Resources::V1::Contracts#get_subscription_seats_history
7
+ class ContractGetSubscriptionSeatsHistoryParams < MetronomeSDK::Internal::Type::BaseModel
8
+ extend MetronomeSDK::Internal::Type::RequestParameters::Converter
9
+ include MetronomeSDK::Internal::Type::RequestParameters
10
+
11
+ # @!attribute contract_id
12
+ #
13
+ # @return [String]
14
+ required :contract_id, String
15
+
16
+ # @!attribute customer_id
17
+ #
18
+ # @return [String]
19
+ required :customer_id, String
20
+
21
+ # @!attribute subscription_id
22
+ #
23
+ # @return [String]
24
+ required :subscription_id, String
25
+
26
+ # @!attribute covering_date
27
+ # Get the seats history segment for the covering date. Cannot be used with
28
+ # `starting_at` or `ending_before`.
29
+ #
30
+ # @return [Time, nil]
31
+ optional :covering_date, Time, nil?: true
32
+
33
+ # @!attribute cursor
34
+ # Cursor for pagination. Use the value from the `next_page` field of the previous
35
+ # response to retrieve the next page of results.
36
+ #
37
+ # @return [String, nil]
38
+ optional :cursor, String, nil?: true
39
+
40
+ # @!attribute ending_before
41
+ # Include seats history segments that are active at or before this timestamp. Use
42
+ # with `starting_at` to get a specific time range. If not set, there's no upper
43
+ # bound.
44
+ #
45
+ # @return [Time, nil]
46
+ optional :ending_before, Time, nil?: true
47
+
48
+ # @!attribute limit
49
+ # Maximum number of seat schedule entries to return. Defaults to 10. Required
50
+ # range: 1 <= x <= 10.
51
+ #
52
+ # @return [Integer, nil]
53
+ optional :limit, Integer, nil?: true
54
+
55
+ # @!attribute starting_at
56
+ # Include seats history segments that are active at or after this timestamp. Use
57
+ # with `ending_before` to get a specific time range. If not set, there's no lower
58
+ # bound.
59
+ #
60
+ # @return [Time, nil]
61
+ optional :starting_at, Time, nil?: true
62
+
63
+ # @!method initialize(contract_id:, customer_id:, subscription_id:, covering_date: nil, cursor: nil, ending_before: nil, limit: nil, starting_at: nil, request_options: {})
64
+ # Some parameter documentations has been truncated, see
65
+ # {MetronomeSDK::Models::V1::ContractGetSubscriptionSeatsHistoryParams} for more
66
+ # details.
67
+ #
68
+ # @param contract_id [String]
69
+ #
70
+ # @param customer_id [String]
71
+ #
72
+ # @param subscription_id [String]
73
+ #
74
+ # @param covering_date [Time, nil] Get the seats history segment for the covering date. Cannot be used with `starti
75
+ #
76
+ # @param cursor [String, nil] Cursor for pagination. Use the value from the `next_page` field of the previous
77
+ #
78
+ # @param ending_before [Time, nil] Include seats history segments that are active at or before this timestamp. Use
79
+ #
80
+ # @param limit [Integer, nil] Maximum number of seat schedule entries to return. Defaults to 10. Required rang
81
+ #
82
+ # @param starting_at [Time, nil] Include seats history segments that are active at or after this timestamp. Use w
83
+ #
84
+ # @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
85
+ end
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MetronomeSDK
4
+ module Models
5
+ module V1
6
+ # @see MetronomeSDK::Resources::V1::Contracts#get_subscription_seats_history
7
+ class ContractGetSubscriptionSeatsHistoryResponse < MetronomeSDK::Internal::Type::BaseModel
8
+ # @!attribute data
9
+ #
10
+ # @return [Array<MetronomeSDK::Models::V1::ContractGetSubscriptionSeatsHistoryResponse::Data>]
11
+ required :data,
12
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::ContractGetSubscriptionSeatsHistoryResponse::Data] }
13
+
14
+ # @!attribute next_page
15
+ # Cursor for the next page of results
16
+ #
17
+ # @return [String, nil]
18
+ required :next_page, String, nil?: true
19
+
20
+ # @!method initialize(data:, next_page:)
21
+ # @param data [Array<MetronomeSDK::Models::V1::ContractGetSubscriptionSeatsHistoryResponse::Data>]
22
+ #
23
+ # @param next_page [String, nil] Cursor for the next page of results
24
+
25
+ class Data < MetronomeSDK::Internal::Type::BaseModel
26
+ # @!attribute assigned_seat_ids
27
+ # Array of seat IDs that are assigned in this period
28
+ #
29
+ # @return [Array<String>]
30
+ required :assigned_seat_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
31
+
32
+ # @!attribute ending_before
33
+ # The end time of this seat schedule period (null if ongoing)
34
+ #
35
+ # @return [Time, nil]
36
+ required :ending_before, Time, nil?: true
37
+
38
+ # @!attribute starting_at
39
+ # The start time of this seat schedule period
40
+ #
41
+ # @return [Time]
42
+ required :starting_at, Time
43
+
44
+ # @!attribute total_quantity
45
+ # Total number of assigned and unassigned seats in this period
46
+ #
47
+ # @return [Integer]
48
+ required :total_quantity, Integer
49
+
50
+ # @!method initialize(assigned_seat_ids:, ending_before:, starting_at:, total_quantity:)
51
+ # @param assigned_seat_ids [Array<String>] Array of seat IDs that are assigned in this period
52
+ #
53
+ # @param ending_before [Time, nil] The end time of this seat schedule period (null if ongoing)
54
+ #
55
+ # @param starting_at [Time] The start time of this seat schedule period
56
+ #
57
+ # @param total_quantity [Integer] Total number of assigned and unassigned seats in this period
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -71,6 +71,13 @@ module MetronomeSDK
71
71
  # @return [Array<String>, nil]
72
72
  optional :seat_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
73
73
 
74
+ # @!attribute skip_missing_seat_ids
75
+ # When true, any seat_ids not found in contract subscriptions will be silently
76
+ # omitted from the response instead of returning a 400 error.
77
+ #
78
+ # @return [Boolean, nil]
79
+ optional :skip_missing_seat_ids, MetronomeSDK::Internal::Type::Boolean
80
+
74
81
  # @!attribute starting_at
75
82
  # Include only commits or credits with access effective on or after this date
76
83
  # (cannot be used with covering_date).
@@ -86,7 +93,7 @@ module MetronomeSDK
86
93
  # @return [Array<String>, nil]
87
94
  optional :subscription_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
88
95
 
89
- # @!method initialize(contract_id:, customer_id:, covering_date: nil, cursor: nil, effective_before: nil, include_credits_and_commits: nil, include_ledgers: nil, limit: nil, seat_ids: nil, starting_at: nil, subscription_ids: nil, request_options: {})
96
+ # @!method initialize(contract_id:, customer_id:, covering_date: nil, cursor: nil, effective_before: nil, include_credits_and_commits: nil, include_ledgers: nil, limit: nil, seat_ids: nil, skip_missing_seat_ids: nil, starting_at: nil, subscription_ids: nil, request_options: {})
90
97
  # Some parameter documentations has been truncated, see
91
98
  # {MetronomeSDK::Models::V1::ContractListSeatBalancesParams} for more details.
92
99
  #
@@ -108,6 +115,8 @@ module MetronomeSDK
108
115
  #
109
116
  # @param seat_ids [Array<String>] Optional filter to only include specific seats.
110
117
  #
118
+ # @param skip_missing_seat_ids [Boolean] When true, any seat_ids not found in contract subscriptions will be silently omi
119
+ #
111
120
  # @param starting_at [Time] Include only commits or credits with access effective on or after this date (can
112
121
  #
113
122
  # @param subscription_ids [Array<String>] Optional filter to only include seats from specific subscriptions. If subscripti
@@ -21,6 +21,14 @@ module MetronomeSDK
21
21
  # @return [String]
22
22
  required :customer_id, String
23
23
 
24
+ # @!attribute alert_specifiers
25
+ # Can be used with only `low_remaining_contract_credit_and_commit_balance_reached`
26
+ # notifications. Used to filter the alert by the custom field key-value pair.
27
+ #
28
+ # @return [Array<MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::AlertSpecifier>, nil]
29
+ optional :alert_specifiers,
30
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::AlertRetrieveParams::AlertSpecifier] }
31
+
24
32
  # @!attribute group_values
25
33
  # Only present for `spend_threshold_reached` notifications. Retrieve the
26
34
  # notification for a specific group key-value pair.
@@ -44,7 +52,7 @@ module MetronomeSDK
44
52
  # @return [MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::SeatFilter, nil]
45
53
  optional :seat_filter, -> { MetronomeSDK::V1::Customers::AlertRetrieveParams::SeatFilter }
46
54
 
47
- # @!method initialize(alert_id:, customer_id:, group_values: nil, plans_or_contracts: nil, seat_filter: nil, request_options: {})
55
+ # @!method initialize(alert_id:, customer_id:, alert_specifiers: nil, group_values: nil, plans_or_contracts: nil, seat_filter: nil, request_options: {})
48
56
  # Some parameter documentations has been truncated, see
49
57
  # {MetronomeSDK::Models::V1::Customers::AlertRetrieveParams} for more details.
50
58
  #
@@ -52,6 +60,8 @@ module MetronomeSDK
52
60
  #
53
61
  # @param customer_id [String] The Metronome ID of the customer
54
62
  #
63
+ # @param alert_specifiers [Array<MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::AlertSpecifier>] Can be used with only `low_remaining_contract_credit_and_commit_balance_reached`
64
+ #
55
65
  # @param group_values [Array<MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::GroupValue>] Only present for `spend_threshold_reached` notifications. Retrieve the notificat
56
66
  #
57
67
  # @param plans_or_contracts [Symbol, MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::PlansOrContracts] When parallel threshold notifications are enabled during migration, this flag de
@@ -60,6 +70,122 @@ module MetronomeSDK
60
70
  #
61
71
  # @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
62
72
 
73
+ class AlertSpecifier < MetronomeSDK::Internal::Type::BaseModel
74
+ # @!attribute custom_field_filters
75
+ # A list of custom field filters for notification types that support advanced
76
+ # filtering
77
+ #
78
+ # @return [Array<MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::AlertSpecifier::CustomFieldFilter>]
79
+ required :custom_field_filters,
80
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::AlertRetrieveParams::AlertSpecifier::CustomFieldFilter] }
81
+
82
+ # @!attribute exclude
83
+ # If provided, the specifier will not apply to balances that matches the inclusion
84
+ # criteria and any of the excluding values.
85
+ #
86
+ # @return [Array<MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::AlertSpecifier::Exclude>, nil]
87
+ optional :exclude,
88
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::AlertRetrieveParams::AlertSpecifier::Exclude] }
89
+
90
+ # @!method initialize(custom_field_filters:, exclude: nil)
91
+ # Some parameter documentations has been truncated, see
92
+ # {MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::AlertSpecifier} for
93
+ # more details.
94
+ #
95
+ # @param custom_field_filters [Array<MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::AlertSpecifier::CustomFieldFilter>] A list of custom field filters for notification types that support advanced filt
96
+ #
97
+ # @param exclude [Array<MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::AlertSpecifier::Exclude>] If provided, the specifier will not apply to balances that matches the inclusion
98
+
99
+ class CustomFieldFilter < MetronomeSDK::Internal::Type::BaseModel
100
+ # @!attribute entity
101
+ #
102
+ # @return [Symbol, MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::AlertSpecifier::CustomFieldFilter::Entity]
103
+ required :entity,
104
+ enum: -> { MetronomeSDK::V1::Customers::AlertRetrieveParams::AlertSpecifier::CustomFieldFilter::Entity }
105
+
106
+ # @!attribute key
107
+ #
108
+ # @return [String]
109
+ required :key, String
110
+
111
+ # @!attribute value
112
+ #
113
+ # @return [String]
114
+ required :value, String
115
+
116
+ # @!method initialize(entity:, key:, value:)
117
+ # @param entity [Symbol, MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::AlertSpecifier::CustomFieldFilter::Entity]
118
+ # @param key [String]
119
+ # @param value [String]
120
+
121
+ # @see MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::AlertSpecifier::CustomFieldFilter#entity
122
+ module Entity
123
+ extend MetronomeSDK::Internal::Type::Enum
124
+
125
+ CONTRACT = :Contract
126
+ COMMIT = :Commit
127
+ CONTRACT_CREDIT = :ContractCredit
128
+ CONTRACT_CREDIT_OR_COMMIT = :ContractCreditOrCommit
129
+
130
+ # @!method self.values
131
+ # @return [Array<Symbol>]
132
+ end
133
+ end
134
+
135
+ class Exclude < MetronomeSDK::Internal::Type::BaseModel
136
+ # @!attribute custom_field_filters
137
+ # A list of custom field filters for notification types that support advanced
138
+ # filtering
139
+ #
140
+ # @return [Array<MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::AlertSpecifier::Exclude::CustomFieldFilter>, nil]
141
+ optional :custom_field_filters,
142
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::AlertRetrieveParams::AlertSpecifier::Exclude::CustomFieldFilter] }
143
+
144
+ # @!method initialize(custom_field_filters: nil)
145
+ # Some parameter documentations has been truncated, see
146
+ # {MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::AlertSpecifier::Exclude}
147
+ # for more details.
148
+ #
149
+ # @param custom_field_filters [Array<MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::AlertSpecifier::Exclude::CustomFieldFilter>] A list of custom field filters for notification types that support advanced filt
150
+
151
+ class CustomFieldFilter < MetronomeSDK::Internal::Type::BaseModel
152
+ # @!attribute entity
153
+ #
154
+ # @return [Symbol, MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::AlertSpecifier::Exclude::CustomFieldFilter::Entity]
155
+ required :entity,
156
+ enum: -> { MetronomeSDK::V1::Customers::AlertRetrieveParams::AlertSpecifier::Exclude::CustomFieldFilter::Entity }
157
+
158
+ # @!attribute key
159
+ #
160
+ # @return [String]
161
+ required :key, String
162
+
163
+ # @!attribute value
164
+ #
165
+ # @return [String]
166
+ required :value, String
167
+
168
+ # @!method initialize(entity:, key:, value:)
169
+ # @param entity [Symbol, MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::AlertSpecifier::Exclude::CustomFieldFilter::Entity]
170
+ # @param key [String]
171
+ # @param value [String]
172
+
173
+ # @see MetronomeSDK::Models::V1::Customers::AlertRetrieveParams::AlertSpecifier::Exclude::CustomFieldFilter#entity
174
+ module Entity
175
+ extend MetronomeSDK::Internal::Type::Enum
176
+
177
+ CONTRACT = :Contract
178
+ COMMIT = :Commit
179
+ CONTRACT_CREDIT = :ContractCredit
180
+ CONTRACT_CREDIT_OR_COMMIT = :ContractCreditOrCommit
181
+
182
+ # @!method self.values
183
+ # @return [Array<Symbol>]
184
+ end
185
+ end
186
+ end
187
+ end
188
+
63
189
  class GroupValue < MetronomeSDK::Internal::Type::BaseModel
64
190
  # @!attribute key
65
191
  #