Class: Google::Apis::GamesV1::UpdateAchievementResponse

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

An updated achievement.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ UpdateAchievementResponse

Returns a new instance of UpdateAchievementResponse.



410
411
412
# File 'generated/google/apis/games_v1/classes.rb', line 410

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

Instance Attribute Details

#achievement_idString

The achievement this update is was applied to. Corresponds to the JSON property achievementId

Returns:

  • (String)


379
380
381
# File 'generated/google/apis/games_v1/classes.rb', line 379

def achievement_id
  @achievement_id
end

#current_stateString

The current state of the achievement. Corresponds to the JSON property currentState

Returns:

  • (String)


384
385
386
# File 'generated/google/apis/games_v1/classes.rb', line 384

def current_state
  @current_state
end

#current_stepsFixnum

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

Returns:

  • (Fixnum)


389
390
391
# File 'generated/google/apis/games_v1/classes.rb', line 389

def current_steps
  @current_steps
end

#kindString

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

Returns:

  • (String)


395
396
397
# File 'generated/google/apis/games_v1/classes.rb', line 395

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)


401
402
403
# File 'generated/google/apis/games_v1/classes.rb', line 401

def newly_unlocked
  @newly_unlocked
end

#update_occurredBoolean Also known as: update_occurred?

Whether the requested updates actually affected the achievement. Corresponds to the JSON property updateOccurred

Returns:

  • (Boolean)


407
408
409
# File 'generated/google/apis/games_v1/classes.rb', line 407

def update_occurred
  @update_occurred
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



415
416
417
418
419
420
421
422
# File 'generated/google/apis/games_v1/classes.rb', line 415

def update!(**args)
  @achievement_id = args[:achievement_id] if args.key?(:achievement_id)
  @current_state = args[:current_state] if args.key?(:current_state)
  @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)
  @update_occurred = args[:update_occurred] if args.key?(:update_occurred)
end