{
    "$id": "NotifySettlementRequest",
    "comment": "OCPP 2.1 Edition 1 (c) OCA, Creative Commons Attribution-NoDerivatives 4.0 International Public License",
    "definitions": {
        "PaymentStatusEnumType": {
            "description": "The status of the settlement attempt.\r\n\r\n",
            "javaType": "PaymentStatusEnum",
            "type": "string",
            "additionalProperties": false,
            "enum": ["Settled", "Canceled", "Rejected", "Failed"],
            "tsEnumNames": ["Settled", "Canceled", "Rejected", "Failed"]
        },
        "AddressType": {
            "description": "*(2.1)* A generic address format.\r\n",
            "javaType": "Address",
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "name": {
                    "description": "Name of person/company\r\n",
                    "type": "string",
                    "maxLength": 50
                },
                "address1": {
                    "description": "Address line 1\r\n",
                    "type": "string",
                    "maxLength": 100
                },
                "address2": {
                    "description": "Address line 2\r\n",
                    "type": "string",
                    "maxLength": 100
                },
                "city": {
                    "description": "City\r\n",
                    "type": "string",
                    "maxLength": 100
                },
                "postalCode": {
                    "description": "Postal code\r\n",
                    "type": "string",
                    "maxLength": 20
                },
                "country": {
                    "description": "Country name\r\n",
                    "type": "string",
                    "maxLength": 50
                },
                "customData": {
                    "$ref": "#/definitions/CustomDataType"
                }
            },
            "required": ["name", "address1", "city", "country"]
        },
        "CustomDataType": {
            "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.",
            "javaType": "CustomData",
            "type": "object",
            "properties": {
                "vendorId": {
                    "type": "string",
                    "maxLength": 255
                }
            },
            "required": ["vendorId"]
        }
    },
    "type": "object",
    "additionalProperties": false,
    "properties": {
        "transactionId": {
            "description": "The _transactionId_ that the settlement belongs to. Can be empty if the payment transaction is canceled prior to the start of the OCPP transaction.\r\n\r\n",
            "type": "string",
            "maxLength": 36
        },
        "pspRef": {
            "description": "The payment reference received from the payment terminal and is used as the value for _idToken_. \r\n\r\n",
            "type": "string",
            "maxLength": 255
        },
        "status": {
            "$ref": "#/definitions/PaymentStatusEnumType"
        },
        "statusInfo": {
            "description": "Additional information from payment terminal/payment process.\r\n\r\n",
            "type": "string",
            "maxLength": 500
        },
        "settlementAmount": {
            "description": "The amount that was settled, or attempted to be settled (in case of failure).\r\n\r\n",
            "type": "number"
        },
        "settlementTime": {
            "description": "The time when the settlement was done.\r\n\r\n",
            "type": "string",
            "format": "date-time"
        },
        "receiptId": {
            "type": "string",
            "maxLength": 50
        },
        "receiptUrl": {
            "description": "The receipt URL, to be used if the receipt is generated by the payment terminal or the CS.\r\n\r\n",
            "type": "string",
            "maxLength": 2000
        },
        "vatCompany": {
            "$ref": "#/definitions/AddressType"
        },
        "vatNumber": {
            "description": "VAT number for a company receipt.\r\n\r\n",
            "type": "string",
            "maxLength": 20
        },
        "customData": {
            "$ref": "#/definitions/CustomDataType"
        }
    },
    "required": ["pspRef", "status", "settlementAmount", "settlementTime"]
}
