gobl 0.4.1 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data/regimes/co.json +14696 -0
- data/data/{tax/ES.json → regimes/es.json} +57 -57
- data/data/{tax/FR.json → regimes/fr.json} +1 -1
- data/data/{tax/GB.json → regimes/gb.json} +1 -1
- data/data/{tax/NL.json → regimes/nl.json} +1 -1
- data/lib/extensions.rb +1 -1
- data/lib/gobl/bill/advances.rb +1 -1
- data/lib/gobl/bill/charge.rb +3 -3
- data/lib/gobl/bill/delivery.rb +1 -1
- data/lib/gobl/bill/discount.rb +3 -3
- data/lib/gobl/bill/exchange_rates.rb +1 -1
- data/lib/gobl/bill/invoice.rb +5 -5
- data/lib/gobl/bill/invoice_type.rb +1 -1
- data/lib/gobl/bill/line.rb +3 -3
- data/lib/gobl/bill/line_charge.rb +1 -1
- data/lib/gobl/bill/line_discount.rb +1 -1
- data/lib/gobl/bill/ordering.rb +1 -1
- data/lib/gobl/bill/outlay.rb +1 -1
- data/lib/gobl/bill/payment.rb +1 -1
- data/lib/gobl/bill/preceding.rb +5 -5
- data/lib/gobl/bill/scheme_keys.rb +2 -2
- data/lib/gobl/bill/tax.rb +5 -5
- data/lib/gobl/bill/totals.rb +1 -1
- data/lib/gobl/cal/date.rb +1 -1
- data/lib/gobl/cal/period.rb +1 -1
- data/lib/gobl/{org → cbc}/code.rb +3 -3
- data/lib/gobl/{org → cbc}/key.rb +3 -3
- data/lib/gobl/{org → cbc}/meta.rb +2 -2
- data/lib/gobl/{org → cbc}/note.rb +3 -3
- data/lib/gobl/{org → cbc}/note_key.rb +3 -3
- data/lib/gobl/{org → cbc}/stamp.rb +5 -5
- data/lib/gobl/currency/code.rb +1 -1
- data/lib/gobl/currency/exchange_rate.rb +1 -1
- data/lib/gobl/document.rb +1 -1
- data/lib/gobl/dsig/digest.rb +1 -1
- data/lib/gobl/dsig/signature.rb +1 -1
- data/lib/gobl/envelope.rb +1 -1
- data/lib/gobl/header.rb +5 -5
- data/lib/gobl/i18n/string.rb +1 -1
- data/lib/gobl/l10n/code.rb +1 -1
- data/lib/gobl/l10n/country_code.rb +1 -1
- data/lib/gobl/note/message.rb +3 -3
- data/lib/gobl/org/address.rb +5 -6
- data/lib/gobl/org/coordinates.rb +1 -1
- data/lib/gobl/org/email.rb +3 -3
- data/lib/gobl/org/inbox.rb +5 -5
- data/lib/gobl/org/item.rb +3 -3
- data/lib/gobl/org/item_code.rb +1 -1
- data/lib/gobl/org/name.rb +3 -3
- data/lib/gobl/org/party.rb +5 -5
- data/lib/gobl/org/person.rb +3 -3
- data/lib/gobl/org/registration.rb +1 -1
- data/lib/gobl/org/telephone.rb +1 -1
- data/lib/gobl/org/unit.rb +1 -1
- data/lib/gobl/pay/advance.rb +1 -1
- data/lib/gobl/pay/card.rb +1 -1
- data/lib/gobl/pay/credit_transfer.rb +1 -1
- data/lib/gobl/pay/direct_debit.rb +1 -1
- data/lib/gobl/pay/due_date.rb +1 -1
- data/lib/gobl/pay/instructions.rb +3 -3
- data/lib/gobl/pay/method_key.rb +1 -1
- data/lib/gobl/pay/online.rb +1 -1
- data/lib/gobl/pay/term_key.rb +1 -1
- data/lib/gobl/pay/terms.rb +1 -1
- data/lib/gobl/tax/category.rb +4 -4
- data/lib/gobl/tax/category_total.rb +3 -3
- data/lib/gobl/tax/combo.rb +5 -5
- data/lib/gobl/{org/tax_identity.rb → tax/identity.rb} +11 -11
- data/lib/gobl/tax/rate.rb +4 -4
- data/lib/gobl/tax/rate_total.rb +3 -3
- data/lib/gobl/tax/rate_total_surcharge.rb +1 -1
- data/lib/gobl/tax/rate_value.rb +2 -2
- data/lib/gobl/tax/{region.rb → regime.rb} +14 -14
- data/lib/gobl/tax/scheme.rb +8 -8
- data/lib/gobl/tax/schemes.rb +1 -1
- data/lib/gobl/tax/set.rb +1 -1
- data/lib/gobl/{org → tax}/source_key.rb +3 -3
- data/lib/gobl/tax/total.rb +1 -1
- data/lib/gobl/tax/zone.rb +43 -0
- data/lib/gobl/uuid/uuid.rb +1 -1
- data/lib/gobl/version.rb +1 -1
- data/lib/gobl.rb +2 -1
- data/lib/gobl_extensions/tax/regime_helper.rb +35 -0
- metadata +18 -19
- data/data/tax/CO.json +0 -10212
- data/lib/gobl/tax/localities.rb +0 -14
- data/lib/gobl/tax/locality.rb +0 -34
- data/lib/gobl_extensions/tax/region_helper.rb +0 -35
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -56,8 +56,8 @@ module GOBL
|
|
56
56
|
|
57
57
|
# @!attribute [r] meta
|
58
58
|
# Non-structured additional data that may be useful.
|
59
|
-
# @return [GOBL::
|
60
|
-
property :meta, GOBL::
|
59
|
+
# @return [GOBL::CBC::Meta]
|
60
|
+
property :meta, GOBL::CBC::Meta
|
61
61
|
end
|
62
62
|
end
|
63
63
|
end
|
data/lib/gobl/pay/method_key.rb
CHANGED
data/lib/gobl/pay/online.rb
CHANGED
data/lib/gobl/pay/term_key.rb
CHANGED
data/lib/gobl/pay/terms.rb
CHANGED
data/lib/gobl/tax/category.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -11,11 +11,11 @@ module GOBL
|
|
11
11
|
# Category contains the definition of a general type of tax inside a region.
|
12
12
|
class Category < GOBL::Object
|
13
13
|
# The Schema ID of the GOBL Category structure
|
14
|
-
SCHEMA_ID = 'https://gobl.org/draft-0/tax/
|
14
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/Category'
|
15
15
|
|
16
16
|
# @!attribute [r] code
|
17
|
-
# @return [GOBL::
|
18
|
-
property :code, GOBL::
|
17
|
+
# @return [GOBL::CBC::Code]
|
18
|
+
property :code, GOBL::CBC::Code
|
19
19
|
validates :code, presence: true
|
20
20
|
|
21
21
|
# @!attribute [r] name
|
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -14,8 +14,8 @@ module GOBL
|
|
14
14
|
SCHEMA_ID = 'https://gobl.org/draft-0/tax/total#/$defs/CategoryTotal'
|
15
15
|
|
16
16
|
# @!attribute [r] code
|
17
|
-
# @return [GOBL::
|
18
|
-
property :code, GOBL::
|
17
|
+
# @return [GOBL::CBC::Code]
|
18
|
+
property :code, GOBL::CBC::Code
|
19
19
|
validates :code, presence: true
|
20
20
|
|
21
21
|
# @!attribute [r] retained
|
data/lib/gobl/tax/combo.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -15,14 +15,14 @@ module GOBL
|
|
15
15
|
|
16
16
|
# @!attribute [r] cat
|
17
17
|
# Tax category code from those available inside a region.
|
18
|
-
# @return [GOBL::
|
19
|
-
property :cat, GOBL::
|
18
|
+
# @return [GOBL::CBC::Code]
|
19
|
+
property :cat, GOBL::CBC::Code
|
20
20
|
validates :cat, presence: true
|
21
21
|
|
22
22
|
# @!attribute [r] rate
|
23
23
|
# Rate within a category to apply.
|
24
|
-
# @return [GOBL::
|
25
|
-
property :rate, GOBL::
|
24
|
+
# @return [GOBL::CBC::Key]
|
25
|
+
property :rate, GOBL::CBC::Key
|
26
26
|
|
27
27
|
# @!attribute [r] percent
|
28
28
|
# Percent defines the percentage set manually or determined from the rate key (calculated if rate present).
|
@@ -3,15 +3,15 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
10
|
-
module
|
11
|
-
#
|
12
|
-
class
|
13
|
-
# The Schema ID of the GOBL
|
14
|
-
SCHEMA_ID = 'https://gobl.org/draft-0/
|
10
|
+
module Tax
|
11
|
+
# Identity stores the details required to identify an entity for tax purposes.
|
12
|
+
class Identity < GOBL::Object
|
13
|
+
# The Schema ID of the GOBL Identity structure
|
14
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/identity'
|
15
15
|
|
16
16
|
# @!attribute [r] uuid
|
17
17
|
# Unique universal identity code for this tax identity.
|
@@ -24,10 +24,10 @@ module GOBL
|
|
24
24
|
property :country, GOBL::L10n::CountryCode
|
25
25
|
validates :country, presence: true
|
26
26
|
|
27
|
-
# @!attribute [r]
|
28
|
-
# Where inside
|
27
|
+
# @!attribute [r] zone
|
28
|
+
# Where inside the country the tax identity holder is based for tax purposes like a village, town, district, city, county, state or province. For some areas, this could be a regular post or zip code. See the regime packages for specific validation rules.
|
29
29
|
# @return [GOBL::L10n::Code]
|
30
|
-
property :
|
30
|
+
property :zone, GOBL::L10n::Code
|
31
31
|
|
32
32
|
# @!attribute [r] source
|
33
33
|
# What is the source document of the tax identity.
|
@@ -41,8 +41,8 @@ module GOBL
|
|
41
41
|
|
42
42
|
# @!attribute [r] meta
|
43
43
|
# Additional details that may be required.
|
44
|
-
# @return [GOBL::
|
45
|
-
property :meta, GOBL::
|
44
|
+
# @return [GOBL::CBC::Meta]
|
45
|
+
property :meta, GOBL::CBC::Meta
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
data/lib/gobl/tax/rate.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -11,12 +11,12 @@ module GOBL
|
|
11
11
|
# Rate defines a single rate inside a category
|
12
12
|
class Rate < GOBL::Object
|
13
13
|
# The Schema ID of the GOBL Rate structure
|
14
|
-
SCHEMA_ID = 'https://gobl.org/draft-0/tax/
|
14
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/Rate'
|
15
15
|
|
16
16
|
# @!attribute [r] key
|
17
17
|
# Key identifies this rate within the system
|
18
|
-
# @return [GOBL::
|
19
|
-
property :key, GOBL::
|
18
|
+
# @return [GOBL::CBC::Key]
|
19
|
+
property :key, GOBL::CBC::Key
|
20
20
|
validates :key, presence: true
|
21
21
|
|
22
22
|
# @!attribute [r] name
|
data/lib/gobl/tax/rate_total.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -14,8 +14,8 @@ module GOBL
|
|
14
14
|
SCHEMA_ID = 'https://gobl.org/draft-0/tax/total#/$defs/RateTotal'
|
15
15
|
|
16
16
|
# @!attribute [r] key
|
17
|
-
# @return [GOBL::
|
18
|
-
property :key, GOBL::
|
17
|
+
# @return [GOBL::CBC::Key]
|
18
|
+
property :key, GOBL::CBC::Key
|
19
19
|
|
20
20
|
# @!attribute [r] base
|
21
21
|
# @return [GOBL::Num::Amount]
|
data/lib/gobl/tax/rate_value.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -11,7 +11,7 @@ module GOBL
|
|
11
11
|
# RateValue contains a percentage rate or fixed amount for a given date range.
|
12
12
|
class RateValue < GOBL::Object
|
13
13
|
# The Schema ID of the GOBL RateValue structure
|
14
|
-
SCHEMA_ID = 'https://gobl.org/draft-0/tax/
|
14
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/RateValue'
|
15
15
|
|
16
16
|
# @!attribute [r] since
|
17
17
|
# Date from which this value should be applied.
|
@@ -3,18 +3,18 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
10
10
|
module Tax
|
11
|
-
#
|
12
|
-
class
|
13
|
-
# The Schema ID of the GOBL
|
14
|
-
SCHEMA_ID = 'https://gobl.org/draft-0/tax/
|
11
|
+
# Regime defines the holding structure for the definitions of taxes inside a country or territory.
|
12
|
+
class Regime < GOBL::Object
|
13
|
+
# The Schema ID of the GOBL Regime structure
|
14
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime'
|
15
15
|
|
16
16
|
# @!attribute [r] name
|
17
|
-
# Name of the
|
17
|
+
# Name of the country
|
18
18
|
# @return [GOBL::I18n::String]
|
19
19
|
property :name, GOBL::I18n::String
|
20
20
|
validates :name, presence: true
|
@@ -25,18 +25,18 @@ module GOBL
|
|
25
25
|
property :country, GOBL::L10n::CountryCode
|
26
26
|
validates :country, presence: true
|
27
27
|
|
28
|
-
# @!attribute [r]
|
29
|
-
# Locality, city, province, county, or similar code inside the country, if needed.
|
28
|
+
# @!attribute [r] zone
|
29
|
+
# Specific Locality, region, city, province, county, or similar code inside the country, if needed.
|
30
30
|
# @return [GOBL::L10n::Code]
|
31
|
-
property :
|
31
|
+
property :zone, GOBL::L10n::Code
|
32
32
|
|
33
|
-
# @!attribute [r]
|
34
|
-
# List of sub-
|
35
|
-
# @return [Array<
|
36
|
-
property :
|
33
|
+
# @!attribute [r] zones
|
34
|
+
# List of sub-zones inside a country.
|
35
|
+
# @return [Array<Zone>]
|
36
|
+
property :zones, [Zone]
|
37
37
|
|
38
38
|
# @!attribute [r] currency
|
39
|
-
# Currency used by the
|
39
|
+
# Currency used by the country.
|
40
40
|
# @return [GOBL::Currency::Code]
|
41
41
|
property :currency, GOBL::Currency::Code
|
42
42
|
validates :currency, presence: true
|
data/lib/gobl/tax/scheme.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -11,12 +11,12 @@ module GOBL
|
|
11
11
|
# Scheme contains the definition of a scheme that belongs to a region and can be used to simplify validation processes for document contents.
|
12
12
|
class Scheme < GOBL::Object
|
13
13
|
# The Schema ID of the GOBL Scheme structure
|
14
|
-
SCHEMA_ID = 'https://gobl.org/draft-0/tax/
|
14
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/Scheme'
|
15
15
|
|
16
16
|
# @!attribute [r] key
|
17
17
|
# Key used to identify this scheme
|
18
|
-
# @return [GOBL::
|
19
|
-
property :key, GOBL::
|
18
|
+
# @return [GOBL::CBC::Key]
|
19
|
+
property :key, GOBL::CBC::Key
|
20
20
|
validates :key, presence: true
|
21
21
|
|
22
22
|
# @!attribute [r] name
|
@@ -32,13 +32,13 @@ module GOBL
|
|
32
32
|
|
33
33
|
# @!attribute [r] categories
|
34
34
|
# List of tax category codes that can be used when this scheme is applied.
|
35
|
-
# @return [Array<GOBL::
|
36
|
-
property :categories, [GOBL::
|
35
|
+
# @return [Array<GOBL::CBC::Code>]
|
36
|
+
property :categories, [GOBL::CBC::Code]
|
37
37
|
|
38
38
|
# @!attribute [r] note
|
39
39
|
# Note defines a message that should be added to a document when this scheme is used.
|
40
|
-
# @return [GOBL::
|
41
|
-
property :note, GOBL::
|
40
|
+
# @return [GOBL::CBC::Note]
|
41
|
+
property :note, GOBL::CBC::Note
|
42
42
|
end
|
43
43
|
end
|
44
44
|
end
|
data/lib/gobl/tax/schemes.rb
CHANGED
data/lib/gobl/tax/set.rb
CHANGED
@@ -3,15 +3,15 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.34.1
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
10
|
-
module
|
10
|
+
module Tax
|
11
11
|
# SourceKey identifies the source of a tax identity
|
12
12
|
class SourceKey < GOBL::Enum
|
13
13
|
# The Schema ID of the GOBL SourceKey structure
|
14
|
-
SCHEMA_ID = 'https://gobl.org/draft-0/
|
14
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/identity#/$defs/SourceKey'
|
15
15
|
|
16
16
|
# The enumeration of values of the object and their descriptions (Values different to these are not allowed)
|
17
17
|
ENUM = {
|
data/lib/gobl/tax/total.rb
CHANGED
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
##
|
4
|
+
## DO NOT EDIT - This file was generated automatically.
|
5
|
+
##
|
6
|
+
## Generated with GOBL v0.34.0
|
7
|
+
##
|
8
|
+
|
9
|
+
module GOBL
|
10
|
+
module Tax
|
11
|
+
# Zone represents an area inside a country, like a province or a state, which shares the basic definitions of the country, but may vary in some validation rules.
|
12
|
+
class Zone < GOBL::Object
|
13
|
+
# The Schema ID of the GOBL Zone structure
|
14
|
+
SCHEMA_ID = 'https://gobl.org/draft-0/tax/regime#/$defs/Zone'
|
15
|
+
|
16
|
+
# @!attribute [r] code
|
17
|
+
# Unique zone code.
|
18
|
+
# @return [GOBL::L10n::Code]
|
19
|
+
property :code, GOBL::L10n::Code
|
20
|
+
validates :code, presence: true
|
21
|
+
|
22
|
+
# @!attribute [r] name
|
23
|
+
# Name of the zone to be use if a locality or region is not applicable.
|
24
|
+
# @return [GOBL::I18n::String]
|
25
|
+
property :name, GOBL::I18n::String
|
26
|
+
|
27
|
+
# @!attribute [r] locality
|
28
|
+
# Village, town, district, or city name which should coincide with address data.
|
29
|
+
# @return [GOBL::I18n::String]
|
30
|
+
property :locality, GOBL::I18n::String
|
31
|
+
|
32
|
+
# @!attribute [r] region
|
33
|
+
# Province, county, or state which should match address data.
|
34
|
+
# @return [GOBL::I18n::String]
|
35
|
+
property :region, GOBL::I18n::String
|
36
|
+
|
37
|
+
# @!attribute [r] meta
|
38
|
+
# Any additional information
|
39
|
+
# @return [GOBL::CBC::Meta]
|
40
|
+
property :meta, GOBL::CBC::Meta
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
data/lib/gobl/uuid/uuid.rb
CHANGED
data/lib/gobl/version.rb
CHANGED
data/lib/gobl.rb
CHANGED
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module GOBLExtensions
|
4
|
+
module Tax
|
5
|
+
# Additional methods for the generated {GOBL::Tax::Regime} class
|
6
|
+
module RegimeHelper
|
7
|
+
module ClassMethods
|
8
|
+
# Loads a {GOBL::Tax::Regime} object identified by the given code with all its data
|
9
|
+
#
|
10
|
+
# @param code [String] the code of the regime to load
|
11
|
+
#
|
12
|
+
# @return [Regime] the requested regime
|
13
|
+
def fetch(code)
|
14
|
+
regimes[code] ||= load_regime(code)
|
15
|
+
end
|
16
|
+
|
17
|
+
protected
|
18
|
+
|
19
|
+
# map of regime ID to regime instance
|
20
|
+
def regimes
|
21
|
+
@regimes ||= {}
|
22
|
+
end
|
23
|
+
|
24
|
+
def load_regime(code)
|
25
|
+
path = File.join("#{__dir__}/../../../data/regimes", "#{code.to_s.downcase}.json")
|
26
|
+
msg = "regime definition for #{code} does not exist at #{path}"
|
27
|
+
raise StandardError, msg unless File.exist?(path)
|
28
|
+
|
29
|
+
data = File.read(path)
|
30
|
+
from_json!(data)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gobl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Lilue
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2023-01-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -74,11 +74,11 @@ executables: []
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
-
- data/
|
78
|
-
- data/
|
79
|
-
- data/
|
80
|
-
- data/
|
81
|
-
- data/
|
77
|
+
- data/regimes/co.json
|
78
|
+
- data/regimes/es.json
|
79
|
+
- data/regimes/fr.json
|
80
|
+
- data/regimes/gb.json
|
81
|
+
- data/regimes/nl.json
|
82
82
|
- lib/ext/hashme.rb
|
83
83
|
- lib/extensions.rb
|
84
84
|
- lib/gobl.rb
|
@@ -101,6 +101,12 @@ files:
|
|
101
101
|
- lib/gobl/bill/totals.rb
|
102
102
|
- lib/gobl/cal/date.rb
|
103
103
|
- lib/gobl/cal/period.rb
|
104
|
+
- lib/gobl/cbc/code.rb
|
105
|
+
- lib/gobl/cbc/key.rb
|
106
|
+
- lib/gobl/cbc/meta.rb
|
107
|
+
- lib/gobl/cbc/note.rb
|
108
|
+
- lib/gobl/cbc/note_key.rb
|
109
|
+
- lib/gobl/cbc/stamp.rb
|
104
110
|
- lib/gobl/config.rb
|
105
111
|
- lib/gobl/currency/code.rb
|
106
112
|
- lib/gobl/currency/exchange_rate.rb
|
@@ -123,23 +129,15 @@ files:
|
|
123
129
|
- lib/gobl/operations/service_error.rb
|
124
130
|
- lib/gobl/operations/validation_result.rb
|
125
131
|
- lib/gobl/org/address.rb
|
126
|
-
- lib/gobl/org/code.rb
|
127
132
|
- lib/gobl/org/coordinates.rb
|
128
133
|
- lib/gobl/org/email.rb
|
129
134
|
- lib/gobl/org/inbox.rb
|
130
135
|
- lib/gobl/org/item.rb
|
131
136
|
- lib/gobl/org/item_code.rb
|
132
|
-
- lib/gobl/org/key.rb
|
133
|
-
- lib/gobl/org/meta.rb
|
134
137
|
- lib/gobl/org/name.rb
|
135
|
-
- lib/gobl/org/note.rb
|
136
|
-
- lib/gobl/org/note_key.rb
|
137
138
|
- lib/gobl/org/party.rb
|
138
139
|
- lib/gobl/org/person.rb
|
139
140
|
- lib/gobl/org/registration.rb
|
140
|
-
- lib/gobl/org/source_key.rb
|
141
|
-
- lib/gobl/org/stamp.rb
|
142
|
-
- lib/gobl/org/tax_identity.rb
|
143
141
|
- lib/gobl/org/telephone.rb
|
144
142
|
- lib/gobl/org/unit.rb
|
145
143
|
- lib/gobl/pay/advance.rb
|
@@ -156,24 +154,25 @@ files:
|
|
156
154
|
- lib/gobl/tax/category.rb
|
157
155
|
- lib/gobl/tax/category_total.rb
|
158
156
|
- lib/gobl/tax/combo.rb
|
159
|
-
- lib/gobl/tax/
|
160
|
-
- lib/gobl/tax/locality.rb
|
157
|
+
- lib/gobl/tax/identity.rb
|
161
158
|
- lib/gobl/tax/rate.rb
|
162
159
|
- lib/gobl/tax/rate_total.rb
|
163
160
|
- lib/gobl/tax/rate_total_surcharge.rb
|
164
161
|
- lib/gobl/tax/rate_value.rb
|
165
|
-
- lib/gobl/tax/
|
162
|
+
- lib/gobl/tax/regime.rb
|
166
163
|
- lib/gobl/tax/scheme.rb
|
167
164
|
- lib/gobl/tax/schemes.rb
|
168
165
|
- lib/gobl/tax/set.rb
|
166
|
+
- lib/gobl/tax/source_key.rb
|
169
167
|
- lib/gobl/tax/total.rb
|
168
|
+
- lib/gobl/tax/zone.rb
|
170
169
|
- lib/gobl/uuid/uuid.rb
|
171
170
|
- lib/gobl/value.rb
|
172
171
|
- lib/gobl/version.rb
|
173
172
|
- lib/gobl_extensions/document_helper.rb
|
174
173
|
- lib/gobl_extensions/envelope_helper.rb
|
175
174
|
- lib/gobl_extensions/i18n/value_keys_helper.rb
|
176
|
-
- lib/gobl_extensions/tax/
|
175
|
+
- lib/gobl_extensions/tax/regime_helper.rb
|
177
176
|
homepage: https://github.com/invopop/gobl.ruby
|
178
177
|
licenses:
|
179
178
|
- Apache-2.0
|