metronome-sdk 3.1.0 → 3.2.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 (152) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +30 -0
  3. data/README.md +1 -1
  4. data/lib/metronome_sdk/internal/util.rb +32 -1
  5. data/lib/metronome_sdk/models/commit_rate.rb +29 -3
  6. data/lib/metronome_sdk/models/contract.rb +1 -9
  7. data/lib/metronome_sdk/models/contract_v2.rb +22 -1
  8. data/lib/metronome_sdk/models/overwrite_rate.rb +22 -1
  9. data/lib/metronome_sdk/models/payment_gate_config.rb +0 -1
  10. data/lib/metronome_sdk/models/payment_gate_config_v2.rb +0 -1
  11. data/lib/metronome_sdk/models/rate.rb +22 -1
  12. data/lib/metronome_sdk/models/v1/contract_amend_params.rb +23 -2
  13. data/lib/metronome_sdk/models/v1/contract_create_params.rb +24 -11
  14. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rb +23 -1
  15. data/lib/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rb +21 -1
  16. data/lib/metronome_sdk/models/v1/customers/invoice.rb +10 -1
  17. data/lib/metronome_sdk/models/v1/package_archive_params.rb +24 -0
  18. data/lib/metronome_sdk/models/v1/package_archive_response.rb +18 -0
  19. data/lib/metronome_sdk/models/v1/package_create_params.rb +2719 -0
  20. data/lib/metronome_sdk/models/v1/package_create_response.rb +18 -0
  21. data/lib/metronome_sdk/models/v1/package_list_contracts_on_package_params.rb +69 -0
  22. data/lib/metronome_sdk/models/v1/package_list_contracts_on_package_response.rb +42 -0
  23. data/lib/metronome_sdk/models/v1/package_list_params.rb +52 -0
  24. data/lib/metronome_sdk/models/v1/package_list_response.rb +2446 -0
  25. data/lib/metronome_sdk/models/v1/package_retrieve_params.rb +22 -0
  26. data/lib/metronome_sdk/models/v1/package_retrieve_response.rb +2479 -0
  27. data/lib/metronome_sdk/models/v1/usage_list_with_groups_params.rb +39 -2
  28. data/lib/metronome_sdk/models/v1/usage_list_with_groups_response.rb +27 -3
  29. data/lib/metronome_sdk/models/v2/contract_edit_params.rb +23 -2
  30. data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +23 -1
  31. data/lib/metronome_sdk/resources/v1/alerts.rb +5 -0
  32. data/lib/metronome_sdk/resources/v1/audit_logs.rb +4 -1
  33. data/lib/metronome_sdk/resources/v1/billable_metrics.rb +5 -1
  34. data/lib/metronome_sdk/resources/v1/contracts/named_schedules.rb +2 -0
  35. data/lib/metronome_sdk/resources/v1/contracts/products.rb +4 -2
  36. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/named_schedules.rb +2 -0
  37. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rb +1 -0
  38. data/lib/metronome_sdk/resources/v1/contracts/rate_cards/rates.rb +7 -3
  39. data/lib/metronome_sdk/resources/v1/contracts/rate_cards.rb +10 -3
  40. data/lib/metronome_sdk/resources/v1/contracts.rb +8 -5
  41. data/lib/metronome_sdk/resources/v1/credit_grants.rb +9 -4
  42. data/lib/metronome_sdk/resources/v1/custom_fields.rb +6 -2
  43. data/lib/metronome_sdk/resources/v1/customers/alerts.rb +8 -2
  44. data/lib/metronome_sdk/resources/v1/customers/billing_config.rb +4 -0
  45. data/lib/metronome_sdk/resources/v1/customers/commits.rb +1 -0
  46. data/lib/metronome_sdk/resources/v1/customers/credits.rb +1 -0
  47. data/lib/metronome_sdk/resources/v1/customers/invoices.rb +10 -3
  48. data/lib/metronome_sdk/resources/v1/customers/named_schedules.rb +2 -0
  49. data/lib/metronome_sdk/resources/v1/customers/plans.rb +8 -2
  50. data/lib/metronome_sdk/resources/v1/customers.rb +27 -3
  51. data/lib/metronome_sdk/resources/v1/dashboards.rb +4 -0
  52. data/lib/metronome_sdk/resources/v1/invoices.rb +4 -0
  53. data/lib/metronome_sdk/resources/v1/packages.rb +269 -0
  54. data/lib/metronome_sdk/resources/v1/plans.rb +10 -3
  55. data/lib/metronome_sdk/resources/v1/pricing_units.rb +4 -1
  56. data/lib/metronome_sdk/resources/v1/services.rb +2 -0
  57. data/lib/metronome_sdk/resources/v1/settings/billing_providers.rb +2 -0
  58. data/lib/metronome_sdk/resources/v1/settings.rb +4 -0
  59. data/lib/metronome_sdk/resources/v1/usage.rb +26 -13
  60. data/lib/metronome_sdk/resources/v1.rb +41 -0
  61. data/lib/metronome_sdk/version.rb +1 -1
  62. data/lib/metronome_sdk.rb +11 -0
  63. data/rbi/metronome_sdk/internal/util.rbi +21 -1
  64. data/rbi/metronome_sdk/models/commit_rate.rbi +43 -2
  65. data/rbi/metronome_sdk/models/contract.rbi +0 -11
  66. data/rbi/metronome_sdk/models/contract_v2.rbi +46 -0
  67. data/rbi/metronome_sdk/models/overwrite_rate.rbi +37 -0
  68. data/rbi/metronome_sdk/models/payment_gate_config.rbi +0 -5
  69. data/rbi/metronome_sdk/models/payment_gate_config_v2.rbi +0 -5
  70. data/rbi/metronome_sdk/models/rate.rbi +35 -0
  71. data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +46 -5
  72. data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +46 -16
  73. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbi +46 -0
  74. data/rbi/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbi +46 -0
  75. data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +13 -0
  76. data/rbi/metronome_sdk/models/v1/package_archive_params.rbi +48 -0
  77. data/rbi/metronome_sdk/models/v1/package_archive_response.rbi +31 -0
  78. data/rbi/metronome_sdk/models/v1/package_create_params.rbi +6362 -0
  79. data/rbi/metronome_sdk/models/v1/package_create_response.rbi +31 -0
  80. data/rbi/metronome_sdk/models/v1/package_list_contracts_on_package_params.rbi +105 -0
  81. data/rbi/metronome_sdk/models/v1/package_list_contracts_on_package_response.rbi +70 -0
  82. data/rbi/metronome_sdk/models/v1/package_list_params.rbi +123 -0
  83. data/rbi/metronome_sdk/models/v1/package_list_response.rbi +5796 -0
  84. data/rbi/metronome_sdk/models/v1/package_retrieve_params.rbi +43 -0
  85. data/rbi/metronome_sdk/models/v1/package_retrieve_response.rbi +5864 -0
  86. data/rbi/metronome_sdk/models/v1/usage_list_with_groups_params.rbi +52 -0
  87. data/rbi/metronome_sdk/models/v1/usage_list_with_groups_response.rbi +24 -3
  88. data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +46 -5
  89. data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +46 -0
  90. data/rbi/metronome_sdk/resources/v1/alerts.rbi +5 -0
  91. data/rbi/metronome_sdk/resources/v1/audit_logs.rbi +2 -0
  92. data/rbi/metronome_sdk/resources/v1/billable_metrics.rbi +3 -0
  93. data/rbi/metronome_sdk/resources/v1/contracts/named_schedules.rbi +2 -0
  94. data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +1 -0
  95. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/named_schedules.rbi +2 -0
  96. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/product_orders.rbi +1 -0
  97. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbi +5 -0
  98. data/rbi/metronome_sdk/resources/v1/contracts/rate_cards.rbi +5 -0
  99. data/rbi/metronome_sdk/resources/v1/contracts.rbi +4 -3
  100. data/rbi/metronome_sdk/resources/v1/credit_grants.rbi +3 -0
  101. data/rbi/metronome_sdk/resources/v1/custom_fields.rbi +3 -0
  102. data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +5 -0
  103. data/rbi/metronome_sdk/resources/v1/customers/billing_config.rbi +4 -0
  104. data/rbi/metronome_sdk/resources/v1/customers/commits.rbi +1 -0
  105. data/rbi/metronome_sdk/resources/v1/customers/credits.rbi +1 -0
  106. data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +4 -0
  107. data/rbi/metronome_sdk/resources/v1/customers/named_schedules.rbi +2 -0
  108. data/rbi/metronome_sdk/resources/v1/customers/plans.rbi +4 -0
  109. data/rbi/metronome_sdk/resources/v1/customers.rbi +21 -0
  110. data/rbi/metronome_sdk/resources/v1/dashboards.rbi +4 -0
  111. data/rbi/metronome_sdk/resources/v1/invoices.rbi +4 -0
  112. data/rbi/metronome_sdk/resources/v1/packages.rbi +268 -0
  113. data/rbi/metronome_sdk/resources/v1/plans.rbi +4 -0
  114. data/rbi/metronome_sdk/resources/v1/pricing_units.rbi +2 -0
  115. data/rbi/metronome_sdk/resources/v1/services.rbi +2 -0
  116. data/rbi/metronome_sdk/resources/v1/settings/billing_providers.rbi +2 -0
  117. data/rbi/metronome_sdk/resources/v1/settings.rbi +4 -0
  118. data/rbi/metronome_sdk/resources/v1/usage.rbi +35 -8
  119. data/rbi/metronome_sdk/resources/v1.rbi +40 -0
  120. data/sig/metronome_sdk/internal/util.rbs +10 -0
  121. data/sig/metronome_sdk/models/commit_rate.rbs +19 -0
  122. data/sig/metronome_sdk/models/contract.rbs +0 -7
  123. data/sig/metronome_sdk/models/contract_v2.rbs +19 -0
  124. data/sig/metronome_sdk/models/overwrite_rate.rbs +19 -0
  125. data/sig/metronome_sdk/models/payment_gate_config.rbs +1 -2
  126. data/sig/metronome_sdk/models/payment_gate_config_v2.rbs +1 -2
  127. data/sig/metronome_sdk/models/rate.rbs +19 -0
  128. data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +20 -2
  129. data/sig/metronome_sdk/models/v1/contract_create_params.rbs +20 -9
  130. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_many_params.rbs +19 -0
  131. data/sig/metronome_sdk/models/v1/contracts/rate_cards/rate_add_params.rbs +19 -0
  132. data/sig/metronome_sdk/models/v1/customers/invoice.rbs +7 -0
  133. data/sig/metronome_sdk/models/v1/package_archive_params.rbs +26 -0
  134. data/sig/metronome_sdk/models/v1/package_archive_response.rbs +15 -0
  135. data/sig/metronome_sdk/models/v1/package_create_params.rbs +2532 -0
  136. data/sig/metronome_sdk/models/v1/package_create_response.rbs +15 -0
  137. data/sig/metronome_sdk/models/v1/package_list_contracts_on_package_params.rbs +63 -0
  138. data/sig/metronome_sdk/models/v1/package_list_contracts_on_package_response.rbs +46 -0
  139. data/sig/metronome_sdk/models/v1/package_list_params.rbs +58 -0
  140. data/sig/metronome_sdk/models/v1/package_list_response.rbs +2441 -0
  141. data/sig/metronome_sdk/models/v1/package_retrieve_params.rbs +26 -0
  142. data/sig/metronome_sdk/models/v1/package_retrieve_response.rbs +2467 -0
  143. data/sig/metronome_sdk/models/v1/usage_list_with_groups_params.rbs +16 -0
  144. data/sig/metronome_sdk/models/v1/usage_list_with_groups_response.rbs +10 -3
  145. data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +20 -2
  146. data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +19 -0
  147. data/sig/metronome_sdk/resources/v1/contracts/rate_cards/rates.rbs +1 -0
  148. data/sig/metronome_sdk/resources/v1/contracts.rbs +0 -1
  149. data/sig/metronome_sdk/resources/v1/packages.rbs +63 -0
  150. data/sig/metronome_sdk/resources/v1/usage.rbs +2 -0
  151. data/sig/metronome_sdk/resources/v1.rbs +2 -0
  152. metadata +35 -2
