metronome-sdk 3.6.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 (141) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +54 -0
  3. data/README.md +1 -1
  4. data/lib/metronome_sdk/internal/transport/base_client.rb +4 -1
  5. data/lib/metronome_sdk/internal/type/enum.rb +0 -25
  6. data/lib/metronome_sdk/models/commit.rb +36 -1
  7. data/lib/metronome_sdk/models/contract.rb +140 -1
  8. data/lib/metronome_sdk/models/contract_v2.rb +457 -8
  9. data/lib/metronome_sdk/models/contract_without_amendments.rb +320 -5
  10. data/lib/metronome_sdk/models/credit.rb +10 -1
  11. data/lib/metronome_sdk/models/override.rb +7 -1
  12. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration.rb +113 -2
  13. data/lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb +105 -2
  14. data/lib/metronome_sdk/models/spend_threshold_configuration.rb +33 -1
  15. data/lib/metronome_sdk/models/spend_threshold_configuration_v2.rb +33 -1
  16. data/lib/metronome_sdk/models/subscription.rb +90 -2
  17. data/lib/metronome_sdk/models/v1/alert_create_params.rb +127 -1
  18. data/lib/metronome_sdk/models/v1/contract_amend_params.rb +46 -5
  19. data/lib/metronome_sdk/models/v1/contract_create_params.rb +436 -12
  20. data/lib/metronome_sdk/models/v1/contract_create_response.rb +1308 -3
  21. data/lib/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rb +88 -0
  22. data/lib/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rb +62 -0
  23. data/lib/metronome_sdk/models/v1/contract_list_seat_balances_params.rb +10 -1
  24. data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +127 -1
  25. data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +130 -3
  26. data/lib/metronome_sdk/models/v1/customers/invoice_list_params.rb +10 -1
  27. data/lib/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rb +2 -0
  28. data/lib/metronome_sdk/models/v1/package_create_params.rb +394 -11
  29. data/lib/metronome_sdk/models/v1/package_list_response.rb +374 -8
  30. data/lib/metronome_sdk/models/v1/package_retrieve_response.rb +378 -8
  31. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +817 -13
  32. data/lib/metronome_sdk/models/v2/contract_edit_response.rb +4310 -3
  33. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +600 -10
  34. data/lib/metronome_sdk/resources/v1/alerts.rb +3 -1
  35. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +4 -0
  36. data/lib/metronome_sdk/resources/v1/contracts.rb +71 -2
  37. data/lib/metronome_sdk/resources/v1/customers/alerts.rb +4 -2
  38. data/lib/metronome_sdk/resources/v1/customers/invoices.rb +3 -1
  39. data/lib/metronome_sdk/resources/v1/dashboards.rb +7 -2
  40. data/lib/metronome_sdk/resources/v1/packages.rb +6 -5
  41. data/lib/metronome_sdk/resources/v1.rb +0 -4
  42. data/lib/metronome_sdk/resources/v2/contracts.rb +5 -1
  43. data/lib/metronome_sdk/version.rb +1 -1
  44. data/lib/metronome_sdk.rb +2 -8
  45. data/rbi/metronome_sdk/models/commit.rbi +61 -0
  46. data/rbi/metronome_sdk/models/contract.rbi +354 -0
  47. data/rbi/metronome_sdk/models/contract_v2.rbi +1132 -11
  48. data/rbi/metronome_sdk/models/contract_without_amendments.rbi +831 -0
  49. data/rbi/metronome_sdk/models/credit.rbi +13 -0
  50. data/rbi/metronome_sdk/models/override.rbi +9 -0
  51. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration.rbi +299 -6
  52. data/rbi/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbi +287 -6
  53. data/rbi/metronome_sdk/models/spend_threshold_configuration.rbi +78 -3
  54. data/rbi/metronome_sdk/models/spend_threshold_configuration_v2.rbi +78 -3
  55. data/rbi/metronome_sdk/models/subscription.rbi +212 -3
  56. data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +373 -0
  57. data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +81 -6
  58. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +1095 -17
  59. data/rbi/metronome_sdk/models/v1/contract_create_response.rbi +2911 -4
  60. data/rbi/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rbi +112 -0
  61. data/rbi/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rbi +119 -0
  62. data/rbi/metronome_sdk/models/v1/contract_list_seat_balances_params.rbi +13 -0
  63. data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +360 -0
  64. data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +379 -2
  65. data/rbi/metronome_sdk/models/v1/customers/invoice_list_params.rbi +13 -0
  66. data/rbi/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbi +10 -0
  67. data/rbi/metronome_sdk/models/v1/package_create_params.rbi +1049 -42
  68. data/rbi/metronome_sdk/models/v1/package_list_response.rbi +1051 -54
  69. data/rbi/metronome_sdk/models/v1/package_retrieve_response.rbi +1051 -54
  70. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +2130 -114
  71. data/rbi/metronome_sdk/models/v2/contract_edit_response.rbi +9749 -4
  72. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +1567 -82
  73. data/rbi/metronome_sdk/resources/v1/alerts.rbi +8 -0
  74. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +4 -0
  75. data/rbi/metronome_sdk/resources/v1/contracts.rbi +77 -0
  76. data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +8 -1
  77. data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +4 -0
  78. data/rbi/metronome_sdk/resources/v1/dashboards.rbi +7 -2
  79. data/rbi/metronome_sdk/resources/v1/packages.rbi +8 -4
  80. data/rbi/metronome_sdk/resources/v1.rbi +0 -3
  81. data/rbi/metronome_sdk/resources/v2/contracts.rbi +10 -0
  82. data/sig/metronome_sdk/models/commit.rbs +26 -0
  83. data/sig/metronome_sdk/models/contract.rbs +151 -0
  84. data/sig/metronome_sdk/models/contract_v2.rbs +448 -5
  85. data/sig/metronome_sdk/models/contract_without_amendments.rbs +320 -2
  86. data/sig/metronome_sdk/models/credit.rbs +7 -0
  87. data/sig/metronome_sdk/models/override.rbs +7 -0
  88. data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration.rbs +116 -6
  89. data/sig/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rbs +116 -6
  90. data/sig/metronome_sdk/models/spend_threshold_configuration.rbs +31 -3
  91. data/sig/metronome_sdk/models/spend_threshold_configuration_v2.rbs +31 -3
  92. data/sig/metronome_sdk/models/subscription.rbs +88 -3
  93. data/sig/metronome_sdk/models/v1/alert_create_params.rbs +144 -0
  94. data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +26 -0
  95. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +412 -5
  96. data/sig/metronome_sdk/models/v1/contract_create_response.rbs +1210 -4
  97. data/sig/metronome_sdk/models/v1/contract_get_subscription_seats_history_params.rbs +63 -0
  98. data/sig/metronome_sdk/models/v1/contract_get_subscription_seats_history_response.rbs +59 -0
  99. data/sig/metronome_sdk/models/v1/contract_list_seat_balances_params.rbs +7 -0
  100. data/sig/metronome_sdk/models/v1/customers/alert_retrieve_params.rbs +141 -0
  101. data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +150 -0
  102. data/sig/metronome_sdk/models/v1/customers/invoice_list_params.rbs +8 -1
  103. data/sig/metronome_sdk/models/v1/dashboard_get_embeddable_url_params.rbs +4 -0
  104. data/sig/metronome_sdk/models/v1/package_create_params.rbs +386 -5
  105. data/sig/metronome_sdk/models/v1/package_list_response.rbs +380 -5
  106. data/sig/metronome_sdk/models/v1/package_retrieve_response.rbs +378 -5
  107. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +751 -14
  108. data/sig/metronome_sdk/models/v2/contract_edit_response.rbs +4215 -4
  109. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +569 -14
  110. data/sig/metronome_sdk/resources/v1/alerts.rbs +1 -0
  111. data/sig/metronome_sdk/resources/v1/contracts.rbs +14 -0
  112. data/sig/metronome_sdk/resources/v1/customers/alerts.rbs +1 -0
  113. data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +1 -0
  114. data/sig/metronome_sdk/resources/v1/packages.rbs +1 -0
  115. data/sig/metronome_sdk/resources/v1.rbs +0 -2
  116. data/sig/metronome_sdk/resources/v2/contracts.rbs +2 -0
  117. metadata +8 -26
  118. data/lib/metronome_sdk/models/v1/payment.rb +0 -196
  119. data/lib/metronome_sdk/models/v1/payment_attempt_params.rb +0 -28
  120. data/lib/metronome_sdk/models/v1/payment_attempt_response.rb +0 -18
  121. data/lib/metronome_sdk/models/v1/payment_cancel_params.rb +0 -28
  122. data/lib/metronome_sdk/models/v1/payment_cancel_response.rb +0 -18
  123. data/lib/metronome_sdk/models/v1/payment_list_params.rb +0 -53
  124. data/lib/metronome_sdk/models/v1/payment_status.rb +0 -19
  125. data/lib/metronome_sdk/resources/v1/payments.rb +0 -102
  126. data/rbi/metronome_sdk/models/v1/payment.rbi +0 -403
  127. data/rbi/metronome_sdk/models/v1/payment_attempt_params.rbi +0 -48
  128. data/rbi/metronome_sdk/models/v1/payment_attempt_response.rbi +0 -35
  129. data/rbi/metronome_sdk/models/v1/payment_cancel_params.rbi +0 -48
  130. data/rbi/metronome_sdk/models/v1/payment_cancel_response.rbi +0 -35
  131. data/rbi/metronome_sdk/models/v1/payment_list_params.rbi +0 -91
  132. data/rbi/metronome_sdk/models/v1/payment_status.rbi +0 -33
  133. data/rbi/metronome_sdk/resources/v1/payments.rbi +0 -72
  134. data/sig/metronome_sdk/models/v1/payment.rbs +0 -243
  135. data/sig/metronome_sdk/models/v1/payment_attempt_params.rbs +0 -30
  136. data/sig/metronome_sdk/models/v1/payment_attempt_response.rbs +0 -15
  137. data/sig/metronome_sdk/models/v1/payment_cancel_params.rbs +0 -30
  138. data/sig/metronome_sdk/models/v1/payment_cancel_response.rbs +0 -15
  139. data/sig/metronome_sdk/models/v1/payment_list_params.rbs +0 -56
  140. data/sig/metronome_sdk/models/v1/payment_status.rbs +0 -19
  141. data/sig/metronome_sdk/resources/v1/payments.rbs +0 -30
