class Ingenico::Connect::SDK::Domain::Hostedcheckout::DisplayedData
@attr [String] displayed_data_type
@attr [String] rendering_data
@attr [Array<Ingenico::Connect::SDK::Domain::Definitions::KeyValuePair>] show_data
Attributes
displayed_data_type[RW]
rendering_data[RW]
show_data[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Connect::SDK::DataObject#from_hash
# File lib/ingenico/connect/sdk/domain/hostedcheckout/displayed_data.rb, line 32 def from_hash(hash) super if hash.has_key? 'displayedDataType' @displayed_data_type = hash['displayedDataType'] end if hash.has_key? 'renderingData' @rendering_data = hash['renderingData'] end if hash.has_key? 'showData' raise TypeError, "value '%s' is not an Array" % [hash['showData']] unless hash['showData'].is_a? Array @show_data = [] hash['showData'].each do |e| @show_data << Ingenico::Connect::SDK::Domain::Definitions::KeyValuePair.new_from_hash(e) end end end
to_h()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Connect::SDK::DataObject#to_h
# File lib/ingenico/connect/sdk/domain/hostedcheckout/displayed_data.rb, line 24 def to_h hash = super hash['displayedDataType'] = @displayed_data_type unless @displayed_data_type.nil? hash['renderingData'] = @rendering_data unless @rendering_data.nil? hash['showData'] = @show_data.collect{|val| val.to_h} unless @show_data.nil? hash end