Skip to content

Commit

Permalink
Fix response types in GetListOfWarehouses (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
diPhantxm authored Apr 21, 2024
1 parent 6cf4ae8 commit 049b028
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 29 deletions.
16 changes: 8 additions & 8 deletions ozon/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ const (
Purchased ListDiscountRequestsStatus = "PURCHASED"
)

type WorkingDay string
type WorkingDay int

const (
Mon WorkingDay = "1"
Tue WorkingDay = "2"
Wed WorkingDay = "3"
Thu WorkingDay = "4"
Fri WorkingDay = "5"
Sat WorkingDay = "6"
Sun WorkingDay = "7"
Mon WorkingDay = 1
Tue WorkingDay = 2
Wed WorkingDay = 3
Thu WorkingDay = 4
Fri WorkingDay = 5
Sat WorkingDay = 6
Sun WorkingDay = 7
)

type GetAnalyticsDataDimension string
Expand Down
52 changes: 31 additions & 21 deletions ozon/warehouses_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,37 @@ func TestGetListOfWarehouses(t *testing.T) {
http.StatusOK,
map[string]string{"Client-Id": "my-client-id", "Api-Key": "my-api-key"},
`{
"result": [
{
"warehouse_id": 15588127982000,
"name": "Proffi (Панорама Групп)",
"is_rfbs": false
},
{
"warehouse_id": 22142605386000,
"name": "Склад на производственной",
"is_rfbs": true
},
{
"warehouse_id": 22208673494000,
"name": "Тест 37349",
"is_rfbs": true
},
{
"warehouse_id": 22240462819000,
"name": "Тест12",
"is_rfbs": true
}
"result": [
{
"warehouse_id": 1020000177886000,
"name": "This is a test",
"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,
"can_print_act_in_advance": false,
"min_working_days": 5,
"is_karantin": false,
"has_postings_limit": false,
"postings_limit": -1,
"working_days": [
1,
2,
3,
4,
5,
6,
7
],
"min_postings_limit": 10,
"is_timetable_editable": true,
"status": "disabled"
}
]
}`,
},
Expand Down

0 comments on commit 049b028

Please sign in to comment.