Template lateinvoicewithpayment@0.3.1

Contract ^0.12.0 d391fcaf7db43ae80cd21a94642de42b440cb204253a3f912b56eeab349ede0b

A sample Late invoice clause which emits a payment obligation.

Download Archive Open in Template Studio Open in VSCode Web

Late Invoice Clause With Payment

A sample Late invoice clause which emits a payment obligation.

Sample

            2.4 "Betty Buyer" is not required to pay any invoice that is issued more than 180 days after it is due to be issued by "Steve Seller".
          

Model Dependencies

Technical Integration

Please refer to the Cicero documentation for details and examples of how to integrate a call to a Cicero template into your application.

View the Latest code for this template on on GitHub.

Sample Instance

{
    "$class": "org.accordproject.lateinvoicewithpayment.LateInvoiceContract",
    "contractId": "8fca49aa-3b10-4af1-839f-64806df8dc52",
    "maximumDelay": {
        "$class": "org.accordproject.time.Duration",
        "amount": 180,
        "unit": "days"
    },
    "purchaser": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Betty Buyer"
    },
    "supplier": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Steve Seller"
    }
}

State Types

Type Sample JSON
org.accordproject.cicero.contract.AccordContractState
{
    "$class": "org.accordproject.cicero.contract.AccordContractState",
    "stateId": "24800f90-8942-11e9-b9ba-87d1cf618bec"
}

Request Types

Type Sample JSON
org.accordproject.lateinvoicewithpayment.LateInvoiceRequest
{
    "$class": "org.accordproject.lateinvoicewithpayment.LateInvoiceRequest",
    "invoiceDue": "2019-06-07T12:34:38.472-04:00",
    "amountDue": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 186.479,
        "currencyCode": "KES"
    },
    "transactionId": "247fe880-8942-11e9-b9ba-87d1cf618bec",
    "timestamp": "2019-06-07T12:34:38.472-04:00"
}

Response Types

Type Sample JSON
org.accordproject.lateinvoicewithpayment.LateInvoiceResponse
{
    "$class": "org.accordproject.lateinvoicewithpayment.LateInvoiceResponse",
    "paymentRequired": true,
    "cause": "Ea officia.",
    "transactionId": "247fe881-8942-11e9-b9ba-87d1cf618bec",
    "timestamp": "2019-06-07T12:34:38.472-04:00"
}

Events Types

Type Sample JSON
org.accordproject.cicero.runtime.PaymentObligation
{
    "$class": "org.accordproject.cicero.runtime.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 187.059,
        "currencyCode": "ISK"
    },
    "description": "Lorem.",
    "contract": "resource:org.accordproject.lateinvoicewithpayment.LateInvoiceContract#9226",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#8371",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#6154",
    "deadline": "2019-06-07T12:34:38.473-04:00",
    "eventId": "24800f91-8942-11e9-b9ba-87d1cf618bec",
    "timestamp": "2019-06-07T12:34:38.473-04:00"
}