forked from pierront/mylibrary-template
Compare commits
4 Commits
commande
...
18515c225a
| Author | SHA1 | Date | |
|---|---|---|---|
| 18515c225a | |||
| de88bc3a4e | |||
| dab8a636d0 | |||
| 79bc018b0e |
73
interface-contracts.json
Normal file
73
interface-contracts.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user