Class: Ingenico::Direct::SDK::Domain::PaymentProductField
- Inherits:
-
Ingenico::Direct::SDK::DataObject
- Object
- Ingenico::Direct::SDK::DataObject
- Ingenico::Direct::SDK::Domain::PaymentProductField
- Defined in:
- lib/ingenico/direct/sdk/domain/payment_product_field.rb
Instance Attribute Summary collapse
-
#data_restrictions ⇒ Ingenico::Direct::SDK::Domain::PaymentProductFieldDataRestrictions
The current value of data_restrictions.
-
#display_hints ⇒ Ingenico::Direct::SDK::Domain::PaymentProductFieldDisplayHints
The current value of display_hints.
-
#id ⇒ String
The current value of id.
-
#type ⇒ String
The current value of type.
Instance Method Summary collapse
Methods inherited from Ingenico::Direct::SDK::DataObject
Instance Attribute Details
#data_restrictions ⇒ Ingenico::Direct::SDK::Domain::PaymentProductFieldDataRestrictions
Returns the current value of data_restrictions.
16 17 18 |
# File 'lib/ingenico/direct/sdk/domain/payment_product_field.rb', line 16 def data_restrictions @data_restrictions end |
#display_hints ⇒ Ingenico::Direct::SDK::Domain::PaymentProductFieldDisplayHints
Returns the current value of display_hints.
16 17 18 |
# File 'lib/ingenico/direct/sdk/domain/payment_product_field.rb', line 16 def display_hints @display_hints end |
#id ⇒ String
Returns the current value of id.
16 17 18 |
# File 'lib/ingenico/direct/sdk/domain/payment_product_field.rb', line 16 def id @id end |
#type ⇒ String
Returns the current value of type.
16 17 18 |
# File 'lib/ingenico/direct/sdk/domain/payment_product_field.rb', line 16 def type @type end |
Instance Method Details
#from_hash(hash) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/ingenico/direct/sdk/domain/payment_product_field.rb', line 32 def from_hash(hash) super if hash.key? 'dataRestrictions' raise TypeError, "value '%s' is not a Hash" % [hash['dataRestrictions']] unless hash['dataRestrictions'].is_a? Hash @data_restrictions = Ingenico::Direct::SDK::Domain::PaymentProductFieldDataRestrictions.new_from_hash(hash['dataRestrictions']) end if hash.key? 'displayHints' raise TypeError, "value '%s' is not a Hash" % [hash['displayHints']] unless hash['displayHints'].is_a? Hash @display_hints = Ingenico::Direct::SDK::Domain::PaymentProductFieldDisplayHints.new_from_hash(hash['displayHints']) end @id = hash['id'] if hash.key? 'id' @type = hash['type'] if hash.key? 'type' end |
#to_h ⇒ Hash
23 24 25 26 27 28 29 30 |
# File 'lib/ingenico/direct/sdk/domain/payment_product_field.rb', line 23 def to_h hash = super hash['dataRestrictions'] = @data_restrictions.to_h if @data_restrictions hash['displayHints'] = @display_hints.to_h if @display_hints hash['id'] = @id unless @id.nil? hash['type'] = @type unless @type.nil? hash end |