metronome-sdk 1.0.0 → 2.1.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 +91 -0
- data/README.md +1 -1
- data/lib/metronome_sdk/errors.rb +25 -11
- data/lib/metronome_sdk/file_part.rb +10 -7
- data/lib/metronome_sdk/internal/body_cursor_page.rb +1 -1
- data/lib/metronome_sdk/internal/cursor_page.rb +1 -1
- data/lib/metronome_sdk/internal/cursor_page_without_limit.rb +1 -1
- data/lib/metronome_sdk/internal/transport/base_client.rb +11 -7
- data/lib/metronome_sdk/internal/transport/pooled_net_requester.rb +34 -31
- data/lib/metronome_sdk/internal/type/base_page.rb +1 -1
- data/lib/metronome_sdk/internal/type/enum.rb +25 -0
- data/lib/metronome_sdk/internal/type/file_input.rb +7 -4
- data/lib/metronome_sdk/internal/util.rb +8 -7
- data/lib/metronome_sdk/models/contract.rb +1 -0
- data/lib/metronome_sdk/models/contract_v2.rb +275 -6
- data/lib/metronome_sdk/models/contract_without_amendments.rb +2 -2
- data/lib/metronome_sdk/models/hierarchy_configuration.rb +123 -2
- data/lib/metronome_sdk/models/payment_gate_config.rb +1 -0
- data/lib/metronome_sdk/models/payment_gate_config_v2.rb +1 -0
- data/lib/metronome_sdk/models/subscription.rb +95 -1
- data/lib/metronome_sdk/models/v1/alert_archive_params.rb +8 -4
- data/lib/metronome_sdk/models/v1/alert_create_params.rb +38 -36
- data/lib/metronome_sdk/models/v1/contract_amend_params.rb +1 -0
- data/lib/metronome_sdk/models/v1/contract_create_params.rb +157 -9
- data/lib/metronome_sdk/models/v1/contract_list_balances_params.rb +9 -1
- data/lib/metronome_sdk/models/v1/customer_create_params.rb +11 -1
- data/lib/metronome_sdk/models/v1/customer_detail.rb +9 -1
- data/lib/metronome_sdk/models/v1/customer_preview_events_params.rb +19 -25
- data/lib/metronome_sdk/models/v1/customer_preview_events_response.rb +3 -3
- data/lib/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rb +1 -0
- data/lib/metronome_sdk/models/v1/customer_set_billing_configurations_params.rb +1 -0
- data/lib/metronome_sdk/models/v1/customers/alert_list_params.rb +3 -3
- data/lib/metronome_sdk/models/v1/customers/alert_reset_params.rb +2 -2
- data/lib/metronome_sdk/models/v1/customers/alert_retrieve_params.rb +12 -12
- data/lib/metronome_sdk/models/v1/customers/billing_config_create_params.rb +6 -1
- data/lib/metronome_sdk/models/v1/customers/billing_config_delete_params.rb +1 -0
- data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_params.rb +1 -0
- data/lib/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rb +6 -1
- data/lib/metronome_sdk/models/v1/customers/commit_create_params.rb +1 -1
- data/lib/metronome_sdk/models/v1/customers/customer_alert.rb +41 -38
- data/lib/metronome_sdk/models/v1/customers/invoice.rb +256 -16
- data/lib/metronome_sdk/models/v1/customers/invoice_retrieve_pdf_params.rb +30 -0
- data/lib/metronome_sdk/models/v1/payment.rb +157 -0
- data/lib/metronome_sdk/models/v1/payment_attempt_params.rb +28 -0
- data/lib/metronome_sdk/models/v1/payment_attempt_response.rb +18 -0
- data/lib/metronome_sdk/models/v1/payment_cancel_params.rb +28 -0
- data/lib/metronome_sdk/models/v1/payment_cancel_response.rb +18 -0
- data/lib/metronome_sdk/models/v1/payment_list_params.rb +53 -0
- data/lib/metronome_sdk/models/v1/payment_status.rb +19 -0
- data/lib/metronome_sdk/models/v1/setting_upsert_avalara_credentials_params.rb +65 -0
- data/lib/metronome_sdk/models/v1/setting_upsert_avalara_credentials_response.rb +12 -0
- data/lib/metronome_sdk/models/v1/settings/billing_provider_create_params.rb +73 -0
- data/lib/metronome_sdk/models/v1/settings/billing_provider_create_response.rb +31 -0
- data/lib/metronome_sdk/models/v1/settings/billing_provider_list_params.rb +26 -0
- data/lib/metronome_sdk/models/v1/settings/billing_provider_list_response.rb +105 -0
- data/lib/metronome_sdk/models/v2/contract_edit_commit_params.rb +9 -1
- data/lib/metronome_sdk/models/v2/contract_edit_credit_params.rb +9 -1
- data/lib/metronome_sdk/models/v2/contract_edit_params.rb +219 -9
- data/lib/metronome_sdk/models/v2/contract_get_edit_history_response.rb +195 -8
- data/lib/metronome_sdk/resources/v1/alerts.rb +57 -53
- data/lib/metronome_sdk/resources/v1/contracts.rb +8 -5
- data/lib/metronome_sdk/resources/v1/credit_grants.rb +10 -5
- data/lib/metronome_sdk/resources/v1/customers/alerts.rb +70 -51
- data/lib/metronome_sdk/resources/v1/customers/billing_config.rb +7 -4
- data/lib/metronome_sdk/resources/v1/customers/commits.rb +2 -1
- data/lib/metronome_sdk/resources/v1/customers/invoices.rb +57 -1
- data/lib/metronome_sdk/resources/v1/customers/plans.rb +8 -4
- data/lib/metronome_sdk/resources/v1/customers.rb +13 -8
- data/lib/metronome_sdk/resources/v1/payments.rb +102 -0
- data/lib/metronome_sdk/resources/v1/plans.rb +8 -4
- data/lib/metronome_sdk/resources/v1/settings/billing_providers.rb +75 -0
- data/lib/metronome_sdk/resources/v1/settings.rb +55 -0
- data/lib/metronome_sdk/resources/v1/usage.rb +4 -2
- data/lib/metronome_sdk/resources/v1.rb +8 -0
- data/lib/metronome_sdk/resources/v2/contracts.rb +9 -3
- data/lib/metronome_sdk/version.rb +1 -1
- data/lib/metronome_sdk.rb +17 -0
- data/rbi/metronome_sdk/errors.rbi +29 -2
- data/rbi/metronome_sdk/file_part.rbi +1 -1
- data/rbi/metronome_sdk/internal/transport/base_client.rbi +4 -5
- data/rbi/metronome_sdk/internal/type/base_page.rbi +1 -1
- data/rbi/metronome_sdk/internal/util.rbi +1 -1
- data/rbi/metronome_sdk/models/contract.rbi +5 -0
- data/rbi/metronome_sdk/models/contract_v2.rbi +635 -10
- data/rbi/metronome_sdk/models/contract_without_amendments.rbi +2 -2
- data/rbi/metronome_sdk/models/hierarchy_configuration.rbi +286 -6
- data/rbi/metronome_sdk/models/payment_gate_config.rbi +5 -0
- data/rbi/metronome_sdk/models/payment_gate_config_v2.rbi +5 -0
- data/rbi/metronome_sdk/models/subscription.rbi +190 -0
- data/rbi/metronome_sdk/models/v1/alert_archive_params.rbi +6 -4
- data/rbi/metronome_sdk/models/v1/alert_create_params.rbi +51 -47
- data/rbi/metronome_sdk/models/v1/contract_amend_params.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/contract_create_params.rbi +326 -10
- data/rbi/metronome_sdk/models/v1/contract_list_balances_params.rbi +11 -0
- data/rbi/metronome_sdk/models/v1/customer_create_params.rbi +11 -0
- data/rbi/metronome_sdk/models/v1/customer_detail.rbi +8 -0
- data/rbi/metronome_sdk/models/v1/customer_preview_events_params.rbi +24 -32
- data/rbi/metronome_sdk/models/v1/customer_preview_events_response.rbi +10 -9
- data/rbi/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/customers/alert_list_params.rbi +4 -4
- data/rbi/metronome_sdk/models/v1/customers/alert_reset_params.rbi +2 -2
- data/rbi/metronome_sdk/models/v1/customers/alert_retrieve_params.rbi +14 -14
- data/rbi/metronome_sdk/models/v1/customers/billing_config_create_params.rbi +11 -0
- data/rbi/metronome_sdk/models/v1/customers/billing_config_delete_params.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_params.rbi +5 -0
- data/rbi/metronome_sdk/models/v1/customers/billing_config_retrieve_response.rbi +6 -0
- data/rbi/metronome_sdk/models/v1/customers/commit_create_params.rbi +2 -2
- data/rbi/metronome_sdk/models/v1/customers/customer_alert.rbi +53 -44
- data/rbi/metronome_sdk/models/v1/customers/invoice.rbi +462 -38
- data/rbi/metronome_sdk/models/v1/customers/invoice_retrieve_pdf_params.rbi +50 -0
- data/rbi/metronome_sdk/models/v1/payment.rbi +324 -0
- data/rbi/metronome_sdk/models/v1/payment_attempt_params.rbi +48 -0
- data/rbi/metronome_sdk/models/v1/payment_attempt_response.rbi +35 -0
- data/rbi/metronome_sdk/models/v1/payment_cancel_params.rbi +48 -0
- data/rbi/metronome_sdk/models/v1/payment_cancel_response.rbi +35 -0
- data/rbi/metronome_sdk/models/v1/payment_list_params.rbi +91 -0
- data/rbi/metronome_sdk/models/v1/payment_status.rbi +33 -0
- data/rbi/metronome_sdk/models/v1/setting_upsert_avalara_credentials_params.rbi +115 -0
- data/rbi/metronome_sdk/models/v1/setting_upsert_avalara_credentials_response.rbi +25 -0
- data/rbi/metronome_sdk/models/v1/settings/billing_provider_create_params.rbi +157 -0
- data/rbi/metronome_sdk/models/v1/settings/billing_provider_create_response.rbi +75 -0
- data/rbi/metronome_sdk/models/v1/settings/billing_provider_list_params.rbi +50 -0
- data/rbi/metronome_sdk/models/v1/settings/billing_provider_list_response.rbi +245 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_commit_params.rbi +18 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_credit_params.rbi +18 -0
- data/rbi/metronome_sdk/models/v2/contract_edit_params.rbi +536 -12
- data/rbi/metronome_sdk/models/v2/contract_get_edit_history_response.rbi +462 -14
- data/rbi/metronome_sdk/resources/v1/alerts.rbi +68 -64
- data/rbi/metronome_sdk/resources/v1/contracts.rbi +8 -4
- data/rbi/metronome_sdk/resources/v1/credit_grants.rbi +10 -5
- data/rbi/metronome_sdk/resources/v1/customers/alerts.rbi +73 -54
- data/rbi/metronome_sdk/resources/v1/customers/billing_config.rbi +8 -4
- data/rbi/metronome_sdk/resources/v1/customers/commits.rbi +3 -2
- data/rbi/metronome_sdk/resources/v1/customers/invoices.rbi +38 -1
- data/rbi/metronome_sdk/resources/v1/customers/plans.rbi +8 -4
- data/rbi/metronome_sdk/resources/v1/customers.rbi +17 -11
- data/rbi/metronome_sdk/resources/v1/payments.rbi +72 -0
- data/rbi/metronome_sdk/resources/v1/plans.rbi +8 -4
- data/rbi/metronome_sdk/resources/v1/settings/billing_providers.rbi +63 -0
- data/rbi/metronome_sdk/resources/v1/settings.rbi +47 -0
- data/rbi/metronome_sdk/resources/v1/usage.rbi +4 -2
- data/rbi/metronome_sdk/resources/v1.rbi +6 -0
- data/rbi/metronome_sdk/resources/v2/contracts.rbi +14 -0
- data/sig/metronome_sdk/errors.rbs +7 -0
- data/sig/metronome_sdk/file_part.rbs +1 -1
- data/sig/metronome_sdk/models/contract.rbs +2 -0
- data/sig/metronome_sdk/models/contract_v2.rbs +241 -12
- data/sig/metronome_sdk/models/hierarchy_configuration.rbs +87 -6
- data/sig/metronome_sdk/models/payment_gate_config.rbs +2 -1
- data/sig/metronome_sdk/models/payment_gate_config_v2.rbs +2 -1
- data/sig/metronome_sdk/models/subscription.rbs +80 -0
- data/sig/metronome_sdk/models/v1/contract_amend_params.rbs +2 -1
- data/sig/metronome_sdk/models/v1/contract_create_params.rbs +91 -5
- data/sig/metronome_sdk/models/v1/contract_list_balances_params.rbs +7 -0
- data/sig/metronome_sdk/models/v1/customer_create_params.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customer_detail.rbs +5 -0
- data/sig/metronome_sdk/models/v1/customer_preview_events_params.rbs +0 -7
- data/sig/metronome_sdk/models/v1/customer_preview_events_response.rbs +6 -4
- data/sig/metronome_sdk/models/v1/customer_retrieve_billing_configurations_response.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customer_set_billing_configurations_params.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customers/billing_config_create_params.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customers/billing_config_delete_params.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customers/billing_config_retrieve_params.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customers/customer_alert.rbs +2 -0
- data/sig/metronome_sdk/models/v1/customers/invoice.rbs +244 -19
- data/sig/metronome_sdk/models/v1/customers/invoice_retrieve_pdf_params.rbs +32 -0
- data/sig/metronome_sdk/models/v1/payment.rbs +198 -0
- data/sig/metronome_sdk/models/v1/payment_attempt_params.rbs +30 -0
- data/sig/metronome_sdk/models/v1/payment_attempt_response.rbs +15 -0
- data/sig/metronome_sdk/models/v1/payment_cancel_params.rbs +30 -0
- data/sig/metronome_sdk/models/v1/payment_cancel_response.rbs +15 -0
- data/sig/metronome_sdk/models/v1/payment_list_params.rbs +56 -0
- data/sig/metronome_sdk/models/v1/payment_status.rbs +19 -0
- data/sig/metronome_sdk/models/v1/setting_upsert_avalara_credentials_params.rbs +54 -0
- data/sig/metronome_sdk/models/v1/setting_upsert_avalara_credentials_response.rbs +13 -0
- data/sig/metronome_sdk/models/v1/settings/billing_provider_create_params.rbs +64 -0
- data/sig/metronome_sdk/models/v1/settings/billing_provider_create_response.rbs +34 -0
- data/sig/metronome_sdk/models/v1/settings/billing_provider_list_params.rbs +28 -0
- data/sig/metronome_sdk/models/v1/settings/billing_provider_list_response.rbs +102 -0
- data/sig/metronome_sdk/models/v2/contract_edit_commit_params.rbs +9 -0
- data/sig/metronome_sdk/models/v2/contract_edit_credit_params.rbs +9 -0
- data/sig/metronome_sdk/models/v2/contract_edit_params.rbs +184 -7
- data/sig/metronome_sdk/models/v2/contract_get_edit_history_response.rbs +221 -18
- data/sig/metronome_sdk/resources/v1/contracts.rbs +1 -0
- data/sig/metronome_sdk/resources/v1/customers/invoices.rbs +6 -0
- data/sig/metronome_sdk/resources/v1/payments.rbs +30 -0
- data/sig/metronome_sdk/resources/v1/settings/billing_providers.rbs +23 -0
- data/sig/metronome_sdk/resources/v1/settings.rbs +19 -0
- data/sig/metronome_sdk/resources/v1.rbs +4 -0
- data/sig/metronome_sdk/resources/v2/contracts.rbs +3 -0
- metadata +53 -2
|
@@ -46,22 +46,34 @@ module MetronomeSDK
|
|
|
46
46
|
attr_writer :amendment_id
|
|
47
47
|
|
|
48
48
|
# This field's availability is dependent on your client's configuration.
|
|
49
|
+
sig { returns(T.nilable(T.anything)) }
|
|
50
|
+
attr_reader :billable_status
|
|
51
|
+
|
|
52
|
+
sig { params(billable_status: T.anything).void }
|
|
53
|
+
attr_writer :billable_status
|
|
54
|
+
|
|
55
|
+
# Account hierarchy M3 - Required on invoices with type USAGE_CONSOLIDATED. List
|
|
56
|
+
# of constituent invoices that were consolidated to create this invoice.
|
|
49
57
|
sig do
|
|
50
58
|
returns(
|
|
51
59
|
T.nilable(
|
|
52
|
-
|
|
60
|
+
T::Array[
|
|
61
|
+
MetronomeSDK::V1::Customers::Invoice::ConstituentInvoice
|
|
62
|
+
]
|
|
53
63
|
)
|
|
54
64
|
)
|
|
55
65
|
end
|
|
56
|
-
attr_reader :
|
|
66
|
+
attr_reader :constituent_invoices
|
|
57
67
|
|
|
58
68
|
sig do
|
|
59
69
|
params(
|
|
60
|
-
|
|
61
|
-
|
|
70
|
+
constituent_invoices:
|
|
71
|
+
T::Array[
|
|
72
|
+
MetronomeSDK::V1::Customers::Invoice::ConstituentInvoice::OrHash
|
|
73
|
+
]
|
|
62
74
|
).void
|
|
63
75
|
end
|
|
64
|
-
attr_writer :
|
|
76
|
+
attr_writer :constituent_invoices
|
|
65
77
|
|
|
66
78
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
67
79
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
@@ -177,6 +189,20 @@ module MetronomeSDK
|
|
|
177
189
|
sig { params(netsuite_sales_order_id: String).void }
|
|
178
190
|
attr_writer :netsuite_sales_order_id
|
|
179
191
|
|
|
192
|
+
# Account hierarchy M3 - Required for account hierarchy usage invoices. An object
|
|
193
|
+
# containing the contract and customer UUIDs that pay for this invoice.
|
|
194
|
+
sig do
|
|
195
|
+
returns(T.nilable(MetronomeSDK::V1::Customers::Invoice::Payer))
|
|
196
|
+
end
|
|
197
|
+
attr_reader :payer
|
|
198
|
+
|
|
199
|
+
sig do
|
|
200
|
+
params(
|
|
201
|
+
payer: MetronomeSDK::V1::Customers::Invoice::Payer::OrHash
|
|
202
|
+
).void
|
|
203
|
+
end
|
|
204
|
+
attr_writer :payer
|
|
205
|
+
|
|
180
206
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
181
207
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
182
208
|
attr_reader :plan_custom_fields
|
|
@@ -245,8 +271,11 @@ module MetronomeSDK
|
|
|
245
271
|
total: Float,
|
|
246
272
|
type: String,
|
|
247
273
|
amendment_id: String,
|
|
248
|
-
billable_status:
|
|
249
|
-
|
|
274
|
+
billable_status: T.anything,
|
|
275
|
+
constituent_invoices:
|
|
276
|
+
T::Array[
|
|
277
|
+
MetronomeSDK::V1::Customers::Invoice::ConstituentInvoice::OrHash
|
|
278
|
+
],
|
|
250
279
|
contract_custom_fields: T::Hash[Symbol, String],
|
|
251
280
|
contract_id: String,
|
|
252
281
|
correction_record:
|
|
@@ -266,6 +295,7 @@ module MetronomeSDK
|
|
|
266
295
|
issued_at: Time,
|
|
267
296
|
net_payment_terms_days: Float,
|
|
268
297
|
netsuite_sales_order_id: String,
|
|
298
|
+
payer: MetronomeSDK::V1::Customers::Invoice::Payer::OrHash,
|
|
269
299
|
plan_custom_fields: T::Hash[Symbol, String],
|
|
270
300
|
plan_id: String,
|
|
271
301
|
plan_name: String,
|
|
@@ -287,6 +317,9 @@ module MetronomeSDK
|
|
|
287
317
|
amendment_id: nil,
|
|
288
318
|
# This field's availability is dependent on your client's configuration.
|
|
289
319
|
billable_status: nil,
|
|
320
|
+
# Account hierarchy M3 - Required on invoices with type USAGE_CONSOLIDATED. List
|
|
321
|
+
# of constituent invoices that were consolidated to create this invoice.
|
|
322
|
+
constituent_invoices: nil,
|
|
290
323
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
291
324
|
contract_custom_fields: nil,
|
|
292
325
|
contract_id: nil,
|
|
@@ -306,6 +339,9 @@ module MetronomeSDK
|
|
|
306
339
|
net_payment_terms_days: nil,
|
|
307
340
|
# This field's availability is dependent on your client's configuration.
|
|
308
341
|
netsuite_sales_order_id: nil,
|
|
342
|
+
# Account hierarchy M3 - Required for account hierarchy usage invoices. An object
|
|
343
|
+
# containing the contract and customer UUIDs that pay for this invoice.
|
|
344
|
+
payer: nil,
|
|
309
345
|
# Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
|
|
310
346
|
plan_custom_fields: nil,
|
|
311
347
|
plan_id: nil,
|
|
@@ -332,8 +368,11 @@ module MetronomeSDK
|
|
|
332
368
|
total: Float,
|
|
333
369
|
type: String,
|
|
334
370
|
amendment_id: String,
|
|
335
|
-
billable_status:
|
|
336
|
-
|
|
371
|
+
billable_status: T.anything,
|
|
372
|
+
constituent_invoices:
|
|
373
|
+
T::Array[
|
|
374
|
+
MetronomeSDK::V1::Customers::Invoice::ConstituentInvoice
|
|
375
|
+
],
|
|
337
376
|
contract_custom_fields: T::Hash[Symbol, String],
|
|
338
377
|
contract_id: String,
|
|
339
378
|
correction_record:
|
|
@@ -353,6 +392,7 @@ module MetronomeSDK
|
|
|
353
392
|
issued_at: Time,
|
|
354
393
|
net_payment_terms_days: Float,
|
|
355
394
|
netsuite_sales_order_id: String,
|
|
395
|
+
payer: MetronomeSDK::V1::Customers::Invoice::Payer,
|
|
356
396
|
plan_custom_fields: T::Hash[Symbol, String],
|
|
357
397
|
plan_id: String,
|
|
358
398
|
plan_name: String,
|
|
@@ -558,6 +598,26 @@ module MetronomeSDK
|
|
|
558
598
|
sig { params(netsuite_item_id: String).void }
|
|
559
599
|
attr_writer :netsuite_item_id
|
|
560
600
|
|
|
601
|
+
# Account hierarchy M3 - Present on line items from invoices with type
|
|
602
|
+
# USAGE_CONSOLIDATED. Indicates the original customer, contract, invoice and line
|
|
603
|
+
# item from which this line item was copied.
|
|
604
|
+
sig do
|
|
605
|
+
returns(
|
|
606
|
+
T.nilable(
|
|
607
|
+
MetronomeSDK::V1::Customers::Invoice::LineItem::Origin
|
|
608
|
+
)
|
|
609
|
+
)
|
|
610
|
+
end
|
|
611
|
+
attr_reader :origin
|
|
612
|
+
|
|
613
|
+
sig do
|
|
614
|
+
params(
|
|
615
|
+
origin:
|
|
616
|
+
MetronomeSDK::V1::Customers::Invoice::LineItem::Origin::OrHash
|
|
617
|
+
).void
|
|
618
|
+
end
|
|
619
|
+
attr_writer :origin
|
|
620
|
+
|
|
561
621
|
# Only present for line items paying for a postpaid commit true-up.
|
|
562
622
|
sig do
|
|
563
623
|
returns(
|
|
@@ -773,6 +833,8 @@ module MetronomeSDK
|
|
|
773
833
|
netsuite_invoice_billing_end: Time,
|
|
774
834
|
netsuite_invoice_billing_start: Time,
|
|
775
835
|
netsuite_item_id: String,
|
|
836
|
+
origin:
|
|
837
|
+
MetronomeSDK::V1::Customers::Invoice::LineItem::Origin::OrHash,
|
|
776
838
|
postpaid_commit:
|
|
777
839
|
MetronomeSDK::V1::Customers::Invoice::LineItem::PostpaidCommit::OrHash,
|
|
778
840
|
presentation_group_values: T::Hash[Symbol, T.nilable(String)],
|
|
@@ -866,6 +928,10 @@ module MetronomeSDK
|
|
|
866
928
|
# The start date for the billing period on the invoice.
|
|
867
929
|
netsuite_invoice_billing_start: nil,
|
|
868
930
|
netsuite_item_id: nil,
|
|
931
|
+
# Account hierarchy M3 - Present on line items from invoices with type
|
|
932
|
+
# USAGE_CONSOLIDATED. Indicates the original customer, contract, invoice and line
|
|
933
|
+
# item from which this line item was copied.
|
|
934
|
+
origin: nil,
|
|
869
935
|
# Only present for line items paying for a postpaid commit true-up.
|
|
870
936
|
postpaid_commit: nil,
|
|
871
937
|
# Includes the presentation group values associated with this line item if
|
|
@@ -935,6 +1001,8 @@ module MetronomeSDK
|
|
|
935
1001
|
netsuite_invoice_billing_end: Time,
|
|
936
1002
|
netsuite_invoice_billing_start: Time,
|
|
937
1003
|
netsuite_item_id: String,
|
|
1004
|
+
origin:
|
|
1005
|
+
MetronomeSDK::V1::Customers::Invoice::LineItem::Origin,
|
|
938
1006
|
postpaid_commit:
|
|
939
1007
|
MetronomeSDK::V1::Customers::Invoice::LineItem::PostpaidCommit,
|
|
940
1008
|
presentation_group_values: T::Hash[Symbol, T.nilable(String)],
|
|
@@ -1048,6 +1116,60 @@ module MetronomeSDK
|
|
|
1048
1116
|
end
|
|
1049
1117
|
end
|
|
1050
1118
|
|
|
1119
|
+
class Origin < MetronomeSDK::Internal::Type::BaseModel
|
|
1120
|
+
OrHash =
|
|
1121
|
+
T.type_alias do
|
|
1122
|
+
T.any(
|
|
1123
|
+
MetronomeSDK::V1::Customers::Invoice::LineItem::Origin,
|
|
1124
|
+
MetronomeSDK::Internal::AnyHash
|
|
1125
|
+
)
|
|
1126
|
+
end
|
|
1127
|
+
|
|
1128
|
+
sig { returns(String) }
|
|
1129
|
+
attr_accessor :contract_id
|
|
1130
|
+
|
|
1131
|
+
sig { returns(String) }
|
|
1132
|
+
attr_accessor :customer_id
|
|
1133
|
+
|
|
1134
|
+
sig { returns(String) }
|
|
1135
|
+
attr_accessor :invoice_id
|
|
1136
|
+
|
|
1137
|
+
sig { returns(String) }
|
|
1138
|
+
attr_accessor :line_item_id
|
|
1139
|
+
|
|
1140
|
+
# Account hierarchy M3 - Present on line items from invoices with type
|
|
1141
|
+
# USAGE_CONSOLIDATED. Indicates the original customer, contract, invoice and line
|
|
1142
|
+
# item from which this line item was copied.
|
|
1143
|
+
sig do
|
|
1144
|
+
params(
|
|
1145
|
+
contract_id: String,
|
|
1146
|
+
customer_id: String,
|
|
1147
|
+
invoice_id: String,
|
|
1148
|
+
line_item_id: String
|
|
1149
|
+
).returns(T.attached_class)
|
|
1150
|
+
end
|
|
1151
|
+
def self.new(
|
|
1152
|
+
contract_id:,
|
|
1153
|
+
customer_id:,
|
|
1154
|
+
invoice_id:,
|
|
1155
|
+
line_item_id:
|
|
1156
|
+
)
|
|
1157
|
+
end
|
|
1158
|
+
|
|
1159
|
+
sig do
|
|
1160
|
+
override.returns(
|
|
1161
|
+
{
|
|
1162
|
+
contract_id: String,
|
|
1163
|
+
customer_id: String,
|
|
1164
|
+
invoice_id: String,
|
|
1165
|
+
line_item_id: String
|
|
1166
|
+
}
|
|
1167
|
+
)
|
|
1168
|
+
end
|
|
1169
|
+
def to_hash
|
|
1170
|
+
end
|
|
1171
|
+
end
|
|
1172
|
+
|
|
1051
1173
|
class PostpaidCommit < MetronomeSDK::Internal::Type::BaseModel
|
|
1052
1174
|
OrHash =
|
|
1053
1175
|
T.type_alias do
|
|
@@ -1400,38 +1522,40 @@ module MetronomeSDK
|
|
|
1400
1522
|
end
|
|
1401
1523
|
end
|
|
1402
1524
|
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
extend MetronomeSDK::Internal::Type::Enum
|
|
1406
|
-
|
|
1407
|
-
TaggedSymbol =
|
|
1525
|
+
class ConstituentInvoice < MetronomeSDK::Internal::Type::BaseModel
|
|
1526
|
+
OrHash =
|
|
1408
1527
|
T.type_alias do
|
|
1409
|
-
T.
|
|
1410
|
-
|
|
1411
|
-
MetronomeSDK::
|
|
1528
|
+
T.any(
|
|
1529
|
+
MetronomeSDK::V1::Customers::Invoice::ConstituentInvoice,
|
|
1530
|
+
MetronomeSDK::Internal::AnyHash
|
|
1412
1531
|
)
|
|
1413
1532
|
end
|
|
1414
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1415
1533
|
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1534
|
+
sig { returns(String) }
|
|
1535
|
+
attr_accessor :contract_id
|
|
1536
|
+
|
|
1537
|
+
sig { returns(String) }
|
|
1538
|
+
attr_accessor :customer_id
|
|
1539
|
+
|
|
1540
|
+
sig { returns(String) }
|
|
1541
|
+
attr_accessor :invoice_id
|
|
1542
|
+
|
|
1543
|
+
sig do
|
|
1544
|
+
params(
|
|
1545
|
+
contract_id: String,
|
|
1546
|
+
customer_id: String,
|
|
1547
|
+
invoice_id: String
|
|
1548
|
+
).returns(T.attached_class)
|
|
1549
|
+
end
|
|
1550
|
+
def self.new(contract_id:, customer_id:, invoice_id:)
|
|
1551
|
+
end
|
|
1426
1552
|
|
|
1427
1553
|
sig do
|
|
1428
1554
|
override.returns(
|
|
1429
|
-
|
|
1430
|
-
MetronomeSDK::V1::Customers::Invoice::BillableStatus::TaggedSymbol
|
|
1431
|
-
]
|
|
1555
|
+
{ contract_id: String, customer_id: String, invoice_id: String }
|
|
1432
1556
|
)
|
|
1433
1557
|
end
|
|
1434
|
-
def
|
|
1558
|
+
def to_hash
|
|
1435
1559
|
end
|
|
1436
1560
|
end
|
|
1437
1561
|
|
|
@@ -1517,6 +1641,13 @@ module MetronomeSDK
|
|
|
1517
1641
|
end
|
|
1518
1642
|
attr_accessor :billing_provider_type
|
|
1519
1643
|
|
|
1644
|
+
# Error message from the billing provider, if available.
|
|
1645
|
+
sig { returns(T.nilable(String)) }
|
|
1646
|
+
attr_reader :billing_provider_error
|
|
1647
|
+
|
|
1648
|
+
sig { params(billing_provider_error: String).void }
|
|
1649
|
+
attr_writer :billing_provider_error
|
|
1650
|
+
|
|
1520
1651
|
sig do
|
|
1521
1652
|
returns(
|
|
1522
1653
|
T.nilable(
|
|
@@ -1540,27 +1671,82 @@ module MetronomeSDK
|
|
|
1540
1671
|
sig { params(invoice_id: String).void }
|
|
1541
1672
|
attr_writer :invoice_id
|
|
1542
1673
|
|
|
1674
|
+
# The subtotal amount invoiced, if available from the billing provider.
|
|
1675
|
+
sig { returns(T.nilable(Float)) }
|
|
1676
|
+
attr_reader :invoiced_sub_total
|
|
1677
|
+
|
|
1678
|
+
sig { params(invoiced_sub_total: Float).void }
|
|
1679
|
+
attr_writer :invoiced_sub_total
|
|
1680
|
+
|
|
1681
|
+
# The total amount invoiced, if available from the billing provider.
|
|
1682
|
+
sig { returns(T.nilable(Float)) }
|
|
1683
|
+
attr_reader :invoiced_total
|
|
1684
|
+
|
|
1685
|
+
sig { params(invoiced_total: Float).void }
|
|
1686
|
+
attr_writer :invoiced_total
|
|
1687
|
+
|
|
1543
1688
|
sig { returns(T.nilable(Time)) }
|
|
1544
1689
|
attr_reader :issued_at_timestamp
|
|
1545
1690
|
|
|
1546
1691
|
sig { params(issued_at_timestamp: Time).void }
|
|
1547
1692
|
attr_writer :issued_at_timestamp
|
|
1548
1693
|
|
|
1694
|
+
# A URL to the PDF of the invoice, if available from the billing provider.
|
|
1695
|
+
sig { returns(T.nilable(String)) }
|
|
1696
|
+
attr_reader :pdf_url
|
|
1697
|
+
|
|
1698
|
+
sig { params(pdf_url: String).void }
|
|
1699
|
+
attr_writer :pdf_url
|
|
1700
|
+
|
|
1701
|
+
# Tax details for the invoice, if available from the billing provider.
|
|
1702
|
+
sig do
|
|
1703
|
+
returns(
|
|
1704
|
+
T.nilable(
|
|
1705
|
+
MetronomeSDK::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::Tax
|
|
1706
|
+
)
|
|
1707
|
+
)
|
|
1708
|
+
end
|
|
1709
|
+
attr_reader :tax
|
|
1710
|
+
|
|
1711
|
+
sig do
|
|
1712
|
+
params(
|
|
1713
|
+
tax:
|
|
1714
|
+
MetronomeSDK::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::Tax::OrHash
|
|
1715
|
+
).void
|
|
1716
|
+
end
|
|
1717
|
+
attr_writer :tax
|
|
1718
|
+
|
|
1549
1719
|
sig do
|
|
1550
1720
|
params(
|
|
1551
1721
|
billing_provider_type:
|
|
1552
1722
|
MetronomeSDK::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::BillingProviderType::OrSymbol,
|
|
1723
|
+
billing_provider_error: String,
|
|
1553
1724
|
external_status:
|
|
1554
1725
|
MetronomeSDK::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::ExternalStatus::OrSymbol,
|
|
1555
1726
|
invoice_id: String,
|
|
1556
|
-
|
|
1727
|
+
invoiced_sub_total: Float,
|
|
1728
|
+
invoiced_total: Float,
|
|
1729
|
+
issued_at_timestamp: Time,
|
|
1730
|
+
pdf_url: String,
|
|
1731
|
+
tax:
|
|
1732
|
+
MetronomeSDK::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::Tax::OrHash
|
|
1557
1733
|
).returns(T.attached_class)
|
|
1558
1734
|
end
|
|
1559
1735
|
def self.new(
|
|
1560
1736
|
billing_provider_type:,
|
|
1737
|
+
# Error message from the billing provider, if available.
|
|
1738
|
+
billing_provider_error: nil,
|
|
1561
1739
|
external_status: nil,
|
|
1562
1740
|
invoice_id: nil,
|
|
1563
|
-
|
|
1741
|
+
# The subtotal amount invoiced, if available from the billing provider.
|
|
1742
|
+
invoiced_sub_total: nil,
|
|
1743
|
+
# The total amount invoiced, if available from the billing provider.
|
|
1744
|
+
invoiced_total: nil,
|
|
1745
|
+
issued_at_timestamp: nil,
|
|
1746
|
+
# A URL to the PDF of the invoice, if available from the billing provider.
|
|
1747
|
+
pdf_url: nil,
|
|
1748
|
+
# Tax details for the invoice, if available from the billing provider.
|
|
1749
|
+
tax: nil
|
|
1564
1750
|
)
|
|
1565
1751
|
end
|
|
1566
1752
|
|
|
@@ -1569,10 +1755,16 @@ module MetronomeSDK
|
|
|
1569
1755
|
{
|
|
1570
1756
|
billing_provider_type:
|
|
1571
1757
|
MetronomeSDK::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::BillingProviderType::TaggedSymbol,
|
|
1758
|
+
billing_provider_error: String,
|
|
1572
1759
|
external_status:
|
|
1573
1760
|
MetronomeSDK::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::ExternalStatus::TaggedSymbol,
|
|
1574
1761
|
invoice_id: String,
|
|
1575
|
-
|
|
1762
|
+
invoiced_sub_total: Float,
|
|
1763
|
+
invoiced_total: Float,
|
|
1764
|
+
issued_at_timestamp: Time,
|
|
1765
|
+
pdf_url: String,
|
|
1766
|
+
tax:
|
|
1767
|
+
MetronomeSDK::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::Tax
|
|
1576
1768
|
}
|
|
1577
1769
|
)
|
|
1578
1770
|
end
|
|
@@ -1631,6 +1823,11 @@ module MetronomeSDK
|
|
|
1631
1823
|
:gcp_marketplace,
|
|
1632
1824
|
MetronomeSDK::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::BillingProviderType::TaggedSymbol
|
|
1633
1825
|
)
|
|
1826
|
+
METRONOME =
|
|
1827
|
+
T.let(
|
|
1828
|
+
:metronome,
|
|
1829
|
+
MetronomeSDK::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::BillingProviderType::TaggedSymbol
|
|
1830
|
+
)
|
|
1634
1831
|
|
|
1635
1832
|
sig do
|
|
1636
1833
|
override.returns(
|
|
@@ -1721,6 +1918,67 @@ module MetronomeSDK
|
|
|
1721
1918
|
def self.values
|
|
1722
1919
|
end
|
|
1723
1920
|
end
|
|
1921
|
+
|
|
1922
|
+
class Tax < MetronomeSDK::Internal::Type::BaseModel
|
|
1923
|
+
OrHash =
|
|
1924
|
+
T.type_alias do
|
|
1925
|
+
T.any(
|
|
1926
|
+
MetronomeSDK::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::Tax,
|
|
1927
|
+
MetronomeSDK::Internal::AnyHash
|
|
1928
|
+
)
|
|
1929
|
+
end
|
|
1930
|
+
|
|
1931
|
+
# The total tax amount applied to the invoice.
|
|
1932
|
+
sig { returns(T.nilable(Float)) }
|
|
1933
|
+
attr_reader :total_tax_amount
|
|
1934
|
+
|
|
1935
|
+
sig { params(total_tax_amount: Float).void }
|
|
1936
|
+
attr_writer :total_tax_amount
|
|
1937
|
+
|
|
1938
|
+
# The total taxable amount of the invoice.
|
|
1939
|
+
sig { returns(T.nilable(Float)) }
|
|
1940
|
+
attr_reader :total_taxable_amount
|
|
1941
|
+
|
|
1942
|
+
sig { params(total_taxable_amount: Float).void }
|
|
1943
|
+
attr_writer :total_taxable_amount
|
|
1944
|
+
|
|
1945
|
+
# The transaction ID associated with the tax calculation.
|
|
1946
|
+
sig { returns(T.nilable(String)) }
|
|
1947
|
+
attr_reader :transaction_id
|
|
1948
|
+
|
|
1949
|
+
sig { params(transaction_id: String).void }
|
|
1950
|
+
attr_writer :transaction_id
|
|
1951
|
+
|
|
1952
|
+
# Tax details for the invoice, if available from the billing provider.
|
|
1953
|
+
sig do
|
|
1954
|
+
params(
|
|
1955
|
+
total_tax_amount: Float,
|
|
1956
|
+
total_taxable_amount: Float,
|
|
1957
|
+
transaction_id: String
|
|
1958
|
+
).returns(T.attached_class)
|
|
1959
|
+
end
|
|
1960
|
+
def self.new(
|
|
1961
|
+
# The total tax amount applied to the invoice.
|
|
1962
|
+
total_tax_amount: nil,
|
|
1963
|
+
# The total taxable amount of the invoice.
|
|
1964
|
+
total_taxable_amount: nil,
|
|
1965
|
+
# The transaction ID associated with the tax calculation.
|
|
1966
|
+
transaction_id: nil
|
|
1967
|
+
)
|
|
1968
|
+
end
|
|
1969
|
+
|
|
1970
|
+
sig do
|
|
1971
|
+
override.returns(
|
|
1972
|
+
{
|
|
1973
|
+
total_tax_amount: Float,
|
|
1974
|
+
total_taxable_amount: Float,
|
|
1975
|
+
transaction_id: String
|
|
1976
|
+
}
|
|
1977
|
+
)
|
|
1978
|
+
end
|
|
1979
|
+
def to_hash
|
|
1980
|
+
end
|
|
1981
|
+
end
|
|
1724
1982
|
end
|
|
1725
1983
|
end
|
|
1726
1984
|
|
|
@@ -1740,6 +1998,13 @@ module MetronomeSDK
|
|
|
1740
1998
|
end
|
|
1741
1999
|
attr_accessor :billing_provider_type
|
|
1742
2000
|
|
|
2001
|
+
# Error message from the billing provider, if available.
|
|
2002
|
+
sig { returns(T.nilable(String)) }
|
|
2003
|
+
attr_reader :billing_provider_error
|
|
2004
|
+
|
|
2005
|
+
sig { params(billing_provider_error: String).void }
|
|
2006
|
+
attr_writer :billing_provider_error
|
|
2007
|
+
|
|
1743
2008
|
sig do
|
|
1744
2009
|
returns(
|
|
1745
2010
|
T.nilable(
|
|
@@ -1763,27 +2028,82 @@ module MetronomeSDK
|
|
|
1763
2028
|
sig { params(invoice_id: String).void }
|
|
1764
2029
|
attr_writer :invoice_id
|
|
1765
2030
|
|
|
2031
|
+
# The subtotal amount invoiced, if available from the billing provider.
|
|
2032
|
+
sig { returns(T.nilable(Float)) }
|
|
2033
|
+
attr_reader :invoiced_sub_total
|
|
2034
|
+
|
|
2035
|
+
sig { params(invoiced_sub_total: Float).void }
|
|
2036
|
+
attr_writer :invoiced_sub_total
|
|
2037
|
+
|
|
2038
|
+
# The total amount invoiced, if available from the billing provider.
|
|
2039
|
+
sig { returns(T.nilable(Float)) }
|
|
2040
|
+
attr_reader :invoiced_total
|
|
2041
|
+
|
|
2042
|
+
sig { params(invoiced_total: Float).void }
|
|
2043
|
+
attr_writer :invoiced_total
|
|
2044
|
+
|
|
1766
2045
|
sig { returns(T.nilable(Time)) }
|
|
1767
2046
|
attr_reader :issued_at_timestamp
|
|
1768
2047
|
|
|
1769
2048
|
sig { params(issued_at_timestamp: Time).void }
|
|
1770
2049
|
attr_writer :issued_at_timestamp
|
|
1771
2050
|
|
|
2051
|
+
# A URL to the PDF of the invoice, if available from the billing provider.
|
|
2052
|
+
sig { returns(T.nilable(String)) }
|
|
2053
|
+
attr_reader :pdf_url
|
|
2054
|
+
|
|
2055
|
+
sig { params(pdf_url: String).void }
|
|
2056
|
+
attr_writer :pdf_url
|
|
2057
|
+
|
|
2058
|
+
# Tax details for the invoice, if available from the billing provider.
|
|
2059
|
+
sig do
|
|
2060
|
+
returns(
|
|
2061
|
+
T.nilable(
|
|
2062
|
+
MetronomeSDK::V1::Customers::Invoice::ExternalInvoice::Tax
|
|
2063
|
+
)
|
|
2064
|
+
)
|
|
2065
|
+
end
|
|
2066
|
+
attr_reader :tax
|
|
2067
|
+
|
|
2068
|
+
sig do
|
|
2069
|
+
params(
|
|
2070
|
+
tax:
|
|
2071
|
+
MetronomeSDK::V1::Customers::Invoice::ExternalInvoice::Tax::OrHash
|
|
2072
|
+
).void
|
|
2073
|
+
end
|
|
2074
|
+
attr_writer :tax
|
|
2075
|
+
|
|
1772
2076
|
sig do
|
|
1773
2077
|
params(
|
|
1774
2078
|
billing_provider_type:
|
|
1775
2079
|
MetronomeSDK::V1::Customers::Invoice::ExternalInvoice::BillingProviderType::OrSymbol,
|
|
2080
|
+
billing_provider_error: String,
|
|
1776
2081
|
external_status:
|
|
1777
2082
|
MetronomeSDK::V1::Customers::Invoice::ExternalInvoice::ExternalStatus::OrSymbol,
|
|
1778
2083
|
invoice_id: String,
|
|
1779
|
-
|
|
2084
|
+
invoiced_sub_total: Float,
|
|
2085
|
+
invoiced_total: Float,
|
|
2086
|
+
issued_at_timestamp: Time,
|
|
2087
|
+
pdf_url: String,
|
|
2088
|
+
tax:
|
|
2089
|
+
MetronomeSDK::V1::Customers::Invoice::ExternalInvoice::Tax::OrHash
|
|
1780
2090
|
).returns(T.attached_class)
|
|
1781
2091
|
end
|
|
1782
2092
|
def self.new(
|
|
1783
2093
|
billing_provider_type:,
|
|
2094
|
+
# Error message from the billing provider, if available.
|
|
2095
|
+
billing_provider_error: nil,
|
|
1784
2096
|
external_status: nil,
|
|
1785
2097
|
invoice_id: nil,
|
|
1786
|
-
|
|
2098
|
+
# The subtotal amount invoiced, if available from the billing provider.
|
|
2099
|
+
invoiced_sub_total: nil,
|
|
2100
|
+
# The total amount invoiced, if available from the billing provider.
|
|
2101
|
+
invoiced_total: nil,
|
|
2102
|
+
issued_at_timestamp: nil,
|
|
2103
|
+
# A URL to the PDF of the invoice, if available from the billing provider.
|
|
2104
|
+
pdf_url: nil,
|
|
2105
|
+
# Tax details for the invoice, if available from the billing provider.
|
|
2106
|
+
tax: nil
|
|
1787
2107
|
)
|
|
1788
2108
|
end
|
|
1789
2109
|
|
|
@@ -1792,10 +2112,16 @@ module MetronomeSDK
|
|
|
1792
2112
|
{
|
|
1793
2113
|
billing_provider_type:
|
|
1794
2114
|
MetronomeSDK::V1::Customers::Invoice::ExternalInvoice::BillingProviderType::TaggedSymbol,
|
|
2115
|
+
billing_provider_error: String,
|
|
1795
2116
|
external_status:
|
|
1796
2117
|
MetronomeSDK::V1::Customers::Invoice::ExternalInvoice::ExternalStatus::TaggedSymbol,
|
|
1797
2118
|
invoice_id: String,
|
|
1798
|
-
|
|
2119
|
+
invoiced_sub_total: Float,
|
|
2120
|
+
invoiced_total: Float,
|
|
2121
|
+
issued_at_timestamp: Time,
|
|
2122
|
+
pdf_url: String,
|
|
2123
|
+
tax:
|
|
2124
|
+
MetronomeSDK::V1::Customers::Invoice::ExternalInvoice::Tax
|
|
1799
2125
|
}
|
|
1800
2126
|
)
|
|
1801
2127
|
end
|
|
@@ -1854,6 +2180,11 @@ module MetronomeSDK
|
|
|
1854
2180
|
:gcp_marketplace,
|
|
1855
2181
|
MetronomeSDK::V1::Customers::Invoice::ExternalInvoice::BillingProviderType::TaggedSymbol
|
|
1856
2182
|
)
|
|
2183
|
+
METRONOME =
|
|
2184
|
+
T.let(
|
|
2185
|
+
:metronome,
|
|
2186
|
+
MetronomeSDK::V1::Customers::Invoice::ExternalInvoice::BillingProviderType::TaggedSymbol
|
|
2187
|
+
)
|
|
1857
2188
|
|
|
1858
2189
|
sig do
|
|
1859
2190
|
override.returns(
|
|
@@ -1944,6 +2275,67 @@ module MetronomeSDK
|
|
|
1944
2275
|
def self.values
|
|
1945
2276
|
end
|
|
1946
2277
|
end
|
|
2278
|
+
|
|
2279
|
+
class Tax < MetronomeSDK::Internal::Type::BaseModel
|
|
2280
|
+
OrHash =
|
|
2281
|
+
T.type_alias do
|
|
2282
|
+
T.any(
|
|
2283
|
+
MetronomeSDK::V1::Customers::Invoice::ExternalInvoice::Tax,
|
|
2284
|
+
MetronomeSDK::Internal::AnyHash
|
|
2285
|
+
)
|
|
2286
|
+
end
|
|
2287
|
+
|
|
2288
|
+
# The total tax amount applied to the invoice.
|
|
2289
|
+
sig { returns(T.nilable(Float)) }
|
|
2290
|
+
attr_reader :total_tax_amount
|
|
2291
|
+
|
|
2292
|
+
sig { params(total_tax_amount: Float).void }
|
|
2293
|
+
attr_writer :total_tax_amount
|
|
2294
|
+
|
|
2295
|
+
# The total taxable amount of the invoice.
|
|
2296
|
+
sig { returns(T.nilable(Float)) }
|
|
2297
|
+
attr_reader :total_taxable_amount
|
|
2298
|
+
|
|
2299
|
+
sig { params(total_taxable_amount: Float).void }
|
|
2300
|
+
attr_writer :total_taxable_amount
|
|
2301
|
+
|
|
2302
|
+
# The transaction ID associated with the tax calculation.
|
|
2303
|
+
sig { returns(T.nilable(String)) }
|
|
2304
|
+
attr_reader :transaction_id
|
|
2305
|
+
|
|
2306
|
+
sig { params(transaction_id: String).void }
|
|
2307
|
+
attr_writer :transaction_id
|
|
2308
|
+
|
|
2309
|
+
# Tax details for the invoice, if available from the billing provider.
|
|
2310
|
+
sig do
|
|
2311
|
+
params(
|
|
2312
|
+
total_tax_amount: Float,
|
|
2313
|
+
total_taxable_amount: Float,
|
|
2314
|
+
transaction_id: String
|
|
2315
|
+
).returns(T.attached_class)
|
|
2316
|
+
end
|
|
2317
|
+
def self.new(
|
|
2318
|
+
# The total tax amount applied to the invoice.
|
|
2319
|
+
total_tax_amount: nil,
|
|
2320
|
+
# The total taxable amount of the invoice.
|
|
2321
|
+
total_taxable_amount: nil,
|
|
2322
|
+
# The transaction ID associated with the tax calculation.
|
|
2323
|
+
transaction_id: nil
|
|
2324
|
+
)
|
|
2325
|
+
end
|
|
2326
|
+
|
|
2327
|
+
sig do
|
|
2328
|
+
override.returns(
|
|
2329
|
+
{
|
|
2330
|
+
total_tax_amount: Float,
|
|
2331
|
+
total_taxable_amount: Float,
|
|
2332
|
+
transaction_id: String
|
|
2333
|
+
}
|
|
2334
|
+
)
|
|
2335
|
+
end
|
|
2336
|
+
def to_hash
|
|
2337
|
+
end
|
|
2338
|
+
end
|
|
1947
2339
|
end
|
|
1948
2340
|
|
|
1949
2341
|
class InvoiceAdjustment < MetronomeSDK::Internal::Type::BaseModel
|
|
@@ -2018,6 +2410,38 @@ module MetronomeSDK
|
|
|
2018
2410
|
end
|
|
2019
2411
|
end
|
|
2020
2412
|
|
|
2413
|
+
class Payer < MetronomeSDK::Internal::Type::BaseModel
|
|
2414
|
+
OrHash =
|
|
2415
|
+
T.type_alias do
|
|
2416
|
+
T.any(
|
|
2417
|
+
MetronomeSDK::V1::Customers::Invoice::Payer,
|
|
2418
|
+
MetronomeSDK::Internal::AnyHash
|
|
2419
|
+
)
|
|
2420
|
+
end
|
|
2421
|
+
|
|
2422
|
+
sig { returns(String) }
|
|
2423
|
+
attr_accessor :contract_id
|
|
2424
|
+
|
|
2425
|
+
sig { returns(String) }
|
|
2426
|
+
attr_accessor :customer_id
|
|
2427
|
+
|
|
2428
|
+
# Account hierarchy M3 - Required for account hierarchy usage invoices. An object
|
|
2429
|
+
# containing the contract and customer UUIDs that pay for this invoice.
|
|
2430
|
+
sig do
|
|
2431
|
+
params(contract_id: String, customer_id: String).returns(
|
|
2432
|
+
T.attached_class
|
|
2433
|
+
)
|
|
2434
|
+
end
|
|
2435
|
+
def self.new(contract_id:, customer_id:)
|
|
2436
|
+
end
|
|
2437
|
+
|
|
2438
|
+
sig do
|
|
2439
|
+
override.returns({ contract_id: String, customer_id: String })
|
|
2440
|
+
end
|
|
2441
|
+
def to_hash
|
|
2442
|
+
end
|
|
2443
|
+
end
|
|
2444
|
+
|
|
2021
2445
|
class ResellerRoyalty < MetronomeSDK::Internal::Type::BaseModel
|
|
2022
2446
|
OrHash =
|
|
2023
2447
|
T.type_alias do
|