{
  "$defs": {
    "FoodVouchers": {
      "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.",
      "properties": {
        "account_number": {
          "description": "Customer's account number (maps to `numeroDeCuenta`).",
          "title": "Account Number",
          "type": "string"
        },
        "employer_registration": {
          "description": "Customer's employer registration number (maps to `registroPatronal`).",
          "title": "Employer Registration",
          "type": "string"
        },
        "lines": {
          "description": "List of food vouchers issued to the customer's employees (maps to `Conceptos`).",
          "items": {
            "$ref": "#/$defs/FoodVouchersLine"
          },
          "title": "Lines",
          "type": "array"
        },
        "total": {
          "$ref": "https://gobl.org/draft-0/num/amount",
          "calculated": true,
          "description": "Sum of all line amounts (calculated, maps to `total`).",
          "title": "Total"
        }
      },
      "required": [
        "account_number",
        "total",
        "lines"
      ],
      "type": "object"
    },
    "FoodVouchersEmployee": {
      "description": "FoodVouchersEmployee represents an employee that received a food voucher.",
      "properties": {
        "curp": {
          "$ref": "https://gobl.org/draft-0/cbc/code",
          "description": "Employee's CURP (\"Clave \u00danica de Registro de Poblaci\u00f3n\", maps to `curp`).",
          "title": "Employee's CURP"
        },
        "name": {
          "description": "Employee's name (maps to `nombre`).",
          "title": "Employee's Name",
          "type": "string"
        },
        "social_security": {
          "$ref": "https://gobl.org/draft-0/cbc/code",
          "description": "Employee's Social Security Number (maps to `numSeguridadSocial`).",
          "title": "Employee's Social Security Number"
        },
        "tax_code": {
          "$ref": "https://gobl.org/draft-0/cbc/code",
          "description": "Employee's tax identity code (maps to `rfc`).",
          "title": "Employee's Tax Identity Code"
        }
      },
      "required": [
        "tax_code",
        "curp",
        "name"
      ],
      "type": "object"
    },
    "FoodVouchersLine": {
      "description": "FoodVouchersLine represents a single food voucher issued to the e-wallet of one of the customer's employees.",
      "properties": {
        "amount": {
          "$ref": "https://gobl.org/draft-0/num/amount",
          "description": "Amount of the food voucher (maps to `importe`).",
          "title": "Amount"
        },
        "e_wallet_id": {
          "$ref": "https://gobl.org/draft-0/cbc/code",
          "description": "Identifier of the e-wallet that received the food voucher (maps to `Identificador`).",
          "title": "E-wallet Identifier"
        },
        "employee": {
          "$ref": "#/$defs/FoodVouchersEmployee",
          "description": "Employee that received the food voucher.",
          "title": "Employee"
        },
        "issue_date_time": {
          "$ref": "https://gobl.org/draft-0/cal/date-time",
          "description": "Date and time of the food voucher's issue (maps to `Fecha`).",
          "title": "Issue Date and Time"
        }
      },
      "required": [
        "e_wallet_id",
        "issue_date_time",
        "amount"
      ],
      "type": "object"
    }
  },
  "$id": "https://gobl.org/draft-0/regimes/mx/food-vouchers",
  "$ref": "#/$defs/FoodVouchers",
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}