Late Invoice with Payment

lateinvoicewithpayment@0.5.0 Contract ^0.20.0 cb030d7b4bb57b6a8642428c5593f2145d55ed81bb1455fc55569db78244fa0d

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.

Template Text

Grammar

2.4 {{purchaser}} is not required to pay any invoice that is issued more than {{maximumDelay}} after it is due to be issued by {{supplier}}.

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".

Sample Data

{
    "$class": "org.accordproject.lateinvoicewithpayment.LateInvoiceContract",
    "contractId": "0ae495ba-639c-46a7-899a-b72b10394e07",
    "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"
    }
}

Template Model

Model Dependencies

Template Logic

Find the full logic for this template on on GitHub.

State Types

Type Sample JSON
org.accordproject.cicero.contract.AccordContractState
{
    "$class": "org.accordproject.cicero.contract.AccordContractState",
    "stateId": "f77b02c1-ff3e-11e9-b361-efc0ae54bdd6"
}

Request Types

Type Sample JSON
org.accordproject.lateinvoicewithpayment.LateInvoiceRequest
{
    "$class": "org.accordproject.lateinvoicewithpayment.LateInvoiceRequest",
    "invoiceDue": "2019-11-04T15:09:11.659-05:00",
    "amountDue": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 222.184,
        "currencyCode": "ETB"
    },
    "transactionId": "f77adbb0-ff3e-11e9-b361-efc0ae54bdd6",
    "timestamp": "2019-11-04T15:09:11.659-05:00"
}

Response Types

Type Sample JSON
org.accordproject.lateinvoicewithpayment.LateInvoiceResponse
{
    "$class": "org.accordproject.lateinvoicewithpayment.LateInvoiceResponse",
    "paymentRequired": true,
    "cause": "Pariatur.",
    "transactionId": "f77b02c0-ff3e-11e9-b361-efc0ae54bdd6",
    "timestamp": "2019-11-04T15:09:11.660-05:00"
}

Events Types

Type Sample JSON
org.accordproject.cicero.runtime.PaymentObligation
{
    "$class": "org.accordproject.cicero.runtime.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 58.718,
        "currencyCode": "CRC"
    },
    "description": "Est sit.",
    "contract": "resource:org.accordproject.lateinvoicewithpayment.LateInvoiceContract#6121",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#0158",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#7492",
    "deadline": "2019-11-04T15:09:11.660-05:00",
    "eventId": "f77b02c2-ff3e-11e9-b361-efc0ae54bdd6",
    "timestamp": "2019-11-04T15:09:11.660-05:00"
}

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 GitHub.