Class: Believe::Models::Coach

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

Overview

Defined Under Namespace

Modules: MemberType

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(id:, character_id:, specialty:, team_id:, years_with_team:, certifications: nil, member_type: nil, win_rate: nil) ⇒ Object

Full coach model with ID.

Parameters:

  • id (String)

    Unique identifier for this team membership

  • character_id (String)

    ID of the character (references /characters/#id)

  • specialty (Symbol, ::Believe::Models::CoachSpecialty)

    Coaching specialty/role

  • team_id (String)

    ID of the team they belong to

  • years_with_team (Integer)

    Number of years with the current team

  • certifications (Array<String>) (defaults to: nil)

    Coaching certifications and licenses

  • member_type (Symbol, ::Believe::Models::Coach::MemberType) (defaults to: nil)

    Discriminator field indicating this is a coach

  • win_rate (Float, nil) (defaults to: nil)

    Career win rate (0.0 to 1.0)



# File 'lib/believe/models/coach.rb', line 55

Instance Attribute Details

#certificationsArray<String>?

Coaching certifications and licenses

Returns:

  • (Array<String>, nil)


41
# File 'lib/believe/models/coach.rb', line 41

optional :certifications, ::Believe::Internal::Type::ArrayOf[String]

#character_idString

ID of the character (references /characters/#id)

Returns:

  • (String)


17
# File 'lib/believe/models/coach.rb', line 17

required :character_id, String

#idString

Unique identifier for this team membership

Returns:

  • (String)


11
# File 'lib/believe/models/coach.rb', line 11

required :id, String

#member_typeSymbol, ...

Discriminator field indicating this is a coach

Returns:



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

optional :member_type, enum: -> { ::Believe::Coach::MemberType }

#specialtySymbol, ::Believe::Models::CoachSpecialty

Coaching specialty/role



23
# File 'lib/believe/models/coach.rb', line 23

required :specialty, enum: -> { ::Believe::CoachSpecialty }

#team_idString

ID of the team they belong to

Returns:

  • (String)


29
# File 'lib/believe/models/coach.rb', line 29

required :team_id, String

#win_rateFloat?

Career win rate (0.0 to 1.0)

Returns:

  • (Float, nil)


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

optional :win_rate, Float, nil?: true

#years_with_teamInteger

Number of years with the current team

Returns:

  • (Integer)


35
# File 'lib/believe/models/coach.rb', line 35

required :years_with_team, Integer