Class: Ingenico::Connect::SDK::Domain::Payment::SchemeTokenData

Inherits:
Ingenico::Connect::SDK::DataObject show all
Defined in:
lib/ingenico/connect/sdk/domain/payment/scheme_token_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#cardholder_nameString

Returns the current value of cardholder_name.

Returns:

  • (String)

    the current value of cardholder_name



16
17
18
# File 'lib/ingenico/connect/sdk/domain/payment/scheme_token_data.rb', line 16

def cardholder_name
  @cardholder_name
end

#cryptogramString

Returns the current value of cryptogram.

Returns:

  • (String)

    the current value of cryptogram



16
17
18
# File 'lib/ingenico/connect/sdk/domain/payment/scheme_token_data.rb', line 16

def cryptogram
  @cryptogram
end

#eciString

Returns the current value of eci.

Returns:

  • (String)

    the current value of eci



16
17
18
# File 'lib/ingenico/connect/sdk/domain/payment/scheme_token_data.rb', line 16

def eci
  @eci
end

#network_tokenString

Returns the current value of network_token.

Returns:

  • (String)

    the current value of network_token



16
17
18
# File 'lib/ingenico/connect/sdk/domain/payment/scheme_token_data.rb', line 16

def network_token
  @network_token
end

#token_expiry_dateString

Returns the current value of token_expiry_date.

Returns:

  • (String)

    the current value of token_expiry_date



16
17
18
# File 'lib/ingenico/connect/sdk/domain/payment/scheme_token_data.rb', line 16

def token_expiry_date
  @token_expiry_date
end

Instance Method Details

#from_hash(hash) ⇒ Object



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/ingenico/connect/sdk/domain/payment/scheme_token_data.rb', line 39

def from_hash(hash)
  super
  if hash.has_key? 'cardholderName'
    @cardholder_name = hash['cardholderName']
  end
  if hash.has_key? 'cryptogram'
    @cryptogram = hash['cryptogram']
  end
  if hash.has_key? 'eci'
    @eci = hash['eci']
  end
  if hash.has_key? 'networkToken'
    @network_token = hash['networkToken']
  end
  if hash.has_key? 'tokenExpiryDate'
    @token_expiry_date = hash['tokenExpiryDate']
  end
end

#to_hHash

Returns:

  • (Hash)


29
30
31
32
33
34
35
36
37
# File 'lib/ingenico/connect/sdk/domain/payment/scheme_token_data.rb', line 29

def to_h
  hash = super
  hash['cardholderName'] = @cardholder_name unless @cardholder_name.nil?
  hash['cryptogram'] = @cryptogram unless @cryptogram.nil?
  hash['eci'] = @eci unless @eci.nil?
  hash['networkToken'] = @network_token unless @network_token.nil?
  hash['tokenExpiryDate'] = @token_expiry_date unless @token_expiry_date.nil?
  hash
end