Eat Apples

eat-apples@0.10.0 Clause ^0.20.0 3162dda8f7c02f9675b07ca1149e1fe91e67422f593aff98535cb28274bb9047

This is a clause enforcing healthy eating habits in employees.

Download Archive Open in Template Studio

Eat Apples!

This is a clause enforcing healthy eating habits in employees.

Template Text

Grammar

Eating healthy clause between {{employee}} (the Employee) and {{company}} (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 {{tax}}% tax.

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.

Sample Data

{
    "$class": "org.accordproject.canteen.CanteenClause",
    "clauseId": "25ea79c6-71e5-4f6f-acc9-c14ccd280b4a",
    "employee": "Dan",
    "company": "ACME",
    "tax": 4.5
}

Template Model

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": "e9a746e1-ff3e-11e9-b361-efc0ae54bdd6"
}

Request Types

Type Sample JSON
org.accordproject.canteen.Food
{
    "$class": "org.accordproject.canteen.Food",
    "produce": "Quis ex mollit duis.",
    "price": 110.329,
    "transactionId": "e9a71fd0-ff3e-11e9-b361-efc0ae54bdd6",
    "timestamp": "2019-11-04T15:08:48.461-05:00"
}

Response Types

Type Sample JSON
org.accordproject.canteen.Outcome
{
    "$class": "org.accordproject.canteen.Outcome",
    "notice": "Cupidatat.",
    "transactionId": "e9a746e0-ff3e-11e9-b361-efc0ae54bdd6",
    "timestamp": "2019-11-04T15:08:48.462-05:00"
}

Events Types

Type Sample JSON
org.accordproject.base.Event
{
    "abstract": "this is an abstract type"
}

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.