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.



5798
5799
5800
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5798

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



5790
5791
5792
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5790

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



5796
5797
5798
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5796

def upcoming_notification
  @upcoming_notification
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5803
5804
5805
5806
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 5803

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