hungrytable 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/hungrytable.gemspec CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
6
6
  s.name = "hungrytable"
7
7
  s.version = Hungrytable::VERSION
8
8
  s.authors = ["David Chapman", "Nicholas Fine"]
9
- s.email = ["david@isotope11.com", 'nick@ndfine.com']
9
+ s.email = ["david@isotope11.com", 'nicholas.fine@gmail.com']
10
10
  s.homepage = "http://www.isotope11.com/"
11
11
  s.summary = %q{Gem to interact with OpenTable's REST API}
12
12
  s.description = %q{Gem to interact with OpenTable's REST API}
@@ -31,6 +31,7 @@ module Hungrytable
31
31
  neighborhood_name
32
32
  restaurant_name
33
33
  results_key
34
+ no_times_message
34
35
  ).map(&:to_sym).include?(meth)
35
36
  return details["ns:#{meth.to_s.camelize.gsub("Id","ID")}"]
36
37
  end
@@ -1,3 +1,3 @@
1
1
  module Hungrytable
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
data/lib/hungrytable.rb CHANGED
@@ -21,4 +21,53 @@ require 'hungrytable/reservation_cancel'
21
21
 
22
22
  module Hungrytable
23
23
  class HungrytableError < StandardError;end
24
+
25
+ def error_codes
26
+ {
27
+ 152 => { message: 'The email address is not valid. Please try again.', name: 'VALIDEMAIL' },
28
+ 160 => { message: "We're sorry but we were unable to complete you request. Our technical team has been notified of the problem and will resolve it shortly. Thank you.", name: "GENERALERROR" },
29
+ 197 => { message: "You must select at least one restaurant to search.", name: "PROVIDERESTAURANT" },
30
+ 202 => { message: "The time you selected has already passed. You may wish to check that your computer clock is correct.", name: "PASSEDTIME" },
31
+ 274 => { message: "Your phone number must be numeric.", name: "NUMERICPHONE" },
32
+ 279 => { message: "Your IP address is not listed as an OpenTable Partner IP.", name: "INVALIDIP" },
33
+ 280 => { message: "Key authentication failure", name: "AUTHENTICATEFAIL" },
34
+ 281 => { message: "The phone length for the number provided was not a valid length for the country code.", name: "INVALIDPHONELENGTH" },
35
+ 282 => { message: "We are currently unable to connect to the restaurant to complete this action. Please try again later.", name: "ERBERROR" },
36
+ 283 => { message: "The time you have chosen for your reservation is no longer available.", name: "RESERVATIONNOTAVAIL" },
37
+ 285 => { message: "Credit Card transactions are not allowed via OT Web Services.", name: "CCNOTALLOWED" },
38
+ 286 => { message: "Large parties are not allowed via OT Web Services.", name: "LARGEPARTYNOTALLOWED" },
39
+ 287 => { message: "The restaurant is currently offline.", name: "RESTOFFLINE" },
40
+ 288 => { message: "The restaurant is currently unreachable.", name: "RESTUNREACHABLE" },
41
+ 289 => { message: "Cancel transaction failed.", name: "CANCELFAIL" },
42
+ 294 => { message: "You have not provided enough information to perform the search.", name: "INSUFFICIENTINFORMATION" },
43
+ 295 => { message: "No restaurants were found in your search. Please try again.", name: "NORESTAURANTSRETURNED" },
44
+ 296 => { message: "Your search produced no times.", name: "NOTIMESMESSAGE" },
45
+ 298 => { message: "The confirmation number is invalid.", name: "VALIDCONFIRMNUMBER" },
46
+ 299 => { message: "The reservation status is not available on reservations older than 30 days.", name: "VALIDSTATUSDATE" },
47
+ 301 => { message: "The user for the reservation request already has a reservation within 2 hours of the requested time.", name: "VALIDDUPRESERVATION" },
48
+ 302 => { message: "No Reservation Activity found.", name: "NORESOHISTORYAVAILABLE" },
49
+ 303 => { message: "Invalid User Email. Please re-enter your UserEmail.", name: "INVALIDUSEREMAIL" },
50
+ 304 => { message: "Invalid User Password. Please re-enter your password.", name: "INVALIDUSERPASSWORD" },
51
+ 305 => { message: "Unable to authenticate user to login. Please try again.", name: "USERAUTHENTICATIONFAIL" },
52
+ 306 => { message: "The entered area to search is too large please limit your search to 20 miles.", name: "SEARCHAREATOOLARGE" },
53
+ 307 => { message: "The email address(es) you have provided are not in the correct format. Please try again.", name: "INVALIDEMAILADDRESSES" },
54
+ 308 => { message: "Your reservation has already been cancelled, please hit the Reload button on your profile to refresh your page", name: "ALREADYCANCELLED" },
55
+ 309 => { message: "You must use SSL for this request.", name: "SSLCONNECTIONREQUIRED" },
56
+ 310 => { message: "The points requested for this time slot are not available.", name: "INVALIDPOINTREQUEST" },
57
+ 311 => { message: "The user account is deactivated.", name: "ACCTDEACTIVATED" },
58
+ 313 => { message: "The requested Restaurant was not found.", name: "INVALIDRESTAURANTID" },
59
+ 314 => { message: "We already have an account registered to <email address>", name: "MATCHACCOUNT" },
60
+ 315 => { message: "A default metro must be provided for a use", name: "PROVIDEMETRO" },
61
+ 316 => { message: "The password must be a minimum of 6 characters.", name: "MALFORMEDPASSWORD" },
62
+ 317 => { message: "The phone length for the number provided was not a valid length for the country code.", name: "INVALIDPHONE" },
63
+ 318 => { message: "Please enter a valid country id for the phone number.", name: "PROVIDEPHONECOUNTRY" },
64
+ 319 => { message: "Please enter a valid country id for the mobile phone number.", name: "PROVIDEMOBILEPHONECOUNTRY" },
65
+ 321 => { message: "We're sorry, but we could not complete your reservation request because an account cannot have more than two confirmed reservations into the same restaurant for the same day.", name: "VALIDTOOMANYSAMEREST" },
66
+ 322 => { message: "The time slot for this reservation is no longer available.", name: "SLOTLOCKUNAVAILABLE" },
67
+ 323 => { message: "The service you are trying to access is currently unavailable, please try again later.", name: "SERVICEUNAVAILABLE" },
68
+ 324 => { message: "The service experienced a timeout. Please try again later.", name: "SERVICETIMEOUT" },
69
+ 325 => { message: "Invalid number of lookback days, the most you can look back is 8 days.", name: "INVALIDLOOKBACKDAYS" },
70
+ 326 => { message: "This service is currently disabled. Please try again later.", name: "CURRENTLYDISABLED" }
71
+ }
72
+ end
24
73
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hungrytable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-07-27 00:00:00.000000000 Z
13
+ date: 2012-10-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json
@@ -175,7 +175,7 @@ dependencies:
175
175
  description: Gem to interact with OpenTable's REST API
176
176
  email:
177
177
  - david@isotope11.com
178
- - nick@ndfine.com
178
+ - nicholas.fine@gmail.com
179
179
  executables: []
180
180
  extensions: []
181
181
  extra_rdoc_files: []
@@ -231,7 +231,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
231
231
  version: '0'
232
232
  segments:
233
233
  - 0
234
- hash: 2067063869812515903
234
+ hash: 2400587081882283788
235
235
  required_rubygems_version: !ruby/object:Gem::Requirement
236
236
  none: false
237
237
  requirements:
@@ -240,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
240
  version: '0'
241
241
  segments:
242
242
  - 0
243
- hash: 2067063869812515903
243
+ hash: 2400587081882283788
244
244
  requirements: []
245
245
  rubyforge_project: hungrytable
246
246
  rubygems_version: 1.8.24