---
# System prepended metadata

title: Pair Programming

---

# Pair Programming 

## Agenda

* 13:00 - 13:15: boas-vindas e agenda
* 13:15 - 13:40: definição de escopo e arquitetura com o time
* 13:40 - 15:00: programação com Chain
* 15:00 - 15:10: intervalo
* 15:10 - 16:30: programação com Simas
* 16:30 - 17:00: apresentação do projeto, discussão e perguntas

## Backlog

Stakeholders have requested the following features as an addition to the API.

-----
1. If all the risk answers are false and the user has an income lower than 25k, then he is ineligible for all insurance lines.

    *Input*

    ```jsx
    {
      "age": 35,
      "dependents": 2,
      "house": {"ownership_status": "owned"},
      "income": 20000,
      "marital_status": "married",
      "risk_questions": [0, 0, 0],
      "vehicle": {"year": 2018}
    }
    ```

    *Output*

    ```jsx
    {
        "auto": "ineligible",
        "disability": "ineligible",
        "home": "ineligible",
        "life": "ineligible"
    }
    ```
    
-------
2. Houses have a status ( owned and rented). If owned she is eligible for Home insurance. If rented she is eligible for Renters insurance and Home rules are applied to it.

    *Input*

    ```jsx
    {
      "age": 35,
      "dependents": 2,
      "house": {"ownership_status": "rented"},
    // "house": {"ownership_status": "owned"}, "income": 0,
      "marital_status": "married",
      "risk_questions": [0, 1, 0],
      "vehicle": {"year": 2018}
    }
    ```

    *Output*

    ```jsx
    {
        "auto": "regular",
        "disability": "ineligible",
        "renters": "economic",
    //  "home": "economic, 
        "life": "regular"
    }
    ```

----
3. Add `Umbrella` insurance line. If the user got an `economic` score in any of the four main lines of insurance (life, disability, home & auto), he is eligible to get umbrella insurance. Base rules are applied to it.

    *Input*
    
    ```jsx
    {
      "age": 35,
      "dependents": 2,
      "house": {"ownership_status": "owned"},
      "income": 0,
      "marital_status": "married",
      "risk_questions": [0, 1, 0],
      "vehicle": {"year": 2018}
    }
    ```
    
    ```jsx
    {
        "auto": "regular",
        "disability": "ineligible",
        "home": "economic",
        "life": "regular",
    		"umbrella": "economic"
    }
    ```
----
4. The user can have from 0 to N `vehicles` and `houses`. The payload will change to a `list` of `objects`. If the user has only one vehicle, add 1 point to that vehicle’s score. This same rule applies to houses.
    
    *Input*
    
    ```jsx
    {
      "age": 35,
      "dependents": 2,
      "houses": [
        {"id": 1, "ownership_status": "owned"}
      ],
      "income": 0,
      "marital_status": "married",
      "risk_questions": [0, 1, 0],
      "vehicles": [
        {"id": 1, "year": 2019},
        {"id": 2, "year": 2010},
        {"id": 3, "year": 2012},
      ]
    }
    ```
    
    *Output*
    
    ```jsx
    {
        "auto": [
            {"id": 1, "plan": "regular"},
            {"id": 2, "plan": "economic"},
            {"id": 3, "plan": "economic"},
        ],
        "disability": "ineligible",
        "home": [
            {"id": 1, "plan": "regular"}
        ],
        "life": "regular",
    }
    ```