Class: Mollie::Customer::Mandate

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

Constant Summary collapse

STATUS_VALID =
'valid'.freeze
STATUS_INVALID =
'invalid'.freeze
STATUS_PENDING =
'pending'.freeze

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.



8
9
10
# File 'lib/mollie/customer/mandate.rb', line 8

def _links
  @_links
end

#created_atObject

Returns the value of attribute created_at.



8
9
10
# File 'lib/mollie/customer/mandate.rb', line 8

def created_at
  @created_at
end

#detailsObject

Returns the value of attribute details.



8
9
10
# File 'lib/mollie/customer/mandate.rb', line 8

def details
  @details
end

#idObject

Returns the value of attribute id.



8
9
10
# File 'lib/mollie/customer/mandate.rb', line 8

def id
  @id
end

#mandate_referenceObject

Returns the value of attribute mandate_reference.



8
9
10
# File 'lib/mollie/customer/mandate.rb', line 8

def mandate_reference
  @mandate_reference
end

#methodObject

Returns the value of attribute method.



8
9
10
# File 'lib/mollie/customer/mandate.rb', line 8

def method
  @method
end

#modeObject

Returns the value of attribute mode.



8
9
10
# File 'lib/mollie/customer/mandate.rb', line 8

def mode
  @mode
end

#signature_dateObject

Returns the value of attribute signature_date.



8
9
10
# File 'lib/mollie/customer/mandate.rb', line 8

def signature_date
  @signature_date
end

#statusObject

Returns the value of attribute status.



8
9
10
# File 'lib/mollie/customer/mandate.rb', line 8

def status
  @status
end

Instance Method Details

#customer(options = {}) ⇒ Object



44
45
46
47
# File 'lib/mollie/customer/mandate.rb', line 44

def customer(options = {})
  customer_id = Util.extract_id(links, 'customer')
  Customer.get(customer_id, options)
end

#invalid?Boolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/mollie/customer/mandate.rb', line 40

def invalid?
  status == STATUS_INVALID
end

#pending?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/mollie/customer/mandate.rb', line 36

def pending?
  status == STATUS_PENDING
end

#valid?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/mollie/customer/mandate.rb', line 32

def valid?
  status == STATUS_VALID
end