Pricing
Pricing
Description
L'entité Pricing correspond à la structure tarifaire de la formule.
Relations
Ascendantes
Entité | Propriété |
|---|---|
Pack | pricings |
Descendantes
Entité | Propriété |
|---|---|
History | history |
Price | prices |
WaiverRequest | waiverRequests |
Propriétés
Nom | Type | Description | Validateur | Lecture seule ? | Dépréciée ? | DerniÚre version modifiée |
|---|---|---|---|---|---|---|
defaultPrice | Number | Tarif total de la structure avant la prise en compte des dĂ©rogations. | ï»ż | ï»ż | ï»ż | 2.8.0 |
defaultRate | Number | Taux total de la structure avant la prise en compte des dĂ©rogations. | ï»ż | ï»ż | ï»ż | 2.8.0 |
derogatedAmount | Number | Montant total dĂ©rogĂ© de la structure. Il prend en compte l'ensemble des dĂ©rogations. | ï»ż | ï»ż | ï»ż | 2.8.0 |
derogatedRate | Number | Taux total dĂ©rogĂ© de la structure. Il prend en compte l'ensemble des dĂ©rogations. | ï»ż | ï»ż | ï»ż | 2.8.0 |
guaranteeCode | String | Code de la garantie. Cela peut ĂȘtre la rĂ©fĂ©rence de classification ou bien un code interne. | ï»ż | ï»ż | ï»ż | 2.8.0 |
guaranteeLabel | String | LibellĂ© de la garantie flexiproduct. | ï»ż | ï»ż | ï»ż | 2.8.0 |
isPreSelected | Boolean | Il s'agit d'identifier les formules et/ou garanties prĂ©sĂ©lectionnĂ©es pour l'utilisateur pour permettre de faire une comparaison | ï»ż | ï»ż | ï»ż | 3.7.0 |
isSelected | Boolean | Indique si le client a sĂ©lectionnĂ© cette structure tarifaire. | ï»ż | ï»ż | ï»ż | 2.6.0 |
level | String | Niveau du module | ï»ż | ï»ż | ï»ż | 2.4.0 |
moduleCode | String | Code du module | ï»ż | ï»ż | ï»ż | 2.4.0 |
moduleId | String | Identifiant unique du module | ï»ż | ï»ż | ï»ż | 2.4.0 |
moduleLabel | String | LibellĂ© du module flexiproduct | ï»ż | ï»ż | ï»ż | 2.8.0 |
price | Number | Tarif total de la structure en tenant compte des dĂ©rogations. | ï»ż | ï»ż | ï»ż | 2.8.0 |
rate | Number | Taux total de la structure en tenant compte des dĂ©rogations. | ï»ż | ï»ż | ï»ż | 2.8.0 |
regime | RegimeEnum | RĂ©gime | ï»ż | ï»ż | ï»ż | 2.4.0 |
supplementaryCover | String | Code de la surcomplĂ©mentaire si celle-ci est sĂ©lectionnĂ©e dans le parcours | ï»ż | ï»ż | ï»ż | 2.4.0 |
tariffStructure | PricingTariffStructureEnum | Structure tarifaire sur laquelle on va appliquer un tarif | ï»ż | ï»ż | ï»ż | 2.7.0 |
id | String | Identifiant de l'entitĂ© Pricing | ï»ż | X | ï»ż | ï»ż |
code | String | Codification fonctionnelle de l'entitĂ© Pricing | ï»ż | ï»ż | ï»ż | ï»ż |
externalId | String | Identifiant de l'entitĂ© Pricing dans le systĂšme client | ï»ż | ï»ż | ï»ż | ï»ż |
externalCode | String | Codification fonctionnelle de l'entitĂ© Pricing dans le systĂšme client | ï»ż | ï»ż | ï»ż | ï»ż |
pricingId | String | Identifiant public de l'entitĂ© Pricing dans l'OIP | ï»ż | ï»ż | ï»ż | ï»ż |
label | String | Information relative au nom de l'entitĂ© Pricing dans son contexte d'utilisation | ï»ż | ï»ż | ï»ż | ï»ż |
createdAt | Date | Date de crĂ©ation de l'entitĂ© Pricing | ï»ż | X | ï»ż | ï»ż |
updatedAt | Date | Date de modification de l'entitĂ© Pricing | ï»ż | X | ï»ż | ï»ż |
Enumérations
PricingTariffStructureEnum
- ADULT_CHILD
- EMPLOYEE
- EMPLOYEE_CHILD
- EMPLOYEE_DUO_FAMILY
- EMPLOYEE_FAMILY
- FAMILY
- TA
- TA_TB
- TA_TB_TC
- UNIFORM
Enumérations génériques
- RegimeEnum
Exemple
import { Entities } from '@fasstech/oip-core';
import { getOfferId } from '@fasstech/oip-core/entities/Offer';
import { getPackId } from '@fasstech/oip-core/entities/Pack';
import { getPricingCode, getPricingDefaultPrice, getPricingDefaultRate, getPricingDerogatedAmount, getPricingDerogatedRate, getPricingExternalCode, getPricingExternalId, getPricingGuaranteeCode, getPricingGuaranteeLabel, getPricingId, getPricingIsPreSelected, getPricingIsSelected, getPricingLabel, getPricingLevel, getPricingModuleCode, getPricingModuleId, getPricingModuleLabel, getPricingPrice, getPricingPricingId, getPricingRate, getPricingRegime, getPricingSupplementaryCover, getPricingTariffStructure, setPricingCode, setPricingDefaultPrice, setPricingDefaultRate, setPricingDerogatedAmount, setPricingDerogatedRate, setPricingExternalCode, setPricingExternalId, setPricingGuaranteeCode, setPricingGuaranteeLabel, setPricingIsPreSelected, setPricingIsSelected, setPricingLabel, setPricingLevel, setPricingModuleCode, setPricingModuleId, setPricingModuleLabel, setPricingPrice, setPricingPricingId, setPricingRate, setPricingRegime, setPricingSupplementaryCover, setPricingTariffStructure } from '@fasstech/oip-core/entities/Pricing';
import { PricingTariffStructureEnum } from '@fasstech/oip-core/entities/Pricing/enums';
import { getProjectId } from '@fasstech/oip-core/entities/Project';
import { RegimeEnum } from '@fasstech/oip-core/entities/enums';
(async () => {
let project = await Entities('Project').create();
let offer = await Entities('Offer').create();
let pack = await Entities('Pack').create();
const pricing = await Entities('Pricing').create();
setPricingDefaultPrice(100, pricing);
setPricingDefaultRate(100, pricing);
setPricingDerogatedAmount(100, pricing);
setPricingDerogatedRate(100, pricing);
setPricingGuaranteeCode('guaranteeCode', pricing);
setPricingGuaranteeLabel('guaranteeLabel', pricing);
setPricingIsPreSelected(false, pricing);
setPricingIsSelected(false, pricing);
setPricingLevel('level', pricing);
setPricingModuleCode('moduleCode', pricing);
setPricingModuleId('moduleId', pricing);
setPricingModuleLabel('moduleLabel', pricing);
setPricingPrice(112, pricing);
setPricingRate(114, pricing);
setPricingRegime(RegimeEnum.REGIME_INDEPENDANT, pricing);
setPricingSupplementaryCover('supplementaryCover', pricing);
setPricingTariffStructure(PricingTariffStructureEnum.TA, pricing);
setPricingCode('code', pricing);
setPricingExternalId('externalId', pricing);
setPricingExternalCode('externalCode', pricing);
setPricingPricingId('pricingId', pricing);
setPricingLabel('label', pricing);
pack = await Entities('Pricing').save(pack, pricing);
offer = await Entities('Pack').save(offer, pack);
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 packToTest = await Entities('Pack').get(offerToTest, { filter: ({ id }) => id === getPackId(pack) });
const pricingToTest = await Entities('Pricing').get(packToTest, { filter: ({ id }) => id === getPricingId(pricing) });
getPricingDefaultPrice(pricingToTest); // 100
getPricingDefaultRate(pricingToTest); // 100
getPricingDerogatedAmount(pricingToTest); // 100
getPricingDerogatedRate(pricingToTest); // 100
getPricingGuaranteeCode(pricingToTest); // 'guaranteeCode'
getPricingGuaranteeLabel(pricingToTest); // 'guaranteeLabel'
getPricingIsPreSelected(pricingToTest); // false
getPricingIsSelected(pricingToTest); // false
getPricingLevel(pricingToTest); // 'level'
getPricingModuleCode(pricingToTest); // 'moduleCode'
getPricingModuleId(pricingToTest); // 'moduleId'
getPricingModuleLabel(pricingToTest); // 'moduleLabel'
getPricingPrice(pricingToTest); // 112
getPricingRate(pricingToTest); // 114
getPricingRegime(pricingToTest); // RegimeEnum.REGIME_INDEPENDANT
getPricingSupplementaryCover(pricingToTest); // 'supplementaryCover'
getPricingTariffStructure(pricingToTest); // PricingTariffStructureEnum.TA
getPricingCode(pricingToTest); // 'code'
getPricingExternalId(pricingToTest); // 'externalId'
getPricingExternalCode(pricingToTest); // 'externalCode'
getPricingPricingId(pricingToTest); // 'pricingId'
getPricingLabel(pricingToTest); // 'label'
})();