Skip to content

Commit

Permalink
Add queued status and handy accessor to refunds
Browse files Browse the repository at this point in the history
  • Loading branch information
Willem Stuursma-Ruwen authored Aug 22, 2017
1 parent 653f3ce commit cac8b50
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/mollie/api/object/payment/refund.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module API
module Object
class Payment
class Refund < Base
STATUS_QUEUED = "queued"
STATUS_PENDING = "pending"
STATUS_PROCESSING = "processing"
STATUS_REFUNDED = "refunded"
Expand All @@ -12,7 +13,10 @@ class Refund < Base
:amount,
:status,
:refunded_datetime

def queued?
status == STATUS_QUEUED
end

def pending?
status == STATUS_PENDING
end
Expand Down

0 comments on commit cac8b50

Please sign in to comment.