Class: OnlinePayments::SDK::Domain::PaymentProductFieldDisplayElement

Inherits:
DataObject
  • Object
show all
Defined in:
lib/onlinepayments/sdk/domain/payment_product_field_display_element.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#idString

Returns the current value of id.

Returns:

  • (String)

    the current value of id



13
14
15
# File 'lib/onlinepayments/sdk/domain/payment_product_field_display_element.rb', line 13

def id
  @id
end

#labelString

Returns the current value of label.

Returns:

  • (String)

    the current value of label



13
14
15
# File 'lib/onlinepayments/sdk/domain/payment_product_field_display_element.rb', line 13

def label
  @label
end

#typeString

Returns the current value of type.

Returns:

  • (String)

    the current value of type



13
14
15
# File 'lib/onlinepayments/sdk/domain/payment_product_field_display_element.rb', line 13

def type
  @type
end

#valueString

Returns the current value of value.

Returns:

  • (String)

    the current value of value



13
14
15
# File 'lib/onlinepayments/sdk/domain/payment_product_field_display_element.rb', line 13

def value
  @value
end

Instance Method Details

#from_hash(hash) ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/onlinepayments/sdk/domain/payment_product_field_display_element.rb', line 33

def from_hash(hash)
  super
  if hash.has_key? 'id'
    @id = hash['id']
  end
  if hash.has_key? 'label'
    @label = hash['label']
  end
  if hash.has_key? 'type'
    @type = hash['type']
  end
  if hash.has_key? 'value'
    @value = hash['value']
  end
end

#to_hHash

Returns:

  • (Hash)


24
25
26
27
28
29
30
31
# File 'lib/onlinepayments/sdk/domain/payment_product_field_display_element.rb', line 24

def to_h
  hash = super
  hash['id'] = @id unless @id.nil?
  hash['label'] = @label unless @label.nil?
  hash['type'] = @type unless @type.nil?
  hash['value'] = @value unless @value.nil?
  hash
end