Class: Ingenico::Connect::SDK::Domain::Product::AccountOnFileDisplayHints

Inherits:
Ingenico::Connect::SDK::DataObject show all
Defined in:
lib/ingenico/connect/sdk/domain/product/account_on_file_display_hints.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#label_templateArray<Ingenico::Connect::SDK::Domain::Product::LabelTemplateElement>

Returns the current value of label_template.

Returns:



14
15
16
# File 'lib/ingenico/connect/sdk/domain/product/account_on_file_display_hints.rb', line 14

def label_template
  @label_template
end

#logoString

Returns the current value of logo.

Returns:

  • (String)

    the current value of logo



14
15
16
# File 'lib/ingenico/connect/sdk/domain/product/account_on_file_display_hints.rb', line 14

def 
  
end

Instance Method Details

#from_hash(hash) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/ingenico/connect/sdk/domain/product/account_on_file_display_hints.rb', line 28

def from_hash(hash)
  super
  if hash.has_key? 'labelTemplate'
    raise TypeError, "value '%s' is not an Array" % [hash['labelTemplate']] unless hash['labelTemplate'].is_a? Array
    @label_template = []
    hash['labelTemplate'].each do |e|
      @label_template << Ingenico::Connect::SDK::Domain::Product::LabelTemplateElement.new_from_hash(e)
    end
  end
  if hash.has_key? 'logo'
     = hash['logo']
  end
end

#to_hHash

Returns:

  • (Hash)


21
22
23
24
25
26
# File 'lib/ingenico/connect/sdk/domain/product/account_on_file_display_hints.rb', line 21

def to_h
  hash = super
  hash['labelTemplate'] = @label_template.collect{|val| val.to_h} unless @label_template.nil?
  hash['logo'] =  unless .nil?
  hash
end