Class: Google::Apis::WalletobjectsV1::DeviceContext

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

Overview

Device context associated with the object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DeviceContext

Returns a new instance of DeviceContext.



976
977
978
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 976

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

Instance Attribute Details

#device_tokenString

If set, redemption information will only be returned to the given device upon activation of the object. This should not be used as a stable identifier to trace a user's device. It can change across different passes for the same device or even across different activations for the same device. When setting this, callers must also set has_linked_device on the object being activated. Corresponds to the JSON property deviceToken

Returns:

  • (String)


974
975
976
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 974

def device_token
  @device_token
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



981
982
983
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 981

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