Class: Akatus::CreditCard

Inherits:
PaymentType show all
Defined in:
lib/akatus/payment_types.rb

Instance Attribute Summary collapse

Attributes inherited from PaymentType

#type

Instance Method Summary collapse

Methods included from Transferrable

included, #initialize

Instance Attribute Details

#holder_cpfObject

Returns the value of attribute holder_cpf.



11
12
13
# File 'lib/akatus/payment_types.rb', line 11

def holder_cpf
  @holder_cpf
end

#holder_nameObject

Returns the value of attribute holder_name.



11
12
13
# File 'lib/akatus/payment_types.rb', line 11

def holder_name
  @holder_name
end

#holder_phoneObject

Returns the value of attribute holder_phone.



11
12
13
# File 'lib/akatus/payment_types.rb', line 11

def holder_phone
  @holder_phone
end

Instance Method Details

#to_payloadObject



13
14
15
16
17
18
19
20
21
# File 'lib/akatus/payment_types.rb', line 13

def to_payload
  payload = super
  payload['cartao_de_credito']['portador'] = {
    :nome     => holder_name,
    :cpf      => holder_cpf,
    :telefone => holder_phone
  }
  payload['cartao_de_credito']
end