Mandate
Mandate
Description
L'entité Mandate regroupe les informations relatives au mandat de prélÚvement.
Relations
Ascendantes
Entité | Propriété |
|---|---|
BankAccount | mandates |
PaymentMethod | mandates |
Descendantes
Entité | Propriété |
|---|---|
History | history |
Propriétés
Nom | Type | Description | Validateur | Lecture seule ? | Dépréciée ? | DerniÚre version modifiée |
|---|---|---|---|---|---|---|
ICS | String | L'Identifiant CrĂ©ancier SEPA (ICS) | Exactement 13 caractĂšres | ï»ż | ï»ż | ï»ż |
RUM | String | La RĂ©fĂ©rence Unique de Mandat | Au moins 30 caractĂšres | ï»ż | ï»ż | ï»ż |
isActive | Boolean | Indique si le mandat est actif | ï»ż | ï»ż | ï»ż | ï»ż |
signDate | Date | Date de signature du mandat | ï»ż | ï»ż | ï»ż | ï»ż |
validityEndDate | Date | Date de fin de prĂ©lĂšvement | ï»ż | ï»ż | ï»ż | ï»ż |
validityStartDate | Date | Date de dĂ©but de prĂ©lĂšvement | ï»ż | ï»ż | ï»ż | ï»ż |
id | String | Identifiant de l'entitĂ© Mandate | ï»ż | X | ï»ż | ï»ż |
code | String | Codification fonctionnelle de l'entitĂ© Mandate | ï»ż | ï»ż | ï»ż | ï»ż |
externalId | String | Identifiant de l'entitĂ© Mandate dans le systĂšme client | ï»ż | ï»ż | ï»ż | ï»ż |
externalCode | String | Codification fonctionnelle de l'entitĂ© Mandate dans le systĂšme client | ï»ż | ï»ż | ï»ż | ï»ż |
mandateId | String | Identifiant public de l'entitĂ© Mandate dans l'OIP | ï»ż | ï»ż | ï»ż | ï»ż |
label | String | Information relative au nom de l'entitĂ© Mandate dans son contexte d'utilisation | ï»ż | ï»ż | ï»ż | ï»ż |
createdAt | Date | Date de crĂ©ation de l'entitĂ© Mandate | ï»ż | X | ï»ż | ï»ż |
updatedAt | Date | Date de modification de l'entitĂ© Mandate | ï»ż | X | ï»ż | ï»ż |
Enumérations
Aucune enumération.
Enumérations génériques
Aucune enumération générique.
Exemple
import { Entities } from '@fasstech/oip-core';
import { getBankAccountId } from '@fasstech/oip-core/entities/BankAccount';
import { getCompanyId } from '@fasstech/oip-core/entities/Company';
import { getMandateCode, getMandateExternalCode, getMandateExternalId, getMandateICS, getMandateId, getMandateIsActive, getMandateLabel, getMandateMandateId, getMandateRUM, getMandateSignDate, getMandateValidityEndDate, getMandateValidityStartDate, setMandateCode, setMandateExternalCode, setMandateExternalId, setMandateICS, setMandateIsActive, setMandateLabel, setMandateMandateId, setMandateRUM, setMandateSignDate, setMandateValidityEndDate, setMandateValidityStartDate } from '@fasstech/oip-core/entities/Mandate';
import { getProjectId } from '@fasstech/oip-core/entities/Project';
(async () => {
let project = await Entities('Project').create();
let company = await Entities('Company').create();
let bankAccount = await Entities('BankAccount').create();
const mandate = await Entities('Mandate').create();
setMandateICS('IIIIIIIIIIIII', mandate);
setMandateRUM('RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR', mandate);
setMandateIsActive(false, mandate);
setMandateSignDate(new Date('2017-01-01'), mandate);
setMandateValidityEndDate(new Date('2017-01-01'), mandate);
setMandateValidityStartDate(new Date('2017-01-01'), mandate);
setMandateCode('code', mandate);
setMandateExternalId('externalId', mandate);
setMandateExternalCode('externalCode', mandate);
setMandateMandateId('mandateId', mandate);
setMandateLabel('label', mandate);
bankAccount = await Entities('Mandate').save(bankAccount, mandate);
company = await Entities('BankAccount').save(company, bankAccount);
project = await Entities('Company').save(project, company);
await Entities('Project').save(project);
const projectToTest = await Entities('Project').get({ id: getProjectId(project) });
const companyToTest = await Entities('Company').get(projectToTest, { filter: ({ id }) => id === getCompanyId(company) });
const bankAccountToTest = await Entities('BankAccount').get(companyToTest, { filter: ({ id }) => id === getBankAccountId(bankAccount) });
const mandateToTest = await Entities('Mandate').get(bankAccountToTest, { filter: ({ id }) => id === getMandateId(mandate) });
getMandateICS(mandateToTest); // 'IIIIIIIIIIIII'
getMandateRUM(mandateToTest); // 'RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR'
getMandateIsActive(mandateToTest); // false
getMandateSignDate(mandateToTest); // new Date('2017-01-01')
getMandateValidityEndDate(mandateToTest); // new Date('2017-01-01')
getMandateValidityStartDate(mandateToTest); // new Date('2017-01-01')
getMandateCode(mandateToTest); // 'code'
getMandateExternalId(mandateToTest); // 'externalId'
getMandateExternalCode(mandateToTest); // 'externalCode'
getMandateMandateId(mandateToTest); // 'mandateId'
getMandateLabel(mandateToTest); // 'label'
})();