From e8b768b978e0eb6b05875fc773351c1a5fea9e4a Mon Sep 17 00:00:00 2001 From: Sam Lown Date: Mon, 9 Oct 2023 16:40:17 +0000 Subject: [PATCH] Release 0.62.0 --- data/schemas/bill/correction-options.json | 2 +- data/schemas/bill/invoice.json | 2 +- data/schemas/cal/date-time.json | 2 +- data/schemas/cal/date.json | 2 +- data/schemas/cal/period.json | 2 +- data/schemas/cbc/code-map.json | 2 +- data/schemas/cbc/code.json | 2 +- data/schemas/cbc/key.json | 2 +- data/schemas/cbc/meta.json | 2 +- data/schemas/cbc/note.json | 2 +- data/schemas/currency/code.json | 2 +- data/schemas/currency/exchange-rate.json | 2 +- data/schemas/dsig/digest.json | 2 +- data/schemas/dsig/signature.json | 2 +- data/schemas/envelope.json | 2 +- data/schemas/head/header.json | 2 +- data/schemas/head/stamp.json | 2 +- data/schemas/i18n/string.json | 2 +- data/schemas/l10n/code.json | 2 +- data/schemas/l10n/country-code.json | 2 +- data/schemas/note/message.json | 2 +- data/schemas/num/amount.json | 2 +- data/schemas/num/percentage.json | 2 +- data/schemas/org/address.json | 2 +- data/schemas/org/coordinates.json | 2 +- data/schemas/org/email.json | 2 +- data/schemas/org/identity.json | 2 +- data/schemas/org/image.json | 2 +- data/schemas/org/inbox.json | 2 +- data/schemas/org/item.json | 2 +- data/schemas/org/name.json | 2 +- data/schemas/org/party.json | 2 +- data/schemas/org/person.json | 2 +- data/schemas/org/registration.json | 2 +- data/schemas/org/telephone.json | 2 +- data/schemas/org/unit.json | 2 +- data/schemas/org/website.json | 2 +- data/schemas/pay/advance.json | 2 +- data/schemas/pay/instructions.json | 2 +- data/schemas/pay/terms.json | 2 +- data/schemas/regimes/mx/food-vouchers.json | 105 +++++++++++ .../regimes/mx/fuel-account-balance.json | 167 ++++++++++++++++++ data/schemas/schema/object.json | 2 +- data/schemas/tax/identity.json | 2 +- data/schemas/tax/regime.json | 41 ++++- data/schemas/tax/set.json | 2 +- data/schemas/tax/total.json | 2 +- data/schemas/uuid/uuid.json | 2 +- version.go | 2 +- 49 files changed, 358 insertions(+), 47 deletions(-) create mode 100644 data/schemas/regimes/mx/food-vouchers.json create mode 100644 data/schemas/regimes/mx/fuel-account-balance.json diff --git a/data/schemas/bill/correction-options.json b/data/schemas/bill/correction-options.json index 597c4436..75c968c5 100644 --- a/data/schemas/bill/correction-options.json +++ b/data/schemas/bill/correction-options.json @@ -51,5 +51,5 @@ "description": "CorrectionOptions defines a structure used to pass configuration options to correct a previous invoice." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/bill/invoice.json b/data/schemas/bill/invoice.json index 91b22211..3b4016cd 100644 --- a/data/schemas/bill/invoice.json +++ b/data/schemas/bill/invoice.json @@ -818,5 +818,5 @@ "description": "Totals contains the summaries of all calculations for the invoice." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/cal/date-time.json b/data/schemas/cal/date-time.json index 8b07db66..0aeebf96 100644 --- a/data/schemas/cal/date-time.json +++ b/data/schemas/cal/date-time.json @@ -10,5 +10,5 @@ "description": "Civil date time in simplified ISO format with no time zone\ninformation, for example: 2021-05-26T13:45:00" } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/cal/date.json b/data/schemas/cal/date.json index e6180001..7eb7941a 100644 --- a/data/schemas/cal/date.json +++ b/data/schemas/cal/date.json @@ -10,5 +10,5 @@ "description": "Civil date in simplified ISO format, like 2021-05-26" } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/cal/period.json b/data/schemas/cal/period.json index bbda7981..a2eebe6b 100644 --- a/data/schemas/cal/period.json +++ b/data/schemas/cal/period.json @@ -29,5 +29,5 @@ "description": "Period represents two dates with a start and finish." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/cbc/code-map.json b/data/schemas/cbc/code-map.json index 576fb1c5..5ca6c1c9 100644 --- a/data/schemas/cbc/code-map.json +++ b/data/schemas/cbc/code-map.json @@ -13,5 +13,5 @@ "description": "CodeMap is a map of keys to specific codes, useful to determine regime specific codes from their key counterparts." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/cbc/code.json b/data/schemas/cbc/code.json index e0dd6244..b66f0c82 100644 --- a/data/schemas/cbc/code.json +++ b/data/schemas/cbc/code.json @@ -12,5 +12,5 @@ "description": "Alphanumerical text identifier with upper-case letters, no whitespace, nor symbols." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/cbc/key.json b/data/schemas/cbc/key.json index 900cda1c..2fd2c643 100644 --- a/data/schemas/cbc/key.json +++ b/data/schemas/cbc/key.json @@ -12,5 +12,5 @@ "description": "Text identifier to be used instead of a code for a more verbose but readable identifier." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/cbc/meta.json b/data/schemas/cbc/meta.json index b642b6d5..fb892b10 100644 --- a/data/schemas/cbc/meta.json +++ b/data/schemas/cbc/meta.json @@ -13,5 +13,5 @@ "description": "Meta defines a structure for data about the data being defined." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/cbc/note.json b/data/schemas/cbc/note.json index f2ec23fe..7b84c6e6 100644 --- a/data/schemas/cbc/note.json +++ b/data/schemas/cbc/note.json @@ -165,5 +165,5 @@ "description": "Note represents a free text of additional information that may be added to a document." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/currency/code.json b/data/schemas/currency/code.json index 2c38a861..cf2d164d 100644 --- a/data/schemas/currency/code.json +++ b/data/schemas/currency/code.json @@ -675,5 +675,5 @@ "description": "ISO Currency Code" } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/currency/exchange-rate.json b/data/schemas/currency/exchange-rate.json index 38868c28..0f77b25f 100644 --- a/data/schemas/currency/exchange-rate.json +++ b/data/schemas/currency/exchange-rate.json @@ -24,5 +24,5 @@ "description": "ExchangeRate contains data on the rate to be used when converting amounts from the document's base currency to whatever is defined." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/dsig/digest.json b/data/schemas/dsig/digest.json index 2db41036..36845ace 100644 --- a/data/schemas/dsig/digest.json +++ b/data/schemas/dsig/digest.json @@ -24,5 +24,5 @@ "description": "Digest defines a structure to hold a digest value including the algorithm used to generate it." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/dsig/signature.json b/data/schemas/dsig/signature.json index 037aa55d..2690bc54 100644 --- a/data/schemas/dsig/signature.json +++ b/data/schemas/dsig/signature.json @@ -9,5 +9,5 @@ "description": "JSON Web Signature in compact form." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/envelope.json b/data/schemas/envelope.json index e4ba43f2..001bd98f 100644 --- a/data/schemas/envelope.json +++ b/data/schemas/envelope.json @@ -38,5 +38,5 @@ "description": "Envelope wraps around a document adding headers and digital signatures." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/head/header.json b/data/schemas/head/header.json index defc784b..f180c111 100644 --- a/data/schemas/head/header.json +++ b/data/schemas/head/header.json @@ -55,5 +55,5 @@ "description": "Header defines the metadata of the body." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/head/stamp.json b/data/schemas/head/stamp.json index 2055d585..4f05a976 100644 --- a/data/schemas/head/stamp.json +++ b/data/schemas/head/stamp.json @@ -24,5 +24,5 @@ "description": "Stamp defines an official seal of approval from a third party like a governmental agency or intermediary and should thus be included in any official envelopes." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/i18n/string.json b/data/schemas/i18n/string.json index 69048136..027c8785 100644 --- a/data/schemas/i18n/string.json +++ b/data/schemas/i18n/string.json @@ -15,5 +15,5 @@ "description": "Map of 2-Letter language codes to their translations." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/l10n/code.json b/data/schemas/l10n/code.json index 389f4111..ecdf6a18 100644 --- a/data/schemas/l10n/code.json +++ b/data/schemas/l10n/code.json @@ -10,5 +10,5 @@ "description": "Code is used for short identifies like country or state codes." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/l10n/country-code.json b/data/schemas/l10n/country-code.json index cf1a48d1..ac7a5679 100644 --- a/data/schemas/l10n/country-code.json +++ b/data/schemas/l10n/country-code.json @@ -1007,5 +1007,5 @@ "description": "Defines an ISO 3166-2 country code" } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/note/message.json b/data/schemas/note/message.json index f5200e04..b8abdfc6 100644 --- a/data/schemas/note/message.json +++ b/data/schemas/note/message.json @@ -34,5 +34,5 @@ ] } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/num/amount.json b/data/schemas/num/amount.json index ec6527ab..7d35d54c 100644 --- a/data/schemas/num/amount.json +++ b/data/schemas/num/amount.json @@ -10,5 +10,5 @@ "description": "Quantity with optional decimal places that determine accuracy." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/num/percentage.json b/data/schemas/num/percentage.json index 8aa32c7c..b868e1a2 100644 --- a/data/schemas/num/percentage.json +++ b/data/schemas/num/percentage.json @@ -10,5 +10,5 @@ "description": "Similar to an Amount, but designed for percentages and includes % symbol in JSON output." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/org/address.json b/data/schemas/org/address.json index a4cb5144..7ba284f5 100644 --- a/data/schemas/org/address.json +++ b/data/schemas/org/address.json @@ -88,5 +88,5 @@ "description": "Address defines a globally acceptable set of attributes that describes a postal or fiscal address." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/org/coordinates.json b/data/schemas/org/coordinates.json index 6250dfd6..0fdef129 100644 --- a/data/schemas/org/coordinates.json +++ b/data/schemas/org/coordinates.json @@ -30,5 +30,5 @@ "description": "Coordinates describes an exact geographical location in the world." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/org/email.json b/data/schemas/org/email.json index 793af66c..f327277c 100644 --- a/data/schemas/org/email.json +++ b/data/schemas/org/email.json @@ -32,5 +32,5 @@ "description": "Email describes the electronic mailing details." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/org/identity.json b/data/schemas/org/identity.json index 128b0300..9ff2a94d 100644 --- a/data/schemas/org/identity.json +++ b/data/schemas/org/identity.json @@ -38,5 +38,5 @@ "description": "Identity is used to define a code for a specific context." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/org/image.json b/data/schemas/org/image.json index 4c68b51d..760625e8 100644 --- a/data/schemas/org/image.json +++ b/data/schemas/org/image.json @@ -61,5 +61,5 @@ "description": "Image describes a logo or photo that represents an entity." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/org/inbox.json b/data/schemas/org/inbox.json index 5e52506b..81ffd00d 100644 --- a/data/schemas/org/inbox.json +++ b/data/schemas/org/inbox.json @@ -38,5 +38,5 @@ "description": "Inbox is used to store data about a connection with a service that is responsible for potentially receiving copies of GOBL envelopes or other document formats defined locally." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/org/item.json b/data/schemas/org/item.json index f9427d7a..7aad1175 100644 --- a/data/schemas/org/item.json +++ b/data/schemas/org/item.json @@ -75,5 +75,5 @@ "description": "Item is used to describe a single product or service." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/org/name.json b/data/schemas/org/name.json index ffdc8a6e..d3f4f0eb 100644 --- a/data/schemas/org/name.json +++ b/data/schemas/org/name.json @@ -59,5 +59,5 @@ "description": "Name represents what a human is called." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/org/party.json b/data/schemas/org/party.json index 18f8cf91..06552028 100644 --- a/data/schemas/org/party.json +++ b/data/schemas/org/party.json @@ -112,5 +112,5 @@ "description": "Party represents a person or business entity." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/org/person.json b/data/schemas/org/person.json index 848b6583..8d837dee 100644 --- a/data/schemas/org/person.json +++ b/data/schemas/org/person.json @@ -57,5 +57,5 @@ "description": "Person represents a human, and how to contact them electronically." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/org/registration.json b/data/schemas/org/registration.json index 754ec7c0..93e8d6ba 100644 --- a/data/schemas/org/registration.json +++ b/data/schemas/org/registration.json @@ -50,5 +50,5 @@ "description": "Registration is used in countries that require additional information to be associated with a company usually related to a specific registration office." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/org/telephone.json b/data/schemas/org/telephone.json index 590516e6..10f04c96 100644 --- a/data/schemas/org/telephone.json +++ b/data/schemas/org/telephone.json @@ -28,5 +28,5 @@ "description": "Telephone describes what is expected for a telephone number." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/org/unit.json b/data/schemas/org/unit.json index 32e373ba..390177cf 100644 --- a/data/schemas/org/unit.json +++ b/data/schemas/org/unit.json @@ -219,5 +219,5 @@ "description": "Unit describes how the quantity of the product should be interpreted." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/org/website.json b/data/schemas/org/website.json index 69809225..e1fe0fa0 100644 --- a/data/schemas/org/website.json +++ b/data/schemas/org/website.json @@ -34,5 +34,5 @@ "description": "Website describes what is expected for a web address." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/pay/advance.json b/data/schemas/pay/advance.json index aa7dfbd6..e600c1dc 100644 --- a/data/schemas/pay/advance.json +++ b/data/schemas/pay/advance.json @@ -125,5 +125,5 @@ "description": "Advance represents a single payment that has been made already, such as a deposit on an intent to purchase, or as credit from a previous invoice which was later corrected or cancelled." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/pay/instructions.json b/data/schemas/pay/instructions.json index 84115f8c..dc2f63c8 100644 --- a/data/schemas/pay/instructions.json +++ b/data/schemas/pay/instructions.json @@ -221,5 +221,5 @@ "description": "Online provides the details required to make a payment online using a website" } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/pay/terms.json b/data/schemas/pay/terms.json index 7551c387..bc004b62 100644 --- a/data/schemas/pay/terms.json +++ b/data/schemas/pay/terms.json @@ -120,5 +120,5 @@ "description": "Terms defines when we expect the customer to pay, or have paid, for the contents of the document." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/regimes/mx/food-vouchers.json b/data/schemas/regimes/mx/food-vouchers.json new file mode 100644 index 00000000..8b4b7ed0 --- /dev/null +++ b/data/schemas/regimes/mx/food-vouchers.json @@ -0,0 +1,105 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://gobl.org/draft-0/regimes/mx/food-vouchers", + "$ref": "#/$defs/FoodVouchers", + "$defs": { + "FoodVouchers": { + "properties": { + "employer_registration": { + "type": "string", + "title": "Employer Registration", + "description": "Customer's employer registration number (maps to `registroPatronal`)." + }, + "account_number": { + "type": "string", + "title": "Account Number", + "description": "Customer's account number (maps to `numeroDeCuenta`)." + }, + "total": { + "$ref": "https://gobl.org/draft-0/num/amount", + "title": "Total", + "description": "Sum of all line amounts (calculated, maps to `total`).", + "calculated": true + }, + "lines": { + "items": { + "$ref": "#/$defs/FoodVouchersLine" + }, + "type": "array", + "title": "Lines", + "description": "List of food vouchers issued to the customer's employees (maps to `Conceptos`)." + } + }, + "type": "object", + "required": [ + "account_number", + "total", + "lines" + ], + "description": "FoodVouchers carries the data to produce a CFDI's \"Complemento de Vales de Despensa\" (version 1.0) providing detailed information about food vouchers issued by an e-wallet supplier to its customer's employees." + }, + "FoodVouchersEmployee": { + "properties": { + "tax_code": { + "$ref": "https://gobl.org/draft-0/cbc/code", + "title": "Employee's Tax Identity Code", + "description": "Employee's tax identity code (maps to `rfc`)." + }, + "curp": { + "$ref": "https://gobl.org/draft-0/cbc/code", + "title": "Employee's CURP", + "description": "Employee's CURP (\"Clave Única de Registro de Población\", maps to `curp`)." + }, + "name": { + "type": "string", + "title": "Employee's Name", + "description": "Employee's name (maps to `nombre`)." + }, + "social_security": { + "$ref": "https://gobl.org/draft-0/cbc/code", + "title": "Employee's Social Security Number", + "description": "Employee's Social Security Number (maps to `numSeguridadSocial`)." + } + }, + "type": "object", + "required": [ + "tax_code", + "curp", + "name" + ], + "description": "FoodVouchersEmployee represents an employee that received a food voucher." + }, + "FoodVouchersLine": { + "properties": { + "e_wallet_id": { + "$ref": "https://gobl.org/draft-0/cbc/code", + "title": "E-wallet Identifier", + "description": "Identifier of the e-wallet that received the food voucher (maps to `Identificador`)." + }, + "issue_date_time": { + "$ref": "https://gobl.org/draft-0/cal/date-time", + "title": "Issue Date and Time", + "description": "Date and time of the food voucher's issue (maps to `Fecha`)." + }, + "employee": { + "$ref": "#/$defs/FoodVouchersEmployee", + "title": "Employee", + "description": "Employee that received the food voucher." + }, + "amount": { + "$ref": "https://gobl.org/draft-0/num/amount", + "title": "Amount", + "description": "Amount of the food voucher (maps to `importe`)." + } + }, + "type": "object", + "required": [ + "e_wallet_id", + "issue_date_time", + "amount" + ], + "description": "FoodVouchersLine represents a single food voucher issued to the e-wallet of one of the customer's employees." + } + }, + "$comment": "Generated with GOBL v0.62.0" +} \ No newline at end of file diff --git a/data/schemas/regimes/mx/fuel-account-balance.json b/data/schemas/regimes/mx/fuel-account-balance.json new file mode 100644 index 00000000..c3f7ce5f --- /dev/null +++ b/data/schemas/regimes/mx/fuel-account-balance.json @@ -0,0 +1,167 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://gobl.org/draft-0/regimes/mx/fuel-account-balance", + "$ref": "#/$defs/FuelAccountBalance", + "$defs": { + "FuelAccountBalance": { + "properties": { + "account_number": { + "type": "string", + "title": "Account Number", + "description": "Customer's account number (maps to `NumeroDeCuenta`)." + }, + "subtotal": { + "$ref": "https://gobl.org/draft-0/num/amount", + "title": "Subtotal", + "description": "Sum of all line totals (i.e. taxes not included) (calculated, maps to `SubTotal`).", + "calculated": true + }, + "total": { + "$ref": "https://gobl.org/draft-0/num/amount", + "title": "Total", + "description": "Grand total after taxes have been applied (calculated, maps to `Total`).", + "calculated": true + }, + "lines": { + "items": { + "$ref": "#/$defs/FuelAccountLine" + }, + "type": "array", + "title": "Lines", + "description": "List of fuel purchases made with the customer's e-wallets (maps to `Conceptos`)." + } + }, + "type": "object", + "required": [ + "account_number", + "subtotal", + "total", + "lines" + ], + "description": "FuelAccountBalance carries the data to produce a CFDI's \"Complemento de Estado de Cuenta de Combustibles para Monederos Electrónicos\" (version 1.2 revision B) providing detailed information about fuel purchases made with electronic wallets." + }, + "FuelAccountItem": { + "properties": { + "type": { + "$ref": "https://gobl.org/draft-0/cbc/code", + "title": "Type", + "description": "Type of fuel (one of `c_ClaveTipoCombustible` codes, maps to `TipoCombustible`)." + }, + "unit": { + "$ref": "https://gobl.org/draft-0/org/unit", + "title": "Unit", + "description": "Reference unit of measure used in the price and the quantity (maps to `Unidad`)." + }, + "name": { + "type": "string", + "title": "Name", + "description": "Name of the fuel (maps to `NombreCombustible`)." + }, + "price": { + "$ref": "https://gobl.org/draft-0/num/amount", + "title": "Price", + "description": "Base price of a single unit of the fuel without taxes (maps to `ValorUnitario`)." + } + }, + "type": "object", + "required": [ + "type", + "name", + "price" + ], + "description": "FuelAccountItem provides the details of a fuel purchase." + }, + "FuelAccountLine": { + "properties": { + "e_wallet_id": { + "$ref": "https://gobl.org/draft-0/cbc/code", + "title": "E-wallet Identifier", + "description": "Identifier of the e-wallet used to make the purchase (maps to `Identificador`)." + }, + "purchase_date_time": { + "$ref": "https://gobl.org/draft-0/cal/date-time", + "title": "Purchase Date and Time", + "description": "Date and time of the purchase (maps to `Fecha`)." + }, + "vendor_tax_code": { + "$ref": "https://gobl.org/draft-0/cbc/code", + "title": "Vendor's Tax Identity Code", + "description": "Tax Identity Code of the fuel's vendor (maps to `Rfc`)" + }, + "service_station_code": { + "$ref": "https://gobl.org/draft-0/cbc/code", + "title": "Service Station Code", + "description": "Code of the service station where the purchase was made (maps to `ClaveEstacion`)." + }, + "quantity": { + "$ref": "https://gobl.org/draft-0/num/amount", + "title": "Quantity", + "description": "Amount of fuel units purchased (maps to `Cantidad`)" + }, + "item": { + "$ref": "#/$defs/FuelAccountItem", + "title": "Item", + "description": "Details of the fuel purchased." + }, + "purchase_code": { + "$ref": "https://gobl.org/draft-0/cbc/code", + "title": "Purchase Code", + "description": "Identifier of the purchase (maps to `FolioOperacion`)." + }, + "total": { + "$ref": "https://gobl.org/draft-0/num/amount", + "title": "Total", + "description": "Result of quantity multiplied by the unit price (maps to `Importe`)." + }, + "taxes": { + "items": { + "$ref": "#/$defs/FuelAccountTax" + }, + "type": "array", + "title": "Taxes", + "description": "Map of taxes applied to the purchase (maps to `Traslados`)." + } + }, + "type": "object", + "required": [ + "e_wallet_id", + "purchase_date_time", + "vendor_tax_code", + "service_station_code", + "quantity", + "item", + "purchase_code", + "total", + "taxes" + ], + "description": "FuelAccountLine represents a single fuel purchase made with an e-wallet issued by the invoice's supplier." + }, + "FuelAccountTax": { + "properties": { + "code": { + "$ref": "https://gobl.org/draft-0/cbc/code", + "title": "Code", + "description": "Code that identifies the tax (\"IVA\" or \"IEPS\", maps to `Impuesto`)" + }, + "rate": { + "$ref": "https://gobl.org/draft-0/num/amount", + "title": "Rate", + "description": "Rate applicable to either the line total (tasa) or the line quantity (cuota) (maps to `TasaOCuota`)." + }, + "amount": { + "$ref": "https://gobl.org/draft-0/num/amount", + "title": "Amount", + "description": "Total amount of the tax once the rate has been applied (maps to `Importe`)." + } + }, + "type": "object", + "required": [ + "code", + "rate", + "amount" + ], + "description": "FuelAccountTax represents a single tax applied to a fuel purchase." + } + }, + "$comment": "Generated with GOBL v0.62.0" +} \ No newline at end of file diff --git a/data/schemas/schema/object.json b/data/schemas/schema/object.json index 57596436..d2802f7c 100644 --- a/data/schemas/schema/object.json +++ b/data/schemas/schema/object.json @@ -9,5 +9,5 @@ "description": "Data object whose type is determined from the \u003ccode\u003e$schema\u003c/code\u003e property." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/tax/identity.json b/data/schemas/tax/identity.json index 07f2b768..e76dc816 100644 --- a/data/schemas/tax/identity.json +++ b/data/schemas/tax/identity.json @@ -43,5 +43,5 @@ "description": "Identity stores the details required to identify an entity for tax purposes." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/tax/regime.json b/data/schemas/tax/regime.json index e44b47ee..a49a1f6c 100644 --- a/data/schemas/tax/regime.json +++ b/data/schemas/tax/regime.json @@ -489,7 +489,46 @@ "url" ], "description": "Source describes where the information for the taxes comes from." + }, + "Zone": { + "properties": { + "code": { + "$ref": "https://gobl.org/draft-0/l10n/code", + "title": "Code", + "description": "Unique zone code." + }, + "name": { + "$ref": "https://gobl.org/draft-0/i18n/string", + "title": "Name", + "description": "Name of the zone to be use if a locality or region is not applicable." + }, + "locality": { + "$ref": "https://gobl.org/draft-0/i18n/string", + "title": "Locality", + "description": "Village, town, district, or city name which should coincide with\naddress data." + }, + "region": { + "$ref": "https://gobl.org/draft-0/i18n/string", + "title": "Region", + "description": "Province, county, or state which should match address data." + }, + "codes": { + "$ref": "https://gobl.org/draft-0/cbc/code-map", + "title": "Codes", + "description": "Codes defines a set of regime specific code mappings." + }, + "meta": { + "$ref": "https://gobl.org/draft-0/cbc/meta", + "title": "Meta", + "description": "Any additional information" + } + }, + "type": "object", + "required": [ + "code" + ], + "description": "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." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/tax/set.json b/data/schemas/tax/set.json index ecc88661..225faa2a 100644 --- a/data/schemas/tax/set.json +++ b/data/schemas/tax/set.json @@ -47,5 +47,5 @@ "description": "Set defines a list of tax categories and their rates to be used alongside taxable items." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/tax/total.json b/data/schemas/tax/total.json index 993e5dc6..b7e8dee8 100644 --- a/data/schemas/tax/total.json +++ b/data/schemas/tax/total.json @@ -118,5 +118,5 @@ "description": "Total contains a set of Category Totals which in turn contain all the accumulated taxes contained in the document." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/data/schemas/uuid/uuid.json b/data/schemas/uuid/uuid.json index 58296937..77ef4cd5 100644 --- a/data/schemas/uuid/uuid.json +++ b/data/schemas/uuid/uuid.json @@ -10,5 +10,5 @@ "description": "Universally Unique Identifier. We only recommend using versions 1 and 4 within GOBL." } }, - "$comment": "Generated with GOBL v0.61.0" + "$comment": "Generated with GOBL v0.62.0" } \ No newline at end of file diff --git a/version.go b/version.go index 9b001003..4a52bf37 100644 --- a/version.go +++ b/version.go @@ -8,7 +8,7 @@ import ( type Version string // VERSION is the current version of the GOBL library. -const VERSION Version = "v0.61.0" +const VERSION Version = "v0.62.0" // Semver parses and returns semver func (v Version) Semver() *semver.Version {