Class: Ingenico::Connect::SDK::Domain::Product::PaymentProductFieldDisplayHints

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

new_from_hash

Instance Attribute Details

#always_showObject

true/false



16
17
18
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 16

def always_show
  @always_show
end

#display_orderObject

Integer



19
20
21
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 19

def display_order
  @display_order
end

#form_elementObject



22
23
24
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 22

def form_element
  @form_element
end

#labelObject

String



25
26
27
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 25

def label
  @label
end

String



28
29
30
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 28

def link
  @link
end

#maskObject

String



31
32
33
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 31

def mask
  @mask
end

#obfuscateObject

true/false



34
35
36
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 34

def obfuscate
  @obfuscate
end

#placeholder_labelObject

String



37
38
39
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 37

def placeholder_label
  @placeholder_label
end

#preferred_input_typeObject

String



40
41
42
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 40

def preferred_input_type
  @preferred_input_type
end

#tooltipObject



43
44
45
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 43

def tooltip
  @tooltip
end

Instance Method Details

#from_hash(hash) ⇒ Object



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 60

def from_hash(hash)
  super
  if hash.has_key?('alwaysShow')
    @always_show = hash['alwaysShow']
  end
  if hash.has_key?('displayOrder')
    @display_order = hash['displayOrder']
  end
  if hash.has_key?('formElement')
    if !(hash['formElement'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['formElement']]
    end
    @form_element = Ingenico::Connect::SDK::Domain::Product::PaymentProductFieldFormElement.new_from_hash(hash['formElement'])
  end
  if hash.has_key?('label')
    @label = hash['label']
  end
  if hash.has_key?('link')
    @link = hash['link']
  end
  if hash.has_key?('mask')
    @mask = hash['mask']
  end
  if hash.has_key?('obfuscate')
    @obfuscate = hash['obfuscate']
  end
  if hash.has_key?('placeholderLabel')
    @placeholder_label = hash['placeholderLabel']
  end
  if hash.has_key?('preferredInputType')
    @preferred_input_type = hash['preferredInputType']
  end
  if hash.has_key?('tooltip')
    if !(hash['tooltip'].is_a? Hash)
      raise TypeError, "value '%s' is not a Hash" % [hash['tooltip']]
    end
    @tooltip = Ingenico::Connect::SDK::Domain::Product::PaymentProductFieldTooltip.new_from_hash(hash['tooltip'])
  end
end

#to_hObject



45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 45

def to_h
  hash = super
  add_to_hash(hash, 'alwaysShow', @always_show)
  add_to_hash(hash, 'displayOrder', @display_order)
  add_to_hash(hash, 'formElement', @form_element)
  add_to_hash(hash, 'label', @label)
  add_to_hash(hash, 'link', @link)
  add_to_hash(hash, 'mask', @mask)
  add_to_hash(hash, 'obfuscate', @obfuscate)
  add_to_hash(hash, 'placeholderLabel', @placeholder_label)
  add_to_hash(hash, 'preferredInputType', @preferred_input_type)
  add_to_hash(hash, 'tooltip', @tooltip)
  hash
end