Class: TeamBattlesSdk::Generated::Models::UpdatePointsConfigRequestBodyStreakBreakpoints

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new UpdatePointsConfigRequestBodyStreakBreakpoints and sets the default values.



53
54
55
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body_streak_breakpoints.rb', line 53

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_streak_breakpoints

Raises:

  • (StandardError)


76
77
78
79
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body_streak_breakpoints.rb', line 76

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return UpdatePointsConfigRequestBodyStreakBreakpoints.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



23
24
25
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body_streak_breakpoints.rb', line 23

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



31
32
33
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body_streak_breakpoints.rb', line 31

def additional_data=(value)
    @additional_data = value
end

#bonusObject

Gets the bonus property value. The bonus property

Returns:

  • a double



38
39
40
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body_streak_breakpoints.rb', line 38

def bonus
    return @bonus
end

#bonus=(value) ⇒ Object

Sets the bonus property value. The bonus property

Parameters:

  • value

    Value to set for the bonus property.

Returns:

  • a void



46
47
48
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body_streak_breakpoints.rb', line 46

def bonus=(value)
    @bonus = value
end

#countObject

Gets the count property value. The count property

Returns:

  • a double



60
61
62
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body_streak_breakpoints.rb', line 60

def count
    return @count
end

#count=(value) ⇒ Object

Sets the count property value. The count property

Parameters:

  • value

    Value to set for the count property.

Returns:

  • a void



68
69
70
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body_streak_breakpoints.rb', line 68

def count=(value)
    @count = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



84
85
86
87
88
89
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body_streak_breakpoints.rb', line 84

def get_field_deserializers()
    return {
        "bonus" => lambda {|n| @bonus = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "count" => lambda {|n| @count = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
    }
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


95
96
97
98
99
100
# File 'lib/teambattles_sdk/generated/models/update_points_config_request_body_streak_breakpoints.rb', line 95

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_object_value("bonus", @bonus)
    writer.write_object_value("count", @count)
    writer.write_additional_data(@additional_data)
end