Class: Mollie::Chargeback

Inherits:
Base
  • Object
show all
Defined in:
lib/mollie/chargeback.rb

Direct Known Subclasses

Payment::Chargeback, Settlement::Chargeback

Instance Attribute Summary collapse

Attributes inherited from Base

#attributes

Instance Method Summary collapse

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

Returns the value of attribute _links.



3
4
5
# File 'lib/mollie/chargeback.rb', line 3

def _links
  @_links
end

#amountObject

Returns the value of attribute amount.



3
4
5
# File 'lib/mollie/chargeback.rb', line 3

def amount
  @amount
end

#created_atObject

Returns the value of attribute created_at.



3
4
5
# File 'lib/mollie/chargeback.rb', line 3

def created_at
  @created_at
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/mollie/chargeback.rb', line 3

def id
  @id
end

#payment(options = {}) ⇒ Object

Returns the value of attribute payment.



3
4
5
# File 'lib/mollie/chargeback.rb', line 3

def payment
  @payment
end

#payment_idObject

Returns the value of attribute payment_id.



3
4
5
# File 'lib/mollie/chargeback.rb', line 3

def payment_id
  @payment_id
end

#reversed_atObject

Returns the value of attribute reversed_at.



3
4
5
# File 'lib/mollie/chargeback.rb', line 3

def reversed_at
  @reversed_at
end

#settlement_amountObject

Returns the value of attribute settlement_amount.



3
4
5
# File 'lib/mollie/chargeback.rb', line 3

def settlement_amount
  @settlement_amount
end

Instance Method Details

#reversed?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/mollie/chargeback.rb', line 14

def reversed?
  !!reversed_at
end

#settlement(options = {}) ⇒ Object



46
47
48
49
50
# File 'lib/mollie/chargeback.rb', line 46

def settlement(options = {})
  settlement_id = Util.extract_id(links, 'settlement')
  return if settlement_id.nil?
  Settlement.get(settlement_id, options)
end