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_showtrue/false

Returns the current value of always_show.

Returns:

  • (true/false)

    the current value of always_show



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

def always_show
  @always_show
end

#display_orderInteger

Returns the current value of display_order.

Returns:

  • (Integer)

    the current value of display_order



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

def display_order
  @display_order
end

#form_elementIngenico::Connect::SDK::Domain::Product::PaymentProductFieldFormElement

Returns the current value of form_element.

Returns:



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

def form_element
  @form_element
end

#labelString

Returns the current value of label.

Returns:

  • (String)

    the current value of label



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

def label
  @label
end

Returns the current value of link.

Returns:

  • (String)

    the current value of link



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

def link
  @link
end

#maskString

Returns the current value of mask.

Returns:

  • (String)

    the current value of mask



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

def mask
  @mask
end

#obfuscatetrue/false

Returns the current value of obfuscate.

Returns:

  • (true/false)

    the current value of obfuscate



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

def obfuscate
  @obfuscate
end

#placeholder_labelString

Returns the current value of placeholder_label.

Returns:

  • (String)

    the current value of placeholder_label



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

def placeholder_label
  @placeholder_label
end

#preferred_input_typeString

Returns the current value of preferred_input_type.

Returns:

  • (String)

    the current value of preferred_input_type



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

def preferred_input_type
  @preferred_input_type
end

#tooltipIngenico::Connect::SDK::Domain::Product::PaymentProductFieldTooltip

Returns the current value of tooltip.

Returns:



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

def tooltip
  @tooltip
end

Instance Method Details

#from_hash(hash) ⇒ Object



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
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_hints.rb', line 61

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'
    raise TypeError, "value '%s' is not a Hash" % [hash['formElement']] unless hash['formElement'].is_a? Hash
    @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'
    raise TypeError, "value '%s' is not a Hash" % [hash['tooltip']] unless hash['tooltip'].is_a? Hash
    @tooltip = Ingenico::Connect::SDK::Domain::Product::PaymentProductFieldTooltip.new_from_hash(hash['tooltip'])
  end
end

#to_hHash

Returns:

  • (Hash)


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

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 unless @form_element.nil?
  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 unless @tooltip.nil?
  hash
end