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

@@ -23,24 +23,34 @@ func TestGetListOfWarehouses(t *testing.T) {
`{ `{
"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": {
"dropoff_point_id": "",
"dropoff_timeslot_id": 0,
"first_mile_is_changing": false,
"first_mile_type": ""
}, },
{ "is_kgt": false,
"warehouse_id": 22142605386000, "can_print_act_in_advance": false,
"name": "Склад на производственной", "min_working_days": 5,
"is_rfbs": true "is_karantin": false,
}, "has_postings_limit": false,
{ "postings_limit": -1,
"warehouse_id": 22208673494000, "working_days": [
"name": "Тест 37349", 1,
"is_rfbs": true 2,
}, 3,
{ 4,
"warehouse_id": 22240462819000, 5,
"name": "Тест12", 6,
"is_rfbs": true 7
],
"min_postings_limit": 10,
"is_timetable_editable": true,
"status": "disabled"
} }
] ]
}`, }`,