quandoo 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (238) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +197 -0
  4. data/Rakefile +8 -0
  5. data/config.json +8 -0
  6. data/docs/AgentTracking.md +8 -0
  7. data/docs/AreaDto.md +10 -0
  8. data/docs/AvailabilitiesApi.md +132 -0
  9. data/docs/ChainDto.md +9 -0
  10. data/docs/ChangedReviewDto.md +10 -0
  11. data/docs/CoordinatesDto.md +9 -0
  12. data/docs/CreateReviewDto.md +10 -0
  13. data/docs/CreatedMasterCustomer.md +8 -0
  14. data/docs/CreatedReservation.md +11 -0
  15. data/docs/CreatedReservationData.md +10 -0
  16. data/docs/CreatedReservationEnquiry.md +8 -0
  17. data/docs/CreatedReservationEnquiryData.md +10 -0
  18. data/docs/CustomerDataList.md +10 -0
  19. data/docs/CustomerDto.md +10 -0
  20. data/docs/CustomerResponse.md +17 -0
  21. data/docs/CustomerReviewData.md +11 -0
  22. data/docs/CustomerStatisticsData.md +10 -0
  23. data/docs/CustomersApi.md +183 -0
  24. data/docs/DealData.md +10 -0
  25. data/docs/DocumentDto.md +11 -0
  26. data/docs/ErrorResponse.md +9 -0
  27. data/docs/GetReservationEnquiryData.md +14 -0
  28. data/docs/GetReviewDto.md +14 -0
  29. data/docs/GetReviewsDto.md +11 -0
  30. data/docs/ImageDto.md +8 -0
  31. data/docs/LinkRelationDto.md +10 -0
  32. data/docs/LocationDto.md +9 -0
  33. data/docs/MarketingSettingDto.md +9 -0
  34. data/docs/MenusApi.md +300 -0
  35. data/docs/MerchantAddressDto.md +12 -0
  36. data/docs/MerchantAvailabilityDaysDto.md +9 -0
  37. data/docs/MerchantAvailabilityDto.md +11 -0
  38. data/docs/MerchantAvailabilityDtoList.md +10 -0
  39. data/docs/MerchantCustomer.md +15 -0
  40. data/docs/MerchantCustomerData.md +21 -0
  41. data/docs/MerchantDetailsDto.md +24 -0
  42. data/docs/MerchantDetailsDtoList.md +11 -0
  43. data/docs/MerchantMenuCategoryDto.md +10 -0
  44. data/docs/MerchantMenuDto.md +13 -0
  45. data/docs/MerchantMenuItemDto.md +11 -0
  46. data/docs/MerchantMenusDto.md +8 -0
  47. data/docs/MerchantReservation.md +18 -0
  48. data/docs/MerchantReservationData.md +10 -0
  49. data/docs/MerchantReservationEnquiry.md +13 -0
  50. data/docs/MerchantReservationEnquiryData.md +10 -0
  51. data/docs/MerchantReservationSettingsDto.md +18 -0
  52. data/docs/MerchantSubscription.md +8 -0
  53. data/docs/MerchantVaultSettingsDto.md +11 -0
  54. data/docs/MerchantWithRecommendationsDto.md +10 -0
  55. data/docs/MerchantsApi.md +334 -0
  56. data/docs/OpeningTimesDto.md +8 -0
  57. data/docs/ReservationData.md +18 -0
  58. data/docs/ReservationDataList.md +8 -0
  59. data/docs/ReservationDetails.md +11 -0
  60. data/docs/ReservationEnquiriesApi.md +230 -0
  61. data/docs/ReservationEnquiryMessageData.md +10 -0
  62. data/docs/ReservationEnquiryMessageList.md +8 -0
  63. data/docs/ReservationMenuData.md +8 -0
  64. data/docs/ReservationMenuItemData.md +12 -0
  65. data/docs/ReservationSettingsApi.md +56 -0
  66. data/docs/ReservationsApi.md +168 -0
  67. data/docs/RestCookie.md +9 -0
  68. data/docs/ReviewDto.md +12 -0
  69. data/docs/ReviewDtoList.md +11 -0
  70. data/docs/ReviewsApi.md +235 -0
  71. data/docs/StandardOpeningTimesDto.md +7 -0
  72. data/docs/StatusApi.md +90 -0
  73. data/docs/TagGroupDto.md +9 -0
  74. data/docs/Tracking.md +9 -0
  75. data/docs/TranslatedTagDto.md +9 -0
  76. data/docs/UpdateReservationData.md +8 -0
  77. data/docs/UpdateReservationEnquiryData.md +8 -0
  78. data/docs/UpdateReviewDto.md +10 -0
  79. data/docs/ValidationsApi.md +59 -0
  80. data/git_push.sh +55 -0
  81. data/lib/quandoo.rb +113 -0
  82. data/lib/quandoo/api/availabilities_api.rb +171 -0
  83. data/lib/quandoo/api/customers_api.rb +185 -0
  84. data/lib/quandoo/api/menus_api.rb +301 -0
  85. data/lib/quandoo/api/merchants_api.rb +357 -0
  86. data/lib/quandoo/api/reservation_enquiries_api.rb +232 -0
  87. data/lib/quandoo/api/reservation_settings_api.rb +73 -0
  88. data/lib/quandoo/api/reservations_api.rb +178 -0
  89. data/lib/quandoo/api/reviews_api.rb +241 -0
  90. data/lib/quandoo/api/status_api.rb +111 -0
  91. data/lib/quandoo/api/validations_api.rb +76 -0
  92. data/lib/quandoo/api_client.rb +389 -0
  93. data/lib/quandoo/api_error.rb +38 -0
  94. data/lib/quandoo/configuration.rb +216 -0
  95. data/lib/quandoo/models/agent_tracking.rb +189 -0
  96. data/lib/quandoo/models/area_dto.rb +204 -0
  97. data/lib/quandoo/models/chain_dto.rb +192 -0
  98. data/lib/quandoo/models/changed_review_dto.rb +250 -0
  99. data/lib/quandoo/models/coordinates_dto.rb +192 -0
  100. data/lib/quandoo/models/create_review_dto.rb +214 -0
  101. data/lib/quandoo/models/created_master_customer.rb +189 -0
  102. data/lib/quandoo/models/created_reservation.rb +229 -0
  103. data/lib/quandoo/models/created_reservation_data.rb +221 -0
  104. data/lib/quandoo/models/created_reservation_enquiry.rb +189 -0
  105. data/lib/quandoo/models/created_reservation_enquiry_data.rb +221 -0
  106. data/lib/quandoo/models/customer_data_list.rb +203 -0
  107. data/lib/quandoo/models/customer_dto.rb +201 -0
  108. data/lib/quandoo/models/customer_response.rb +362 -0
  109. data/lib/quandoo/models/customer_review_data.rb +214 -0
  110. data/lib/quandoo/models/customer_statistics_data.rb +219 -0
  111. data/lib/quandoo/models/deal_data.rb +253 -0
  112. data/lib/quandoo/models/document_dto.rb +210 -0
  113. data/lib/quandoo/models/error_response.rb +226 -0
  114. data/lib/quandoo/models/get_reservation_enquiry_data.rb +249 -0
  115. data/lib/quandoo/models/get_review_dto.rb +288 -0
  116. data/lib/quandoo/models/get_reviews_dto.rb +216 -0
  117. data/lib/quandoo/models/image_dto.rb +183 -0
  118. data/lib/quandoo/models/link_relation_dto.rb +235 -0
  119. data/lib/quandoo/models/location_dto.rb +192 -0
  120. data/lib/quandoo/models/marketing_setting_dto.rb +238 -0
  121. data/lib/quandoo/models/merchant_address_dto.rb +219 -0
  122. data/lib/quandoo/models/merchant_availability_days_dto.rb +198 -0
  123. data/lib/quandoo/models/merchant_availability_dto.rb +226 -0
  124. data/lib/quandoo/models/merchant_availability_dto_list.rb +215 -0
  125. data/lib/quandoo/models/merchant_customer.rb +271 -0
  126. data/lib/quandoo/models/merchant_customer_data.rb +390 -0
  127. data/lib/quandoo/models/merchant_details_dto.rb +402 -0
  128. data/lib/quandoo/models/merchant_details_dto_list.rb +218 -0
  129. data/lib/quandoo/models/merchant_menu_category_dto.rb +216 -0
  130. data/lib/quandoo/models/merchant_menu_dto.rb +251 -0
  131. data/lib/quandoo/models/merchant_menu_item_dto.rb +224 -0
  132. data/lib/quandoo/models/merchant_menus_dto.rb +185 -0
  133. data/lib/quandoo/models/merchant_reservation.rb +301 -0
  134. data/lib/quandoo/models/merchant_reservation_data.rb +219 -0
  135. data/lib/quandoo/models/merchant_reservation_enquiry.rb +311 -0
  136. data/lib/quandoo/models/merchant_reservation_enquiry_data.rb +219 -0
  137. data/lib/quandoo/models/merchant_reservation_settings_dto.rb +290 -0
  138. data/lib/quandoo/models/merchant_subscription.rb +217 -0
  139. data/lib/quandoo/models/merchant_vault_settings_dto.rb +231 -0
  140. data/lib/quandoo/models/merchant_with_recommendations_dto.rb +248 -0
  141. data/lib/quandoo/models/opening_times_dto.rb +189 -0
  142. data/lib/quandoo/models/reservation_data.rb +331 -0
  143. data/lib/quandoo/models/reservation_data_list.rb +185 -0
  144. data/lib/quandoo/models/reservation_details.rb +229 -0
  145. data/lib/quandoo/models/reservation_enquiry_message_data.rb +241 -0
  146. data/lib/quandoo/models/reservation_enquiry_message_list.rb +185 -0
  147. data/lib/quandoo/models/reservation_menu_data.rb +190 -0
  148. data/lib/quandoo/models/reservation_menu_item_data.rb +219 -0
  149. data/lib/quandoo/models/rest_cookie.rb +194 -0
  150. data/lib/quandoo/models/review_dto.rb +238 -0
  151. data/lib/quandoo/models/review_dto_list.rb +218 -0
  152. data/lib/quandoo/models/standard_opening_times_dto.rb +174 -0
  153. data/lib/quandoo/models/tag_group_dto.rb +228 -0
  154. data/lib/quandoo/models/tracking.rb +199 -0
  155. data/lib/quandoo/models/translated_tag_dto.rb +192 -0
  156. data/lib/quandoo/models/update_reservation_data.rb +189 -0
  157. data/lib/quandoo/models/update_reservation_enquiry_data.rb +184 -0
  158. data/lib/quandoo/models/update_review_dto.rb +209 -0
  159. data/lib/quandoo/version.rb +15 -0
  160. data/quandoo.gemspec +45 -0
  161. data/spec/api/availabilities_api_spec.rb +69 -0
  162. data/spec/api/customers_api_spec.rb +75 -0
  163. data/spec/api/menus_api_spec.rb +100 -0
  164. data/spec/api/merchants_api_spec.rb +119 -0
  165. data/spec/api/reservation_enquiries_api_spec.rb +84 -0
  166. data/spec/api/reservation_settings_api_spec.rb +47 -0
  167. data/spec/api/reservations_api_spec.rb +72 -0
  168. data/spec/api/reviews_api_spec.rb +86 -0
  169. data/spec/api/status_api_spec.rb +57 -0
  170. data/spec/api/validations_api_spec.rb +48 -0
  171. data/spec/api_client_spec.rb +226 -0
  172. data/spec/configuration_spec.rb +42 -0
  173. data/spec/models/agent_tracking_spec.rb +41 -0
  174. data/spec/models/area_dto_spec.rb +53 -0
  175. data/spec/models/chain_dto_spec.rb +47 -0
  176. data/spec/models/changed_review_dto_spec.rb +57 -0
  177. data/spec/models/coordinates_dto_spec.rb +47 -0
  178. data/spec/models/create_review_dto_spec.rb +53 -0
  179. data/spec/models/created_master_customer_spec.rb +41 -0
  180. data/spec/models/created_reservation_data_spec.rb +53 -0
  181. data/spec/models/created_reservation_enquiry_data_spec.rb +53 -0
  182. data/spec/models/created_reservation_enquiry_spec.rb +41 -0
  183. data/spec/models/created_reservation_spec.rb +59 -0
  184. data/spec/models/customer_data_list_spec.rb +53 -0
  185. data/spec/models/customer_dto_spec.rb +53 -0
  186. data/spec/models/customer_response_spec.rb +99 -0
  187. data/spec/models/customer_review_data_spec.rb +59 -0
  188. data/spec/models/customer_statistics_data_spec.rb +53 -0
  189. data/spec/models/deal_data_spec.rb +57 -0
  190. data/spec/models/document_dto_spec.rb +59 -0
  191. data/spec/models/error_response_spec.rb +51 -0
  192. data/spec/models/get_reservation_enquiry_data_spec.rb +77 -0
  193. data/spec/models/get_review_dto_spec.rb +81 -0
  194. data/spec/models/get_reviews_dto_spec.rb +59 -0
  195. data/spec/models/image_dto_spec.rb +41 -0
  196. data/spec/models/link_relation_dto_spec.rb +57 -0
  197. data/spec/models/location_dto_spec.rb +47 -0
  198. data/spec/models/marketing_setting_dto_spec.rb +55 -0
  199. data/spec/models/merchant_address_dto_spec.rb +65 -0
  200. data/spec/models/merchant_availability_days_dto_spec.rb +47 -0
  201. data/spec/models/merchant_availability_dto_list_spec.rb +53 -0
  202. data/spec/models/merchant_availability_dto_spec.rb +59 -0
  203. data/spec/models/merchant_customer_data_spec.rb +119 -0
  204. data/spec/models/merchant_customer_spec.rb +83 -0
  205. data/spec/models/merchant_details_dto_list_spec.rb +59 -0
  206. data/spec/models/merchant_details_dto_spec.rb +137 -0
  207. data/spec/models/merchant_menu_category_dto_spec.rb +53 -0
  208. data/spec/models/merchant_menu_dto_spec.rb +71 -0
  209. data/spec/models/merchant_menu_item_dto_spec.rb +59 -0
  210. data/spec/models/merchant_menus_dto_spec.rb +41 -0
  211. data/spec/models/merchant_reservation_data_spec.rb +53 -0
  212. data/spec/models/merchant_reservation_enquiry_data_spec.rb +53 -0
  213. data/spec/models/merchant_reservation_enquiry_spec.rb +71 -0
  214. data/spec/models/merchant_reservation_settings_dto_spec.rb +101 -0
  215. data/spec/models/merchant_reservation_spec.rb +101 -0
  216. data/spec/models/merchant_subscription_spec.rb +45 -0
  217. data/spec/models/merchant_vault_settings_dto_spec.rb +59 -0
  218. data/spec/models/merchant_with_recommendations_dto_spec.rb +57 -0
  219. data/spec/models/opening_times_dto_spec.rb +41 -0
  220. data/spec/models/reservation_data_list_spec.rb +41 -0
  221. data/spec/models/reservation_data_spec.rb +101 -0
  222. data/spec/models/reservation_details_spec.rb +59 -0
  223. data/spec/models/reservation_enquiry_message_data_spec.rb +57 -0
  224. data/spec/models/reservation_enquiry_message_list_spec.rb +41 -0
  225. data/spec/models/reservation_menu_data_spec.rb +41 -0
  226. data/spec/models/reservation_menu_item_data_spec.rb +65 -0
  227. data/spec/models/rest_cookie_spec.rb +47 -0
  228. data/spec/models/review_dto_list_spec.rb +59 -0
  229. data/spec/models/review_dto_spec.rb +65 -0
  230. data/spec/models/standard_opening_times_dto_spec.rb +35 -0
  231. data/spec/models/tag_group_dto_spec.rb +51 -0
  232. data/spec/models/tracking_spec.rb +47 -0
  233. data/spec/models/translated_tag_dto_spec.rb +47 -0
  234. data/spec/models/update_reservation_data_spec.rb +41 -0
  235. data/spec/models/update_reservation_enquiry_data_spec.rb +41 -0
  236. data/spec/models/update_review_dto_spec.rb +53 -0
  237. data/spec/spec_helper.rb +111 -0
  238. metadata +538 -0
