Class: Mollie::Settlement
- Defined in:
- lib/mollie/settlement.rb,
lib/mollie/settlement/refund.rb,
lib/mollie/settlement/capture.rb,
lib/mollie/settlement/payment.rb,
lib/mollie/settlement/chargeback.rb
Defined Under Namespace
Classes: Capture, Chargeback, Payment, Refund
Constant Summary collapse
- STATUS_OPEN =
'open'.freeze
- STATUS_PENDING =
'pending'.freeze
- STATUS_PAIDOUT =
'paidout'.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.
-
#id ⇒ Object
Returns the value of attribute id.
-
#invoice_id ⇒ Object
Returns the value of attribute invoice_id.
-
#periods ⇒ Object
Returns the value of attribute periods.
-
#reference ⇒ Object
Returns the value of attribute reference.
-
#settled_at ⇒ Object
Returns the value of attribute settled_at.
-
#status ⇒ Object
Returns the value of attribute status.
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
- #captures(options = {}) ⇒ Object
- #chargebacks(options = {}) ⇒ Object
- #failed? ⇒ Boolean
- #invoice(options = {}) ⇒ Object
- #open? ⇒ Boolean
- #paidout? ⇒ Boolean
- #payments(options = {}) ⇒ Object
- #pending? ⇒ Boolean
- #refunds(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.
8 9 10 |
# File 'lib/mollie/settlement.rb', line 8 def _links @_links end |
#amount ⇒ Object
Returns the value of attribute amount.
8 9 10 |
# File 'lib/mollie/settlement.rb', line 8 def amount @amount end |
#created_at ⇒ Object
Returns the value of attribute created_at.
8 9 10 |
# File 'lib/mollie/settlement.rb', line 8 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/mollie/settlement.rb', line 8 def id @id end |
#invoice_id ⇒ Object
Returns the value of attribute invoice_id.
8 9 10 |
# File 'lib/mollie/settlement.rb', line 8 def invoice_id @invoice_id end |
#periods ⇒ Object
Returns the value of attribute periods.
8 9 10 |
# File 'lib/mollie/settlement.rb', line 8 def periods @periods end |
#reference ⇒ Object
Returns the value of attribute reference.
8 9 10 |
# File 'lib/mollie/settlement.rb', line 8 def reference @reference end |
#settled_at ⇒ Object
Returns the value of attribute settled_at.
8 9 10 |
# File 'lib/mollie/settlement.rb', line 8 def settled_at @settled_at end |
#status ⇒ Object
Returns the value of attribute status.
8 9 10 |
# File 'lib/mollie/settlement.rb', line 8 def status @status end |
Class Method Details
.next(options = {}) ⇒ Object
24 25 26 |
# File 'lib/mollie/settlement.rb', line 24 def self.next( = {}) get('next', ) end |
.open(options = {}) ⇒ Object
20 21 22 |
# File 'lib/mollie/settlement.rb', line 20 def self.open( = {}) get('open', ) end |
Instance Method Details
#captures(options = {}) ⇒ Object
80 81 82 |
# File 'lib/mollie/settlement.rb', line 80 def captures( = {}) Settlement::Capture.all(.merge(settlement_id: id)) end |
#chargebacks(options = {}) ⇒ Object
76 77 78 |
# File 'lib/mollie/settlement.rb', line 76 def chargebacks( = {}) Settlement::Chargeback.all(.merge(settlement_id: id)) end |
#failed? ⇒ Boolean
40 41 42 |
# File 'lib/mollie/settlement.rb', line 40 def failed? status == STATUS_FAILED end |
#invoice(options = {}) ⇒ Object
84 85 86 87 |
# File 'lib/mollie/settlement.rb', line 84 def invoice( = {}) return if invoice_id.nil? Invoice.get(invoice_id, ) end |
#open? ⇒ Boolean
28 29 30 |
# File 'lib/mollie/settlement.rb', line 28 def open? status == STATUS_OPEN end |
#paidout? ⇒ Boolean
36 37 38 |
# File 'lib/mollie/settlement.rb', line 36 def paidout? status == STATUS_PAIDOUT end |
#payments(options = {}) ⇒ Object
68 69 70 |
# File 'lib/mollie/settlement.rb', line 68 def payments( = {}) Settlement::Payment.all(.merge(settlement_id: id)) end |
#pending? ⇒ Boolean
32 33 34 |
# File 'lib/mollie/settlement.rb', line 32 def pending? status == STATUS_PENDING end |
#refunds(options = {}) ⇒ Object
72 73 74 |
# File 'lib/mollie/settlement.rb', line 72 def refunds( = {}) Settlement::Refund.all(.merge(settlement_id: id)) end |