Class: Google::Apis::GamesV1::AchievementIncrementResponse

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/games_v1/classes.rb,
generated/google/apis/games_v1/representations.rb,
generated/google/apis/games_v1/representations.rb

Overview

This is a JSON template for an achievement increment response

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ AchievementIncrementResponse

Returns a new instance of AchievementIncrementResponse.


182
183
184
# File 'generated/google/apis/games_v1/classes.rb', line 182

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#current_stepsFixnum

The current steps recorded for this incremental achievement. Corresponds to the JSON property currentSteps

Returns:

  • (Fixnum)

167
168
169
# File 'generated/google/apis/games_v1/classes.rb', line 167

def current_steps
  @current_steps
end

#kindString

Uniquely identifies the type of this resource. Value is always the fixed string games#achievementIncrementResponse. Corresponds to the JSON property kind

Returns:

  • (String)

173
174
175
# File 'generated/google/apis/games_v1/classes.rb', line 173

def kind
  @kind
end

#newly_unlockedBoolean Also known as: newly_unlocked?

Whether the current steps for the achievement has reached the number of steps required to unlock. Corresponds to the JSON property newlyUnlocked

Returns:

  • (Boolean)

179
180
181
# File 'generated/google/apis/games_v1/classes.rb', line 179

def newly_unlocked
  @newly_unlocked
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


187
188
189
190
191
# File 'generated/google/apis/games_v1/classes.rb', line 187

def update!(**args)
  @current_steps = args[:current_steps] if args.key?(:current_steps)
  @kind = args[:kind] if args.key?(:kind)
  @newly_unlocked = args[:newly_unlocked] if args.key?(:newly_unlocked)
end