lib/sportradar/api/soccer/venue.rb in sportradar-api-0.12.3 vs lib/sportradar/api/soccer/venue.rb in sportradar-api-0.13.0
- old
+ new
@@ -1,20 +1,21 @@
module Sportradar
module Api
- class Soccer::Venue < Data
+ module Soccer
+ class Venue < Data
+ attr_reader :id, :name, :country_code, :country, :city, :capacity, :coordinates, :reference_id, :response
- attr_accessor :id, :name, :country_code, :country, :city, :capacity, :coordinates, :reference_id, :response
-
- def initialize(data)
- @response = data
- @id = data["id"]
- @name = data["name"]
- @country_code = data["country_code"]
- @country = data["country"]
- @city = data["city"]
- @capacity = data["capacity"]
- @coordinates = data["coordinates"]
- @reference_id = data["reference_id"]
+ def initialize(data)
+ @response = data
+ @id = data["id"]
+ @name = data["name"]
+ @country_code = data["country_code"]
+ @country = data["country"] || data["country_name"]
+ @city = data["city"] || data["city_name"]
+ @capacity = data["capacity"]
+ @coordinates = data["coordinates"] || data["map_coordinates"]
+ @reference_id = data["reference_id"]
+ end
end
end
end
end