Class: Worldline::Connect::SDK::V1::Domain::PaymentProductField

Inherits:
Domain::DataObject show all
Defined in:
lib/worldline/connect/sdk/v1/domain/payment_product_field.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#data_restrictionsWorldline::Connect::SDK::V1::Domain::PaymentProductFieldDataRestrictions

Returns the current value of data_restrictions.

Returns:



19
20
21
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field.rb', line 19

def data_restrictions
  @data_restrictions
end

#display_hintsWorldline::Connect::SDK::V1::Domain::PaymentProductFieldDisplayHints

Returns the current value of display_hints.

Returns:



19
20
21
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_field.rb', line 19

def display_hints
  @display_hints
end

#idString

Returns the current value of id.

Returns:

  • (String)

    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

#typeString

Returns the current value of type.

Returns:

  • (String)

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

Returns the current value of used_for_lookup.

Returns:

  • (true/false)

    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_hHash

Returns:

  • (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