Class: Worldline::Connect::SDK::V1::Domain::NetworkTokenData

Inherits:
Domain::DataObject show all
Defined in:
lib/worldline/connect/sdk/v1/domain/network_token_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#network_tokenString

Returns the current value of network_token.

Returns:

  • (String)

    the current value of network_token



15
16
17
# File 'lib/worldline/connect/sdk/v1/domain/network_token_data.rb', line 15

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



15
16
17
# File 'lib/worldline/connect/sdk/v1/domain/network_token_data.rb', line 15

def token_expiry_date
  @token_expiry_date
end

#token_reference_idString

Returns the current value of token_reference_id.

Returns:

  • (String)

    the current value of token_reference_id



15
16
17
# File 'lib/worldline/connect/sdk/v1/domain/network_token_data.rb', line 15

def token_reference_id
  @token_reference_id
end

Instance Method Details

#from_hash(hash) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/worldline/connect/sdk/v1/domain/network_token_data.rb', line 32

def from_hash(hash)
  super
  if hash.has_key? 'networkToken'
    @network_token = hash['networkToken']
  end
  if hash.has_key? 'tokenExpiryDate'
    @token_expiry_date = hash['tokenExpiryDate']
  end
  if hash.has_key? 'tokenReferenceId'
    @token_reference_id = hash['tokenReferenceId']
  end
end

#to_hHash

Returns:

  • (Hash)


24
25
26
27
28
29
30
# File 'lib/worldline/connect/sdk/v1/domain/network_token_data.rb', line 24

def to_h
  hash = super
  hash['networkToken'] = @network_token unless @network_token.nil?
  hash['tokenExpiryDate'] = @token_expiry_date unless @token_expiry_date.nil?
  hash['tokenReferenceId'] = @token_reference_id unless @token_reference_id.nil?
  hash
end