Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #78 from invopop/gobl-0.53
Browse files Browse the repository at this point in the history
Upgrade to GOBL v0.53
  • Loading branch information
samlown authored Aug 7, 2023
2 parents 26a20fd + 14a5de8 commit 441e474
Show file tree
Hide file tree
Showing 24 changed files with 48 additions and 46 deletions.
2 changes: 1 addition & 1 deletion cmd/gobl/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ func Test_build(t *testing.T) {
{
name: "merge values",
opts: &buildOpts{
set: map[string]string{"doc.currency": "MXN"},
set: map[string]string{"doc.code": "SAMPLE-005X"},
},
args: []string{"testdata/success.json"},
},
Expand Down
2 changes: 1 addition & 1 deletion cmd/gobl/sign_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func Test_sign(t *testing.T) {
{
name: "merge values",
opts: &signOpts{
set: map[string]string{"doc.currency": "MXN"},
set: map[string]string{"doc.code": "SAMPLE-006X"},
privateKeyFile: "testdata/id_es256",
},
args: []string{"testdata/success.json"},
Expand Down
2 changes: 1 addition & 1 deletion cmd/gobl/testdata/Test_build_do_not_envelop
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
{
"i": 1,
"desc": "Something paid for by us",
"amount": "0"
"amount": "0.00"
}
],
"payment": {
Expand Down
4 changes: 2 additions & 2 deletions cmd/gobl/testdata/Test_build_envelop
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"uuid": "00000000-0000-0000-0000-000000000000",
"dig": {
"alg": "sha256",
"val": "24b96319f7ca19ae7084186e906fc0502e1029061f9fa662a6809cca62b290b4"
"val": "e0c939d64f6d687195b2985e1c0e2bbc42896f3ee65ee7b1916b360f4cfc6351"
},
"draft": true
},
Expand Down Expand Up @@ -146,7 +146,7 @@
{
"i": 1,
"desc": "Something paid for by us",
"amount": "0"
"amount": "0.00"
}
],
"payment": {
Expand Down
6 changes: 3 additions & 3 deletions cmd/gobl/testdata/Test_build_merge_values
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"uuid": "4905f174-0384-11ed-9fa6-b24117999d50",
"dig": {
"alg": "sha256",
"val": "b3fa54ce22fe097a0da9ad612a3c02b944fc8df32a08634ea9f3f5a51a50375e"
"val": "b7351ba99214cf942717a7f628f9ed571771da0cb922c3dfad50501969440f30"
}
},
"doc": {
"$schema": "https://gobl.org/draft-0/bill/invoice",
"code": "SAMPLE-001",
"code": "SAMPLE-005X",
"type": "standard",
"currency": "MXN",
"currency": "EUR",
"issue_date": "2022-02-01",
"supplier": {
"name": "MªF. Services",
Expand Down
4 changes: 2 additions & 2 deletions cmd/gobl/testdata/Test_build_overwrite_input_file_outfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"uuid": "9d8eafd5-77be-11ec-b485-5405db9a3e49",
"dig": {
"alg": "sha256",
"val": "24b96319f7ca19ae7084186e906fc0502e1029061f9fa662a6809cca62b290b4"
"val": "e0c939d64f6d687195b2985e1c0e2bbc42896f3ee65ee7b1916b360f4cfc6351"
}
},
"doc": {
Expand Down Expand Up @@ -145,7 +145,7 @@
{
"i": 1,
"desc": "Something paid for by us",
"amount": "0"
"amount": "0.00"
}
],
"payment": {
Expand Down
4 changes: 2 additions & 2 deletions cmd/gobl/testdata/Test_build_recalculate
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"uuid": "9d8eafd5-77be-11ec-b485-5405db9a3e49",
"dig": {
"alg": "sha256",
"val": "aaad6928c38d8e2b9cc6c3a9a21a956e0fecb47da723896735bdfe3d438ea373"
"val": "bee7cfd0109152183c777e14d3cd2b5521582d95520f7a6fe6b12a5a370a3bea"
}
},
"doc": {
Expand Down Expand Up @@ -142,7 +142,7 @@
{
"i": 1,
"desc": "Something paid for by us",
"amount": "0"
"amount": "0.00"
}
],
"payment": {
Expand Down
4 changes: 2 additions & 2 deletions cmd/gobl/testdata/Test_build_success
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"uuid": "9d8eafd5-77be-11ec-b485-5405db9a3e49",
"dig": {
"alg": "sha256",
"val": "aaad6928c38d8e2b9cc6c3a9a21a956e0fecb47da723896735bdfe3d438ea373"
"val": "bee7cfd0109152183c777e14d3cd2b5521582d95520f7a6fe6b12a5a370a3bea"
}
},
"doc": {
Expand Down Expand Up @@ -142,7 +142,7 @@
{
"i": 1,
"desc": "Something paid for by us",
"amount": "0"
"amount": "0.00"
}
],
"payment": {
Expand Down
4 changes: 2 additions & 2 deletions cmd/gobl/testdata/Test_build_valid_file
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"uuid": "9d8eafd5-77be-11ec-b485-5405db9a3e49",
"dig": {
"alg": "sha256",
"val": "ebe436a203923a5140103d24561d6fcc09625161768438ce35ea4dd7e665d99a"
"val": "05808fcdf244bb9067abe5b7a29cb916d15424009658b07fab77014aef9e5e64"
}
},
"doc": {
Expand Down Expand Up @@ -142,7 +142,7 @@
{
"i": 1,
"desc": "Something paid for by us",
"amount": "0"
"amount": "0.00"
}
],
"payment": {
Expand Down
6 changes: 3 additions & 3 deletions cmd/gobl/testdata/Test_sign_merge_values
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"uuid": "4905f174-0384-11ed-9fa6-b24117999d50",
"dig": {
"alg": "sha256",
"val": "b3fa54ce22fe097a0da9ad612a3c02b944fc8df32a08634ea9f3f5a51a50375e"
"val": "4187dcc8dd154f094b41a1f449ca1ebece01d58e3236347663282ed31de2ce13"
}
},
"doc": {
"$schema": "https://gobl.org/draft-0/bill/invoice",
"code": "SAMPLE-001",
"code": "SAMPLE-006X",
"type": "standard",
"currency": "MXN",
"currency": "EUR",
"issue_date": "2022-02-01",
"supplier": {
"name": "MªF. Services",
Expand Down
4 changes: 2 additions & 2 deletions cmd/gobl/testdata/Test_sign_overwrite_input_file_outfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"uuid": "9d8eafd5-77be-11ec-b485-5405db9a3e49",
"dig": {
"alg": "sha256",
"val": "24b96319f7ca19ae7084186e906fc0502e1029061f9fa662a6809cca62b290b4"
"val": "e0c939d64f6d687195b2985e1c0e2bbc42896f3ee65ee7b1916b360f4cfc6351"
}
},
"doc": {
Expand Down Expand Up @@ -145,7 +145,7 @@
{
"i": 1,
"desc": "Something paid for by us",
"amount": "0"
"amount": "0.00"
}
],
"payment": {
Expand Down
4 changes: 2 additions & 2 deletions cmd/gobl/testdata/Test_sign_recalculate
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"uuid": "9d8eafd5-77be-11ec-b485-5405db9a3e49",
"dig": {
"alg": "sha256",
"val": "aaad6928c38d8e2b9cc6c3a9a21a956e0fecb47da723896735bdfe3d438ea373"
"val": "bee7cfd0109152183c777e14d3cd2b5521582d95520f7a6fe6b12a5a370a3bea"
}
},
"doc": {
Expand Down Expand Up @@ -142,7 +142,7 @@
{
"i": 1,
"desc": "Something paid for by us",
"amount": "0"
"amount": "0.00"
}
],
"payment": {
Expand Down
4 changes: 2 additions & 2 deletions cmd/gobl/testdata/Test_sign_success
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"uuid": "9d8eafd5-77be-11ec-b485-5405db9a3e49",
"dig": {
"alg": "sha256",
"val": "aaad6928c38d8e2b9cc6c3a9a21a956e0fecb47da723896735bdfe3d438ea373"
"val": "bee7cfd0109152183c777e14d3cd2b5521582d95520f7a6fe6b12a5a370a3bea"
}
},
"doc": {
Expand Down Expand Up @@ -142,7 +142,7 @@
{
"i": 1,
"desc": "Something paid for by us",
"amount": "0"
"amount": "0.00"
}
],
"payment": {
Expand Down
4 changes: 2 additions & 2 deletions cmd/gobl/testdata/Test_sign_valid_file
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"uuid": "9d8eafd5-77be-11ec-b485-5405db9a3e49",
"dig": {
"alg": "sha256",
"val": "ebe436a203923a5140103d24561d6fcc09625161768438ce35ea4dd7e665d99a"
"val": "05808fcdf244bb9067abe5b7a29cb916d15424009658b07fab77014aef9e5e64"
}
},
"doc": {
Expand Down Expand Up @@ -142,7 +142,7 @@
{
"i": 1,
"desc": "Something paid for by us",
"amount": "0"
"amount": "0.00"
}
],
"payment": {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.17
require (
github.com/google/go-cmp v0.5.9
github.com/imdario/mergo v0.3.15
github.com/invopop/gobl v0.52.1
github.com/invopop/gobl v0.53.0
github.com/invopop/yaml v0.2.0
github.com/labstack/echo/v4 v4.10.2
github.com/magefile/mage v1.13.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,8 @@ github.com/invopop/gobl v0.52.0 h1:U1NUsBnGGV73kdubAh7xFsqEtqlo2S7jEqo0dYmQcHA=
github.com/invopop/gobl v0.52.0/go.mod h1:/s8rsPX3RK5J/yGK41lzzzB+zXeC29rpIZBYjSjvYzM=
github.com/invopop/gobl v0.52.1 h1:fxuO6rVFmeV6t/irA4gfzqwOphfEhTHKe9j254aR/lQ=
github.com/invopop/gobl v0.52.1/go.mod h1:/s8rsPX3RK5J/yGK41lzzzB+zXeC29rpIZBYjSjvYzM=
github.com/invopop/gobl v0.53.0 h1:aQTXT4bR89DCm/Oh/a5YUJ92+HYdE8DwwcZoEGfkyCE=
github.com/invopop/gobl v0.53.0/go.mod h1:/s8rsPX3RK5J/yGK41lzzzB+zXeC29rpIZBYjSjvYzM=
github.com/invopop/jsonschema v0.7.0 h1:2vgQcBz1n256N+FpX3Jq7Y17AjYt46Ig3zIWyy770So=
github.com/invopop/jsonschema v0.7.0/go.mod h1:O9uiLokuu0+MGFlyiaqtWxwqJm41/+8Nj0lD7A36YH0=
github.com/invopop/validation v0.3.0 h1:o260kbjXzoBO/ypXDSSrCLL7SxEFUXBsX09YTE9AxZw=
Expand Down
4 changes: 2 additions & 2 deletions internal/testdata/TestBuild_draft
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
],
"outlays": [
{
"amount": "0",
"amount": "0.00",
"desc": "Something paid for by us",
"i": 1
}
Expand Down Expand Up @@ -203,7 +203,7 @@
"head": {
"dig": {
"alg": "sha256",
"val": "07093af20b1e931f839387a88b2c97c209cf00ac9ef778963a4ac12150b1b3a9"
"val": "75e8fb6f996bdb9f14a03194d81969606b64043c5ca63e111e55b283b5c2520e"
},
"draft": true,
"uuid": "9d8eafd5-77be-11ec-b485-5405db9a3e49"
Expand Down
4 changes: 2 additions & 2 deletions internal/testdata/TestBuild_explicit_type
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
],
"outlays": [
{
"amount": "0",
"amount": "0.00",
"desc": "Something paid for by us",
"i": 1
}
Expand Down Expand Up @@ -203,7 +203,7 @@
"head": {
"dig": {
"alg": "sha256",
"val": "bb92e46be74b9df1cf3685f080c83eae28fa32c5bb70cc0a616c329b7f279983"
"val": "8356b324fc950dd6bb7c2160d5147a016cb33eda835b3dce6d5dae75ef18382a"
},
"uuid": "9d8eafd5-77be-11ec-b485-5405db9a3e49"
}
Expand Down
4 changes: 2 additions & 2 deletions internal/testdata/TestBuild_merge_YAML
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
],
"outlays": [
{
"amount": "0",
"amount": "0.00",
"desc": "Something paid for by us",
"i": 1
}
Expand Down Expand Up @@ -203,7 +203,7 @@
"head": {
"dig": {
"alg": "sha256",
"val": "b1125f6fdf1fd1d5b62c01bbfcb7f0601f295bf62b07a6a8b8d1331a51b83060"
"val": "a09519cb64a4f522bbe947fc456c65f3b12249ea97b248283e7764ce4cdc6f9e"
},
"uuid": "9d8eafd5-77be-11ec-b485-5405db9a3e49"
}
Expand Down
4 changes: 2 additions & 2 deletions internal/testdata/TestBuild_success
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
],
"outlays": [
{
"amount": "0",
"amount": "0.00",
"desc": "Something paid for by us",
"i": 1
}
Expand Down Expand Up @@ -203,7 +203,7 @@
"head": {
"dig": {
"alg": "sha256",
"val": "03a1f2f94974f3216f64b83a417e147d2533d508c80e4193dfec0756fda67329"
"val": "9ea70310cbd58c30e059b683ce7225c100e75a5d7320447679737dc702b50ee3"
},
"uuid": "9d8eafd5-77be-11ec-b485-5405db9a3e49"
}
Expand Down
4 changes: 2 additions & 2 deletions internal/testdata/TestBuild_template_with_empty_input
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
],
"outlays": [
{
"amount": "0",
"amount": "0.00",
"desc": "Something paid for by us",
"i": 1
}
Expand Down Expand Up @@ -203,7 +203,7 @@
"head": {
"dig": {
"alg": "sha256",
"val": "24b96319f7ca19ae7084186e906fc0502e1029061f9fa662a6809cca62b290b4"
"val": "e0c939d64f6d687195b2985e1c0e2bbc42896f3ee65ee7b1916b360f4cfc6351"
},
"uuid": "9d8eafd5-77be-11ec-b485-5405db9a3e49"
}
Expand Down
4 changes: 2 additions & 2 deletions internal/testdata/TestBuild_with_template
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
],
"outlays": [
{
"amount": "0",
"amount": "0.00",
"desc": "Something paid for by us",
"i": 1
}
Expand Down Expand Up @@ -203,7 +203,7 @@
"head": {
"dig": {
"alg": "sha256",
"val": "46f9f38d834fce42c90779f62e1a4bfe7a84c7d71ec748686446e7ae3cd4f1b6"
"val": "0b86bb6ffb2e03c42b9d8cd5ca5c39f7a3b7e2efbe40f498283ceab353398f03"
},
"uuid": "9d8eafd5-77be-11ec-b485-5405db9a3e49"
}
Expand Down
6 changes: 3 additions & 3 deletions internal/testdata/TestSign_draft_envelope
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
],
"outlays": [
{
"amount": "0",
"amount": "0.00",
"desc": "Something paid for by us",
"i": 1
}
Expand Down Expand Up @@ -203,11 +203,11 @@
"head": {
"dig": {
"alg": "sha256",
"val": "07093af20b1e931f839387a88b2c97c209cf00ac9ef778963a4ac12150b1b3a9"
"val": "75e8fb6f996bdb9f14a03194d81969606b64043c5ca63e111e55b283b5c2520e"
},
"uuid": "9d8eafd5-77be-11ec-b485-5405db9a3e49"
},
"sigs": [
"eyJhbGciOiJFUzI1NiIsImtpZCI6ImI3Y2VlNjBmLTIwNGUtNDM4Yi1hODhmLTAyMWQyOGFmNjk5MSJ9.eyJ1dWlkIjoiOWQ4ZWFmZDUtNzdiZS0xMWVjLWI0ODUtNTQwNWRiOWEzZTQ5IiwiZGlnIjp7ImFsZyI6InNoYTI1NiIsInZhbCI6IjA3MDkzYWYyMGIxZTkzMWY4MzkzODdhODhiMmM5N2MyMDljZjAwYWM5ZWY3Nzg5NjNhNGFjMTIxNTBiMWIzYTkifX0.nuZ7dkBFTOo4_SHrGDbfm998FYvHstSN2g3Z1JPEALFwYasej--jz9WflUYvyxEAQawaH3-yvsmlTmg59bMgYQ"
"eyJhbGciOiJFUzI1NiIsImtpZCI6ImI3Y2VlNjBmLTIwNGUtNDM4Yi1hODhmLTAyMWQyOGFmNjk5MSJ9.eyJ1dWlkIjoiOWQ4ZWFmZDUtNzdiZS0xMWVjLWI0ODUtNTQwNWRiOWEzZTQ5IiwiZGlnIjp7ImFsZyI6InNoYTI1NiIsInZhbCI6Ijc1ZThmYjZmOTk2YmRiOWYxNGEwMzE5NGQ4MTk2OTYwNmI2NDA0M2M1Y2E2M2UxMTFlNTViMjgzYjVjMjUyMGUifX0.zPHPdModQ7Z6tDOz5Kuxkb6t8bWNoD5TYpIoAy9Q3YkkFXNrarcb2T1neMD_nHDqZfYVFI-yR8D5D-qSsp6aNw"
]
}
6 changes: 3 additions & 3 deletions internal/testdata/TestSign_success
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
],
"outlays": [
{
"amount": "0",
"amount": "0.00",
"desc": "Something paid for by us",
"i": 1
}
Expand Down Expand Up @@ -203,11 +203,11 @@
"head": {
"dig": {
"alg": "sha256",
"val": "03a1f2f94974f3216f64b83a417e147d2533d508c80e4193dfec0756fda67329"
"val": "9ea70310cbd58c30e059b683ce7225c100e75a5d7320447679737dc702b50ee3"
},
"uuid": "9d8eafd5-77be-11ec-b485-5405db9a3e49"
},
"sigs": [
"eyJhbGciOiJFUzI1NiIsImtpZCI6ImI3Y2VlNjBmLTIwNGUtNDM4Yi1hODhmLTAyMWQyOGFmNjk5MSJ9.eyJ1dWlkIjoiOWQ4ZWFmZDUtNzdiZS0xMWVjLWI0ODUtNTQwNWRiOWEzZTQ5IiwiZGlnIjp7ImFsZyI6InNoYTI1NiIsInZhbCI6IjAzYTFmMmY5NDk3NGYzMjE2ZjY0YjgzYTQxN2UxNDdkMjUzM2Q1MDhjODBlNDE5M2RmZWMwNzU2ZmRhNjczMjkifX0.NYEH_Lj6vg3deus26aQZQ4M3rHQNKkt9iMPds3MuYNhzT_LnR17efNYCivzhyHkCyKpSMX9_4mcYgrs_S8_zhA"
"eyJhbGciOiJFUzI1NiIsImtpZCI6ImI3Y2VlNjBmLTIwNGUtNDM4Yi1hODhmLTAyMWQyOGFmNjk5MSJ9.eyJ1dWlkIjoiOWQ4ZWFmZDUtNzdiZS0xMWVjLWI0ODUtNTQwNWRiOWEzZTQ5IiwiZGlnIjp7ImFsZyI6InNoYTI1NiIsInZhbCI6IjllYTcwMzEwY2JkNThjMzBlMDU5YjY4M2NlNzIyNWMxMDBlNzVhNWQ3MzIwNDQ3Njc5NzM3ZGM3MDJiNTBlZTMifX0.STsoYdz8DGFTQ8-DNm8rmnWHWD-3SxzFoJHn3J246wK_BbzU3BQ12EvkgVTa1DaBW5RN4Z4rJypZRpm9euJDxA"
]
}

0 comments on commit 441e474

Please sign in to comment.