gobl 0.8.0 → 0.10.0
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 +55 -1
- data/data/regimes/es.json +570 -64
- data/data/regimes/it.json +1182 -0
- data/lib/gobl/bill/charge.rb +1 -1
- data/lib/gobl/bill/delivery.rb +1 -1
- data/lib/gobl/bill/discount.rb +1 -1
- data/lib/gobl/bill/document_reference.rb +1 -1
- data/lib/gobl/bill/invoice.rb +19 -8
- 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 +3 -3
- data/lib/gobl/bill/payment.rb +1 -1
- data/lib/gobl/bill/preceding.rb +23 -23
- data/lib/gobl/bill/tax.rb +4 -4
- data/lib/gobl/bill/totals.rb +5 -5
- data/lib/gobl/cal/date.rb +2 -2
- data/lib/gobl/cal/period.rb +3 -3
- data/lib/gobl/cbc/code.rb +3 -3
- data/lib/gobl/cbc/key.rb +2 -2
- data/lib/gobl/cbc/meta.rb +1 -1
- data/lib/gobl/cbc/note.rb +6 -6
- data/lib/gobl/cbc/stamp.rb +3 -3
- data/lib/gobl/currency/code.rb +4 -3
- data/lib/gobl/currency/exchange_rate.rb +3 -3
- data/lib/gobl/document.rb +5 -2
- data/lib/gobl/dsig/digest.rb +3 -3
- data/lib/gobl/dsig/signature.rb +2 -2
- data/lib/gobl/enum.rb +9 -67
- data/lib/gobl/envelope.rb +5 -5
- data/lib/gobl/header.rb +4 -4
- data/lib/gobl/i18n/string.rb +1 -1
- data/lib/gobl/l10n/code.rb +2 -2
- data/lib/gobl/l10n/country_code.rb +4 -3
- data/lib/gobl/note/message.rb +4 -4
- data/lib/gobl/org/address.rb +2 -2
- data/lib/gobl/org/coordinates.rb +1 -1
- data/lib/gobl/org/email.rb +2 -2
- data/lib/gobl/org/identity.rb +38 -0
- data/lib/gobl/org/image.rb +1 -1
- data/lib/gobl/org/inbox.rb +3 -3
- data/lib/gobl/org/item.rb +10 -10
- data/lib/gobl/org/name.rb +3 -3
- data/lib/gobl/org/party.rb +7 -7
- data/lib/gobl/org/person.rb +2 -7
- data/lib/gobl/org/registration.rb +1 -1
- data/lib/gobl/org/telephone.rb +2 -2
- data/lib/gobl/org/unit.rb +8 -3
- data/lib/gobl/org/website.rb +2 -2
- data/lib/gobl/pay/advance.rb +3 -3
- data/lib/gobl/pay/card.rb +3 -3
- 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 +3 -3
- data/lib/gobl/pay/instructions.rb +19 -4
- data/lib/gobl/pay/online.rb +2 -2
- data/lib/gobl/pay/terms.rb +19 -4
- data/lib/gobl/tax/category.rb +14 -4
- data/lib/gobl/tax/category_total.rb +5 -5
- data/lib/gobl/tax/combo.rb +7 -2
- data/lib/gobl/tax/identity.rb +16 -6
- data/lib/gobl/tax/key_definition.rb +38 -0
- data/lib/gobl/tax/preceding_definitions.rb +27 -0
- data/lib/gobl/tax/rate.rb +11 -4
- data/lib/gobl/tax/rate_total.rb +4 -4
- data/lib/gobl/tax/rate_total_surcharge.rb +3 -3
- data/lib/gobl/tax/rate_value.rb +2 -2
- data/lib/gobl/tax/regime.rb +19 -9
- data/lib/gobl/tax/scenario.rb +37 -0
- data/lib/gobl/tax/scenario_set.rb +29 -0
- data/lib/gobl/tax/set.rb +1 -1
- data/lib/gobl/tax/tag.rb +33 -0
- data/lib/gobl/tax/total.rb +2 -2
- data/lib/gobl/tax/zone.rb +2 -2
- data/lib/gobl/uuid/uuid.rb +2 -2
- data/lib/gobl/version.rb +1 -1
- metadata +10 -11
- data/lib/gobl/bill/invoice_type.rb +0 -32
- data/lib/gobl/cbc/note_key.rb +0 -50
- data/lib/gobl/org/item_code.rb +0 -28
- data/lib/gobl/pay/method_key.rb +0 -32
- data/lib/gobl/pay/term_key.rb +0 -35
- data/lib/gobl/tax/scheme.rb +0 -44
- data/lib/gobl/tax/source_key.rb +0 -30
- data/lib/gobl/value.rb +0 -77
data/lib/gobl/bill/charge.rb
CHANGED
data/lib/gobl/bill/delivery.rb
CHANGED
data/lib/gobl/bill/discount.rb
CHANGED
data/lib/gobl/bill/invoice.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.38.0
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -27,18 +27,29 @@ module GOBL
|
|
27
27
|
# Sequential code used to identify this invoice in tax declarations.
|
28
28
|
# @return [String]
|
29
29
|
property :code, String
|
30
|
-
|
30
|
+
validates_presence_of :code
|
31
|
+
|
32
|
+
# Enumeration of possible values for {#type} with their corresponding descriptions
|
33
|
+
TYPE_ENUM = {
|
34
|
+
'standard' => 'A regular commercial invoice document between a supplier and customer.',
|
35
|
+
'proforma' => 'For a clients validation before sending a final invoice.',
|
36
|
+
'corrective' => 'Corrected invoice that completely replaces the preceding document.',
|
37
|
+
'credit-note' => 'Reflects a refund either partial or complete of the preceding document.',
|
38
|
+
'debit-note' => 'An additional set of charges to be added to the preceding document.'
|
39
|
+
}.freeze
|
31
40
|
|
32
41
|
# @!attribute [r] type
|
33
|
-
#
|
34
|
-
# @return [
|
35
|
-
property :type,
|
42
|
+
# Type of invoice document subject to the requirements of the local tax regime.
|
43
|
+
# @return [GOBL::CBC::Key]
|
44
|
+
property :type, GOBL::CBC::Key
|
45
|
+
validates_presence_of :type
|
46
|
+
validates_inclusion_of :type, in: TYPE_ENUM.keys
|
36
47
|
|
37
48
|
# @!attribute [r] currency
|
38
49
|
# Currency for all invoice totals.
|
39
50
|
# @return [GOBL::Currency::Code]
|
40
51
|
property :currency, GOBL::Currency::Code
|
41
|
-
|
52
|
+
validates_presence_of :currency
|
42
53
|
|
43
54
|
# @!attribute [r] exchange_rates
|
44
55
|
# Exchange rates to be used when converting the invoices monetary values into other currencies.
|
@@ -59,7 +70,7 @@ module GOBL
|
|
59
70
|
# When the invoice was created.
|
60
71
|
# @return [GOBL::Cal::Date]
|
61
72
|
property :issue_date, GOBL::Cal::Date
|
62
|
-
|
73
|
+
validates_presence_of :issue_date
|
63
74
|
|
64
75
|
# @!attribute [r] op_date
|
65
76
|
# Date when the operation defined by the invoice became effective.
|
@@ -75,7 +86,7 @@ module GOBL
|
|
75
86
|
# The taxable entity supplying the goods or services.
|
76
87
|
# @return [GOBL::Org::Party]
|
77
88
|
property :supplier, GOBL::Org::Party
|
78
|
-
|
89
|
+
validates_presence_of :supplier
|
79
90
|
|
80
91
|
# @!attribute [r] customer
|
81
92
|
# Legal entity receiving the goods or services, may be empty in certain circumstances such as simplified invoices.
|
data/lib/gobl/bill/line.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.38.0
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -27,13 +27,13 @@ module GOBL
|
|
27
27
|
# Number of items
|
28
28
|
# @return [GOBL::Num::Amount]
|
29
29
|
property :quantity, GOBL::Num::Amount
|
30
|
-
|
30
|
+
validates_presence_of :quantity
|
31
31
|
|
32
32
|
# @!attribute [r] item
|
33
33
|
# Details about what is being sold
|
34
34
|
# @return [GOBL::Org::Item]
|
35
35
|
property :item, GOBL::Org::Item
|
36
|
-
|
36
|
+
validates_presence_of :item
|
37
37
|
|
38
38
|
# @!attribute [r] sum
|
39
39
|
# Result of quantity multiplied by the item's price (calculated)
|
data/lib/gobl/bill/ordering.rb
CHANGED
data/lib/gobl/bill/outlay.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.38.0
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -42,7 +42,7 @@ module GOBL
|
|
42
42
|
# Details on what the outlay was.
|
43
43
|
# @return [String]
|
44
44
|
property :desc, String
|
45
|
-
|
45
|
+
validates_presence_of :desc
|
46
46
|
|
47
47
|
# @!attribute [r] supplier
|
48
48
|
# Who was the supplier of the outlay
|
@@ -53,7 +53,7 @@ module GOBL
|
|
53
53
|
# Amount paid by the supplier.
|
54
54
|
# @return [GOBL::Num::Amount]
|
55
55
|
property :amount, GOBL::Num::Amount
|
56
|
-
|
56
|
+
validates_presence_of :amount
|
57
57
|
end
|
58
58
|
end
|
59
59
|
end
|
data/lib/gobl/bill/payment.rb
CHANGED
data/lib/gobl/bill/preceding.rb
CHANGED
@@ -3,12 +3,12 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.38.0
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
10
10
|
module Bill
|
11
|
-
# Preceding allows for information to be provided about a previous invoice that this one will replace or
|
11
|
+
# Preceding allows for information to be provided about a previous invoice that this one will replace, subtract from, or add to.
|
12
12
|
class Preceding < GOBL::Object
|
13
13
|
# The Schema ID of the GOBL Preceding structure
|
14
14
|
SCHEMA_ID = 'https://gobl.org/draft-0/bill/invoice#/$defs/Preceding'
|
@@ -27,38 +27,38 @@ module GOBL
|
|
27
27
|
# Code of the previous document.
|
28
28
|
# @return [String]
|
29
29
|
property :code, String
|
30
|
-
|
30
|
+
validates_presence_of :code
|
31
31
|
|
32
32
|
# @!attribute [r] issue_date
|
33
|
-
# The issue date
|
33
|
+
# The issue date of the previous document.
|
34
34
|
# @return [GOBL::Cal::Date]
|
35
35
|
property :issue_date, GOBL::Cal::Date
|
36
|
-
|
36
|
+
validates_presence_of :issue_date
|
37
37
|
|
38
|
-
# @!attribute [r]
|
39
|
-
#
|
40
|
-
# @return [GOBL::Cal::Period]
|
41
|
-
property :period, GOBL::Cal::Period
|
42
|
-
|
43
|
-
# @!attribute [r] corrections
|
44
|
-
# Specific codes for the corrections made.
|
45
|
-
# @return [Array<String>]
|
46
|
-
property :corrections, [String]
|
47
|
-
|
48
|
-
# @!attribute [r] correction_method
|
49
|
-
# How has the previous invoice been corrected?
|
38
|
+
# @!attribute [r] reason
|
39
|
+
# Human readable description on why the preceding invoice is being replaced.
|
50
40
|
# @return [String]
|
51
|
-
property :
|
41
|
+
property :reason, String
|
52
42
|
|
53
43
|
# @!attribute [r] stamps
|
54
|
-
# Seals of approval from other organisations.
|
44
|
+
# Seals of approval from other organisations that may need to be listed.
|
55
45
|
# @return [Array<GOBL::CBC::Stamp>]
|
56
46
|
property :stamps, [GOBL::CBC::Stamp]
|
57
47
|
|
58
|
-
# @!attribute [r]
|
59
|
-
#
|
60
|
-
# @return [
|
61
|
-
property :
|
48
|
+
# @!attribute [r] corrections
|
49
|
+
# Tax regime specific keys reflecting why the preceding invoice is being replaced.
|
50
|
+
# @return [Array<GOBL::CBC::Key>]
|
51
|
+
property :corrections, [GOBL::CBC::Key]
|
52
|
+
|
53
|
+
# @!attribute [r] correction_method
|
54
|
+
# Tax regime specific keys reflecting the method used to correct the preceding invoice.
|
55
|
+
# @return [GOBL::CBC::Key]
|
56
|
+
property :correction_method, GOBL::CBC::Key
|
57
|
+
|
58
|
+
# @!attribute [r] period
|
59
|
+
# Tax period in which the previous invoice had an effect required by some tax regimes and formats.
|
60
|
+
# @return [GOBL::Cal::Period]
|
61
|
+
property :period, GOBL::Cal::Period
|
62
62
|
|
63
63
|
# @!attribute [r] meta
|
64
64
|
# Additional semi-structured data that may be useful in specific regions
|
data/lib/gobl/bill/tax.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.38.0
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -18,10 +18,10 @@ module GOBL
|
|
18
18
|
# @return [GOBL::CBC::Code]
|
19
19
|
property :prices_include, GOBL::CBC::Code
|
20
20
|
|
21
|
-
# @!attribute [r]
|
22
|
-
# Special tax
|
21
|
+
# @!attribute [r] tags
|
22
|
+
# Special tax tags that apply to this invoice according to local requirements.
|
23
23
|
# @return [Array<GOBL::CBC::Key>]
|
24
|
-
property :
|
24
|
+
property :tags, [GOBL::CBC::Key]
|
25
25
|
|
26
26
|
# @!attribute [r] meta
|
27
27
|
# Any additional data that may be required for processing, but should never be relied upon by recipients.
|
data/lib/gobl/bill/totals.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.38.0
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -17,7 +17,7 @@ module GOBL
|
|
17
17
|
# Sum of all line item sums
|
18
18
|
# @return [GOBL::Num::Amount]
|
19
19
|
property :sum, GOBL::Num::Amount
|
20
|
-
|
20
|
+
validates_presence_of :sum
|
21
21
|
|
22
22
|
# @!attribute [r] discount
|
23
23
|
# Sum of all document level discounts
|
@@ -38,7 +38,7 @@ module GOBL
|
|
38
38
|
# Sum of all line sums minus the discounts, plus the charges, without tax.
|
39
39
|
# @return [GOBL::Num::Amount]
|
40
40
|
property :total, GOBL::Num::Amount
|
41
|
-
|
41
|
+
validates_presence_of :total
|
42
42
|
|
43
43
|
# @!attribute [r] taxes
|
44
44
|
# Summary of all the taxes included in the invoice.
|
@@ -54,7 +54,7 @@ module GOBL
|
|
54
54
|
# Grand total after all taxes have been applied.
|
55
55
|
# @return [GOBL::Num::Amount]
|
56
56
|
property :total_with_tax, GOBL::Num::Amount
|
57
|
-
|
57
|
+
validates_presence_of :total_with_tax
|
58
58
|
|
59
59
|
# @!attribute [r] outlays
|
60
60
|
# Total paid in outlays that need to be reimbursed
|
@@ -65,7 +65,7 @@ module GOBL
|
|
65
65
|
# Total amount to be paid after applying taxes and outlays.
|
66
66
|
# @return [GOBL::Num::Amount]
|
67
67
|
property :payable, GOBL::Num::Amount
|
68
|
-
|
68
|
+
validates_presence_of :payable
|
69
69
|
|
70
70
|
# @!attribute [r] advance
|
71
71
|
# Total amount already paid in advance.
|
data/lib/gobl/cal/date.rb
CHANGED
@@ -3,13 +3,13 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.38.0
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
10
10
|
module Cal
|
11
11
|
# Civil date in simplified ISO format, like 2021-05-26
|
12
|
-
class Date <
|
12
|
+
class Date < String
|
13
13
|
# The Schema ID of the GOBL Date structure
|
14
14
|
SCHEMA_ID = 'https://gobl.org/draft-0/cal/date'
|
15
15
|
end
|
data/lib/gobl/cal/period.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.38.0
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -16,12 +16,12 @@ module GOBL
|
|
16
16
|
# @!attribute [r] start
|
17
17
|
# @return [GOBL::Cal::Date]
|
18
18
|
property :start, GOBL::Cal::Date
|
19
|
-
|
19
|
+
validates_presence_of :start
|
20
20
|
|
21
21
|
# @!attribute [r] end
|
22
22
|
# @return [GOBL::Cal::Date]
|
23
23
|
property :end, GOBL::Cal::Date
|
24
|
-
|
24
|
+
validates_presence_of :end
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
data/lib/gobl/cbc/code.rb
CHANGED
@@ -3,13 +3,13 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.38.0
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
10
10
|
module CBC
|
11
|
-
#
|
12
|
-
class Code <
|
11
|
+
# Alphanumerical text identifier with upper-case letters, no whitespace, nor symbols.
|
12
|
+
class Code < String
|
13
13
|
# The Schema ID of the GOBL Code structure
|
14
14
|
SCHEMA_ID = 'https://gobl.org/draft-0/cbc/code'
|
15
15
|
end
|
data/lib/gobl/cbc/key.rb
CHANGED
@@ -3,13 +3,13 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.38.0
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
10
10
|
module CBC
|
11
11
|
# Text identifier to be used instead of a code for a more verbose but readable identifier.
|
12
|
-
class Key <
|
12
|
+
class Key < String
|
13
13
|
# The Schema ID of the GOBL Key structure
|
14
14
|
SCHEMA_ID = 'https://gobl.org/draft-0/cbc/key'
|
15
15
|
end
|
data/lib/gobl/cbc/meta.rb
CHANGED
data/lib/gobl/cbc/note.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.38.0
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -15,8 +15,8 @@ module GOBL
|
|
15
15
|
|
16
16
|
# @!attribute [r] key
|
17
17
|
# Key specifying subject of the text
|
18
|
-
# @return [
|
19
|
-
property :key,
|
18
|
+
# @return [GOBL::CBC::Key]
|
19
|
+
property :key, GOBL::CBC::Key
|
20
20
|
|
21
21
|
# @!attribute [r] code
|
22
22
|
# Code used for additional data that may be required to identify the note.
|
@@ -25,14 +25,14 @@ module GOBL
|
|
25
25
|
|
26
26
|
# @!attribute [r] src
|
27
27
|
# Source of this note, especially useful when auto-generated.
|
28
|
-
# @return [
|
29
|
-
property :src,
|
28
|
+
# @return [GOBL::CBC::Key]
|
29
|
+
property :src, GOBL::CBC::Key
|
30
30
|
|
31
31
|
# @!attribute [r] text
|
32
32
|
# The contents of the note
|
33
33
|
# @return [String]
|
34
34
|
property :text, String
|
35
|
-
|
35
|
+
validates_presence_of :text
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
data/lib/gobl/cbc/stamp.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.38.0
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -17,13 +17,13 @@ module GOBL
|
|
17
17
|
# Identity of the agency used to create the stamp usually defined by each region.
|
18
18
|
# @return [GOBL::CBC::Key]
|
19
19
|
property :prv, GOBL::CBC::Key
|
20
|
-
|
20
|
+
validates_presence_of :prv
|
21
21
|
|
22
22
|
# @!attribute [r] val
|
23
23
|
# The serialized stamp value generated for or by the external agency
|
24
24
|
# @return [String]
|
25
25
|
property :val, String
|
26
|
-
|
26
|
+
validates_presence_of :val
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
data/lib/gobl/currency/code.rb
CHANGED
@@ -3,17 +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.38.0
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
10
10
|
module Currency
|
11
11
|
# ISO Currency Code
|
12
|
-
class Code <
|
12
|
+
class Code < String
|
13
13
|
# The Schema ID of the GOBL Code structure
|
14
14
|
SCHEMA_ID = 'https://gobl.org/draft-0/currency/code'
|
15
15
|
|
16
|
-
|
16
|
+
include GOBL::Enum
|
17
|
+
|
17
18
|
ENUM = {
|
18
19
|
'AED' => 'UAE Dirham',
|
19
20
|
'AFN' => 'Afghani',
|
@@ -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.38.0
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -17,13 +17,13 @@ module GOBL
|
|
17
17
|
# ISO currency code this rate represents.
|
18
18
|
# @return [GOBL::Currency::Code]
|
19
19
|
property :currency, GOBL::Currency::Code
|
20
|
-
|
20
|
+
validates_presence_of :currency
|
21
21
|
|
22
22
|
# @!attribute [r] amount
|
23
23
|
# How much is 1.00 of this currency worth in the documents currency.
|
24
24
|
# @return [GOBL::Num::Amount]
|
25
25
|
property :amount, GOBL::Num::Amount
|
26
|
-
|
26
|
+
validates_presence_of :amount
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
data/lib/gobl/document.rb
CHANGED
@@ -3,11 +3,14 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.38.0
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
10
|
-
#
|
10
|
+
# Contains the document payload to be included inside an Envelope.
|
11
|
+
#
|
12
|
+
# The document must contain a `$schema` property that identifies
|
13
|
+
# the data's structure otherwise it will be rejected.
|
11
14
|
class Document < GOBL::Map
|
12
15
|
end
|
13
16
|
end
|
data/lib/gobl/dsig/digest.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.38.0
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
@@ -17,13 +17,13 @@ module GOBL
|
|
17
17
|
# Algorithm stores the algorithm key that was used to generate the value.
|
18
18
|
# @return [String]
|
19
19
|
property :alg, String
|
20
|
-
|
20
|
+
validates_presence_of :alg
|
21
21
|
|
22
22
|
# @!attribute [r] val
|
23
23
|
# Value contains the Hexadecimal representation of the resulting hash generated by the algorithm.
|
24
24
|
# @return [String]
|
25
25
|
property :val, String
|
26
|
-
|
26
|
+
validates_presence_of :val
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
data/lib/gobl/dsig/signature.rb
CHANGED
@@ -3,13 +3,13 @@
|
|
3
3
|
##
|
4
4
|
## DO NOT EDIT - This file was generated automatically.
|
5
5
|
##
|
6
|
-
## Generated with GOBL v0.
|
6
|
+
## Generated with GOBL v0.38.0
|
7
7
|
##
|
8
8
|
|
9
9
|
module GOBL
|
10
10
|
module DSig
|
11
11
|
# JSON Web Signature in compact form.
|
12
|
-
class Signature <
|
12
|
+
class Signature < String
|
13
13
|
# The Schema ID of the GOBL Signature structure
|
14
14
|
SCHEMA_ID = 'https://gobl.org/draft-0/dsig/signature'
|
15
15
|
end
|