Class: Ingenico::Direct::SDK::Domain::ExternalTokenLinked

Inherits:
Ingenico::Direct::SDK::DataObject show all
Defined in:
lib/ingenico/direct/sdk/domain/external_token_linked.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Direct::SDK::DataObject

new_from_hash

Instance Attribute Details

#computed_tokenString

Returns the current value of computed_token.

Returns:

  • (String)

    the current value of computed_token



13
14
15
# File 'lib/ingenico/direct/sdk/domain/external_token_linked.rb', line 13

def computed_token
  @computed_token
end

#generated_tokenString

Returns the current value of generated_token.

Returns:

  • (String)

    the current value of generated_token



13
14
15
# File 'lib/ingenico/direct/sdk/domain/external_token_linked.rb', line 13

def generated_token
  @generated_token
end

#gts_computed_tokenString

Returns the current value of gts_computed_token.

Returns:

  • (String)

    the current value of gts_computed_token



13
14
15
# File 'lib/ingenico/direct/sdk/domain/external_token_linked.rb', line 13

def gts_computed_token
  @gts_computed_token
end

Instance Method Details

#from_hash(hash) ⇒ Object



27
28
29
30
31
32
# File 'lib/ingenico/direct/sdk/domain/external_token_linked.rb', line 27

def from_hash(hash)
  super
  @computed_token = hash['ComputedToken'] if hash.key? 'ComputedToken'
  @gts_computed_token = hash['GTSComputedToken'] if hash.key? 'GTSComputedToken'
  @generated_token = hash['GeneratedToken'] if hash.key? 'GeneratedToken'
end

#to_hHash

Returns:

  • (Hash)


19
20
21
22
23
24
25
# File 'lib/ingenico/direct/sdk/domain/external_token_linked.rb', line 19

def to_h
  hash = super
  hash['ComputedToken'] = @computed_token unless @computed_token.nil?
  hash['GTSComputedToken'] = @gts_computed_token unless @gts_computed_token.nil?
  hash['GeneratedToken'] = @generated_token unless @generated_token.nil?
  hash
end