Fork me on GitHub

Template eat-apples@0.4.0

Clause Ergo ^0.8.0 c14409faca2ac4e5100530b5ed07f6d4d255f529d3cbedeef4d833ccebdf1d20

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": "c609f869-5fe2-4f93-9be3-d5156eb0baca",
    "employee": "Dan",
    "company": "ACME",
    "tax": 4.5
}

State Types

Type Sample JSON
org.accordproject.cicero.contract.AccordContractState
{
    "$class": "org.accordproject.cicero.contract.AccordContractState",
    "stateId": "06657ed2-b5f5-11e8-98f1-f70046c609b7"
}

Request Types

Type Sample JSON
org.accordproject.canteen.Food
{
    "$class": "org.accordproject.canteen.Food",
    "produce": "Id non.",
    "price": 41.067,
    "transactionId": "06657ed0-b5f5-11e8-98f1-f70046c609b7",
    "timestamp": "2018-09-11T19:01:01.373Z"
}

Response Types

Type Sample JSON
org.accordproject.canteen.Outcome
{
    "$class": "org.accordproject.canteen.Outcome",
    "notice": "Irure qui laboris qui.",
    "transactionId": "06657ed1-b5f5-11e8-98f1-f70046c609b7",
    "timestamp": "2018-09-11T19:01:01.373Z"
}

Events Types

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