Class: Ingenico::Connect::SDK::Domain::Product::PaymentProductFieldDisplayHints
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Product::PaymentProductFieldDisplayHints
- Defined in:
- lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb
Overview
Instance Attribute Summary collapse
-
#always_show ⇒ Object
true/false.
-
#display_order ⇒ Object
Integer.
- #form_element ⇒ Object
-
#label ⇒ Object
String.
-
#mask ⇒ Object
String.
-
#obfuscate ⇒ Object
true/false.
-
#placeholder_label ⇒ Object
String.
-
#preferred_input_type ⇒ Object
String.
- #tooltip ⇒ Object
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#always_show ⇒ Object
true/false
17 18 19 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 17 def always_show @always_show end |
#display_order ⇒ Object
Integer
20 21 22 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 20 def display_order @display_order end |
#form_element ⇒ Object
23 24 25 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 23 def form_element @form_element end |
#label ⇒ Object
String
26 27 28 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 26 def label @label end |
#mask ⇒ Object
String
29 30 31 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 29 def mask @mask end |
#obfuscate ⇒ Object
true/false
32 33 34 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 32 def obfuscate @obfuscate end |
#placeholder_label ⇒ Object
String
35 36 37 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 35 def placeholder_label @placeholder_label end |
#preferred_input_type ⇒ Object
String
38 39 40 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 38 def preferred_input_type @preferred_input_type end |
#tooltip ⇒ Object
41 42 43 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 41 def tooltip @tooltip end |
Instance Method Details
#from_hash(hash) ⇒ Object
57 58 59 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 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 57 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?('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_h ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 43 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, '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 |