Class: Ingenico::Direct::SDK::Domain::PaymentProductFieldDisplayHints
- Inherits:
-
Ingenico::Direct::SDK::DataObject
- Object
- Ingenico::Direct::SDK::DataObject
- Ingenico::Direct::SDK::Domain::PaymentProductFieldDisplayHints
- Defined in:
- lib/ingenico/direct/sdk/domain/payment_product_field_display_hints.rb
Instance Attribute Summary collapse
-
#always_show ⇒ true/false
The current value of always_show.
-
#display_order ⇒ Integer
The current value of display_order.
-
#form_element ⇒ Ingenico::Direct::SDK::Domain::PaymentProductFieldFormElement
The current value of form_element.
-
#label ⇒ String
The current value of label.
-
#link ⇒ String
The current value of link.
-
#mask ⇒ String
The current value of mask.
-
#obfuscate ⇒ true/false
The current value of obfuscate.
-
#placeholder_label ⇒ String
The current value of placeholder_label.
-
#preferred_input_type ⇒ String
The current value of preferred_input_type.
-
#tooltip ⇒ Ingenico::Direct::SDK::Domain::PaymentProductFieldTooltip
The current value of tooltip.
Instance Method Summary collapse
Methods inherited from Ingenico::Direct::SDK::DataObject
Instance Attribute Details
#always_show ⇒ true/false
Returns the current value of always_show.
22 23 24 |
# File 'lib/ingenico/direct/sdk/domain/payment_product_field_display_hints.rb', line 22 def always_show @always_show end |
#display_order ⇒ Integer
Returns the current value of display_order.
22 23 24 |
# File 'lib/ingenico/direct/sdk/domain/payment_product_field_display_hints.rb', line 22 def display_order @display_order end |
#form_element ⇒ Ingenico::Direct::SDK::Domain::PaymentProductFieldFormElement
Returns the current value of form_element.
22 23 24 |
# File 'lib/ingenico/direct/sdk/domain/payment_product_field_display_hints.rb', line 22 def form_element @form_element end |
#label ⇒ String
Returns the current value of label.
22 23 24 |
# File 'lib/ingenico/direct/sdk/domain/payment_product_field_display_hints.rb', line 22 def label @label end |
#link ⇒ String
Returns the current value of link.
22 23 24 |
# File 'lib/ingenico/direct/sdk/domain/payment_product_field_display_hints.rb', line 22 def link @link end |
#mask ⇒ String
Returns the current value of mask.
22 23 24 |
# File 'lib/ingenico/direct/sdk/domain/payment_product_field_display_hints.rb', line 22 def mask @mask end |
#obfuscate ⇒ true/false
Returns the current value of obfuscate.
22 23 24 |
# File 'lib/ingenico/direct/sdk/domain/payment_product_field_display_hints.rb', line 22 def obfuscate @obfuscate end |
#placeholder_label ⇒ String
Returns the current value of placeholder_label.
22 23 24 |
# File 'lib/ingenico/direct/sdk/domain/payment_product_field_display_hints.rb', line 22 def placeholder_label @placeholder_label end |
#preferred_input_type ⇒ String
Returns the current value of preferred_input_type.
22 23 24 |
# File 'lib/ingenico/direct/sdk/domain/payment_product_field_display_hints.rb', line 22 def preferred_input_type @preferred_input_type end |
#tooltip ⇒ Ingenico::Direct::SDK::Domain::PaymentProductFieldTooltip
Returns the current value of tooltip.
22 23 24 |
# File 'lib/ingenico/direct/sdk/domain/payment_product_field_display_hints.rb', line 22 def tooltip @tooltip end |
Instance Method Details
#from_hash(hash) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/ingenico/direct/sdk/domain/payment_product_field_display_hints.rb', line 50 def from_hash(hash) super @always_show = hash['alwaysShow'] if hash.key? 'alwaysShow' @display_order = hash['displayOrder'] if hash.key? 'displayOrder' if hash.key? 'formElement' raise TypeError, "value '%s' is not a Hash" % [hash['formElement']] unless hash['formElement'].is_a? Hash @form_element = Ingenico::Direct::SDK::Domain::PaymentProductFieldFormElement.new_from_hash(hash['formElement']) end @label = hash['label'] if hash.key? 'label' @link = hash['link'] if hash.key? 'link' @mask = hash['mask'] if hash.key? 'mask' @obfuscate = hash['obfuscate'] if hash.key? 'obfuscate' @placeholder_label = hash['placeholderLabel'] if hash.key? 'placeholderLabel' @preferred_input_type = hash['preferredInputType'] if hash.key? 'preferredInputType' if hash.key? 'tooltip' raise TypeError, "value '%s' is not a Hash" % [hash['tooltip']] unless hash['tooltip'].is_a? Hash @tooltip = Ingenico::Direct::SDK::Domain::PaymentProductFieldTooltip.new_from_hash(hash['tooltip']) end end |
#to_h ⇒ Hash
35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/ingenico/direct/sdk/domain/payment_product_field_display_hints.rb', line 35 def to_h hash = super hash['alwaysShow'] = @always_show unless @always_show.nil? hash['displayOrder'] = @display_order unless @display_order.nil? hash['formElement'] = @form_element.to_h if @form_element hash['label'] = @label unless @label.nil? hash['link'] = @link unless @link.nil? hash['mask'] = @mask unless @mask.nil? hash['obfuscate'] = @obfuscate unless @obfuscate.nil? hash['placeholderLabel'] = @placeholder_label unless @placeholder_label.nil? hash['preferredInputType'] = @preferred_input_type unless @preferred_input_type.nil? hash['tooltip'] = @tooltip.to_h if @tooltip hash end |