{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/fis/main/json-schema/fis-get-bill-payment-response-dto-schema.json",
  "title": "GetBillPaymentResponseDto",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fis-bill-api-openapi.yml#/components/schemas/GetBillPaymentResponseDto",
  "type": "object",
  "properties": {
    "pagination": {
      "$ref": "#/$defs/PaginationMetaData"
    },
    "meta": {
      "$ref": "#/$defs/TransactionalReportMetaData"
    },
    "count": {
      "type": "number",
      "readOnly": true,
      "format": "integer"
    },
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GetBillPaymentData"
      }
    }
  },
  "required": [
    "pagination",
    "meta",
    "count",
    "data"
  ],
  "$defs": {
    "AccountRef": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "id"
      ]
    },
    "BillPLinks": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "bill",
            "billPayment",
            "paymentOnAccount",
            "creditNote",
            "refund",
            "other"
          ]
        },
        "id": {
          "type": "string"
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "BillPaymentLineItem": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "number",
          "format": "float"
        },
        "link": {
          "deprecated": true,
          "allOf": [
            {
              "$ref": "#/$defs/BillPaymentLink"
            }
          ]
        },
        "links": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BillPLinks"
          }
        },
        "allocatedOnDate": {
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "amount"
      ]
    },
    "BillPaymentLink": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "bill",
            "billPayment",
            "paymentOnAccount",
            "creditNote",
            "refund",
            "other"
          ]
        },
        "id": {
          "type": "string"
        },
        "amount": {
          "type": "number",
          "format": "float"
        }
      },
      "required": [
        "type"
      ]
    },
    "CurrencyRef": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "symbol": {
          "type": "string"
        }
      },
      "required": [
        "id"
      ]
    },
    "GetBillPaymentData": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "vendorRef": {
          "$ref": "#/$defs/VendorRef"
        },
        "accountRef": {
          "$ref": "#/$defs/AccountRef"
        },
        "totalAmount": {
          "type": "number",
          "format": "float"
        },
        "currencyRef": {
          "$ref": "#/$defs/CurrencyRef"
        },
        "currencyRate": {
          "type": "number",
          "format": "float"
        },
        "date": {
          "format": "date-time",
          "type": "string"
        },
        "memo": {
          "type": "string"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BillPaymentLineItem"
          }
        },
        "subsidiaryRefs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SubsidiaryRef"
          }
        },
        "sourceModifiedDate": {
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "id",
        "totalAmount",
        "date"
      ]
    },
    "PaginationMetaData": {
      "type": "object",
      "properties": {
        "offset": {
          "type": "number",
          "readOnly": true
        },
        "limit": {
          "type": "number",
          "readOnly": true
        },
        "count": {
          "type": "number",
          "readOnly": true
        }
      },
      "required": [
        "offset",
        "limit",
        "count"
      ]
    },
    "SubsidiaryRef": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "TransactionalReportMetaData": {
      "type": "object",
      "properties": {
        "reportId": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "serviceName": {
          "type": "string",
          "readOnly": true,
          "enum": [
            "freshbooks",
            "quickbooks",
            "quickbooksDesktop",
            "xero",
            "oracleNetsuite",
            "sageBusinessCloud",
            "sageIntacct",
            "dynamicsBusinessCentral",
            "dynamics365Finance",
            "wave",
            "myob",
            "zohoBooks",
            "byod"
          ]
        },
        "businessName": {
          "type": "string",
          "readOnly": true
        },
        "startDate": {
          "type": "string",
          "readOnly": true,
          "format": "date-time"
        },
        "endDate": {
          "type": "string",
          "readOnly": true,
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "readOnly": true,
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "readOnly": false
        }
      },
      "required": [
        "reportId",
        "serviceName",
        "businessName",
        "startDate",
        "endDate",
        "createdAt",
        "updatedAt"
      ]
    },
    "VendorRef": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "id"
      ]
    }
  }
}