Class: Jumbotron::Deserializers::Clients::Espn::CompetitionOdds::SideQuote
- Inherits:
-
Object
- Object
- Jumbotron::Deserializers::Clients::Espn::CompetitionOdds::SideQuote
- Defined in:
- app/deserializers/jumbotron/deserializers/clients/espn/competition_odds/side_quote.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 26 27 28 29 |
# File 'app/deserializers/jumbotron/deserializers/clients/espn/competition_odds/side_quote.rb', line 16 def self.call(payload) Support.ensure_hash!(payload, label: "side_quote") Result.build!( favorite: Support.payload.fetch(payload, "favorite"), point_spread: Support.nest("pointSpread", Support.payload.fetch(payload, "pointSpread")) do |raw| PointSpread.call(raw) end, spread: Support.nest("spread", Support.payload.fetch(payload, "spread")) { |raw| Price.call(raw) }, money_line: Support.nest("moneyLine", Support.payload.fetch(payload, "moneyLine")) do |raw| Price.call(raw) end ) end |