Fork me on GitHub

Template eat-apples@0.0.1

Clause Ergo ^0.4.4 6991f622a14e70e9dd869c0fca6ac4a2c7903bf97e402be42f6fbb8165112d88

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": "c98de082-d1ae-461c-bb7a-d6baf79469be",
    "employee": "Dan",
    "company": "ACME",
    "tax": 4.5
}

State Types

Type Sample JSON
org.accordproject.cicero.contract.AccordContractState
{
    "$class": "org.accordproject.cicero.contract.AccordContractState",
    "stateId": "ae7a8ad2-85ed-11e8-bfc4-b186147bdb41"
}

Request Types

Type Sample JSON
org.accordproject.canteen.Food
{
    "$class": "org.accordproject.canteen.Food",
    "produce": "Tempor id Lorem.",
    "price": 158.564,
    "transactionId": "ae7a8ad0-85ed-11e8-bfc4-b186147bdb41",
    "timestamp": "2018-07-12T16:07:31.581Z"
}

Response Types

Type Sample JSON
org.accordproject.canteen.Outcome
{
    "$class": "org.accordproject.canteen.Outcome",
    "notice": "Nostrud ea voluptate ullamco.",
    "transactionId": "ae7a8ad1-85ed-11e8-bfc4-b186147bdb41",
    "timestamp": "2018-07-12T16:07:31.581Z"
}

Events Types

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