Please report issues and contribute improvements on GitHub!

Template lateinvoicewithpayment@0.1.0

Contract Ergo ^0.10.0 3681762e6d7414225d2fe85759c502dcab145b03373f45877efeda39d62f6164

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.

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": "c788e9e8-c1f7-4baa-b903-df4dc502d6fa",
    "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": "71caf811-1f51-11e9-9ebb-177a1d756047"
}

Request Types

Type Sample JSON
org.accordproject.lateinvoicewithpayment.LateInvoiceRequest
{
    "$class": "org.accordproject.lateinvoicewithpayment.LateInvoiceRequest",
    "invoiceDue": "2019-01-23T20:57:07.343Z",
    "amountDue": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 93.265,
        "currencyCode": "GBP"
    },
    "transactionId": "71caa9f0-1f51-11e9-9ebb-177a1d756047",
    "timestamp": "2019-01-23T20:57:07.343Z"
}

Response Types

Type Sample JSON
org.accordproject.lateinvoicewithpayment.LateInvoiceResponse
{
    "$class": "org.accordproject.lateinvoicewithpayment.LateInvoiceResponse",
    "paymentRequired": true,
    "cause": "Qui nisi magna magna tempor.",
    "transactionId": "71caf810-1f51-11e9-9ebb-177a1d756047",
    "timestamp": "2019-01-23T20:57:07.345Z"
}

Events Types

Type Sample JSON
org.accordproject.cicero.runtime.PaymentObligation
{
    "$class": "org.accordproject.cicero.runtime.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 125.352,
        "currencyCode": "LSL"
    },
    "description": "Deserunt ex.",
    "contract": "resource:org.accordproject.lateinvoicewithpayment.LateInvoiceContract#4974",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#3342",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#6696",
    "deadline": "2019-01-23T20:57:07.346Z",
    "eventId": "71cb1f20-1f51-11e9-9ebb-177a1d756047",
    "timestamp": "2019-01-23T20:57:07.346Z"
}