Class: Worldline::Connect::SDK::V1::Domain::LineItemInvoiceData

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#descriptionString

Returns the current value of description.

Returns:

  • (String)

    the current value of description



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/line_item_invoice_data.rb', line 17

def description
  @description
end

#merchant_linenumberString

Returns the current value of merchant_linenumber.

Returns:

  • (String)

    the current value of merchant_linenumber



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/line_item_invoice_data.rb', line 17

def merchant_linenumber
  @merchant_linenumber
end

#merchant_pagenumberString

Returns the current value of merchant_pagenumber.

Returns:

  • (String)

    the current value of merchant_pagenumber



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/line_item_invoice_data.rb', line 17

def merchant_pagenumber
  @merchant_pagenumber
end

#nr_of_itemsString

Returns the current value of nr_of_items.

Returns:

  • (String)

    the current value of nr_of_items



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/line_item_invoice_data.rb', line 17

def nr_of_items
  @nr_of_items
end

#price_per_itemInteger

Returns the current value of price_per_item.

Returns:

  • (Integer)

    the current value of price_per_item



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/line_item_invoice_data.rb', line 17

def price_per_item
  @price_per_item
end

Instance Method Details

#from_hash(hash) ⇒ Object



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/worldline/connect/sdk/v1/domain/line_item_invoice_data.rb', line 40

def from_hash(hash)
  super
  if hash.has_key? 'description'
    @description = hash['description']
  end
  if hash.has_key? 'merchantLinenumber'
    @merchant_linenumber = hash['merchantLinenumber']
  end
  if hash.has_key? 'merchantPagenumber'
    @merchant_pagenumber = hash['merchantPagenumber']
  end
  if hash.has_key? 'nrOfItems'
    @nr_of_items = hash['nrOfItems']
  end
  if hash.has_key? 'pricePerItem'
    @price_per_item = hash['pricePerItem']
  end
end

#to_hHash

Returns:

  • (Hash)


30
31
32
33
34
35
36
37
38
# File 'lib/worldline/connect/sdk/v1/domain/line_item_invoice_data.rb', line 30

def to_h
  hash = super
  hash['description'] = @description unless @description.nil?
  hash['merchantLinenumber'] = @merchant_linenumber unless @merchant_linenumber.nil?
  hash['merchantPagenumber'] = @merchant_pagenumber unless @merchant_pagenumber.nil?
  hash['nrOfItems'] = @nr_of_items unless @nr_of_items.nil?
  hash['pricePerItem'] = @price_per_item unless @price_per_item.nil?
  hash
end