Class: Worldline::Connect::SDK::V1::Domain::AccountOnFileDisplayHints
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::AccountOnFileDisplayHints
- Defined in:
- lib/worldline/connect/sdk/v1/domain/account_on_file_display_hints.rb
Instance Attribute Summary collapse
-
#label_template ⇒ Array<Worldline::Connect::SDK::V1::Domain::LabelTemplateElement>
The current value of label_template.
-
#logo ⇒ String
The current value of logo.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#label_template ⇒ Array<Worldline::Connect::SDK::V1::Domain::LabelTemplateElement>
Returns the current value of label_template.
15 16 17 |
# File 'lib/worldline/connect/sdk/v1/domain/account_on_file_display_hints.rb', line 15 def label_template @label_template end |
#logo ⇒ String
Returns the current value of logo.
15 16 17 |
# File 'lib/worldline/connect/sdk/v1/domain/account_on_file_display_hints.rb', line 15 def logo @logo end |
Instance Method Details
#from_hash(hash) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/worldline/connect/sdk/v1/domain/account_on_file_display_hints.rb', line 29 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 << Worldline::Connect::SDK::V1::Domain::LabelTemplateElement.new_from_hash(e) end end if hash.has_key? 'logo' @logo = hash['logo'] end end |
#to_h ⇒ Hash
22 23 24 25 26 27 |
# File 'lib/worldline/connect/sdk/v1/domain/account_on_file_display_hints.rb', line 22 def to_h hash = super hash['labelTemplate'] = @label_template.collect{|val| val.to_h} unless @label_template.nil? hash['logo'] = @logo unless @logo.nil? hash end |