Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/generated/gobl/bill/delivery.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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<GOBL::CBC::Key>]
property :$tags, [GOBL::CBC::Key]

Expand Down
5 changes: 4 additions & 1 deletion lib/generated/gobl/bill/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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<GOBL::CBC::Key>]
property :$tags, [GOBL::CBC::Key]

Expand Down
5 changes: 5 additions & 0 deletions lib/generated/gobl/bill/line.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ class Line < GOBL::Object
# @return [Array<SubLine>]
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<GOBL::Org::Note>]
Expand Down
5 changes: 4 additions & 1 deletion lib/generated/gobl/bill/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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<GOBL::CBC::Key>]
property :$tags, [GOBL::CBC::Key]

Expand Down
5 changes: 5 additions & 0 deletions lib/generated/gobl/bill/ordering.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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<GOBL::Org::DocumentRef>]
Expand Down
5 changes: 4 additions & 1 deletion lib/generated/gobl/bill/payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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<GOBL::CBC::Key>]
property :$tags, [GOBL::CBC::Key]

Expand Down
5 changes: 0 additions & 5 deletions lib/generated/gobl/org/attachment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 6 additions & 1 deletion lib/generated/gobl/org/document_ref.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions lib/generated/gobl/org/item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ class Item < GOBL::Object
# @return [String]
property :description, String

# @!attribute [r] images
# Images associated with the item.
# @return [Array<GOBL::Org::Image>]
property :images, [GOBL::Org::Image]

# @!attribute [r] currency
# Currency used for the item's price.
# @return [GOBL::Currency::Code]
Expand Down
19 changes: 17 additions & 2 deletions lib/generated/gobl/org/person.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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<GOBL::Org::Identity>]
property :identities, [GOBL::Org::Identity]

# @!attribute [r] addresses
# Regular post addresses for where information should be sent if needed.
# @return [Array<GOBL::Org::Address>]
property :addresses, [GOBL::Org::Address]

# @!attribute [r] emails
# Electronic mail addresses that belong to the person.
# @return [Array<GOBL::Org::Email>]
Expand Down
9 changes: 9 additions & 0 deletions lib/generated/gobl/org/unit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
12 changes: 11 additions & 1 deletion lib/generated/gobl/tax/category_def.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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<KeyDef>]
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<RateDef>]
property :rates, [RateDef]

Expand Down
4 changes: 4 additions & 0 deletions lib/generated/gobl/tax/category_total.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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<RateTotal>]
property :rates, [RateTotal]
Expand Down
11 changes: 8 additions & 3 deletions lib/generated/gobl/tax/combo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
36 changes: 36 additions & 0 deletions lib/generated/gobl/tax/key_def.rb
Original file line number Diff line number Diff line change
@@ -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
23 changes: 9 additions & 14 deletions lib/generated/gobl/tax/rate_def.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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<GOBL::CBC::Key>]
property :keys, [GOBL::CBC::Key]

# @!attribute [r] name
# Human name of the rate
Expand All @@ -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<RateValueDef>]
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]
Expand Down
10 changes: 5 additions & 5 deletions lib/generated/gobl/tax/rate_total.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
7 changes: 1 addition & 6 deletions lib/generated/gobl/tax/rate_value_def.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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<GOBL::CBC::Key>]
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

Expand Down
Loading