Template lateinvoicewithpayment@0.4.0

Contract ^0.13.0 5e38f7939cf588f9ec9656b6310080528b8506c9bb33f597f67ac73c13a2acb3

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": "00304976-d5f9-45de-a843-c12bbf6325cd",
    "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": "782b7221-9cce-11e9-9a6f-d5f6456622aa"
}

Request Types

Type Sample JSON
org.accordproject.lateinvoicewithpayment.LateInvoiceRequest
{
    "$class": "org.accordproject.lateinvoicewithpayment.LateInvoiceRequest",
    "invoiceDue": "2019-07-02T09:37:00.481-04:00",
    "amountDue": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 195.412,
        "currencyCode": "KES"
    },
    "transactionId": "782b4b10-9cce-11e9-9a6f-d5f6456622aa",
    "timestamp": "2019-07-02T09:37:00.481-04:00"
}

Response Types

Type Sample JSON
org.accordproject.lateinvoicewithpayment.LateInvoiceResponse
{
    "$class": "org.accordproject.lateinvoicewithpayment.LateInvoiceResponse",
    "paymentRequired": true,
    "cause": "Ex.",
    "transactionId": "782b7220-9cce-11e9-9a6f-d5f6456622aa",
    "timestamp": "2019-07-02T09:37:00.482-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": 212.86,
        "currencyCode": "BWP"
    },
    "description": "Sit voluptate elit.",
    "contract": "resource:org.accordproject.lateinvoicewithpayment.LateInvoiceContract#1900",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#5380",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#0154",
    "deadline": "2019-07-02T09:37:00.483-04:00",
    "eventId": "782b9930-9cce-11e9-9a6f-d5f6456622aa",
    "timestamp": "2019-07-02T09:37:00.483-04:00"
}