@@ -0,0 +1,2446 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MetronomeSDK
4
+ module Models
5
+ module V1
6
+ # @see MetronomeSDK::Resources::V1::Packages#list
7
+ class PackageListResponse < MetronomeSDK::Internal::Type::BaseModel
8
+ # @!attribute id
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute commits
14
+ #
15
+ # @return [Array<MetronomeSDK::Models::V1::PackageListResponse::Commit>]
16
+ required :commits,
17
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::PackageListResponse::Commit] }
18
+
19
+ # @!attribute created_at
20
+ #
21
+ # @return [Time]
22
+ required :created_at, Time
23
+
24
+ # @!attribute created_by
25
+ #
26
+ # @return [String]
27
+ required :created_by, String
28
+
29
+ # @!attribute overrides
30
+ #
31
+ # @return [Array<MetronomeSDK::Models::V1::PackageListResponse::Override>]
32
+ required :overrides,
33
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::PackageListResponse::Override] }
34
+
35
+ # @!attribute scheduled_charges
36
+ #
37
+ # @return [Array<MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge>]
38
+ required :scheduled_charges,
39
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge] }
40
+
41
+ # @!attribute usage_statement_schedule
42
+ #
43
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::UsageStatementSchedule]
44
+ required :usage_statement_schedule,
45
+ -> { MetronomeSDK::Models::V1::PackageListResponse::UsageStatementSchedule }
46
+
47
+ # @!attribute aliases
48
+ #
49
+ # @return [Array<MetronomeSDK::Models::V1::PackageListResponse::Alias>, nil]
50
+ optional :aliases,
51
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::PackageListResponse::Alias] }
52
+
53
+ # @!attribute archived_at
54
+ #
55
+ # @return [Time, nil]
56
+ optional :archived_at, Time
57
+
58
+ # @!attribute billing_provider
59
+ #
60
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::BillingProvider, nil]
61
+ optional :billing_provider, enum: -> { MetronomeSDK::Models::V1::PackageListResponse::BillingProvider }
62
+
63
+ # @!attribute credits
64
+ #
65
+ # @return [Array<MetronomeSDK::Models::V1::PackageListResponse::Credit>, nil]
66
+ optional :credits,
67
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::PackageListResponse::Credit] }
68
+
69
+ # @!attribute delivery_method
70
+ #
71
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::DeliveryMethod, nil]
72
+ optional :delivery_method, enum: -> { MetronomeSDK::Models::V1::PackageListResponse::DeliveryMethod }
73
+
74
+ # @!attribute duration
75
+ #
76
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::Duration, nil]
77
+ optional :duration, -> { MetronomeSDK::Models::V1::PackageListResponse::Duration }
78
+
79
+ # @!attribute multiplier_override_prioritization
80
+ # Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
81
+ # prices automatically. EXPLICIT prioritization requires specifying priorities for
82
+ # each multiplier; the one with the lowest priority value will be prioritized
83
+ # first.
84
+ #
85
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::MultiplierOverridePrioritization, nil]
86
+ optional :multiplier_override_prioritization,
87
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::MultiplierOverridePrioritization }
88
+
89
+ # @!attribute name
90
+ #
91
+ # @return [String, nil]
92
+ optional :name, String
93
+
94
+ # @!attribute net_payment_terms_days
95
+ #
96
+ # @return [Float, nil]
97
+ optional :net_payment_terms_days, Float
98
+
99
+ # @!attribute prepaid_balance_threshold_configuration
100
+ #
101
+ # @return [MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration, nil]
102
+ optional :prepaid_balance_threshold_configuration,
103
+ -> { MetronomeSDK::PrepaidBalanceThresholdConfiguration }
104
+
105
+ # @!attribute rate_card_id
106
+ #
107
+ # @return [String, nil]
108
+ optional :rate_card_id, String
109
+
110
+ # @!attribute recurring_commits
111
+ #
112
+ # @return [Array<MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit>, nil]
113
+ optional :recurring_commits,
114
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit] }
115
+
116
+ # @!attribute recurring_credits
117
+ #
118
+ # @return [Array<MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit>, nil]
119
+ optional :recurring_credits,
120
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit] }
121
+
122
+ # @!attribute scheduled_charges_on_usage_invoices
123
+ # Determines which scheduled and commit charges to consolidate onto the Contract's
124
+ # usage invoice. The charge's `timestamp` must match the usage invoice's
125
+ # `ending_before` date for consolidation to occur. This field cannot be modified
126
+ # after a Contract has been created. If this field is omitted, charges will appear
127
+ # on a separate invoice from usage charges.
128
+ #
129
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::ScheduledChargesOnUsageInvoices, nil]
130
+ optional :scheduled_charges_on_usage_invoices,
131
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::ScheduledChargesOnUsageInvoices }
132
+
133
+ # @!attribute spend_threshold_configuration
134
+ #
135
+ # @return [MetronomeSDK::Models::SpendThresholdConfiguration, nil]
136
+ optional :spend_threshold_configuration, -> { MetronomeSDK::SpendThresholdConfiguration }
137
+
138
+ # @!attribute subscriptions
139
+ #
140
+ # @return [Array<MetronomeSDK::Models::V1::PackageListResponse::Subscription>, nil]
141
+ optional :subscriptions,
142
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::PackageListResponse::Subscription] }
143
+
144
+ # @!attribute uniqueness_key
145
+ # Prevents the creation of duplicates. If a request to create a record is made
146
+ # with a previously used uniqueness key, a new record will not be created and the
147
+ # request will fail with a 409 error.
148
+ #
149
+ # @return [String, nil]
150
+ optional :uniqueness_key, String
151
+
152
+ # @!method initialize(id:, commits:, created_at:, created_by:, overrides:, scheduled_charges:, usage_statement_schedule:, aliases: nil, archived_at: nil, billing_provider: nil, credits: nil, delivery_method: nil, duration: nil, multiplier_override_prioritization: nil, name: nil, net_payment_terms_days: 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)
153
+ # Some parameter documentations has been truncated, see
154
+ # {MetronomeSDK::Models::V1::PackageListResponse} for more details.
155
+ #
156
+ # @param id [String]
157
+ #
158
+ # @param commits [Array<MetronomeSDK::Models::V1::PackageListResponse::Commit>]
159
+ #
160
+ # @param created_at [Time]
161
+ #
162
+ # @param created_by [String]
163
+ #
164
+ # @param overrides [Array<MetronomeSDK::Models::V1::PackageListResponse::Override>]
165
+ #
166
+ # @param scheduled_charges [Array<MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge>]
167
+ #
168
+ # @param usage_statement_schedule [MetronomeSDK::Models::V1::PackageListResponse::UsageStatementSchedule]
169
+ #
170
+ # @param aliases [Array<MetronomeSDK::Models::V1::PackageListResponse::Alias>]
171
+ #
172
+ # @param archived_at [Time]
173
+ #
174
+ # @param billing_provider [Symbol, MetronomeSDK::Models::V1::PackageListResponse::BillingProvider]
175
+ #
176
+ # @param credits [Array<MetronomeSDK::Models::V1::PackageListResponse::Credit>]
177
+ #
178
+ # @param delivery_method [Symbol, MetronomeSDK::Models::V1::PackageListResponse::DeliveryMethod]
179
+ #
180
+ # @param duration [MetronomeSDK::Models::V1::PackageListResponse::Duration]
181
+ #
182
+ # @param multiplier_override_prioritization [Symbol, MetronomeSDK::Models::V1::PackageListResponse::MultiplierOverridePrioritization] Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list price
183
+ #
184
+ # @param name [String]
185
+ #
186
+ # @param net_payment_terms_days [Float]
187
+ #
188
+ # @param prepaid_balance_threshold_configuration [MetronomeSDK::Models::PrepaidBalanceThresholdConfiguration]
189
+ #
190
+ # @param rate_card_id [String]
191
+ #
192
+ # @param recurring_commits [Array<MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit>]
193
+ #
194
+ # @param recurring_credits [Array<MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit>]
195
+ #
196
+ # @param scheduled_charges_on_usage_invoices [Symbol, MetronomeSDK::Models::V1::PackageListResponse::ScheduledChargesOnUsageInvoices] Determines which scheduled and commit charges to consolidate onto the Contract's
197
+ #
198
+ # @param spend_threshold_configuration [MetronomeSDK::Models::SpendThresholdConfiguration]
199
+ #
200
+ # @param subscriptions [Array<MetronomeSDK::Models::V1::PackageListResponse::Subscription>]
201
+ #
202
+ # @param uniqueness_key [String] Prevents the creation of duplicates. If a request to create a record is made wit
203
+
204
+ class Commit < MetronomeSDK::Internal::Type::BaseModel
205
+ # @!attribute id
206
+ #
207
+ # @return [String]
208
+ required :id, String
209
+
210
+ # @!attribute product
211
+ #
212
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::Commit::Product]
213
+ required :product, -> { MetronomeSDK::Models::V1::PackageListResponse::Commit::Product }
214
+
215
+ # @!attribute type
216
+ #
217
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Commit::Type]
218
+ required :type, enum: -> { MetronomeSDK::Models::V1::PackageListResponse::Commit::Type }
219
+
220
+ # @!attribute access_schedule
221
+ # The schedule that the customer will gain access to the credits purposed with
222
+ # this commit.
223
+ #
224
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule, nil]
225
+ optional :access_schedule, -> { MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule }
226
+
227
+ # @!attribute applicable_product_ids
228
+ #
229
+ # @return [Array<String>, nil]
230
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
231
+
232
+ # @!attribute applicable_product_tags
233
+ #
234
+ # @return [Array<String>, nil]
235
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
236
+
237
+ # @!attribute custom_fields
238
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
239
+ #
240
+ # @return [Hash{Symbol=>String}, nil]
241
+ optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
242
+
243
+ # @!attribute description
244
+ #
245
+ # @return [String, nil]
246
+ optional :description, String
247
+
248
+ # @!attribute invoice_schedule
249
+ # The schedule that the customer will be invoiced for this commit.
250
+ #
251
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::Commit::InvoiceSchedule, nil]
252
+ optional :invoice_schedule, -> { MetronomeSDK::Models::V1::PackageListResponse::Commit::InvoiceSchedule }
253
+
254
+ # @!attribute name
255
+ #
256
+ # @return [String, nil]
257
+ optional :name, String
258
+
259
+ # @!attribute priority
260
+ # If multiple credits or commits are applicable, the one with the lower priority
261
+ # will apply first.
262
+ #
263
+ # @return [Float, nil]
264
+ optional :priority, Float
265
+
266
+ # @!attribute rate_type
267
+ #
268
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Commit::RateType, nil]
269
+ optional :rate_type, enum: -> { MetronomeSDK::Models::V1::PackageListResponse::Commit::RateType }
270
+
271
+ # @!attribute rollover_fraction
272
+ #
273
+ # @return [Float, nil]
274
+ optional :rollover_fraction, Float
275
+
276
+ # @!attribute specifiers
277
+ # List of filters that determine what kind of customer usage draws down a commit
278
+ # or credit. A customer's usage needs to meet the condition of at least one of the
279
+ # specifiers to contribute to a commit's or credit's drawdown.
280
+ #
281
+ # @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
282
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
283
+
284
+ # @!method initialize(id:, product:, type:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, custom_fields: nil, description: nil, invoice_schedule: nil, name: nil, priority: nil, rate_type: nil, rollover_fraction: nil, specifiers: nil)
285
+ # Some parameter documentations has been truncated, see
286
+ # {MetronomeSDK::Models::V1::PackageListResponse::Commit} for more details.
287
+ #
288
+ # @param id [String]
289
+ #
290
+ # @param product [MetronomeSDK::Models::V1::PackageListResponse::Commit::Product]
291
+ #
292
+ # @param type [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Commit::Type]
293
+ #
294
+ # @param access_schedule [MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule] The schedule that the customer will gain access to the credits purposed with thi
295
+ #
296
+ # @param applicable_product_ids [Array<String>]
297
+ #
298
+ # @param applicable_product_tags [Array<String>]
299
+ #
300
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
301
+ #
302
+ # @param description [String]
303
+ #
304
+ # @param invoice_schedule [MetronomeSDK::Models::V1::PackageListResponse::Commit::InvoiceSchedule] The schedule that the customer will be invoiced for this commit.
305
+ #
306
+ # @param name [String]
307
+ #
308
+ # @param priority [Float] If multiple credits or commits are applicable, the one with the lower priority w
309
+ #
310
+ # @param rate_type [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Commit::RateType]
311
+ #
312
+ # @param rollover_fraction [Float]
313
+ #
314
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
315
+
316
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Commit#product
317
+ class Product < MetronomeSDK::Internal::Type::BaseModel
318
+ # @!attribute id
319
+ #
320
+ # @return [String]
321
+ required :id, String
322
+
323
+ # @!attribute name
324
+ #
325
+ # @return [String]
326
+ required :name, String
327
+
328
+ # @!method initialize(id:, name:)
329
+ # @param id [String]
330
+ # @param name [String]
331
+ end
332
+
333
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Commit#type
334
+ module Type
335
+ extend MetronomeSDK::Internal::Type::Enum
336
+
337
+ PREPAID = :PREPAID
338
+ POSTPAID = :POSTPAID
339
+
340
+ # @!method self.values
341
+ # @return [Array<Symbol>]
342
+ end
343
+
344
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Commit#access_schedule
345
+ class AccessSchedule < MetronomeSDK::Internal::Type::BaseModel
346
+ # @!attribute credit_type
347
+ #
348
+ # @return [MetronomeSDK::Models::CreditTypeData]
349
+ required :credit_type, -> { MetronomeSDK::CreditTypeData }
350
+
351
+ # @!attribute schedule_items
352
+ #
353
+ # @return [Array<MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule::ScheduleItem>]
354
+ required :schedule_items,
355
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule::ScheduleItem] }
356
+
357
+ # @!method initialize(credit_type:, schedule_items:)
358
+ # The schedule that the customer will gain access to the credits purposed with
359
+ # this commit.
360
+ #
361
+ # @param credit_type [MetronomeSDK::Models::CreditTypeData]
362
+ # @param schedule_items [Array<MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule::ScheduleItem>]
363
+
364
+ class ScheduleItem < MetronomeSDK::Internal::Type::BaseModel
365
+ # @!attribute id
366
+ #
367
+ # @return [String]
368
+ required :id, String
369
+
370
+ # @!attribute amount
371
+ #
372
+ # @return [Float]
373
+ required :amount, Float
374
+
375
+ # @!attribute duration
376
+ #
377
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule::ScheduleItem::Duration]
378
+ required :duration,
379
+ -> { MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule::ScheduleItem::Duration }
380
+
381
+ # @!attribute starting_at_offset
382
+ #
383
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule::ScheduleItem::StartingAtOffset]
384
+ required :starting_at_offset,
385
+ -> { MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule::ScheduleItem::StartingAtOffset }
386
+
387
+ # @!method initialize(id:, amount:, duration:, starting_at_offset:)
388
+ # @param id [String]
389
+ # @param amount [Float]
390
+ # @param duration [MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule::ScheduleItem::Duration]
391
+ # @param starting_at_offset [MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule::ScheduleItem::StartingAtOffset]
392
+
393
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule::ScheduleItem#duration
394
+ class Duration < MetronomeSDK::Internal::Type::BaseModel
395
+ # @!attribute unit
396
+ #
397
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule::ScheduleItem::Duration::Unit]
398
+ required :unit,
399
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule::ScheduleItem::Duration::Unit }
400
+
401
+ # @!attribute value
402
+ #
403
+ # @return [Integer]
404
+ required :value, Integer
405
+
406
+ # @!method initialize(unit:, value:)
407
+ # @param unit [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule::ScheduleItem::Duration::Unit]
408
+ # @param value [Integer]
409
+
410
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule::ScheduleItem::Duration#unit
411
+ module Unit
412
+ extend MetronomeSDK::Internal::Type::Enum
413
+
414
+ DAYS = :DAYS
415
+ WEEKS = :WEEKS
416
+ MONTHS = :MONTHS
417
+ YEARS = :YEARS
418
+
419
+ # @!method self.values
420
+ # @return [Array<Symbol>]
421
+ end
422
+ end
423
+
424
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule::ScheduleItem#starting_at_offset
425
+ class StartingAtOffset < MetronomeSDK::Internal::Type::BaseModel
426
+ # @!attribute unit
427
+ #
428
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule::ScheduleItem::StartingAtOffset::Unit]
429
+ required :unit,
430
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule::ScheduleItem::StartingAtOffset::Unit }
431
+
432
+ # @!attribute value
433
+ #
434
+ # @return [Integer]
435
+ required :value, Integer
436
+
437
+ # @!method initialize(unit:, value:)
438
+ # @param unit [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule::ScheduleItem::StartingAtOffset::Unit]
439
+ # @param value [Integer]
440
+
441
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Commit::AccessSchedule::ScheduleItem::StartingAtOffset#unit
442
+ module Unit
443
+ extend MetronomeSDK::Internal::Type::Enum
444
+
445
+ DAYS = :DAYS
446
+ WEEKS = :WEEKS
447
+ MONTHS = :MONTHS
448
+ YEARS = :YEARS
449
+
450
+ # @!method self.values
451
+ # @return [Array<Symbol>]
452
+ end
453
+ end
454
+ end
455
+ end
456
+
457
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Commit#invoice_schedule
458
+ class InvoiceSchedule < MetronomeSDK::Internal::Type::BaseModel
459
+ # @!attribute credit_type
460
+ #
461
+ # @return [MetronomeSDK::Models::CreditTypeData]
462
+ required :credit_type, -> { MetronomeSDK::CreditTypeData }
463
+
464
+ # @!attribute do_not_invoice
465
+ # If true, this schedule will not generate an invoice.
466
+ #
467
+ # @return [Boolean]
468
+ required :do_not_invoice, MetronomeSDK::Internal::Type::Boolean
469
+
470
+ # @!attribute schedule_items
471
+ #
472
+ # @return [Array<MetronomeSDK::Models::V1::PackageListResponse::Commit::InvoiceSchedule::ScheduleItem>]
473
+ required :schedule_items,
474
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::PackageListResponse::Commit::InvoiceSchedule::ScheduleItem] }
475
+
476
+ # @!method initialize(credit_type:, do_not_invoice:, schedule_items:)
477
+ # The schedule that the customer will be invoiced for this commit.
478
+ #
479
+ # @param credit_type [MetronomeSDK::Models::CreditTypeData]
480
+ #
481
+ # @param do_not_invoice [Boolean] If true, this schedule will not generate an invoice.
482
+ #
483
+ # @param schedule_items [Array<MetronomeSDK::Models::V1::PackageListResponse::Commit::InvoiceSchedule::ScheduleItem>]
484
+
485
+ class ScheduleItem < MetronomeSDK::Internal::Type::BaseModel
486
+ # @!attribute id
487
+ #
488
+ # @return [String]
489
+ required :id, String
490
+
491
+ # @!attribute date_offset
492
+ #
493
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::Commit::InvoiceSchedule::ScheduleItem::DateOffset]
494
+ required :date_offset,
495
+ -> { MetronomeSDK::Models::V1::PackageListResponse::Commit::InvoiceSchedule::ScheduleItem::DateOffset }
496
+
497
+ # @!attribute quantity
498
+ #
499
+ # @return [Float]
500
+ required :quantity, Float
501
+
502
+ # @!attribute unit_price
503
+ #
504
+ # @return [Float]
505
+ required :unit_price, Float
506
+
507
+ # @!method initialize(id:, date_offset:, quantity:, unit_price:)
508
+ # @param id [String]
509
+ # @param date_offset [MetronomeSDK::Models::V1::PackageListResponse::Commit::InvoiceSchedule::ScheduleItem::DateOffset]
510
+ # @param quantity [Float]
511
+ # @param unit_price [Float]
512
+
513
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Commit::InvoiceSchedule::ScheduleItem#date_offset
514
+ class DateOffset < MetronomeSDK::Internal::Type::BaseModel
515
+ # @!attribute unit
516
+ #
517
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Commit::InvoiceSchedule::ScheduleItem::DateOffset::Unit]
518
+ required :unit,
519
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::Commit::InvoiceSchedule::ScheduleItem::DateOffset::Unit }
520
+
521
+ # @!attribute value
522
+ #
523
+ # @return [Integer]
524
+ required :value, Integer
525
+
526
+ # @!method initialize(unit:, value:)
527
+ # @param unit [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Commit::InvoiceSchedule::ScheduleItem::DateOffset::Unit]
528
+ # @param value [Integer]
529
+
530
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Commit::InvoiceSchedule::ScheduleItem::DateOffset#unit
531
+ module Unit
532
+ extend MetronomeSDK::Internal::Type::Enum
533
+
534
+ DAYS = :DAYS
535
+ WEEKS = :WEEKS
536
+ MONTHS = :MONTHS
537
+ YEARS = :YEARS
538
+
539
+ # @!method self.values
540
+ # @return [Array<Symbol>]
541
+ end
542
+ end
543
+ end
544
+ end
545
+
546
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Commit#rate_type
547
+ module RateType
548
+ extend MetronomeSDK::Internal::Type::Enum
549
+
550
+ COMMIT_RATE = :COMMIT_RATE
551
+ LIST_RATE = :LIST_RATE
552
+
553
+ # @!method self.values
554
+ # @return [Array<Symbol>]
555
+ end
556
+ end
557
+
558
+ class Override < MetronomeSDK::Internal::Type::BaseModel
559
+ # @!attribute id
560
+ #
561
+ # @return [String]
562
+ required :id, String
563
+
564
+ # @!attribute override_specifiers
565
+ #
566
+ # @return [Array<MetronomeSDK::Models::V1::PackageListResponse::Override::OverrideSpecifier>]
567
+ required :override_specifiers,
568
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::PackageListResponse::Override::OverrideSpecifier] }
569
+
570
+ # @!attribute starting_at_offset
571
+ #
572
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::Override::StartingAtOffset]
573
+ required :starting_at_offset,
574
+ -> { MetronomeSDK::Models::V1::PackageListResponse::Override::StartingAtOffset }
575
+
576
+ # @!attribute applicable_product_tags
577
+ #
578
+ # @return [Array<String>, nil]
579
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
580
+
581
+ # @!attribute duration
582
+ #
583
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::Override::Duration, nil]
584
+ optional :duration, -> { MetronomeSDK::Models::V1::PackageListResponse::Override::Duration }
585
+
586
+ # @!attribute entitled
587
+ #
588
+ # @return [Boolean, nil]
589
+ optional :entitled, MetronomeSDK::Internal::Type::Boolean
590
+
591
+ # @!attribute is_commit_specific
592
+ #
593
+ # @return [Boolean, nil]
594
+ optional :is_commit_specific, MetronomeSDK::Internal::Type::Boolean
595
+
596
+ # @!attribute multiplier
597
+ #
598
+ # @return [Float, nil]
599
+ optional :multiplier, Float
600
+
601
+ # @!attribute override_tiers
602
+ #
603
+ # @return [Array<MetronomeSDK::Models::OverrideTier>, nil]
604
+ optional :override_tiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::OverrideTier] }
605
+
606
+ # @!attribute overwrite_rate
607
+ #
608
+ # @return [MetronomeSDK::Models::OverwriteRate, nil]
609
+ optional :overwrite_rate, -> { MetronomeSDK::OverwriteRate }
610
+
611
+ # @!attribute priority
612
+ #
613
+ # @return [Float, nil]
614
+ optional :priority, Float
615
+
616
+ # @!attribute product
617
+ #
618
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::Override::Product, nil]
619
+ optional :product, -> { MetronomeSDK::Models::V1::PackageListResponse::Override::Product }
620
+
621
+ # @!attribute target
622
+ #
623
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Override::Target, nil]
624
+ optional :target, enum: -> { MetronomeSDK::Models::V1::PackageListResponse::Override::Target }
625
+
626
+ # @!attribute type
627
+ #
628
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Override::Type, nil]
629
+ optional :type, enum: -> { MetronomeSDK::Models::V1::PackageListResponse::Override::Type }
630
+
631
+ # @!method initialize(id:, override_specifiers:, starting_at_offset:, applicable_product_tags: nil, duration: nil, entitled: nil, is_commit_specific: nil, multiplier: nil, override_tiers: nil, overwrite_rate: nil, priority: nil, product: nil, target: nil, type: nil)
632
+ # @param id [String]
633
+ # @param override_specifiers [Array<MetronomeSDK::Models::V1::PackageListResponse::Override::OverrideSpecifier>]
634
+ # @param starting_at_offset [MetronomeSDK::Models::V1::PackageListResponse::Override::StartingAtOffset]
635
+ # @param applicable_product_tags [Array<String>]
636
+ # @param duration [MetronomeSDK::Models::V1::PackageListResponse::Override::Duration]
637
+ # @param entitled [Boolean]
638
+ # @param is_commit_specific [Boolean]
639
+ # @param multiplier [Float]
640
+ # @param override_tiers [Array<MetronomeSDK::Models::OverrideTier>]
641
+ # @param overwrite_rate [MetronomeSDK::Models::OverwriteRate]
642
+ # @param priority [Float]
643
+ # @param product [MetronomeSDK::Models::V1::PackageListResponse::Override::Product]
644
+ # @param target [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Override::Target]
645
+ # @param type [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Override::Type]
646
+
647
+ class OverrideSpecifier < MetronomeSDK::Internal::Type::BaseModel
648
+ # @!attribute billing_frequency
649
+ #
650
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Override::OverrideSpecifier::BillingFrequency, nil]
651
+ optional :billing_frequency,
652
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::Override::OverrideSpecifier::BillingFrequency }
653
+
654
+ # @!attribute commit_template_ids
655
+ #
656
+ # @return [Array<String>, nil]
657
+ optional :commit_template_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
658
+
659
+ # @!attribute presentation_group_values
660
+ #
661
+ # @return [Hash{Symbol=>String, nil}, nil]
662
+ optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String, nil?: true]
663
+
664
+ # @!attribute pricing_group_values
665
+ #
666
+ # @return [Hash{Symbol=>String}, nil]
667
+ optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]
668
+
669
+ # @!attribute product_id
670
+ #
671
+ # @return [String, nil]
672
+ optional :product_id, String
673
+
674
+ # @!attribute product_tags
675
+ #
676
+ # @return [Array<String>, nil]
677
+ optional :product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
678
+
679
+ # @!attribute recurring_commit_template_ids
680
+ #
681
+ # @return [Array<String>, nil]
682
+ optional :recurring_commit_template_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
683
+
684
+ # @!attribute recurring_credit_template_ids
685
+ #
686
+ # @return [Array<String>, nil]
687
+ optional :recurring_credit_template_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
688
+
689
+ # @!method initialize(billing_frequency: nil, commit_template_ids: nil, presentation_group_values: nil, pricing_group_values: nil, product_id: nil, product_tags: nil, recurring_commit_template_ids: nil, recurring_credit_template_ids: nil)
690
+ # @param billing_frequency [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Override::OverrideSpecifier::BillingFrequency]
691
+ # @param commit_template_ids [Array<String>]
692
+ # @param presentation_group_values [Hash{Symbol=>String, nil}]
693
+ # @param pricing_group_values [Hash{Symbol=>String}]
694
+ # @param product_id [String]
695
+ # @param product_tags [Array<String>]
696
+ # @param recurring_commit_template_ids [Array<String>]
697
+ # @param recurring_credit_template_ids [Array<String>]
698
+
699
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Override::OverrideSpecifier#billing_frequency
700
+ module BillingFrequency
701
+ extend MetronomeSDK::Internal::Type::Enum
702
+
703
+ MONTHLY = :MONTHLY
704
+ QUARTERLY = :QUARTERLY
705
+ ANNUAL = :ANNUAL
706
+ WEEKLY = :WEEKLY
707
+
708
+ # @!method self.values
709
+ # @return [Array<Symbol>]
710
+ end
711
+ end
712
+
713
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Override#starting_at_offset
714
+ class StartingAtOffset < MetronomeSDK::Internal::Type::BaseModel
715
+ # @!attribute unit
716
+ #
717
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Override::StartingAtOffset::Unit]
718
+ required :unit,
719
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::Override::StartingAtOffset::Unit }
720
+
721
+ # @!attribute value
722
+ #
723
+ # @return [Integer]
724
+ required :value, Integer
725
+
726
+ # @!method initialize(unit:, value:)
727
+ # @param unit [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Override::StartingAtOffset::Unit]
728
+ # @param value [Integer]
729
+
730
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Override::StartingAtOffset#unit
731
+ module Unit
732
+ extend MetronomeSDK::Internal::Type::Enum
733
+
734
+ DAYS = :DAYS
735
+ WEEKS = :WEEKS
736
+ MONTHS = :MONTHS
737
+ YEARS = :YEARS
738
+
739
+ # @!method self.values
740
+ # @return [Array<Symbol>]
741
+ end
742
+ end
743
+
744
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Override#duration
745
+ class Duration < MetronomeSDK::Internal::Type::BaseModel
746
+ # @!attribute unit
747
+ #
748
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Override::Duration::Unit]
749
+ required :unit, enum: -> { MetronomeSDK::Models::V1::PackageListResponse::Override::Duration::Unit }
750
+
751
+ # @!attribute value
752
+ #
753
+ # @return [Integer]
754
+ required :value, Integer
755
+
756
+ # @!method initialize(unit:, value:)
757
+ # @param unit [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Override::Duration::Unit]
758
+ # @param value [Integer]
759
+
760
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Override::Duration#unit
761
+ module Unit
762
+ extend MetronomeSDK::Internal::Type::Enum
763
+
764
+ DAYS = :DAYS
765
+ WEEKS = :WEEKS
766
+ MONTHS = :MONTHS
767
+ YEARS = :YEARS
768
+
769
+ # @!method self.values
770
+ # @return [Array<Symbol>]
771
+ end
772
+ end
773
+
774
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Override#product
775
+ class Product < MetronomeSDK::Internal::Type::BaseModel
776
+ # @!attribute id
777
+ #
778
+ # @return [String]
779
+ required :id, String
780
+
781
+ # @!attribute name
782
+ #
783
+ # @return [String]
784
+ required :name, String
785
+
786
+ # @!method initialize(id:, name:)
787
+ # @param id [String]
788
+ # @param name [String]
789
+ end
790
+
791
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Override#target
792
+ module Target
793
+ extend MetronomeSDK::Internal::Type::Enum
794
+
795
+ COMMIT_RATE = :COMMIT_RATE
796
+ LIST_RATE = :LIST_RATE
797
+
798
+ # @!method self.values
799
+ # @return [Array<Symbol>]
800
+ end
801
+
802
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Override#type
803
+ module Type
804
+ extend MetronomeSDK::Internal::Type::Enum
805
+
806
+ OVERWRITE = :OVERWRITE
807
+ MULTIPLIER = :MULTIPLIER
808
+ TIERED = :TIERED
809
+
810
+ # @!method self.values
811
+ # @return [Array<Symbol>]
812
+ end
813
+ end
814
+
815
+ class ScheduledCharge < MetronomeSDK::Internal::Type::BaseModel
816
+ # @!attribute id
817
+ #
818
+ # @return [String]
819
+ required :id, String
820
+
821
+ # @!attribute product
822
+ #
823
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge::Product]
824
+ required :product, -> { MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge::Product }
825
+
826
+ # @!attribute schedule
827
+ #
828
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge::Schedule]
829
+ required :schedule, -> { MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge::Schedule }
830
+
831
+ # @!attribute custom_fields
832
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
833
+ #
834
+ # @return [Hash{Symbol=>String}, nil]
835
+ optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
836
+
837
+ # @!attribute description
838
+ #
839
+ # @return [String, nil]
840
+ optional :description, String
841
+
842
+ # @!attribute name
843
+ #
844
+ # @return [String, nil]
845
+ optional :name, String
846
+
847
+ # @!method initialize(id:, product:, schedule:, custom_fields: nil, description: nil, name: nil)
848
+ # @param id [String]
849
+ #
850
+ # @param product [MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge::Product]
851
+ #
852
+ # @param schedule [MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge::Schedule]
853
+ #
854
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
855
+ #
856
+ # @param description [String]
857
+ #
858
+ # @param name [String]
859
+
860
+ # @see MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge#product
861
+ class Product < MetronomeSDK::Internal::Type::BaseModel
862
+ # @!attribute id
863
+ #
864
+ # @return [String]
865
+ required :id, String
866
+
867
+ # @!attribute name
868
+ #
869
+ # @return [String]
870
+ required :name, String
871
+
872
+ # @!method initialize(id:, name:)
873
+ # @param id [String]
874
+ # @param name [String]
875
+ end
876
+
877
+ # @see MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge#schedule
878
+ class Schedule < MetronomeSDK::Internal::Type::BaseModel
879
+ # @!attribute credit_type
880
+ #
881
+ # @return [MetronomeSDK::Models::CreditTypeData]
882
+ required :credit_type, -> { MetronomeSDK::CreditTypeData }
883
+
884
+ # @!attribute schedule_items
885
+ #
886
+ # @return [Array<MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge::Schedule::ScheduleItem>]
887
+ required :schedule_items,
888
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge::Schedule::ScheduleItem] }
889
+
890
+ # @!method initialize(credit_type:, schedule_items:)
891
+ # @param credit_type [MetronomeSDK::Models::CreditTypeData]
892
+ # @param schedule_items [Array<MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge::Schedule::ScheduleItem>]
893
+
894
+ class ScheduleItem < MetronomeSDK::Internal::Type::BaseModel
895
+ # @!attribute id
896
+ #
897
+ # @return [String]
898
+ required :id, String
899
+
900
+ # @!attribute date_offset
901
+ #
902
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge::Schedule::ScheduleItem::DateOffset]
903
+ required :date_offset,
904
+ -> { MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge::Schedule::ScheduleItem::DateOffset }
905
+
906
+ # @!attribute quantity
907
+ #
908
+ # @return [Float]
909
+ required :quantity, Float
910
+
911
+ # @!attribute unit_price
912
+ #
913
+ # @return [Float]
914
+ required :unit_price, Float
915
+
916
+ # @!method initialize(id:, date_offset:, quantity:, unit_price:)
917
+ # @param id [String]
918
+ # @param date_offset [MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge::Schedule::ScheduleItem::DateOffset]
919
+ # @param quantity [Float]
920
+ # @param unit_price [Float]
921
+
922
+ # @see MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge::Schedule::ScheduleItem#date_offset
923
+ class DateOffset < MetronomeSDK::Internal::Type::BaseModel
924
+ # @!attribute unit
925
+ #
926
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge::Schedule::ScheduleItem::DateOffset::Unit]
927
+ required :unit,
928
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge::Schedule::ScheduleItem::DateOffset::Unit }
929
+
930
+ # @!attribute value
931
+ #
932
+ # @return [Integer]
933
+ required :value, Integer
934
+
935
+ # @!method initialize(unit:, value:)
936
+ # @param unit [Symbol, MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge::Schedule::ScheduleItem::DateOffset::Unit]
937
+ # @param value [Integer]
938
+
939
+ # @see MetronomeSDK::Models::V1::PackageListResponse::ScheduledCharge::Schedule::ScheduleItem::DateOffset#unit
940
+ module Unit
941
+ extend MetronomeSDK::Internal::Type::Enum
942
+
943
+ DAYS = :DAYS
944
+ WEEKS = :WEEKS
945
+ MONTHS = :MONTHS
946
+ YEARS = :YEARS
947
+
948
+ # @!method self.values
949
+ # @return [Array<Symbol>]
950
+ end
951
+ end
952
+ end
953
+ end
954
+ end
955
+
956
+ # @see MetronomeSDK::Models::V1::PackageListResponse#usage_statement_schedule
957
+ class UsageStatementSchedule < MetronomeSDK::Internal::Type::BaseModel
958
+ # @!attribute frequency
959
+ #
960
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::UsageStatementSchedule::Frequency]
961
+ required :frequency,
962
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::UsageStatementSchedule::Frequency }
963
+
964
+ # @!method initialize(frequency:)
965
+ # @param frequency [Symbol, MetronomeSDK::Models::V1::PackageListResponse::UsageStatementSchedule::Frequency]
966
+
967
+ # @see MetronomeSDK::Models::V1::PackageListResponse::UsageStatementSchedule#frequency
968
+ module Frequency
969
+ extend MetronomeSDK::Internal::Type::Enum
970
+
971
+ MONTHLY = :MONTHLY
972
+ QUARTERLY = :QUARTERLY
973
+ ANNUAL = :ANNUAL
974
+ WEEKLY = :WEEKLY
975
+
976
+ # @!method self.values
977
+ # @return [Array<Symbol>]
978
+ end
979
+ end
980
+
981
+ class Alias < MetronomeSDK::Internal::Type::BaseModel
982
+ # @!attribute name
983
+ #
984
+ # @return [String]
985
+ required :name, String
986
+
987
+ # @!attribute ending_before
988
+ #
989
+ # @return [Time, nil]
990
+ optional :ending_before, Time
991
+
992
+ # @!attribute starting_at
993
+ #
994
+ # @return [Time, nil]
995
+ optional :starting_at, Time
996
+
997
+ # @!method initialize(name:, ending_before: nil, starting_at: nil)
998
+ # @param name [String]
999
+ # @param ending_before [Time]
1000
+ # @param starting_at [Time]
1001
+ end
1002
+
1003
+ # @see MetronomeSDK::Models::V1::PackageListResponse#billing_provider
1004
+ module BillingProvider
1005
+ extend MetronomeSDK::Internal::Type::Enum
1006
+
1007
+ AWS_MARKETPLACE = :aws_marketplace
1008
+ STRIPE = :stripe
1009
+ NETSUITE = :netsuite
1010
+ CUSTOM = :custom
1011
+ AZURE_MARKETPLACE = :azure_marketplace
1012
+ QUICKBOOKS_ONLINE = :quickbooks_online
1013
+ WORKDAY = :workday
1014
+ GCP_MARKETPLACE = :gcp_marketplace
1015
+ METRONOME = :metronome
1016
+
1017
+ # @!method self.values
1018
+ # @return [Array<Symbol>]
1019
+ end
1020
+
1021
+ class Credit < MetronomeSDK::Internal::Type::BaseModel
1022
+ # @!attribute id
1023
+ #
1024
+ # @return [String]
1025
+ required :id, String
1026
+
1027
+ # @!attribute product
1028
+ #
1029
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::Credit::Product]
1030
+ required :product, -> { MetronomeSDK::Models::V1::PackageListResponse::Credit::Product }
1031
+
1032
+ # @!attribute access_schedule
1033
+ #
1034
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule, nil]
1035
+ optional :access_schedule, -> { MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule }
1036
+
1037
+ # @!attribute applicable_product_ids
1038
+ #
1039
+ # @return [Array<String>, nil]
1040
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1041
+
1042
+ # @!attribute applicable_product_tags
1043
+ #
1044
+ # @return [Array<String>, nil]
1045
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1046
+
1047
+ # @!attribute custom_fields
1048
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1049
+ #
1050
+ # @return [Hash{Symbol=>String}, nil]
1051
+ optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
1052
+
1053
+ # @!attribute description
1054
+ #
1055
+ # @return [String, nil]
1056
+ optional :description, String
1057
+
1058
+ # @!attribute name
1059
+ #
1060
+ # @return [String, nil]
1061
+ optional :name, String
1062
+
1063
+ # @!attribute priority
1064
+ #
1065
+ # @return [Float, nil]
1066
+ optional :priority, Float
1067
+
1068
+ # @!attribute rate_type
1069
+ #
1070
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Credit::RateType, nil]
1071
+ optional :rate_type, enum: -> { MetronomeSDK::Models::V1::PackageListResponse::Credit::RateType }
1072
+
1073
+ # @!attribute specifiers
1074
+ # List of filters that determine what kind of customer usage draws down a commit
1075
+ # or credit. A customer's usage needs to meet the condition of at least one of the
1076
+ # specifiers to contribute to a commit's or credit's drawdown.
1077
+ #
1078
+ # @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
1079
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
1080
+
1081
+ # @!method initialize(id:, product:, access_schedule: nil, applicable_product_ids: nil, applicable_product_tags: nil, custom_fields: nil, description: nil, name: nil, priority: nil, rate_type: nil, specifiers: nil)
1082
+ # Some parameter documentations has been truncated, see
1083
+ # {MetronomeSDK::Models::V1::PackageListResponse::Credit} for more details.
1084
+ #
1085
+ # @param id [String]
1086
+ #
1087
+ # @param product [MetronomeSDK::Models::V1::PackageListResponse::Credit::Product]
1088
+ #
1089
+ # @param access_schedule [MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule]
1090
+ #
1091
+ # @param applicable_product_ids [Array<String>]
1092
+ #
1093
+ # @param applicable_product_tags [Array<String>]
1094
+ #
1095
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
1096
+ #
1097
+ # @param description [String]
1098
+ #
1099
+ # @param name [String]
1100
+ #
1101
+ # @param priority [Float]
1102
+ #
1103
+ # @param rate_type [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Credit::RateType]
1104
+ #
1105
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
1106
+
1107
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Credit#product
1108
+ class Product < MetronomeSDK::Internal::Type::BaseModel
1109
+ # @!attribute id
1110
+ #
1111
+ # @return [String]
1112
+ required :id, String
1113
+
1114
+ # @!attribute name
1115
+ #
1116
+ # @return [String]
1117
+ required :name, String
1118
+
1119
+ # @!method initialize(id:, name:)
1120
+ # @param id [String]
1121
+ # @param name [String]
1122
+ end
1123
+
1124
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Credit#access_schedule
1125
+ class AccessSchedule < MetronomeSDK::Internal::Type::BaseModel
1126
+ # @!attribute credit_type
1127
+ #
1128
+ # @return [MetronomeSDK::Models::CreditTypeData]
1129
+ required :credit_type, -> { MetronomeSDK::CreditTypeData }
1130
+
1131
+ # @!attribute schedule_items
1132
+ #
1133
+ # @return [Array<MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule::ScheduleItem>]
1134
+ required :schedule_items,
1135
+ -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule::ScheduleItem] }
1136
+
1137
+ # @!method initialize(credit_type:, schedule_items:)
1138
+ # @param credit_type [MetronomeSDK::Models::CreditTypeData]
1139
+ # @param schedule_items [Array<MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule::ScheduleItem>]
1140
+
1141
+ class ScheduleItem < MetronomeSDK::Internal::Type::BaseModel
1142
+ # @!attribute id
1143
+ #
1144
+ # @return [String]
1145
+ required :id, String
1146
+
1147
+ # @!attribute amount
1148
+ #
1149
+ # @return [Float]
1150
+ required :amount, Float
1151
+
1152
+ # @!attribute duration
1153
+ #
1154
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule::ScheduleItem::Duration]
1155
+ required :duration,
1156
+ -> { MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule::ScheduleItem::Duration }
1157
+
1158
+ # @!attribute starting_at_offset
1159
+ #
1160
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule::ScheduleItem::StartingAtOffset]
1161
+ required :starting_at_offset,
1162
+ -> { MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule::ScheduleItem::StartingAtOffset }
1163
+
1164
+ # @!method initialize(id:, amount:, duration:, starting_at_offset:)
1165
+ # @param id [String]
1166
+ # @param amount [Float]
1167
+ # @param duration [MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule::ScheduleItem::Duration]
1168
+ # @param starting_at_offset [MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule::ScheduleItem::StartingAtOffset]
1169
+
1170
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule::ScheduleItem#duration
1171
+ class Duration < MetronomeSDK::Internal::Type::BaseModel
1172
+ # @!attribute unit
1173
+ #
1174
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule::ScheduleItem::Duration::Unit]
1175
+ required :unit,
1176
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule::ScheduleItem::Duration::Unit }
1177
+
1178
+ # @!attribute value
1179
+ #
1180
+ # @return [Integer]
1181
+ required :value, Integer
1182
+
1183
+ # @!method initialize(unit:, value:)
1184
+ # @param unit [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule::ScheduleItem::Duration::Unit]
1185
+ # @param value [Integer]
1186
+
1187
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule::ScheduleItem::Duration#unit
1188
+ module Unit
1189
+ extend MetronomeSDK::Internal::Type::Enum
1190
+
1191
+ DAYS = :DAYS
1192
+ WEEKS = :WEEKS
1193
+ MONTHS = :MONTHS
1194
+ YEARS = :YEARS
1195
+
1196
+ # @!method self.values
1197
+ # @return [Array<Symbol>]
1198
+ end
1199
+ end
1200
+
1201
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule::ScheduleItem#starting_at_offset
1202
+ class StartingAtOffset < MetronomeSDK::Internal::Type::BaseModel
1203
+ # @!attribute unit
1204
+ #
1205
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule::ScheduleItem::StartingAtOffset::Unit]
1206
+ required :unit,
1207
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule::ScheduleItem::StartingAtOffset::Unit }
1208
+
1209
+ # @!attribute value
1210
+ #
1211
+ # @return [Integer]
1212
+ required :value, Integer
1213
+
1214
+ # @!method initialize(unit:, value:)
1215
+ # @param unit [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule::ScheduleItem::StartingAtOffset::Unit]
1216
+ # @param value [Integer]
1217
+
1218
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Credit::AccessSchedule::ScheduleItem::StartingAtOffset#unit
1219
+ module Unit
1220
+ extend MetronomeSDK::Internal::Type::Enum
1221
+
1222
+ DAYS = :DAYS
1223
+ WEEKS = :WEEKS
1224
+ MONTHS = :MONTHS
1225
+ YEARS = :YEARS
1226
+
1227
+ # @!method self.values
1228
+ # @return [Array<Symbol>]
1229
+ end
1230
+ end
1231
+ end
1232
+ end
1233
+
1234
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Credit#rate_type
1235
+ module RateType
1236
+ extend MetronomeSDK::Internal::Type::Enum
1237
+
1238
+ COMMIT_RATE = :COMMIT_RATE
1239
+ LIST_RATE = :LIST_RATE
1240
+
1241
+ # @!method self.values
1242
+ # @return [Array<Symbol>]
1243
+ end
1244
+ end
1245
+
1246
+ # @see MetronomeSDK::Models::V1::PackageListResponse#delivery_method
1247
+ module DeliveryMethod
1248
+ extend MetronomeSDK::Internal::Type::Enum
1249
+
1250
+ DIRECT_TO_BILLING_PROVIDER = :direct_to_billing_provider
1251
+ AWS_SQS = :aws_sqs
1252
+ TACKLE = :tackle
1253
+ AWS_SNS = :aws_sns
1254
+
1255
+ # @!method self.values
1256
+ # @return [Array<Symbol>]
1257
+ end
1258
+
1259
+ # @see MetronomeSDK::Models::V1::PackageListResponse#duration
1260
+ class Duration < MetronomeSDK::Internal::Type::BaseModel
1261
+ # @!attribute unit
1262
+ #
1263
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Duration::Unit]
1264
+ required :unit, enum: -> { MetronomeSDK::Models::V1::PackageListResponse::Duration::Unit }
1265
+
1266
+ # @!attribute value
1267
+ #
1268
+ # @return [Integer]
1269
+ required :value, Integer
1270
+
1271
+ # @!method initialize(unit:, value:)
1272
+ # @param unit [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Duration::Unit]
1273
+ # @param value [Integer]
1274
+
1275
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Duration#unit
1276
+ module Unit
1277
+ extend MetronomeSDK::Internal::Type::Enum
1278
+
1279
+ DAYS = :DAYS
1280
+ WEEKS = :WEEKS
1281
+ MONTHS = :MONTHS
1282
+ YEARS = :YEARS
1283
+
1284
+ # @!method self.values
1285
+ # @return [Array<Symbol>]
1286
+ end
1287
+ end
1288
+
1289
+ # Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
1290
+ # prices automatically. EXPLICIT prioritization requires specifying priorities for
1291
+ # each multiplier; the one with the lowest priority value will be prioritized
1292
+ # first.
1293
+ #
1294
+ # @see MetronomeSDK::Models::V1::PackageListResponse#multiplier_override_prioritization
1295
+ module MultiplierOverridePrioritization
1296
+ extend MetronomeSDK::Internal::Type::Enum
1297
+
1298
+ LOWEST_MULTIPLIER = :LOWEST_MULTIPLIER
1299
+ EXPLICIT = :EXPLICIT
1300
+
1301
+ # @!method self.values
1302
+ # @return [Array<Symbol>]
1303
+ end
1304
+
1305
+ class RecurringCommit < MetronomeSDK::Internal::Type::BaseModel
1306
+ # @!attribute id
1307
+ #
1308
+ # @return [String]
1309
+ required :id, String
1310
+
1311
+ # @!attribute access_amount
1312
+ # The amount of commit to grant.
1313
+ #
1314
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::AccessAmount]
1315
+ required :access_amount,
1316
+ -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::AccessAmount }
1317
+
1318
+ # @!attribute commit_duration
1319
+ # The amount of time each of the created commits will be valid for
1320
+ #
1321
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::CommitDuration]
1322
+ required :commit_duration,
1323
+ -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::CommitDuration }
1324
+
1325
+ # @!attribute priority
1326
+ #
1327
+ # @return [Float]
1328
+ required :priority, Float
1329
+
1330
+ # @!attribute product
1331
+ #
1332
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::Product]
1333
+ required :product, -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::Product }
1334
+
1335
+ # @!attribute rate_type
1336
+ # Whether the created commits will use the commit rate or list rate
1337
+ #
1338
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::RateType]
1339
+ required :rate_type, enum: -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::RateType }
1340
+
1341
+ # @!attribute starting_at_offset
1342
+ # Offset relative to the contract start date that determines the start time for
1343
+ # the first commit
1344
+ #
1345
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::StartingAtOffset]
1346
+ required :starting_at_offset,
1347
+ -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::StartingAtOffset }
1348
+
1349
+ # @!attribute applicable_product_ids
1350
+ # Will be passed down to the individual commits
1351
+ #
1352
+ # @return [Array<String>, nil]
1353
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1354
+
1355
+ # @!attribute applicable_product_tags
1356
+ # Will be passed down to the individual commits
1357
+ #
1358
+ # @return [Array<String>, nil]
1359
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1360
+
1361
+ # @!attribute description
1362
+ #
1363
+ # @return [String, nil]
1364
+ optional :description, String
1365
+
1366
+ # @!attribute duration
1367
+ # Offset relative to the recurring credit start that determines when the contract
1368
+ # will stop creating recurring commits. optional
1369
+ #
1370
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::Duration, nil]
1371
+ optional :duration, -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::Duration }
1372
+
1373
+ # @!attribute invoice_amount
1374
+ # The amount the customer should be billed for the commit.
1375
+ #
1376
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::InvoiceAmount, nil]
1377
+ optional :invoice_amount,
1378
+ -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::InvoiceAmount }
1379
+
1380
+ # @!attribute name
1381
+ #
1382
+ # @return [String, nil]
1383
+ optional :name, String
1384
+
1385
+ # @!attribute proration
1386
+ # Determines whether the first and last commit will be prorated. If not provided,
1387
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1388
+ #
1389
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::Proration, nil]
1390
+ optional :proration,
1391
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::Proration }
1392
+
1393
+ # @!attribute recurrence_frequency
1394
+ # The frequency at which the recurring commits will be created. If not provided: -
1395
+ # The commits will be created on the usage invoice frequency. If provided: - The
1396
+ # period defined in the duration will correspond to this frequency. - Commits will
1397
+ # be created aligned with the recurring commit's starting_at rather than the usage
1398
+ # invoice dates.
1399
+ #
1400
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::RecurrenceFrequency, nil]
1401
+ optional :recurrence_frequency,
1402
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::RecurrenceFrequency }
1403
+
1404
+ # @!attribute rollover_fraction
1405
+ # Will be passed down to the individual commits. This controls how much of an
1406
+ # individual unexpired commit will roll over upon contract transition. Must be
1407
+ # between 0 and 1.
1408
+ #
1409
+ # @return [Float, nil]
1410
+ optional :rollover_fraction, Float
1411
+
1412
+ # @!attribute specifiers
1413
+ # List of filters that determine what kind of customer usage draws down a commit
1414
+ # or credit. A customer's usage needs to meet the condition of at least one of the
1415
+ # specifiers to contribute to a commit's or credit's drawdown.
1416
+ #
1417
+ # @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
1418
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
1419
+
1420
+ # @!attribute subscription_config
1421
+ # Attach a subscription to the recurring commit/credit.
1422
+ #
1423
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::SubscriptionConfig, nil]
1424
+ optional :subscription_config,
1425
+ -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::SubscriptionConfig }
1426
+
1427
+ # @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at_offset:, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, duration: nil, invoice_amount: nil, name: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
1428
+ # Some parameter documentations has been truncated, see
1429
+ # {MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit} for more
1430
+ # details.
1431
+ #
1432
+ # @param id [String]
1433
+ #
1434
+ # @param access_amount [MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::AccessAmount] The amount of commit to grant.
1435
+ #
1436
+ # @param commit_duration [MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::CommitDuration] The amount of time each of the created commits will be valid for
1437
+ #
1438
+ # @param priority [Float]
1439
+ #
1440
+ # @param product [MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::Product]
1441
+ #
1442
+ # @param rate_type [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::RateType] Whether the created commits will use the commit rate or list rate
1443
+ #
1444
+ # @param starting_at_offset [MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::StartingAtOffset] Offset relative to the contract start date that determines the start time for th
1445
+ #
1446
+ # @param applicable_product_ids [Array<String>] Will be passed down to the individual commits
1447
+ #
1448
+ # @param applicable_product_tags [Array<String>] Will be passed down to the individual commits
1449
+ #
1450
+ # @param description [String]
1451
+ #
1452
+ # @param duration [MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::Duration] Offset relative to the recurring credit start that determines when the contract
1453
+ #
1454
+ # @param invoice_amount [MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::InvoiceAmount] The amount the customer should be billed for the commit.
1455
+ #
1456
+ # @param name [String]
1457
+ #
1458
+ # @param proration [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::Proration] Determines whether the first and last commit will be prorated. If not provided,
1459
+ #
1460
+ # @param recurrence_frequency [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided:
1461
+ #
1462
+ # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
1463
+ #
1464
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
1465
+ #
1466
+ # @param subscription_config [MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::SubscriptionConfig] Attach a subscription to the recurring commit/credit.
1467
+
1468
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit#access_amount
1469
+ class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
1470
+ # @!attribute credit_type_id
1471
+ #
1472
+ # @return [String]
1473
+ required :credit_type_id, String
1474
+
1475
+ # @!attribute unit_price
1476
+ #
1477
+ # @return [Float]
1478
+ required :unit_price, Float
1479
+
1480
+ # @!attribute quantity
1481
+ #
1482
+ # @return [Float, nil]
1483
+ optional :quantity, Float
1484
+
1485
+ # @!method initialize(credit_type_id:, unit_price:, quantity: nil)
1486
+ # The amount of commit to grant.
1487
+ #
1488
+ # @param credit_type_id [String]
1489
+ # @param unit_price [Float]
1490
+ # @param quantity [Float]
1491
+ end
1492
+
1493
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit#commit_duration
1494
+ class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
1495
+ # @!attribute value
1496
+ #
1497
+ # @return [Float]
1498
+ required :value, Float
1499
+
1500
+ # @!attribute unit
1501
+ #
1502
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::CommitDuration::Unit, nil]
1503
+ optional :unit,
1504
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::CommitDuration::Unit }
1505
+
1506
+ # @!method initialize(value:, unit: nil)
1507
+ # The amount of time each of the created commits will be valid for
1508
+ #
1509
+ # @param value [Float]
1510
+ # @param unit [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::CommitDuration::Unit]
1511
+
1512
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::CommitDuration#unit
1513
+ module Unit
1514
+ extend MetronomeSDK::Internal::Type::Enum
1515
+
1516
+ PERIODS = :PERIODS
1517
+
1518
+ # @!method self.values
1519
+ # @return [Array<Symbol>]
1520
+ end
1521
+ end
1522
+
1523
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit#product
1524
+ class Product < MetronomeSDK::Internal::Type::BaseModel
1525
+ # @!attribute id
1526
+ #
1527
+ # @return [String]
1528
+ required :id, String
1529
+
1530
+ # @!attribute name
1531
+ #
1532
+ # @return [String]
1533
+ required :name, String
1534
+
1535
+ # @!method initialize(id:, name:)
1536
+ # @param id [String]
1537
+ # @param name [String]
1538
+ end
1539
+
1540
+ # Whether the created commits will use the commit rate or list rate
1541
+ #
1542
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit#rate_type
1543
+ module RateType
1544
+ extend MetronomeSDK::Internal::Type::Enum
1545
+
1546
+ COMMIT_RATE = :COMMIT_RATE
1547
+ LIST_RATE = :LIST_RATE
1548
+
1549
+ # @!method self.values
1550
+ # @return [Array<Symbol>]
1551
+ end
1552
+
1553
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit#starting_at_offset
1554
+ class StartingAtOffset < MetronomeSDK::Internal::Type::BaseModel
1555
+ # @!attribute unit
1556
+ #
1557
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::StartingAtOffset::Unit]
1558
+ required :unit,
1559
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::StartingAtOffset::Unit }
1560
+
1561
+ # @!attribute value
1562
+ #
1563
+ # @return [Integer]
1564
+ required :value, Integer
1565
+
1566
+ # @!method initialize(unit:, value:)
1567
+ # Offset relative to the contract start date that determines the start time for
1568
+ # the first commit
1569
+ #
1570
+ # @param unit [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::StartingAtOffset::Unit]
1571
+ # @param value [Integer]
1572
+
1573
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::StartingAtOffset#unit
1574
+ module Unit
1575
+ extend MetronomeSDK::Internal::Type::Enum
1576
+
1577
+ DAYS = :DAYS
1578
+ WEEKS = :WEEKS
1579
+ MONTHS = :MONTHS
1580
+ YEARS = :YEARS
1581
+
1582
+ # @!method self.values
1583
+ # @return [Array<Symbol>]
1584
+ end
1585
+ end
1586
+
1587
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit#duration
1588
+ class Duration < MetronomeSDK::Internal::Type::BaseModel
1589
+ # @!attribute unit
1590
+ #
1591
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::Duration::Unit]
1592
+ required :unit,
1593
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::Duration::Unit }
1594
+
1595
+ # @!attribute value
1596
+ #
1597
+ # @return [Integer]
1598
+ required :value, Integer
1599
+
1600
+ # @!method initialize(unit:, value:)
1601
+ # Offset relative to the recurring credit start that determines when the contract
1602
+ # will stop creating recurring commits. optional
1603
+ #
1604
+ # @param unit [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::Duration::Unit]
1605
+ # @param value [Integer]
1606
+
1607
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::Duration#unit
1608
+ module Unit
1609
+ extend MetronomeSDK::Internal::Type::Enum
1610
+
1611
+ DAYS = :DAYS
1612
+ WEEKS = :WEEKS
1613
+ MONTHS = :MONTHS
1614
+ YEARS = :YEARS
1615
+
1616
+ # @!method self.values
1617
+ # @return [Array<Symbol>]
1618
+ end
1619
+ end
1620
+
1621
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit#invoice_amount
1622
+ class InvoiceAmount < MetronomeSDK::Internal::Type::BaseModel
1623
+ # @!attribute credit_type_id
1624
+ #
1625
+ # @return [String]
1626
+ required :credit_type_id, String
1627
+
1628
+ # @!attribute quantity
1629
+ #
1630
+ # @return [Float]
1631
+ required :quantity, Float
1632
+
1633
+ # @!attribute unit_price
1634
+ #
1635
+ # @return [Float]
1636
+ required :unit_price, Float
1637
+
1638
+ # @!method initialize(credit_type_id:, quantity:, unit_price:)
1639
+ # The amount the customer should be billed for the commit.
1640
+ #
1641
+ # @param credit_type_id [String]
1642
+ # @param quantity [Float]
1643
+ # @param unit_price [Float]
1644
+ end
1645
+
1646
+ # Determines whether the first and last commit will be prorated. If not provided,
1647
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1648
+ #
1649
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit#proration
1650
+ module Proration
1651
+ extend MetronomeSDK::Internal::Type::Enum
1652
+
1653
+ NONE = :NONE
1654
+ FIRST = :FIRST
1655
+ LAST = :LAST
1656
+ FIRST_AND_LAST = :FIRST_AND_LAST
1657
+
1658
+ # @!method self.values
1659
+ # @return [Array<Symbol>]
1660
+ end
1661
+
1662
+ # The frequency at which the recurring commits will be created. If not provided: -
1663
+ # The commits will be created on the usage invoice frequency. If provided: - The
1664
+ # period defined in the duration will correspond to this frequency. - Commits will
1665
+ # be created aligned with the recurring commit's starting_at rather than the usage
1666
+ # invoice dates.
1667
+ #
1668
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit#recurrence_frequency
1669
+ module RecurrenceFrequency
1670
+ extend MetronomeSDK::Internal::Type::Enum
1671
+
1672
+ MONTHLY = :MONTHLY
1673
+ QUARTERLY = :QUARTERLY
1674
+ ANNUAL = :ANNUAL
1675
+ WEEKLY = :WEEKLY
1676
+
1677
+ # @!method self.values
1678
+ # @return [Array<Symbol>]
1679
+ end
1680
+
1681
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit#subscription_config
1682
+ class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
1683
+ # @!attribute allocation
1684
+ #
1685
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::SubscriptionConfig::Allocation]
1686
+ required :allocation,
1687
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::SubscriptionConfig::Allocation }
1688
+
1689
+ # @!attribute apply_seat_increase_config
1690
+ #
1691
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig]
1692
+ required :apply_seat_increase_config,
1693
+ -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig }
1694
+
1695
+ # @!attribute subscription_template_id
1696
+ #
1697
+ # @return [String]
1698
+ required :subscription_template_id, String
1699
+
1700
+ # @!method initialize(allocation:, apply_seat_increase_config:, subscription_template_id:)
1701
+ # Attach a subscription to the recurring commit/credit.
1702
+ #
1703
+ # @param allocation [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::SubscriptionConfig::Allocation]
1704
+ # @param apply_seat_increase_config [MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::SubscriptionConfig::ApplySeatIncreaseConfig]
1705
+ # @param subscription_template_id [String]
1706
+
1707
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::SubscriptionConfig#allocation
1708
+ module Allocation
1709
+ extend MetronomeSDK::Internal::Type::Enum
1710
+
1711
+ INDIVIDUAL = :INDIVIDUAL
1712
+ POOLED = :POOLED
1713
+
1714
+ # @!method self.values
1715
+ # @return [Array<Symbol>]
1716
+ end
1717
+
1718
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCommit::SubscriptionConfig#apply_seat_increase_config
1719
+ class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
1720
+ # @!attribute is_prorated
1721
+ # Indicates whether a mid-period seat increase should be prorated.
1722
+ #
1723
+ # @return [Boolean]
1724
+ required :is_prorated, MetronomeSDK::Internal::Type::Boolean
1725
+
1726
+ # @!method initialize(is_prorated:)
1727
+ # @param is_prorated [Boolean] Indicates whether a mid-period seat increase should be prorated.
1728
+ end
1729
+ end
1730
+ end
1731
+
1732
+ class RecurringCredit < MetronomeSDK::Internal::Type::BaseModel
1733
+ # @!attribute id
1734
+ #
1735
+ # @return [String]
1736
+ required :id, String
1737
+
1738
+ # @!attribute access_amount
1739
+ # The amount of commit to grant.
1740
+ #
1741
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::AccessAmount]
1742
+ required :access_amount,
1743
+ -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::AccessAmount }
1744
+
1745
+ # @!attribute commit_duration
1746
+ # The amount of time each of the created commits will be valid for
1747
+ #
1748
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::CommitDuration]
1749
+ required :commit_duration,
1750
+ -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::CommitDuration }
1751
+
1752
+ # @!attribute priority
1753
+ #
1754
+ # @return [Float]
1755
+ required :priority, Float
1756
+
1757
+ # @!attribute product
1758
+ #
1759
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::Product]
1760
+ required :product, -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::Product }
1761
+
1762
+ # @!attribute rate_type
1763
+ # Whether the created commits will use the commit rate or list rate
1764
+ #
1765
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::RateType]
1766
+ required :rate_type, enum: -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::RateType }
1767
+
1768
+ # @!attribute starting_at_offset
1769
+ # Offset relative to the contract start date that determines the start time for
1770
+ # the first commit
1771
+ #
1772
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::StartingAtOffset]
1773
+ required :starting_at_offset,
1774
+ -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::StartingAtOffset }
1775
+
1776
+ # @!attribute applicable_product_ids
1777
+ # Will be passed down to the individual commits
1778
+ #
1779
+ # @return [Array<String>, nil]
1780
+ optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]
1781
+
1782
+ # @!attribute applicable_product_tags
1783
+ # Will be passed down to the individual commits
1784
+ #
1785
+ # @return [Array<String>, nil]
1786
+ optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]
1787
+
1788
+ # @!attribute description
1789
+ #
1790
+ # @return [String, nil]
1791
+ optional :description, String
1792
+
1793
+ # @!attribute duration
1794
+ # Offset relative to the recurring credit start that determines when the contract
1795
+ # will stop creating recurring commits. optional
1796
+ #
1797
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::Duration, nil]
1798
+ optional :duration, -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::Duration }
1799
+
1800
+ # @!attribute name
1801
+ #
1802
+ # @return [String, nil]
1803
+ optional :name, String
1804
+
1805
+ # @!attribute proration
1806
+ # Determines whether the first and last commit will be prorated. If not provided,
1807
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
1808
+ #
1809
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::Proration, nil]
1810
+ optional :proration,
1811
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::Proration }
1812
+
1813
+ # @!attribute recurrence_frequency
1814
+ # The frequency at which the recurring commits will be created. If not provided: -
1815
+ # The commits will be created on the usage invoice frequency. If provided: - The
1816
+ # period defined in the duration will correspond to this frequency. - Commits will
1817
+ # be created aligned with the recurring commit's starting_at rather than the usage
1818
+ # invoice dates.
1819
+ #
1820
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::RecurrenceFrequency, nil]
1821
+ optional :recurrence_frequency,
1822
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::RecurrenceFrequency }
1823
+
1824
+ # @!attribute rollover_fraction
1825
+ # Will be passed down to the individual commits. This controls how much of an
1826
+ # individual unexpired commit will roll over upon contract transition. Must be
1827
+ # between 0 and 1.
1828
+ #
1829
+ # @return [Float, nil]
1830
+ optional :rollover_fraction, Float
1831
+
1832
+ # @!attribute specifiers
1833
+ # List of filters that determine what kind of customer usage draws down a commit
1834
+ # or credit. A customer's usage needs to meet the condition of at least one of the
1835
+ # specifiers to contribute to a commit's or credit's drawdown.
1836
+ #
1837
+ # @return [Array<MetronomeSDK::Models::CommitSpecifier>, nil]
1838
+ optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifier] }
1839
+
1840
+ # @!attribute subscription_config
1841
+ # Attach a subscription to the recurring commit/credit.
1842
+ #
1843
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::SubscriptionConfig, nil]
1844
+ optional :subscription_config,
1845
+ -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::SubscriptionConfig }
1846
+
1847
+ # @!method initialize(id:, access_amount:, commit_duration:, priority:, product:, rate_type:, starting_at_offset:, applicable_product_ids: nil, applicable_product_tags: nil, description: nil, duration: nil, name: nil, proration: nil, recurrence_frequency: nil, rollover_fraction: nil, specifiers: nil, subscription_config: nil)
1848
+ # Some parameter documentations has been truncated, see
1849
+ # {MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit} for more
1850
+ # details.
1851
+ #
1852
+ # @param id [String]
1853
+ #
1854
+ # @param access_amount [MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::AccessAmount] The amount of commit to grant.
1855
+ #
1856
+ # @param commit_duration [MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::CommitDuration] The amount of time each of the created commits will be valid for
1857
+ #
1858
+ # @param priority [Float]
1859
+ #
1860
+ # @param product [MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::Product]
1861
+ #
1862
+ # @param rate_type [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::RateType] Whether the created commits will use the commit rate or list rate
1863
+ #
1864
+ # @param starting_at_offset [MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::StartingAtOffset] Offset relative to the contract start date that determines the start time for th
1865
+ #
1866
+ # @param applicable_product_ids [Array<String>] Will be passed down to the individual commits
1867
+ #
1868
+ # @param applicable_product_tags [Array<String>] Will be passed down to the individual commits
1869
+ #
1870
+ # @param description [String]
1871
+ #
1872
+ # @param duration [MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::Duration] Offset relative to the recurring credit start that determines when the contract
1873
+ #
1874
+ # @param name [String]
1875
+ #
1876
+ # @param proration [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::Proration] Determines whether the first and last commit will be prorated. If not provided,
1877
+ #
1878
+ # @param recurrence_frequency [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::RecurrenceFrequency] The frequency at which the recurring commits will be created. If not provided:
1879
+ #
1880
+ # @param rollover_fraction [Float] Will be passed down to the individual commits. This controls how much of an indi
1881
+ #
1882
+ # @param specifiers [Array<MetronomeSDK::Models::CommitSpecifier>] List of filters that determine what kind of customer usage draws down a commit o
1883
+ #
1884
+ # @param subscription_config [MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::SubscriptionConfig] Attach a subscription to the recurring commit/credit.
1885
+
1886
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit#access_amount
1887
+ class AccessAmount < MetronomeSDK::Internal::Type::BaseModel
1888
+ # @!attribute credit_type_id
1889
+ #
1890
+ # @return [String]
1891
+ required :credit_type_id, String
1892
+
1893
+ # @!attribute unit_price
1894
+ #
1895
+ # @return [Float]
1896
+ required :unit_price, Float
1897
+
1898
+ # @!attribute quantity
1899
+ #
1900
+ # @return [Float, nil]
1901
+ optional :quantity, Float
1902
+
1903
+ # @!method initialize(credit_type_id:, unit_price:, quantity: nil)
1904
+ # The amount of commit to grant.
1905
+ #
1906
+ # @param credit_type_id [String]
1907
+ # @param unit_price [Float]
1908
+ # @param quantity [Float]
1909
+ end
1910
+
1911
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit#commit_duration
1912
+ class CommitDuration < MetronomeSDK::Internal::Type::BaseModel
1913
+ # @!attribute value
1914
+ #
1915
+ # @return [Float]
1916
+ required :value, Float
1917
+
1918
+ # @!attribute unit
1919
+ #
1920
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::CommitDuration::Unit, nil]
1921
+ optional :unit,
1922
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::CommitDuration::Unit }
1923
+
1924
+ # @!method initialize(value:, unit: nil)
1925
+ # The amount of time each of the created commits will be valid for
1926
+ #
1927
+ # @param value [Float]
1928
+ # @param unit [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::CommitDuration::Unit]
1929
+
1930
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::CommitDuration#unit
1931
+ module Unit
1932
+ extend MetronomeSDK::Internal::Type::Enum
1933
+
1934
+ PERIODS = :PERIODS
1935
+
1936
+ # @!method self.values
1937
+ # @return [Array<Symbol>]
1938
+ end
1939
+ end
1940
+
1941
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit#product
1942
+ class Product < MetronomeSDK::Internal::Type::BaseModel
1943
+ # @!attribute id
1944
+ #
1945
+ # @return [String]
1946
+ required :id, String
1947
+
1948
+ # @!attribute name
1949
+ #
1950
+ # @return [String]
1951
+ required :name, String
1952
+
1953
+ # @!method initialize(id:, name:)
1954
+ # @param id [String]
1955
+ # @param name [String]
1956
+ end
1957
+
1958
+ # Whether the created commits will use the commit rate or list rate
1959
+ #
1960
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit#rate_type
1961
+ module RateType
1962
+ extend MetronomeSDK::Internal::Type::Enum
1963
+
1964
+ COMMIT_RATE = :COMMIT_RATE
1965
+ LIST_RATE = :LIST_RATE
1966
+
1967
+ # @!method self.values
1968
+ # @return [Array<Symbol>]
1969
+ end
1970
+
1971
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit#starting_at_offset
1972
+ class StartingAtOffset < MetronomeSDK::Internal::Type::BaseModel
1973
+ # @!attribute unit
1974
+ #
1975
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::StartingAtOffset::Unit]
1976
+ required :unit,
1977
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::StartingAtOffset::Unit }
1978
+
1979
+ # @!attribute value
1980
+ #
1981
+ # @return [Integer]
1982
+ required :value, Integer
1983
+
1984
+ # @!method initialize(unit:, value:)
1985
+ # Offset relative to the contract start date that determines the start time for
1986
+ # the first commit
1987
+ #
1988
+ # @param unit [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::StartingAtOffset::Unit]
1989
+ # @param value [Integer]
1990
+
1991
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::StartingAtOffset#unit
1992
+ module Unit
1993
+ extend MetronomeSDK::Internal::Type::Enum
1994
+
1995
+ DAYS = :DAYS
1996
+ WEEKS = :WEEKS
1997
+ MONTHS = :MONTHS
1998
+ YEARS = :YEARS
1999
+
2000
+ # @!method self.values
2001
+ # @return [Array<Symbol>]
2002
+ end
2003
+ end
2004
+
2005
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit#duration
2006
+ class Duration < MetronomeSDK::Internal::Type::BaseModel
2007
+ # @!attribute unit
2008
+ #
2009
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::Duration::Unit]
2010
+ required :unit,
2011
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::Duration::Unit }
2012
+
2013
+ # @!attribute value
2014
+ #
2015
+ # @return [Integer]
2016
+ required :value, Integer
2017
+
2018
+ # @!method initialize(unit:, value:)
2019
+ # Offset relative to the recurring credit start that determines when the contract
2020
+ # will stop creating recurring commits. optional
2021
+ #
2022
+ # @param unit [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::Duration::Unit]
2023
+ # @param value [Integer]
2024
+
2025
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::Duration#unit
2026
+ module Unit
2027
+ extend MetronomeSDK::Internal::Type::Enum
2028
+
2029
+ DAYS = :DAYS
2030
+ WEEKS = :WEEKS
2031
+ MONTHS = :MONTHS
2032
+ YEARS = :YEARS
2033
+
2034
+ # @!method self.values
2035
+ # @return [Array<Symbol>]
2036
+ end
2037
+ end
2038
+
2039
+ # Determines whether the first and last commit will be prorated. If not provided,
2040
+ # the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).
2041
+ #
2042
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit#proration
2043
+ module Proration
2044
+ extend MetronomeSDK::Internal::Type::Enum
2045
+
2046
+ NONE = :NONE
2047
+ FIRST = :FIRST
2048
+ LAST = :LAST
2049
+ FIRST_AND_LAST = :FIRST_AND_LAST
2050
+
2051
+ # @!method self.values
2052
+ # @return [Array<Symbol>]
2053
+ end
2054
+
2055
+ # The frequency at which the recurring commits will be created. If not provided: -
2056
+ # The commits will be created on the usage invoice frequency. If provided: - The
2057
+ # period defined in the duration will correspond to this frequency. - Commits will
2058
+ # be created aligned with the recurring commit's starting_at rather than the usage
2059
+ # invoice dates.
2060
+ #
2061
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit#recurrence_frequency
2062
+ module RecurrenceFrequency
2063
+ extend MetronomeSDK::Internal::Type::Enum
2064
+
2065
+ MONTHLY = :MONTHLY
2066
+ QUARTERLY = :QUARTERLY
2067
+ ANNUAL = :ANNUAL
2068
+ WEEKLY = :WEEKLY
2069
+
2070
+ # @!method self.values
2071
+ # @return [Array<Symbol>]
2072
+ end
2073
+
2074
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit#subscription_config
2075
+ class SubscriptionConfig < MetronomeSDK::Internal::Type::BaseModel
2076
+ # @!attribute allocation
2077
+ #
2078
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::SubscriptionConfig::Allocation]
2079
+ required :allocation,
2080
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::SubscriptionConfig::Allocation }
2081
+
2082
+ # @!attribute apply_seat_increase_config
2083
+ #
2084
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig]
2085
+ required :apply_seat_increase_config,
2086
+ -> { MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig }
2087
+
2088
+ # @!attribute subscription_template_id
2089
+ #
2090
+ # @return [String]
2091
+ required :subscription_template_id, String
2092
+
2093
+ # @!method initialize(allocation:, apply_seat_increase_config:, subscription_template_id:)
2094
+ # Attach a subscription to the recurring commit/credit.
2095
+ #
2096
+ # @param allocation [Symbol, MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::SubscriptionConfig::Allocation]
2097
+ # @param apply_seat_increase_config [MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::SubscriptionConfig::ApplySeatIncreaseConfig]
2098
+ # @param subscription_template_id [String]
2099
+
2100
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::SubscriptionConfig#allocation
2101
+ module Allocation
2102
+ extend MetronomeSDK::Internal::Type::Enum
2103
+
2104
+ INDIVIDUAL = :INDIVIDUAL
2105
+ POOLED = :POOLED
2106
+
2107
+ # @!method self.values
2108
+ # @return [Array<Symbol>]
2109
+ end
2110
+
2111
+ # @see MetronomeSDK::Models::V1::PackageListResponse::RecurringCredit::SubscriptionConfig#apply_seat_increase_config
2112
+ class ApplySeatIncreaseConfig < MetronomeSDK::Internal::Type::BaseModel
2113
+ # @!attribute is_prorated
2114
+ # Indicates whether a mid-period seat increase should be prorated.
2115
+ #
2116
+ # @return [Boolean]
2117
+ required :is_prorated, MetronomeSDK::Internal::Type::Boolean
2118
+
2119
+ # @!method initialize(is_prorated:)
2120
+ # @param is_prorated [Boolean] Indicates whether a mid-period seat increase should be prorated.
2121
+ end
2122
+ end
2123
+ end
2124
+
2125
+ # Determines which scheduled and commit charges to consolidate onto the Contract's
2126
+ # usage invoice. The charge's `timestamp` must match the usage invoice's
2127
+ # `ending_before` date for consolidation to occur. This field cannot be modified
2128
+ # after a Contract has been created. If this field is omitted, charges will appear
2129
+ # on a separate invoice from usage charges.
2130
+ #
2131
+ # @see MetronomeSDK::Models::V1::PackageListResponse#scheduled_charges_on_usage_invoices
2132
+ module ScheduledChargesOnUsageInvoices
2133
+ extend MetronomeSDK::Internal::Type::Enum
2134
+
2135
+ ALL = :ALL
2136
+
2137
+ # @!method self.values
2138
+ # @return [Array<Symbol>]
2139
+ end
2140
+
2141
+ class Subscription < MetronomeSDK::Internal::Type::BaseModel
2142
+ # @!attribute collection_schedule
2143
+ #
2144
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Subscription::CollectionSchedule]
2145
+ required :collection_schedule,
2146
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::Subscription::CollectionSchedule }
2147
+
2148
+ # @!attribute proration
2149
+ #
2150
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::Subscription::Proration]
2151
+ required :proration, -> { MetronomeSDK::Models::V1::PackageListResponse::Subscription::Proration }
2152
+
2153
+ # @!attribute subscription_rate
2154
+ #
2155
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::Subscription::SubscriptionRate]
2156
+ required :subscription_rate,
2157
+ -> { MetronomeSDK::Models::V1::PackageListResponse::Subscription::SubscriptionRate }
2158
+
2159
+ # @!attribute id
2160
+ #
2161
+ # @return [String, nil]
2162
+ optional :id, String
2163
+
2164
+ # @!attribute custom_fields
2165
+ # Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2166
+ #
2167
+ # @return [Hash{Symbol=>String}, nil]
2168
+ optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]
2169
+
2170
+ # @!attribute description
2171
+ #
2172
+ # @return [String, nil]
2173
+ optional :description, String
2174
+
2175
+ # @!attribute duration
2176
+ #
2177
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::Subscription::Duration, nil]
2178
+ optional :duration, -> { MetronomeSDK::Models::V1::PackageListResponse::Subscription::Duration }
2179
+
2180
+ # @!attribute fiat_credit_type_id
2181
+ #
2182
+ # @return [String, nil]
2183
+ optional :fiat_credit_type_id, String
2184
+
2185
+ # @!attribute initial_quantity
2186
+ #
2187
+ # @return [Float, nil]
2188
+ optional :initial_quantity, Float
2189
+
2190
+ # @!attribute name
2191
+ #
2192
+ # @return [String, nil]
2193
+ optional :name, String
2194
+
2195
+ # @!attribute quantity_management_mode
2196
+ # Determines how the subscription's quantity is controlled. Defaults to
2197
+ # QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
2198
+ # directly on the subscription. `initial_quantity` must be provided with this
2199
+ # option. Compatible with recurring commits/credits that use POOLED allocation.
2200
+ # **SEAT_BASED**: Use when you want to pass specific seat identifiers (e.g. add
2201
+ # user_123) to increment and decrement a subscription quantity, rather than
2202
+ # directly providing the quantity. You must use a SEAT_BASED subscription to use a
2203
+ # linked recurring credit with an allocation per seat. `seat_config` must be
2204
+ # provided with this option.
2205
+ #
2206
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Subscription::QuantityManagementMode, nil]
2207
+ optional :quantity_management_mode,
2208
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::Subscription::QuantityManagementMode }
2209
+
2210
+ # @!attribute seat_config
2211
+ #
2212
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::Subscription::SeatConfig, nil]
2213
+ optional :seat_config, -> { MetronomeSDK::Models::V1::PackageListResponse::Subscription::SeatConfig }
2214
+
2215
+ # @!attribute starting_at_offset
2216
+ #
2217
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::Subscription::StartingAtOffset, nil]
2218
+ optional :starting_at_offset,
2219
+ -> { MetronomeSDK::Models::V1::PackageListResponse::Subscription::StartingAtOffset }
2220
+
2221
+ # @!method initialize(collection_schedule:, proration:, subscription_rate:, id: nil, custom_fields: nil, description: nil, duration: nil, fiat_credit_type_id: nil, initial_quantity: nil, name: nil, quantity_management_mode: nil, seat_config: nil, starting_at_offset: nil)
2222
+ # Some parameter documentations has been truncated, see
2223
+ # {MetronomeSDK::Models::V1::PackageListResponse::Subscription} for more details.
2224
+ #
2225
+ # @param collection_schedule [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Subscription::CollectionSchedule]
2226
+ #
2227
+ # @param proration [MetronomeSDK::Models::V1::PackageListResponse::Subscription::Proration]
2228
+ #
2229
+ # @param subscription_rate [MetronomeSDK::Models::V1::PackageListResponse::Subscription::SubscriptionRate]
2230
+ #
2231
+ # @param id [String]
2232
+ #
2233
+ # @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
2234
+ #
2235
+ # @param description [String]
2236
+ #
2237
+ # @param duration [MetronomeSDK::Models::V1::PackageListResponse::Subscription::Duration]
2238
+ #
2239
+ # @param fiat_credit_type_id [String]
2240
+ #
2241
+ # @param initial_quantity [Float]
2242
+ #
2243
+ # @param name [String]
2244
+ #
2245
+ # @param quantity_management_mode [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Subscription::QuantityManagementMode] Determines how the subscription's quantity is controlled. Defaults to QUANTITY_O
2246
+ #
2247
+ # @param seat_config [MetronomeSDK::Models::V1::PackageListResponse::Subscription::SeatConfig]
2248
+ #
2249
+ # @param starting_at_offset [MetronomeSDK::Models::V1::PackageListResponse::Subscription::StartingAtOffset]
2250
+
2251
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Subscription#collection_schedule
2252
+ module CollectionSchedule
2253
+ extend MetronomeSDK::Internal::Type::Enum
2254
+
2255
+ ADVANCE = :ADVANCE
2256
+ ARREARS = :ARREARS
2257
+
2258
+ # @!method self.values
2259
+ # @return [Array<Symbol>]
2260
+ end
2261
+
2262
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Subscription#proration
2263
+ class Proration < MetronomeSDK::Internal::Type::BaseModel
2264
+ # @!attribute invoice_behavior
2265
+ #
2266
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Subscription::Proration::InvoiceBehavior]
2267
+ required :invoice_behavior,
2268
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::Subscription::Proration::InvoiceBehavior }
2269
+
2270
+ # @!attribute is_prorated
2271
+ #
2272
+ # @return [Boolean]
2273
+ required :is_prorated, MetronomeSDK::Internal::Type::Boolean
2274
+
2275
+ # @!method initialize(invoice_behavior:, is_prorated:)
2276
+ # @param invoice_behavior [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Subscription::Proration::InvoiceBehavior]
2277
+ # @param is_prorated [Boolean]
2278
+
2279
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Subscription::Proration#invoice_behavior
2280
+ module InvoiceBehavior
2281
+ extend MetronomeSDK::Internal::Type::Enum
2282
+
2283
+ BILL_IMMEDIATELY = :BILL_IMMEDIATELY
2284
+ BILL_ON_NEXT_COLLECTION_DATE = :BILL_ON_NEXT_COLLECTION_DATE
2285
+
2286
+ # @!method self.values
2287
+ # @return [Array<Symbol>]
2288
+ end
2289
+ end
2290
+
2291
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Subscription#subscription_rate
2292
+ class SubscriptionRate < MetronomeSDK::Internal::Type::BaseModel
2293
+ # @!attribute billing_frequency
2294
+ #
2295
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Subscription::SubscriptionRate::BillingFrequency]
2296
+ required :billing_frequency,
2297
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::Subscription::SubscriptionRate::BillingFrequency }
2298
+
2299
+ # @!attribute product
2300
+ #
2301
+ # @return [MetronomeSDK::Models::V1::PackageListResponse::Subscription::SubscriptionRate::Product]
2302
+ required :product,
2303
+ -> { MetronomeSDK::Models::V1::PackageListResponse::Subscription::SubscriptionRate::Product }
2304
+
2305
+ # @!method initialize(billing_frequency:, product:)
2306
+ # @param billing_frequency [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Subscription::SubscriptionRate::BillingFrequency]
2307
+ # @param product [MetronomeSDK::Models::V1::PackageListResponse::Subscription::SubscriptionRate::Product]
2308
+
2309
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Subscription::SubscriptionRate#billing_frequency
2310
+ module BillingFrequency
2311
+ extend MetronomeSDK::Internal::Type::Enum
2312
+
2313
+ MONTHLY = :MONTHLY
2314
+ QUARTERLY = :QUARTERLY
2315
+ ANNUAL = :ANNUAL
2316
+ WEEKLY = :WEEKLY
2317
+
2318
+ # @!method self.values
2319
+ # @return [Array<Symbol>]
2320
+ end
2321
+
2322
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Subscription::SubscriptionRate#product
2323
+ class Product < MetronomeSDK::Internal::Type::BaseModel
2324
+ # @!attribute id
2325
+ #
2326
+ # @return [String]
2327
+ required :id, String
2328
+
2329
+ # @!attribute name
2330
+ #
2331
+ # @return [String]
2332
+ required :name, String
2333
+
2334
+ # @!method initialize(id:, name:)
2335
+ # @param id [String]
2336
+ # @param name [String]
2337
+ end
2338
+ end
2339
+
2340
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Subscription#duration
2341
+ class Duration < MetronomeSDK::Internal::Type::BaseModel
2342
+ # @!attribute unit
2343
+ #
2344
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Subscription::Duration::Unit]
2345
+ required :unit, enum: -> { MetronomeSDK::Models::V1::PackageListResponse::Subscription::Duration::Unit }
2346
+
2347
+ # @!attribute value
2348
+ #
2349
+ # @return [Integer]
2350
+ required :value, Integer
2351
+
2352
+ # @!method initialize(unit:, value:)
2353
+ # @param unit [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Subscription::Duration::Unit]
2354
+ # @param value [Integer]
2355
+
2356
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Subscription::Duration#unit
2357
+ module Unit
2358
+ extend MetronomeSDK::Internal::Type::Enum
2359
+
2360
+ DAYS = :DAYS
2361
+ WEEKS = :WEEKS
2362
+ MONTHS = :MONTHS
2363
+ YEARS = :YEARS
2364
+
2365
+ # @!method self.values
2366
+ # @return [Array<Symbol>]
2367
+ end
2368
+ end
2369
+
2370
+ # Determines how the subscription's quantity is controlled. Defaults to
2371
+ # QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
2372
+ # directly on the subscription. `initial_quantity` must be provided with this
2373
+ # option. Compatible with recurring commits/credits that use POOLED allocation.
2374
+ # **SEAT_BASED**: Use when you want to pass specific seat identifiers (e.g. add
2375
+ # user_123) to increment and decrement a subscription quantity, rather than
2376
+ # directly providing the quantity. You must use a SEAT_BASED subscription to use a
2377
+ # linked recurring credit with an allocation per seat. `seat_config` must be
2378
+ # provided with this option.
2379
+ #
2380
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Subscription#quantity_management_mode
2381
+ module QuantityManagementMode
2382
+ extend MetronomeSDK::Internal::Type::Enum
2383
+
2384
+ SEAT_BASED = :SEAT_BASED
2385
+ QUANTITY_ONLY = :QUANTITY_ONLY
2386
+
2387
+ # @!method self.values
2388
+ # @return [Array<Symbol>]
2389
+ end
2390
+
2391
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Subscription#seat_config
2392
+ class SeatConfig < MetronomeSDK::Internal::Type::BaseModel
2393
+ # @!attribute seat_group_key
2394
+ # The property name, sent on usage events, that identifies the seat ID associated
2395
+ # with the usage event. For example, the property name might be seat_id or
2396
+ # user_id. The property must be set as a group key on billable metrics and a
2397
+ # presentation/pricing group key on contract products. This allows linked
2398
+ # recurring credits with an allocation per seat to be consumed by only one seat's
2399
+ # usage.
2400
+ #
2401
+ # @return [String]
2402
+ required :seat_group_key, String
2403
+
2404
+ # @!method initialize(seat_group_key:)
2405
+ # Some parameter documentations has been truncated, see
2406
+ # {MetronomeSDK::Models::V1::PackageListResponse::Subscription::SeatConfig} for
2407
+ # more details.
2408
+ #
2409
+ # @param seat_group_key [String] The property name, sent on usage events, that identifies the seat ID associated
2410
+ end
2411
+
2412
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Subscription#starting_at_offset
2413
+ class StartingAtOffset < MetronomeSDK::Internal::Type::BaseModel
2414
+ # @!attribute unit
2415
+ #
2416
+ # @return [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Subscription::StartingAtOffset::Unit]
2417
+ required :unit,
2418
+ enum: -> { MetronomeSDK::Models::V1::PackageListResponse::Subscription::StartingAtOffset::Unit }
2419
+
2420
+ # @!attribute value
2421
+ #
2422
+ # @return [Integer]
2423
+ required :value, Integer
2424
+
2425
+ # @!method initialize(unit:, value:)
2426
+ # @param unit [Symbol, MetronomeSDK::Models::V1::PackageListResponse::Subscription::StartingAtOffset::Unit]
2427
+ # @param value [Integer]
2428
+
2429
+ # @see MetronomeSDK::Models::V1::PackageListResponse::Subscription::StartingAtOffset#unit
2430
+ module Unit
2431
+ extend MetronomeSDK::Internal::Type::Enum
2432
+
2433
+ DAYS = :DAYS
2434
+ WEEKS = :WEEKS
2435
+ MONTHS = :MONTHS
2436
+ YEARS = :YEARS
2437
+
2438
+ # @!method self.values
2439
+ # @return [Array<Symbol>]
2440
+ end
2441
+ end
2442
+ end
2443
+ end
2444
+ end
2445
+ end
2446
+ end