Class: Google::Apis::WalletobjectsV1::Notifications

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

Indicates if the object needs to have notification enabled. We support only one of ExpiryNotification/UpcomingNotification. expiryNotification takes precedence over upcomingNotification. In other words if expiryNotification is set, we ignore the upcomingNotification field.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Notifications

Returns a new instance of Notifications.



6226
6227
6228
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6226

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

Instance Attribute Details

#expiry_notificationGoogle::Apis::WalletobjectsV1::ExpiryNotification

Indicates that the issuer would like Google Wallet to send expiry notifications 2 days prior to the card expiration. Corresponds to the JSON property expiryNotification



6218
6219
6220
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6218

def expiry_notification
  @expiry_notification
end

#upcoming_notificationGoogle::Apis::WalletobjectsV1::UpcomingNotification

Indicates that the issuer would like Google Wallet to send an upcoming card validity notification 1 day before card becomes valid/usable. Corresponds to the JSON property upcomingNotification



6224
6225
6226
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6224

def upcoming_notification
  @upcoming_notification
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6231
6232
6233
6234
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6231

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