Class: Worldline::Connect::SDK::V1::Domain::DisplayedData

Inherits:
Domain::DataObject show all
Defined in:
lib/worldline/connect/sdk/v1/domain/displayed_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#displayed_data_typeString

Returns the current value of displayed_data_type.

Returns:

  • (String)

    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_dataString

Returns the current value of rendering_data.

Returns:

  • (String)

    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_dataArray<Worldline::Connect::SDK::V1::Domain::KeyValuePair>

Returns the current value of show_data.

Returns:



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_hHash

Returns:

  • (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