-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9e46102
commit bf5dc06
Showing
7 changed files
with
9 additions
and
412 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -167,50 +167,6 @@ | |
"cookie": [], | ||
"body": "\"empty buying_goods\"" | ||
}, | ||
{ | ||
"name": "N/A Good", | ||
"originalRequest": { | ||
"method": "POST", | ||
"header": [], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\n \"user_id\": 1234,\n \"to_pay_amount\": 1000,\n \"discount_amount\": 1000,\n \"description\": \"Sample description\",\n \"buying_goods\": [\"not-available-good\"],\n \"name\": \"Crow\",\n \"phone\": \"09123456789\",\n \"mail\": \"[email protected]\",\n \"callback_url\": \"https://google.com/\"\n}", | ||
"options": { | ||
"raw": { | ||
"language": "json" | ||
} | ||
} | ||
}, | ||
"url": { | ||
"raw": "{{BASE_URL}}/create", | ||
"host": [ | ||
"{{BASE_URL}}" | ||
], | ||
"path": [ | ||
"create" | ||
] | ||
} | ||
}, | ||
"status": "Bad Request", | ||
"code": 400, | ||
"_postman_previewlanguage": "json", | ||
"header": [ | ||
{ | ||
"key": "Content-Type", | ||
"value": "application/json; charset=utf-8" | ||
}, | ||
{ | ||
"key": "Date", | ||
"value": "Thu, 28 Dec 2023 20:47:33 GMT" | ||
}, | ||
{ | ||
"key": "Content-Length", | ||
"value": "38" | ||
} | ||
], | ||
"cookie": [], | ||
"body": "\"cannot find good: not-available-good\"" | ||
}, | ||
{ | ||
"name": "IDPay Failed", | ||
"originalRequest": { | ||
|
@@ -453,268 +409,6 @@ | |
} | ||
] | ||
}, | ||
{ | ||
"name": "Goods", | ||
"item": [ | ||
{ | ||
"name": "List Goods", | ||
"request": { | ||
"method": "GET", | ||
"header": [], | ||
"url": { | ||
"raw": "{{BASE_URL}}/goods", | ||
"host": [ | ||
"{{BASE_URL}}" | ||
], | ||
"path": [ | ||
"goods" | ||
] | ||
} | ||
}, | ||
"response": [ | ||
{ | ||
"name": "New Request", | ||
"originalRequest": { | ||
"method": "GET", | ||
"header": [], | ||
"url": { | ||
"raw": "{{BASE_URL}}/goods", | ||
"host": [ | ||
"{{BASE_URL}}" | ||
], | ||
"path": [ | ||
"goods" | ||
] | ||
} | ||
}, | ||
"status": "OK", | ||
"code": 200, | ||
"_postman_previewlanguage": "json", | ||
"header": [ | ||
{ | ||
"key": "Content-Type", | ||
"value": "application/json; charset=utf-8" | ||
}, | ||
{ | ||
"key": "Date", | ||
"value": "Thu, 28 Dec 2023 19:56:56 GMT" | ||
}, | ||
{ | ||
"key": "Content-Length", | ||
"value": "123" | ||
} | ||
], | ||
"cookie": [], | ||
"body": "[\n {\n \"ID\": 1,\n \"Name\": \"kir\",\n \"Price\": 420,\n \"Description\": \"random description\"\n },\n {\n \"ID\": 5,\n \"Name\": \"kir2\",\n \"Price\": 1000,\n \"Description\": \"\"\n }\n]" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Add Good", | ||
"request": { | ||
"method": "POST", | ||
"header": [], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\n \"name\": \"kir\",\n \"price\": 420,\n \"description\": \"random description\"\n}", | ||
"options": { | ||
"raw": { | ||
"language": "json" | ||
} | ||
} | ||
}, | ||
"url": { | ||
"raw": "{{BASE_URL}}/goods", | ||
"host": [ | ||
"{{BASE_URL}}" | ||
], | ||
"path": [ | ||
"goods" | ||
] | ||
}, | ||
"description": "Adds a \"good\" to database. A \"good\" is basically an item which can be bought once for each user. This endpoint can create one of them in order to allow the admins to add items on fly.\n\nThe body of this endpoint consists of 3 key and values:\n\n- `name`: The name of the good. This must be unique.\n- `price`: The price of the good. Must be more than zero.\n- `description`(Optional): An description which is only stored in database.\n \n\nThis endpoint returns the ID of the newly created object." | ||
}, | ||
"response": [ | ||
{ | ||
"name": "Add Good", | ||
"originalRequest": { | ||
"method": "POST", | ||
"header": [], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\n \"name\": \"kir\",\n \"price\": 420,\n \"description\": \"this is a description\"\n}", | ||
"options": { | ||
"raw": { | ||
"language": "json" | ||
} | ||
} | ||
}, | ||
"url": { | ||
"raw": "{{BASE_URL}}/goods", | ||
"host": [ | ||
"{{BASE_URL}}" | ||
], | ||
"path": [ | ||
"goods" | ||
] | ||
} | ||
}, | ||
"status": "Created", | ||
"code": 201, | ||
"_postman_previewlanguage": "json", | ||
"header": [ | ||
{ | ||
"key": "Content-Type", | ||
"value": "application/json; charset=utf-8" | ||
}, | ||
{ | ||
"key": "Date", | ||
"value": "Thu, 28 Dec 2023 19:42:26 GMT" | ||
}, | ||
{ | ||
"key": "Content-Length", | ||
"value": "8" | ||
} | ||
], | ||
"cookie": [], | ||
"body": "{\n \"id\": 1\n}" | ||
}, | ||
{ | ||
"name": "Add Good Without Description", | ||
"originalRequest": { | ||
"method": "POST", | ||
"header": [], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\n \"name\": \"kir2\",\n \"price\": 1000\n}", | ||
"options": { | ||
"raw": { | ||
"language": "json" | ||
} | ||
} | ||
}, | ||
"url": { | ||
"raw": "{{BASE_URL}}/goods", | ||
"host": [ | ||
"{{BASE_URL}}" | ||
], | ||
"path": [ | ||
"goods" | ||
] | ||
} | ||
}, | ||
"status": "Created", | ||
"code": 201, | ||
"_postman_previewlanguage": "json", | ||
"header": [ | ||
{ | ||
"key": "Content-Type", | ||
"value": "application/json; charset=utf-8" | ||
}, | ||
{ | ||
"key": "Date", | ||
"value": "Thu, 28 Dec 2023 19:42:56 GMT" | ||
}, | ||
{ | ||
"key": "Content-Length", | ||
"value": "8" | ||
} | ||
], | ||
"cookie": [], | ||
"body": "{\n \"id\": 2\n}" | ||
}, | ||
{ | ||
"name": "Existing Good", | ||
"originalRequest": { | ||
"method": "POST", | ||
"header": [], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\n \"name\": \"kir\",\n \"price\": 420,\n \"description\": \"random description\"\n}", | ||
"options": { | ||
"raw": { | ||
"language": "json" | ||
} | ||
} | ||
}, | ||
"url": { | ||
"raw": "{{BASE_URL}}/goods", | ||
"host": [ | ||
"{{BASE_URL}}" | ||
], | ||
"path": [ | ||
"goods" | ||
] | ||
} | ||
}, | ||
"status": "Conflict", | ||
"code": 409, | ||
"_postman_previewlanguage": "json", | ||
"header": [ | ||
{ | ||
"key": "Content-Type", | ||
"value": "application/json; charset=utf-8" | ||
}, | ||
{ | ||
"key": "Date", | ||
"value": "Thu, 28 Dec 2023 19:55:39 GMT" | ||
}, | ||
{ | ||
"key": "Content-Length", | ||
"value": "21" | ||
} | ||
], | ||
"cookie": [], | ||
"body": "\"good already exists\"" | ||
}, | ||
{ | ||
"name": "Invalid Price", | ||
"originalRequest": { | ||
"method": "POST", | ||
"header": [], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\n \"name\": \"kir\",\n \"price\": 0,\n \"description\": \"random description\"\n}", | ||
"options": { | ||
"raw": { | ||
"language": "json" | ||
} | ||
} | ||
}, | ||
"url": { | ||
"raw": "{{BASE_URL}}/goods", | ||
"host": [ | ||
"{{BASE_URL}}" | ||
], | ||
"path": [ | ||
"goods" | ||
] | ||
} | ||
}, | ||
"status": "Bad Request", | ||
"code": 400, | ||
"_postman_previewlanguage": "plain", | ||
"header": [ | ||
{ | ||
"key": "Date", | ||
"value": "Thu, 28 Dec 2023 20:32:00 GMT" | ||
}, | ||
{ | ||
"key": "Content-Length", | ||
"value": "96" | ||
}, | ||
{ | ||
"key": "Content-Type", | ||
"value": "text/plain; charset=utf-8" | ||
} | ||
], | ||
"cookie": [], | ||
"body": "\"Key: 'createGoodRequest.Price' Error:Field validation for 'Price' failed on the 'required' tag\"" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Health Check", | ||
"request": { | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.