Please report issues and contribute improvements on GitHub!

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

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": "7ed44bb7-4e2d-4147-9fe9-7f8cd97c733c",
    "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": "9a1ac2f1-60ab-11e9-ba69-a3cec1fc66e2"
}

Request Types

Type Sample JSON
org.accordproject.lateinvoicewithpayment.LateInvoiceRequest
{
    "$class": "org.accordproject.lateinvoicewithpayment.LateInvoiceRequest",
    "invoiceDue": "2019-04-17T00:56:15.262+00:00",
    "amountDue": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 164.426,
        "currencyCode": "PYG"
    },
    "transactionId": "9a1a9be0-60ab-11e9-ba69-a3cec1fc66e2",
    "timestamp": "2019-04-17T00:56:15.262+00:00"
}

Response Types

Type Sample JSON
org.accordproject.lateinvoicewithpayment.LateInvoiceResponse
{
    "$class": "org.accordproject.lateinvoicewithpayment.LateInvoiceResponse",
    "paymentRequired": false,
    "cause": "Amet ad quis proident est.",
    "transactionId": "9a1ac2f0-60ab-11e9-ba69-a3cec1fc66e2",
    "timestamp": "2019-04-17T00:56:15.263+00:00"
}

Events Types

Type Sample JSON
org.accordproject.cicero.runtime.PaymentObligation
{
    "$class": "org.accordproject.cicero.runtime.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 106.189,
        "currencyCode": "TMT"
    },
    "description": "Anim ex non.",
    "contract": "resource:org.accordproject.lateinvoicewithpayment.LateInvoiceContract#5622",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#7841",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#9033",
    "deadline": "2019-04-17T00:56:15.264+00:00",
    "eventId": "9a1aea00-60ab-11e9-ba69-a3cec1fc66e2",
    "timestamp": "2019-04-17T00:56:15.264+00:00"
}