class Ingenico::Connect::SDK::Domain::Product::PaymentProductFieldDisplayHints
@attr [true/false] always_show
@attr [Integer] display_order
@attr [Ingenico::Connect::SDK::Domain::Product::PaymentProductFieldFormElement] form_element
@attr [String] label @attr [String] link @attr [String] mask @attr [true/false] obfuscate @attr [String] placeholder_label
@attr [String] preferred_input_type
@attr [Ingenico::Connect::SDK::Domain::Product::PaymentProductFieldTooltip] tooltip
Attributes
always_show[RW]
display_order[RW]
form_element[RW]
label[RW]
link[RW]
mask[RW]
obfuscate[RW]
placeholder_label[RW]
preferred_input_type[RW]
tooltip[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Connect::SDK::DataObject#from_hash
# 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_h()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Connect::SDK::DataObject#to_h
# 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