Simple Late Delivery and Penalty

simplelatedeliveryandpenalty@0.8.0 Contract ^0.20.0 c0b8bb93527cd2f959bf25ba671656868ef996bbe06864811e26a961b7499d83

A Late Delivery And Penalty clause (simple).

Download Archive Open in Template Studio Open in VSCode Web

A Late Delivery And Penalty (Simple)

A Late Delivery And Penalty clause (simple).

Template Text

Late Delivery and Penalty. In case of delayed delivery of Goods, "Betty Buyer" shall pay to "Steve Seller" a penalty amounting to 10.5% of the total value of the Goods for every 2 days of delay. The total amount of penalty shall not, however, exceed 55% of the total value of the delayed goods. If the delay is more than 15 days, the Buyer is entitled to terminate this Contract.

Late Delivery and Penalty. In case of delayed delivery of Goods, "Betty Buyer" shall pay to "Steve Seller" a penalty amounting to 10.5% of the total value of the Goods for every 2 days of delay. The total amount of penalty shall not, however, exceed 55% of the total value of the delayed goods. If the delay is more than 15 days, the Buyer is entitled to terminate this Contract.
Late Delivery and Penalty. In case of delayed delivery of Goods, {{buyer}} shall pay to {{seller}} a penalty amounting to {{penaltyPercentage}}% of the total value of the Goods for every {{penaltyDuration}} of delay. The total amount of penalty shall not, however, exceed {{capPercentage}}% of the total value of the delayed goods. If the delay is more than {{maximumDelay}}, the Buyer is entitled to terminate this Contract.
{
    "$class": "org.accordproject.simplelatedeliveryandpenalty.SimpleLateDeliveryAndPenaltyContract",
    "contractId": "680e220e-3b00-49cc-830e-282bce0c2c27",
    "buyer": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Betty Buyer"
    },
    "seller": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Steve Seller"
    },
    "penaltyDuration": {
        "$class": "org.accordproject.time.Duration",
        "amount": 2,
        "unit": "days"
    },
    "penaltyPercentage": 10.5,
    "capPercentage": 55,
    "maximumDelay": {
        "$class": "org.accordproject.time.Duration",
        "amount": 15,
        "unit": "days"
    }
}

Template Model

namespace org.accordproject.simplelatedeliveryandpenalty

import org.accordproject.cicero.contract.* from https://models.accordproject.org/cicero/contract.cto
import org.accordproject.cicero.runtime.* from https://models.accordproject.org/cicero/runtime.cto
import org.accordproject.time.* from https://models.accordproject.org/v2.0/time.cto

/**
 * Defines the data model for the LateDeliveryAndPenalty template.
 * This defines the structure of the abstract syntax tree that the parser for the template
 * must generate from input source text.
 */
asset SimpleLateDeliveryAndPenaltyContract extends AccordContract {
  o AccordParty buyer
  o AccordParty seller
  o Duration penaltyDuration
  o Double penaltyPercentage
  o Double capPercentage
  o Duration maximumDelay
}

/**
 * Defines the input data required by the template
 */
transaction SimpleLateDeliveryAndPenaltyRequest extends Request {
  o DateTime agreedDelivery
  o DateTime deliveredAt optional
  o Double goodsValue
}

/**
 * Defines the output data for the template
 */
transaction SimpleLateDeliveryAndPenaltyResponse extends Response {
  o Double penalty
  o Boolean buyerMayTerminate
}

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": "9df7c762-42fa-11ea-8b78-dde257dbceb0"
}

Request Types

Type Sample JSON
org.accordproject.simplelatedeliveryandpenalty.SimpleLateDeliveryAndPenaltyRequest
{
    "$class": "org.accordproject.simplelatedeliveryandpenalty.SimpleLateDeliveryAndPenaltyRequest",
    "agreedDelivery": "2020-01-29T19:51:14.774-05:00",
    "deliveredAt": "2020-01-29T19:51:14.774-05:00",
    "goodsValue": 158.092,
    "transactionId": "9df7c760-42fa-11ea-8b78-dde257dbceb0",
    "timestamp": "2020-01-29T19:51:14.774-05:00"
}

Response Types

Type Sample JSON
org.accordproject.simplelatedeliveryandpenalty.SimpleLateDeliveryAndPenaltyResponse
{
    "$class": "org.accordproject.simplelatedeliveryandpenalty.SimpleLateDeliveryAndPenaltyResponse",
    "penalty": 153.412,
    "buyerMayTerminate": true,
    "transactionId": "9df7c761-42fa-11ea-8b78-dde257dbceb0",
    "timestamp": "2020-01-29T19:51:14.774-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": 87.891,
        "currencyCode": "XUA"
    },
    "description": "Ad id voluptate est irure.",
    "contract": "resource:org.accordproject.simplelatedeliveryandpenalty.SimpleLateDeliveryAndPenaltyContract#3901",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#7968",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#2496",
    "deadline": "2020-01-29T19:51:14.775-05:00",
    "eventId": "9df7c763-42fa-11ea-8b78-dde257dbceb0",
    "timestamp": "2020-01-29T19:51:14.775-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.