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