yelp-fusion 0.1.pre.beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.rubocop.yml +1 -0
  4. data/.rubocop_todo.yml +210 -0
  5. data/CODE_OF_CONDUCT.md +74 -0
  6. data/Gemfile +8 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +180 -0
  9. data/Rakefile +9 -0
  10. data/Test::vcr_casettes/business.yml +75 -0
  11. data/Test::vcr_casettes/match.yml +61 -0
  12. data/Test::vcr_casettes/phone.yml +65 -0
  13. data/Test::vcr_casettes/review.yml +72 -0
  14. data/Test::vcr_casettes/search.yml +263 -0
  15. data/Test::vcr_casettes/search_by_coordinates.yml +57 -0
  16. data/Test::vcr_casettes/transaction.yml +254 -0
  17. data/Test::vcr_casettes/transaction_by_coordinates.yml +56 -0
  18. data/bin/console +14 -0
  19. data/bin/setup +8 -0
  20. data/lib/yelp/fusion.rb +36 -0
  21. data/lib/yelp/fusion/client.rb +86 -0
  22. data/lib/yelp/fusion/configuration.rb +37 -0
  23. data/lib/yelp/fusion/endpoint/business.rb +70 -0
  24. data/lib/yelp/fusion/endpoint/match.rb +64 -0
  25. data/lib/yelp/fusion/endpoint/phone.rb +71 -0
  26. data/lib/yelp/fusion/endpoint/review.rb +72 -0
  27. data/lib/yelp/fusion/endpoint/search.rb +104 -0
  28. data/lib/yelp/fusion/endpoint/transaction.rb +97 -0
  29. data/lib/yelp/fusion/error.rb +105 -0
  30. data/lib/yelp/fusion/responses/base.rb +43 -0
  31. data/lib/yelp/fusion/responses/business.rb +36 -0
  32. data/lib/yelp/fusion/responses/match.rb +36 -0
  33. data/lib/yelp/fusion/responses/models/business.rb +48 -0
  34. data/lib/yelp/fusion/responses/models/categories.rb +34 -0
  35. data/lib/yelp/fusion/responses/models/center.rb +34 -0
  36. data/lib/yelp/fusion/responses/models/hours.rb +38 -0
  37. data/lib/yelp/fusion/responses/models/location.rb +36 -0
  38. data/lib/yelp/fusion/responses/models/openHours.rb +34 -0
  39. data/lib/yelp/fusion/responses/models/region.rb +38 -0
  40. data/lib/yelp/fusion/responses/models/reviews.rb +38 -0
  41. data/lib/yelp/fusion/responses/models/user.rb +36 -0
  42. data/lib/yelp/fusion/responses/phone.rb +36 -0
  43. data/lib/yelp/fusion/responses/review.rb +36 -0
  44. data/lib/yelp/fusion/responses/search.rb +38 -0
  45. data/lib/yelp/fusion/responses/transaction.rb +36 -0
  46. data/lib/yelp/fusion/version.rb +25 -0
  47. data/yelp-fusion.gemspec +44 -0
  48. metadata +192 -0
