Mini-Late Delivery and Penalty Payment

minilatedeliveryandpenalty-payment@0.4.0 Contract ^0.20.0 fb960d02f929b32b0ea4488cbd8b3b145a95ebcd7567665bf09853c3e3a5be1d

A Late Delivery And Penalty (Mini, Capped, with Payment)

Download Archive Open in Template Studio Open in VSCode Web

A Late Delivery And Penalty (Mini, Capped, with Payment)

A Late Delivery And Penalty Contract with a Penalty Cap and Emitting a Payment Obligation (Mini).

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 52% 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 52% 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, {{seller}} shall pay to
{{buyer}} 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.minilatedeliveryandpenalty.MiniLateDeliveryContract",
    "contractId": "5196e1cc-536a-491f-9d2b-8747402fff2c",
    "buyer": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Steve Seller"
    },
    "seller": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Betty Buyer"
    },
    "penaltyDuration": {
        "$class": "org.accordproject.time.Duration",
        "amount": 2,
        "unit": "days"
    },
    "penaltyPercentage": 10.5,
    "capPercentage": 52,
    "maximumDelay": {
        "$class": "org.accordproject.time.Duration",
        "amount": 15,
        "unit": "days"
    }
}

Template Model

/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

namespace org.accordproject.minilatedeliveryandpenalty

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

/**
 * Data Model for the LateDeliveryAndPenalty template.
 */
asset MiniLateDeliveryContract extends AccordContract {
  o AccordParty buyer         // Party to the contract (buyer)
  o AccordParty seller        // Party to the contract (seller)
  o Duration penaltyDuration  // Length of time resulting in penalty
  o Double penaltyPercentage  // Penalty percentage
  o Double capPercentage      // Maximum penalty percentage
  o Duration maximumDelay     // Maximum delay before termination
}

/**
 * Defines a request for the clause
 */
transaction LateRequest extends Request {
  o DateTime agreedDelivery
  o DateTime deliveredAt
  o Double goodsValue
}

/**
 * Defines a response for the clause
 */
transaction LateResponse 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": "6f4065d0-42fa-11ea-8b78-dde257dbceb0"
}

Request Types

Type Sample JSON
org.accordproject.minilatedeliveryandpenalty.LateRequest
{
    "$class": "org.accordproject.minilatedeliveryandpenalty.LateRequest",
    "agreedDelivery": "2020-01-29T19:49:56.396-05:00",
    "deliveredAt": "2020-01-29T19:49:56.396-05:00",
    "goodsValue": 12.196,
    "transactionId": "6f403ec0-42fa-11ea-8b78-dde257dbceb0",
    "timestamp": "2020-01-29T19:49:56.396-05:00"
}

Response Types

Type Sample JSON
org.accordproject.minilatedeliveryandpenalty.LateResponse
{
    "$class": "org.accordproject.minilatedeliveryandpenalty.LateResponse",
    "penalty": 61.193,
    "buyerMayTerminate": true,
    "transactionId": "6f403ec1-42fa-11ea-8b78-dde257dbceb0",
    "timestamp": "2020-01-29T19:49:56.396-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": 216.663,
        "currencyCode": "BZD"
    },
    "description": "Velit duis cupidatat.",
    "contract": "resource:org.accordproject.minilatedeliveryandpenalty.MiniLateDeliveryContract#2794",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#1039",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#4989",
    "deadline": "2020-01-29T19:49:56.397-05:00",
    "eventId": "6f4065d1-42fa-11ea-8b78-dde257dbceb0",
    "timestamp": "2020-01-29T19:49:56.397-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.