Class: Ingenico::Connect::SDK::Domain::Product::AccountOnFileDisplayHints
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Product::AccountOnFileDisplayHints
- Defined in:
- lib/ingenico/connect/sdk/domain/product/account_on_file_display_hints.rb
Overview
Instance Attribute Summary collapse
-
#label_template ⇒ Object
Array of LabelTemplateElement.
-
#logo ⇒ Object
String.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#label_template ⇒ Object
Array of LabelTemplateElement
16 17 18 |
# File 'lib/ingenico/connect/sdk/domain/product/account_on_file_display_hints.rb', line 16 def label_template @label_template end |
#logo ⇒ Object
String
19 20 21 |
# File 'lib/ingenico/connect/sdk/domain/product/account_on_file_display_hints.rb', line 19 def logo @logo end |
Instance Method Details
#from_hash(hash) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# 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') if !(hash['labelTemplate'].is_a? Array) raise TypeError, "value '%s' is not an Array" % [hash['labelTemplate']] end @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') @logo = hash['logo'] end end |
#to_h ⇒ Object
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 add_to_hash(hash, 'labelTemplate', @label_template) add_to_hash(hash, 'logo', @logo) hash end |