@@ -0,0 +1,105 @@
1
+ # Copyright (c) Jobcase, Inc. All rights reserved.
2
+
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
21
+ require 'json'
22
+
23
+ module Yelp
24
+ module Fusion
25
+ module Error
26
+ class ResponseValidator
27
+ # If the request is not successful, raise an appropriate Yelp::Error
28
+ # exception with the error text from the request response.
29
+ # @param response from the Yelp API
30
+ def validate(response)
31
+ return if successful_response?(response)
32
+ raise error_from_response(response)
33
+ end
34
+
35
+ private
36
+
37
+ def successful_response?(response)
38
+ # check if the status is in the range of non-error status codes
39
+ (200..399).cover?(response.status)
40
+ end
41
+
42
+ # Create an initialized exception from the response
43
+ # @return [Yelp::Error::Base] exception corresponding to API error
44
+ def error_from_response(response)
45
+ body = JSON.parse(response.body)
46
+ klass = error_classes[body['error']['code']]
47
+ klass.new(body['error']['description'], body['error'])
48
+ end
49
+
50
+ # Maps from API Error id's to Yelp::Error exception classes.
51
+ def error_classes
52
+ @error_classes ||= Hash.new do |hash, key|
53
+ class_name = key.split('_').map(&:capitalize).join('')
54
+ hash[key] = Yelp::Fusion::Error.const_get(class_name)
55
+ end
56
+ end
57
+ end
58
+
59
+ # Check the response for errors, raising an appropriate exception if
60
+ # necessary
61
+ # @param (see ResponseValidator#validate)
62
+ def self.check_for_error(response)
63
+ @response_validator ||= ResponseValidator.new
64
+ @response_validator.validate(response)
65
+ end
66
+
67
+ class Base < StandardError
68
+ def initialize(msg, _error = nil)
69
+ super(msg)
70
+ end
71
+ end
72
+
73
+ class AlreadyConfigured < Base
74
+ def initialize(msg = 'Gem cannot be reconfigured. Initialize a new ' \
75
+ 'instance of Yelp::Client.', error = nil)
76
+ super
77
+ end
78
+ end
79
+
80
+ class MissingAPIKeys < Base
81
+ def initialize(msg = "You're missing an API key", error = nil)
82
+ super
83
+ end
84
+ end
85
+
86
+ class MissingLatLng < Base
87
+ def initialize(msg = 'Missing required latitude '\
88
+ 'or longitude parameters', error = nil)
89
+ super
90
+ end
91
+ end
92
+
93
+ class TokenInvalid < Base; end
94
+ class LocationNotFound < Base; end
95
+ class TooManyRequestsPerSecond < Base; end
96
+ class InternalError < Base; end
97
+ class ValidationError < Base; end
98
+ class TokenMissing < Base; end
99
+ class RequestTimedOut < Base; end
100
+ class AccessLimitReached < Base; end
101
+ class NotFound < Base; end
102
+ class ClientError < Base; end
103
+ end
104
+ end
105
+ end
@@ -0,0 +1,43 @@
1
+ # Copyright (c) Jobcase, Inc. All rights reserved.
2
+
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
21
+ module Yelp
22
+ module Fusion
23
+ module Responses
24
+ class Base
25
+ # yelp returns its data in JSON form/language
26
+ def initialize(json)
27
+ return if json.nil?
28
+ json.each do |key, value|
29
+ instance_variable_set("@#{key}", value)
30
+ end
31
+ end
32
+
33
+ private
34
+
35
+ def parse(json, klass)
36
+ return json.collect { |j| klass.new(j) } if json.is_a?(Array)
37
+ return klass.new(json) if json
38
+ nil
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,36 @@
1
+ # Copyright (c) Jobcase, Inc. All rights reserved.
2
+
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
21
+ require 'yelp/fusion/responses/base'
22
+ require 'yelp/fusion/responses/models/business'
23
+
24
+ module Yelp
25
+ module Fusion
26
+ module Responses
27
+ class Business < Base
28
+ attr_reader :business
29
+ def initialize(json)
30
+ super(business)
31
+ @business = parse(json, Models::Business)
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # Copyright (c) Jobcase, Inc. All rights reserved.
2
+
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
21
+ require 'yelp/fusion/responses/base'
22
+ require 'yelp/fusion/responses/models/business'
23
+
24
+ module Yelp
25
+ module Fusion
26
+ module Responses
27
+ class Match < Base
28
+ attr_reader :total, :businesses
29
+ def initialize(json)
30
+ super(json)
31
+ @businesses = parse(@businesses, Models::Business)
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,48 @@
1
+ # Copyright (c) Jobcase, Inc. All rights reserved.
2
+
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
21
+ require 'yelp/fusion/responses/base'
22
+ require 'yelp/fusion/responses/models/categories'
23
+ require 'yelp/fusion/responses/models/location'
24
+ require 'yelp/fusion/responses/models/hours'
25
+
26
+ module Yelp
27
+ module Fusion
28
+ module Responses
29
+ module Models
30
+ class Business < Responses::Base
31
+ attr_reader :categories, :coordinates, :display_phone,
32
+ :distance, :id,
33
+ :alias, :image_url, :is_closed, :location,
34
+ :name, :phone, :price,
35
+ :rating, :review_count, :url, :transactions,
36
+ :hours, :is_claimed, :photos
37
+ def initialize(json)
38
+ super(json)
39
+ @categories = parse(@categories, Categories)
40
+ @location = parse(@location, Location)
41
+ @hours = parse(@hours, Hours)
42
+ @coordinates = parse(@coordinates, Center)
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,34 @@
1
+ # Copyright (c) Jobcase, Inc. All rights reserved.
2
+
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
21
+ module Yelp
22
+ module Fusion
23
+ module Responses
24
+ module Models
25
+ class Categories < Responses::Base
26
+ attr_reader :alias, :title
27
+ def initialize(json)
28
+ super(json)
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,34 @@
1
+ # Copyright (c) Jobcase, Inc. All rights reserved.
2
+
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
21
+ module Yelp
22
+ module Fusion
23
+ module Responses
24
+ module Models
25
+ class Center < Responses::Base
26
+ attr_reader :latitude, :longitude
27
+ def initialize(json)
28
+ super(json)
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,38 @@
1
+ # Copyright (c) Jobcase, Inc. All rights reserved.
2
+
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
21
+ require 'yelp/fusion/responses/base'
22
+ require 'yelp/fusion/responses/models/openHours'
23
+
24
+ module Yelp
25
+ module Fusion
26
+ module Responses
27
+ module Models
28
+ class Hours < Responses::Base
29
+ attr_reader :is_open_now, :hours_type, :open
30
+ def initialize(json)
31
+ super(json)
32
+ @open = parse(@open, OpenHours)
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,36 @@
1
+ # Copyright (c) Jobcase, Inc. All rights reserved.
2
+
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
21
+ module Yelp
22
+ module Fusion
23
+ module Responses
24
+ module Models
25
+ class Location < Responses::Base
26
+ attr_reader :city, :country, :address2, :address3,
27
+ :state, :address1, :zip_code,
28
+ :cross_streets, :display_address
29
+ def initialize(json)
30
+ super(json)
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,34 @@
1
+ # Copyright (c) Jobcase, Inc. All rights reserved.
2
+
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
21
+ module Yelp
22
+ module Fusion
23
+ module Responses
24
+ module Models
25
+ class OpenHours < Responses::Base
26
+ attr_reader :day, :start, :end, :is_overnight
27
+ def initialize(json)
28
+ super(json)
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end