From 69802a9ebb9766bc1de1b1218d3b9f84a02b2c06 Mon Sep 17 00:00:00 2001 From: Banjoko Azeez Date: Thu, 4 Jul 2024 15:01:47 +0100 Subject: [PATCH] - Restore customisation in amendment object --- lib/zuora/objects/amendment.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/zuora/objects/amendment.rb b/lib/zuora/objects/amendment.rb index fd806eb..9308020 100644 --- a/lib/zuora/objects/amendment.rb +++ b/lib/zuora/objects/amendment.rb @@ -30,12 +30,13 @@ class Amendment < Base defaults :status => 'Draft' end - def create + def apply_percentage_discount + self.status = 'Completed' result = self.connector.amend - apply_response(result.to_hash, :amend_response) + apply_percentage_discount_response(result.to_hash, :amend_response) end - def apply_response(response_hash, type) + def apply_percentage_discount_response(response_hash, type) result = response_hash[type][:results] if result[:success] self.amendment_ids = result[:amendment_ids]