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.



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

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)


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

def device_token
  @device_token
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



987
988
989
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 987

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