Skip to content

Commit

Permalink
- Restore customisation in amendment object
Browse files Browse the repository at this point in the history
  • Loading branch information
banjoko01 committed Jul 4, 2024
1 parent 6dcd0c2 commit 69802a9
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 69802a9

Please sign in to comment.