Class: OnlinePayments::SDK::Domain::ExternalTokenLinked

Inherits:
DataObject
  • Object
show all
Defined in:
lib/onlinepayments/sdk/domain/external_token_linked.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#computed_tokenString

Returns the current value of computed_token.

Returns:

  • (String)

    the current value of computed_token



12
13
14
# File 'lib/onlinepayments/sdk/domain/external_token_linked.rb', line 12

def computed_token
  @computed_token
end

#generated_tokenString

Returns the current value of generated_token.

Returns:

  • (String)

    the current value of generated_token



12
13
14
# File 'lib/onlinepayments/sdk/domain/external_token_linked.rb', line 12

def generated_token
  @generated_token
end

#gts_computed_tokenObject

Deprecated.

Use the field ComputedToken instead.



12
13
14
# File 'lib/onlinepayments/sdk/domain/external_token_linked.rb', line 12

def gts_computed_token
  @gts_computed_token
end

Instance Method Details

#from_hash(hash) ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/onlinepayments/sdk/domain/external_token_linked.rb', line 30

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

#to_hHash

Returns:

  • (Hash)


22
23
24
25
26
27
28
# File 'lib/onlinepayments/sdk/domain/external_token_linked.rb', line 22

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