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

This is a JSON template for an achievement update 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) ⇒ UpdateAchievementResponse

Returns a new instance of UpdateAchievementResponse



430
431
432
# File 'generated/google/apis/games_v1/classes.rb', line 430

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)


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

def achievement_id
  @achievement_id
end

#current_stateString

The current state of the achievement. Possible values are:

  • "HIDDEN" - Achievement is hidden.
  • "REVEALED" - Achievement is revealed.
  • "UNLOCKED" - Achievement is unlocked. Corresponds to the JSON property currentState

Returns:

  • (String)


404
405
406
# File 'generated/google/apis/games_v1/classes.rb', line 404

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)


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

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)


415
416
417
# File 'generated/google/apis/games_v1/classes.rb', line 415

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)


421
422
423
# File 'generated/google/apis/games_v1/classes.rb', line 421

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)


427
428
429
# File 'generated/google/apis/games_v1/classes.rb', line 427

def update_occurred
  @update_occurred
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



435
436
437
438
439
440
441
442
# File 'generated/google/apis/games_v1/classes.rb', line 435

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