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

Inherits:
OnlinePayments::SDK::DataObject show all
Defined in:
lib/onlinepayments/sdk/domain/external_token_linked.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OnlinePayments::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



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_tokenString

Returns the current value of gts_computed_token.

Returns:

  • (String)

    the current value of gts_computed_token



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



26
27
28
29
30
31
# File 'lib/onlinepayments/sdk/domain/external_token_linked.rb', line 26

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)


18
19
20
21
22
23
24
# File 'lib/onlinepayments/sdk/domain/external_token_linked.rb', line 18

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