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,119 @@
1
+ =begin
2
+ #Quandoo API Documentation
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.5
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for Quandoo::MerchantsApi
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'MerchantsApi' do
20
+ before do
21
+ # run before each test
22
+ @instance = Quandoo::MerchantsApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of MerchantsApi' do
30
+ it 'should create an instance of MerchantsApi' do
31
+ expect(@instance).to be_instance_of(Quandoo::MerchantsApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for get_reservations2
36
+ # Get merchant reservations
37
+ # This endpoint allows an agent to get reservations of a merchant. The results will be filtered by agent id. Reservation IDs in response are agent-specific. The agent needs to be authenticated. The endpoint will return `HTTP 404 - Not Found` if the merchant with the specified id could not be found. It will return `HTTP 403 - Forbidden` if the agent is not authenticated or the agent doesn't have permissions. ####Request: * **merchantId**: ID of the merchant * **offset**: sets the starting element to be returned. Defaults to 0 when unset or malformed. * **limit**: maximum number of results to be returned. Value must be between 1 and 100. Defaults to 100 when unset, malformed or outside bounds. * **earliest**: earliest date time of time window in UTC. Format: yyyy-MM-dd HH:mm:ss * **latest**: latest date time of time window in UTC. Format: yyyy-MM-dd HH:mm:ss ####Response: The response will be a _list_ of reservations. Each reservation has the fields explained below: * **id**: The public id of the 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}/merchants/32489/reservations ``` Example response: ``` { \"reservations\": [ { \"id\": \"07f53b36-3f48-11e5-a151-feff819cdc9f\", \"number\": 8734957, \"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\": \"ce0706ff-a95d-4229-a220-d21dcd175342\", \"promocode\": \"SOME_CAMPAIGN_CODE\", \"extraInfo\": \"request for baby chair\", \"links\": [ { \"href\": \"https://{host}/v{X}/reservations/07f53b36-3f48-11e5-a151-feff819cdc9f\", \"method\": \"GET\", \"rel\": \"self\" }, { \"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\" }, { \"id\": \"d8f53b36-3f48-11e5-a151-feff819cdc7a\", \"number\": 8734958, \"quandooId\": \"d8f53b36-3f48-11e5-a151-feff819cdc7a\", \"status\": \"CONFIRMED\", \"startTime\": \"2015-06-22T12:00:00+00:00\", \"endTime\": \"2015-06-22T13:00:00+00:00\", \"capacity\": 3, \"merchantId\": 1384, \"customerId\": \"ce0706ff-a95d-4229-a220-d21dcd175342\", \"promocode\": \"SOME_CAMPAIGN_CODE\", \"links\": [ { \"href\": \"https://{host}/v{X}/reservations/d8f53b36-3f48-11e5-a151-feff819cdc7a\", \"method\": \"GET\", \"rel\": \"self\" }, { \"href\": \"https://{host}/v{X}/reservations/d8f53b36-3f48-11e5-a151-feff819cdc7a\", \"method\": \"PATCH\", \"rel\": \"update\" } ], \"createdAt\": \"2015-06-01T15:21:54Z\", \"updatedAt\": \"2015-06-01T18:45:30Z\" } ] } ```
38
+ # @param merchant_id Id of the merchant
39
+ # @param [Hash] opts the optional parameters
40
+ # @option opts [Integer] :offset Skip first n reservations
41
+ # @option opts [Integer] :limit limit
42
+ # @option opts [DateTime] :earliest earliest date time of time window in UTC. Format: yyyy-MM-dd HH:mm:ss
43
+ # @option opts [DateTime] :latest latest date time of time window in UTC. Format: yyyy-MM-dd HH:mm:ss
44
+ # @return [ReservationDataList]
45
+ describe 'get_reservations2 test' do
46
+ it 'should work' do
47
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
48
+ end
49
+ end
50
+
51
+ # unit tests for get_reviews1
52
+ # Retrieves customer reviews for a merchant, specified by reviewId
53
+ # This endpoint retrieves customer reviews for a particular merchant with rating, description, locale, date & the customer's information.This merchant should be specified by their identifier **merchantId**, which is mandatory. Supports pagination via offset & limit parameters in the request. `offset` allows skipping the first n reviews. `limit` makes sure the response contains a maximum of n reviews. If not supplied, offset will be 0 and limit will be 10 ####Response: * **customer**: block contains link to customer's profile image, customer's first name & first letter of customer's last name. * **rating**: a value between 1 and 6, where 1 represents the worst rating and 6 represents the best. * **description**: the review description entered by the customer. * **locale**: represents the language settings of the customer, in the format: <language code>_<country code> * **date**: represents the date of the review, with the format: yyyy-MM-dd Example curl: ``` curl https://{host}/v{X}/merchants/15/reviews?offset=10&limit=5 ``` Example response: ``` { reviews: [ { customer: { firstName: \"Hans\", lastName: \"W\", profileImage: { url: \"https://www...\" }, }, rating: 1, description: \"Foo bar\", locale: \"de_DE\", date: \"2017-07-21\" } ], offset: 10, limit: 5, size: 1 } ```
54
+ # @param merchant_id
55
+ # @param [Hash] opts the optional parameters
56
+ # @option opts [Integer] :offset Skip first n reviews
57
+ # @option opts [Integer] :limit Max number of reviews to be retrieved
58
+ # @return [ReviewDtoList]
59
+ describe 'get_reviews1 test' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ end
63
+ end
64
+
65
+ # unit tests for search
66
+ # Allows to get merchant information by parameters
67
+ # ###Description This endpoint is used to search merchants by a set of parameters. For each merchant in the result there is information about location, language and tags that describe this merchant's basic characteristics, there is also a set of images selected by the merchant. ####Possible query parameters: * **query**: Filter merchants using text similarity on a number of merchant fields like name, description, categories and tags * **place**: Filter for merchant on a country, city or district whose name matches the parameter. (if the parameter does not match any city or district on the system it is ignored) * **centerPoint**: Filter merchants within the circle defined by center on centerPoint and radius defined by radius parameter (if not informed defaults to 10). Center point has the format LATITUDE,LONGITUDE with both parameters as numbers with . as decimal separator (e.g `centerPoint=52.547928,13.4085728`) * **radius**: The radius of the circle to filter merchants in **kilometers**. Defaults to 10 and is only used if *centerPoint* is also informed * **bookable**: Boolean value, if informed true means that only merchants that are online bookable will be returned and false means that only merchants that are NOT online bookable will be returned * **tags**: Filter out merchants with the selected tags text. Semicolon separated text value. All or nothing field: if a tag is not found, the query will fail. Cannot be used in conjunction with 'tagIds' parameter. * **tagIds**: Filter out merchants with the selected tag ids. Semicolon separated text value. All or nothing field: if a tag is not found, the query will fail. Cannot be used in conjunction with 'tags' parameter. * **reviewScoreMax**: Filter out merchants with review score higher than the one informed. * **onlyWithAttributes**: This field only accepts the value **documents** for now. If informed only merchants with documents will be returned. You need to be **authenticated** to use this filter * **capacity**: Number of people. In order to be effective, \"place\", \"date\" and \"fromTime\" must also be set. * **date**: Date of the desired reservation in merchants' time zone. Format: yyyy-MM-dd. Availability search is only activated if \"place\" is specified. * **fromTime**: Beginning of the desired reservation time frame in merchants' time zone. Format: HH:mm. Consider a 3h buffer for the time (0.5h before the given time and 2.5h after) * **offset**: Number of merchants to skip on the result. Defaults to 0 * **limit**: Maximum number of merchants to return. Defaults to 100 and cannot be more than 100. * **bookable**: This flag indicates whether the merchant is bookable or not. ####Result fields for Merchant object: * **id**: Id of the merchant * **name**: Name of the merchant * **phoneNumber**: The phone number of the merchant * **currency**: Currency of the merchant in the ISO 4217 letter format * **locale**: Locale used to communicate with this merchant * **timezone**: Canonical Timezone name * **location**: Location of the merchant, contains both an geo located point and an address if available * **reviewScore**: Review score of the merchant * **tagGroups**: Tags (grouped) about relevant merchant characteristics * **images**: Group of images selected by the merchant * **documents**: Group of documents released by this merchant (e.g seasonal menus ) * **links**: Links for other pages or api operations for this merchant * **openingTimes**: Group of opening times: restaurant opening times for this merchant. Time range beginning may be greater than the end time of the range, when this range goes beyond the day when it was started, e.g. 19:00:00 - 02:00:00 * **ccvEnabled**: If true, credit card information is required when creating a reservation * **chain**: Merchant chain information, if any ###Authenticated use of the api: * Field `documents` is only accessible for authorized callers and will be empty otherwise. * Queries with parameter `onlyWithAttributes` are only allowed for authorized callers and will return `HTTP 403` for unauthorized requests #####How? In order to make an authenticated call the caller must send a header name `X-Quandoo-AuthToken` with the token obtained from contact with Quandoo. ###Pagination of the result: The result contains the fields `size` with the number of all merchants that matched the informed parameters, `offset` and `limit` defining which merchants from the complete list are on this response, and the caller can use query parameters `offset` and `limit` to get different merchants on the result list ###Examples: Example curl: ``` curl -H 'X-Quandoo-AuthToken: INSERT_KEY_HERE' 'https://{host}/v{X}/merchants?query=Zim&place=Berlin&centerPoint=52.5479288%2C13.4085728&radius=10&bookable=true&reviewScoreMax=200&onlyWithAttributes=documents&offset=0&limit=100' ``` Example response: ``` { \"merchants\": [ { \"id\": 215, \"name\": \"a-merchant-Zim\", \"phoneNumber\": \"+49153153153\", \"currency\": \"EUR\", \"locale\": \"de_DE\", \"timezone\": \"Europe/Berlin\", \"location\": { \"coordinates\": { \"latitude\": 55, \"longitude\": 12 }, \"address\": {} }, \"reviewScore\": \"5.3\", \"tagGroups\": [ { \"type\": \"CUISINE\", \"tags\": [ { \"id\": 63, \"name\": \"Testküche Hauptkategorie\" }, { \"id\": 66, \"name\": \"Test cuisine\" } ] } ], \"images\": [], \"documents\": [ { \"name\": \"Main Menu\", \"url\": \"https://d2s6u6f7snurg9.cloudfront.net/partner/uploads/MD-document-3ec1dc15-1b69-463f-bdd2-c060b9bf844d.pdf\", \"format\": \"pdf\", \"description\": \"Seasonal Main Menu\" } ], \"links\": [ { \"href\": \"https://{host}/{path}?aid=16\", \"method\": \"GET\", \"rel\": \"DETAILS\" }, { \"href\": \"https://{host}/{path}?aid=16&countryId=NLD\", \"method\": \"GET\", \"rel\": \"WIDGET\" }, { \"href\": \"https://{host}/{path}/details?aid=16&countryId=NLD\", \"method\": \"GET\", \"rel\": \"WIDGET_DETAILS\" } ], \"bookable\": true, \"ccvEnabled\": true, \"chain\": { \"id\": 1, \"name\": \"Test chain\" } }, { \"id\": 219, \"name\": \"another merchants Zim\", \"phoneNumber\": \"+49154154154\", \"currency\": \"EUR\", \"locale\": \"de_DE\", \"timezone\": \"Europe/Berlin\", \"location\": { \"coordinates\": { \"latitude\": 52, \"longitude\": 13 }, \"address\": { \"street\": \"Wintersteinstr.\", \"number\": \"15\", \"zipcode\": \"10587\", \"city\": \"Berlin\", \"country\": \"DEU\" } }, \"reviewScore\": \"4.7\", \"tagGroups\": [ { \"type\": \"CUISINE\", \"tags\": [ { \"id\": 79, \"name\": \"Testküche Hauptkategorie\" }, { \"id\": 82, \"name\": \"Test Japanese\" } ] }, { \"type\": \"PRICE\", \"tags\": [ { \"id\": 84, \"name\": \"Test expensive\" } ] } ], \"images\": [ { \"url\": \"https://dci5ez2ey8tr9.cloudfront.net/1482eec7-e585-4821-b096-8a9941e0d2eb/25_sld.jpg\" } ], \"documents\": [], \"links\": [ { \"href\": \"https://{host}/{path}?aid=16\", \"method\": \"GET\", \"rel\": \"DETAILS\" }, { \"href\": \"https://{host}/{path}?aid=16&countryId=NLD\", \"method\": \"GET\", \"rel\": \"WIDGET\" }, { \"href\": \"https://{host}/{path}/details?aid=16&countryId=NLD\", \"method\": \"GET\", \"rel\": \"WIDGET_DETAILS\" } ], \"bookable\": true, \"openingTimes\": { \"standardOpeningTimes\": { \"SATURDAY\": [ { \"start\": \"09:00:00\", \"end\": \"20:00:00\" } ], \"SUNDAY\": [ { \"start\": \"09:00:00\", \"end\": \"18:00:00\" } ] } }, \"ccvEnabled\": true, \"chain\": { \"id\": 1, \"name\": \"Test chain\" } } ], \"size\": 2, \"offset\": 0, \"limit\": 100 } ```
68
+ # @param capacity Number of people. In order to be effective, \"date\" and \"fromTime\" must also be set.
69
+ # @param [Hash] opts the optional parameters
70
+ # @option opts [String] :query Search query for a merchant name
71
+ # @option opts [String] :place Search query for a place (country, city or district) name: the most relevant places, if any, are taken as a filter
72
+ # @option opts [String] :center_point Search with coordinates and radius. \"radius\" argument can be set, otherwise default value of 10 km will be used.<br>Format:<br>53.1222,13.0303<br>where latitude=53.1222, longitude=13.0303
73
+ # @option opts [Integer] :radius Radius for coordinate-based search
74
+ # @option opts [BOOLEAN] :bookable Filter only bookable merchants
75
+ # @option opts [String] :tags Filter by tags found by text. The value can be either in English or in the specific locale. Semicolon separated. All or nothing behaviour: if one single tag is not found, the whole request fails. Cannot be used in combination with 'groupedTagIds' parameter.
76
+ # @option opts [String] :tag_ids Filter by tags found by id. Semicolon separated. All or nothing behaviour: if one single tag id is not found, the whole request fails. Cannot be used in combination with 'tags' parameter.
77
+ # @option opts [Integer] :review_score_max Filter by max review score (100 - 600)
78
+ # @option opts [String] :only_with_attributes Search with attributes specified only. Attribute \"documents\" is currently supported
79
+ # @option opts [Date] :date Date of the desired reservation in merchants' time zone. Format: yyyy-MM-dd. Availability search is only activated if \"place\" is specified.
80
+ # @option opts [String] :from_time Beginning of the desired reservation time frame in merchants' time zone. Format: HH:mm. Consider a 3h buffer for the time (0.5h before the given time and 2.5h after)
81
+ # @option opts [Integer] :offset offset
82
+ # @option opts [Integer] :limit limit
83
+ # @option opts [String] :accept_language language
84
+ # @return [MerchantDetailsDtoList]
85
+ describe 'search test' do
86
+ it 'should work' do
87
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
88
+ end
89
+ end
90
+
91
+ # unit tests for search2
92
+ # Allows to get a merchant by id
93
+ # This endpoint allows to receive detailed information on a particular merchant in the system. This merchant should be specified by their identifier **merchantId**, which is mandatory. The endpoint can take optional request header **Accept-Language**. This header is used to determine correct locale and has an effect on translation of merchant's entity fields, that may be omitted. The expected value of the header **Accept-Language** should contain language and can contain country, e.g. \"de_DE\" or \"de\". Locale by default is \"en_GB\". The endpoint returns status `HTTP 200` if the request is successful. The endpoint will return status `HTTP 404` if the merchant, specified by identifier, was not found or has no products, allowed for a web search. Example curl: ``` curl -H 'X-Quandoo-AuthToken: {INSERT_KEY_HERE}' -H 'Accept-Language: de_DE' 'https://{host}/v{X}/merchants/11' ``` Example response: ``` { \"id\":11, \"name\":\"Test merchant\", \"phoneNumber\":\"+27113901837\", \"currency\":\"ZAR\", \"locale\":\"en_ZA\", \"timezone\":\"Africa/Johannesburg\", \"location\":{ \"coordinates\":{ \"latitude\":33.9, \"longitude\":18.4 }, \"address\":{ \"street\":\"Tamerlan street\", \"number\":\"6A\", \"zipcode\":\"10787\", \"city\":\"Cape Town\", \"country\":\"ZAF\" } }, \"reviewScore\": \"5.3\", \"tagGroups\":[ { \"type\":\"CUISINE\", \"tags\":[ { \"id\":25, \"name\":\"Testküche Hauptkategorie\" }, { \"id\":28, \"name\":\"Test cuisine\" } ] } ], \"images\":[ { \"url\":\"https://dci5ez2ey8tr9.cloudfront.net/8e4d1063-9171-40b1-94b7-5e9337591a90/7_sld.jpg\" } ], \"documents\":[], \"links\":[ { \"href\":\"https://{host}/{path}?aid=16\", \"method\":\"GET\", \"rel\":\"DETAILS\" }, { \"href\":\"https://{host}/{path}?aid=16&countryId=NLD\", \"method\":\"GET\", \"rel\":\"WIDGET\" }, { \"href\":\"https://{host}/{path}/details?aid=16&countryId=NLD\", \"method\":\"GET\", \"rel\":\"WIDGET_DETAILS\" } ], \"bookable\": true, \"openingTimes\": { \"standardOpeningTimes\": { \"SATURDAY\": [ { \"start\": \"09:00:00\", \"end\": \"20:00:00\" } ], \"SUNDAY\": [ { \"start\": \"09:00:00\", \"end\": \"18:00:00\" } ] } }, \"ccvEnabled\": true, \"chain\": { \"id\": 1, \"name\": \"Test chain\" } } ```
94
+ # @param merchant_id merchantId
95
+ # @param [Hash] opts the optional parameters
96
+ # @option opts [String] :accept_language Locale.<br>Format:<br><language code>[_<country code>]
97
+ # @return [MerchantDetailsDto]
98
+ describe 'search2 test' do
99
+ it 'should work' do
100
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
101
+ end
102
+ end
103
+
104
+ # unit tests for search_similar1
105
+ # Allows to get a merchant by id and find similar merchants
106
+ # This endpoint allows to receive detailed information for a particular merchant in the system and for restaurants that are similar to this one. A merchant is similar if all the following conditions are met: 1. Location: the recommended merchants are within 30 km radius from the main merchant 2. The similar merchants are bookable online 3. The similar merchants have the main cuisine in common This merchant should be specified by their identifier **merchantId**, which is mandatory. The endpoint can take optional request header **Accept-Language**. This header is used to determine correct locale and has an effect on translation of merchant's entity fields, that may be omitted. The expected value of the header **Accept-Language** should contain language and can contain country, e.g. \"de_DE\" or \"de\". Locale by default is \"en_GB\". The endpoint returns status `HTTP 200` if the request is successful. In a successful requests the specified merchant was found. If the merchant has no products allowed for a web search, i.e. is not bookable, response data with `HTTP 200` is returned, but the field `merchant` is not set. Instead, the merchant search message is set. The endpoint will return status `HTTP 404` if the merchant, specified by identifier, was not found. Example curl: ``` curl -H 'X-Quandoo-AuthToken: {INSERT_KEY_HERE}' -H 'Accept-Language: de_DE' 'https://{host}/v{X}/merchants/11/similar' ``` Example responses: `merchant bookable` ``` { \"merchant\": { \"id\":11, \"name\":\"Test merchant\", \"phoneNumber\":\"+27113901837\", \"currency\":\"ZAR\", \"locale\":\"en_ZA\", \"timezone\":\"Africa/Johannesburg\", \"location\":{ \"coordinates\":{ \"latitude\":33.9, \"longitude\":18.4 }, \"address\":{ \"street\":\"Tamerlan street\", \"number\":\"6A\", \"zipcode\":\"10787\", \"city\":\"Cape Town\", \"country\":\"ZAF\" } }, \"reviewScore\": \"5.3\", \"tagGroups\":[ { \"type\":\"CUISINE\", \"tags\":[ { \"id\":25, \"name\":\"Testküche Hauptkategorie\" }, { \"id\":28, \"name\":\"Test cuisine\" } ] } ], \"images\":[ { \"url\":\"https://dci5ez2ey8tr9.cloudfront.net/8e4d1063-9171-40b1-94b7-5e9337591a90/7_sld.jpg\" } ], \"documents\":[], \"links\":[ { \"href\":\"https://{host}/{path}?aid=16\", \"method\":\"GET\", \"rel\":\"DETAILS\" }, { \"href\":\"https://{host}/{path}?aid=16&countryId=NLD\", \"method\":\"GET\", \"rel\":\"WIDGET\" }, { \"href\":\"https://{host}/{path}/details?aid=16&countryId=NLD\", \"method\":\"GET\", \"rel\":\"WIDGET_DETAILS\" } ], \"bookable\": true, \"openingTimes\": { \"standardOpeningTimes\": { \"SATURDAY\": [ { \"start\": \"09:00:00\", \"end\": \"20:00:00\" } ], \"SUNDAY\": [ { \"start\": \"09:00:00\", \"end\": \"18:00:00\" } ] } }, \"ccvEnabled\": true, \"chain\": { \"id\": 1, \"name\": \"Test chain\" } }, \"recommendedMerchants\": { \"merchants\": [ { \"id\":12, \"name\":\"similar merchant\", \"phoneNumber\":\"+27113901838\", \"currency\":\"ZAR\", \"locale\":\"en_ZA\", \"timezone\":\"Africa/Johannesburg\", \"location\":{ \"coordinates\":{ \"latitude\":33.8, \"longitude\":18.4 }, \"address\":{ \"street\":\"Tamerlan street\", \"number\":\"5A\", \"zipcode\":\"10787\", \"city\":\"Cape Town\", \"country\":\"ZAF\" } }, \"reviewScore\": \"5.3\", \"tagGroups\":[ { \"type\":\"CUISINE\", \"tags\":[ { \"id\":25, \"name\":\"Testküche Hauptkategorie\" }, { \"id\":28, \"name\":\"Test cuisine\" } ] } ], \"images\":[ { \"url\":\"https://dci5ez2ey8tr9.cloudfront.net/8e4d1063-9171-40b1-94b7-5e9337591a90/7_sld.jpg\" } ], \"documents\":[], \"links\":[ { \"href\":\"https://{host}/{path}?aid=16\", \"method\":\"GET\", \"rel\":\"DETAILS\" }, { \"href\":\"https://{host}/{path}?aid=16&countryId=NLD\", \"method\":\"GET\", \"rel\":\"WIDGET\" }, { \"href\":\"https://{host}/{path}/details?aid=16&countryId=NLD\", \"method\":\"GET\", \"rel\":\"WIDGET_DETAILS\" } ], \"bookable\": true, \"openingTimes\": { \"standardOpeningTimes\": { \"SATURDAY\": [ { \"start\": \"09:00:00\", \"end\": \"20:00:00\" } ], \"SUNDAY\": [ { \"start\": \"09:00:00\", \"end\": \"18:00:00\" } ] } }, \"ccvEnabled\": true, \"chain\": { \"id\": 1, \"name\": \"Test chain\" } } ], \"size\": 1, \"offset\": 0, \"limit\": 10 } } ``` `merchant not bookable` ``` { \"merchantSearchMessage\": \"MERCHANT_NOT_BOOKABLE\", \"recommendedMerchants\": { \"limit\": 10, \"merchants\": [...], \"offset\": 0, \"size\": 0 } } ```
107
+ # @param merchant_id merchantId
108
+ # @param [Hash] opts the optional parameters
109
+ # @option opts [String] :sort Sort order. Default sorting will be by proximity.
110
+ # @option opts [Integer] :limit Max number of merchant recommendations to return.
111
+ # @option opts [String] :accept_language Locale.<br>Format:<br><language code>[_<country code>]
112
+ # @return [MerchantWithRecommendationsDto]
113
+ describe 'search_similar1 test' do
114
+ it 'should work' do
115
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
116
+ end
117
+ end
118
+
119
+ end
@@ -0,0 +1,84 @@
1
+ =begin
2
+ #Quandoo API Documentation
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.5
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for Quandoo::ReservationEnquiriesApi
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'ReservationEnquiriesApi' do
20
+ before do
21
+ # run before each test
22
+ @instance = Quandoo::ReservationEnquiriesApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of ReservationEnquiriesApi' do
30
+ it 'should create an instance of ReservationEnquiriesApi' do
31
+ expect(@instance).to be_instance_of(Quandoo::ReservationEnquiriesApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for create_reservation_enquiry1
36
+ # Create reservation enquiries
37
+ # 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\" } ] } ```
38
+ # @param body Reservation enquiry data
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [CreatedReservationEnquiryData]
41
+ describe 'create_reservation_enquiry1 test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ # unit tests for get_messages_for_reservation_enquiry1
48
+ # Get all messages of a reservation enquiry
49
+ # 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\" } ] } ```
50
+ # @param reservation_enquiry_id Id of the reservation enquiry
51
+ # @param [Hash] opts the optional parameters
52
+ # @return [ReservationEnquiryMessageList]
53
+ describe 'get_messages_for_reservation_enquiry1 test' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ # unit tests for get_reservation_enquiry1
60
+ # Get reservation enquiry by id
61
+ # 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\" } ```
62
+ # @param reservation_enquiry_id Id of the reservation enquiry
63
+ # @param [Hash] opts the optional parameters
64
+ # @return [GetReservationEnquiryData]
65
+ describe 'get_reservation_enquiry1 test' do
66
+ it 'should work' do
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ end
69
+ end
70
+
71
+ # unit tests for update_reservation_enquiry1
72
+ # Update status of reservation enquiry by id
73
+ # 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
74
+ # @param reservation_enquiry_id Id of the reservation enquiry
75
+ # @param body New reservation enquiry status
76
+ # @param [Hash] opts the optional parameters
77
+ # @return [nil]
78
+ describe 'update_reservation_enquiry1 test' do
79
+ it 'should work' do
80
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
81
+ end
82
+ end
83
+
84
+ end
@@ -0,0 +1,47 @@
1
+ =begin
2
+ #Quandoo API Documentation
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.5
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for Quandoo::ReservationSettingsApi
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'ReservationSettingsApi' do
20
+ before do
21
+ # run before each test
22
+ @instance = Quandoo::ReservationSettingsApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of ReservationSettingsApi' do
30
+ it 'should create an instance of ReservationSettingsApi' do
31
+ expect(@instance).to be_instance_of(Quandoo::ReservationSettingsApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for reservation_settings1
36
+ # Get merchant reservation settings
37
+ # 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 } ```
38
+ # @param merchant_id Id of the merchant
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [MerchantReservationSettingsDto]
41
+ describe 'reservation_settings1 test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ end
@@ -0,0 +1,72 @@
1
+ =begin
2
+ #Quandoo API Documentation
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.5
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for Quandoo::ReservationsApi
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'ReservationsApi' do
20
+ before do
21
+ # run before each test
22
+ @instance = Quandoo::ReservationsApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of ReservationsApi' do
30
+ it 'should create an instance of ReservationsApi' do
31
+ expect(@instance).to be_instance_of(Quandoo::ReservationsApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for create_reservation1
36
+ # Create reservations
37
+ # 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\" } ] } ```
38
+ # @param body Reservation data
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [CreatedReservationData]
41
+ describe 'create_reservation1 test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ # unit tests for get_reservation1
48
+ # Get reservation by id
49
+ # 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\" } ```
50
+ # @param reservation_id Id of the reservation
51
+ # @param [Hash] opts the optional parameters
52
+ # @return [ReservationData]
53
+ describe 'get_reservation1 test' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ # unit tests for update_reservation1
60
+ # Update reservation by id
61
+ # 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 ```
62
+ # @param reservation_id Id of the reservation
63
+ # @param body New reservation status
64
+ # @param [Hash] opts the optional parameters
65
+ # @return [nil]
66
+ describe 'update_reservation1 test' do
67
+ it 'should work' do
68
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
69
+ end
70
+ end
71
+
72
+ end
@@ -0,0 +1,86 @@
1
+ =begin
2
+ #Quandoo API Documentation
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.5
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for Quandoo::ReviewsApi
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'ReviewsApi' do
20
+ before do
21
+ # run before each test
22
+ @instance = Quandoo::ReviewsApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of ReviewsApi' do
30
+ it 'should create an instance of ReviewsApi' do
31
+ expect(@instance).to be_instance_of(Quandoo::ReviewsApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for create_review1
36
+ # Create a review for a reservation
37
+ # This resource manages the creation of reviews for a particular agent and a reservation. Reviews must have a description, rating and a reservation public identifier. The agent must be the one that created the reservation, otherwise it is forbidden. ####Request: The request needs to have 3 parameters for review reviewId, description and rating. * **reservationId**: Public ID of the reservation where to add a review. **Required**. * **description**: Text content of the review to be set. Optional. A review requires a minimum of a rating. * **rating**: Integer value from 1 to 6 with the new rating given. **Required**. ####Response: The response is a review object containing information about the review. * **reviewId**: The Id of the created review. * **status**: Status of the created review. Can be 'PENDING', 'PUBLISHED' or 'WITHHELD'. After a successful creation, 'PENDING' is returned. * **links**: A series of links where to get details of the created review; Example curl: ``` curl -H \"Content-Type: application/json\" -X POST -d ' { \"reservationId\": \"07f53b36-3f48-11e5-a151-feff819cdc9f\", \"description\": \"Some description of the review\", \"rating\": 1 } ``` Example response: ``` { \"reviewId\": \"01a53b36-3f48-11e5-a151-feff819cdc9f\", \"status\": \"PENDING\", \"links\": [{ \"href\": \"http://localhost:39250/v1/reviews/01a53b36-3f48-11e5-a151-feff819cdc9f\", \"method\": \"GET\", \"rel\": \"get-review\" }] } ```
38
+ # @param body Review for this reservation
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [ChangedReviewDto]
41
+ describe 'create_review1 test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ # unit tests for get_review1
48
+ # Get details for a specific review
49
+ # This resource return details from reviews upon request. The result obtained depends on whether the agent is the owner of the reservation that owns the review or not. * If the user owns the reservation of the requested review, a detailed review is returned with all the information shown below. * If the user does not own the reservation of the requested review, a simplified review is returned with only the values marked below. * If the user does not own the reservation of the requested review AND the review is in a 'WITHHELD' status, an empty review is returned. ####Request: The request needs 1 path parameter, the review ID to get details from. * **reviewId**: ID of the review to get the details from. **Required**. ####Response: The response is a user review object containing information about the review depending on whether the agent used is the owner of the review or not. The different outcomes are **detailed** if the agent owns the review or **simplified** if not. * **reviewId**: review UUID. Same as the one used in the request. * **rating**: rating associated to this review. * **description**: description of the review. * **status**: current review status. Possible values are 'PENDING', 'WITHHELD', 'PUBLISHED'. * **merchantId**: merchant id associated to this review. **Only in the detailed view**. * **customerId**: customer id associated to this review. **DEPPRECATED, NOT USED**. * **publicCustomerId**: public customer id associated to this review. **Only in the detailed view**. * **customerFirstName**: review associated customer first name. **Only in the detailed view**. * **customerLastName**: first character of the customer last name. **Only in the detailed view**. * **customerProfileImage**: customer profile image URL. **Only in the detailed view**. * **locale**: locale associated to the review. **Only in the detailed view**. Example curl: ``` curl https://{host}/v{X}/reviews/07f53b36-3f48-11e5-a151-feff819cdc9f ``` Example response: ``` { \"reviewId\": \"01a53b36-3f48-11e5-a151-feff819cdc9f\", \"status\": \"PUBLISHED\", \"description\": \"Description of the review\", \"rating\": 3 } ```
50
+ # @param review_id Review reviewId (UUID) to get details from
51
+ # @param [Hash] opts the optional parameters
52
+ # @return [GetReviewDto]
53
+ describe 'get_review1 test' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ # unit tests for get_reviews2
60
+ # Get information from reviews in a list
61
+ # This resource return a list of reviews. The result obtained depends on the different query parameters provided. It is able to return three different results: * **Reviews associated to an agent:** if neither 'merchantId' nor 'reservationId' query parameters are provided, then the available reviews for the current agent are returned. * **Reviews associated to a merchant:** if the parameter 'merchantId' is provided, all the reviews for the given merchant and agent are provided. The agent is the one associated with the reservations. * **Reviews associated to a reservation:** if the parameter 'reservationId' is provided, all the reviews for the given reservation and agent are provided. The agent is the one associated with the reservation. **NOTE:** For the second and third cases, the current agent must be the owner of the reservations used to get the reviews. In the specific case of the search by the merchants, the current agent id is the one realated to the reservations associated to the specified merchant's reviews. ####Request: The request needs 4 optional query parameters. Pagination is controlled by the usage of the 'limit' and 'offset' parameters. * **limit**: maximum number of results to be returned. Value must be between 1 and 10. Defaults to 10 when unset, malformed or outside bounds. Ignored when 'reservationId' is enabled. * **offset**: sets the starting element to be returned. Defaults to 0 when unset or malformed. Ignored when 'reservationId' is enabled. * **reservationId**: Public ID of the reservation from which to get the reviews. Cannot be used in combination with 'merchantId'. Can be null. Does not consider 'limit' and/or 'offset'. * **merchantId**: ID of the merchant from wich to get the reviews. Cannot be used in combination with 'reservationId'. Can be null. ####Response: The response is a user review object containing a list of user reviews. * **size**: the number of reviews retrieved in this request. Can be any positive value between 0 and 10 (the maximum value for limit); * **offset**: echoes the offset value used in the request. Returns 0 in case 'reservationId' is used. * **limit**: echoes the limit value used in the request. Returns 0 in case 'reservationId' is used. * **reviews**: list of reviews retrieved, each review containing the following properties: * **reviewId**: review UUID. Same as the one used in the request. * **rating**: rating associated to this review. * **description**: description of the review. * **status**: current review status. Possible values are 'PENDING', 'WITHHELD', 'PUBLISHED'. * **merchantId**: merchant id associated to this review. **Only in the detailed view**. * **customerId**: customer id associated to this review. **DEPPRECATED, NOT USED**. * **publicCustomerId**: public customer id associated to this review. **Only in the detailed view**. * **customerFirstName**: review associated customer first name. **Only in the detailed view**. * **customerLastName**: first character of the customer last name. **Only in the detailed view**. * **customerProfileImage**: customer profile image URL. **Only in the detailed view**. * **locale**: locale associated to the review. **Only in the detailed view**. Example curl: ``` curl https://{host}/v{X}/reviews?merchantId=5124 ``` Example response: ``` { \"reviews\": [{ \"reviewId\": \"e94c5f9b-e61f-486a-bfa7-48abb1e42f93\", \"merchantId\": 5124, \"publicCustomerId\": \"a10fbb9a-df04-407c-9568-2e79bd620b41\", \"customerFirstName\": \"Perico\", \"customerLastName\": \"d\", \"customerProfileImage\": \"http://test.bla\", \"rating\": 6, \"description\": \"Description 8\", \"status\": \"PUBLISHED\", \"locale\": \"de_DE\" }, { \"reviewId\": \"65472403-7968-4ccf-b389-fe7e6e70ee27\", \"merchantId\": 5124, \"publicCustomerId\": \"a10fbb9a-df04-407c-9568-2e79bd620b41\", \"customerFirstName\": \"Perico\", \"customerLastName\": \"d\", \"customerProfileImage\": \"http://test.bla\", \"rating\": 6, \"description\": \"Description 9\", \"status\": \"PUBLISHED\", \"locale\": \"de_DE\" } ], \"size\": 2, \"offset\": 0, \"limit\": 10 } ```
62
+ # @param [Hash] opts the optional parameters
63
+ # @option opts [Integer] :merchant_id MerchantId to get the reviews from. Cannot be used in combination with 'reservationId'
64
+ # @option opts [String] :reservation_id Public reservation id to get the reviews from. Cannot be used in combination with 'merchantId'. When set, 'offset' and 'limit' are ignored. All reviews for a reservation are returned.
65
+ # @option opts [Integer] :offset Skip first n reviews
66
+ # @option opts [Integer] :limit Max number to retrieve
67
+ # @return [GetReviewsDto]
68
+ describe 'get_reviews2 test' do
69
+ it 'should work' do
70
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
71
+ end
72
+ end
73
+
74
+ # unit tests for update_review1
75
+ # Updated a review
76
+ # This resource manages the update of reviews for a given review ID. Description and rating can be updated on a review. The agent must be the one that owns the reservation associated to the review to modify, otherwise a forbidden response is returned. **NOTE**: Reviews in state 'PUBLISHED' or 'WITHHELD' cannot be updated. Only those in status 'PENDING' are allowed to be updated. ####Request: The request needs to have 3 parameters for reservation reviewId (public reviewId), description and rating. * **reviewId**: Id of the review. **Required**. * **description**: Text content of the review. If not set (null value) it won't be considered for update. * **rating**: Integer value from 1 to 6 with the rating given. If not set (null value) it won't be considered for update. In case both description and rating are set to null, nothing happens to the review: it is not updated and its state remains. ####Response: The response is a review object containing information about the review. * **reviewId**: The Id of the updated review. * **status**: Status of the updated review. Can be 'PENDING', 'PUBLISHED' or 'WITHHELD'. Upon a successful update, the status 'PENDING' is returned. * **links**: A series of links where to get details of the updated review. Example curl: ``` curl -H \"Content-Type: application/json\" -X POST -d ' { \"reviewId\": \"01a53b36-3f48-11e5-a151-feff819cdc9f\", \"description\": \"Some updated description for the review\", \"rating\": 2 } ``` Example response: ``` { \"reviewId\": \"01a53b36-3f48-11e5-a151-feff819cdc9f\", \"status\": \"PENDING\", \"links\": [{ \"href\": \"http://localhost:39250/v1/reviews/01a53b36-3f48-11e5-a151-feff819cdc9f\", \"method\": \"GET\", \"rel\": \"get-review\" }] } ```
77
+ # @param body Review for this reservation
78
+ # @param [Hash] opts the optional parameters
79
+ # @return [ChangedReviewDto]
80
+ describe 'update_review1 test' do
81
+ it 'should work' do
82
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
83
+ end
84
+ end
85
+
86
+ end
@@ -0,0 +1,57 @@
1
+ =begin
2
+ #Quandoo API Documentation
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.5
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for Quandoo::StatusApi
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'StatusApi' do
20
+ before do
21
+ # run before each test
22
+ @instance = Quandoo::StatusApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of StatusApi' do
30
+ it 'should create an instance of StatusApi' do
31
+ expect(@instance).to be_instance_of(Quandoo::StatusApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for get_status_by_get1
36
+ # Provides information on the status of the service
37
+ #
38
+ # @param [Hash] opts the optional parameters
39
+ # @return [nil]
40
+ describe 'get_status_by_get1 test' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ # unit tests for get_status_by_head1
47
+ # Provides information on the status of the service
48
+ #
49
+ # @param [Hash] opts the optional parameters
50
+ # @return [nil]
51
+ describe 'get_status_by_head1 test' do
52
+ it 'should work' do
53
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
54
+ end
55
+ end
56
+
57
+ end