Compare commits

...

4 Commits

Author SHA1 Message Date
18515c225a merge upstream 2025-03-14 12:44:23 +01:00
de88bc3a4e book et commande features 2025-03-14 12:31:59 +01:00
dab8a636d0 Actualiser interface-contracts.json 2025-03-13 17:28:17 +01:00
79bc018b0e Téléverser les fichiers vers "/" 2025-03-13 16:32:04 +01:00
2 changed files with 74 additions and 1 deletions

73
interface-contracts.json Normal file
View File

@@ -0,0 +1,73 @@
{
"usecases": {
"EnregistrerNouveauLivre": {
"input": {
"isbn": "string(13)",
"titre": "string(required)",
"auteur": "string(required)",
"editeur": "string(required)",
"datePublication": "date",
"prix": "decimal(positive)",
"stockInitial": "integer(min:0)",
"categories": "array<string>",
"description": "string",
"langue": "string"
},
"output": {
"isbn": "string(13)"
}
},
"PasserCommande": {
"input": {
"clientId": "uuid",
"lignesCommande": [{
"livreId": "uuid",
"quantite": "integer(positive)"
}],
"adresseLivraison": {
"rue": "string",
"ville": "string",
"codePostal": "string",
"pays": "string"
},
"modePaiement": "string(enum: CB, PAYPAL, POINTS_FIDELITE)"
},
"output": {
"commandeId": "uuid",
"montantTotal": "decimal",
"pointsFideliteGagnes": "integer"
}
},
"GererAvis": {
"input": {
"clientId": "uuid",
"livreId": "uuid",
"note": "integer(min:1,max:5)",
"commentaire": "string",
"dateAchat": "date"
},
"output": {
"avisId": "uuid"
}
},
"CreerAbonnement": {
"input": {
"clientId": "uuid",
"duree": "integer(enum: 3,6,12)",
"modePaiement": {
"type": "string(enum: CB, PAYPAL)",
"details": "object"
},
"dateDebutSouhaitee": "date"
},
"output": {
"abonnementId": "uuid",
"dateDebut": "date",
"dateFin": "date",
"montantMensuel": "decimal"
}
}
}
}

View File

@@ -39,5 +39,5 @@ Feature: Gestion des commandes de livres
| 9782253004201 | 1 | POINTS_FIDELITE | 30 Boulevard Haussmann | Paris | 75009 | France | | 9782253004201 | 1 | POINTS_FIDELITE | 30 Boulevard Haussmann | Paris | 75009 | France |
Then le paiement échoue Then le paiement échoue
And je reçois un message d'erreur indiquant "Impossible d'utiliser 200 points alors que le solde est de 50 point" And je reçois un message d'erreur indiquant "Impossible d'utiliser 200 points alors que le solde est de 50 point"
And le client "456e7891-a23c-34d5-b678-526714174111" possède toujours 50 point de fidélité And le client "456e7891-a23c-34d5-b678-526714174111" possède toujours 50 point de fidélités