Class: Mollie::Refund
Direct Known Subclasses
Constant Summary collapse
- STATUS_QUEUED =
'queued'.freeze
- STATUS_PENDING =
'pending'.freeze
- STATUS_PROCESSING =
'processing'.freeze
- STATUS_REFUNDED =
'refunded'.freeze
- STATUS_FAILED =
'failed'.freeze
Instance Attribute Summary collapse
-
#_links ⇒ Object
(also: #links)
Returns the value of attribute _links.
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#description ⇒ Object
Returns the value of attribute description.
-
#id ⇒ Object
Returns the value of attribute id.
-
#lines ⇒ Object
Returns the value of attribute lines.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#order_id ⇒ Object
Returns the value of attribute order_id.
-
#payment_id ⇒ Object
Returns the value of attribute payment_id.
-
#settlement_amount ⇒ Object
Returns the value of attribute settlement_amount.
-
#settlement_id ⇒ Object
Returns the value of attribute settlement_id.
-
#status ⇒ Object
Returns the value of attribute status.
Attributes inherited from Base
Instance Method Summary collapse
- #failed? ⇒ Boolean
- #order(options = {}) ⇒ Object
- #payment(options = {}) ⇒ Object
- #pending? ⇒ Boolean
- #processing? ⇒ Boolean
- #queued? ⇒ Boolean
- #refunded? ⇒ Boolean
- #settlement(options = {}) ⇒ Object
Methods inherited from Base
all, #assign_attributes, cancel, create, #delete, delete, get, id_param, #initialize, parent_id, request, resource_name, update, #update
Constructor Details
This class inherits a constructor from Mollie::Base
Instance Attribute Details
#_links ⇒ Object Also known as: links
Returns the value of attribute _links.
9 10 11 |
# File 'lib/mollie/refund.rb', line 9 def _links @_links end |
#amount ⇒ Object
Returns the value of attribute amount.
9 10 11 |
# File 'lib/mollie/refund.rb', line 9 def amount @amount end |
#created_at ⇒ Object
Returns the value of attribute created_at.
9 10 11 |
# File 'lib/mollie/refund.rb', line 9 def created_at @created_at end |
#description ⇒ Object
Returns the value of attribute description.
9 10 11 |
# File 'lib/mollie/refund.rb', line 9 def description @description end |
#id ⇒ Object
Returns the value of attribute id.
9 10 11 |
# File 'lib/mollie/refund.rb', line 9 def id @id end |
#lines ⇒ Object
Returns the value of attribute lines.
9 10 11 |
# File 'lib/mollie/refund.rb', line 9 def lines @lines end |
#metadata ⇒ Object
Returns the value of attribute metadata.
9 10 11 |
# File 'lib/mollie/refund.rb', line 9 def @metadata end |
#order_id ⇒ Object
Returns the value of attribute order_id.
9 10 11 |
# File 'lib/mollie/refund.rb', line 9 def order_id @order_id end |
#payment_id ⇒ Object
Returns the value of attribute payment_id.
9 10 11 |
# File 'lib/mollie/refund.rb', line 9 def payment_id @payment_id end |
#settlement_amount ⇒ Object
Returns the value of attribute settlement_amount.
9 10 11 |
# File 'lib/mollie/refund.rb', line 9 def settlement_amount @settlement_amount end |
#settlement_id ⇒ Object
Returns the value of attribute settlement_id.
9 10 11 |
# File 'lib/mollie/refund.rb', line 9 def settlement_id @settlement_id end |
#status ⇒ Object
Returns the value of attribute status.
9 10 11 |
# File 'lib/mollie/refund.rb', line 9 def status @status end |
Instance Method Details
#failed? ⇒ Boolean
40 41 42 |
# File 'lib/mollie/refund.rb', line 40 def failed? status == STATUS_FAILED end |
#order(options = {}) ⇒ Object
77 78 79 80 |
# File 'lib/mollie/refund.rb', line 77 def order( = {}) return if order_id.nil? Order.get(order_id, ) end |
#payment(options = {}) ⇒ Object
68 69 70 |
# File 'lib/mollie/refund.rb', line 68 def payment( = {}) Payment.get(payment_id, ) end |
#pending? ⇒ Boolean
28 29 30 |
# File 'lib/mollie/refund.rb', line 28 def pending? status == STATUS_PENDING end |
#processing? ⇒ Boolean
32 33 34 |
# File 'lib/mollie/refund.rb', line 32 def processing? status == STATUS_PROCESSING end |
#queued? ⇒ Boolean
24 25 26 |
# File 'lib/mollie/refund.rb', line 24 def queued? status == STATUS_QUEUED end |
#refunded? ⇒ Boolean
36 37 38 |
# File 'lib/mollie/refund.rb', line 36 def refunded? status == STATUS_REFUNDED end |
#settlement(options = {}) ⇒ Object
72 73 74 75 |
# File 'lib/mollie/refund.rb', line 72 def settlement( = {}) return if settlement_id.nil? Settlement.get(settlement_id, ) end |