Class: Google::Apis::MerchantapiNotificationsV1beta::NotificationSubscription

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

Overview

Represents a notification subscription owned by a Merchant account. See Decode notifications for information on how to decode the notification payload and how to interpret its contents.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NotificationSubscription

Returns a new instance of NotificationSubscription.



106
107
108
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 106

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

Instance Attribute Details

#all_managed_accountsBoolean Also known as: all_managed_accounts?

If this value is true, the requesting account is notified of the specified event for all managed accounts (can be subaccounts or other linked accounts) including newly added accounts on a daily basis. Corresponds to the JSON property allManagedAccounts

Returns:

  • (Boolean)


79
80
81
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 79

def all_managed_accounts
  @all_managed_accounts
end

#call_back_uriString

URL to be used to push the notification to the merchant. Corresponds to the JSON property callBackUri

Returns:

  • (String)


85
86
87
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 85

def call_back_uri
  @call_back_uri
end

#nameString

Output only. The name of the notification configuration. Generated by the Content API upon creation of a new NotificationSubscription. The account represents the merchant ID of the merchant that owns the configuration. Format: accounts/account/notificationsubscriptions/notification_subscription` Corresponds to the JSON propertyname`

Returns:

  • (String)


93
94
95
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 93

def name
  @name
end

#registered_eventString

The event that the merchant wants to be notified about. Corresponds to the JSON property registeredEvent

Returns:

  • (String)


98
99
100
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 98

def registered_event
  @registered_event
end

#target_accountString

The name of the account you want to receive notifications for. Format: accounts/account` Corresponds to the JSON propertytargetAccount`

Returns:

  • (String)


104
105
106
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 104

def 
  @target_account
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



111
112
113
114
115
116
117
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 111

def update!(**args)
  @all_managed_accounts = args[:all_managed_accounts] if args.key?(:all_managed_accounts)
  @call_back_uri = args[:call_back_uri] if args.key?(:call_back_uri)
  @name = args[:name] if args.key?(:name)
  @registered_event = args[:registered_event] if args.key?(:registered_event)
  @target_account = args[:target_account] if args.key?(:target_account)
end