Class: Jumbotron::Deserializers::Clients::Espn::CompetitionOdds::DrawOdds

Inherits:
Object
  • Object
show all
Defined in:
app/deserializers/jumbotron/deserializers/clients/espn/competition_odds/draw_odds.rb

Defined Under Namespace

Classes: Result

Class Method Summary collapse

Class Method Details

.call(payload) ⇒ Object



16
17
18
19
20
21
22
23
24
25
# File 'app/deserializers/jumbotron/deserializers/clients/espn/competition_odds/draw_odds.rb', line 16

def self.call(payload)
  Support.ensure_hash!(payload, label: "draw_odds")

  Result.build!(
    money_line: Support.payload.fetch(payload, "moneyLine"),
    summary: Support.payload.fetch(payload, "summary"),
    value: Support.payload.fetch(payload, "value"),
    handicap: Support.payload.fetch(payload, "handicap")
  )
end