Class: TeamBattlesSdk::Generated::Models::UpdatePointsConfigRequestBody

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/teambattles_sdk/generated/models/update_points_config_request_body.rb

Overview

Updates league points configuration.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new UpdatePointsConfigRequestBody and sets the default values.



199
200
201
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 199

def initialize()
    @additional_data = Hash.new
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a update_points_config_request_body

Raises:

  • (StandardError)


207
208
209
210
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 207

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return UpdatePointsConfigRequestBody.new
end

Instance Method Details

#additional_dataObject

Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



64
65
66
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 64

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the AdditionalData property.

Returns:

  • a void



72
73
74
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 72

def additional_data=(value)
    @additional_data = value
end

#allow_negativeObject

Gets the allowNegative property value. The allowNegative property

Returns:

  • a boolean



79
80
81
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 79

def allow_negative
    return @allow_negative
end

#allow_negative=(value) ⇒ Object

Sets the allowNegative property value. The allowNegative property

Parameters:

  • value

    Value to set for the allowNegative property.

Returns:

  • a void



87
88
89
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 87

def allow_negative=(value)
    @allow_negative = value
end

#base_drawObject

Gets the baseDraw property value. The baseDraw property

Returns:

  • a double



94
95
96
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 94

def base_draw
    return @base_draw
end

#base_draw=(value) ⇒ Object

Sets the baseDraw property value. The baseDraw property

Parameters:

  • value

    Value to set for the baseDraw property.

Returns:

  • a void



102
103
104
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 102

def base_draw=(value)
    @base_draw = value
end

#base_lossObject

Gets the baseLoss property value. The baseLoss property

Returns:

  • a double



109
110
111
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 109

def base_loss
    return @base_loss
end

#base_loss=(value) ⇒ Object

Sets the baseLoss property value. The baseLoss property

Parameters:

  • value

    Value to set for the baseLoss property.

Returns:

  • a void



117
118
119
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 117

def base_loss=(value)
    @base_loss = value
end

#base_winObject

Gets the baseWin property value. The baseWin property

Returns:

  • a double



124
125
126
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 124

def base_win
    return @base_win
end

#base_win=(value) ⇒ Object

Sets the baseWin property value. The baseWin property

Parameters:

  • value

    Value to set for the baseWin property.

Returns:

  • a void



132
133
134
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 132

def base_win=(value)
    @base_win = value
end

#challenge_cancel_grace_period_hoursObject

Gets the challengeCancelGracePeriodHours property value. The challengeCancelGracePeriodHours property

Returns:

  • a double



139
140
141
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 139

def challenge_cancel_grace_period_hours
    return @challenge_cancel_grace_period_hours
end

#challenge_cancel_grace_period_hours=(value) ⇒ Object

Sets the challengeCancelGracePeriodHours property value. The challengeCancelGracePeriodHours property

Parameters:

  • value

    Value to set for the challengeCancelGracePeriodHours property.

Returns:

  • a void



147
148
149
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 147

def challenge_cancel_grace_period_hours=(value)
    @challenge_cancel_grace_period_hours = value
end

#challenge_refuse_additional_penaltyObject

Gets the challengeRefuseAdditionalPenalty property value. The challengeRefuseAdditionalPenalty property

Returns:

  • a double



154
155
156
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 154

def challenge_refuse_additional_penalty
    return @challenge_refuse_additional_penalty
end

#challenge_refuse_additional_penalty=(value) ⇒ Object

Sets the challengeRefuseAdditionalPenalty property value. The challengeRefuseAdditionalPenalty property

Parameters:

  • value

    Value to set for the challengeRefuseAdditionalPenalty property.

Returns:

  • a void



162
163
164
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 162

def challenge_refuse_additional_penalty=(value)
    @challenge_refuse_additional_penalty = value
end

#challenged_win_bonusObject

Gets the challengedWinBonus property value. The challengedWinBonus property

Returns:

  • a double



169
170
171
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 169

def challenged_win_bonus
    return @challenged_win_bonus
end

#challenged_win_bonus=(value) ⇒ Object

Sets the challengedWinBonus property value. The challengedWinBonus property

Parameters:

  • value

    Value to set for the challengedWinBonus property.

Returns:

  • a void



177
178
179
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 177

def challenged_win_bonus=(value)
    @challenged_win_bonus = value
end

#challenger_win_bonusObject

Gets the challengerWinBonus property value. The challengerWinBonus property

Returns:

  • a double



184
185
186
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 184

def challenger_win_bonus
    return @challenger_win_bonus
end

#challenger_win_bonus=(value) ⇒ Object

Sets the challengerWinBonus property value. The challengerWinBonus property

Parameters:

  • value

    Value to set for the challengerWinBonus property.

Returns:

  • a void



192
193
194
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 192

def challenger_win_bonus=(value)
    @challenger_win_bonus = value
end

#forfeit_penaltyObject

Gets the forfeitPenalty property value. The forfeitPenalty property

Returns:

  • a double



215
216
217
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 215

def forfeit_penalty
    return @forfeit_penalty
end

#forfeit_penalty=(value) ⇒ Object

Sets the forfeitPenalty property value. The forfeitPenalty property

Parameters:

  • value

    Value to set for the forfeitPenalty property.

Returns:

  • a void



223
224
225
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 223

def forfeit_penalty=(value)
    @forfeit_penalty = value
end

#game_idObject

Gets the gameId property value. Game ID whose points config should change.

Returns:

  • a string



230
231
232
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 230

def game_id
    return @game_id
end

#game_id=(value) ⇒ Object

Sets the gameId property value. Game ID whose points config should change.

Parameters:

  • value

    Value to set for the gameId property.

