---
title: Hypothesis
slug: oip-next/n2vhrq5jcnrlsbtruygxf
icon: {"lucideIcon":"📘"}
createdAt: 2024-04-08T10:17:29.000Z
---

# Hypothesis

## Description

L'entité Hypothesis contient les données de simulation. Elle sera utilisée notamment lors de contrats d'épargne ou de retraite.

## Relations

### Ascendantes

| Entité | Propriété  |
| ------ | ---------- |
| Offer  | hypothesis |

### Descendantes

| Entité                 | Propriété              |
| ---------------------- | ---------------------- |
| History                | history                |
| HypothesisResult       | hypothesisResults      |
| SeverancePayHypothesis | severancePayHypothesis |
| WaiverRequest          | waiverRequests         |

## Propriétés

| Nom                                    | Type                                   | Description                                                                                                                                                                                                | Validateur | Lecture seule ? | Dépréciée ? | Dernière version modifiée |
| -------------------------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | --------------- | ----------- | ------------------------- |
| annualDeposit                          | `Number`                               | Versement Annuel.                                                                                                                                                                                          |            |                 |             | 2.5.0                     |
| annualProgressRate                     | `Number`                               | Taux de progression annuel.                                                                                                                                                                                |            |                 |             | 2.5.0                     |
| arrearsFeeRate                         | `Number`                               | Taux de frais de gestion sur arrérages.                                                                                                                                                                    |            |                 |             | 2.7.0                     |
| brokerFees                             | `Number[]`                             | Part dévolue au commissionnement du courtier (frais sur versement, frais garantie de bonne fin, frais sur encours).                                                                                        |            |                 |             | 2.6.0                     |
| brokerFeesType                         | `HypothesisBrokerFeesTypeEnum`         | Type de commissionnement.                                                                                                                                                                                  |            |                 |             | 2.6.0                     |
| contributionBase                       | `HypothesisContributionBaseEnum`       | Base observée soumise au taux, généralement les salaires bruts ou les tranches A, B et C, y compris les 12èmes et les Xèmes mois, ainsi que tous les versements soumis aux charges sociales.               |            |                 |             | 2.6.0                     |
| effectDate                             | `Date`                                 | Date d'effet.                                                                                                                                                                                              |            |                 |             | 2.7.0                     |
| eurosExpenseRatio                      | `Number`                               | Frais encours euros.                                                                                                                                                                                       |            |                 |             | 2.5.0                     |
| feeRate                                | `Number[]`                             | Taux de cotisation (en %).                                                                                                                                                                                 |            |                 |             | 2.6.0                     |
| feesRateInEurosExpenseRatio            | `Number`                               | Taux de frais sur encours en euros.                                                                                                                                                                        |            |                 |             | 2.7.0                     |
| feesRateOnCompletionWarranty           | `Number`                               | Il s'agit des frais sur la garantie de bonne fin.                                                                                                                                                          |            |                 |             | 2.9.0                     |
| feesRateOnDeposit                      | `Number`                               | Frais sur versement.                                                                                                                                                                                       |            |                 |             | 2.5.0                     |
| feesRateUnitsOfAccountsExpenseRatio    | `Number`                               | Taux de frais sur encours en UC.                                                                                                                                                                           |            |                 |             | 2.7.0                     |
| fixedRateInEurosExpenseRatio           | `Number`                               | Taux incompressible assureur sur l'encours en euros.                                                                                                                                                       |            |                 |             | 2.7.0                     |
| fixedRateOnArrearsFee                  | `Number`                               | Taux incompressible assureur sur arrérage.                                                                                                                                                                 |            |                 |             | 2.7.0                     |
| fixedRateOnCompletionWarrantyFee       | `Number`                               | Taux incompressible assureur sur l'encours sur la garantie bonne fin.                                                                                                                                      |            |                 |             | 2.7.0                     |
| fixedRateOnMandatoryDeposit            | `Number`                               | Taux incompressible assureur sur versements obligatoires.                                                                                                                                                  |            |                 |             | 2.7.0                     |
| fixedRateOnUnitsOfAccountsExpenseRatio | `Number`                               | Taux incompressible assureur sur l'encours en UC.                                                                                                                                                          |            |                 |             | 2.7.0                     |
| freeDepositValue                       | `Number`                               | Il s'agit du versement initial.                                                                                                                                                                            |            |                 |             | 2.10.0                    |
| netRate                                | `Number`                               | Rendement net affecté au capital (en %).                                                                                                                                                                   |            |                 |             | 2.6.0                     |
| netRateType                            | `HypothesisNetRateTypeEnum`            | Rendement réellement affecté au capital, excluant les frais de gestion sur encours. Par exemple, un rendement brut de 4 %, dont 0,80 % sont des frais de gestion, aboutissant à un rendement net de 3,2 %. |            |                 |             | 2.6.0                     |
| optionalDeathCoverages                 | `HypothesisOptionalDeathCoveragesEnum` | Couverture décès optionnelle.                                                                                                                                                                              |            |                 |             | 2.7.0                     |
| periodicity                            | `HypothesisPeriodicityEnum`            | Périodicité.                                                                                                                                                                                               |            |                 |             | 2.5.0                     |
| rateType                               | `HypothesisRateTypeEnum`               | Type de taux.                                                                                                                                                                                              |            |                 |             | 2.6.0                     |
| retirementAge                          | `Number`                               | Age de départ à la retraite.                                                                                                                                                                               |            |                 |             | 2.5.0                     |
| transferDepositValue                   | `Number`                               | Montant transfert entrant.                                                                                                                                                                                 |            |                 |             | 2.5.0                     |
| type                                   | `HypothesisTypeEnum`                   | Il s'agit du type de simulation.                                                                                                                                                                           |            |                 |             | 2.8.0                     |
| unitsOfAccountsExpenseRatio            | `Number`                               | Frais encours UC.                                                                                                                                                                                          |            |                 |             | 2.5.0                     |
| id                                     | `String`                               | Identifiant de l'entité `Hypothesis`                                                                                                                                                                       |            | X               |             |                           |
| code                                   | `String`                               | Codification fonctionnelle de l'entité `Hypothesis`                                                                                                                                                        |            |                 |             |                           |
| externalId                             | `String`                               | Identifiant de l'entité `Hypothesis` dans le système client                                                                                                                                                |            |                 |             |                           |
| externalCode                           | `String`                               | Codification fonctionnelle de l'entité `Hypothesis` dans le système client                                                                                                                                 |            |                 |             |                           |
| hypothesisId                           | `String`                               | Identifiant public de l'entité `Hypothesis` dans l'OIP                                                                                                                                                     |            |                 |             |                           |
| label                                  | `String`                               | Information relative au nom de l'entité `Hypothesis` dans son contexte d'utilisation                                                                                                                       |            |                 |             |                           |
| createdAt                              | `Date`                                 | Date de création de l'entité `Hypothesis`                                                                                                                                                                  |            | X               |             |                           |
| updatedAt                              | `Date`                                 | Date de modification de l'entité `Hypothesis`                                                                                                                                                              |            | X               |             |                           |

