Class: Believe::Models::Player
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Believe::Models::Player
- Defined in:
- lib/believe/models/player.rb
Overview
Defined Under Namespace
Modules: MemberType
Instance Attribute Summary collapse
-
#assists ⇒ Integer?
Total assists for the team.
-
#character_id ⇒ String
ID of the character (references /characters/#id).
-
#goals_scored ⇒ Integer?
Total goals scored for the team.
-
#id ⇒ String
Unique identifier for this team membership.
-
#is_captain ⇒ Boolean?
Whether this player is team captain.
-
#jersey_number ⇒ Integer
Jersey/shirt number.
-
#member_type ⇒ Symbol, ...
Discriminator field indicating this is a player.
-
#position ⇒ Symbol, ::Believe::Models::Position
Playing position on the field.
-
#team_id ⇒ String
ID of the team they belong to.
-
#years_with_team ⇒ Integer
Number of years with the current team.
Instance Method Summary collapse
-
#initialize(id:, character_id:, jersey_number:, position:, team_id:, years_with_team:, assists: nil, goals_scored: nil, is_captain: nil, member_type: nil) ⇒ Object
constructor
Full player model with ID.
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:, jersey_number:, position:, team_id:, years_with_team:, assists: nil, goals_scored: nil, is_captain: nil, member_type: nil) ⇒ Object
Full player model with ID.
|
|
# File 'lib/believe/models/player.rb', line 67
|
Instance Attribute Details
#assists ⇒ Integer?
Total assists for the team
47 |
# File 'lib/believe/models/player.rb', line 47 optional :assists, Integer |
#character_id ⇒ String
ID of the character (references /characters/#id)
17 |
# File 'lib/believe/models/player.rb', line 17 required :character_id, String |
#goals_scored ⇒ Integer?
Total goals scored for the team
53 |
# File 'lib/believe/models/player.rb', line 53 optional :goals_scored, Integer |
#id ⇒ String
Unique identifier for this team membership
11 |
# File 'lib/believe/models/player.rb', line 11 required :id, String |
#is_captain ⇒ Boolean?
Whether this player is team captain
59 |
# File 'lib/believe/models/player.rb', line 59 optional :is_captain, ::Believe::Internal::Type::Boolean |
#jersey_number ⇒ Integer
Jersey/shirt number
23 |
# File 'lib/believe/models/player.rb', line 23 required :jersey_number, Integer |
#member_type ⇒ Symbol, ...
Discriminator field indicating this is a player
65 |
# File 'lib/believe/models/player.rb', line 65 optional :member_type, enum: -> { ::Believe::Player::MemberType } |
#position ⇒ Symbol, ::Believe::Models::Position
Playing position on the field
29 |
# File 'lib/believe/models/player.rb', line 29 required :position, enum: -> { ::Believe::Position } |
#team_id ⇒ String
ID of the team they belong to
35 |
# File 'lib/believe/models/player.rb', line 35 required :team_id, String |
#years_with_team ⇒ Integer
Number of years with the current team
41 |
# File 'lib/believe/models/player.rb', line 41 required :years_with_team, Integer |