Class: GOBL::Bill::Line

Inherits:
Object show all
Defined in:
lib/gobl/bill/line.rb

Overview

Line is a single row in an invoice.

Constant Summary collapse

SCHEMA_ID =

The Schema ID of the GOBL Line structure

'https://gobl.org/draft-0/bill/invoice#/$defs/Line'

Constants included from Hashme

Hashme::Boolean

Instance Attribute Summary collapse

Method Summary

Methods inherited from Object

new

Methods inherited from Struct

#as_json, from_data, from_json!, #to_json

Instance Attribute Details

#chargesArray<LineCharge> (readonly)

Charges applied to this line

Returns:



51
# File 'lib/gobl/bill/line.rb', line 51

property :charges, [LineCharge]

#discountsArray<LineDiscount> (readonly)

Discounts applied to this line

Returns:



46
# File 'lib/gobl/bill/line.rb', line 46

property :discounts, [LineDiscount]

#iInteger (readonly)

Line number inside the parent (calculated)

Returns:

  • (Integer)


24
# File 'lib/gobl/bill/line.rb', line 24

property :i, Integer

#itemGOBL::Org::Item (readonly)

Details about what is being sold

Returns:



35
# File 'lib/gobl/bill/line.rb', line 35

property :item, GOBL::Org::Item

#notesArray<GOBL::CBC::Note> (readonly)

Set of specific notes for this line that may be required for clarification.

Returns:



66
# File 'lib/gobl/bill/line.rb', line 66

property :notes, [GOBL::CBC::Note]

#quantityGOBL::Num::Amount (readonly)

Number of items

Returns:



29
# File 'lib/gobl/bill/line.rb', line 29

property :quantity, GOBL::Num::Amount

#sumGOBL::Num::Amount (readonly)

Result of quantity multiplied by the item’s price (calculated)

Returns:



41
# File 'lib/gobl/bill/line.rb', line 41

property :sum, GOBL::Num::Amount

#taxesGOBL::Tax::Set (readonly)

Map of taxes to be applied and used in the invoice totals

Returns:



56
# File 'lib/gobl/bill/line.rb', line 56

property :taxes, GOBL::Tax::Set

#totalGOBL::Num::Amount (readonly)

Total line amount after applying discounts to the sum (calculated).

Returns:



61
# File 'lib/gobl/bill/line.rb', line 61

property :total, GOBL::Num::Amount

#uuidGOBL::UUID::UUID (readonly)

Unique identifier for this line

Returns:



19
# File 'lib/gobl/bill/line.rb', line 19

property :uuid, GOBL::UUID::UUID