Class: Ingenico::Connect::SDK::Domain::Product::PaymentProductFieldDisplayElement

Inherits:
Ingenico::Connect::SDK::DataObject show all
Defined in:
lib/ingenico/connect/sdk/domain/product/payment_product_field_display_element.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#idString



15
16
17
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_element.rb', line 15

def id
  @id
end

#labelString



15
16
17
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_element.rb', line 15

def label
  @label
end

#typeString



15
16
17
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_element.rb', line 15

def type
  @type
end

#valueString



15
16
17
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_element.rb', line 15

def value
  @value
end

Instance Method Details

#from_hash(hash) ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_element.rb', line 35

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



26
27
28
29
30
31
32
33
# File 'lib/ingenico/connect/sdk/domain/product/payment_product_field_display_element.rb', line 26

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