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
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
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_order ⇒ Object
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_element ⇒ Object
22 23 24 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 22 def form_element @form_element end |
#label ⇒ Object
String
25 26 27 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 25 def label @label end |
#mask ⇒ Object
String
28 29 30 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 28 def mask @mask end |
#obfuscate ⇒ Object
true/false
31 32 33 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 31 def obfuscate @obfuscate end |
#placeholder_label ⇒ Object
String
34 35 36 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 34 def placeholder_label @placeholder_label end |
#preferred_input_type ⇒ Object
String
37 38 39 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 37 def preferred_input_type @preferred_input_type end |
#tooltip ⇒ Object
40 41 42 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 40 def tooltip @tooltip end |
Instance Method Details
#from_hash(hash) ⇒ Object
56 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 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 56 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
42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 42 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 |