Class: Sportradar::Api::Odds::Book

Inherits:
Data
  • Object
show all
Defined in:
lib/sportradar/api/odds/book.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, **opts) ⇒ Book

Returns a new instance of Book.



8
9
10
11
12
13
14
# File 'lib/sportradar/api/odds/book.rb', line 8

def initialize(data, **opts)
  @response = data
  @api      = opts[:api]

  @id       = data['id']
  @name     = data['name']
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/sportradar/api/odds/book.rb', line 5

def id
  @id
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/sportradar/api/odds/book.rb', line 5

def name
  @name
end

#responseObject

Returns the value of attribute response.



5
6
7
# File 'lib/sportradar/api/odds/book.rb', line 5

def response
  @response
end

Instance Method Details

#update(data, **opts) ⇒ Object



16
17
18
# File 'lib/sportradar/api/odds/book.rb', line 16

def update(data, **opts)

end