{
  "properties": {
    "account_name": {
      "type": "string",
      "title": "account_name",
      "description": "The name of the account, as entered by the user or presented by the platform."
    },
    "account_type": {
      "allOf": [
        {
          "type": "string",
          "enum": [
            "checking",
            "savings",
            "debit_card",
            "pay_card"
          ]
        }
      ],
      "description": "The type of account."
    },
    "allocation_type": {
      "allOf": [
        {
          "type": "string",
          "enum": [
            "amount",
            "percentage",
            "remainder"
          ]
        }
      ],
      "description": "The type of allocation."
    },
    "amount": {
      "type": "integer",
      "title": "amount",
      "description": "The amount of this allocation, in cents. Required if `allocation_type` is `amount`."
    },
    "bank_name": {
      "type": "string",
      "title": "bank_name",
      "description": "The name of the bank associated with `allocation.routing_number`, if available."
    },
    "currency": {
      "allOf": [
        {
          "type": "string",
          "enum": [
            "AED",
            "AFN",
            "ALL",
            "AMD",
            "ANG",
            "AOA",
            "ARS",
            "AUD",
            "AWG",
            "AZN",
            "BAM",
            "BBD",
            "BDT",
            "BGN",
            "BHD",
            "BIF",
            "BMD",
            "BND",
            "BOB",
            "BOV",
            "BRL",
            "BSD",
            "BTN",
            "BWP",
            "BYR",
            "BZD",
            "CAD",
            "CDF",
            "CHE",
            "CHF",
            "CHW",
            "CLF",
            "CLP",
            "CNY",
            "COP",
            "COU",
            "CRC",
            "CUC",
            "CUP",
            "CVE",
            "CZK",
            "DJF",
            "DKK",
            "DOP",
            "DZD",
            "EGP",
            "ERN",
            "ETB",
            "EUR",
            "FJD",
            "FKP",
            "GBP",
            "GEL",
            "GHS",
            "GIP",
            "GMD",
            "GNF",
            "GTQ",
            "GYD",
            "HKD",
            "HNL",
            "HRK",
            "HTG",
            "HUF",
            "IDR",
            "ILS",
            "INR",
            "IQD",
            "IRR",
            "ISK",
            "JMD",
            "JOD",
            "JPY",
            "KES",
            "KGS",
            "KHR",
            "KMF",
            "KPW",
            "KRW",
            "KWD",
            "KYD",
            "KZT",
            "LAK",
            "LBP",
            "LKR",
            "LRD",
            "LSL",
            "LTL",
            "LVL",
            "LYD",
            "MAD",
            "MDL",
            "MGA",
            "MKD",
            "MMK",
            "MNT",
            "MOP",
            "MRO",
            "MUR",
            "MVR",
            "MWK",
            "MXN",
            "MXV",
            "MYR",
            "MZN",
            "NAD",
            "NGN",
            "NIO",
            "NOK",
            "NPR",
            "NZD",
            "OMR",
            "PAB",
            "PEN",
            "PGK",
            "PHP",
            "PKR",
            "PLN",
            "PYG",
            "QAR",
            "RON",
            "RSD",
            "RUB",
            "RWF",
            "SAR",
            "SBD",
            "SCR",
            "SDG",
            "SEK",
            "SGD",
            "SHP",
            "SLL",
            "SOS",
            "SRD",
            "SSP",
            "STD",
            "SYP",
            "SZL",
            "THB",
            "TJS",
            "TMT",
            "TND",
            "TOP",
            "TRY",
            "TTD",
            "TWD",
            "TZS",
            "UAH",
            "UGX",
            "USD",
            "USN",
            "USS",
            "UYI",
            "UYU",
            "UZS",
            "VEF",
            "VND",
            "VUV",
            "WST",
            "XAF",
            "XAG",
            "XAU",
            "XBA",
            "XBB",
            "XBC",
            "XBD",
            "XCD",
            "XDR",
            "XOF",
            "XPD",
            "XPF",
            "XPT",
            "XTS",
            "XXX",
            "YER",
            "ZAR",
            "ZMW"
          ]
        }
      ],
      "description": "Three-letter ISO 4217 currency code, uppercase. For example, the code for US dollars is USD."
    },
    "masked_account_number": {
      "type": "string",
      "maxLength": 4,
      "minLength": 2,
      "title": "masked_account_number",
      "description": "Either the last two or four digits associated with the allocation, dependent on what is displayed by the platform."
    },
    "percentage": {
      "type": "number",
      "title": "percentage",
      "description": "The percentage of this allocation. Required if `allocation_type` is `percentage`."
    },
    "priority": {
      "type": "integer",
      "title": "priority",
      "description": "The priority of this allocation. Lower priority allocations are filled first."
    },
    "routing_number": {
      "type": "string",
      "title": "routing_number",
      "description": "Either the full routing number or last four digits of the routing number associated with the allocation, dependent on what is displayed by the platform."
    }
  },
  "type": "object",
  "required": [
    "allocation_type",
    "currency"
  ],
  "title": "Allocation",
  "x-tags": [
    "Schemas"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schema.pinwheelapi.com/AllocationAccountObjResponse.json"
}