Class: GOBL::Org::Unit

Inherits:
String
  • Object
show all
Includes:
Enum
Defined in:
lib/generated/gobl/org/unit.rb

Overview

Unit describes how the quantity of the product should be interpreted.

Constant Summary collapse

SCHEMA_ID =

The Schema ID of the GOBL Unit structure

'https://gobl.org/draft-0/org/unit'
ENUM =
{
  'g' => 'Metric grams',
  'kg' => 'Metric kilograms',
  't' => 'Metric tons',
  'mm' => 'Milimetres',
  'cm' => 'Centimetres',
  'm' => 'Metres',
  'km' => 'Kilometers',
  'in' => 'Inches',
  'ft' => 'Feet',
  'm2' => 'Square metres',
  'm3' => 'Cubic metres',
  'cl' => 'Centilitres',
  'l' => 'Litres',
  'w' => 'Watts',
  'kw' => 'Kilowatts',
  'kwh' => 'Kilowatt Hours',
  'day' => 'Days',
  's' => 'Seconds',
  'h' => 'Hours',
  'min' => 'Minutes',
  'piece' => 'Pieces',
  'item' => 'Items',
  'service' => 'Service Units',
  'activity' => 'Activity',
  'bag' => 'Bags',
  'box' => 'Boxes',
  'bin' => 'Bins',
  'can' => 'Cans',
  'tub' => 'Tubs',
  'case' => 'Cases',
  'tray' => 'Trays',
  'portion' => 'Portions',
  'dozen' => 'Dozens',
  'roll' => 'Rolls',
  'carton' => 'Cartons',
  'cylinder' => 'Cylinders',
  'barrel' => 'Barrels',
  'jerrican' => 'Jerricans',
  'carboy' => 'Carboys',
  'demijohn' => 'Demijohn',
  'bottle' => 'Bottles',
  '6pack' => 'Six Packs',
  'canister' => 'Canisters',
  'pkg' => 'Packages',
  'bunch' => 'Bunches',
  'tetrabrik' => 'Tetra-Briks',
  'pallet' => 'Pallets',
  'reel' => 'Reels',
  'sack' => 'Sacks',
  'sheet' => 'Sheets',
  'envelope' => 'Envelopes'
}.freeze

Instance Method Summary collapse

Methods included from Enum

#description, included, #valid_enum_value

Instance Method Details

#strict_enum?Boolean

Returns:

  • (Boolean)


72
73
74
# File 'lib/generated/gobl/org/unit.rb', line 72

def strict_enum?
  false
end