Class: Worldline::Connect::SDK::V1::Domain::DeviceRenderOptions

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#sdk_interfaceString

Returns the current value of sdk_interface.

Returns:

  • (String)

    the current value of sdk_interface



15
16
17
# File 'lib/worldline/connect/sdk/v1/domain/device_render_options.rb', line 15

def sdk_interface
  @sdk_interface
end

#sdk_ui_typeObject

Deprecated.

Use deviceRenderOptions.sdkUiTypes instead



15
16
17
# File 'lib/worldline/connect/sdk/v1/domain/device_render_options.rb', line 15

def sdk_ui_type
  @sdk_ui_type
end

#sdk_ui_typesArray<String>

Returns the current value of sdk_ui_types.

Returns:

  • (Array<String>)

    the current value of sdk_ui_types



15
16
17
# File 'lib/worldline/connect/sdk/v1/domain/device_render_options.rb', line 15

def sdk_ui_types
  @sdk_ui_types
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/device_render_options.rb', line 33

def from_hash(hash)
  super
  if hash.has_key? 'sdkInterface'
    @sdk_interface = hash['sdkInterface']
  end
  if hash.has_key? 'sdkUiType'
    @sdk_ui_type = hash['sdkUiType']
  end
  if hash.has_key? 'sdkUiTypes'
    raise TypeError, "value '%s' is not an Array" % [hash['sdkUiTypes']] unless hash['sdkUiTypes'].is_a? Array
    @sdk_ui_types = []
    hash['sdkUiTypes'].each do |e|
      @sdk_ui_types << e
    end
  end
end

#to_hHash

Returns:

  • (Hash)


25
26
27
28
29
30
31
# File 'lib/worldline/connect/sdk/v1/domain/device_render_options.rb', line 25

def to_h
  hash = super
  hash['sdkInterface'] = @sdk_interface unless @sdk_interface.nil?
  hash['sdkUiType'] = @sdk_ui_type unless @sdk_ui_type.nil?
  hash['sdkUiTypes'] = @sdk_ui_types unless @sdk_ui_types.nil?
  hash
end