Class: SportsOddsAPI::Models::Event::Info::Broadcast

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/sports_odds_api/models/event.rb,
sig/sports_odds_api/models/event.rbs

Defined Under Namespace

Modules: Type

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(broadcaster_id: nil, name: nil, type: nil) ⇒ Object

Parameters:



139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/sports_odds_api/models/event.rb', line 139

class Broadcast < SportsOddsAPI::Internal::Type::BaseModel
  # @!attribute broadcaster_id
  #
  #   @return [String, nil]
  optional :broadcaster_id, String, api_name: :broadcasterID

  # @!attribute name
  #
  #   @return [String, nil]
  optional :name, String

  # @!attribute type
  #
  #   @return [Symbol, SportsOddsAPI::Models::Event::Info::Broadcast::Type, nil]
  optional :type, enum: -> { SportsOddsAPI::Event::Info::Broadcast::Type }

  # @!method initialize(broadcaster_id: nil, name: nil, type: nil)
  #   @param broadcaster_id [String]
  #   @param name [String]
  #   @param type [Symbol, SportsOddsAPI::Models::Event::Info::Broadcast::Type]

  # @see SportsOddsAPI::Models::Event::Info::Broadcast#type
  module Type
    extend SportsOddsAPI::Internal::Type::Enum

    TV = :tv
    WEBSTREAM = :webstream
    SUBSCRIPTION = :subscription
    SPORTSBOOK = :sportsbook

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#broadcaster_idString?

Parameters:

  • (String)

Returns:

  • (String, nil)


143
# File 'lib/sports_odds_api/models/event.rb', line 143

optional :broadcaster_id, String, api_name: :broadcasterID

#nameString?

Parameters:

  • (String)

Returns:

  • (String, nil)


148
# File 'lib/sports_odds_api/models/event.rb', line 148

optional :name, String

#typeSymbol, ...



153
# File 'lib/sports_odds_api/models/event.rb', line 153

optional :type, enum: -> { SportsOddsAPI::Event::Info::Broadcast::Type }

Instance Method Details

#to_hash{

Returns:

  • ({)


197
# File 'sig/sports_odds_api/models/event.rbs', line 197

def to_hash: -> {