metronome-sdk 3.5.0 → 3.6.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +37 -0
- data/README.md +1 -1
- data/lib/metronome_sdk/client.rb +15 -1
- data/lib/metronome_sdk/internal/transport/base_client.rb +2 -0
- data/lib/metronome_sdk/models/contract_v2.rb +362 -4
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +1 -0
- data/lib/metronome_sdk/models/v1/contract_amend_params.rb +1 -177
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +2 -179
- data/lib/metronome_sdk/models/v1/contract_list_seat_balances_params.rb +119 -0
- data/lib/metronome_sdk/models/v1/contract_list_seat_balances_response.rb +315 -0
- data/lib/metronome_sdk/models/v1/contracts/product_create_params.rb +31 -1
- data/lib/metronome_sdk/models/v1/contracts/product_update_params.rb +31 -1
- data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +1 -0
- data/lib/metronome_sdk/models/v1/customers/invoice.rb +8 -1
- data/lib/metronome_sdk/models/v1/customers/invoice_list_params.rb +29 -1
- data/lib/metronome_sdk/models/v1/package_create_params.rb +1 -18
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +362 -3
- data/lib/metronome_sdk/resources/v1/contracts/products.rb +6 -2
- data/lib/metronome_sdk/resources/v1/contracts.rb +69 -2
- data/lib/metronome_sdk/resources/v1/customers/invoices.rb +5 -1
- data/lib/metronome_sdk/resources/v1/packages.rb +1 -3
- data/lib/metronome_sdk/version.rb +1 -1
- data/lib/metronome_sdk.rb +2 -0
- data/rbi/metronome_sdk/models/contract_v2.rbi +763 -4
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +0 -396
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +2 -398
- data/rbi/metronome_sdk/models/v1/contract_list_seat_balances_params.rbi +179 -0
- data/rbi/metronome_sdk/models/v1/contract_list_seat_balances_response.rbi +714 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_create_params.rbi +74 -0
- data/rbi/metronome_sdk/models/v1/contracts/product_update_params.rbi +74 -0
- data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +9 -0
- data/rbi/metronome_sdk/models/v1/customers/invoice_list_params.rbi +75 -0
- data/rbi/metronome_sdk/models/v1/package_create_params.rbi +0 -56
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +792 -4
- data/rbi/metronome_sdk/resources/v1/contracts/products.rbi +18 -0
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +81 -3
- data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +7 -0
- data/rbi/metronome_sdk/resources/v1/packages.rbi +0 -3
- data/sig/metronome_sdk/models/contract_v2.rbs +324 -6
- data/sig/metronome_sdk/models/v1/alert_create_params.rbs +3 -1
- data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +0 -137
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +0 -137
- data/sig/metronome_sdk/models/v1/contract_list_seat_balances_params.rbs +96 -0
- data/sig/metronome_sdk/models/v1/contract_list_seat_balances_response.rbs +299 -0
- data/sig/metronome_sdk/models/v1/contracts/product_create_params.rbs +20 -0
- data/sig/metronome_sdk/models/v1/contracts/product_update_params.rbs +20 -0
- data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +3 -1
- data/sig/metronome_sdk/models/v1/customers/invoice.rbs +7 -0
- data/sig/metronome_sdk/models/v1/customers/invoice_list_params.rbs +29 -1
- data/sig/metronome_sdk/models/v1/package_create_params.rbs +0 -20
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +319 -6
- data/sig/metronome_sdk/resources/v1/contracts/products.rbs +2 -0
- data/sig/metronome_sdk/resources/v1/contracts.rbs +15 -0
- data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +2 -0
- data/sig/metronome_sdk/resources/v1/packages.rbs +0 -1
- metadata +8 -2
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module MetronomeSDK
|
|
4
|
+
module Models
|
|
5
|
+
module V1
|
|
6
|
+
# @see MetronomeSDK::Resources::V1::Contracts#list_seat_balances
|
|
7
|
+
class ContractListSeatBalancesResponse < MetronomeSDK::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute data
|
|
9
|
+
#
|
|
10
|
+
# @return [Array<MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data>]
|
|
11
|
+
required :data,
|
|
12
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data] }
|
|
13
|
+
|
|
14
|
+
# @!attribute pagination
|
|
15
|
+
#
|
|
16
|
+
# @return [MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Pagination]
|
|
17
|
+
required :pagination, -> { MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Pagination }
|
|
18
|
+
|
|
19
|
+
# @!method initialize(data:, pagination:)
|
|
20
|
+
# @param data [Array<MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data>]
|
|
21
|
+
# @param pagination [MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Pagination]
|
|
22
|
+
|
|
23
|
+
class Data < MetronomeSDK::Internal::Type::BaseModel
|
|
24
|
+
# @!attribute balances
|
|
25
|
+
#
|
|
26
|
+
# @return [Array<MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Balance>]
|
|
27
|
+
required :balances,
|
|
28
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Balance] }
|
|
29
|
+
|
|
30
|
+
# @!attribute seat_id
|
|
31
|
+
# The unique identifier for the seat
|
|
32
|
+
#
|
|
33
|
+
# @return [String]
|
|
34
|
+
required :seat_id, String
|
|
35
|
+
|
|
36
|
+
# @!attribute commits
|
|
37
|
+
# Array of commits applicable to this seat with their balances
|
|
38
|
+
#
|
|
39
|
+
# @return [Array<MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Commit>, nil]
|
|
40
|
+
optional :commits,
|
|
41
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Commit] },
|
|
42
|
+
nil?: true
|
|
43
|
+
|
|
44
|
+
# @!attribute credits
|
|
45
|
+
# Array of credits applicable to this seat with their balances
|
|
46
|
+
#
|
|
47
|
+
# @return [Array<MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Credit>, nil]
|
|
48
|
+
optional :credits,
|
|
49
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Credit] }
|
|
50
|
+
|
|
51
|
+
# @!method initialize(balances:, seat_id:, commits: nil, credits: nil)
|
|
52
|
+
# @param balances [Array<MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Balance>]
|
|
53
|
+
#
|
|
54
|
+
# @param seat_id [String] The unique identifier for the seat
|
|
55
|
+
#
|
|
56
|
+
# @param commits [Array<MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Commit>, nil] Array of commits applicable to this seat with their balances
|
|
57
|
+
#
|
|
58
|
+
# @param credits [Array<MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Credit>] Array of credits applicable to this seat with their balances
|
|
59
|
+
|
|
60
|
+
class Balance < MetronomeSDK::Internal::Type::BaseModel
|
|
61
|
+
# @!attribute balance
|
|
62
|
+
# The total balance across all commits and credits for this seat, of this credit
|
|
63
|
+
# type.
|
|
64
|
+
#
|
|
65
|
+
# @return [Float]
|
|
66
|
+
required :balance, Float
|
|
67
|
+
|
|
68
|
+
# @!attribute credit_type_id
|
|
69
|
+
#
|
|
70
|
+
# @return [String]
|
|
71
|
+
required :credit_type_id, String
|
|
72
|
+
|
|
73
|
+
# @!attribute starting_balance
|
|
74
|
+
# The total initial balances of all commits and credits for this seat, of this
|
|
75
|
+
# credit type.
|
|
76
|
+
#
|
|
77
|
+
# @return [Float]
|
|
78
|
+
required :starting_balance, Float
|
|
79
|
+
|
|
80
|
+
# @!method initialize(balance:, credit_type_id:, starting_balance:)
|
|
81
|
+
# Some parameter documentations has been truncated, see
|
|
82
|
+
# {MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Balance} for
|
|
83
|
+
# more details.
|
|
84
|
+
#
|
|
85
|
+
# @param balance [Float] The total balance across all commits and credits for this seat, of this credit t
|
|
86
|
+
#
|
|
87
|
+
# @param credit_type_id [String]
|
|
88
|
+
#
|
|
89
|
+
# @param starting_balance [Float] The total initial balances of all commits and credits for this seat, of this cre
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
class Commit < MetronomeSDK::Internal::Type::BaseModel
|
|
93
|
+
# @!attribute id
|
|
94
|
+
# The commit or credit ID
|
|
95
|
+
#
|
|
96
|
+
# @return [String]
|
|
97
|
+
required :id, String
|
|
98
|
+
|
|
99
|
+
# @!attribute balance
|
|
100
|
+
# The current balance for this commit for this specific seat
|
|
101
|
+
#
|
|
102
|
+
# @return [Float]
|
|
103
|
+
required :balance, Float
|
|
104
|
+
|
|
105
|
+
# @!attribute start_date
|
|
106
|
+
# The datetime when the commit becomes active
|
|
107
|
+
#
|
|
108
|
+
# @return [Time]
|
|
109
|
+
required :start_date, Time
|
|
110
|
+
|
|
111
|
+
# @!attribute end_date
|
|
112
|
+
# The datetime when the commit expires
|
|
113
|
+
#
|
|
114
|
+
# @return [Time, nil]
|
|
115
|
+
optional :end_date, Time, nil?: true
|
|
116
|
+
|
|
117
|
+
# @!attribute ledger_entries
|
|
118
|
+
# Transaction history for this commit for this seat (only included if
|
|
119
|
+
# include_ledgers=true)
|
|
120
|
+
#
|
|
121
|
+
# @return [Array<MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Commit::LedgerEntry>, nil]
|
|
122
|
+
optional :ledger_entries,
|
|
123
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Commit::LedgerEntry] }
|
|
124
|
+
|
|
125
|
+
# @!method initialize(id:, balance:, start_date:, end_date: nil, ledger_entries: nil)
|
|
126
|
+
# Some parameter documentations has been truncated, see
|
|
127
|
+
# {MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Commit} for
|
|
128
|
+
# more details.
|
|
129
|
+
#
|
|
130
|
+
# @param id [String] The commit or credit ID
|
|
131
|
+
#
|
|
132
|
+
# @param balance [Float] The current balance for this commit for this specific seat
|
|
133
|
+
#
|
|
134
|
+
# @param start_date [Time] The datetime when the commit becomes active
|
|
135
|
+
#
|
|
136
|
+
# @param end_date [Time, nil] The datetime when the commit expires
|
|
137
|
+
#
|
|
138
|
+
# @param ledger_entries [Array<MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Commit::LedgerEntry>] Transaction history for this commit for this seat (only included if include_ledg
|
|
139
|
+
|
|
140
|
+
class LedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
|
141
|
+
# @!attribute amount
|
|
142
|
+
# Amount of the ledger entry
|
|
143
|
+
#
|
|
144
|
+
# @return [Float]
|
|
145
|
+
required :amount, Float
|
|
146
|
+
|
|
147
|
+
# @!attribute timestamp
|
|
148
|
+
# The datetime when the ledger is created
|
|
149
|
+
#
|
|
150
|
+
# @return [Time]
|
|
151
|
+
required :timestamp, Time
|
|
152
|
+
|
|
153
|
+
# @!attribute type
|
|
154
|
+
# Commit ledger type
|
|
155
|
+
#
|
|
156
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Commit::LedgerEntry::Type]
|
|
157
|
+
required :type,
|
|
158
|
+
enum: -> { MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Commit::LedgerEntry::Type }
|
|
159
|
+
|
|
160
|
+
# @!method initialize(amount:, timestamp:, type:)
|
|
161
|
+
# @param amount [Float] Amount of the ledger entry
|
|
162
|
+
#
|
|
163
|
+
# @param timestamp [Time] The datetime when the ledger is created
|
|
164
|
+
#
|
|
165
|
+
# @param type [Symbol, MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Commit::LedgerEntry::Type] Commit ledger type
|
|
166
|
+
|
|
167
|
+
# Commit ledger type
|
|
168
|
+
#
|
|
169
|
+
# @see MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Commit::LedgerEntry#type
|
|
170
|
+
module Type
|
|
171
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
172
|
+
|
|
173
|
+
PREPAID_COMMIT_SEGMENT_START = :PREPAID_COMMIT_SEGMENT_START
|
|
174
|
+
PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION = :PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION
|
|
175
|
+
PREPAID_COMMIT_ROLLOVER = :PREPAID_COMMIT_ROLLOVER
|
|
176
|
+
PREPAID_COMMIT_EXPIRATION = :PREPAID_COMMIT_EXPIRATION
|
|
177
|
+
PREPAID_COMMIT_CANCELED = :PREPAID_COMMIT_CANCELED
|
|
178
|
+
PREPAID_COMMIT_CREDITED = :PREPAID_COMMIT_CREDITED
|
|
179
|
+
PREPAID_COMMIT_MANUAL = :PREPAID_COMMIT_MANUAL
|
|
180
|
+
PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT = :PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT
|
|
181
|
+
|
|
182
|
+
# @!method self.values
|
|
183
|
+
# @return [Array<Symbol>]
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
class Credit < MetronomeSDK::Internal::Type::BaseModel
|
|
189
|
+
# @!attribute id
|
|
190
|
+
# The credit ID
|
|
191
|
+
#
|
|
192
|
+
# @return [String]
|
|
193
|
+
required :id, String
|
|
194
|
+
|
|
195
|
+
# @!attribute balance
|
|
196
|
+
# The current balance for this credit for this specific seat
|
|
197
|
+
#
|
|
198
|
+
# @return [Float]
|
|
199
|
+
required :balance, Float
|
|
200
|
+
|
|
201
|
+
# @!attribute start_date
|
|
202
|
+
# The datetime when the credit becomes active
|
|
203
|
+
#
|
|
204
|
+
# @return [Time]
|
|
205
|
+
required :start_date, Time
|
|
206
|
+
|
|
207
|
+
# @!attribute end_date
|
|
208
|
+
# The datetime when the credit expires
|
|
209
|
+
#
|
|
210
|
+
# @return [Time, nil]
|
|
211
|
+
optional :end_date, Time, nil?: true
|
|
212
|
+
|
|
213
|
+
# @!attribute ledger_entries
|
|
214
|
+
# Transaction history for this credit for this seat (only included if
|
|
215
|
+
# include_ledgers=true)
|
|
216
|
+
#
|
|
217
|
+
# @return [Array<MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Credit::LedgerEntry>, nil]
|
|
218
|
+
optional :ledger_entries,
|
|
219
|
+
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Credit::LedgerEntry] }
|
|
220
|
+
|
|
221
|
+
# @!method initialize(id:, balance:, start_date:, end_date: nil, ledger_entries: nil)
|
|
222
|
+
# Some parameter documentations has been truncated, see
|
|
223
|
+
# {MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Credit} for
|
|
224
|
+
# more details.
|
|
225
|
+
#
|
|
226
|
+
# @param id [String] The credit ID
|
|
227
|
+
#
|
|
228
|
+
# @param balance [Float] The current balance for this credit for this specific seat
|
|
229
|
+
#
|
|
230
|
+
# @param start_date [Time] The datetime when the credit becomes active
|
|
231
|
+
#
|
|
232
|
+
# @param end_date [Time, nil] The datetime when the credit expires
|
|
233
|
+
#
|
|
234
|
+
# @param ledger_entries [Array<MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Credit::LedgerEntry>] Transaction history for this credit for this seat (only included if include_ledg
|
|
235
|
+
|
|
236
|
+
class LedgerEntry < MetronomeSDK::Internal::Type::BaseModel
|
|
237
|
+
# @!attribute amount
|
|
238
|
+
# Amount of the ledger entry
|
|
239
|
+
#
|
|
240
|
+
# @return [Float]
|
|
241
|
+
required :amount, Float
|
|
242
|
+
|
|
243
|
+
# @!attribute timestamp
|
|
244
|
+
# The datetime when the ledger is created
|
|
245
|
+
#
|
|
246
|
+
# @return [Time]
|
|
247
|
+
required :timestamp, Time
|
|
248
|
+
|
|
249
|
+
# @!attribute type
|
|
250
|
+
# Credit ledger type
|
|
251
|
+
#
|
|
252
|
+
# @return [Symbol, MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Credit::LedgerEntry::Type]
|
|
253
|
+
required :type,
|
|
254
|
+
enum: -> { MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Credit::LedgerEntry::Type }
|
|
255
|
+
|
|
256
|
+
# @!method initialize(amount:, timestamp:, type:)
|
|
257
|
+
# @param amount [Float] Amount of the ledger entry
|
|
258
|
+
#
|
|
259
|
+
# @param timestamp [Time] The datetime when the ledger is created
|
|
260
|
+
#
|
|
261
|
+
# @param type [Symbol, MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Credit::LedgerEntry::Type] Credit ledger type
|
|
262
|
+
|
|
263
|
+
# Credit ledger type
|
|
264
|
+
#
|
|
265
|
+
# @see MetronomeSDK::Models::V1::ContractListSeatBalancesResponse::Data::Credit::LedgerEntry#type
|
|
266
|
+
module Type
|
|
267
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
268
|
+
|
|
269
|
+
CREDIT_SEGMENT_START = :CREDIT_SEGMENT_START
|
|
270
|
+
CREDIT_AUTOMATED_INVOICE_DEDUCTION = :CREDIT_AUTOMATED_INVOICE_DEDUCTION
|
|
271
|
+
CREDIT_EXPIRATION = :CREDIT_EXPIRATION
|
|
272
|
+
CREDIT_CANCELED = :CREDIT_CANCELED
|
|
273
|
+
CREDIT_CREDITED = :CREDIT_CREDITED
|
|
274
|
+
CREDIT_MANUAL = :CREDIT_MANUAL
|
|
275
|
+
CREDIT_SEAT_BASED_ADJUSTMENT = :CREDIT_SEAT_BASED_ADJUSTMENT
|
|
276
|
+
CREDIT_ROLLOVER = :CREDIT_ROLLOVER
|
|
277
|
+
|
|
278
|
+
# @!method self.values
|
|
279
|
+
# @return [Array<Symbol>]
|
|
280
|
+
end
|
|
281
|
+
end
|
|
282
|
+
end
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# @see MetronomeSDK::Models::V1::ContractListSeatBalancesResponse#pagination
|
|
286
|
+
class Pagination < MetronomeSDK::Internal::Type::BaseModel
|
|
287
|
+
# @!attribute seats_available_for_next_page
|
|
288
|
+
# Number of seats available to fetch in the next page
|
|
289
|
+
#
|
|
290
|
+
# @return [Float]
|
|
291
|
+
required :seats_available_for_next_page, Float
|
|
292
|
+
|
|
293
|
+
# @!attribute seats_included
|
|
294
|
+
# Number of seats included in this response
|
|
295
|
+
#
|
|
296
|
+
# @return [Float]
|
|
297
|
+
required :seats_included, Float
|
|
298
|
+
|
|
299
|
+
# @!attribute next_page
|
|
300
|
+
# Token to retrieve the next page of results. Null if no more pages available
|
|
301
|
+
#
|
|
302
|
+
# @return [String, nil]
|
|
303
|
+
optional :next_page, String, nil?: true
|
|
304
|
+
|
|
305
|
+
# @!method initialize(seats_available_for_next_page:, seats_included:, next_page: nil)
|
|
306
|
+
# @param seats_available_for_next_page [Float] Number of seats available to fetch in the next page
|
|
307
|
+
#
|
|
308
|
+
# @param seats_included [Float] Number of seats included in this response
|
|
309
|
+
#
|
|
310
|
+
# @param next_page [String, nil] Token to retrieve the next page of results. Null if no more pages available
|
|
311
|
+
end
|
|
312
|
+
end
|
|
313
|
+
end
|
|
314
|
+
end
|
|
315
|
+
end
|
|
@@ -108,12 +108,24 @@ module MetronomeSDK
|
|
|
108
108
|
# @return [MetronomeSDK::Models::V1::Contracts::QuantityRounding, nil]
|
|
109
109
|
optional :quantity_rounding, -> { MetronomeSDK::V1::Contracts::QuantityRounding }, nil?: true
|
|
110
110
|
|
|
111
|
+
# @!attribute sql_breakdown_granularity
|
|
112
|
+
# Defines the breakdown behavior when calculating usage from SQL Billable Metrics.
|
|
113
|
+
# If set to 'service_period' (default), the usage will be evaluated once for all
|
|
114
|
+
# events the invoice service period and the usage will be applied at the last
|
|
115
|
+
# instant of the invoice. If set to 'hour', it will be broken down and evaluated
|
|
116
|
+
# for each hour. For most use cases, 'hour' is recommended. The setting has no
|
|
117
|
+
# effect for Streaming Billable Metrics.
|
|
118
|
+
#
|
|
119
|
+
# @return [Symbol, MetronomeSDK::Models::V1::Contracts::ProductCreateParams::SqlBreakdownGranularity, nil]
|
|
120
|
+
optional :sql_breakdown_granularity,
|
|
121
|
+
enum: -> { MetronomeSDK::V1::Contracts::ProductCreateParams::SqlBreakdownGranularity }
|
|
122
|
+
|
|
111
123
|
# @!attribute tags
|
|
112
124
|
#
|
|
113
125
|
# @return [Array<String>, nil]
|
|
114
126
|
optional :tags, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
115
127
|
|
|
116
|
-
# @!method initialize(name:, type:, billable_metric_id: nil, composite_product_ids: nil, composite_tags: nil, custom_fields: nil, exclude_free_usage: nil, is_refundable: nil, netsuite_internal_item_id: nil, netsuite_overage_item_id: nil, presentation_group_key: nil, pricing_group_key: nil, quantity_conversion: nil, quantity_rounding: nil, tags: nil, request_options: {})
|
|
128
|
+
# @!method initialize(name:, type:, billable_metric_id: nil, composite_product_ids: nil, composite_tags: nil, custom_fields: nil, exclude_free_usage: nil, is_refundable: nil, netsuite_internal_item_id: nil, netsuite_overage_item_id: nil, presentation_group_key: nil, pricing_group_key: nil, quantity_conversion: nil, quantity_rounding: nil, sql_breakdown_granularity: nil, tags: nil, request_options: {})
|
|
117
129
|
# Some parameter documentations has been truncated, see
|
|
118
130
|
# {MetronomeSDK::Models::V1::Contracts::ProductCreateParams} for more details.
|
|
119
131
|
#
|
|
@@ -145,6 +157,8 @@ module MetronomeSDK
|
|
|
145
157
|
#
|
|
146
158
|
# @param quantity_rounding [MetronomeSDK::Models::V1::Contracts::QuantityRounding, nil] Optional. Only valid for USAGE products. If provided, the quantity will be round
|
|
147
159
|
#
|
|
160
|
+
# @param sql_breakdown_granularity [Symbol, MetronomeSDK::Models::V1::Contracts::ProductCreateParams::SqlBreakdownGranularity] Defines the breakdown behavior when calculating usage from SQL Billable Metrics.
|
|
161
|
+
#
|
|
148
162
|
# @param tags [Array<String>]
|
|
149
163
|
#
|
|
150
164
|
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
@@ -162,6 +176,22 @@ module MetronomeSDK
|
|
|
162
176
|
# @!method self.values
|
|
163
177
|
# @return [Array<Symbol>]
|
|
164
178
|
end
|
|
179
|
+
|
|
180
|
+
# Defines the breakdown behavior when calculating usage from SQL Billable Metrics.
|
|
181
|
+
# If set to 'service_period' (default), the usage will be evaluated once for all
|
|
182
|
+
# events the invoice service period and the usage will be applied at the last
|
|
183
|
+
# instant of the invoice. If set to 'hour', it will be broken down and evaluated
|
|
184
|
+
# for each hour. For most use cases, 'hour' is recommended. The setting has no
|
|
185
|
+
# effect for Streaming Billable Metrics.
|
|
186
|
+
module SqlBreakdownGranularity
|
|
187
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
188
|
+
|
|
189
|
+
HOUR = :HOUR
|
|
190
|
+
SERVICE_PERIOD = :SERVICE_PERIOD
|
|
191
|
+
|
|
192
|
+
# @!method self.values
|
|
193
|
+
# @return [Array<Symbol>]
|
|
194
|
+
end
|
|
165
195
|
end
|
|
166
196
|
end
|
|
167
197
|
end
|
|
@@ -116,13 +116,25 @@ module MetronomeSDK
|
|
|
116
116
|
# @return [MetronomeSDK::Models::V1::Contracts::QuantityRounding, nil]
|
|
117
117
|
optional :quantity_rounding, -> { MetronomeSDK::V1::Contracts::QuantityRounding }, nil?: true
|
|
118
118
|
|
|
119
|
+
# @!attribute sql_breakdown_granularity
|
|
120
|
+
# Defines the breakdown behavior when calculating usage from SQL Billable Metrics.
|
|
121
|
+
# If set to 'service_period' (default), the usage will be evaluated once for all
|
|
122
|
+
# events the invoice service period and the usage will be applied at the last
|
|
123
|
+
# instant of the invoice. If set to 'hour', it will be broken down and evaluated
|
|
124
|
+
# for each hour. For most use cases, 'hour' is recommended. The setting has no
|
|
125
|
+
# effect for Streaming Billable Metrics.
|
|
126
|
+
#
|
|
127
|
+
# @return [Symbol, MetronomeSDK::Models::V1::Contracts::ProductUpdateParams::SqlBreakdownGranularity, nil]
|
|
128
|
+
optional :sql_breakdown_granularity,
|
|
129
|
+
enum: -> { MetronomeSDK::V1::Contracts::ProductUpdateParams::SqlBreakdownGranularity }
|
|
130
|
+
|
|
119
131
|
# @!attribute tags
|
|
120
132
|
# If not provided, defaults to product's current tags
|
|
121
133
|
#
|
|
122
134
|
# @return [Array<String>, nil]
|
|
123
135
|
optional :tags, MetronomeSDK::Internal::Type::ArrayOf[String]
|
|
124
136
|
|
|
125
|
-
# @!method initialize(product_id:, starting_at:, billable_metric_id: nil, composite_product_ids: nil, composite_tags: nil, exclude_free_usage: nil, is_refundable: nil, name: nil, netsuite_internal_item_id: nil, netsuite_overage_item_id: nil, presentation_group_key: nil, pricing_group_key: nil, quantity_conversion: nil, quantity_rounding: nil, tags: nil, request_options: {})
|
|
137
|
+
# @!method initialize(product_id:, starting_at:, billable_metric_id: nil, composite_product_ids: nil, composite_tags: nil, exclude_free_usage: nil, is_refundable: nil, name: nil, netsuite_internal_item_id: nil, netsuite_overage_item_id: nil, presentation_group_key: nil, pricing_group_key: nil, quantity_conversion: nil, quantity_rounding: nil, sql_breakdown_granularity: nil, tags: nil, request_options: {})
|
|
126
138
|
# Some parameter documentations has been truncated, see
|
|
127
139
|
# {MetronomeSDK::Models::V1::Contracts::ProductUpdateParams} for more details.
|
|
128
140
|
#
|
|
@@ -154,9 +166,27 @@ module MetronomeSDK
|
|
|
154
166
|
#
|
|
155
167
|
# @param quantity_rounding [MetronomeSDK::Models::V1::Contracts::QuantityRounding, nil] Optional. Only valid for USAGE products. If provided, the quantity will be round
|
|
156
168
|
#
|
|
169
|
+
# @param sql_breakdown_granularity [Symbol, MetronomeSDK::Models::V1::Contracts::ProductUpdateParams::SqlBreakdownGranularity] Defines the breakdown behavior when calculating usage from SQL Billable Metrics.
|
|
170
|
+
#
|
|
157
171
|
# @param tags [Array<String>] If not provided, defaults to product's current tags
|
|
158
172
|
#
|
|
159
173
|
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
174
|
+
|
|
175
|
+
# Defines the breakdown behavior when calculating usage from SQL Billable Metrics.
|
|
176
|
+
# If set to 'service_period' (default), the usage will be evaluated once for all
|
|
177
|
+
# events the invoice service period and the usage will be applied at the last
|
|
178
|
+
# instant of the invoice. If set to 'hour', it will be broken down and evaluated
|
|
179
|
+
# for each hour. For most use cases, 'hour' is recommended. The setting has no
|
|
180
|
+
# effect for Streaming Billable Metrics.
|
|
181
|
+
module SqlBreakdownGranularity
|
|
182
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
183
|
+
|
|
184
|
+
HOUR = :HOUR
|
|
185
|
+
SERVICE_PERIOD = :SERVICE_PERIOD
|
|
186
|
+
|
|
187
|
+
# @!method self.values
|
|
188
|
+
# @return [Array<Symbol>]
|
|
189
|
+
end
|
|
160
190
|
end
|
|
161
191
|
end
|
|
162
192
|
end
|
|
@@ -152,6 +152,11 @@ module MetronomeSDK
|
|
|
152
152
|
# @return [String, nil]
|
|
153
153
|
optional :plan_name, String
|
|
154
154
|
|
|
155
|
+
# @!attribute regenerated_from_invoice_id
|
|
156
|
+
#
|
|
157
|
+
# @return [String, nil]
|
|
158
|
+
optional :regenerated_from_invoice_id, String
|
|
159
|
+
|
|
155
160
|
# @!attribute reseller_royalty
|
|
156
161
|
# Only present for contract invoices with reseller royalties.
|
|
157
162
|
#
|
|
@@ -184,7 +189,7 @@ module MetronomeSDK
|
|
|
184
189
|
# @return [Float, nil]
|
|
185
190
|
optional :subtotal, Float
|
|
186
191
|
|
|
187
|
-
# @!method initialize(id:, credit_type:, customer_id:, line_items:, status:, total:, type:, amendment_id: nil, billable_status: nil, constituent_invoices: nil, contract_custom_fields: nil, contract_id: nil, correction_record: nil, created_at: nil, custom_fields: nil, customer_custom_fields: nil, end_timestamp: nil, external_invoice: nil, invoice_adjustments: nil, issued_at: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, payer: nil, plan_custom_fields: nil, plan_id: nil, plan_name: nil, reseller_royalty: nil, revenue_system_invoices: nil, salesforce_opportunity_id: nil, start_timestamp: nil, subtotal: nil)
|
|
192
|
+
# @!method initialize(id:, credit_type:, customer_id:, line_items:, status:, total:, type:, amendment_id: nil, billable_status: nil, constituent_invoices: nil, contract_custom_fields: nil, contract_id: nil, correction_record: nil, created_at: nil, custom_fields: nil, customer_custom_fields: nil, end_timestamp: nil, external_invoice: nil, invoice_adjustments: nil, issued_at: nil, net_payment_terms_days: nil, netsuite_sales_order_id: nil, payer: nil, plan_custom_fields: nil, plan_id: nil, plan_name: nil, regenerated_from_invoice_id: nil, reseller_royalty: nil, revenue_system_invoices: nil, salesforce_opportunity_id: nil, start_timestamp: nil, subtotal: nil)
|
|
188
193
|
# Some parameter documentations has been truncated, see
|
|
189
194
|
# {MetronomeSDK::Models::V1::Customers::Invoice} for more details.
|
|
190
195
|
#
|
|
@@ -240,6 +245,8 @@ module MetronomeSDK
|
|
|
240
245
|
#
|
|
241
246
|
# @param plan_name [String]
|
|
242
247
|
#
|
|
248
|
+
# @param regenerated_from_invoice_id [String]
|
|
249
|
+
#
|
|
243
250
|
# @param reseller_royalty [MetronomeSDK::Models::V1::Customers::Invoice::ResellerRoyalty] Only present for contract invoices with reseller royalties.
|
|
244
251
|
#
|
|
245
252
|
# @param revenue_system_invoices [Array<MetronomeSDK::Models::V1::Customers::Invoice::RevenueSystemInvoice>, nil]
|
|
@@ -14,6 +14,12 @@ module MetronomeSDK
|
|
|
14
14
|
# @return [String]
|
|
15
15
|
required :customer_id, String
|
|
16
16
|
|
|
17
|
+
# @!attribute contract_id
|
|
18
|
+
# Only return invoices for the specified contract
|
|
19
|
+
#
|
|
20
|
+
# @return [String, nil]
|
|
21
|
+
optional :contract_id, String
|
|
22
|
+
|
|
17
23
|
# @!attribute credit_type_id
|
|
18
24
|
# Only return invoices for the specified credit type
|
|
19
25
|
#
|
|
@@ -65,12 +71,20 @@ module MetronomeSDK
|
|
|
65
71
|
# @return [String, nil]
|
|
66
72
|
optional :status, String
|
|
67
73
|
|
|
68
|
-
# @!
|
|
74
|
+
# @!attribute type
|
|
75
|
+
# Filter invoices by type. Defaults to returning all invoice types.
|
|
76
|
+
#
|
|
77
|
+
# @return [Symbol, MetronomeSDK::Models::V1::Customers::InvoiceListParams::Type, nil]
|
|
78
|
+
optional :type, enum: -> { MetronomeSDK::V1::Customers::InvoiceListParams::Type }
|
|
79
|
+
|
|
80
|
+
# @!method initialize(customer_id:, contract_id: nil, credit_type_id: nil, ending_before: nil, limit: nil, next_page: nil, skip_zero_qty_line_items: nil, sort: nil, starting_on: nil, status: nil, type: nil, request_options: {})
|
|
69
81
|
# Some parameter documentations has been truncated, see
|
|
70
82
|
# {MetronomeSDK::Models::V1::Customers::InvoiceListParams} for more details.
|
|
71
83
|
#
|
|
72
84
|
# @param customer_id [String]
|
|
73
85
|
#
|
|
86
|
+
# @param contract_id [String] Only return invoices for the specified contract
|
|
87
|
+
#
|
|
74
88
|
# @param credit_type_id [String] Only return invoices for the specified credit type
|
|
75
89
|
#
|
|
76
90
|
# @param ending_before [Time] RFC 3339 timestamp (exclusive). Invoices will only be returned for billing perio
|
|
@@ -87,6 +101,8 @@ module MetronomeSDK
|
|
|
87
101
|
#
|
|
88
102
|
# @param status [String] Invoice status, e.g. DRAFT, FINALIZED, or VOID
|
|
89
103
|
#
|
|
104
|
+
# @param type [Symbol, MetronomeSDK::Models::V1::Customers::InvoiceListParams::Type] Filter invoices by type. Defaults to returning all invoice types.
|
|
105
|
+
#
|
|
90
106
|
# @param request_options [MetronomeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
91
107
|
|
|
92
108
|
# Invoice sort order by issued_at, e.g. date_asc or date_desc. Defaults to
|
|
@@ -100,6 +116,18 @@ module MetronomeSDK
|
|
|
100
116
|
# @!method self.values
|
|
101
117
|
# @return [Array<Symbol>]
|
|
102
118
|
end
|
|
119
|
+
|
|
120
|
+
# Filter invoices by type. Defaults to returning all invoice types.
|
|
121
|
+
module Type
|
|
122
|
+
extend MetronomeSDK::Internal::Type::Enum
|
|
123
|
+
|
|
124
|
+
USAGE = :USAGE
|
|
125
|
+
USAGE_CONSOLIDATED = :USAGE_CONSOLIDATED
|
|
126
|
+
SCHEDULED = :SCHEDULED
|
|
127
|
+
|
|
128
|
+
# @!method self.values
|
|
129
|
+
# @return [Array<Symbol>]
|
|
130
|
+
end
|
|
103
131
|
end
|
|
104
132
|
end
|
|
105
133
|
end
|
|
@@ -22,11 +22,6 @@ module MetronomeSDK
|
|
|
22
22
|
optional :aliases,
|
|
23
23
|
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::PackageCreateParams::Alias] }
|
|
24
24
|
|
|
25
|
-
# @!attribute billing_anchor_date
|
|
26
|
-
#
|
|
27
|
-
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::BillingAnchorDate, nil]
|
|
28
|
-
optional :billing_anchor_date, enum: -> { MetronomeSDK::V1::PackageCreateParams::BillingAnchorDate }
|
|
29
|
-
|
|
30
25
|
# @!attribute billing_provider
|
|
31
26
|
#
|
|
32
27
|
# @return [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::BillingProvider, nil]
|
|
@@ -151,7 +146,7 @@ module MetronomeSDK
|
|
|
151
146
|
# @return [MetronomeSDK::Models::V1::PackageCreateParams::UsageStatementSchedule, nil]
|
|
152
147
|
optional :usage_statement_schedule, -> { MetronomeSDK::V1::PackageCreateParams::UsageStatementSchedule }
|
|
153
148
|
|
|
154
|
-
# @!method initialize(name:, aliases: nil,
|
|
149
|
+
# @!method initialize(name:, aliases: nil, billing_provider: nil, commits: nil, contract_name: nil, credits: nil, delivery_method: nil, duration: nil, multiplier_override_prioritization: nil, net_payment_terms_days: nil, overrides: nil, prepaid_balance_threshold_configuration: nil, rate_card_alias: nil, rate_card_id: nil, recurring_commits: nil, recurring_credits: nil, scheduled_charges: nil, scheduled_charges_on_usage_invoices: nil, spend_threshold_configuration: nil, subscriptions: nil, uniqueness_key: nil, usage_statement_schedule: nil, request_options: {})
|
|
155
150
|
# Some parameter documentations has been truncated, see
|
|
156
151
|
# {MetronomeSDK::Models::V1::PackageCreateParams} for more details.
|
|
157
152
|
#
|
|
@@ -159,8 +154,6 @@ module MetronomeSDK
|
|
|
159
154
|
#
|
|
160
155
|
# @param aliases [Array<MetronomeSDK::Models::V1::PackageCreateParams::Alias>] Reference this alias when creating a contract. If the same alias is assigned to
|
|
161
156
|
#
|
|
162
|
-
# @param billing_anchor_date [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::BillingAnchorDate]
|
|
163
|
-
#
|
|
164
157
|
# @param billing_provider [Symbol, MetronomeSDK::Models::V1::PackageCreateParams::BillingProvider]
|
|
165
158
|
#
|
|
166
159
|
# @param commits [Array<MetronomeSDK::Models::V1::PackageCreateParams::Commit>]
|
|
@@ -225,16 +218,6 @@ module MetronomeSDK
|
|
|
225
218
|
# @param starting_at [Time]
|
|
226
219
|
end
|
|
227
220
|
|
|
228
|
-
module BillingAnchorDate
|
|
229
|
-
extend MetronomeSDK::Internal::Type::Enum
|
|
230
|
-
|
|
231
|
-
CONTRACT_START_DATE = :contract_start_date
|
|
232
|
-
FIRST_BILLING_PERIOD = :first_billing_period
|
|
233
|
-
|
|
234
|
-
# @!method self.values
|
|
235
|
-
# @return [Array<Symbol>]
|
|
236
|
-
end
|
|
237
|
-
|
|
238
221
|
module BillingProvider
|
|
239
222
|
extend MetronomeSDK::Internal::Type::Enum
|
|
240
223
|
|