Class: Google::Apis::GamesV1::AchievementUnlockResponse

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 unlock 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) ⇒ AchievementUnlockResponse

Returns a new instance of AchievementUnlockResponse.



275
276
277
# File 'generated/google/apis/games_v1/classes.rb', line 275

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

Instance Attribute Details

#kindString

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

Returns:

  • (String)


266
267
268
# File 'generated/google/apis/games_v1/classes.rb', line 266

def kind
  @kind
end

#newly_unlockedBoolean Also known as: newly_unlocked?

Whether this achievement was newly unlocked (that is, whether the unlock request for the achievement was the first for the player). Corresponds to the JSON property newlyUnlocked

Returns:

  • (Boolean)


272
273
274
# File 'generated/google/apis/games_v1/classes.rb', line 272

def newly_unlocked
  @newly_unlocked
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



280
281
282
283
# File 'generated/google/apis/games_v1/classes.rb', line 280

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