Class: OnlinePayments::SDK::Domain::NetworkTokenLinked

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#expiry_dateString

Returns the current value of expiry_date.

Returns:

  • (String)

    the current value of expiry_date



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

def expiry_date
  @expiry_date
end

#masked_tokenString

Returns the current value of masked_token.

Returns:

  • (String)

    the current value of masked_token



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

def masked_token
  @masked_token
end

#token_stateString

Returns the current value of token_state.

Returns:

  • (String)

    the current value of token_state



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

def token_state
  @token_state
end

Instance Method Details

#from_hash(hash) ⇒ Object



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

def from_hash(hash)
  super
  if hash.has_key? 'expiryDate'
    @expiry_date = hash['expiryDate']
  end
  if hash.has_key? 'maskedToken'
    @masked_token = hash['maskedToken']
  end
  if hash.has_key? 'tokenState'
    @token_state = hash['tokenState']
  end
end

#to_hHash

Returns:

  • (Hash)


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

def to_h
  hash = super
  hash['expiryDate'] = @expiry_date unless @expiry_date.nil?
  hash['maskedToken'] = @masked_token unless @masked_token.nil?
  hash['tokenState'] = @token_state unless @token_state.nil?
  hash
end