{
    "type": "object",
    "properties": {
        "id": {
            "type": "integer"
        },
        "client_key": {
            "type": "string"
        },
        "number": {
            "type": "string"
        },
        "purchase_order": {
            "type": "string"
        },
        "tax2": {
            "type": "null"
        },
        "tax2_amount": {
            "type": "integer"
        },
        "discount_amount": {
            "type": "integer"
        },
        "subject": {
            "type": "string"
        },
        "notes": {
            "type": "string"
        },
        "state": {
            "type": "string"
        },
        "issue_date": {
            "type": "string"
        },
        "due_date": {
            "type": "string"
        },
        "payment_term": {
            "type": "string"
        },
        "closed_at": {
            "type": "null"
        },
        "created_at": {
            "type": "string"
        },
        "updated_at": {
            "type": "string"
        },
        "currency": {
            "type": "string"
        },
        "payment_options": {
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "client": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            },
            "required": [
                "id",
                "name"
            ]
        },
        "estimate": {
            "type": "null"
        },
        "retainer": {
            "type": "null"
        },
        "creator": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            },
            "required": [
                "id",
                "name"
            ]
        },
        "line_items": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "kind": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "taxed": {
                        "type": "boolean"
                    },
                    "taxed2": {
                        "type": "boolean"
                    },
                    "project": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name",
                            "code"
                        ]
                    }
                },
                "required": [
                    "id",
                    "kind",
                    "description",
                    "quantity",
                    "unit_price",
                    "amount",
                    "taxed",
                    "taxed2",
                    "project"
                ]
            }
        }
    },
    "required": [
        "id",
        "client_key",
        "number",
        "purchase_order",
        "amount",
        "due_amount",
        "tax",
        "tax_amount",
        "tax2",
        "tax2_amount",
        "discount",
        "discount_amount",
        "subject",
        "notes",
        "state",
        "period_start",
        "period_end",
        "issue_date",
        "due_date",
        "payment_term",
        "sent_at",
        "paid_at",
        "closed_at",
        "recurring_invoice_id",
        "created_at",
        "updated_at",
        "paid_date",
        "currency",
        "payment_options",
        "client",
        "estimate",
        "retainer",
        "creator",
        "line_items"
    ],
    "version": 1
}
