Skip to content

Commit

Permalink
Merge pull request #29 from Sage/restore_custom_changes
Browse files Browse the repository at this point in the history
Restore customisation in amendment object
  • Loading branch information
banjoko01 authored Jul 4, 2024
2 parents 6dcd0c2 + 69802a9 commit ac42aee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/zuora/objects/amendment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit ac42aee

Please sign in to comment.