Class: Ingenico::Connect::SDK::Domain::Hostedcheckout::DisplayedData
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Hostedcheckout::DisplayedData
- Defined in:
- lib/ingenico/connect/sdk/domain/hostedcheckout/displayed_data.rb
Instance Attribute Summary collapse
-
#displayed_data_type ⇒ String
The current value of displayed_data_type.
-
#rendering_data ⇒ String
The current value of rendering_data.
-
#show_data ⇒ Array<Ingenico::Connect::SDK::Domain::Definitions::KeyValuePair>
The current value of show_data.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#displayed_data_type ⇒ String
Returns the current value of displayed_data_type.
15 16 17 |
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/displayed_data.rb', line 15 def displayed_data_type @displayed_data_type end |
#rendering_data ⇒ String
Returns the current value of rendering_data.
15 16 17 |
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/displayed_data.rb', line 15 def rendering_data @rendering_data end |
#show_data ⇒ Array<Ingenico::Connect::SDK::Domain::Definitions::KeyValuePair>
Returns the current value of show_data.
15 16 17 |
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/displayed_data.rb', line 15 def show_data @show_data end |
Instance Method Details
#from_hash(hash) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# 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 ⇒ Hash
24 25 26 27 28 29 30 |
# 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 |