removing advance hour example
Change-Id: I2b7233b86ed7090210dbaa9d467927f418dd9bb0
diff --git a/order-redirect/python/service_feed_example.py b/order-redirect/python/service_feed_example.py
index b344174..26817ef 100644
--- a/order-redirect/python/service_feed_example.py
+++ b/order-redirect/python/service_feed_example.py
@@ -2,7 +2,8 @@
Example Service feed for Google Order Redirect. Create "generated" directory for generated proto classes.
Download lastest version of protoc from https://github.com/protocolbuffers/protobuf/releases
Generate proto classes with:
- protoc --python_out=./generated --proto_path=../proto/ ../proto/action.proto ../proto/google/type/*.proto
+ mkdir generated
+ protoc --python_out=./generated --proto_path=../proto/ ../proto/*.proto ../proto/google/type/*.proto
See https://protobuf.dev/reference/python/python-generated/ for more details.
'''
@@ -53,41 +54,6 @@
)
asap_hours.lead_time.min_lead_time_duration.seconds = 2400
- # Create advance service hours
- advance_hours_data = feed.data.add()
- advance_hours_data.service_hours.hours_id = 'merchant-1-advance-hours-delivery'
- advance_hours_data.service_hours.service_ids.append('merchant-1-service-delivery')
- advance_hours = advance_hours_data.service_hours.advance_hours.add()
- advance_hours.time_windows.CopyFrom(food_service_pb2.TimeOfDayWindow(
- time_windows=food_service_pb2.TimeOfDayRange(
- open_time=timeofday_pb2.TimeOfDay(
- hours=11,
- minutes=0
- ),
- close_time=timeofday_pb2.TimeOfDay(
- hours=22,
- minutes=0
- )
- )
- )
- )
- advance_hours.advance_booking_interval.min_offset.seconds = 60*60
- advance_hours.advance_booking_interval.max_offset.seconds = 60*60*24*3
- # Create advance hour orderable time
- orderable_time = advance_hours_data.service_hours.orderable_time.append(
- food_service_pb2.TimeOfDayWindow(
- time_windows=food_service_pb2.TimeOfDayRange(
- open_time=timeofday_pb2.TimeOfDay(
- hours=0,
- minutes=0
- ),
- close_time=timeofday_pb2.TimeOfDay(
- hours=23,
- minutes=59
- )
- )
- )
- )
# Create service area
service_area_data = feed.data.add()
@@ -101,4 +67,4 @@
return json.dumps(MessageToDict(feed, preserving_proto_field_name=True))
feedJSON = create_feed()
-print(feedJSON)
\ No newline at end of file
+print(feedJSON)