{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$anchor": "cdm.product.common.settlement",
  "type": "object",
  "title": "Cashflow",
  "description": "Class to specify a cashflow, i.e. the outcome of either of computation (e.g. interest accrual) or an assessment of some sort (e.g. a fee). The cashflow can then be turned into a cash transfer, artefact to be used as the input to a payment system or the outcome of it. The associated globalKey denotes the ability to associate a hash value to the Cashflow instantiations for the purpose of model cross-referencing, in support of functionality such as the event effect and the lineage.",
  "properties": {
    "payerReceiver": {
      "description": "Canonical representation of the payer and receiver parties applicable to each payout leg.",
      "$ref": "cdm-base-staticdata-party-PayerReceiver.schema.json"
    },
    "priceQuantity": {
      "description": "Each payout leg must implement the quantity concept as a 'resolvable' type, which allows for different payout legs to be linked to each other (e.g. in the case of cross-curreny products).",
      "$ref": "cdm-product-common-settlement-ResolvablePriceQuantity.schema.json"
    },
    "principalPayment": {
      "description": "The specification of the principal exchange. Optional as only applicable in the case of cross-currency or zero-coupon swaps with a final payment.",
      "$ref": "cdm-product-common-settlement-PrincipalPayments.schema.json"
    },
    "settlementTerms": {
      "description": "Each payout leg must specifies its settlement terms, including the delivery type (i.e. cash vs physical, and their respective terms), the transfer type (DvP etc.) and settlement date, if any.",
      "$ref": "cdm-product-common-settlement-SettlementTerms.schema.json"
    },
    "cashflowType": {
      "description": "The qualification of the type of cashflow, e.g. brokerage fee, premium, upfront fee etc. Particularly relevant when it cannot be inferred directly through lineage.",
      "$ref": "cdm-product-common-settlement-CashflowType.schema.json"
    },
    "paymentDiscounting": {
      "description": "FpML specifies the FpML PaymentDiscounting.model group for representing the discounting elements that can be associated with a payment.",
      "$ref": "cdm-product-common-settlement-PaymentDiscounting.schema.json"
    }
  },
  "required": [
    "cashflowType"
  ]
}
