# Check Availability Url 
curl --user "username:password" -X POST https://reserve.vincitables.com/v3/BatchAvailabilityLookup -H "Content-Type: application/json" --data '{"merchant_id":"artsoul-1","slot_time":[{"service_id":"reservation","start_sec":"1613763000","duration_sec":"1800","resource_ids":{"room_id":"A-dining-room","party_size":2}},{"service_id":"reservation","start_sec":"1613764800","duration_sec":"1800","resource_ids":{"room_id":"A-dining-room","party_size":2}}]}'

curl --user "username:password" -X POST http://localhost:8000/v3/BatchAvailabilityLookup -H "Content-Type: application/json" --data '{"merchant_id":"default-2","slot_time":[{"service_id":"reservation","start_sec":"1613763000","duration_sec":"1800","resource_ids":{"room_id":"A-dining-room","party_size":2}},{"service_id":"reservation","start_sec":"1613764800","duration_sec":"1800","resource_ids":{"room_id":"A-dining-room","party_size":2}}]}'
curl --user "devvtgserver:fD3ufC3jdD3fns3" -X POST https://reserve.vincitables.dev/v3/BatchAvailabilityLookup -H "Content-Type: application/json" --data '{"merchant_id":"default-11","slot_time":[{"service_id":"reservation","start_sec":"1678044600","duration_sec":"3600","resource_ids":{"room_id":"A-dining-room","party_size":2}},{"service_id":"reservation","start_sec":"1613764800","duration_sec":"1800","resource_ids":{"room_id":"A-dining-room","party_size":2}}]}'
curl --user "dev_vt_server:hdfdh38dDH23" -X POST https://reserve.vincitables.dev/v3/BatchAvailabilityLookup -H "Content-Type: application/json" --data '{"merchant_id":"default-8","slot_time":[{"service_id":"reservation","start_sec":"1644339600","duration_sec":"3600","resource_ids":{"room_id":"A-dining-room","party_size":2}}]}'
curl --user "dev_vt_server:hdfdh38dDH23" -X POST https://reserve.vincitables.dev/v3/UpdateBooking -H "Content-Type: application/json" --data '{"booking":{"booking_id":"36883-default","slot":{"duration_sec":"5400","start_sec":"1644782400"}}}'
curl --user "dev_vt_server:hdfdh38dDH23" -X POST https://reserve.vincitables.dev/v3/UpdateBooking -H "Content-Type: application/json" --data '{"booking":{"booking_id":"36995-default","slot":{"duration_sec":"5400","start_sec":"1647453600"}}}'

# (a) Request From Google   
curl -X POST http://localhost:8000/v3/CreateBooking --user username:password -d '{"slot":{"merchant_id":"default-2","service_id":"reservation","start_sec":"1617303600","duration_sec":"3600","resources":{"room_id":"A-dining-room","party_size":2},"confirmation_mode":"CONFIRMATION_MODE_SYNCHRONOUS"},"user_information":{"user_id":"0","given_name":"google","family_name":"user","telephone":"+1 800-789-7890","email":"test@example.com"},"payment_information":{"prepayment_status":"PREPAYMENT_NOT_PROVIDED"},"idempotency_token":"123abc"}'

# (b) Request to Vincitable API to get table_list of available tables
curl -X POST https://api.vincitables.dev/1.0/bookings/searchAvailableTables -d suffix="default" -d restaurant=2 -d day="2021-03-07" -d time="20:00" -d party_size=2 -d duration=30 -d widget=1

# (c) create customer in by0vj_entities
curl -X POST https://api.vincitables.dev/1.0/customer/upsert.php -d suffix="default" -d entity=0 -d first_name="usman" -d last_name="haider" -d campaign_email="on" -d campaign_sms="on" -d email="usmanhaider@gmail.com"


# (c) create customer with google_user_id
curl -X POST https://api.vincitables.dev/1.0/customer/upsert.php -d suffix="default" -d entity=0 -d first_name="usman" -d last_name="google" -d email="usmanhaider+google@gmail.com" -d google_user_id="1234"


# (d) create booking for customer id returned by by customer request
curl -X POST https://api.vincitables.dev/1.0/bookings/upsert.php -d id_account=1 -d suffix="default" -d unit=2 -d entity=53727949 -d day="2021-03-07" -d time="20:00:00" -d duration=30 -d pax=2 -d mobile_country=15 -d table=2

# (d) with google's idempotency_key: we need google=1 and the idempotency_token parameters
 curl -X POST https://api.vincitables.dev/1.0/bookings/upsert.php -d id_account=1 -d suffix="default" -d unit=2 -d entity=53727938 -d day="2021-02-27" -d time="20:00" -d duration=60 -d pax=2 -d mobile_country=15 -d table=3 -d google=1 -d idempotency_token=1234abcd


 curl --user "username:password" -X POST http://localhost:8000/v3/GetBookingStatus -H "Content-Type: application/json" --data '{"booking_id":"35557-default"}'
 curl --user "username:password" -X POST http://localhost:8000/v3/UpdateBooking -H "Content-Type: application/json" --data '{"booking":{"booking_id":"35600-default", "slot":{"start_sec":"1614782710", "duration_sec":"1800"}}}'


curl -X POST https://api.vincitables.dev/1.0/google/getBooking -d suffix="default" -d id=35600

curl -X POST https://api.vincitables.dev/1.0/bookings/cancel.php -d suffix="default" -d reference="LVC22139742" -d acc=1 -d unit=2 -d user=53727936 -d cancel_reason=""

curl --user username:password -X POST http://localhost:8000/v3/CheckAvailability -d '{"slot":{"merchant_id":"default-2","service_id":"reservation","start_sec":"1613763000","duration_sec":"1800","resources":{"room_id":"A-dining-room","party_size":2},"confirmation_mode":"CONFIRMATION_MODE_SYNCHRONOUS"}}'

# Real Time API updateBooking Request 
curl -X POST http://localhost:8000/rtu/BookingNotification/UpdateBooking -H "Content-Type: application/json" --data '{"bookingId":"35693-default", "updateMask":"status","merchantId":"default-2", "serviceId":"reservation", "startTime": "2021-03-02T20:00:00Z", "duration": "1800s", "status": "CANCELED"}'

curl -X POST https://booking-server-php.herokuapp.com/real_time_updates.php/rtu/BookingNotification/UpdateBooking?updateMask=status -H "Content-Type: application/json" --data '{"bookingId":"35885-default", "status": "CANCELED"}'

curl -X POST https://booking-server-php.herokuapp.com/real_time_updates.php/rtu/BookingNotification/UpdateBooking?updateMask=startTime,duration,partySize -H "Content-Type: application/json" --data '{"bookingId":"35887-default", "startTime": "2021-03-22T20:00:00Z", "duration": "3600s", "partySize": "2"}'




