Class: Sportradar::Api::Soccer::Venue

Inherits:
Data
  • Object
show all
Defined in:
lib/sportradar/api/soccer/venue.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Data

#all_attributes, #attributes, #create_data, #parse_into_array, #parse_into_array_with_options, #parse_out_hashes, #structure_links, #update_data

Constructor Details

#initialize(data) ⇒ Venue

Returns a new instance of Venue.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/sportradar/api/soccer/venue.rb', line 7

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

Instance Attribute Details

#capacityObject (readonly)

Returns the value of attribute capacity.



5
6
7
# File 'lib/sportradar/api/soccer/venue.rb', line 5

def capacity
  @capacity
end

#cityObject (readonly)

Returns the value of attribute city.



5
6
7
# File 'lib/sportradar/api/soccer/venue.rb', line 5

def city
  @city
end

#coordinatesObject (readonly)

Returns the value of attribute coordinates.



5
6
7
# File 'lib/sportradar/api/soccer/venue.rb', line 5

def coordinates
  @coordinates
end

#countryObject (readonly)

Returns the value of attribute country.



5
6
7
# File 'lib/sportradar/api/soccer/venue.rb', line 5

def country
  @country
end

#country_codeObject (readonly)

Returns the value of attribute country_code.



5
6
7
# File 'lib/sportradar/api/soccer/venue.rb', line 5

def country_code
  @country_code
end

#idObject (readonly)

Returns the value of attribute id.



5
6
7
# File 'lib/sportradar/api/soccer/venue.rb', line 5

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/sportradar/api/soccer/venue.rb', line 5

def name
  @name
end

#reference_idObject (readonly)

Returns the value of attribute reference_id.



5
6
7
# File 'lib/sportradar/api/soccer/venue.rb', line 5

def reference_id
  @reference_id
end

#responseObject (readonly)

Returns the value of attribute response.



5
6
7
# File 'lib/sportradar/api/soccer/venue.rb', line 5

def response
  @response
end