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.



6100
6101
6102
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6100

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



6092
6093
6094
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6092

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



6098
6099
6100
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6098

def upcoming_notification
  @upcoming_notification
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6105
6106
6107
6108
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 6105

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