class Ingenico::Direct::SDK::Domain::GetHostedTokenizationResponse
@attr [Ingenico::Direct::SDK::Domain::TokenResponse] token @attr [String] token_status
Attributes
token[RW]
token_status[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Direct::SDK::DataObject#from_hash
# File lib/ingenico/direct/sdk/domain/get_hosted_tokenization_response.rb, line 25 def from_hash(hash) super if hash.key? 'token' raise TypeError, "value '%s' is not a Hash" % [hash['token']] unless hash['token'].is_a? Hash @token = Ingenico::Direct::SDK::Domain::TokenResponse.new_from_hash(hash['token']) end @token_status = hash['tokenStatus'] if hash.key? 'tokenStatus' end
to_h()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/sdk/domain/get_hosted_tokenization_response.rb, line 18 def to_h hash = super hash['token'] = @token.to_h if @token hash['tokenStatus'] = @token_status unless @token_status.nil? hash end