Waiver
Waiver
Description
L'entité Waiver contient la structure tarifaire sur laquelle une dérogation sera appliquée.
Relations
Ascendantes
Entité | Propriété |
|---|---|
WaiverRequest | waivers |
Descendantes
Entité | Propriété |
|---|---|
History | history |
WaiverDetail | waiverDetails |
Propriétés
Nom | Type | Description | Validateur | Lecture seule ? | Dépréciée ? | DerniÚre version modifiée |
|---|---|---|---|---|---|---|
tariffStructure | WaiverTariffStructureEnum | Structure tarifaire sur laquelle on va appliquer la remise ou la majoration | ï»ż | ï»ż | ï»ż | 2.7.0 |
id | String | Identifiant de l'entitĂ© Waiver | ï»ż | X | ï»ż | ï»ż |
code | String | Codification fonctionnelle de l'entitĂ© Waiver | ï»ż | ï»ż | ï»ż | ï»ż |
externalId | String | Identifiant de l'entitĂ© Waiver dans le systĂšme client | ï»ż | ï»ż | ï»ż | ï»ż |
externalCode | String | Codification fonctionnelle de l'entitĂ© Waiver dans le systĂšme client | ï»ż | ï»ż | ï»ż | ï»ż |
waiverId | String | Identifiant public de l'entitĂ© Waiver dans l'OIP | ï»ż | ï»ż | ï»ż | ï»ż |
label | String | Information relative au nom de l'entitĂ© Waiver dans son contexte d'utilisation | ï»ż | ï»ż | ï»ż | ï»ż |
createdAt | Date | Date de crĂ©ation de l'entitĂ© Waiver | ï»ż | X | ï»ż | ï»ż |
updatedAt | Date | Date de modification de l'entitĂ© Waiver | ï»ż | X | ï»ż | ï»ż |
Enumérations
WaiverTariffStructureEnum
- ADULT_CHILD
- EMPLOYEE
- EMPLOYEE_CHILD
- EMPLOYEE_DUO_FAMILY
- EMPLOYEE_FAMILY
- FAMILY
- TA
- TA_TB
- TA_TB_TC
Enumérations génériques
Aucune enumération générique.
Exemple
import { Entities } from '@fasstech/oip-core';
import { getHypothesisId } from '@fasstech/oip-core/entities/Hypothesis';
import { getOfferId } from '@fasstech/oip-core/entities/Offer';
import { getProjectId } from '@fasstech/oip-core/entities/Project';
import { getWaiverCode, getWaiverExternalCode, getWaiverExternalId, getWaiverId, getWaiverLabel, getWaiverTariffStructure, getWaiverWaiverId, setWaiverCode, setWaiverExternalCode, setWaiverExternalId, setWaiverLabel, setWaiverTariffStructure, setWaiverWaiverId } from '@fasstech/oip-core/entities/Waiver';
import { WaiverTariffStructureEnum } from '@fasstech/oip-core/entities/Waiver/enums';
import { getWaiverRequestId } from '@fasstech/oip-core/entities/WaiverRequest';
(async () => {
let project = await Entities('Project').create();
let offer = await Entities('Offer').create();
let hypothesis = await Entities('Hypothesis').create();
let waiverRequest = await Entities('WaiverRequest').create();
const waiver = await Entities('Waiver').create();
setWaiverTariffStructure(WaiverTariffStructureEnum.TA_TB_TC, waiver);
setWaiverCode('code', waiver);
setWaiverExternalId('externalId', waiver);
setWaiverExternalCode('externalCode', waiver);
setWaiverWaiverId('waiverId', waiver);
setWaiverLabel('label', waiver);
waiverRequest = await Entities('Waiver').save(waiverRequest, waiver);
hypothesis = await Entities('WaiverRequest').save(hypothesis, waiverRequest);
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) });
const waiverRequestToTest = await Entities('WaiverRequest').get(hypothesisToTest, { filter: ({ id }) => id === getWaiverRequestId(waiverRequest) });
const waiverToTest = await Entities('Waiver').get(waiverRequestToTest, { filter: ({ id }) => id === getWaiverId(waiver) });
getWaiverTariffStructure(waiverToTest); // WaiverTariffStructureEnum.TA_TB_TC
getWaiverCode(waiverToTest); // 'code'
getWaiverExternalId(waiverToTest); // 'externalId'
getWaiverExternalCode(waiverToTest); // 'externalCode'
getWaiverWaiverId(waiverToTest); // 'waiverId'
getWaiverLabel(waiverToTest); // 'label'
})();