Skip to content

Commit 2f9264a

Browse files
hparfrsebastienbeau
authored andcommitted
shopinvader_delivery_pickup: expose opening hours
1 parent cef0a0c commit 2f9264a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

shopinvader_delivery_pickup/services/delivery_pickup.py

+16
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,19 @@ def _pickup_site_schema(self):
102102
"name": {"type": "string", "required": True},
103103
},
104104
},
105+
"attendances": {
106+
"type": "list",
107+
"nullable": True,
108+
"schema": {
109+
"type": "dict",
110+
"schema": {
111+
"id": {"type": "integer", "nullable": True},
112+
"dayofweek": {"type": "string", "nullable": True},
113+
"hour_from": {"type": "number", "nullable": True},
114+
"hour_to": {"type": "number", "nullable": True},
115+
},
116+
},
117+
},
105118
}
106119

107120
# Services implementation
@@ -145,3 +158,6 @@ def _json_parser(self):
145158
("carrier_id:carrier", ["id", "name"]),
146159
("attendance_ids:attendances", self._json_parser_attendances()),
147160
]
161+
162+
def _json_parser_attendances(self):
163+
return ["id", "hour_from", "hour_to", "dayofweek"]

0 commit comments

Comments
 (0)