Returns:

  • a void



238
239
240
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 238

def game_id=(value)
    @game_id = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 245

def get_field_deserializers()
    return {
        "allowNegative" => lambda {|n| @allow_negative = n.get_boolean_value() },
        "baseDraw" => lambda {|n| @base_draw = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "baseLoss" => lambda {|n| @base_loss = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "baseWin" => lambda {|n| @base_win = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "challengeCancelGracePeriodHours" => lambda {|n| @challenge_cancel_grace_period_hours = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "challengeRefuseAdditionalPenalty" => lambda {|n| @challenge_refuse_additional_penalty = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "challengedWinBonus" => lambda {|n| @challenged_win_bonus = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "challengerWinBonus" => lambda {|n| @challenger_win_bonus = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "forfeitPenalty" => lambda {|n| @forfeit_penalty = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "gameId" => lambda {|n| @game_id = n.get_string_value() },
        "matchupCooldownHours" => lambda {|n| @matchup_cooldown_hours = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "scrimmageAwardsPoints" => lambda {|n| @scrimmage_awards_points = n.get_boolean_value() },
        "streakBonusEnabled" => lambda {|n| @streak_bonus_enabled = n.get_boolean_value() },
        "streakBreakpoints" => lambda {|n| @streak_breakpoints = n.get_collection_of_object_values(lambda {|pn| TeamBattlesSdk::Generated::Models::UpdatePointsConfigRequestBodyStreakBreakpoints.create_from_discriminator_value(pn) }) },
        "unitLabel" => lambda {|n| @unit_label = n.get_enum_value(TeamBattlesSdk::Generated::Models::UpdatePointsConfigRequestBodyUnitLabel) },
    }
end

#matchup_cooldown_hoursObject

Gets the matchupCooldownHours property value. The matchupCooldownHours property

Returns:

  • a double



268
269
270
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 268

def matchup_cooldown_hours
    return @matchup_cooldown_hours
end

#matchup_cooldown_hours=(value) ⇒ Object

Sets the matchupCooldownHours property value. The matchupCooldownHours property

Parameters:

  • value

    Value to set for the matchupCooldownHours property.

Returns:

  • a void



276
277
278
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 276

def matchup_cooldown_hours=(value)
    @matchup_cooldown_hours = value
end

#scrimmage_awards_pointsObject

Gets the scrimmageAwardsPoints property value. The scrimmageAwardsPoints property

Returns:

  • a boolean



283
284
285
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 283

def scrimmage_awards_points
    return @scrimmage_awards_points
end

#scrimmage_awards_points=(value) ⇒ Object

Sets the scrimmageAwardsPoints property value. The scrimmageAwardsPoints property

Parameters:

  • value

    Value to set for the scrimmageAwardsPoints property.

Returns:

  • a void



291
292
293
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 291

def scrimmage_awards_points=(value)
    @scrimmage_awards_points = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 299

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_boolean_value("allowNegative", @allow_negative)
    writer.write_object_value("baseDraw", @base_draw)
    writer.write_object_value("baseLoss", @base_loss)
    writer.write_object_value("baseWin", @base_win)
    writer.write_object_value("challengeCancelGracePeriodHours", @challenge_cancel_grace_period_hours)
    writer.write_object_value("challengeRefuseAdditionalPenalty", @challenge_refuse_additional_penalty)
    writer.write_object_value("challengedWinBonus", @challenged_win_bonus)
    writer.write_object_value("challengerWinBonus", @challenger_win_bonus)
    writer.write_object_value("forfeitPenalty", @forfeit_penalty)
    writer.write_string_value("gameId", @game_id)
    writer.write_object_value("matchupCooldownHours", @matchup_cooldown_hours)
    writer.write_boolean_value("scrimmageAwardsPoints", @scrimmage_awards_points)
    writer.write_boolean_value("streakBonusEnabled", @streak_bonus_enabled)
    writer.write_collection_of_object_values("streakBreakpoints", @streak_breakpoints)
    writer.write_enum_value("unitLabel", @unit_label)
    writer.write_additional_data(@additional_data)
end

#streak_bonus_enabledObject

Gets the streakBonusEnabled property value. The streakBonusEnabled property

Returns:

  • a boolean



322
323
324
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 322

def streak_bonus_enabled
    return @streak_bonus_enabled
end

#streak_bonus_enabled=(value) ⇒ Object

Sets the streakBonusEnabled property value. The streakBonusEnabled property

Parameters:

  • value

    Value to set for the streakBonusEnabled property.

Returns:

  • a void



330
331
332
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 330

def streak_bonus_enabled=(value)
    @streak_bonus_enabled = value
end

#streak_breakpointsObject

Gets the streakBreakpoints property value. The streakBreakpoints property

Returns:

  • a update_points_config_request_body_streak_breakpoints



337
338
339
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 337

def streak_breakpoints
    return @streak_breakpoints
end

#streak_breakpoints=(value) ⇒ Object

Sets the streakBreakpoints property value. The streakBreakpoints property

Parameters:

  • value

    Value to set for the streakBreakpoints property.

Returns:

  • a void



345
346
347
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 345

def streak_breakpoints=(value)
    @streak_breakpoints = value
end

#unit_labelObject

Gets the unitLabel property value. The unitLabel property

Returns:

  • a update_points_config_request_body_unit_label



352
353
354
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 352

def unit_label
    return @unit_label
end

#unit_label=(value) ⇒ Object

Sets the unitLabel property value. The unitLabel property

Parameters:

  • value

    Value to set for the unitLabel property.

Returns:

  • a void



360
361
362
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body.rb', line 360

def unit_label=(value)
    @unit_label = value
end