@@ -7,11 +7,1316 @@ module MetronomeSDK
7
7
  class ContractCreateResponse < MetronomeSDK::Internal::Type::BaseModel
8
8
  # @!attribute data
9
9
  #
10
- # @return [MetronomeSDK::Models::ID]
11
- required :data, -> { MetronomeSDK::ID }
10
+ # @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data]
11
+ required :data, -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data }
12
12
 
13
13
  # @!method initialize(data:)
14
- # @param data [MetronomeSDK::Models::ID]
14
+ # @param data [MetronomeSDK::Models::V1::ContractCreateResponse::Data]
15
+
16
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse#data
17
+ class Data < MetronomeSDK::Internal::Type::BaseModel
18
+ # @!attribute id
19
+ #
20
+ # @return [String]
21
+ required :id, String
22
+
23
+ # @!attribute contract
24
+ # The created contract.
25
+ #
26
+ # @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract, nil]
27
+ optional :contract, -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract }
28
+
29
+ # @!method initialize(id:, contract: nil)
30
+ # @param id [String]
31
+ #
32
+ # @param contract [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract] The created contract.
33
+
34
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data#contract
35
+ class Contract < MetronomeSDK::Internal::Type::BaseModel
36
+ # @!attribute id
37
+ #
38
+ # @return [String]
39
+ required :id, String
40
+
41
+ # @!attribute commits
42
+ #
43
+ # @return [Array<MetronomeSDK::Models::Commit>]
44
+ required :commits, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Commit] }
45
+
46
+ # @!attribute created_at
47
+ #
48
+ # @return [Time]
49
+ required :created_at, Time
50
+
51
+ # @!attribute created_by
52
+ #
53
+ # @return [String]
54
+ required :created_by, String
55
+
56
+ # @!attribute customer_id
57
+ #
58
+ # @return [String]
59
+ required :customer_id, String
60
+
61
+ # @!attribute overrides
62
+ #
63
+ # @return [Array<MetronomeSDK::Models::Override>]
64
+ required :overrides, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Override] }
65
+
66
+ # @!attribute scheduled_charges
67
+ #
68
+ # @return [Array<MetronomeSDK::Models::ScheduledCharge>]
69
+ required :scheduled_charges, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::ScheduledCharge] }
70
+
71
+ # @!attribute starting_at
72
+ #
73
+ # @return [Time]
74
+ required :starting_at, Time
75
+
76
+ # @!attribute transitions
77
+ #
78
+ # @return [Array<MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition>]
79
+ required :transitions,
80
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition] }
81
+
82
+ # @!attribute usage_filter
83
+ #
84
+ # @return [Array<MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageFilter>]
85
+ required :usage_filter,
86
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageFilter] }
87
+
88
+ # @!attribute usage_statement_schedule
89
+ #
90
+ # @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule]
91
+ required :usage_statement_schedule,
92
+ -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule }
93
+
94
+ # @!attribute credits
95
+ #
96
+ # @return [Array<MetronomeSDK::Models::Credit>, nil]
97
+ optional :credits, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Credit] }
98
+
99
+ # @!attribute custom_fields
100
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
101
+ #
102
+ # @return [Hash{Symbol=>String}, nil]
103
+ optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
104
+
105
+ # @!attribute customer_billing_provider_configuration
106
+ # The billing provider configuration associated with the contract.
107
+ #
108
+ # @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration, nil]
109
+ optional :customer_billing_provider_configuration,
110
+ -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration }
111
+
112
+ # @!attribute ending_before
113
+ #
114
+ # @return [Time, nil]
115
+ optional :ending_before, Time
116
+
117
+ # @!attribute has_more
118
+ # Indicates whether there are more items than the limit for this endpoint. Use the
119
+ # respective list endpoints to get the full lists.
120
+ #
121
+ # @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::HasMore, nil]
122
+ optional :has_more, -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::HasMore }
123
+
124
+ # @!attribute hierarchy_configuration
125
+ # Either a **parent** configuration with a list of children or a **child**
126
+ # configuration with a single parent.
127
+ #
128
+ # @return [MetronomeSDK::Models::HierarchyConfiguration::ParentHierarchyConfiguration, MetronomeSDK::Models::HierarchyConfiguration::ChildHierarchyConfiguration, nil]
129
+ optional :hierarchy_configuration, union: -> { MetronomeSDK::HierarchyConfiguration }
130
+
131
+ # @!attribute multiplier_override_prioritization
132
+ # Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
133
+ # prices automatically. EXPLICIT prioritization requires specifying priorities for
134
+ # each multiplier; the one with the lowest priority value will be prioritized
135
+ # first.
136
+ #
137
+ # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization, nil]
138
+ optional :multiplier_override_prioritization,
139
+ enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization }
140
+
141
+ # @!attribute name
142
+ #
143
+ # @return [String, nil]
144
+ optional :name, String
145
+
146
+ # @!attribute net_payment_terms_days
147
+ #
148
+ # @return [Float, nil]
149
+ optional :net_payment_terms_days, Float
150
+
151
+ # @!attribute package_id
152
+ # ID of the package this contract was created from, if applicable.
153
+ #
154
+ # @return [String, nil]
155
+ optional :package_id, String
156
+
157
+ # @!attribute prepaid_balance_threshold_configuration
158
+ #
159
+ # @return [MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration, nil]
160
+ optional :prepaid_balance_threshold_configuration,
161
+ -> { MetronomeSDK::PrepaidBalanceThresholdConfiguration }
162
+
163
+ # @!attribute rate_card_id
164
+ #
165
+ # @return [String, nil]
166
+ optional :rate_card_id, String
167
+
168
+ # @!attribute recurring_commits
169
+ #
170
+ # @return [Array<MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit>, nil]
171
+ optional :recurring_commits,
172
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit] }
173
+
174
+ # @!attribute recurring_credits
175
+ #
176
+ # @return [Array<MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit>, nil]
177
+ optional :recurring_credits,
178
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit] }
179
+
180
+ # @!attribute scheduled_charges_on_usage_invoices
181
+ # Determines which scheduled and commit charges to consolidate onto the Contract's
182
+ # usage invoice. The charge's `timestamp` must match the usage invoice's
183
+ # `ending_before` date for consolidation to occur. This field cannot be modified
184
+ # after a Contract has been created. If this field is omitted, charges will appear
185
+ # on a separate invoice from usage charges.
186
+ #
187
+ # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::ScheduledChargesOnUsageInvoices, nil]
188
+ optional :scheduled_charges_on_usage_invoices,
189
+ enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::ScheduledChargesOnUsageInvoices }
190
+
191
+ # @!attribute spend_threshold_configuration
192
+ #
193
+ # @return [MetronomeSDK::Models::SpendThresholdConfiguration, nil]
194
+ optional :spend_threshold_configuration, -> { MetronomeSDK::SpendThresholdConfiguration }
195
+
196
+ # @!attribute subscriptions
197
+ # List of subscriptions on the contract.
198
+ #
199
+ # @return [Array<MetronomeSDK::Models::Subscription>, nil]
200
+ optional :subscriptions, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Subscription] }
201
+
202
+ # @!attribute uniqueness_key
203
+ # Optional uniqueness key to prevent duplicate contract creations.
204
+ #
205
+ # @return [String, nil]
206
+ optional :uniqueness_key, String
207
+
208
+ # @!method initialize(id:, commits:, created_at:, created_by:, customer_id:, overrides:, scheduled_charges:, starting_at:, transitions:, usage_filter:, usage_statement_schedule:, credits: nil, custom_fields: nil, customer_billing_provider_configuration: nil, ending_before: nil, has_more: nil, hierarchy_configuration: nil, multiplier_override_prioritization: nil, name: nil, net_payment_terms_days: nil, package_id: nil, prepaid_balance_threshold_configuration: nil, rate_card_id: nil, recurring_commits: nil, recurring_credits: nil, scheduled_charges_on_usage_invoices: nil, spend_threshold_configuration: nil, subscriptions: nil, uniqueness_key: nil)
209
+ # Some parameter documentations has been truncated, see
210
+ # {MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract} for more
211
+ # details.
212
+ #
213
+ # The created contract.
214
+ #
215
+ # @param id [String]
216
+ #
217
+ # @param commits [Array<MetronomeSDK::Models::Commit>]
218
+ #
219
+ # @param created_at [Time]
220
+ #
221
+ # @param created_by [String]
222
+ #
223
+ # @param customer_id [String]
224
+ #
225
+ # @param overrides [Array<MetronomeSDK::Models::Override>]
226
+ #
227
+ # @param scheduled_charges [Array<MetronomeSDK::Models::ScheduledCharge>]
228
+ #
229
+ # @param starting_at [Time]
230
+ #
231
+ # @param transitions [Array<MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition>]
232
+ #
233
+ # @param usage_filter [Array<MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageFilter>]
234
+ #
235
+ # @param usage_statement_schedule [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule]
236
+ #
237
+ # @param credits [Array<MetronomeSDK::Models::Credit>]
238
+ #
239
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
240
+ #
241
+ # @param customer_billing_provider_configuration [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration] The billing provider configuration associated with the contract.
242
+ #
243
+ # @param ending_before [Time]
244
+ #
245
+ # @param has_more [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::HasMore] Indicates whether there are more items than the limit for this endpoint. Use the
246
+ #
247
+ # @param hierarchy_configuration [MetronomeSDK::Models::HierarchyConfiguration::ParentHierarchyConfiguration, MetronomeSDK::Models::HierarchyConfiguration::ChildHierarchyConfiguration] Either a **parent** configuration with a list of children or a **child** configu
248
+ #
249
+ # @param multiplier_override_prioritization [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::MultiplierOverridePrioritization] Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list price
250
+ #
251
+ # @param name [String]
252
+ #
253
+ # @param net_payment_terms_days [Float]
254
+ #
255
+ # @param package_id [String] ID of the package this contract was created from, if applicable.
256
+ #
257
+ # @param prepaid_balance_threshold_configuration [MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration]
258
+ #
259
+ # @param rate_card_id [String]
260
+ #
261
+ # @param recurring_commits [Array<MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit>]
262
+ #
263
+ # @param recurring_credits [Array<MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit>]
264
+ #
265
+ # @param scheduled_charges_on_usage_invoices [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::ScheduledChargesOnUsageInvoices] Determines which scheduled and commit charges to consolidate onto the Contract's
266
+ #
267
+ # @param spend_threshold_configuration [MetronomeSDK::Models::SpendThresholdConfiguration]
268
+ #
269
+ # @param subscriptions [Array<MetronomeSDK::Models::Subscription>] List of subscriptions on the contract.
270
+ #
271
+ # @param uniqueness_key [String] Optional uniqueness key to prevent duplicate contract creations.
272
+
273
+ class Transition < MetronomeSDK::Internal::Type::BaseModel
274
+ # @!attribute from_contract_id
275
+ #
276
+ # @return [String]
277
+ required :from_contract_id, String
278
+
279
+ # @!attribute to_contract_id
280
+ #
281
+ # @return [String]
282
+ required :to_contract_id, String
283
+
284
+ # @!attribute type
285
+ #
286
+ # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type]
287
+ required :type,
288
+ enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type }
289
+
290
+ # @!method initialize(from_contract_id:, to_contract_id:, type:)
291
+ # @param from_contract_id [String]
292
+ # @param to_contract_id [String]
293
+ # @param type [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition::Type]
294
+
295
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::Transition#type
296
+ module Type
297
+ extend MetronomeSDK::Internal::Type::Enum
298
+
299
+ SUPERSEDE = :SUPERSEDE
300
+ RENEWAL = :RENEWAL
301
+
302
+ # @!method self.values
303
+ # @return [Array<Symbol>]
304
+ end
305
+ end
306
+
307
+ class UsageFilter < MetronomeSDK::Internal::Type::BaseModel
308
+ # @!attribute group_key
309
+ #
310
+ # @return [String]
311
+ required :group_key, String
312
+
313
+ # @!attribute group_values
314
+ #
315
+ # @return [Array<String>]
316
+ required :group_values, MetronomeSDK::Internal::Type::ArrayOf[String]
317
+
318
+ # @!attribute starting_at
319
+ #
320
+ # @return [Time]
321
+ required :starting_at, Time
322
+
323
+ # @!attribute ending_before
324
+ #
325
+ # @return [Time, nil]
326
+ optional :ending_before, Time
327
+
328
+ # @!method initialize(group_key:, group_values:, starting_at:, ending_before: nil)
329
+ # @param group_key [String]
330
+ # @param group_values [Array<String>]
331
+ # @param starting_at [Time]
332
+ # @param ending_before [Time]
333
+ end
334
+
335
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract#usage_statement_schedule
336
+ class UsageStatementSchedule < MetronomeSDK::Internal::Type::BaseModel
337
+ # @!attribute billing_anchor_date
338
+ # Contract usage statements follow a selected cadence based on this date.
339
+ #
340
+ # @return [Time]
341
+ required :billing_anchor_date, Time
342
+
343
+ # @!attribute frequency
344
+ #
345
+ # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency]
346
+ required :frequency,
347
+ enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency }
348
+
349
+ # @!method initialize(billing_anchor_date:, frequency:)
350
+ # @param billing_anchor_date [Time] Contract usage statements follow a selected cadence based on this date.
351
+ #
352
+ # @param frequency [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule::Frequency]
353
+
354
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::UsageStatementSchedule#frequency
355
+ module Frequency
356
+ extend MetronomeSDK::Internal::Type::Enum
357
+
358
+ MONTHLY = :MONTHLY
359
+ QUARTERLY = :QUARTERLY
360
+ ANNUAL = :ANNUAL
361
+ WEEKLY = :WEEKLY
362
+
363
+ # @!method self.values
364
+ # @return [Array<Symbol>]
365
+ end
366
+ end
367
+
368
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract#customer_billing_provider_configuration
369
+ class CustomerBillingProviderConfiguration < MetronomeSDK::Internal::Type::BaseModel
370
+ # @!attribute id
371
+ #
372
+ # @return [String, nil]
373
+ optional :id, String
374
+
375
+ # @!attribute billing_provider
376
+ #
377
+ # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider, nil]
378
+ optional :billing_provider,
379
+ enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider }
380
+
381
+ # @!attribute delivery_method
382
+ #
383
+ # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod, nil]
384
+ optional :delivery_method,
385
+ enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod }
386
+
387
+ # @!method initialize(id: nil, billing_provider: nil, delivery_method: nil)
388
+ # The billing provider configuration associated with the contract.
389
+ #
390
+ # @param id [String]
391
+ # @param billing_provider [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::BillingProvider]
392
+ # @param delivery_method [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration::DeliveryMethod]
393
+
394
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration#billing_provider
395
+ module BillingProvider
396
+ extend MetronomeSDK::Internal::Type::Enum
397
+
398
+ AWS_MARKETPLACE = :aws_marketplace
399
+ STRIPE = :stripe
400
+ NETSUITE = :netsuite
401
+ CUSTOM = :custom
402
+ AZURE_MARKETPLACE = :azure_marketplace
403
+ QUICKBOOKS_ONLINE = :quickbooks_online
404
+ WORKDAY = :workday
405
+ GCP_MARKETPLACE = :gcp_marketplace
406
+ METRONOME = :metronome
407
+
408
+ # @!method self.values
409
+ # @return [Array<Symbol>]
410
+ end
411
+
412
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::CustomerBillingProviderConfiguration#delivery_method
413
+ module DeliveryMethod
414
+ extend MetronomeSDK::Internal::Type::Enum
415
+
416
+ DIRECT_TO_BILLING_PROVIDER = :direct_to_billing_provider
417
+ AWS_SQS = :aws_sqs
418
+ TACKLE = :tackle
419
+ AWS_SNS = :aws_sns
420
+
421
+ # @!method self.values
422
+ # @return [Array<Symbol>]
423
+ end
424
+ end
425
+
426
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract#has_more
427
+ class HasMore < MetronomeSDK::Internal::Type::BaseModel
428
+ # @!attribute commits
429
+ # Whether there are more commits on this contract than the limit for this
430
+ # endpoint. Use the /contracts/customerCommits/list endpoint to get the full list
431
+ # of commits.
432
+ #
433
+ # @return [Boolean]
434
+ required :commits, MetronomeSDK::Internal::Type::Boolean
435
+
436
+ # @!attribute credits
437
+ # Whether there are more credits on this contract than the limit for this
438
+ # endpoint. Use the /contracts/customerCredits/list endpoint to get the full list
439
+ # of credits.
440
+ #
441
+ # @return [Boolean]
442
+ required :credits, MetronomeSDK::Internal::Type::Boolean
443
+
444
+ # @!method initialize(commits:, credits:)
445
+ # Some parameter documentations has been truncated, see
446
+ # {MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::HasMore} for
447
+ # more details.
448
+ #
449
+ # Indicates whether there are more items than the limit for this endpoint. Use the
450
+ # respective list endpoints to get the full lists.
451
+ #
452
+ # @param commits [Boolean] Whether there are more commits on this contract than the limit for this endpoint
453
+ #
454
+ # @param credits [Boolean] Whether there are more credits on this contract than the limit for this endpoint
455
+ end
456
+
457
+ # Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
458
+ # prices automatically. EXPLICIT prioritization requires specifying priorities for
459
+ # each multiplier; the one with the lowest priority value will be prioritized
460
+ # first.
461
+ #
462
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract#multiplier_override_prioritization
463
+ module MultiplierOverridePrioritization
464
+ extend MetronomeSDK::Internal::Type::Enum
465
+
466
+ LOWEST_MULTIPLIER = :LOWEST_MULTIPLIER
467
+ EXPLICIT = :EXPLICIT
468
+
469
+ # @!method self.values
470
+ # @return [Array<Symbol>]
471
+ end
472
+
473
+ class RecurringCommit < MetronomeSDK::Internal::Type::BaseModel
474
+ # @!attribute id
475
+ #
476
+ # @return [String]
477
+ required :id, String
478
+
479
+ # @!attribute access_amount
480
+ # The amount of commit to grant.
481
+ #
482
+ # @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::AccessAmount]
483
+ required :access_amount,
484
+ -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::AccessAmount }
485
+
486
+ # @!attribute commit_duration
487
+ # The amount of time the created commits will be valid for
488
+ #
489
+ # @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration]
490
+ required :commit_duration,
491
+ -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration }
492
+
493
+ # @!attribute priority
494
+ # Will be passed down to the individual commits
495
+ #
496
+ # @return [Float]
497
+ required :priority, Float
498
+
499
+ # @!attribute product
500
+ #
501
+ # @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Product]
502
+ required :product,
503
+ -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Product }
504
+
505
+ # @!attribute rate_type
506
+ # Whether the created commits will use the commit rate or list rate
507
+ #
508
+ # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RateType]
509
+ required :rate_type,
510
+ enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RateType }
511
+
512
+ # @!attribute starting_at
513
+ # Determines the start time for the first commit
514
+ #
515
+ # @return [Time]
516
+ required :starting_at, Time
517
+
518
+ # @!attribute applicable_product_ids
519
+ # Will be passed down to the individual commits
520
+ #
521
+ # @return [Array<String>, nil]
522
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
523
+
524
+ # @!attribute applicable_product_tags
525
+ # Will be passed down to the individual commits
526
+ #
527
+ # @return [Array<String>, nil]
528
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
529
+
530
+ # @!attribute contract
531
+ #
532
+ # @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Contract, nil]
533
+ optional :contract,
534
+ -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Contract }
535
+
536
+ # @!attribute description
537
+ # Will be passed down to the individual commits
538
+ #
539
+ # @return [String, nil]
540
+ optional :description, String
541
+
542
+ # @!attribute ending_before
543
+ # Determines when the contract will stop creating recurring commits. Optional
544
+ #
545
+ # @return [Time, nil]
546
+ optional :ending_before, Time
547
+
548
+ # @!attribute hierarchy_configuration
549
+ # Optional configuration for recurring commit/credit hierarchy access control
550
+ #
551
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
552
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
553
+
554
+ # @!attribute invoice_amount
555
+ # The amount the customer should be billed for the commit. Not required.
556
+ #
557
+ # @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::InvoiceAmount, nil]
558
+ optional :invoice_amount,
559
+ -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::InvoiceAmount }
560
+
561
+ # @!attribute name
562
+ # Displayed on invoices. Will be passed through to the individual commits
563
+ #
564
+ # @return [String, nil]
565
+ optional :name, String
566
+
567
+ # @!attribute netsuite_sales_order_id
568
+ # Will be passed down to the individual commits
569
+ #
570
+ # @return [String, nil]
571
+ optional :netsuite_sales_order_id, String
572
+
573
+ # @!attribute proration
574
+ # Determines whether the first and last commit will be prorated. If not provided,
575
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
576
+ #
577
+ # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration, nil]
578
+ optional :proration,
579
+ enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Proration }
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
+
589
+ # @!attribute recurrence_frequency
590
+ # The frequency at which the recurring commits will be created. If not provided: -
591
+ # The commits will be created on the usage invoice frequency. If provided: - The
592
+ # period defined in the duration will correspond to this frequency. - Commits will
593
+ # be created aligned with the recurring commit's starting_at rather than the usage
594
+ # invoice dates.
595
+ #
596
+ # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency, nil]
597
+ optional :recurrence_frequency,
598
+ enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RecurrenceFrequency }
599
+
600
+ # @!attribute rollover_fraction
601
+ # Will be passed down to the individual commits. This controls how much of an
602
+ # individual unexpired commit will roll over upon contract transition. Must be
603
+ # between 0 and 1.
604
+ #
605
+ # @return [Float, nil]
606
+ optional :rollover_fraction, Float
607
+
608
+ # @!attribute specifiers
609
+ # List of filters that determine what kind of customer usage draws down a commit
610
+ # or credit. A customer's usage needs to meet the condition of at least one of the
611
+ # specifiers to contribute to a commit's or credit's drawdown.
612
+ #
613
+ # @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
614
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
615
+
616
+ # @!attribute subscription_config
617
+ # Attach a subscription to the recurring commit/credit.
618
+ #
619
+ # @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
620
+ optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
621
+
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)
623
+ # Some parameter documentations has been truncated, see
624
+ # {MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit}
625
+ # for more details.
626
+ #
627
+ # @param id [String]
628
+ #
629
+ # @param access_amount [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::AccessAmount] The amount of commit to grant.
630
+ #
631
+ # @param commit_duration [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration] The amount of time the created commits will be valid for
632
+ #
633
+ # @param priority [Float] Will be passed down to the individual commits
634
+ #
635
+ # @param product [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Product]
636
+ #
637
+ # @param rate_type [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::RateType] Whether the created commits will use the commit rate or list rate
638
+ #
639
+ # @param starting_at [Time] Determines the start time for the first commit
640
+ #
641
+ # @param applicable_product_ids [Array<String>] Will be passed down to the individual commits
642
+ #
643
+ # @param applicable_product_tags [Array<String>] Will be passed down to the individual commits
644
+ #
645
+ # @param contract [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::Contract]
646
+ #
647
+ # @param description [String] Will be passed down to the individual commits
648
+ #
649
+ # @param ending_before [Time] Determines when the contract will stop creating recurring commits. Optional
650
+ #
651
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for recurring commit/credit hierarchy access control
652
+ #
653
+ # @param invoice_amount [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::InvoiceAmount] The amount the customer should be billed for the commit. Not required.
654
+ #
655
+ # @param name [String] Displayed on invoices. Will be passed through to the individual commits
656
+ #
657
+ # @param netsuite_sales_order_id [String] Will be passed down to the individual commits
658
+ #
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,
660
+ #
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: -
664
+ #
665
+ # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
666
+ #
667
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
668
+ #
669
+ # @param subscription_config [MetronomeSDK::Models::RecurringCommitSubscriptionConfig] Attach a subscription to the recurring commit/credit.
670
+
671
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit#access_amount
672
+ class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
673
+ # @!attribute credit_type_id
674
+ #
675
+ # @return [String]
676
+ required :credit_type_id, String
677
+
678
+ # @!attribute unit_price
679
+ #
680
+ # @return [Float]
681
+ required :unit_price, Float
682
+
683
+ # @!attribute quantity
684
+ #
685
+ # @return [Float, nil]
686
+ optional :quantity, Float
687
+
688
+ # @!method initialize(credit_type_id:, unit_price:, quantity: nil)
689
+ # The amount of commit to grant.
690
+ #
691
+ # @param credit_type_id [String]
692
+ # @param unit_price [Float]
693
+ # @param quantity [Float]
694
+ end
695
+
696
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit#commit_duration
697
+ class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
698
+ # @!attribute value
699
+ #
700
+ # @return [Float]
701
+ required :value, Float
702
+
703
+ # @!attribute unit
704
+ #
705
+ # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::Unit, nil]
706
+ optional :unit,
707
+ enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::Unit }
708
+
709
+ # @!method initialize(value:, unit: nil)
710
+ # The amount of time the created commits will be valid for
711
+ #
712
+ # @param value [Float]
713
+ # @param unit [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration::Unit]
714
+
715
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit::CommitDuration#unit
716
+ module Unit
717
+ extend MetronomeSDK::Internal::Type::Enum
718
+
719
+ PERIODS = :PERIODS
720
+
721
+ # @!method self.values
722
+ # @return [Array<Symbol>]
723
+ end
724
+ end
725
+
726
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit#product
727
+ class Product < MetronomeSDK::Internal::Type::BaseModel
728
+ # @!attribute id
729
+ #
730
+ # @return [String]
731
+ required :id, String
732
+
733
+ # @!attribute name
734
+ #
735
+ # @return [String]
736
+ required :name, String
737
+
738
+ # @!method initialize(id:, name:)
739
+ # @param id [String]
740
+ # @param name [String]
741
+ end
742
+
743
+ # Whether the created commits will use the commit rate or list rate
744
+ #
745
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit#rate_type
746
+ module RateType
747
+ extend MetronomeSDK::Internal::Type::Enum
748
+
749
+ COMMIT_RATE = :COMMIT_RATE
750
+ LIST_RATE = :LIST_RATE
751
+
752
+ # @!method self.values
753
+ # @return [Array<Symbol>]
754
+ end
755
+
756
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit#contract
757
+ class Contract < MetronomeSDK::Internal::Type::BaseModel
758
+ # @!attribute id
759
+ #
760
+ # @return [String]
761
+ required :id, String
762
+
763
+ # @!method initialize(id:)
764
+ # @param id [String]
765
+ end
766
+
767
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit#invoice_amount
768
+ class InvoiceAmount < MetronomeSDK::Internal::Type::BaseModel
769
+ # @!attribute credit_type_id
770
+ #
771
+ # @return [String]
772
+ required :credit_type_id, String
773
+
774
+ # @!attribute quantity
775
+ #
776
+ # @return [Float]
777
+ required :quantity, Float
778
+
779
+ # @!attribute unit_price
780
+ #
781
+ # @return [Float]
782
+ required :unit_price, Float
783
+
784
+ # @!method initialize(credit_type_id:, quantity:, unit_price:)
785
+ # The amount the customer should be billed for the commit. Not required.
786
+ #
787
+ # @param credit_type_id [String]
788
+ # @param quantity [Float]
789
+ # @param unit_price [Float]
790
+ end
791
+
792
+ # Determines whether the first and last commit will be prorated. If not provided,
793
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
794
+ #
795
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit#proration
796
+ module Proration
797
+ extend MetronomeSDK::Internal::Type::Enum
798
+
799
+ NONE = :NONE
800
+ FIRST = :FIRST
801
+ LAST = :LAST
802
+ FIRST_AND_LAST = :FIRST_AND_LAST
803
+
804
+ # @!method self.values
805
+ # @return [Array<Symbol>]
806
+ end
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
+
907
+ # The frequency at which the recurring commits will be created. If not provided: -
908
+ # The commits will be created on the usage invoice frequency. If provided: - The
909
+ # period defined in the duration will correspond to this frequency. - Commits will
910
+ # be created aligned with the recurring commit's starting_at rather than the usage
911
+ # invoice dates.
912
+ #
913
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCommit#recurrence_frequency
914
+ module RecurrenceFrequency
915
+ extend MetronomeSDK::Internal::Type::Enum
916
+
917
+ MONTHLY = :MONTHLY
918
+ QUARTERLY = :QUARTERLY
919
+ ANNUAL = :ANNUAL
920
+ WEEKLY = :WEEKLY
921
+ DAILY = :DAILY
922
+
923
+ # @!method self.values
924
+ # @return [Array<Symbol>]
925
+ end
926
+ end
927
+
928
+ class RecurringCredit < MetronomeSDK::Internal::Type::BaseModel
929
+ # @!attribute id
930
+ #
931
+ # @return [String]
932
+ required :id, String
933
+
934
+ # @!attribute access_amount
935
+ # The amount of commit to grant.
936
+ #
937
+ # @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::AccessAmount]
938
+ required :access_amount,
939
+ -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::AccessAmount }
940
+
941
+ # @!attribute commit_duration
942
+ # The amount of time the created commits will be valid for
943
+ #
944
+ # @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration]
945
+ required :commit_duration,
946
+ -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration }
947
+
948
+ # @!attribute priority
949
+ # Will be passed down to the individual commits
950
+ #
951
+ # @return [Float]
952
+ required :priority, Float
953
+
954
+ # @!attribute product
955
+ #
956
+ # @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Product]
957
+ required :product,
958
+ -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Product }
959
+
960
+ # @!attribute rate_type
961
+ # Whether the created commits will use the commit rate or list rate
962
+ #
963
+ # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RateType]
964
+ required :rate_type,
965
+ enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RateType }
966
+
967
+ # @!attribute starting_at
968
+ # Determines the start time for the first commit
969
+ #
970
+ # @return [Time]
971
+ required :starting_at, Time
972
+
973
+ # @!attribute applicable_product_ids
974
+ # Will be passed down to the individual commits
975
+ #
976
+ # @return [Array<String>, nil]
977
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
978
+
979
+ # @!attribute applicable_product_tags
980
+ # Will be passed down to the individual commits
981
+ #
982
+ # @return [Array<String>, nil]
983
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
984
+
985
+ # @!attribute contract
986
+ #
987
+ # @return [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Contract, nil]
988
+ optional :contract,
989
+ -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Contract }
990
+
991
+ # @!attribute description
992
+ # Will be passed down to the individual commits
993
+ #
994
+ # @return [String, nil]
995
+ optional :description, String
996
+
997
+ # @!attribute ending_before
998
+ # Determines when the contract will stop creating recurring commits. Optional
999
+ #
1000
+ # @return [Time, nil]
1001
+ optional :ending_before, Time
1002
+
1003
+ # @!attribute hierarchy_configuration
1004
+ # Optional configuration for recurring commit/credit hierarchy access control
1005
+ #
1006
+ # @return [MetronomeSDK::Models::CommitHierarchyConfiguration, nil]
1007
+ optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }
1008
+
1009
+ # @!attribute name
1010
+ # Displayed on invoices. Will be passed through to the individual commits
1011
+ #
1012
+ # @return [String, nil]
1013
+ optional :name, String
1014
+
1015
+ # @!attribute netsuite_sales_order_id
1016
+ # Will be passed down to the individual commits
1017
+ #
1018
+ # @return [String, nil]
1019
+ optional :netsuite_sales_order_id, String
1020
+
1021
+ # @!attribute proration
1022
+ # Determines whether the first and last commit will be prorated. If not provided,
1023
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1024
+ #
1025
+ # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration, nil]
1026
+ optional :proration,
1027
+ enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Proration }
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
+
1037
+ # @!attribute recurrence_frequency
1038
+ # The frequency at which the recurring commits will be created. If not provided: -
1039
+ # The commits will be created on the usage invoice frequency. If provided: - The
1040
+ # period defined in the duration will correspond to this frequency. - Commits will
1041
+ # be created aligned with the recurring commit's starting_at rather than the usage
1042
+ # invoice dates.
1043
+ #
1044
+ # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency, nil]
1045
+ optional :recurrence_frequency,
1046
+ enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RecurrenceFrequency }
1047
+
1048
+ # @!attribute rollover_fraction
1049
+ # Will be passed down to the individual commits. This controls how much of an
1050
+ # individual unexpired commit will roll over upon contract transition. Must be
1051
+ # between 0 and 1.
1052
+ #
1053
+ # @return [Float, nil]
1054
+ optional :rollover_fraction, Float
1055
+
1056
+ # @!attribute specifiers
1057
+ # List of filters that determine what kind of customer usage draws down a commit
1058
+ # or credit. A customer's usage needs to meet the condition of at least one of the
1059
+ # specifiers to contribute to a commit's or credit's drawdown.
1060
+ #
1061
+ # @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
1062
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
1063
+
1064
+ # @!attribute subscription_config
1065
+ # Attach a subscription to the recurring commit/credit.
1066
+ #
1067
+ # @return [MetronomeSDK::Models::RecurringCommitSubscriptionConfig, nil]
1068
+ optional :subscription_config, -> { MetronomeSDK::RecurringCommitSubscriptionConfig }
1069
+
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)
1071
+ # Some parameter documentations has been truncated, see
1072
+ # {MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit}
1073
+ # for more details.
1074
+ #
1075
+ # @param id [String]
1076
+ #
1077
+ # @param access_amount [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::AccessAmount] The amount of commit to grant.
1078
+ #
1079
+ # @param commit_duration [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration] The amount of time the created commits will be valid for
1080
+ #
1081
+ # @param priority [Float] Will be passed down to the individual commits
1082
+ #
1083
+ # @param product [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Product]
1084
+ #
1085
+ # @param rate_type [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::RateType] Whether the created commits will use the commit rate or list rate
1086
+ #
1087
+ # @param starting_at [Time] Determines the start time for the first commit
1088
+ #
1089
+ # @param applicable_product_ids [Array<String>] Will be passed down to the individual commits
1090
+ #
1091
+ # @param applicable_product_tags [Array<String>] Will be passed down to the individual commits
1092
+ #
1093
+ # @param contract [MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::Contract]
1094
+ #
1095
+ # @param description [String] Will be passed down to the individual commits
1096
+ #
1097
+ # @param ending_before [Time] Determines when the contract will stop creating recurring commits. Optional
1098
+ #
1099
+ # @param hierarchy_configuration [MetronomeSDK::Models::CommitHierarchyConfiguration] Optional configuration for recurring commit/credit hierarchy access control
1100
+ #
1101
+ # @param name [String] Displayed on invoices. Will be passed through to the individual commits
1102
+ #
1103
+ # @param netsuite_sales_order_id [String] Will be passed down to the individual commits
1104
+ #
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,
1106
+ #
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: -
1110
+ #
1111
+ # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
1112
+ #
1113
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
1114
+ #
1115
+ # @param subscription_config [MetronomeSDK::Models::RecurringCommitSubscriptionConfig] Attach a subscription to the recurring commit/credit.
1116
+
1117
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit#access_amount
1118
+ class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
1119
+ # @!attribute credit_type_id
1120
+ #
1121
+ # @return [String]
1122
+ required :credit_type_id, String
1123
+
1124
+ # @!attribute unit_price
1125
+ #
1126
+ # @return [Float]
1127
+ required :unit_price, Float
1128
+
1129
+ # @!attribute quantity
1130
+ #
1131
+ # @return [Float, nil]
1132
+ optional :quantity, Float
1133
+
1134
+ # @!method initialize(credit_type_id:, unit_price:, quantity: nil)
1135
+ # The amount of commit to grant.
1136
+ #
1137
+ # @param credit_type_id [String]
1138
+ # @param unit_price [Float]
1139
+ # @param quantity [Float]
1140
+ end
1141
+
1142
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit#commit_duration
1143
+ class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
1144
+ # @!attribute value
1145
+ #
1146
+ # @return [Float]
1147
+ required :value, Float
1148
+
1149
+ # @!attribute unit
1150
+ #
1151
+ # @return [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::Unit, nil]
1152
+ optional :unit,
1153
+ enum: -> { MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::Unit }
1154
+
1155
+ # @!method initialize(value:, unit: nil)
1156
+ # The amount of time the created commits will be valid for
1157
+ #
1158
+ # @param value [Float]
1159
+ # @param unit [Symbol, MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration::Unit]
1160
+
1161
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit::CommitDuration#unit
1162
+ module Unit
1163
+ extend MetronomeSDK::Internal::Type::Enum
1164
+
1165
+ PERIODS = :PERIODS
1166
+
1167
+ # @!method self.values
1168
+ # @return [Array<Symbol>]
1169
+ end
1170
+ end
1171
+
1172
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit#product
1173
+ class Product < MetronomeSDK::Internal::Type::BaseModel
1174
+ # @!attribute id
1175
+ #
1176
+ # @return [String]
1177
+ required :id, String
1178
+
1179
+ # @!attribute name
1180
+ #
1181
+ # @return [String]
1182
+ required :name, String
1183
+
1184
+ # @!method initialize(id:, name:)
1185
+ # @param id [String]
1186
+ # @param name [String]
1187
+ end
1188
+
1189
+ # Whether the created commits will use the commit rate or list rate
1190
+ #
1191
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit#rate_type
1192
+ module RateType
1193
+ extend MetronomeSDK::Internal::Type::Enum
1194
+
1195
+ COMMIT_RATE = :COMMIT_RATE
1196
+ LIST_RATE = :LIST_RATE
1197
+
1198
+ # @!method self.values
1199
+ # @return [Array<Symbol>]
1200
+ end
1201
+
1202
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit#contract
1203
+ class Contract < MetronomeSDK::Internal::Type::BaseModel
1204
+ # @!attribute id
1205
+ #
1206
+ # @return [String]
1207
+ required :id, String
1208
+
1209
+ # @!method initialize(id:)
1210
+ # @param id [String]
1211
+ end
1212
+
1213
+ # Determines whether the first and last commit will be prorated. If not provided,
1214
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1215
+ #
1216
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit#proration
1217
+ module Proration
1218
+ extend MetronomeSDK::Internal::Type::Enum
1219
+
1220
+ NONE = :NONE
1221
+ FIRST = :FIRST
1222
+ LAST = :LAST
1223
+ FIRST_AND_LAST = :FIRST_AND_LAST
1224
+
1225
+ # @!method self.values
1226
+ # @return [Array<Symbol>]
1227
+ end
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
+
1282
+ # The frequency at which the recurring commits will be created. If not provided: -
1283
+ # The commits will be created on the usage invoice frequency. If provided: - The
1284
+ # period defined in the duration will correspond to this frequency. - Commits will
1285
+ # be created aligned with the recurring commit's starting_at rather than the usage
1286
+ # invoice dates.
1287
+ #
1288
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract::RecurringCredit#recurrence_frequency
1289
+ module RecurrenceFrequency
1290
+ extend MetronomeSDK::Internal::Type::Enum
1291
+
1292
+ MONTHLY = :MONTHLY
1293
+ QUARTERLY = :QUARTERLY
1294
+ ANNUAL = :ANNUAL
1295
+ WEEKLY = :WEEKLY
1296
+ DAILY = :DAILY
1297
+
1298
+ # @!method self.values
1299
+ # @return [Array<Symbol>]
1300
+ end
1301
+ end
1302
+
1303
+ # Determines which scheduled and commit charges to consolidate onto the Contract's
1304
+ # usage invoice. The charge's `timestamp` must match the usage invoice's
1305
+ # `ending_before` date for consolidation to occur. This field cannot be modified
1306
+ # after a Contract has been created. If this field is omitted, charges will appear
1307
+ # on a separate invoice from usage charges.
1308
+ #
1309
+ # @see MetronomeSDK::Models::V1::ContractCreateResponse::Data::Contract#scheduled_charges_on_usage_invoices
1310
+ module ScheduledChargesOnUsageInvoices
1311
+ extend MetronomeSDK::Internal::Type::Enum
1312
+
1313
+ ALL = :ALL
1314
+
1315
+ # @!method self.values
1316
+ # @return [Array<Symbol>]
1317
+ end
1318
+ end
1319
+ end
15
1320
  end
16
1321
  end
17
1322
  end