Fix response types in GetListOfWarehouses (#83)

This commit is contained in:
Kirill
2024-04-21 18:41:18 +03:00
committed by GitHub
parent 6cf4ae89e3
commit 049b02835b
2 changed files with 39 additions and 29 deletions

View File

@@ -91,16 +91,16 @@ const (
Purchased ListDiscountRequestsStatus = "PURCHASED" Purchased ListDiscountRequestsStatus = "PURCHASED"
) )
type WorkingDay string type WorkingDay int
const ( const (
Mon WorkingDay = "1" Mon WorkingDay = 1
Tue WorkingDay = "2" Tue WorkingDay = 2
Wed WorkingDay = "3" Wed WorkingDay = 3
Thu WorkingDay = "4" Thu WorkingDay = 4
Fri WorkingDay = "5" Fri WorkingDay = 5
Sat WorkingDay = "6" Sat WorkingDay = 6
Sun WorkingDay = "7" Sun WorkingDay = 7
) )
type GetAnalyticsDataDimension string type GetAnalyticsDataDimension string

View File

@@ -21,27 +21,37 @@ func TestGetListOfWarehouses(t *testing.T) {
http.StatusOK, http.StatusOK,
map[string]string{"Client-Id": "my-client-id", "Api-Key": "my-api-key"}, map[string]string{"Client-Id": "my-client-id", "Api-Key": "my-api-key"},
`{ `{
"result": [ "result": [
{ {
"warehouse_id": 15588127982000, "warehouse_id": 1020000177886000,
"name": "Proffi (Панорама Групп)", "name": "This is a test",
"is_rfbs": false "is_rfbs": false,
}, "has_entrusted_acceptance": false,
{ "first_mile_type": {
"warehouse_id": 22142605386000, "dropoff_point_id": "",
"name": "Склад на производственной", "dropoff_timeslot_id": 0,
"is_rfbs": true "first_mile_is_changing": false,
}, "first_mile_type": ""
{ },
"warehouse_id": 22208673494000, "is_kgt": false,
"name": "Тест 37349", "can_print_act_in_advance": false,
"is_rfbs": true "min_working_days": 5,
}, "is_karantin": false,
{ "has_postings_limit": false,
"warehouse_id": 22240462819000, "postings_limit": -1,
"name": "Тест12", "working_days": [
"is_rfbs": true 1,
} 2,
3,
4,
5,
6,
7
],
"min_postings_limit": 10,
"is_timetable_editable": true,
"status": "disabled"
}
] ]
}`, }`,
}, },