diff --git a/lib/generated/gobl/bill/delivery.rb b/lib/generated/gobl/bill/delivery.rb index 1f47241..9805822 100644 --- a/lib/generated/gobl/bill/delivery.rb +++ b/lib/generated/gobl/bill/delivery.rb @@ -26,12 +26,15 @@ class Delivery < GOBL::Object 'ES' => 'Spain', 'FR' => 'France', 'GB' => 'United Kingdom', + 'IE' => 'Ireland', 'IN' => 'India', 'IT' => 'Italy', 'MX' => 'Mexico', 'NL' => 'The Netherlands', 'PL' => 'Poland', 'PT' => 'Portugal', + 'SE' => 'Sweden', + 'SG' => 'Singapore', 'US' => 'United States of America' }.freeze @@ -46,7 +49,7 @@ class Delivery < GOBL::Object property :$addons, [GOBL::CBC::Key] # @!attribute [r] $tags - # Tags are used to help identify specific tax scenarios or requirements that will apply changes to the contents of the invoice. Tags by design should always be optional, it should always be possible to build a valid invoice without any tags. + # Tags are used to help identify specific tax scenarios or requirements that may apply changes to the contents of the document or imply a specific meaning. Converters may use tags to help identify specific situations that do not have a specific extension, for example; self-billed or partial invoices may be identified by their respective tags. # @return [Array] property :$tags, [GOBL::CBC::Key] diff --git a/lib/generated/gobl/bill/invoice.rb b/lib/generated/gobl/bill/invoice.rb index 5b47d3c..b19fa39 100644 --- a/lib/generated/gobl/bill/invoice.rb +++ b/lib/generated/gobl/bill/invoice.rb @@ -26,12 +26,15 @@ class Invoice < GOBL::Object 'ES' => 'Spain', 'FR' => 'France', 'GB' => 'United Kingdom', + 'IE' => 'Ireland', 'IN' => 'India', 'IT' => 'Italy', 'MX' => 'Mexico', 'NL' => 'The Netherlands', 'PL' => 'Poland', 'PT' => 'Portugal', + 'SE' => 'Sweden', + 'SG' => 'Singapore', 'US' => 'United States of America' }.freeze @@ -46,7 +49,7 @@ class Invoice < GOBL::Object property :$addons, [GOBL::CBC::Key] # @!attribute [r] $tags - # Tags are used to help identify specific tax scenarios or requirements that will apply changes to the contents of the invoice. Tags by design should always be optional, it should always be possible to build a valid invoice without any tags. + # Tags are used to help identify specific tax scenarios or requirements that may apply changes to the contents of the document or imply a specific meaning. Converters may use tags to help identify specific situations that do not have a specific extension, for example; self-billed or partial invoices may be identified by their respective tags. # @return [Array] property :$tags, [GOBL::CBC::Key] diff --git a/lib/generated/gobl/bill/line.rb b/lib/generated/gobl/bill/line.rb index aee02ae..e31a96e 100644 --- a/lib/generated/gobl/bill/line.rb +++ b/lib/generated/gobl/bill/line.rb @@ -89,6 +89,11 @@ class Line < GOBL::Object # @return [Array] property :substituted, [SubLine] + # @!attribute [r] seller + # Seller of the item if different from the supplier or ordering seller. This can be useful for marketplace or drop-ship scenarios in locations that require the original seller to be indicated. + # @return [GOBL::Org::Party] + property :seller, GOBL::Org::Party + # @!attribute [r] notes # Set of specific notes for this line that may be required for clarification. # @return [Array] diff --git a/lib/generated/gobl/bill/order.rb b/lib/generated/gobl/bill/order.rb index 2be994a..bb875ef 100644 --- a/lib/generated/gobl/bill/order.rb +++ b/lib/generated/gobl/bill/order.rb @@ -26,12 +26,15 @@ class Order < GOBL::Object 'ES' => 'Spain', 'FR' => 'France', 'GB' => 'United Kingdom', + 'IE' => 'Ireland', 'IN' => 'India', 'IT' => 'Italy', 'MX' => 'Mexico', 'NL' => 'The Netherlands', 'PL' => 'Poland', 'PT' => 'Portugal', + 'SE' => 'Sweden', + 'SG' => 'Singapore', 'US' => 'United States of America' }.freeze @@ -46,7 +49,7 @@ class Order < GOBL::Object property :$addons, [GOBL::CBC::Key] # @!attribute [r] $tags - # Tags are used to help identify specific tax scenarios or requirements that will apply changes to the contents of the invoice. Tags by design should always be optional, it should always be possible to build a valid invoice without any tags. + # Tags are used to help identify specific tax scenarios or requirements that may apply changes to the contents of the document or imply a specific meaning. Converters may use tags to help identify specific situations that do not have a specific extension, for example; self-billed or partial invoices may be identified by their respective tags. # @return [Array] property :$tags, [GOBL::CBC::Key] diff --git a/lib/generated/gobl/bill/ordering.rb b/lib/generated/gobl/bill/ordering.rb index 802e1e5..6e8356d 100644 --- a/lib/generated/gobl/bill/ordering.rb +++ b/lib/generated/gobl/bill/ordering.rb @@ -42,6 +42,11 @@ class Ordering < GOBL::Object # @return [GOBL::Org::Party] property :seller, GOBL::Org::Party + # @!attribute [r] issuer + # Issuer represents a third party responsible for issuing the invoice, but is not responsible for tax. Some tax regimes and formats require this field. + # @return [GOBL::Org::Party] + property :issuer, GOBL::Org::Party + # @!attribute [r] projects # Projects this invoice refers to. # @return [Array] diff --git a/lib/generated/gobl/bill/payment.rb b/lib/generated/gobl/bill/payment.rb index 98184f1..0b5690c 100644 --- a/lib/generated/gobl/bill/payment.rb +++ b/lib/generated/gobl/bill/payment.rb @@ -26,12 +26,15 @@ class Payment < GOBL::Object 'ES' => 'Spain', 'FR' => 'France', 'GB' => 'United Kingdom', + 'IE' => 'Ireland', 'IN' => 'India', 'IT' => 'Italy', 'MX' => 'Mexico', 'NL' => 'The Netherlands', 'PL' => 'Poland', 'PT' => 'Portugal', + 'SE' => 'Sweden', + 'SG' => 'Singapore', 'US' => 'United States of America' }.freeze @@ -46,7 +49,7 @@ class Payment < GOBL::Object property :$addons, [GOBL::CBC::Key] # @!attribute [r] $tags - # Tags are used to help identify specific tax scenarios or requirements that will apply changes to the contents of the invoice. Tags by design should always be optional, it should always be possible to build a valid invoice without any tags. + # Tags are used to help identify specific tax scenarios or requirements that may apply changes to the contents of the document or imply a specific meaning. Converters may use tags to help identify specific situations that do not have a specific extension, for example; self-billed or partial invoices may be identified by their respective tags. # @return [Array] property :$tags, [GOBL::CBC::Key] diff --git a/lib/generated/gobl/org/attachment.rb b/lib/generated/gobl/org/attachment.rb index ae54254..1374bce 100644 --- a/lib/generated/gobl/org/attachment.rb +++ b/lib/generated/gobl/org/attachment.rb @@ -52,11 +52,6 @@ class Attachment < GOBL::Object # MIME type of the attachment. # @return [String] property :mime, String - - # @!attribute [r] data - # Data is the base64 encoded data of the attachment directly embedded inside the GOBL document. This should only be used when the URL cannot be used as it can dramatically increase the size of the JSON document, thus effecting usability and performance. - # @return [String] - property :data, String end end end diff --git a/lib/generated/gobl/org/document_ref.rb b/lib/generated/gobl/org/document_ref.rb index 14fd415..659a5de 100644 --- a/lib/generated/gobl/org/document_ref.rb +++ b/lib/generated/gobl/org/document_ref.rb @@ -17,8 +17,13 @@ class DocumentRef < GOBL::Object # @return [String] property :uuid, String + # @!attribute [r] schema + # Schema of the referenced document if different from that of the parent. + # @return [String] + property :schema, String + # @!attribute [r] type - # Type of the document referenced. + # Type of the document referenced according to the defined schema or that of the parent document. # @return [GOBL::CBC::Key] property :type, GOBL::CBC::Key diff --git a/lib/generated/gobl/org/item.rb b/lib/generated/gobl/org/item.rb index cc42675..7089a07 100644 --- a/lib/generated/gobl/org/item.rb +++ b/lib/generated/gobl/org/item.rb @@ -43,6 +43,11 @@ class Item < GOBL::Object # @return [String] property :description, String + # @!attribute [r] images + # Images associated with the item. + # @return [Array] + property :images, [GOBL::Org::Image] + # @!attribute [r] currency # Currency used for the item's price. # @return [GOBL::Currency::Code] diff --git a/lib/generated/gobl/org/person.rb b/lib/generated/gobl/org/person.rb index 425212f..e95cbdd 100644 --- a/lib/generated/gobl/org/person.rb +++ b/lib/generated/gobl/org/person.rb @@ -22,17 +22,32 @@ class Person < GOBL::Object # @return [String] property :label, String + # @!attribute [r] key + # Key used to identify the role of the person inside the context of the object. + # @return [GOBL::CBC::Key] + property :key, GOBL::CBC::Key + # @!attribute [r] name - # Complete details on the name of the person + # Complete details on the name of the person. # @return [GOBL::Org::Name] property :name, GOBL::Org::Name validates_presence_of :name # @!attribute [r] role - # What they do within an organization + # Role or job title of the responsibilities of the person within an organization. # @return [String] property :role, String + # @!attribute [r] identities + # Set of codes used to identify the person, such as ID numbers, social security, driving licenses, etc. that can be attributed to the individual. + # @return [Array] + property :identities, [GOBL::Org::Identity] + + # @!attribute [r] addresses + # Regular post addresses for where information should be sent if needed. + # @return [Array] + property :addresses, [GOBL::Org::Address] + # @!attribute [r] emails # Electronic mail addresses that belong to the person. # @return [Array] diff --git a/lib/generated/gobl/org/unit.rb b/lib/generated/gobl/org/unit.rb index 05298a6..8ef94bf 100644 --- a/lib/generated/gobl/org/unit.rb +++ b/lib/generated/gobl/org/unit.rb @@ -21,11 +21,20 @@ class Unit < String 't' => 'Metric tons', 'mm' => 'Milimetres', 'cm' => 'Centimetres', + 'dm' => 'A unit of length equal to one-tenth of a metre.', 'm' => 'Metres', 'km' => 'Kilometers', 'in' => 'Inches', 'ft' => 'Feet', + 'mm2' => 'Square millimetres', + 'cm2' => 'Square centimetres', + 'dm2' => 'Square decimetres', 'm2' => 'Square metres', + 'ac' => 'A unit of area equal to 43,560 square feet.', + 'ha' => 'A unit of area equal to 10,000 square metres.', + 'mm3' => 'Cubic millimetres', + 'cm3' => 'Cubic centimetres', + 'dm3' => 'Cubic decimetres', 'm3' => 'Cubic metres', 'ml' => 'Millilitres', 'cl' => 'Centilitres', diff --git a/lib/generated/gobl/tax/category_def.rb b/lib/generated/gobl/tax/category_def.rb index 5fcc19b..e615e49 100644 --- a/lib/generated/gobl/tax/category_def.rb +++ b/lib/generated/gobl/tax/category_def.rb @@ -39,8 +39,18 @@ class CategoryDef < GOBL::Object # @return [Boolean] property :retained, Boolean + # @!attribute [r] informative + # Informative when true implies that the tax amount will be calculated and reported but will not affect the invoice totals. Typically used for taxes that are embedded in the base amount or don't impact the final payable amount. + # @return [Boolean] + property :informative, Boolean + + # @!attribute [r] keys + # Specific tax definitions inside this category. + # @return [Array] + property :keys, [KeyDef] + # @!attribute [r] rates - # Specific tax definitions inside this category. Order is important. + # Rates defines the set of rates that can be used with this category. # @return [Array] property :rates, [RateDef] diff --git a/lib/generated/gobl/tax/category_total.rb b/lib/generated/gobl/tax/category_total.rb index 947e5f4..c473f20 100644 --- a/lib/generated/gobl/tax/category_total.rb +++ b/lib/generated/gobl/tax/category_total.rb @@ -21,6 +21,10 @@ class CategoryTotal < GOBL::Object # @return [Boolean] property :retained, Boolean + # @!attribute [r] informative + # @return [Boolean] + property :informative, Boolean + # @!attribute [r] rates # @return [Array] property :rates, [RateTotal] diff --git a/lib/generated/gobl/tax/combo.rb b/lib/generated/gobl/tax/combo.rb index 9806dfc..f20b9b5 100644 --- a/lib/generated/gobl/tax/combo.rb +++ b/lib/generated/gobl/tax/combo.rb @@ -23,18 +23,23 @@ class Combo < GOBL::Object # @return [GOBL::L10n::TaxCountryCode] property :country, GOBL::L10n::TaxCountryCode + # @!attribute [r] key + # Key helps determine the tax situation within the category. + # @return [GOBL::CBC::Key] + property :key, GOBL::CBC::Key + # @!attribute [r] rate - # Rate within a category to apply. + # Rate within a category and for a given key to apply. # @return [GOBL::CBC::Key] property :rate, GOBL::CBC::Key # @!attribute [r] percent - # Percent defines the percentage set manually or determined from the rate key (calculated if rate present). A nil percent implies that this tax combo is **exempt** from tax. + # Percent defines the percentage set manually or determined from the key. A nil percent implies that this tax combo is either exempt or not-subject. # @return [GOBL::Num::Percentage] property :percent, GOBL::Num::Percentage # @!attribute [r] surcharge - # Some countries require an additional surcharge (calculated if rate present). + # Some countries require an additional surcharge (may be determined if key present). # @return [GOBL::Num::Percentage] property :surcharge, GOBL::Num::Percentage diff --git a/lib/generated/gobl/tax/key_def.rb b/lib/generated/gobl/tax/key_def.rb new file mode 100644 index 0000000..ecc9b06 --- /dev/null +++ b/lib/generated/gobl/tax/key_def.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +## +## DO NOT EDIT - This file was generated automatically. +## +## + +module GOBL + module Tax + # KeyDef defines a key that can be used inside a tax category. + class KeyDef < GOBL::Object + # The Schema ID of the GOBL KeyDef structure + SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime-def#/$defs/KeyDef' + + # @!attribute [r] key + # Key identifies this rate within the system + # @return [GOBL::CBC::Key] + property :key, GOBL::CBC::Key + + # @!attribute [r] name + # Human name of the rate set + # @return [GOBL::I18n::String] + property :name, GOBL::I18n::String + + # @!attribute [r] desc + # Useful description of the rate. + # @return [GOBL::I18n::String] + property :desc, GOBL::I18n::String + + # @!attribute [r] no_percent + # NoPercent when true implies that the rate when used in a tax Combo should not define a percent value. + # @return [Boolean] + property :no_percent, Boolean + end + end +end diff --git a/lib/generated/gobl/tax/rate_def.rb b/lib/generated/gobl/tax/rate_def.rb index a9f60b3..755f01b 100644 --- a/lib/generated/gobl/tax/rate_def.rb +++ b/lib/generated/gobl/tax/rate_def.rb @@ -12,11 +12,16 @@ class RateDef < GOBL::Object # The Schema ID of the GOBL RateDef structure SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime-def#/$defs/RateDef' - # @!attribute [r] key - # Key identifies this rate within the system + # @!attribute [r] rate + # Rate defines the key for which this rate applies. # @return [GOBL::CBC::Key] - property :key, GOBL::CBC::Key - validates_presence_of :key + property :rate, GOBL::CBC::Key + validates_presence_of :rate + + # @!attribute [r] keys + # Keys identifies the set of tax keys defined in the category that this rate can be used with. + # @return [Array] + property :keys, [GOBL::CBC::Key] # @!attribute [r] name # Human name of the rate @@ -29,21 +34,11 @@ class RateDef < GOBL::Object # @return [GOBL::I18n::String] property :desc, GOBL::I18n::String - # @!attribute [r] exempt - # Exempt when true implies that the rate when used in a tax Combo should not define a percent value. - # @return [Boolean] - property :exempt, Boolean - # @!attribute [r] values # Values contains a list of Value objects that contain the current and historical percentage values for the rate and additional filters. Order is important, newer values should come before older values. # @return [Array] property :values, [RateValueDef] - # @!attribute [r] ext - # Extensions key-value pair that will be copied to the tax combo if this rate is used. - # @return [GOBL::Tax::Extensions] - property :ext, GOBL::Tax::Extensions - # @!attribute [r] meta # Meta contains additional information about the rate that is relevant for local frequently used implementations. # @return [GOBL::CBC::Meta] diff --git a/lib/generated/gobl/tax/rate_total.rb b/lib/generated/gobl/tax/rate_total.rb index b2d7a0c..a51d81f 100644 --- a/lib/generated/gobl/tax/rate_total.rb +++ b/lib/generated/gobl/tax/rate_total.rb @@ -12,16 +12,16 @@ class RateTotal < GOBL::Object # The Schema ID of the GOBL RateTotal structure SCHEMA_ID = 'https://gobl.org/draft-0/tax/total#/$defs/RateTotal' - # @!attribute [r] key - # Optional rate key is required when grouping. - # @return [GOBL::CBC::Key] - property :key, GOBL::CBC::Key - # @!attribute [r] country # Country code override when issuing with taxes applied from different countries, it'd be very strange to mix rates from different countries, but in theory this would be possible. # @return [GOBL::L10n::TaxCountryCode] property :country, GOBL::L10n::TaxCountryCode + # @!attribute [r] key + # Tax key if supported by the category. + # @return [GOBL::CBC::Key] + property :key, GOBL::CBC::Key + # @!attribute [r] ext # If the rate is defined with extensions, they'll be used to group by also. # @return [GOBL::Tax::Extensions] diff --git a/lib/generated/gobl/tax/rate_value_def.rb b/lib/generated/gobl/tax/rate_value_def.rb index b4705c7..104157d 100644 --- a/lib/generated/gobl/tax/rate_value_def.rb +++ b/lib/generated/gobl/tax/rate_value_def.rb @@ -12,13 +12,8 @@ class RateValueDef < GOBL::Object # The Schema ID of the GOBL RateValueDef structure SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime-def#/$defs/RateValueDef' - # @!attribute [r] tags - # Only apply this rate if one of the tags is present in the invoice. - # @return [Array] - property :tags, [GOBL::CBC::Key] - # @!attribute [r] ext - # Ext map of keys that can be used to filter to determine if the rate applies. + # Only apply this rate if one of the tags is present in the invoice. Tags []cbc.Key `json:"tags,omitempty" jsonschema:"title=Tags"` Ext map of keys that can be used to filter to determine if the rate applies. # @return [GOBL::Tax::Extensions] property :ext, GOBL::Tax::Extensions diff --git a/lib/generated/gobl/tax/scenario.rb b/lib/generated/gobl/tax/scenario.rb index fcd6480..1f51d72 100644 --- a/lib/generated/gobl/tax/scenario.rb +++ b/lib/generated/gobl/tax/scenario.rb @@ -17,6 +17,11 @@ class Scenario < GOBL::Object # @return [GOBL::I18n::String] property :name, GOBL::I18n::String + # @!attribute [r] desc + # Description of the scenario for documentation purposes. + # @return [GOBL::I18n::String] + property :desc, GOBL::I18n::String + # @!attribute [r] type # Type of document, if present. # @return [Array]