Class: Believe::Models::MatchCompletedWebhookEvent::Data

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/believe/models/match_completed_webhook_event.rb

Overview

See Also:

Defined Under Namespace

Modules: MatchType, Result

Instance Attribute Summary collapse

Class Method 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(away_score:, away_team_id:, completed_at:, home_score:, home_team_id:, match_id:, match_type:, result:, ted_post_match_quote:, lesson_learned: nil, man_of_the_match: nil) ⇒ Object

Data payload for a match completed event.

Parameters:

  • away_score (Integer)

    Final away team score

  • away_team_id (String)

    Away team ID

  • completed_at (Time)

    When the match completed

  • home_score (Integer)

    Final home team score

  • home_team_id (String)

    Home team ID

  • match_id (String)

    Unique match identifier

  • match_type (Symbol, ::Believe::Models::MatchCompletedWebhookEvent::Data::MatchType)

    Type of match

  • result (Symbol, ::Believe::Models::MatchCompletedWebhookEvent::Data::Result)

    Match result from home team perspective

  • ted_post_match_quote (String)

    Ted’s post-match wisdom

  • lesson_learned (String, nil) (defaults to: nil)

    Ted’s lesson from the match

  • man_of_the_match (String, nil) (defaults to: nil)

    Player of the match (if awarded)



# File 'lib/believe/models/match_completed_webhook_event.rb', line 109

Instance Attribute Details

#away_scoreInteger

Final away team score

Returns:

  • (Integer)


47
# File 'lib/believe/models/match_completed_webhook_event.rb', line 47

required :away_score, Integer

#away_team_idString

Away team ID

Returns:

  • (String)


53
# File 'lib/believe/models/match_completed_webhook_event.rb', line 53

required :away_team_id, String

#completed_atTime

When the match completed

Returns:

  • (Time)


59
# File 'lib/believe/models/match_completed_webhook_event.rb', line 59

required :completed_at, Time

#home_scoreInteger

Final home team score

Returns:

  • (Integer)


65
# File 'lib/believe/models/match_completed_webhook_event.rb', line 65

required :home_score, Integer

#home_team_idString

Home team ID

Returns:

  • (String)


71
# File 'lib/believe/models/match_completed_webhook_event.rb', line 71

required :home_team_id, String

#lesson_learnedString?

Ted’s lesson from the match

Returns:

  • (String, nil)


101
# File 'lib/believe/models/match_completed_webhook_event.rb', line 101

optional :lesson_learned, String, nil?: true

#man_of_the_matchString?

Player of the match (if awarded)

Returns:

  • (String, nil)


107
# File 'lib/believe/models/match_completed_webhook_event.rb', line 107

optional :man_of_the_match, String, nil?: true

#match_idString

Unique match identifier

Returns:

  • (String)


77
# File 'lib/believe/models/match_completed_webhook_event.rb', line 77

required :match_id, String

#match_typeSymbol, ::Believe::Models::MatchCompletedWebhookEvent::Data::MatchType

Type of match



83
# File 'lib/believe/models/match_completed_webhook_event.rb', line 83

required :match_type, enum: -> { ::Believe::MatchCompletedWebhookEvent::Data::MatchType }

#resultSymbol, ::Believe::Models::MatchCompletedWebhookEvent::Data::Result

Match result from home team perspective



89
# File 'lib/believe/models/match_completed_webhook_event.rb', line 89

required :result, enum: -> { ::Believe::MatchCompletedWebhookEvent::Data::Result }

#ted_post_match_quoteString

Ted’s post-match wisdom

Returns:

  • (String)


95
# File 'lib/believe/models/match_completed_webhook_event.rb', line 95

required :ted_post_match_quote, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/believe/models/match_completed_webhook_event.rb', line 146