Fork me on GitHub

Template eat-apples@0.3.0

Clause Ergo ^0.7.1 df64bfb068a021d232b28c88958648f22be2349fc604b3c895db75b086f500d5

This is a clause enforcing healthy eating habits in employees.

Download Archive

Eat Apples!

This is a clause enforcing healthy eating habits in employees.

Sample

Eating healthy clause between "Dan" (the Employee) and "ACME" (the Company). The canteen only sells apple products. Apples, apple juice, apple flapjacks, toffee apples. Employee gets fired if caught eating anything without apples in it. THE EMPLOYEE, IF ALLERGIC TO APPLES, SHALL ALWAYS BE HUNGRY. Apple products at the canteen are subject to a 4.5% tax.
                

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.canteen.CanteenClause",
    "clauseId": "39e76253-81b6-45a1-917e-a0912de87ed2",
    "employee": "Dan",
    "company": "ACME",
    "tax": 4.5
}

State Types

Type Sample JSON
org.accordproject.cicero.contract.AccordContractState
{
    "$class": "org.accordproject.cicero.contract.AccordContractState",
    "stateId": "6e49e541-ac5e-11e8-ae05-7b30d9585bc6"
}

Request Types

Type Sample JSON
org.accordproject.canteen.Food
{
    "$class": "org.accordproject.canteen.Food",
    "produce": "Aliquip non sunt.",
    "price": 158.803,
    "transactionId": "6e49be30-ac5e-11e8-ae05-7b30d9585bc6",
    "timestamp": "2018-08-30T14:10:21.203Z"
}

Response Types

Type Sample JSON
org.accordproject.canteen.Outcome
{
    "$class": "org.accordproject.canteen.Outcome",
    "notice": "Quis amet labore laboris.",
    "transactionId": "6e49e540-ac5e-11e8-ae05-7b30d9585bc6",
    "timestamp": "2018-08-30T14:10:21.204Z"
}

Events Types

Type Sample JSON
org.hyperledger.composer.system.Event
{
    "abstract": "this is an abstract type"
}