Class: GOBL::Org::Item

Inherits:
GOBL::Object show all
Defined in:
lib/gobl/org/item.rb

Overview

Item is used to describe a single product or service.

Constant Summary collapse

SCHEMA_ID =

The Schema ID of the GOBL Item structure

'https://gobl.org/draft-0/org/item'

Constants included from Hashme

Hashme::Boolean

Instance Attribute Summary collapse

Method Summary

Methods inherited from GOBL::Object

new

Methods inherited from Struct

#as_json, from_data, from_json!, #to_json

Instance Attribute Details

#codesArray<ItemCode> (readonly)

List of additional codes, IDs, or SKUs which can be used to identify the item. The should be agreed upon between supplier and customer.

Returns:



56
# File 'lib/gobl/org/item.rb', line 56

property :codes, [ItemCode]

#currencyString (readonly)

Currency used for the item’s price.

Returns:

  • (String)


40
# File 'lib/gobl/org/item.rb', line 40

property :currency, String

#descString (readonly)

Detailed description

Returns:

  • (String)


35
# File 'lib/gobl/org/item.rb', line 35

property :desc, String

#metaGOBL::CBC::Meta (readonly)

Additional meta information that may be useful

Returns:



66
# File 'lib/gobl/org/item.rb', line 66

property :meta, GOBL::CBC::Meta

#nameString (readonly)

Brief name of the item

Returns:

  • (String)


29
# File 'lib/gobl/org/item.rb', line 29

property :name, String

#originGOBL::L10n::CountryCode (readonly)

Country code of where this item was from originally.



61
# File 'lib/gobl/org/item.rb', line 61

property :origin, GOBL::L10n::CountryCode

#priceGOBL::Num::Amount (readonly)

Base price of a single unit to be sold.

Returns:



45
# File 'lib/gobl/org/item.rb', line 45

property :price, GOBL::Num::Amount

#refString (readonly)

Primary reference code that identifies this item. Additional codes can be provided in the ‘codes’ field.

Returns:

  • (String)


24
# File 'lib/gobl/org/item.rb', line 24

property :ref, String

#unitGOBL::Org::Unit (readonly)

Unit of measure.

Returns:



51
# File 'lib/gobl/org/item.rb', line 51

property :unit, GOBL::Org::Unit

#uuidGOBL::UUID::UUID (readonly)

Unique identify of this item independent of the Supplier IDs

Returns:



19
# File 'lib/gobl/org/item.rb', line 19

property :uuid, GOBL::UUID::UUID