class Ingenico::Connect::SDK::Domain::Payment::DeviceRenderOptions

@attr [String] sdk_interface @attr [String] sdk_ui_type @attr [Array<String>] sdk_ui_types

Attributes

sdk_interface[RW]
sdk_ui_type[RW]

@deprecated Use deviceRenderOptions.sdkUiTypes instead

sdk_ui_types[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/payment/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_h() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Connect::SDK::DataObject#to_h
# File lib/ingenico/connect/sdk/domain/payment/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