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,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id="GIT_USER_ID"
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id="GIT_REPO_ID"
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note="Minor update"
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+
@@ -0,0 +1,113 @@
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
+ # Common files
14
+ require 'quandoo/api_client'
15
+ require 'quandoo/api_error'
16
+ require 'quandoo/version'
17
+ require 'quandoo/configuration'
18
+
19
+ # Models
20
+ require 'quandoo/models/agent_tracking'
21
+ require 'quandoo/models/area_dto'
22
+ require 'quandoo/models/chain_dto'
23
+ require 'quandoo/models/changed_review_dto'
24
+ require 'quandoo/models/coordinates_dto'
25
+ require 'quandoo/models/create_review_dto'
26
+ require 'quandoo/models/created_master_customer'
27
+ require 'quandoo/models/created_reservation'
28
+ require 'quandoo/models/created_reservation_data'
29
+ require 'quandoo/models/created_reservation_enquiry'
30
+ require 'quandoo/models/created_reservation_enquiry_data'
31
+ require 'quandoo/models/customer_data_list'
32
+ require 'quandoo/models/customer_dto'
33
+ require 'quandoo/models/customer_response'
34
+ require 'quandoo/models/customer_review_data'
35
+ require 'quandoo/models/customer_statistics_data'
36
+ require 'quandoo/models/deal_data'
37
+ require 'quandoo/models/document_dto'
38
+ require 'quandoo/models/error_response'
39
+ require 'quandoo/models/get_reservation_enquiry_data'
40
+ require 'quandoo/models/get_review_dto'
41
+ require 'quandoo/models/get_reviews_dto'
42
+ require 'quandoo/models/image_dto'
43
+ require 'quandoo/models/link_relation_dto'
44
+ require 'quandoo/models/location_dto'
45
+ require 'quandoo/models/marketing_setting_dto'
46
+ require 'quandoo/models/merchant_address_dto'
47
+ require 'quandoo/models/merchant_availability_days_dto'
48
+ require 'quandoo/models/merchant_availability_dto'
49
+ require 'quandoo/models/merchant_availability_dto_list'
50
+ require 'quandoo/models/merchant_customer'
51
+ require 'quandoo/models/merchant_customer_data'
52
+ require 'quandoo/models/merchant_details_dto'
53
+ require 'quandoo/models/merchant_details_dto_list'
54
+ require 'quandoo/models/merchant_menu_category_dto'
55
+ require 'quandoo/models/merchant_menu_dto'
56
+ require 'quandoo/models/merchant_menu_item_dto'
57
+ require 'quandoo/models/merchant_menus_dto'
58
+ require 'quandoo/models/merchant_reservation'
59
+ require 'quandoo/models/merchant_reservation_data'
60
+ require 'quandoo/models/merchant_reservation_enquiry'
61
+ require 'quandoo/models/merchant_reservation_enquiry_data'
62
+ require 'quandoo/models/merchant_reservation_settings_dto'
63
+ require 'quandoo/models/merchant_subscription'
64
+ require 'quandoo/models/merchant_vault_settings_dto'
65
+ require 'quandoo/models/merchant_with_recommendations_dto'
66
+ require 'quandoo/models/opening_times_dto'
67
+ require 'quandoo/models/reservation_data'
68
+ require 'quandoo/models/reservation_data_list'
69
+ require 'quandoo/models/reservation_details'
70
+ require 'quandoo/models/reservation_enquiry_message_data'
71
+ require 'quandoo/models/reservation_enquiry_message_list'
72
+ require 'quandoo/models/reservation_menu_data'
73
+ require 'quandoo/models/reservation_menu_item_data'
74
+ require 'quandoo/models/rest_cookie'
75
+ require 'quandoo/models/review_dto'
76
+ require 'quandoo/models/review_dto_list'
77
+ require 'quandoo/models/standard_opening_times_dto'
78
+ require 'quandoo/models/tag_group_dto'
79
+ require 'quandoo/models/tracking'
80
+ require 'quandoo/models/translated_tag_dto'
81
+ require 'quandoo/models/update_reservation_data'
82
+ require 'quandoo/models/update_reservation_enquiry_data'
83
+ require 'quandoo/models/update_review_dto'
84
+
85
+ # APIs
86
+ require 'quandoo/api/availabilities_api'
87
+ require 'quandoo/api/customers_api'
88
+ require 'quandoo/api/menus_api'
89
+ require 'quandoo/api/merchants_api'
90
+ require 'quandoo/api/reservation_enquiries_api'
91
+ require 'quandoo/api/reservation_settings_api'
92
+ require 'quandoo/api/reservations_api'
93
+ require 'quandoo/api/reviews_api'
94
+ require 'quandoo/api/status_api'
95
+ require 'quandoo/api/validations_api'
96
+
97
+ module Quandoo
98
+ class << self
99
+ # Customize default settings for the SDK using block.
100
+ # Quandoo.configure do |config|
101
+ # config.username = "xxx"
102
+ # config.password = "xxx"
103
+ # end
104
+ # If no block given, return the default Configuration object.
105
+ def configure
106
+ if block_given?
107
+ yield(Configuration.default)
108
+ else
109
+ Configuration.default
110
+ end
111
+ end
112
+ end
113
+ end
@@ -0,0 +1,171 @@
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 'uri'
14
+
15
+ module Quandoo
16
+ class AvailabilitiesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get merchant availability days
23
+ # This endpoint returns days which a customer can select for his reservation. The response is based on when the merchant is known to be open. It is not guaranteed that they have available times for reservation. The days are returned starting from the first available day up to the merchant-defined limit, but never more than 365 days. ####Request parameters: * **merchantId**: Id of the merchant. Path parameter. * **agentId**: Id of the agent making the request * **capacity**: Specifies the number of people in reservation. Availability days will be returned based on this capacity. ####Response: The response returns availability days that could be selected for reservation. * **days**: List of availability days that could be reserved. Format: yyyy-MM-dd * **links**: Related links that can be followed based on this response. ####Example curl: ``` curl https://{host}/v{X}/merchants/15/availabilities?agentId=3&capacity=4 ``` ####Example response: ``` { \"days\": [ \"2017-01-01\", \"2017-01-02\", \"2017-01-03\", ... ], \"links\": [ { \"href\": \"https://{host}/v{X}/merchants/15\", \"method\": \"GET\", \"rel\": \"parent\" }, { \"href\": \"https://{host}/v{X}/merchants/15/reservation-settings\", \"method\": \"GET\", \"rel\": \"settings\" }, { \"href\": \"https://{host}/v{X}/merchants/15/availabilities/2017-01-01/times\", \"method\": \"GET\", \"rel\": \"availabilities\" } ] } ```
24
+ # @param merchant_id Id of the merchant
25
+ # @param agent_id Id of the agent
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [Integer] :capacity Number of people
28
+ # @return [MerchantAvailabilityDaysDto]
29
+ def availability_days1(merchant_id, agent_id, opts = {})
30
+ data, _status_code, _headers = availability_days1_with_http_info(merchant_id, agent_id, opts)
31
+ data
32
+ end
33
+
34
+ # Get merchant availability days
35
+ # This endpoint returns days which a customer can select for his reservation. The response is based on when the merchant is known to be open. It is not guaranteed that they have available times for reservation. The days are returned starting from the first available day up to the merchant-defined limit, but never more than 365 days. ####Request parameters: * **merchantId**: Id of the merchant. Path parameter. * **agentId**: Id of the agent making the request * **capacity**: Specifies the number of people in reservation. Availability days will be returned based on this capacity. ####Response: The response returns availability days that could be selected for reservation. * **days**: List of availability days that could be reserved. Format: yyyy-MM-dd * **links**: Related links that can be followed based on this response. ####Example curl: &#x60;&#x60;&#x60; curl https://{host}/v{X}/merchants/15/availabilities?agentId&#x3D;3&amp;capacity&#x3D;4 &#x60;&#x60;&#x60; ####Example response: &#x60;&#x60;&#x60; { \&quot;days\&quot;: [ \&quot;2017-01-01\&quot;, \&quot;2017-01-02\&quot;, \&quot;2017-01-03\&quot;, ... ], \&quot;links\&quot;: [ { \&quot;href\&quot;: \&quot;https://{host}/v{X}/merchants/15\&quot;, \&quot;method\&quot;: \&quot;GET\&quot;, \&quot;rel\&quot;: \&quot;parent\&quot; }, { \&quot;href\&quot;: \&quot;https://{host}/v{X}/merchants/15/reservation-settings\&quot;, \&quot;method\&quot;: \&quot;GET\&quot;, \&quot;rel\&quot;: \&quot;settings\&quot; }, { \&quot;href\&quot;: \&quot;https://{host}/v{X}/merchants/15/availabilities/2017-01-01/times\&quot;, \&quot;method\&quot;: \&quot;GET\&quot;, \&quot;rel\&quot;: \&quot;availabilities\&quot; } ] } &#x60;&#x60;&#x60;
36
+ # @param merchant_id Id of the merchant
37
+ # @param agent_id Id of the agent
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [Integer] :capacity Number of people
40
+ # @return [Array<(MerchantAvailabilityDaysDto, Fixnum, Hash)>] MerchantAvailabilityDaysDto data, response status code and response headers
41
+ def availability_days1_with_http_info(merchant_id, agent_id, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: AvailabilitiesApi.availability_days1 ...'
44
+ end
45
+ # verify the required parameter 'merchant_id' is set
46
+ if @api_client.config.client_side_validation && merchant_id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling AvailabilitiesApi.availability_days1"
48
+ end
49
+ # verify the required parameter 'agent_id' is set
50
+ if @api_client.config.client_side_validation && agent_id.nil?
51
+ fail ArgumentError, "Missing the required parameter 'agent_id' when calling AvailabilitiesApi.availability_days1"
52
+ end
53
+ # resource path
54
+ local_var_path = '/v1/merchants/{merchantId}/availabilities'.sub('{' + 'merchantId' + '}', merchant_id.to_s)
55
+
56
+ # query parameters
57
+ query_params = {}
58
+ query_params[:'agentId'] = agent_id
59
+ query_params[:'capacity'] = opts[:'capacity'] if !opts[:'capacity'].nil?
60
+
61
+ # header parameters
62
+ header_params = {}
63
+
64
+ # form parameters
65
+ form_params = {}
66
+
67
+ # http body (model)
68
+ post_body = nil
69
+ auth_names = []
70
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => 'MerchantAvailabilityDaysDto')
77
+ if @api_client.config.debugging
78
+ @api_client.config.logger.debug "API called: AvailabilitiesApi#availability_days1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
+ end
80
+ return data, status_code, headers
81
+ end
82
+ # Get merchant availability time slots
83
+ # This endpoint returns availability time slots which can be reserved for a given capacity. ####Request parameters: * **merchantId**: Id of the merchant. Path parameter. * **date**: Specifies date of the desired reservation. Format: `yyyy-MM-dd`. Path parameter. * **fromTime**: Beginning of the desired reservation time frame. Format: `HH:mm`. Optional. * **toTime**: End of the desired reservation time frame. Format: `HH:mm`. Optional. * **agentId**: Id of the agent making the request * **capacity**: Specifies the number of people in reservation. Availabilities will be returned based on this capacity. If not provided, the default value is 2. * **areaId**: Restricts availabilities to a certain area. Optional. * **dealId/dealType**: Filter availabilities for a certain deal. Optional. If used, both must be provided. * **dealType** specifies type of the deal. Can be `OFFER`, `DISCOUNT` or `SPECIAL`. * **dealId** specifies the ID of the deal. ####Response: The response returns availability time slots that could be reserved, along with the areas it is associated with and contains information on how much should be paid if the reservation is cancelled by a client. * **timeSlots**: List of available time slots. * **areaIds**: List of areas for which this time slot can be reserved. * **dateTime**: Date and time of the available slot. Format: `yyyy-MM-dd'T'HH:mm:ssZ` * **occupancy**: Occupancy of the available time slot. This is an integer between `0` and `100`. * **vaultSettingId**: ID of the vault setting, if there is any. See: `vaultSettings` * **vaultSettings**: Credit card vault settings representing the fees to be paid in case of cancellation. * **id**: ID of the setting as shown in `timeSlots`. * **fee**: Fee to be paid in case of cancellation. Currency is defined by merchant. See reservation-settings. * **feeType**: Type of fee to be paid. Can be `PER_PERSON` or `PER_RESERVATION`. * **feePercentageForTime**: Fee percentage depending of the time of cancellation. Format: `\"{hoursStart}-{hoursEnd}\": {percentage}` , where hours are the number of hours before the visit. * **links**: Related links that can be followed based on this response. ####Example curl: ``` curl https://{host}/v{X}/merchants/15/availabilities/2017-11-09/times?capacity=2&areaId=24&agentId=3&dealId=ce0706ff-a95d-4229-a220-d21dcd175342&dealType=OFFER&fromTime=10:45&toTime=12:45 ``` ####Example response: ``` { \"timeSlots\": [ { \"areaIds\": [33532, 33533], \"dateTime\": \"2017-09-27T10:45:00+01:00\", \"occupancy\": 0, \"vaultSettingId\": \"284d701f-f79a-4efa-9859-fd09851dfdce\" }, ... ], \"vaultSettings\": [ { \"id\": \"284d701f-f79a-4efa-9859-fd09851dfdce\", \"fee\": \"10.00\", \"feeType\": \"PER_PERSON\", \"feePercentageForTime\": { \"0-12\":100, \"12-24\":50, \"24-48\":20 } } ], \"links\": [ { \"href\": \"https://{host}/v{X}/merchants/15\", \"method\": \"GET\", \"rel\": \"parent\" }, { \"href\": \"https://{host}/v{X}/merchants/15/reservation-settings\", \"method\": \"GET\", \"rel\": \"reservation-settings\" }, { \"href\": \"https://{host}/v{X}/merchants/reservations\", \"method\": \"PUT\", \"rel\": \"create-reservation\" } ] } ```
84
+ # @param merchant_id Id of the merchant
85
+ # @param agent_id Id of the agent
86
+ # @param capacity Number of people
87
+ # @param date Date of the desired reservation. Format: yyyy-MM-dd
88
+ # @param [Hash] opts the optional parameters
89
+ # @option opts [String] :from_time Beginning of the desired reservation time frame. Format: HH:mm
90
+ # @option opts [String] :to_time End of the desired reservation time frame. Format: HH:mm
91
+ # @option opts [Integer] :area_id Id of the area
92
+ # @option opts [String] :deal_id Id of the deal
93
+ # @option opts [String] :deal_type type of the deal - SPECIAL, DISCOUNT or OFFER
94
+ # @return [MerchantAvailabilityDtoList]
95
+ def availability_options1(merchant_id, agent_id, capacity, date, opts = {})
96
+ data, _status_code, _headers = availability_options1_with_http_info(merchant_id, agent_id, capacity, date, opts)
97
+ data
98
+ end
99
+
100
+ # Get merchant availability time slots
101
+ # This endpoint returns availability time slots which can be reserved for a given capacity. ####Request parameters: * **merchantId**: Id of the merchant. Path parameter. * **date**: Specifies date of the desired reservation. Format: &#x60;yyyy-MM-dd&#x60;. Path parameter. * **fromTime**: Beginning of the desired reservation time frame. Format: &#x60;HH:mm&#x60;. Optional. * **toTime**: End of the desired reservation time frame. Format: &#x60;HH:mm&#x60;. Optional. * **agentId**: Id of the agent making the request * **capacity**: Specifies the number of people in reservation. Availabilities will be returned based on this capacity. If not provided, the default value is 2. * **areaId**: Restricts availabilities to a certain area. Optional. * **dealId/dealType**: Filter availabilities for a certain deal. Optional. If used, both must be provided. * **dealType** specifies type of the deal. Can be &#x60;OFFER&#x60;, &#x60;DISCOUNT&#x60; or &#x60;SPECIAL&#x60;. * **dealId** specifies the ID of the deal. ####Response: The response returns availability time slots that could be reserved, along with the areas it is associated with and contains information on how much should be paid if the reservation is cancelled by a client. * **timeSlots**: List of available time slots. * **areaIds**: List of areas for which this time slot can be reserved. * **dateTime**: Date and time of the available slot. Format: &#x60;yyyy-MM-dd&#39;T&#39;HH:mm:ssZ&#x60; * **occupancy**: Occupancy of the available time slot. This is an integer between &#x60;0&#x60; and &#x60;100&#x60;. * **vaultSettingId**: ID of the vault setting, if there is any. See: &#x60;vaultSettings&#x60; * **vaultSettings**: Credit card vault settings representing the fees to be paid in case of cancellation. * **id**: ID of the setting as shown in &#x60;timeSlots&#x60;. * **fee**: Fee to be paid in case of cancellation. Currency is defined by merchant. See reservation-settings. * **feeType**: Type of fee to be paid. Can be &#x60;PER_PERSON&#x60; or &#x60;PER_RESERVATION&#x60;. * **feePercentageForTime**: Fee percentage depending of the time of cancellation. Format: &#x60;\&quot;{hoursStart}-{hoursEnd}\&quot;: {percentage}&#x60; , where hours are the number of hours before the visit. * **links**: Related links that can be followed based on this response. ####Example curl: &#x60;&#x60;&#x60; curl https://{host}/v{X}/merchants/15/availabilities/2017-11-09/times?capacity&#x3D;2&amp;areaId&#x3D;24&amp;agentId&#x3D;3&amp;dealId&#x3D;ce0706ff-a95d-4229-a220-d21dcd175342&amp;dealType&#x3D;OFFER&amp;fromTime&#x3D;10:45&amp;toTime&#x3D;12:45 &#x60;&#x60;&#x60; ####Example response: &#x60;&#x60;&#x60; { \&quot;timeSlots\&quot;: [ { \&quot;areaIds\&quot;: [33532, 33533], \&quot;dateTime\&quot;: \&quot;2017-09-27T10:45:00+01:00\&quot;, \&quot;occupancy\&quot;: 0, \&quot;vaultSettingId\&quot;: \&quot;284d701f-f79a-4efa-9859-fd09851dfdce\&quot; }, ... ], \&quot;vaultSettings\&quot;: [ { \&quot;id\&quot;: \&quot;284d701f-f79a-4efa-9859-fd09851dfdce\&quot;, \&quot;fee\&quot;: \&quot;10.00\&quot;, \&quot;feeType\&quot;: \&quot;PER_PERSON\&quot;, \&quot;feePercentageForTime\&quot;: { \&quot;0-12\&quot;:100, \&quot;12-24\&quot;:50, \&quot;24-48\&quot;:20 } } ], \&quot;links\&quot;: [ { \&quot;href\&quot;: \&quot;https://{host}/v{X}/merchants/15\&quot;, \&quot;method\&quot;: \&quot;GET\&quot;, \&quot;rel\&quot;: \&quot;parent\&quot; }, { \&quot;href\&quot;: \&quot;https://{host}/v{X}/merchants/15/reservation-settings\&quot;, \&quot;method\&quot;: \&quot;GET\&quot;, \&quot;rel\&quot;: \&quot;reservation-settings\&quot; }, { \&quot;href\&quot;: \&quot;https://{host}/v{X}/merchants/reservations\&quot;, \&quot;method\&quot;: \&quot;PUT\&quot;, \&quot;rel\&quot;: \&quot;create-reservation\&quot; } ] } &#x60;&#x60;&#x60;
102
+ # @param merchant_id Id of the merchant
103
+ # @param agent_id Id of the agent
104
+ # @param capacity Number of people
105
+ # @param date Date of the desired reservation. Format: yyyy-MM-dd
106
+ # @param [Hash] opts the optional parameters
107
+ # @option opts [String] :from_time Beginning of the desired reservation time frame. Format: HH:mm
108
+ # @option opts [String] :to_time End of the desired reservation time frame. Format: HH:mm
109
+ # @option opts [Integer] :area_id Id of the area
110
+ # @option opts [String] :deal_id Id of the deal
111
+ # @option opts [String] :deal_type type of the deal - SPECIAL, DISCOUNT or OFFER
112
+ # @return [Array<(MerchantAvailabilityDtoList, Fixnum, Hash)>] MerchantAvailabilityDtoList data, response status code and response headers
113
+ def availability_options1_with_http_info(merchant_id, agent_id, capacity, date, opts = {})
114
+ if @api_client.config.debugging
115
+ @api_client.config.logger.debug 'Calling API: AvailabilitiesApi.availability_options1 ...'
116
+ end
117
+ # verify the required parameter 'merchant_id' is set
118
+ if @api_client.config.client_side_validation && merchant_id.nil?
119
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling AvailabilitiesApi.availability_options1"
120
+ end
121
+ # verify the required parameter 'agent_id' is set
122
+ if @api_client.config.client_side_validation && agent_id.nil?
123
+ fail ArgumentError, "Missing the required parameter 'agent_id' when calling AvailabilitiesApi.availability_options1"
124
+ end
125
+ # verify the required parameter 'capacity' is set
126
+ if @api_client.config.client_side_validation && capacity.nil?
127
+ fail ArgumentError, "Missing the required parameter 'capacity' when calling AvailabilitiesApi.availability_options1"
128
+ end
129
+ # verify the required parameter 'date' is set
130
+ if @api_client.config.client_side_validation && date.nil?
131
+ fail ArgumentError, "Missing the required parameter 'date' when calling AvailabilitiesApi.availability_options1"
132
+ end
133
+ if @api_client.config.client_side_validation && opts[:'deal_type'] && !['SPECIAL', 'DISCOUNT', 'OFFER'].include?(opts[:'deal_type'])
134
+ fail ArgumentError, 'invalid value for "deal_type", must be one of SPECIAL, DISCOUNT, OFFER'
135
+ end
136
+ # resource path
137
+ local_var_path = '/v1/merchants/{merchantId}/availabilities/{date}/times'.sub('{' + 'merchantId' + '}', merchant_id.to_s).sub('{' + 'date' + '}', date.to_s)
138
+
139
+ # query parameters
140
+ query_params = {}
141
+ query_params[:'agentId'] = agent_id
142
+ query_params[:'capacity'] = capacity
143
+ query_params[:'fromTime'] = opts[:'from_time'] if !opts[:'from_time'].nil?
144
+ query_params[:'toTime'] = opts[:'to_time'] if !opts[:'to_time'].nil?
145
+ query_params[:'areaId'] = opts[:'area_id'] if !opts[:'area_id'].nil?
146
+ query_params[:'dealId'] = opts[:'deal_id'] if !opts[:'deal_id'].nil?
147
+ query_params[:'dealType'] = opts[:'deal_type'] if !opts[:'deal_type'].nil?
148
+
149
+ # header parameters
150
+ header_params = {}
151
+
152
+ # form parameters
153
+ form_params = {}
154
+
155
+ # http body (model)
156
+ post_body = nil
157
+ auth_names = []
158
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
159
+ :header_params => header_params,
160
+ :query_params => query_params,
161
+ :form_params => form_params,
162
+ :body => post_body,
163
+ :auth_names => auth_names,
164
+ :return_type => 'MerchantAvailabilityDtoList')
165
+ if @api_client.config.debugging
166
+ @api_client.config.logger.debug "API called: AvailabilitiesApi#availability_options1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
167
+ end
168
+ return data, status_code, headers
169
+ end
170
+ end
171
+ end
@@ -0,0 +1,185 @@
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 'uri'
14
+
15
+ module Quandoo
16
+ class CustomersApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get customer Data
23
+ # This endpoint allows an agent to get customer information by id. Customer id both in the request and response are agent-specific. The agent needs to be authenticated. The endpoint will return `HTTP 404 - Not Found` if the customer 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: * **customerId**: Agent-specific ID of the customer ####Response: The response contains the following data of the customer as explained below: * **id**: The agent-dependent identifier of the customer * **email**: The given email of this customer. _Optional_ * **firstName**: First name of the customer. _Optional_ * **lastName**: Last name of the customer. _Optional_ * **gender**: The given gender of the customer (one of MALE, FEMALE, OTHER or UNDEFINED). _Optional_ * **phoneNumber**: The ID of the merchant at which this reservation was made * **mobileNumber**: The ID of the customer to which this reservation belongs * **country**: 2-letter ISO country code of the customer, e.g. DE * **links**: Related links that can be followed based on this response * **subscriptions**: The newsletter subscriptions, e.g. QUANDOO, MERCHANT Example curl: ``` curl https://{host}/v{X}/customers/9ffb3466-3562-42cc-add1-92a46a2f0902 ``` Example response: ``` { \"id\": \"9ffb3466-3562-42cc-add1-92a46a2f0902\", \"firstName\": \"Gaius\", \"lastName\": \"Octavius\", \"gender\": \"male\", \"email\": \"c2f22117-6148-45b8-ae79-41eda25eae67augustus@spqr.com\", \"phoneNumber\": \"+4917312345678\", \"country\": \"DE\", \"links\": [ { \"href\": \"http://localhost:39250/v1/customers/9ffb3466-3562-42cc-add1-92a46a2f0902/reservations\", \"method\": \"GET\", \"rel\": \"get-customer-reservations\" } ], \"subscriptions\": [ { \"id\": \"QUANDOO\" } ] } ```
24
+ # @param customer_id Id of the customer
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [CustomerResponse]
27
+ def get_customer1(customer_id, opts = {})
28
+ data, _status_code, _headers = get_customer1_with_http_info(customer_id, opts)
29
+ data
30
+ end
31
+
32
+ # Get customer Data
33
+ # This endpoint allows an agent to get customer information by id. Customer id both in the request and response are agent-specific. The agent needs to be authenticated. The endpoint will return &#x60;HTTP 404 - Not Found&#x60; if the customer with the specified id could not be found. It will return &#x60;HTTP 403 - Forbidden&#x60; if the agent is not authenticated or the agent doesn&#39;t have permissions. ####Request: * **customerId**: Agent-specific ID of the customer ####Response: The response contains the following data of the customer as explained below: * **id**: The agent-dependent identifier of the customer * **email**: The given email of this customer. _Optional_ * **firstName**: First name of the customer. _Optional_ * **lastName**: Last name of the customer. _Optional_ * **gender**: The given gender of the customer (one of MALE, FEMALE, OTHER or UNDEFINED). _Optional_ * **phoneNumber**: The ID of the merchant at which this reservation was made * **mobileNumber**: The ID of the customer to which this reservation belongs * **country**: 2-letter ISO country code of the customer, e.g. DE * **links**: Related links that can be followed based on this response * **subscriptions**: The newsletter subscriptions, e.g. QUANDOO, MERCHANT Example curl: &#x60;&#x60;&#x60; curl https://{host}/v{X}/customers/9ffb3466-3562-42cc-add1-92a46a2f0902 &#x60;&#x60;&#x60; Example response: &#x60;&#x60;&#x60; { \&quot;id\&quot;: \&quot;9ffb3466-3562-42cc-add1-92a46a2f0902\&quot;, \&quot;firstName\&quot;: \&quot;Gaius\&quot;, \&quot;lastName\&quot;: \&quot;Octavius\&quot;, \&quot;gender\&quot;: \&quot;male\&quot;, \&quot;email\&quot;: \&quot;c2f22117-6148-45b8-ae79-41eda25eae67augustus@spqr.com\&quot;, \&quot;phoneNumber\&quot;: \&quot;+4917312345678\&quot;, \&quot;country\&quot;: \&quot;DE\&quot;, \&quot;links\&quot;: [ { \&quot;href\&quot;: \&quot;http://localhost:39250/v1/customers/9ffb3466-3562-42cc-add1-92a46a2f0902/reservations\&quot;, \&quot;method\&quot;: \&quot;GET\&quot;, \&quot;rel\&quot;: \&quot;get-customer-reservations\&quot; } ], \&quot;subscriptions\&quot;: [ { \&quot;id\&quot;: \&quot;QUANDOO\&quot; } ] } &#x60;&#x60;&#x60;
34
+ # @param customer_id Id of the customer
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(CustomerResponse, Fixnum, Hash)>] CustomerResponse data, response status code and response headers
37
+ def get_customer1_with_http_info(customer_id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: CustomersApi.get_customer1 ...'
40
+ end
41
+ # verify the required parameter 'customer_id' is set
42
+ if @api_client.config.client_side_validation && customer_id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.get_customer1"
44
+ end
45
+ # resource path
46
+ local_var_path = '/v1/customers/{customerId}'.sub('{' + 'customerId' + '}', customer_id.to_s)
47
+
48
+ # query parameters
49
+ query_params = {}
50
+
51
+ # header parameters
52
+ header_params = {}
53
+
54
+ # form parameters
55
+ form_params = {}
56
+
57
+ # http body (model)
58
+ post_body = nil
59
+ auth_names = ['API_TOKEN']
60
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
61
+ :header_params => header_params,
62
+ :query_params => query_params,
63
+ :form_params => form_params,
64
+ :body => post_body,
65
+ :auth_names => auth_names,
66
+ :return_type => 'CustomerResponse')
67
+ if @api_client.config.debugging
68
+ @api_client.config.logger.debug "API called: CustomersApi#get_customer1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
69
+ end
70
+ return data, status_code, headers
71
+ end
72
+ # Get a list of Customers of a merchant
73
+ # This endpoint allows a third party to get a list of customers of a merchant. The list is filtered, showing only the customers that the third party system has access. Customer id is agent-specific if the customer was created by the agent. 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**: Identifier 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. * **modifiedSince**: earliest date time of time window in UTC. Format: yyyy-MM-dd HH:mm:ss * **modifiedUntil**: latest date time of time window in UTC. Format: yyyy-MM-dd HH:mm:ss ####Response: The response contains the following data of the customer as explained below: * **id**: The agent-dependent identifier of the customer * **title**: The title of the customer. _Optional_ * **firstName**: First name of the customer. _Optional_ * **lastName**: Last name of the customer. _Optional_ * **email**: The given email of this customer. _Optional_ * **gender**: The given gender of the customer (one of MALE, FEMALE, OTHER or UNDEFINED). _Optional_ * **phoneNumber**: The phone number of the customer. _Optional_ * **mobileNumber**: The mobile phone number of the customer. _Optional_ * **locale**: The locale of the customer. * **links**: Related links that can be followed based on this response * **subscriptions**: The newsletter subscriptions, e.g. QUANDOO, MERCHANT * **statistics**: The customer statistics: number of successful, cancelled and no-show reservations * **createdAt**: The date the customer was created. Format: yyyy-MM-ddTHH:mm:ssZ * **updatedAt**: The date the customer was last updated. Format: yyyy-MM-ddTHH:mm:ssZ Example curl: ``` curl https://{host}/v{X}/merchants/1234/customers ``` Example response: ``` { \"result\": [ { \"id\": \"9ffb3466-3562-42cc-add1-92a46a2f0902\", \"customerRef\": \"9ffb3466-3562-42cc-add1-92a46a2f0902\", \"marketingFlags\": [ { \"marketingSettingType\": \"NEWSLETTERS\", \"marketingSettingStatus\": \"INACTIVE\" }, { \"marketingSettingType\": \"PROMO_CODES\", \"marketingSettingStatus\": \"ACTIVE\" } ], \"title\": \"Mr.\", \"firstName\": \"John\", \"lastName\": \"Doe\", \"email\": \"test@quandoo.de\", \"phoneNumber\": \"+493012345678\", \"mobileNumber\": \"+17712345678\", \"locale\": \"de_DE\", \"links\": [ { \"href\": \"http://localhost:39250/v1/customers/9ffb3466-3562-42cc-add1-92a46a2f0902/reservations\", \"method\": \"GET\", \"rel\": \"get-customer-reservations\" } ], \"subscriptions\": [ { \"id\": \"QUANDOO\" } ], \"statistics\": { \"reservationSuccessfulCount\": 8, \"reservationCancelledCount\": 5, \"reservationNoShowCount\": 2 }, \"createdAt\": \"2018-11-22T18:42:16Z\", \"updatedAt\": \"2018-11-30T18:16:02Z\" } ], \"offset\": 0, \"limit\": 100 } ```
74
+ # @param merchant_id Id of the merchant
75
+ # @param [Hash] opts the optional parameters
76
+ # @option opts [Integer] :offset offset (default to 0)
77
+ # @option opts [Integer] :limit limit (default to 100)
78
+ # @option opts [DateTime] :modified_since modifiedSince. Format: yyyy-MM-dd HH:mm:ss
79
+ # @option opts [DateTime] :modified_until modifiedUntil. Format: yyyy-MM-dd HH:mm:ss
80
+ # @return [CustomerDataList]
81
+ def get_customers_of_merchant1(merchant_id, opts = {})
82
+ data, _status_code, _headers = get_customers_of_merchant1_with_http_info(merchant_id, opts)
83
+ data
84
+ end
85
+
86
+ # Get a list of Customers of a merchant
87
+ # This endpoint allows a third party to get a list of customers of a merchant. The list is filtered, showing only the customers that the third party system has access. Customer id is agent-specific if the customer was created by the agent. The agent needs to be authenticated. The endpoint will return &#x60;HTTP 404 - Not Found&#x60; if the merchant with the specified id could not be found. It will return &#x60;HTTP 403 - Forbidden&#x60; if the agent is not authenticated or the agent doesn&#39;t have permissions. ####Request: * **merchantId**: Identifier 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. * **modifiedSince**: earliest date time of time window in UTC. Format: yyyy-MM-dd HH:mm:ss * **modifiedUntil**: latest date time of time window in UTC. Format: yyyy-MM-dd HH:mm:ss ####Response: The response contains the following data of the customer as explained below: * **id**: The agent-dependent identifier of the customer * **title**: The title of the customer. _Optional_ * **firstName**: First name of the customer. _Optional_ * **lastName**: Last name of the customer. _Optional_ * **email**: The given email of this customer. _Optional_ * **gender**: The given gender of the customer (one of MALE, FEMALE, OTHER or UNDEFINED). _Optional_ * **phoneNumber**: The phone number of the customer. _Optional_ * **mobileNumber**: The mobile phone number of the customer. _Optional_ * **locale**: The locale of the customer. * **links**: Related links that can be followed based on this response * **subscriptions**: The newsletter subscriptions, e.g. QUANDOO, MERCHANT * **statistics**: The customer statistics: number of successful, cancelled and no-show reservations * **createdAt**: The date the customer was created. Format: yyyy-MM-ddTHH:mm:ssZ * **updatedAt**: The date the customer was last updated. Format: yyyy-MM-ddTHH:mm:ssZ Example curl: &#x60;&#x60;&#x60; curl https://{host}/v{X}/merchants/1234/customers &#x60;&#x60;&#x60; Example response: &#x60;&#x60;&#x60; { \&quot;result\&quot;: [ { \&quot;id\&quot;: \&quot;9ffb3466-3562-42cc-add1-92a46a2f0902\&quot;, \&quot;customerRef\&quot;: \&quot;9ffb3466-3562-42cc-add1-92a46a2f0902\&quot;, \&quot;marketingFlags\&quot;: [ { \&quot;marketingSettingType\&quot;: \&quot;NEWSLETTERS\&quot;, \&quot;marketingSettingStatus\&quot;: \&quot;INACTIVE\&quot; }, { \&quot;marketingSettingType\&quot;: \&quot;PROMO_CODES\&quot;, \&quot;marketingSettingStatus\&quot;: \&quot;ACTIVE\&quot; } ], \&quot;title\&quot;: \&quot;Mr.\&quot;, \&quot;firstName\&quot;: \&quot;John\&quot;, \&quot;lastName\&quot;: \&quot;Doe\&quot;, \&quot;email\&quot;: \&quot;test@quandoo.de\&quot;, \&quot;phoneNumber\&quot;: \&quot;+493012345678\&quot;, \&quot;mobileNumber\&quot;: \&quot;+17712345678\&quot;, \&quot;locale\&quot;: \&quot;de_DE\&quot;, \&quot;links\&quot;: [ { \&quot;href\&quot;: \&quot;http://localhost:39250/v1/customers/9ffb3466-3562-42cc-add1-92a46a2f0902/reservations\&quot;, \&quot;method\&quot;: \&quot;GET\&quot;, \&quot;rel\&quot;: \&quot;get-customer-reservations\&quot; } ], \&quot;subscriptions\&quot;: [ { \&quot;id\&quot;: \&quot;QUANDOO\&quot; } ], \&quot;statistics\&quot;: { \&quot;reservationSuccessfulCount\&quot;: 8, \&quot;reservationCancelledCount\&quot;: 5, \&quot;reservationNoShowCount\&quot;: 2 }, \&quot;createdAt\&quot;: \&quot;2018-11-22T18:42:16Z\&quot;, \&quot;updatedAt\&quot;: \&quot;2018-11-30T18:16:02Z\&quot; } ], \&quot;offset\&quot;: 0, \&quot;limit\&quot;: 100 } &#x60;&#x60;&#x60;
88
+ # @param merchant_id Id of the merchant
89
+ # @param [Hash] opts the optional parameters
90
+ # @option opts [Integer] :offset offset
91
+ # @option opts [Integer] :limit limit
92
+ # @option opts [DateTime] :modified_since modifiedSince. Format: yyyy-MM-dd HH:mm:ss
93
+ # @option opts [DateTime] :modified_until modifiedUntil. Format: yyyy-MM-dd HH:mm:ss
94
+ # @return [Array<(CustomerDataList, Fixnum, Hash)>] CustomerDataList data, response status code and response headers
95
+ def get_customers_of_merchant1_with_http_info(merchant_id, opts = {})
96
+ if @api_client.config.debugging
97
+ @api_client.config.logger.debug 'Calling API: CustomersApi.get_customers_of_merchant1 ...'
98
+ end
99
+ # verify the required parameter 'merchant_id' is set
100
+ if @api_client.config.client_side_validation && merchant_id.nil?
101
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling CustomersApi.get_customers_of_merchant1"
102
+ end
103
+ # resource path
104
+ local_var_path = '/v1/merchants/{merchantId}/customers'.sub('{' + 'merchantId' + '}', merchant_id.to_s)
105
+
106
+ # query parameters
107
+ query_params = {}
108
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
109
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
110
+ query_params[:'modifiedSince'] = opts[:'modified_since'] if !opts[:'modified_since'].nil?
111
+ query_params[:'modifiedUntil'] = opts[:'modified_until'] if !opts[:'modified_until'].nil?
112
+
113
+ # header parameters
114
+ header_params = {}
115
+
116
+ # form parameters
117
+ form_params = {}
118
+
119
+ # http body (model)
120
+ post_body = nil
121
+ auth_names = ['API_TOKEN']
122
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
123
+ :header_params => header_params,
124
+ :query_params => query_params,
125
+ :form_params => form_params,
126
+ :body => post_body,
127
+ :auth_names => auth_names,
128
+ :return_type => 'CustomerDataList')
129
+ if @api_client.config.debugging
130
+ @api_client.config.logger.debug "API called: CustomersApi#get_customers_of_merchant1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
131
+ end
132
+ return data, status_code, headers
133
+ end
134
+ # Get customer reservations
135
+ # This endpoint allows an agent to get reservations of a customer. The results will be filtered by agent id. Customer id in the request and reservation IDs in response are agent-specific. The agent needs to be authenticated. The endpoint will return `HTTP 404 - Not Found` if the customer 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: * **customerId**: Agent-specific ID of the customer ####Response: The response will be a _list_ of reservations. Each reservation has the fields explained below: * **id**: The agent-dependent unique 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}/customers/ce0706ff-a95d-4229-a220-d21dcd175342/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\" } ] } ```
136
+ # @param customer_id Id of the customer
137
+ # @param [Hash] opts the optional parameters
138
+ # @return [ReservationDataList]
139
+ def get_reservations1(customer_id, opts = {})
140
+ data, _status_code, _headers = get_reservations1_with_http_info(customer_id, opts)
141
+ data
142
+ end
143
+
144
+ # Get customer reservations
145
+ # This endpoint allows an agent to get reservations of a customer. The results will be filtered by agent id. Customer id in the request and reservation IDs in response are agent-specific. The agent needs to be authenticated. The endpoint will return &#x60;HTTP 404 - Not Found&#x60; if the customer with the specified id could not be found. It will return &#x60;HTTP 403 - Forbidden&#x60; if the agent is not authenticated or the agent doesn&#39;t have permissions. ####Request: * **customerId**: Agent-specific ID of the customer ####Response: The response will be a _list_ of reservations. Each reservation has the fields explained below: * **id**: The agent-dependent unique 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: &#x60;yyyy-MM-ddTHH:mm:ssZ&#x60; * **endTime**: The end time of the reservation. Format: &#x60;yyyy-MM-ddTHH:mm:ssZ&#x60; * **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: &#x60;yyyy-MM-ddTHH:mm:ssZ&#x60; * **updatedAt**: The date the reservation was last updated. Format: &#x60;yyyy-MM-ddTHH:mm:ssZ&#x60; Example curl: &#x60;&#x60;&#x60; curl https://{host}/v{X}/customers/ce0706ff-a95d-4229-a220-d21dcd175342/reservations &#x60;&#x60;&#x60; Example response: &#x60;&#x60;&#x60; { \&quot;reservations\&quot;: [ { \&quot;id\&quot;: \&quot;07f53b36-3f48-11e5-a151-feff819cdc9f\&quot;, \&quot;number\&quot;: 8734957, \&quot;quandooId\&quot;: \&quot;07f53b36-3f48-11e5-a151-feff819cdc9f\&quot;, \&quot;status\&quot;: \&quot;CREATED\&quot;, \&quot;startTime\&quot;: \&quot;2015-06-22T12:00:00+00:00\&quot;, \&quot;endTime\&quot;: \&quot;2015-06-22T13:00:00+00:00\&quot;, \&quot;capacity\&quot;: 4, \&quot;merchantId\&quot;: 1384, \&quot;customerId\&quot;: \&quot;ce0706ff-a95d-4229-a220-d21dcd175342\&quot;, \&quot;promocode\&quot;: \&quot;SOME_CAMPAIGN_CODE\&quot;, \&quot;extraInfo\&quot;: \&quot;request for baby chair\&quot;, \&quot;links\&quot;: [ { \&quot;href\&quot;: \&quot;https://{host}/v{X}/reservations/07f53b36-3f48-11e5-a151-feff819cdc9f\&quot;, \&quot;method\&quot;: \&quot;GET\&quot;, \&quot;rel\&quot;: \&quot;self\&quot; }, { \&quot;href\&quot;: \&quot;https://{host}/v{X}/reservations/07f53b36-3f48-11e5-a151-feff819cdc9f\&quot;, \&quot;method\&quot;: \&quot;PATCH\&quot;, \&quot;rel\&quot;: \&quot;update\&quot; } ], \&quot;createdAt\&quot;: \&quot;2015-06-01T15:21:54Z\&quot;, \&quot;updatedAt\&quot;: \&quot;2015-06-01T18:45:30Z\&quot; }, { \&quot;id\&quot;: \&quot;d8f53b36-3f48-11e5-a151-feff819cdc7a\&quot;, \&quot;number\&quot;: 8734958, \&quot;quandooId\&quot;: \&quot;d8f53b36-3f48-11e5-a151-feff819cdc7a\&quot;, \&quot;status\&quot;: \&quot;CONFIRMED\&quot;, \&quot;startTime\&quot;: \&quot;2015-06-22T12:00:00+00:00\&quot;, \&quot;endTime\&quot;: \&quot;2015-06-22T13:00:00+00:00\&quot;, \&quot;capacity\&quot;: 3, \&quot;merchantId\&quot;: 1384, \&quot;customerId\&quot;: \&quot;ce0706ff-a95d-4229-a220-d21dcd175342\&quot;, \&quot;promocode\&quot;: \&quot;SOME_CAMPAIGN_CODE\&quot;, \&quot;links\&quot;: [ { \&quot;href\&quot;: \&quot;https://{host}/v{X}/reservations/d8f53b36-3f48-11e5-a151-feff819cdc7a\&quot;, \&quot;method\&quot;: \&quot;GET\&quot;, \&quot;rel\&quot;: \&quot;self\&quot; }, { \&quot;href\&quot;: \&quot;https://{host}/v{X}/reservations/d8f53b36-3f48-11e5-a151-feff819cdc7a\&quot;, \&quot;method\&quot;: \&quot;PATCH\&quot;, \&quot;rel\&quot;: \&quot;update\&quot; } ], \&quot;createdAt\&quot;: \&quot;2015-06-01T15:21:54Z\&quot;, \&quot;updatedAt\&quot;: \&quot;2015-06-01T18:45:30Z\&quot; } ] } &#x60;&#x60;&#x60;
146
+ # @param customer_id Id of the customer
147
+ # @param [Hash] opts the optional parameters
148
+ # @return [Array<(ReservationDataList, Fixnum, Hash)>] ReservationDataList data, response status code and response headers
149
+ def get_reservations1_with_http_info(customer_id, opts = {})
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug 'Calling API: CustomersApi.get_reservations1 ...'
152
+ end
153
+ # verify the required parameter 'customer_id' is set
154
+ if @api_client.config.client_side_validation && customer_id.nil?
155
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.get_reservations1"
156
+ end
157
+ # resource path
158
+ local_var_path = '/v1/customers/{customerId}/reservations'.sub('{' + 'customerId' + '}', customer_id.to_s)
159
+
160
+ # query parameters
161
+ query_params = {}
162
+
163
+ # header parameters
164
+ header_params = {}
165
+
166
+ # form parameters
167
+ form_params = {}
168
+
169
+ # http body (model)
170
+ post_body = nil
171
+ auth_names = ['API_TOKEN']
172
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
173
+ :header_params => header_params,
174
+ :query_params => query_params,
175
+ :form_params => form_params,
176
+ :body => post_body,
177
+ :auth_names => auth_names,
178
+ :return_type => 'ReservationDataList')
179
+ if @api_client.config.debugging
180
+ @api_client.config.logger.debug "API called: CustomersApi#get_reservations1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
181
+ end
182
+ return data, status_code, headers
183
+ end
184
+ end
185
+ end