Late Invoice with Payment

lateinvoicewithpayment@0.5.1 Contract ^0.20.0 eaac35d7a1cd8d81301f7c9e8a9fcc77f60b47276be6abd13c4569060f8fa5fe

A sample Late invoice clause which emits a payment obligation.

Download Archive Open in Template Studio

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": "35d2b9f5-1b31-4368-bdfc-9bee9a7ca340",
    "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": "cf407cb0-1d5f-11ea-9a89-51fed438a842"
}

Request Types

Type Sample JSON
org.accordproject.lateinvoicewithpayment.LateInvoiceRequest
{
    "$class": "org.accordproject.lateinvoicewithpayment.LateInvoiceRequest",
    "invoiceDue": "2019-12-12T23:19:52.442-05:00",
    "amountDue": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 166.757,
        "currencyCode": "XBC"
    },
    "transactionId": "cf4055a0-1d5f-11ea-9a89-51fed438a842",
    "timestamp": "2019-12-12T23:19:52.442-05:00"
}

Response Types

Type Sample JSON
org.accordproject.lateinvoicewithpayment.LateInvoiceResponse
{
    "$class": "org.accordproject.lateinvoicewithpayment.LateInvoiceResponse",
    "paymentRequired": true,
    "cause": "Sunt pariatur sint.",
    "transactionId": "cf4055a1-1d5f-11ea-9a89-51fed438a842",
    "timestamp": "2019-12-12T23:19:52.442-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": 207.243,
        "currencyCode": "BAM"
    },
    "description": "Elit.",
    "contract": "resource:org.accordproject.lateinvoicewithpayment.LateInvoiceContract#1655",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#5995",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#2570",
    "deadline": "2019-12-12T23:19:52.443-05:00",
    "eventId": "cf407cb1-1d5f-11ea-9a89-51fed438a842",
    "timestamp": "2019-12-12T23:19:52.443-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.