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,209 @@
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 'date'
14
+
15
+ module Quandoo
16
+ class UpdateReviewDto
17
+ # UUID identifying the review.
18
+ attr_accessor :review_id
19
+
20
+ # Rating associated to this review. Possible values: 1 to 6.
21
+ attr_accessor :rating
22
+
23
+ # Description associated to this review.
24
+ attr_accessor :description
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'review_id' => :'reviewId',
30
+ :'rating' => :'rating',
31
+ :'description' => :'description'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.swagger_types
37
+ {
38
+ :'review_id' => :'String',
39
+ :'rating' => :'Integer',
40
+ :'description' => :'String'
41
+ }
42
+ end
43
+
44
+ # Initializes the object
45
+ # @param [Hash] attributes Model attributes in the form of hash
46
+ def initialize(attributes = {})
47
+ return unless attributes.is_a?(Hash)
48
+
49
+ # convert string to symbol for hash key
50
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
51
+
52
+ if attributes.has_key?(:'reviewId')
53
+ self.review_id = attributes[:'reviewId']
54
+ end
55
+
56
+ if attributes.has_key?(:'rating')
57
+ self.rating = attributes[:'rating']
58
+ end
59
+
60
+ if attributes.has_key?(:'description')
61
+ self.description = attributes[:'description']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ if @review_id.nil?
70
+ invalid_properties.push('invalid value for "review_id", review_id cannot be nil.')
71
+ end
72
+
73
+ invalid_properties
74
+ end
75
+
76
+ # Check to see if the all the properties in the model are valid
77
+ # @return true if the model is valid
78
+ def valid?
79
+ return false if @review_id.nil?
80
+ true
81
+ end
82
+
83
+ # Checks equality by comparing each attribute.
84
+ # @param [Object] Object to be compared
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ review_id == o.review_id &&
89
+ rating == o.rating &&
90
+ description == o.description
91
+ end
92
+
93
+ # @see the `==` method
94
+ # @param [Object] Object to be compared
95
+ def eql?(o)
96
+ self == o
97
+ end
98
+
99
+ # Calculates hash code according to all attributes.
100
+ # @return [Fixnum] Hash code
101
+ def hash
102
+ [review_id, rating, description].hash
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ self.class.swagger_types.each_pair do |key, type|
111
+ if type =~ /\AArray<(.*)>/i
112
+ # check to ensure the input is an array given that the the attribute
113
+ # is documented as an array but the input is not
114
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
115
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
116
+ end
117
+ elsif !attributes[self.class.attribute_map[key]].nil?
118
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
119
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
120
+ end
121
+
122
+ self
123
+ end
124
+
125
+ # Deserializes the data based on type
126
+ # @param string type Data type
127
+ # @param string value Value to be deserialized
128
+ # @return [Object] Deserialized data
129
+ def _deserialize(type, value)
130
+ case type.to_sym
131
+ when :DateTime
132
+ DateTime.parse(value)
133
+ when :Date
134
+ Date.parse(value)
135
+ when :String
136
+ value.to_s
137
+ when :Integer
138
+ value.to_i
139
+ when :Float
140
+ value.to_f
141
+ when :BOOLEAN
142
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
143
+ true
144
+ else
145
+ false
146
+ end
147
+ when :Object
148
+ # generic object (usually a Hash), return directly
149
+ value
150
+ when /\AArray<(?<inner_type>.+)>\z/
151
+ inner_type = Regexp.last_match[:inner_type]
152
+ value.map { |v| _deserialize(inner_type, v) }
153
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
154
+ k_type = Regexp.last_match[:k_type]
155
+ v_type = Regexp.last_match[:v_type]
156
+ {}.tap do |hash|
157
+ value.each do |k, v|
158
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
159
+ end
160
+ end
161
+ else # model
162
+ temp_model = Quandoo.const_get(type).new
163
+ temp_model.build_from_hash(value)
164
+ end
165
+ end
166
+
167
+ # Returns the string representation of the object
168
+ # @return [String] String presentation of the object
169
+ def to_s
170
+ to_hash.to_s
171
+ end
172
+
173
+ # to_body is an alias to to_hash (backward compatibility)
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_body
176
+ to_hash
177
+ end
178
+
179
+ # Returns the object in the form of hash
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_hash
182
+ hash = {}
183
+ self.class.attribute_map.each_pair do |attr, param|
184
+ value = self.send(attr)
185
+ next if value.nil?
186
+ hash[param] = _to_hash(value)
187
+ end
188
+ hash
189
+ end
190
+
191
+ # Outputs non-array value in the form of hash
192
+ # For object, use to_hash. Otherwise, just return the value
193
+ # @param [Object] value Any valid value
194
+ # @return [Hash] Returns the value in the form of hash
195
+ def _to_hash(value)
196
+ if value.is_a?(Array)
197
+ value.compact.map { |v| _to_hash(v) }
198
+ elsif value.is_a?(Hash)
199
+ {}.tap do |hash|
200
+ value.each { |k, v| hash[k] = _to_hash(v) }
201
+ end
202
+ elsif value.respond_to? :to_hash
203
+ value.to_hash
204
+ else
205
+ value
206
+ end
207
+ end
208
+ end
209
+ end
@@ -0,0 +1,15 @@
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
+ module Quandoo
14
+ VERSION = '1.0.0'
15
+ end
@@ -0,0 +1,45 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #Quandoo API Documentation
5
+
6
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
7
+
8
+ OpenAPI spec version: 1.0.0
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 2.4.5
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "quandoo/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "quandoo"
20
+ s.version = Quandoo::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["Joshua Kelly"]
23
+ s.email = [""]
24
+ s.homepage = "https://github.com/swagger-api/swagger-codegen"
25
+ s.summary = "A Ruby wrapper for the Quandoo API"
26
+ s.description = "This gem maps all of the publicly available methods in the Quandoo API to a Ruby library"
27
+ s.license = "Unlicense"
28
+ s.required_ruby_version = ">= 1.9"
29
+
30
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
31
+ s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
32
+
33
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
34
+ s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
35
+ s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
36
+ s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
37
+ s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
38
+ s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
39
+ s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
40
+
41
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
42
+ s.test_files = `find spec/*`.split("\n")
43
+ s.executables = []
44
+ s.require_paths = ["lib"]
45
+ end
@@ -0,0 +1,69 @@
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::AvailabilitiesApi
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'AvailabilitiesApi' do
20
+ before do
21
+ # run before each test
22
+ @instance = Quandoo::AvailabilitiesApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of AvailabilitiesApi' do
30
+ it 'should create an instance of AvailabilitiesApi' do
31
+ expect(@instance).to be_instance_of(Quandoo::AvailabilitiesApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for availability_days1
36
+ # Get merchant availability days
37
+ # 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;
38
+ # @param merchant_id Id of the merchant
39
+ # @param agent_id Id of the agent
40
+ # @param [Hash] opts the optional parameters
41
+ # @option opts [Integer] :capacity Number of people
42
+ # @return [MerchantAvailabilityDaysDto]
43
+ describe 'availability_days1 test' do
44
+ it 'should work' do
45
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
46
+ end
47
+ end
48
+
49
+ # unit tests for availability_options1
50
+ # Get merchant availability time slots
51
+ # 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;
52
+ # @param merchant_id Id of the merchant
53
+ # @param agent_id Id of the agent
54
+ # @param capacity Number of people
55
+ # @param date Date of the desired reservation. Format: yyyy-MM-dd
56
+ # @param [Hash] opts the optional parameters
57
+ # @option opts [String] :from_time Beginning of the desired reservation time frame. Format: HH:mm
58
+ # @option opts [String] :to_time End of the desired reservation time frame. Format: HH:mm
59
+ # @option opts [Integer] :area_id Id of the area
60
+ # @option opts [String] :deal_id Id of the deal
61
+ # @option opts [String] :deal_type type of the deal - SPECIAL, DISCOUNT or OFFER
62
+ # @return [MerchantAvailabilityDtoList]
63
+ describe 'availability_options1 test' do
64
+ it 'should work' do
65
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
66
+ end
67
+ end
68
+
69
+ end
@@ -0,0 +1,75 @@
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::CustomersApi
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'CustomersApi' do
20
+ before do
21
+ # run before each test
22
+ @instance = Quandoo::CustomersApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of CustomersApi' do
30
+ it 'should create an instance of CustomersApi' do
31
+ expect(@instance).to be_instance_of(Quandoo::CustomersApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for get_customer1
36
+ # Get customer Data
37
+ # 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;
38
+ # @param customer_id Id of the customer
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [CustomerResponse]
41
+ describe 'get_customer1 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_customers_of_merchant1
48
+ # Get a list of Customers of a merchant
49
+ # 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;
50
+ # @param merchant_id Id of the merchant
51
+ # @param [Hash] opts the optional parameters
52
+ # @option opts [Integer] :offset offset
53
+ # @option opts [Integer] :limit limit
54
+ # @option opts [DateTime] :modified_since modifiedSince. Format: yyyy-MM-dd HH:mm:ss
55
+ # @option opts [DateTime] :modified_until modifiedUntil. Format: yyyy-MM-dd HH:mm:ss
56
+ # @return [CustomerDataList]
57
+ describe 'get_customers_of_merchant1 test' do
58
+ it 'should work' do
59
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
60
+ end
61
+ end
62
+
63
+ # unit tests for get_reservations1
64
+ # Get customer reservations
65
+ # 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;
66
+ # @param customer_id Id of the customer
67
+ # @param [Hash] opts the optional parameters
68
+ # @return [ReservationDataList]
69
+ describe 'get_reservations1 test' do
70
+ it 'should work' do
71
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
72
+ end
73
+ end
74
+
75
+ end
@@ -0,0 +1,100 @@
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::MenusApi
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'MenusApi' do
20
+ before do
21
+ # run before each test
22
+ @instance = Quandoo::MenusApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of MenusApi' do
30
+ it 'should create an instance of MenusApi' do
31
+ expect(@instance).to be_instance_of(Quandoo::MenusApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for add_preordered_items1
36
+ # Add/remove menu items to/from a reservation&#39;s preorders
37
+ # This endpoint will add/remove menu items to/from preorders of a reservation. If an item already exists, the quantitiy specified for the item will be added to the existing quantity. For example, if an item has a quantity of 2, and a PATCH request specifies the same item with a quantity of 1, the result will be a quantity of 3 for that item. This can be also used to remove items, by specifying a negative quantity. For example, if an item has a quantity of 2, and a PATCH request specifies the same item with a quantity of -1, the result will be a quantity of 1. No item can have a negative quantity in the end, which means a PATCH request with a quantity of -5 for an item that currently has a quantity of 2, will result in that item to be simply deleted from the preorder, instead of having a final quantity of -3. If an item does not exist in the current preorders, it will be added, provided it has a positive quantity. The reservation ID in the request is the public ID of the reservation and **not** agent-specific. This endpoint requires user to be logged in. The endpoint will return &#x60;HTTP 404 - Not Found&#x60; if the reservation with the specified id could not be found. It will return &#x60;HTTP 403 - Forbidden&#x60; if the user is not authenticated or the reservation doesn&#39;t belong to the customer associated with the user. ####Request: * **reservationId**: Public ID of the reservation. Path parameter. Request body has the same structure as Get Preorder response, except not having the &#x60;href&#x60; field. * **items**: List of menu items to be edited. Each menu item will have the fields explained below. * **menuId**: The Id of the menu that this item belongs to. **Required**. * **itemId**: The Id of the menu item. **Required**. * **quantity**: Change in quantity to be applied to the existing item&#39;s quantity. See above for explanation. **Required**. * **guestPublicId**: The ID of the guest for whom this item is being preordered. Optional. Format: UUID. ####Response: * **items**: The response will be a _list_ of successfully preordered menu items. Each menu item has the fields explained below: * **menuId**: The Id of the menu that this item belongs to * **itemId**: The Id of the menu item * **quantity**: Quantity of this menu item selected for the reservation * **guestPublicId**: The ID of the guest for whom this item has been preordered, if any. * **href**: Link that can be followed to get information about the menu and its available items Example curl: &#x60;&#x60;&#x60; curl -H \&quot;Content Type: application/json\&quot; -X PATCH -d &#39; { \&quot;items\&quot;: [ { \&quot;menuId\&quot;: 1846, \&quot;itemId\&quot;: 1477, \&quot;quantity\&quot;: 1, \&quot;guestPublicId\&quot;: \&quot;a8a66a11-446a-443b-8834-591742825ad4\&quot; }, { \&quot;menuId\&quot;: 1846, \&quot;itemId\&quot;: 1478, \&quot;quantity\&quot;: -1 } ] } &#39; https://{host}/v{X}/reservations/ce0706ff-a95d-4229-a220-d21dcd175342/preorders &#x60;&#x60;&#x60; Example response: &#x60;&#x60;&#x60; { \&quot;items\&quot;: [ { \&quot;menuId\&quot;: 1846, \&quot;itemId\&quot;: 1477, \&quot;quantity\&quot;: 2, \&quot;guestPublicId\&quot;: \&quot;a8a66a11-446a-443b-8834-591742825ad4\&quot;, \&quot;href\&quot;: \&quot;https://{host}/v{X}/reservations/ce0706ff-a95d-4229-a220-d21dcd175342/menus/1846\&quot; }, { \&quot;menuId\&quot;: 1846, \&quot;itemId\&quot;: 1478, \&quot;quantity\&quot;: 1, \&quot;guestPublicId\&quot;: \&quot;f871d6d7-e92e-4672-b24a-edb76963073b\&quot;, \&quot;href\&quot;: \&quot;https://{host}/v{X}/reservations/ce0706ff-a95d-4229-a220-d21dcd175342/menus/1846\&quot; } ] } &#x60;&#x60;&#x60;
38
+ # @param reservation_id Public Id of the reservation
39
+ # @param body Menu items to add
40
+ # @param [Hash] opts the optional parameters
41
+ # @return [ReservationMenuData]
42
+ describe 'add_preordered_items1 test' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
+ end
46
+ end
47
+
48
+ # unit tests for find_menus_for_reservation1
49
+ # Get all available menus for a reservation
50
+ # This endpoint will return the available menus for a reservation. The reservation ID in the request is the public ID of the reservation and **not** agent-specific. This endpoint requires user to be logged in. The endpoint will return &#x60;HTTP 404 - Not Found&#x60; if the reservation with the specified id could not be found. It will return &#x60;HTTP 403 - Forbidden&#x60; if the user is not authenticated or the reservation doesn&#39;t belong to the customer associated with the user. ####Request: * **reservationId**: Public Id of the reservation * **locale**: Locale for translated info. Default: _en_ ####Response: The response will be a _list_ of available menus. Each menu has the fields explained below: * **id**: The unique id of the menu * **name**: The name or title of the menu * **description**: Menu description * **price**: Total price for the menu * **sortOrder**: The order in which this menu should be displayed * **categories**: Categories of the menu * **id**: The Id of the menu category * **name**: Name or title of the menu category * **items**: Items inside the menu category * **id**: Id of the menu item * **name**: Name of menu item * **description**: Menu item description * **price**: Item price Example curl: &#x60;&#x60;&#x60; curl https://{host}/v{X}/reservations/ce0706ff-a95d-4229-a220-d21dcd175342/menus?locale&#x3D;en &#x60;&#x60;&#x60; Example response: &#x60;&#x60;&#x60; { \&quot;menus\&quot;: [ { \&quot;id\&quot;: 1836, \&quot;name\&quot;: \&quot;special menu 1\&quot;, \&quot;price\&quot;: \&quot;100.00\&quot;, \&quot;sortOrder\&quot;: 0, \&quot;categories\&quot;: [ { \&quot;id\&quot;: 1109, \&quot;name\&quot;: \&quot;starters\&quot;, \&quot;items\&quot;: [ { \&quot;id\&quot;: 1469, \&quot;name\&quot;: \&quot;fries\&quot;, \&quot;price\&quot;: \&quot;20.00\&quot; } ] }, { \&quot;id\&quot;: 1110, \&quot;name\&quot;: \&quot;fish\&quot;, \&quot;items\&quot;: [ { \&quot;id\&quot;: 1470, \&quot;name\&quot;: \&quot;salmon\&quot;, \&quot;price\&quot;: \&quot;60.00\&quot; } ] }, { \&quot;id\&quot;: 1111, \&quot;name\&quot;: \&quot;dessert\&quot;, \&quot;items\&quot;: [ { \&quot;id\&quot;: 1471, \&quot;name\&quot;: \&quot;sundae\&quot;, \&quot;price\&quot;: \&quot;20.00\&quot; } ] } ] } ] } &#x60;&#x60;&#x60;
51
+ # @param reservation_id Public Id of the reservation
52
+ # @param [Hash] opts the optional parameters
53
+ # @option opts [String] :locale Locale for translated info
54
+ # @return [MerchantMenusDto]
55
+ describe 'find_menus_for_reservation1 test' do
56
+ it 'should work' do
57
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
58
+ end
59
+ end
60
+
61
+ # unit tests for get_menu_for_reservation1
62
+ # Get information about an available reservation menu
63
+ # This endpoint will return details for a single available menu. The reservation ID in the request is the public ID of the reservation and **not** agent-specific. This endpoint requires user to be logged in. The endpoint will return &#x60;HTTP 404 - Not Found&#x60; if the reservation or menu with the specified id could not be found. It will return &#x60;HTTP 403 - Forbidden&#x60; if the user is not authenticated or the reservation doesn&#39;t belong to the customer associated with the user. ####Request: * **reservationId**: Public id of the reservation * **menuId**: Id of the menu * **locale**: Locale for translated info. Default: _en_ ####Response: The response will be a menu with each field as explained below: * **id**: The unique id of the menu * **name**: The name or title of the menu * **description**: Menu description * **price**: Total price for the menu * **sortOrder**: The order in which this menu should be displayed * **categories**: Categories of the menu * **id**: The id of the menu category * **name**: Name or title of the menu category * **items**: Items inside the menu category * **id**: Id of the menu item * **name**: Name of menu item * **description**: Menu item description * **price**: Item price Example curl: &#x60;&#x60;&#x60; curl https://{host}/v{X}/reservations/ce0706ff-a95d-4229-a220-d21dcd175342/menus/1836?locale&#x3D;en &#x60;&#x60;&#x60; Example response: &#x60;&#x60;&#x60; { \&quot;id\&quot;: 1836, \&quot;name\&quot;: \&quot;special menu 1\&quot;, \&quot;price\&quot;: \&quot;100.00\&quot;, \&quot;sortOrder\&quot;: 0, \&quot;categories\&quot;: [ { \&quot;id\&quot;: 1109, \&quot;name\&quot;: \&quot;starters\&quot;, \&quot;items\&quot;: [ { \&quot;id\&quot;: 1469, \&quot;name\&quot;: \&quot;fries\&quot;, \&quot;price\&quot;: \&quot;20.00\&quot; } ] }, { \&quot;id\&quot;: 1110, \&quot;name\&quot;: \&quot;fish\&quot;, \&quot;items\&quot;: [ { \&quot;id\&quot;: 1470, \&quot;name\&quot;: \&quot;salmon\&quot;, \&quot;price\&quot;: \&quot;60.00\&quot; } ] }, { \&quot;id\&quot;: 1111, \&quot;name\&quot;: \&quot;dessert\&quot;, \&quot;items\&quot;: [ { \&quot;id\&quot;: 1471, \&quot;name\&quot;: \&quot;sundae\&quot;, \&quot;price\&quot;: \&quot;20.00\&quot; } ] } ] } &#x60;&#x60;&#x60;
64
+ # @param reservation_id Public Id of the reservation
65
+ # @param menu_id Id of the menu
66
+ # @param [Hash] opts the optional parameters
67
+ # @option opts [String] :locale Locale for translated info
68
+ # @return [MerchantMenuDto]
69
+ describe 'get_menu_for_reservation1 test' do
70
+ it 'should work' do
71
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
72
+ end
73
+ end
74
+
75
+ # unit tests for get_preordered_items1
76
+ # Get preorders of a reservation
77
+ # This endpoint will return the preordered menu items of a reservation. The reservation ID in the request is the public ID of the reservation and **not** agent-specific. This endpoint requires user to be logged in. The endpoint will return &#x60;HTTP 404 - Not Found&#x60; if the reservation with the specified id could not be found. It will return &#x60;HTTP 403 - Forbidden&#x60; if the user is not authenticated or the reservation doesn&#39;t belong to the customer associated with the user. ####Request: * **reservationId**: Public ID of the reservation ####Response: The response will be a _list_ of menu items. Each menu item has the fields explained below: * **menuId**: The Id of the menu that this item belongs to * **itemId**: The Id of the menu item * **quantity**: Quantity of this menu item selected for the reservation * **guestPublicId**: The ID of the guest for whom this item has been preordered, if any. * **href**: Link that can be followed to get information about the menu and its available items Example curl: &#x60;&#x60;&#x60; curl https://{host}/v{X}/reservations/ce0706ff-a95d-4229-a220-d21dcd175342/preorders &#x60;&#x60;&#x60; Example response: &#x60;&#x60;&#x60; { \&quot;items\&quot;: [ { \&quot;menuId\&quot;: 1846, \&quot;itemId\&quot;: 1477, \&quot;quantity\&quot;: 1, \&quot;guestPublicId\&quot;: \&quot;a8a66a11-446a-443b-8834-591742825ad4\&quot;, \&quot;href\&quot;: \&quot;https://{host}/v{X}/reservations/ce0706ff-a95d-4229-a220-d21dcd175342/menus/1846\&quot; }, { \&quot;menuId\&quot;: 1846, \&quot;itemId\&quot;: 1478, \&quot;quantity\&quot;: 2, \&quot;guestPublicId\&quot;: \&quot;a8a66a11-446a-443b-8834-591742825ad4\&quot;, \&quot;href\&quot;: \&quot;https://{host}/v{X}/reservations/ce0706ff-a95d-4229-a220-d21dcd175342/menus/1846\&quot; } ] } &#x60;&#x60;&#x60;
78
+ # @param reservation_id Public Id of the reservation
79
+ # @param [Hash] opts the optional parameters
80
+ # @return [ReservationMenuData]
81
+ describe 'get_preordered_items1 test' do
82
+ it 'should work' do
83
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
84
+ end
85
+ end
86
+
87
+ # unit tests for save_preordered_items1
88
+ # Preorder menu items for a reservation
89
+ # This endpoint will preorder menu items for a reservation. The reservation ID in the request is the public ID of the reservation and **not** agent-specific. This endpoint requires user to be logged in. The endpoint will return &#x60;HTTP 404 - Not Found&#x60; if the reservation with the specified id could not be found. It will return &#x60;HTTP 403 - Forbidden&#x60; if the user is not authenticated or the reservation doesn&#39;t belong to the customer associated with the user. ####Request: * **reservationId**: Public ID of the reservation. Path parameter. Request body has the same structure as Get Preorder response, except not having the &#x60;href&#x60; field. * **items**: List of menu items to be preordered. Each menu item will have the fields explained below. * **menuId**: The Id of the menu that this item belongs to. **Required**. * **itemId**: The Id of the menu item. **Required**. * **quantity**: Number of specified items to be preordered. **Required**. * **guestPublicId**: The ID of the guest for whom this item is being preordered. Optional. Format: UUID. ####Response: * **items**: The response will be a _list_ of successfully preordered menu items. Each menu item has the fields explained below: * **menuId**: The Id of the menu that this item belongs to * **itemId**: The Id of the menu item * **quantity**: Quantity of this menu item selected for the reservation * **guestPublicId**: The ID of the guest for whom this item has been preordered, if any. * **href**: Link that can be followed to get information about the menu and its available items Example curl: &#x60;&#x60;&#x60; curl -H \&quot;Content Type: application/json\&quot; -X PUT -d &#39; { \&quot;items\&quot;: [ { \&quot;menuId\&quot;: 1846, \&quot;itemId\&quot;: 1477, \&quot;quantity\&quot;: 1, \&quot;guestPublicId\&quot;: \&quot;a8a66a11-446a-443b-8834-591742825ad4\&quot; }, { \&quot;menuId\&quot;: 1846, \&quot;itemId\&quot;: 1478, \&quot;quantity\&quot;: 2 } ] } &#39; https://{host}/v{X}/reservations/ce0706ff-a95d-4229-a220-d21dcd175342/preorders &#x60;&#x60;&#x60; Example response: &#x60;&#x60;&#x60; { \&quot;items\&quot;: [ { \&quot;menuId\&quot;: 1846, \&quot;itemId\&quot;: 1477, \&quot;quantity\&quot;: 1, \&quot;guestPublicId\&quot;: \&quot;a8a66a11-446a-443b-8834-591742825ad4\&quot;, \&quot;href\&quot;: \&quot;https://{host}/v{X}/reservations/ce0706ff-a95d-4229-a220-d21dcd175342/menus/1846\&quot; }, { \&quot;menuId\&quot;: 1846, \&quot;itemId\&quot;: 1478, \&quot;quantity\&quot;: 2, \&quot;href\&quot;: \&quot;https://{host}/v{X}/reservations/ce0706ff-a95d-4229-a220-d21dcd175342/menus/1846\&quot; } ] } &#x60;&#x60;&#x60;
90
+ # @param reservation_id Public Id of the reservation
91
+ # @param body Menu items for this reservation
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [ReservationMenuData]
94
+ describe 'save_preordered_items1 test' do
95
+ it 'should work' do
96
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
97
+ end
98
+ end
99
+
100
+ end