Class: Worldline::Connect::SDK::V1::Domain::PaymentProductField
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::PaymentProductField
- Defined in:
- lib/worldline/connect/sdk/v1/domain/payment_product_field.rb
Instance Attribute Summary collapse
-
#data_restrictions ⇒ Worldline::Connect::SDK::V1::Domain::PaymentProductFieldDataRestrictions
The current value of data_restrictions.
-
#display_hints ⇒ Worldline::Connect::SDK::V1::Domain::PaymentProductFieldDisplayHints
The current value of display_hints.
-
#id ⇒ String
The current value of id.
-
#type ⇒ String
The current value of type.
-
#used_for_lookup ⇒ true/false
The current value of used_for_lookup.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#data_restrictions ⇒ Worldline::Connect::SDK::V1::Domain::PaymentProductFieldDataRestrictions
Returns the current value of data_restrictions.
19 20 21 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field.rb', line 19 def data_restrictions @data_restrictions end |
#display_hints ⇒ Worldline::Connect::SDK::V1::Domain::PaymentProductFieldDisplayHints
Returns the current value of display_hints.
19 20 21 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field.rb', line 19 def display_hints @display_hints end |
#id ⇒ String
Returns the current value of id.
19 20 21 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field.rb', line 19 def id @id end |
#type ⇒ String
Returns the current value of type.
19 20 21 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field.rb', line 19 def type @type end |
#used_for_lookup ⇒ true/false
Returns the current value of used_for_lookup.
19 20 21 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field.rb', line 19 def used_for_lookup @used_for_lookup end |
Instance Method Details
#from_hash(hash) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field.rb', line 42 def from_hash(hash) super if hash.has_key? 'dataRestrictions' raise TypeError, "value '%s' is not a Hash" % [hash['dataRestrictions']] unless hash['dataRestrictions'].is_a? Hash @data_restrictions = Worldline::Connect::SDK::V1::Domain::PaymentProductFieldDataRestrictions.new_from_hash(hash['dataRestrictions']) end if hash.has_key? 'displayHints' raise TypeError, "value '%s' is not a Hash" % [hash['displayHints']] unless hash['displayHints'].is_a? Hash @display_hints = Worldline::Connect::SDK::V1::Domain::PaymentProductFieldDisplayHints.new_from_hash(hash['displayHints']) end if hash.has_key? 'id' @id = hash['id'] end if hash.has_key? 'type' @type = hash['type'] end if hash.has_key? 'usedForLookup' @used_for_lookup = hash['usedForLookup'] end end |
#to_h ⇒ Hash
32 33 34 35 36 37 38 39 40 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field.rb', line 32 def to_h hash = super hash['dataRestrictions'] = @data_restrictions.to_h unless @data_restrictions.nil? hash['displayHints'] = @display_hints.to_h unless @display_hints.nil? hash['id'] = @id unless @id.nil? hash['type'] = @type unless @type.nil? hash['usedForLookup'] = @used_for_lookup unless @used_for_lookup.nil? hash end |