From 7cefc76e7b4f5b0184de4cb6704d6dfd0f91d51b Mon Sep 17 00:00:00 2001 From: Ivan Novosad Date: Thu, 7 Nov 2024 13:35:58 +0100 Subject: [PATCH] fix(netsuite): Fix netsuite payment payload specs --- .../aggregator/payments/create_service_spec.rb | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/spec/services/integrations/aggregator/payments/create_service_spec.rb b/spec/services/integrations/aggregator/payments/create_service_spec.rb index 9702348121d..acf89d7d7f8 100644 --- a/spec/services/integrations/aggregator/payments/create_service_spec.rb +++ b/spec/services/integrations/aggregator/payments/create_service_spec.rb @@ -28,18 +28,15 @@ 'type' => 'customerpayment', 'isDynamic' => true, 'columns' => { - 'customer' => integration_customer.external_customer_id + 'customer' => integration_customer.external_customer_id, + 'payment' => payment.amount_cents.div(100).to_f, + 'autoapply' => true }, - 'lines' => [ + 'applyTransactions' => [ { - 'sublistId' => 'apply', - 'lineItems' => [ - { - 'doc' => integration_invoice.external_id, - 'apply' => true, - 'amount' => payment.amount_cents.div(100).to_f - } - ] + 'internalId' => integration_invoice.external_id, + 'apply' => true, + 'amount' => payment.amount_cents.div(100).to_f } ], 'options' => {