@@ -0,0 +1,8 @@
1
+ # Quandoo::OpeningTimesDto
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **standard_opening_times** | [**StandardOpeningTimesDto**](StandardOpeningTimesDto.md) | The standard opening times of the merchant. |
7
+
8
+
@@ -0,0 +1,18 @@
1
+ # Quandoo::ReservationData
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **String** | The agent-dependent unique id of the reservation. |
7
+ **number** | **Integer** | The id of the reservation on quandoo system. |
8
+ **quandoo_id** | **String** | The public id of this reservation on quandoo system. |
9
+ **status** | **String** | The status of the reservation. |
10
+ **updated_at** | **DateTime** | The date and time when the reservation will take place. Format: yyyy-MM-ddTHH:mm:ssZ |
11
+ **capacity** | **Integer** | The capacity of the reservation. |
12
+ **merchant_id** | **Integer** | The id of the merchant. |
13
+ **customer_id** | **String** | The id of the customer. |
14
+ **promocode** | **String** | The promotion code used in this reservation. Optional. | [optional]
15
+ **extra_info** | **String** | Extra information that the customer provided for the reservation. Optional. | [optional]
16
+ **links** | [**Array<LinkRelationDto>**](LinkRelationDto.md) | The links related to this entity. |
17
+
18
+
@@ -0,0 +1,8 @@
1
+ # Quandoo::ReservationDataList
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **reservations** | [**Array<ReservationData>**](ReservationData.md) | | [optional]
7
+
8
+
@@ -0,0 +1,11 @@
1
+ # Quandoo::ReservationDetails
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **status** | **String** | The status of the reservation. |
7
+ **capacity** | **Integer** | The capacity (people count) of the reservation. |
8
+ **area_id** | **Integer** | The id of the area this reservation should be in. Optional. | [optional]
9
+ **date_time** | **DateTime** | The date and time when the reservation will take place. Format: yyyy-MM-ddTHH:mm:ssZ |
10
+
11
+
@@ -0,0 +1,230 @@
1
+ # Quandoo::ReservationEnquiriesApi
2
+
3
+ All URIs are relative to *https://api.quandoo.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**create_reservation_enquiry1**](ReservationEnquiriesApi.md#create_reservation_enquiry1) | **PUT** /v1/reservation-enquiries | Create reservation enquiries
8
+ [**get_messages_for_reservation_enquiry1**](ReservationEnquiriesApi.md#get_messages_for_reservation_enquiry1) | **GET** /v1/reservation-enquiries/{reservationEnquiryId}/messages | Get all messages of a reservation enquiry
9
+ [**get_reservation_enquiry1**](ReservationEnquiriesApi.md#get_reservation_enquiry1) | **GET** /v1/reservation-enquiries/{reservationEnquiryId} | Get reservation enquiry by id
10
+ [**update_reservation_enquiry1**](ReservationEnquiriesApi.md#update_reservation_enquiry1) | **PATCH** /v1/reservation-enquiries/{reservationEnquiryId} | Update status of reservation enquiry by id
11
+
12
+
13
+ # **create_reservation_enquiry1**
14
+ > CreatedReservationEnquiryData create_reservation_enquiry1(body)
15
+
16
+ Create reservation enquiries
17
+
18
+ This endpoint allows to create a reservation enquiry for a certain capacity, start and end time. It also requires certain customer information. All optional fields can be either omitted or set to null. The endpoint is idempotent, which means sending the same request twice will not create another reservation enquiry. For that purpose the client is required to generate an agent-specific unique ID for each request. The endpoint will return status `HTTP 400` should any of the required parameters be missing or formatted incorrectly. See schema for details. ####Request: The request needs to have 3 objects: reservation enquiry, customer and tracking information. * **reservationEnquiry**: Information about the merchant and the enquiry. * **id**: The unique identifier of the reservation enquiry for the calling agent (Agent dependent field) or NULL if the agent identifier should be created. Optional. * **merchantId**: The ID of the merchant at which this enquiry will be made. **Required**. * **capacity**: The capacity (people count) of the reservation enquiry. **Required**. * **startDateTime**: The start date and time when the customer wants to make a reservation. Format: yyyy-MM-ddTHH:mm:ssZ. **Required**. * **endDateTime**: The expected date and time for the reservation to end accordingly to the customer. Format: yyyy-MM-ddTHH:mm:ssZ. **Required**. * **message**: A free-text message to the merchant. Max of 5000 characters. **Required**. * **customer**: Information on the customer making the reservation. * **id**: Identifier of the customer for the calling agent. Agent dependent field. Optional. * **firstName**: The first name of the customer. Optional. * **lastName**: The last name of the customer. Optional. * **emailAddress**: The email address of the customer. **Required**. * **phoneNumber**: The phone number of the customer. Without country code, since it will be assumed from the country field. Example: 030120765890. **Required**. * **locale**: The locale of the customer. E.g. de_DE. **Required**. * **country**: The 2 letter ISO country of the customer. E.g DE. **Required** * **subscriptions**: List of requested subscriptions e.g. QUANDOO, MERCHANT. Optional. * **tracking**: Third party information used to track customer and reservation enquiry. * **agent**: The id of the agent creating this reservation enquiry. **Required**. * **cookie**: Cookie information to be stored with this reservation. Optional. ####Response: The response returns information on the created reservation enquiry and the customer along with relevant links to follow. * **reservationEnquiry**: Information on the created reservation enquiry. * **id**: Agent-specific id set for the reservation enquiry. * **customer**: Information on the customer. * **id**: Agent-specific id set for the customer. * **links**: Related links that can be followed based on this response. Example curl: ``` curl -H \"Content-Type: application/json\" -X POST -d ' { \"reservationEnquiry\": { \"id\": \"07f53b36-3f48-11e5-a151-feff819cdc9f\", \"merchantId\": 15, \"capacity\": 10, \"startDateTime\": \"2015-06-22T12:00:00+00:00\", \"endDateTime\": \"2015-06-22T17:00:00+00:00\", \"message\": \"Customer specific message\" }, \"customer\": { \"id\": \"659b9f4b-cd1a-4dc9-a5c3-8ef6bacbade5\", \"firstName\": \"Hans\", \"lastName\": \"Wurst\", \"emailAddress\": \"hans.wurst@foo.bar\", \"phoneNumber\": \"017312345678\", \"locale\": \"de_DE\", \"country\": \"DE\", \"subscriptions\": [ { \"id\": \"QUANDOO\" }, { \"id\": \"MERCHANT\" } ] }, \"tracking\": { \"agent\": { \"id\": 3 }, \"cookie\": { \"tracking\": \"ff819cdc9\", \"referenceId\": \"07f53b36\" } } }' https://{host}/v{X}/reservation-enquiries ``` Example response: ``` { \"reservationEnquiry\": { \"id\": \"07f53b36-3f48-11e5-a151-feff819cdc9f\" }, \"customer\": { \"id\": \"2cc29cba-1e1f-4af6-8184-386e19c891ec\" }, \"links\": [ { \"href\": \"https://{host}/v{X}/merchants/15\", \"method\": \"GET\", \"rel\": \"get-merchant\" }, { \"href\": \"https://{host}/v{X}/merchants/15/reservation-settings\", \"method\": \"GET\", \"rel\": \"reservation-settings\" }, { \"href\": \"https://{host}/v{X}/merchants/15/availabilities\", \"method\": \"GET\", \"rel\": \"availability_days\" }, { \"href\": \"https://{host}/v{X}/merchants/15/availabilities/2015-06-22/times\", \"method\": \"GET\", \"rel\": \"availability\" } ] } ```
19
+
20
+ ### Example
21
+ ```ruby
22
+ # load the gem
23
+ require 'quandoo'
24
+ # setup authorization
25
+ Quandoo.configure do |config|
26
+ # Configure API key authorization: API_TOKEN
27
+ config.api_key['X-Quandoo-AuthToken'] = 'YOUR API KEY'
28
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
29
+ #config.api_key_prefix['X-Quandoo-AuthToken'] = 'Bearer'
30
+ end
31
+
32
+ api_instance = Quandoo::ReservationEnquiriesApi.new
33
+
34
+ body = Quandoo::MerchantReservationEnquiryData.new # MerchantReservationEnquiryData | Reservation enquiry data
35
+
36
+
37
+ begin
38
+ #Create reservation enquiries
39
+ result = api_instance.create_reservation_enquiry1(body)
40
+ p result
41
+ rescue Quandoo::ApiError => e
42
+ puts "Exception when calling ReservationEnquiriesApi->create_reservation_enquiry1: #{e}"
43
+ end
44
+ ```
45
+
46
+ ### Parameters
47
+
48
+ Name | Type | Description | Notes
49
+ ------------- | ------------- | ------------- | -------------
50
+ **body** | [**MerchantReservationEnquiryData**](MerchantReservationEnquiryData.md)| Reservation enquiry data |
51
+
52
+ ### Return type
53
+
54
+ [**CreatedReservationEnquiryData**](CreatedReservationEnquiryData.md)
55
+
56
+ ### Authorization
57
+
58
+ [API_TOKEN](../README.md#API_TOKEN)
59
+
60
+ ### HTTP request headers
61
+
62
+ - **Content-Type**: application/json
63
+ - **Accept**: application/json
64
+
65
+
66
+
67
+ # **get_messages_for_reservation_enquiry1**
68
+ > ReservationEnquiryMessageList get_messages_for_reservation_enquiry1(reservation_enquiry_id)
69
+
70
+ Get all messages of a reservation enquiry
71
+
72
+ This endpoint allows an agent to get all messages of a reservation enquiry. The id of the reservation enquiry is agent-specific. The agent needs to be authenticated. The endpoint will return `HTTP 404 - Not Found` if the reservation enquiry with the specified id could not be found. It will return `HTTP 403 - Forbidden` if the agent is not authenticated, if the agent doesn't have permissions or the reservation enquiry doesn't belong to the authenticated agent. ####Request: * **reservationEnquiryId**: Agent-specific ID of the requested reservation enquiry ####Response: The response will contain a _list_ of messages. Each one containing the following fields: * **senderType**: If this message was sent by the customer or by the merchant * **creationDate**: The date time that this message was created. Format: yyyy-MM-ddTHH:mm:ssZ * **message**: The text of the message itself. Example curl: ``` curl https://{host}/v{X}/reservation-enquiries/07f53b36-3f48-11e5-a151-feff819cdc9f/messages ``` Example response: ``` { \"messages\": [ { \"senderType\": \"CUSTOMER\", \"message\": \"Customer specific message\", \"creationDate\": \"2018-05-04T09:26:53Z\" } ] } ```
73
+
74
+ ### Example
75
+ ```ruby
76
+ # load the gem
77
+ require 'quandoo'
78
+ # setup authorization
79
+ Quandoo.configure do |config|
80
+ # Configure API key authorization: API_TOKEN
81
+ config.api_key['X-Quandoo-AuthToken'] = 'YOUR API KEY'
82
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
83
+ #config.api_key_prefix['X-Quandoo-AuthToken'] = 'Bearer'
84
+ end
85
+
86
+ api_instance = Quandoo::ReservationEnquiriesApi.new
87
+
88
+ reservation_enquiry_id = 'reservation_enquiry_id_example' # String | Id of the reservation enquiry
89
+
90
+
91
+ begin
92
+ #Get all messages of a reservation enquiry
93
+ result = api_instance.get_messages_for_reservation_enquiry1(reservation_enquiry_id)
94
+ p result
95
+ rescue Quandoo::ApiError => e
96
+ puts "Exception when calling ReservationEnquiriesApi->get_messages_for_reservation_enquiry1: #{e}"
97
+ end
98
+ ```
99
+
100
+ ### Parameters
101
+
102
+ Name | Type | Description | Notes
103
+ ------------- | ------------- | ------------- | -------------
104
+ **reservation_enquiry_id** | **String**| Id of the reservation enquiry |
105
+
106
+ ### Return type
107
+
108
+ [**ReservationEnquiryMessageList**](ReservationEnquiryMessageList.md)
109
+
110
+ ### Authorization
111
+
112
+ [API_TOKEN](../README.md#API_TOKEN)
113
+
114
+ ### HTTP request headers
115
+
116
+ - **Content-Type**: Not defined
117
+ - **Accept**: Not defined
118
+
119
+
120
+
121
+ # **get_reservation_enquiry1**
122
+ > GetReservationEnquiryData get_reservation_enquiry1(reservation_enquiry_id)
123
+
124
+ Get reservation enquiry by id
125
+
126
+ This endpoint allows an agent to get an reservation enquiry by id. The id is agent-specific. The agent needs to be authenticated. The endpoint will return `HTTP 404 - Not Found` if the reservation enquiry with the specified id could not be found. It will return `HTTP 403 - Forbidden` if the agent is not authenticated, if the agent doesn't have permissions or the reservation enquiry doesn't belong to the authenticated agent. ####Request: * **reservationEnquiryId**: Agent-specific ID of the requested reservation enquiry ####Response: * **id**: The agent-dependent unique id of the reservation enquiry * **merchantId**: The ID of the merchant at which this reservation enquiry was made * **customerId**: The ID of the customer to which this reservation enquiry belongs * **capacity**: The capacity (people count) of the reservation enquiry * **startDateTime**: The start date time of the reservation enquiry. Format: yyyy-MM-ddTHH:mm:ssZ * **endDateTime**: The end date time of the reservation enquiry. Format: yyyy-MM-ddTHH:mm:ssZ * **status**: The status of the reservation enquiry which can be one of: NEW, IN_PROGRESS, ACCEPTED or REJECTED Example curl: ``` curl https://{host}/v{X}/reservation-enquiries/07f53b36-3f48-11e5-a151-feff819cdc9f ``` Example response: ``` { \"id\": \"07f53b36-3f48-11e5-a151-feff819cdc9f\", \"merchantId\": 1384, \"customerId\": \"35fff464-142c-48ac-a0c6-ed72a1615664\", \"capacity\": 4, \"startTime\": \"2015-06-22T12:00:00+00:00\", \"endTime\": \"2015-06-22T13:00:00+00:00\", \"status\": \"NEW\" } ```
127
+
128
+ ### Example
129
+ ```ruby
130
+ # load the gem
131
+ require 'quandoo'
132
+ # setup authorization
133
+ Quandoo.configure do |config|
134
+ # Configure API key authorization: API_TOKEN
135
+ config.api_key['X-Quandoo-AuthToken'] = 'YOUR API KEY'
136
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
137
+ #config.api_key_prefix['X-Quandoo-AuthToken'] = 'Bearer'
138
+ end
139
+
140
+ api_instance = Quandoo::ReservationEnquiriesApi.new
141
+
142
+ reservation_enquiry_id = 'reservation_enquiry_id_example' # String | Id of the reservation enquiry
143
+
144
+
145
+ begin
146
+ #Get reservation enquiry by id
147
+ result = api_instance.get_reservation_enquiry1(reservation_enquiry_id)
148
+ p result
149
+ rescue Quandoo::ApiError => e
150
+ puts "Exception when calling ReservationEnquiriesApi->get_reservation_enquiry1: #{e}"
151
+ end
152
+ ```
153
+
154
+ ### Parameters
155
+
156
+ Name | Type | Description | Notes
157
+ ------------- | ------------- | ------------- | -------------
158
+ **reservation_enquiry_id** | **String**| Id of the reservation enquiry |
159
+
160
+ ### Return type
161
+
162
+ [**GetReservationEnquiryData**](GetReservationEnquiryData.md)
163
+
164
+ ### Authorization
165
+
166
+ [API_TOKEN](../README.md#API_TOKEN)
167
+
168
+ ### HTTP request headers
169
+
170
+ - **Content-Type**: Not defined
171
+ - **Accept**: Not defined
172
+
173
+
174
+
175
+ # **update_reservation_enquiry1**
176
+ > update_reservation_enquiry1(reservation_enquiry_id, body)
177
+
178
+ Update status of reservation enquiry by id
179
+
180
+ This endpoint allows to update the status of a reservation enquiry with the given ID. The allowed status transitions are as following: * NEW --> IN_PROGRESS --> {ACCEPTED/REJECTED} * ACCEPTED <--> REJECTED The endpoint will return `HTTP 404 - Not Found` if the reservation enquiry with the specified id could not be found. The endpoint will return `HTTP 400 - Bad Request` if the specified status is wrong. The endpoint will return `HTTP 409 - Conflict` if the status change is invalid. The endpoint will return `HTTP 403 - Forbidden` if the agent is not authenticated, if the agent doesn't have permissions or the reservation enquiry doesn't belong to the authenticated agent. ####Request: * **reservationEnquiryId**: Agent-specific ID of the requested reservation enquiry * **reservationEnquiryData**: The new enquiry status
181
+
182
+ ### Example
183
+ ```ruby
184
+ # load the gem
185
+ require 'quandoo'
186
+ # setup authorization
187
+ Quandoo.configure do |config|
188
+ # Configure API key authorization: API_TOKEN
189
+ config.api_key['X-Quandoo-AuthToken'] = 'YOUR API KEY'
190
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
191
+ #config.api_key_prefix['X-Quandoo-AuthToken'] = 'Bearer'
192
+ end
193
+
194
+ api_instance = Quandoo::ReservationEnquiriesApi.new
195
+
196
+ reservation_enquiry_id = 'reservation_enquiry_id_example' # String | Id of the reservation enquiry
197
+
198
+ body = Quandoo::UpdateReservationEnquiryData.new # UpdateReservationEnquiryData | New reservation enquiry status
199
+
200
+
201
+ begin
202
+ #Update status of reservation enquiry by id
203
+ api_instance.update_reservation_enquiry1(reservation_enquiry_id, body)
204
+ rescue Quandoo::ApiError => e
205
+ puts "Exception when calling ReservationEnquiriesApi->update_reservation_enquiry1: #{e}"
206
+ end
207
+ ```
208
+
209
+ ### Parameters
210
+
211
+ Name | Type | Description | Notes
212
+ ------------- | ------------- | ------------- | -------------
213
+ **reservation_enquiry_id** | **String**| Id of the reservation enquiry |
214
+ **body** | [**UpdateReservationEnquiryData**](UpdateReservationEnquiryData.md)| New reservation enquiry status |
215
+
216
+ ### Return type
217
+
218
+ nil (empty response body)
219
+
220
+ ### Authorization
221
+
222
+ [API_TOKEN](../README.md#API_TOKEN)
223
+
224
+ ### HTTP request headers
225
+
226
+ - **Content-Type**: Not defined
227
+ - **Accept**: Not defined
228
+
229
+
230
+
@@ -0,0 +1,10 @@
1
+ # Quandoo::ReservationEnquiryMessageData
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **sender_type** | **String** | | [optional]
7
+ **message** | **String** | | [optional]
8
+ **creation_date** | **DateTime** | The date and time when the reservation will take place. Format: yyyy-MM-ddTHH:mm:ssZ |
9
+
10
+
@@ -0,0 +1,8 @@
1
+ # Quandoo::ReservationEnquiryMessageList
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **messages** | [**Array&lt;ReservationEnquiryMessageData&gt;**](ReservationEnquiryMessageData.md) | | [optional]
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # Quandoo::ReservationMenuData
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **items** | [**Array&lt;ReservationMenuItemData&gt;**](ReservationMenuItemData.md) | |
7
+
8
+
@@ -0,0 +1,12 @@
1
+ # Quandoo::ReservationMenuItemData
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **menu_id** | **Integer** | | [optional]
7
+ **item_id** | **Integer** | | [optional]
8
+ **guest_public_id** | **String** | | [optional]
9
+ **quantity** | **Integer** | | [optional]
10
+ **href** | **String** | | [optional]
11
+
12
+
@@ -0,0 +1,56 @@
1
+ # Quandoo::ReservationSettingsApi
2
+
3
+ All URIs are relative to *https://api.quandoo.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**reservation_settings1**](ReservationSettingsApi.md#reservation_settings1) | **GET** /v1/merchants/{merchantId}/reservation-settings | Get merchant reservation settings
8
+
9
+
10
+ # **reservation_settings1**
11
+ > MerchantReservationSettingsDto reservation_settings1(merchant_id)
12
+
13
+ Get merchant reservation settings
14
+
15
+ This endpoint provides all data that is required to initiate the reservation flow and is not part of the search endpoint. Example curl: ``` curl https://{host}/v{X}/merchants/15/reservation-settings ``` Example response: ``` { \"areaIds\": [ { \"id\": 2, \"name\": \"Garden\", \"priority\": 10 } ], \"areaSelectionRequired\": true, \"capacities\": [ 1, 2, 3, 4, 5, 6 ], \"links\": [ { \"href\": \"https://{host}/v{X}/merchants/15\", \"method\": \"GET\", \"rel\": \"parent\" }, { \"href\": \"https://{host}/v{X}/merchants/15/availabilities\", \"method\": \"GET\", \"rel\": \"availability_days\" }, { \"href\": \"https://{host}/v{X}/merchants/15/availabilities/2017-01-01/times\", \"method\": \"GET\", \"rel\": \"availability\" } ], \"merchantNewsletterSelectionRequired\": true, \"minimumCapacityForEnquiries\": 10, \"onlineReservationInterval\": 60, \"reservationEnquiryEnabled\": true, \"specialTerms\": \"This is any custom string for special terms\", \"automaticConfirmation\": true, \"ccvEnabled\": true } ```
16
+
17
+ ### Example
18
+ ```ruby
19
+ # load the gem
20
+ require 'quandoo'
21
+
22
+ api_instance = Quandoo::ReservationSettingsApi.new
23
+
24
+ merchant_id = 56 # Integer | Id of the merchant
25
+
26
+
27
+ begin
28
+ #Get merchant reservation settings
29
+ result = api_instance.reservation_settings1(merchant_id)
30
+ p result
31
+ rescue Quandoo::ApiError => e
32
+ puts "Exception when calling ReservationSettingsApi->reservation_settings1: #{e}"
33
+ end
34
+ ```
35
+
36
+ ### Parameters
37
+
38
+ Name | Type | Description | Notes
39
+ ------------- | ------------- | ------------- | -------------
40
+ **merchant_id** | **Integer**| Id of the merchant |
41
+
42
+ ### Return type
43
+
44
+ [**MerchantReservationSettingsDto**](MerchantReservationSettingsDto.md)
45
+
46
+ ### Authorization
47
+
48
+ No authorization required
49
+
50
+ ### HTTP request headers
51
+
52
+ - **Content-Type**: Not defined
53
+ - **Accept**: Not defined
54
+
55
+
56
+
@@ -0,0 +1,168 @@
1
+ # Quandoo::ReservationsApi
2
+
3
+ All URIs are relative to *https://api.quandoo.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**create_reservation1**](ReservationsApi.md#create_reservation1) | **PUT** /v1/reservations | Create reservations
8
+ [**get_reservation1**](ReservationsApi.md#get_reservation1) | **GET** /v1/reservations/{reservationId} | Get reservation by id
9
+ [**update_reservation1**](ReservationsApi.md#update_reservation1) | **PATCH** /v1/reservations/{reservationId} | Update reservation by id
10
+
11
+
12
+ # **create_reservation1**
13
+ > CreatedReservationData create_reservation1(body)
14
+
15
+ Create reservations
16
+
17
+ This endpoint allows to create a reservation for a certain capacity, date and time. It also requires certain customer information. All optional fields can be either omitted or set to null. The endpoint is idempotent, which means sending the same request twice will not create another reservation. For that purpose the client is required to generate an agent-specific unique ID for the reservation. The endpoint will return status `HTTP 409` should the reservation option specified by the given parameters not be bookable anymore. The endpoint will return status `HTTP 400` should any of the required parameters be missing or formatted incorrectly. See schema for details. ####Request: The request needs to have 3 objects for reservation, customer and tracking information. * **reservation**: Information about the reservation. * **id**: The identifier of the reservation for the calling agent (Agent-dependent field). Optional. * **merchantId**: The ID of the merchant at which this reservation will be made. **Required**. * **capacity**: The capacity (people count) of the reservation. **Required**. * **areaId**: The ID of the area this reservation should be in. Optional. * **dateTime**: The date and time when the reservation will take place. Format: yyyy-MM-ddTHH:mm:ssZ. **Required** * Z can be used, example: `2019-03-23T19:15:00Z` meaning UTC * a time zone offset can be specified, example: `2019-03-23T20:15:00+01:00` * **orderId**: The id of the order to which this reservation is associated. Optional. * **extraInfo**: Any extra information that the customer likes to provide. Optional. * **promoCode**: A promotion code which should be used with this reservation. Optional. * **creditCardVaultSettingsId**: A credit card vault settings to be used by this reservation. Optional. * **recurringCardDetailId**:A customer credit card reference to be used if credit card vault should be applied. Optional. * **deals**: A list of deals which should be used with this reservation. Type can be SPECIAL, OFFER or DISCOUNT. Optional. * **customer**: Information on the customer making the reservation. * **id**: Identifier of the customer for the calling agent. Agent dependent field. Optional. * **firstName**: The first name of the customer. Optional. * **lastName**: The last name of the customer. Optional. * **emailAddress**: The email address of the customer. **Required**. * **phoneNumber**: The phone number of the customer. Without country code, since it will be assumed from the country field. Example: 030120765890. **Required**. * **locale**: The locale of the customer. E.g. de_DE. **Required**. * **country**: The 2 letter ISO country of the customer. E.g DE. **Required** * **subscriptions**: List of requested subscriptions e.g. QUANDOO, MERCHANT. Optional. * **tracking**: Third party information used to track customer and reservations. * **agent**: The id of the agent creating this request and partner references if any. **Required**. * **cookie**: Cookie information to be stored with this reservation. Optional. ####Response: The response returns information on the created reservation and the customer along with relevant links to follow. * **reservation**: Information on the created reservation. * **id**: Agent-specific id set for the reservation. * **number**: Quandoo internal identifier of the reservation. * **status**: Status for the created reservation. eg. \"CREATED\" * **quandooId**: Quandoo public identifier for the reservation. * **customer**: Information on the customer making the reservation. * **id**: Agent-specific id set for the customer. * **links**: Related links that can be followed based on this response. Example curl: ``` curl -H \"Content-Type: application/json\" -X POST -d ' { \"reservation\": { \"id\": \"07f53b36-3f48-11e5-a151-feff819cdc9f\", \"merchantId\": 15, \"capacity\": 2, \"areaId\": 1, \"dateTime\": \"2015-06-22T12:00:00+00:00\", \"orderId\": \"a7e9fa78-b167-4c25-921a-8da675b5f03a\", \"extraInfo\": \"Some text\", \"promoCode\": \"PROMO123\", \"deals\": [ { \"id\": \"a7db794d-6a0a-43fb-b680-3b30058af7a8\", \"count\": 2, \"type\": \"OFFER\" } ] }, \"customer\": { \"id\": \"659b9f4b-cd1a-4dc9-a5c3-8ef6bacbade5\", \"firstName\": \"Hans\", \"lastName\": \"Wurst\", \"emailAddress\": \"hans.wurst@foo.bar\", \"phoneNumber\": \"017312345678\", \"locale\": \"de_DE\", \"country\": \"DE\", \"subscriptions\": [ { \"id\": \"QUANDOO\" }, { \"id\": \"MERCHANT\" } ] }, \"tracking\": { \"agent\": { \"id\": 3 }, \"cookie\": { \"tracking\": \"ff819cdc9\", \"referenceId\": \"07f53b36\" } } }' https://{host}/v{X}/reservations ``` Example response: ``` { \"reservation\": { \"id\": \"07f53b36-3f48-11e5-a151-feff819cdc9f\", \"number\": 708457891, \"status\": \"CREATED\", \"quandooId\": \"07f53b36-3f48-11e5-a151-feff819cdc9f\" }, \"customer\": { \"id\": \"01a53b36-3f48-11e5-a151-feff819cdc9f\" }, \"links\": [ { \"href\": \"https://{host}/v{X}/merchants/15/reservation-settings\", \"method\": \"GET\", \"rel\": \"parent\" } ] } ```
18
+
19
+ ### Example
20
+ ```ruby
21
+ # load the gem
22
+ require 'quandoo'
23
+
24
+ api_instance = Quandoo::ReservationsApi.new
25
+
26
+ body = Quandoo::MerchantReservationData.new # MerchantReservationData | Reservation data
27
+
28
+
29
+ begin
30
+ #Create reservations
31
+ result = api_instance.create_reservation1(body)
32
+ p result
33
+ rescue Quandoo::ApiError => e
34
+ puts "Exception when calling ReservationsApi->create_reservation1: #{e}"
35
+ end
36
+ ```
37
+
38
+ ### Parameters
39
+
40
+ Name | Type | Description | Notes
41
+ ------------- | ------------- | ------------- | -------------
42
+ **body** | [**MerchantReservationData**](MerchantReservationData.md)| Reservation data |
43
+
44
+ ### Return type
45
+
46
+ [**CreatedReservationData**](CreatedReservationData.md)
47
+
48
+ ### Authorization
49
+
50
+ No authorization required
51
+
52
+ ### HTTP request headers
53
+
54
+ - **Content-Type**: Not defined
55
+ - **Accept**: Not defined
56
+
57
+
58
+
59
+ # **get_reservation1**
60
+ > ReservationData get_reservation1(reservation_id)
61
+
62
+ Get reservation by id
63
+
64
+ This endpoint allows an agent or a user to get a reservation by id. The id is either agent-specific or a public id. The agent/user needs to be authenticated. The endpoint will return `HTTP 404 - Not Found` if the reservation with the specified id could not be found. It will return `HTTP 403 - Forbidden` if the agent/user is not authenticated, if the agent/user doesn't have permissions, if the reservation doesn't belong to the authenticated agent or if the user doesn't have permissions to see objects from the merchant owner of the reservation ####Request: * **reservationId**: Agent-specific or public ID of the requested reservation ####Response: * **id**: Agent-specific or public ID of the requested reservation * **number**: Quandoo internal identifier of the reservation * **quandooId**: The public id of this reservation on quandoo system. * **status**: The status of the reservation eg. CREATED, CONFIRMED, CUSTOMER CANCELED etc. * **startTime**: The start time of the reservation. Format: `yyyy-MM-ddTHH:mm:ssZ` * **endTime**: The end time of the reservation. Format: `yyyy-MM-ddTHH:mm:ssZ` * **capacity**: The capacity (people count) of the reservation * **merchantId**: The ID of the merchant at which this reservation was made. * **customerId**: The public ID of the customer to which this reservation belongs * **promoCode**: The promotion code associated with this reservation. Optional. * **extraInfo**: extra information that the customer provided for the reservation. Optional. * **links**: Related links that can be followed based on this response. * **createdAt**: The date the reservation was created. Format: `yyyy-MM-ddTHH:mm:ssZ` * **updatedAt**: The date the reservation was last updated. Format: `yyyy-MM-ddTHH:mm:ssZ` Example curl: ``` curl https://{host}/v{X}/reservations/07f53b36-3f48-11e5-a151-feff819cdc9f ``` Example response: ``` { \"id\": \"07f53b36-3f48-11e5-a151-feff819cdc9f\", \"number\": 1092454812, \"quandooId\": \"07f53b36-3f48-11e5-a151-feff819cdc9f\", \"status\": \"CREATED\", \"startTime\": \"2015-06-22T12:00:00+00:00\", \"endTime\": \"2015-06-22T13:00:00+00:00\", \"capacity\": 4, \"merchantId\": 1384, \"customerId\": \"35fff464-142c-48ac-a0c6-ed72a1615664\", \"promocode\": \"SOME_CAMPAIGN_CODE\", \"extraInfo\": \"request for baby chair\", \"links\": [ { \"href\": \"https://{host}/v{X}/reservations/07f53b36-3f48-11e5-a151-feff819cdc9f\", \"method\": \"PATCH\", \"rel\": \"update\" } ], \"createdAt\": \"2015-06-01T15:21:54Z\", \"updatedAt\": \"2015-06-01T18:45:30Z\" } ```
65
+
66
+ ### Example
67
+ ```ruby
68
+ # load the gem
69
+ require 'quandoo'
70
+ # setup authorization
71
+ Quandoo.configure do |config|
72
+ # Configure API key authorization: API_TOKEN
73
+ config.api_key['X-Quandoo-AuthToken'] = 'YOUR API KEY'
74
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
75
+ #config.api_key_prefix['X-Quandoo-AuthToken'] = 'Bearer'
76
+ end
77
+
78
+ api_instance = Quandoo::ReservationsApi.new
79
+
80
+ reservation_id = 'reservation_id_example' # String | Id of the reservation
81
+
82
+
83
+ begin
84
+ #Get reservation by id
85
+ result = api_instance.get_reservation1(reservation_id)
86
+ p result
87
+ rescue Quandoo::ApiError => e
88
+ puts "Exception when calling ReservationsApi->get_reservation1: #{e}"
89
+ end
90
+ ```
91
+
92
+ ### Parameters
93
+
94
+ Name | Type | Description | Notes
95
+ ------------- | ------------- | ------------- | -------------
96
+ **reservation_id** | **String**| Id of the reservation |
97
+
98
+ ### Return type
99
+
100
+ [**ReservationData**](ReservationData.md)
101
+
102
+ ### Authorization
103
+
104
+ [API_TOKEN](../README.md#API_TOKEN)
105
+
106
+ ### HTTP request headers
107
+
108
+ - **Content-Type**: Not defined
109
+ - **Accept**: Not defined
110
+
111
+
112
+
113
+ # **update_reservation1**
114
+ > update_reservation1(reservation_id, body)
115
+
116
+ Update reservation by id
117
+
118
+ This endpoint allows an agent to update a reservation by id. The id is agent-specific. The agent needs to be authenticated. ####Request: * **reservationId**: Agent-specific ID of the requested reservation. Taken as a path parameter. * **reservation.status**: New status for the reservation. When is present then all parameters below should be omitted! * **reservation.capacity**: The capacity (people count) of the reservation. * **reservation.areaId**: The ID of the area this reservation should be in. * **reservation.dateTime**: The date and time when the reservation will take place. Format: yyyy-MM-ddTHH:mm:ssZ. For updating status request body should contain only reservation.status. Valid status values depend on the current status of reservation and can be `CUSTOMER_CANCELED` or `RECONFIRMED`. * `CUSTOMER_CANCELED` is valid if current status is one of the below: * CREATED * CONFIRMED * AUTOMATIC_CONFIRMED * NOTIFICATION_REQUESTED * NOTIFIED * RECONFIRMED * `RECONFIRMED` is valid if current status is one of the below: * CONFIRMED * AUTOMATIC_CONFIRMED * NOTIFICATION_REQUESTED * NOTIFIED If reservation.status field is not present then reservation data will be updated and reservation's status will be reset. Depending on `Automatic confirmation for online reservations` setting, reservation's status will be set to CREATED or AUTOMATIC_CONFIRMED. ####Response: The endpoint will return `HTTP 200 - OK` if update was successful. It will return `HTTP 404 - Not Found` error if the reservation with the specified id could not be found. It will return `HTTP 403 - Forbidden` error if the agent is not authenticated, if the agent doesn't have permissions or the reservation doesn't belong to the authenticated agent. It will return `HTTP 409 - Conflict` error if reservation has menu, smart offers, made by IOVOX, has conflict in status, time or other conflicts. Example curl: ``` curl -H \"Content-Type: application/json\" -X PATCH -d ' { \"reservation\": { \"status\": \"CUSTOMER_CANCELED\" } } ' https://{host}/v{X}/reservations/07f53b36-3f48-11e5-a151-feff819cdc9f ```
119
+
120
+ ### Example
121
+ ```ruby
122
+ # load the gem
123
+ require 'quandoo'
124
+ # setup authorization
125
+ Quandoo.configure do |config|
126
+ # Configure API key authorization: API_TOKEN
127
+ config.api_key['X-Quandoo-AuthToken'] = 'YOUR API KEY'
128
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
129
+ #config.api_key_prefix['X-Quandoo-AuthToken'] = 'Bearer'
130
+ end
131
+
132
+ api_instance = Quandoo::ReservationsApi.new
133
+
134
+ reservation_id = 'reservation_id_example' # String | Id of the reservation
135
+
136
+ body = Quandoo::UpdateReservationData.new # UpdateReservationData | New reservation status
137
+
138
+
139
+ begin
140
+ #Update reservation by id
141
+ api_instance.update_reservation1(reservation_id, body)
142
+ rescue Quandoo::ApiError => e
143
+ puts "Exception when calling ReservationsApi->update_reservation1: #{e}"
144
+ end
145
+ ```
146
+
147
+ ### Parameters
148
+
149
+ Name | Type | Description | Notes
150
+ ------------- | ------------- | ------------- | -------------
151
+ **reservation_id** | **String**| Id of the reservation |
152
+ **body** | [**UpdateReservationData**](UpdateReservationData.md)| New reservation status |
153
+
154
+ ### Return type
155
+
156
+ nil (empty response body)
157
+
158
+ ### Authorization
159
+
160
+ [API_TOKEN](../README.md#API_TOKEN)
161
+
162
+ ### HTTP request headers
163
+
164
+ - **Content-Type**: Not defined
165
+ - **Accept**: Not defined
166
+
167
+
168
+