## Enumérations

### HypothesisBrokerFeesTypeEnum

- `DISTRIBUTED`
- `GLOBAL`

### HypothesisContributionBaseEnum

- `PASS`
- `SALARY`

### HypothesisNetRateTypeEnum

- `AVERAGE`
- `CUSTOM`
- `HIGH`
- `LOW`
- `NONE`

### HypothesisOptionalDeathCoveragesEnum

- `COMPLETION_WARRANTY`
- `MINIMUM_WARRANTY`
- `NONE`
- `WAIVER_WARRANTY`

### HypothesisPeriodicityEnum

- `HALF_YEARLY`
- `MONTHLY`
- `QUARTERLY`
- `YEARLY`

### HypothesisRateTypeEnum

- `DISTRIBUTED`
- `GLOBAL`

### HypothesisTypeEnum

- `FUNDING_PLAN_CALCULATION`
- `SOCIAL_LIABILITY_CALCULATION`

## Enumérations génériques

Aucune enumération générique.

## Exemple

```javascript
import { Entities } from '@fasstech/oip-core';
import { getHypothesisAnnualDeposit, getHypothesisAnnualProgressRate, getHypothesisArrearsFeeRate, getHypothesisBrokerFees, getHypothesisBrokerFeesType, getHypothesisCode, getHypothesisContributionBase, getHypothesisEffectDate, getHypothesisEurosExpenseRatio, getHypothesisExternalCode, getHypothesisExternalId, getHypothesisFeeRate, getHypothesisFeesRateInEurosExpenseRatio, getHypothesisFeesRateOnCompletionWarranty, getHypothesisFeesRateOnDeposit, getHypothesisFeesRateUnitsOfAccountsExpenseRatio, getHypothesisFixedRateInEurosExpenseRatio, getHypothesisFixedRateOnArrearsFee, getHypothesisFixedRateOnCompletionWarrantyFee, getHypothesisFixedRateOnMandatoryDeposit, getHypothesisFixedRateOnUnitsOfAccountsExpenseRatio, getHypothesisFreeDepositValue, getHypothesisHypothesisId, getHypothesisId, getHypothesisLabel, getHypothesisNetRate, getHypothesisNetRateType, getHypothesisOptionalDeathCoverages, getHypothesisPeriodicity, getHypothesisRateType, getHypothesisRetirementAge, getHypothesisTransferDepositValue, getHypothesisType, getHypothesisUnitsOfAccountsExpenseRatio, setHypothesisAnnualDeposit, setHypothesisAnnualProgressRate, setHypothesisArrearsFeeRate, setHypothesisBrokerFees, setHypothesisBrokerFeesType, setHypothesisCode, setHypothesisContributionBase, setHypothesisEffectDate, setHypothesisEurosExpenseRatio, setHypothesisExternalCode, setHypothesisExternalId, setHypothesisFeeRate, setHypothesisFeesRateInEurosExpenseRatio, setHypothesisFeesRateOnCompletionWarranty, setHypothesisFeesRateOnDeposit, setHypothesisFeesRateUnitsOfAccountsExpenseRatio, setHypothesisFixedRateInEurosExpenseRatio, setHypothesisFixedRateOnArrearsFee, setHypothesisFixedRateOnCompletionWarrantyFee, setHypothesisFixedRateOnMandatoryDeposit, setHypothesisFixedRateOnUnitsOfAccountsExpenseRatio, setHypothesisFreeDepositValue, setHypothesisHypothesisId, setHypothesisLabel, setHypothesisNetRate, setHypothesisNetRateType, setHypothesisOptionalDeathCoverages, setHypothesisPeriodicity, setHypothesisRateType, setHypothesisRetirementAge, setHypothesisTransferDepositValue, setHypothesisType, setHypothesisUnitsOfAccountsExpenseRatio } from '@fasstech/oip-core/entities/Hypothesis';
import { HypothesisBrokerFeesTypeEnum, HypothesisContributionBaseEnum, HypothesisNetRateTypeEnum, HypothesisOptionalDeathCoveragesEnum, HypothesisPeriodicityEnum, HypothesisRateTypeEnum, HypothesisTypeEnum } from '@fasstech/oip-core/entities/Hypothesis/enums';
import { getOfferId } from '@fasstech/oip-core/entities/Offer';
import { getProjectId } from '@fasstech/oip-core/entities/Project';

(async () => {
  let project = await Entities('Project').create();
  let offer = await Entities('Offer').create();
  const hypothesis = await Entities('Hypothesis').create();
  
  setHypothesisAnnualDeposit(97, hypothesis);
  setHypothesisAnnualProgressRate(97, hypothesis);
  setHypothesisArrearsFeeRate(97, hypothesis);
  setHypothesisBrokerFees([98], hypothesis);
  setHypothesisBrokerFeesType(HypothesisBrokerFeesTypeEnum.DISTRIBUTED, hypothesis);
  setHypothesisContributionBase(HypothesisContributionBaseEnum.SALARY, hypothesis);
  setHypothesisEffectDate(new Date('2017-01-01'), hypothesis);
  setHypothesisEurosExpenseRatio(101, hypothesis);
  setHypothesisFeeRate([102], hypothesis);
  setHypothesisFeesRateInEurosExpenseRatio(102, hypothesis);
  setHypothesisFeesRateOnCompletionWarranty(102, hypothesis);
  setHypothesisFeesRateOnDeposit(102, hypothesis);
  setHypothesisFeesRateUnitsOfAccountsExpenseRatio(102, hypothesis);
  setHypothesisFixedRateInEurosExpenseRatio(102, hypothesis);
  setHypothesisFixedRateOnArrearsFee(102, hypothesis);
  setHypothesisFixedRateOnCompletionWarrantyFee(102, hypothesis);
  setHypothesisFixedRateOnMandatoryDeposit(102, hypothesis);
  setHypothesisFixedRateOnUnitsOfAccountsExpenseRatio(102, hypothesis);
  setHypothesisFreeDepositValue(102, hypothesis);
  setHypothesisNetRate(110, hypothesis);
  setHypothesisNetRateType(HypothesisNetRateTypeEnum.AVERAGE, hypothesis);
  setHypothesisOptionalDeathCoverages([HypothesisOptionalDeathCoveragesEnum.WAIVER_WARRANTY], hypothesis);
  setHypothesisPeriodicity(HypothesisPeriodicityEnum.HALF_YEARLY, hypothesis);
  setHypothesisRateType(HypothesisRateTypeEnum.DISTRIBUTED, hypothesis);
  setHypothesisRetirementAge(114, hypothesis);
  setHypothesisTransferDepositValue(116, hypothesis);
  setHypothesisType(HypothesisTypeEnum.FUNDING_PLAN_CALCULATION, hypothesis);
  setHypothesisUnitsOfAccountsExpenseRatio(117, hypothesis);
  setHypothesisCode('code', hypothesis);
  setHypothesisExternalId('externalId', hypothesis);
  setHypothesisExternalCode('externalCode', hypothesis);
  setHypothesisHypothesisId('hypothesisId', hypothesis);
  setHypothesisLabel('label', hypothesis);
  
  offer = await Entities('Hypothesis').save(offer, hypothesis);
  project = await Entities('Offer').save(project, offer);
  await Entities('Project').save(project);
  
  const projectToTest = await Entities('Project').get({ id: getProjectId(project) });
  const offerToTest = await Entities('Offer').get(projectToTest, { filter: ({ id }) => id === getOfferId(offer) });
  const hypothesisToTest = await Entities('Hypothesis').get(offerToTest, { filter: ({ id }) => id === getHypothesisId(hypothesis) });
  
  getHypothesisAnnualDeposit(hypothesisToTest); // 97
  getHypothesisAnnualProgressRate(hypothesisToTest); // 97
  getHypothesisArrearsFeeRate(hypothesisToTest); // 97
  getHypothesisBrokerFees(hypothesisToTest); // [98]
  getHypothesisBrokerFeesType(hypothesisToTest); // HypothesisBrokerFeesTypeEnum.DISTRIBUTED
  getHypothesisContributionBase(hypothesisToTest); // HypothesisContributionBaseEnum.SALARY
  getHypothesisEffectDate(hypothesisToTest); // new Date('2017-01-01')
  getHypothesisEurosExpenseRatio(hypothesisToTest); // 101
  getHypothesisFeeRate(hypothesisToTest); // [102]
  getHypothesisFeesRateInEurosExpenseRatio(hypothesisToTest); // 102
  getHypothesisFeesRateOnCompletionWarranty(hypothesisToTest); // 102
  getHypothesisFeesRateOnDeposit(hypothesisToTest); // 102
  getHypothesisFeesRateUnitsOfAccountsExpenseRatio(hypothesisToTest); // 102
  getHypothesisFixedRateInEurosExpenseRatio(hypothesisToTest); // 102
  getHypothesisFixedRateOnArrearsFee(hypothesisToTest); // 102
  getHypothesisFixedRateOnCompletionWarrantyFee(hypothesisToTest); // 102
  getHypothesisFixedRateOnMandatoryDeposit(hypothesisToTest); // 102
  getHypothesisFixedRateOnUnitsOfAccountsExpenseRatio(hypothesisToTest); // 102
  getHypothesisFreeDepositValue(hypothesisToTest); // 102
  getHypothesisNetRate(hypothesisToTest); // 110
  getHypothesisNetRateType(hypothesisToTest); // HypothesisNetRateTypeEnum.AVERAGE
  getHypothesisOptionalDeathCoverages(hypothesisToTest); // [HypothesisOptionalDeathCoveragesEnum.WAIVER_WARRANTY]
  getHypothesisPeriodicity(hypothesisToTest); // HypothesisPeriodicityEnum.HALF_YEARLY
  getHypothesisRateType(hypothesisToTest); // HypothesisRateTypeEnum.DISTRIBUTED
  getHypothesisRetirementAge(hypothesisToTest); // 114
  getHypothesisTransferDepositValue(hypothesisToTest); // 116
  getHypothesisType(hypothesisToTest); // HypothesisTypeEnum.FUNDING_PLAN_CALCULATION
  getHypothesisUnitsOfAccountsExpenseRatio(hypothesisToTest); // 117
  getHypothesisCode(hypothesisToTest); // 'code'
  getHypothesisExternalId(hypothesisToTest); // 'externalId'
  getHypothesisExternalCode(hypothesisToTest); // 'externalCode'
  getHypothesisHypothesisId(hypothesisToTest); // 'hypothesisId'
  getHypothesisLabel(hypothesisToTest); // 'label'
})();
```
