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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NotificationSubscription

Returns a new instance of NotificationSubscription.



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

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)


76
77
78
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 76

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)


82
83
84
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 82

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)


90
91
92
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 90

def name
  @name
end

#registered_eventString

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

Returns:

  • (String)


95
96
97
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 95

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)


101
102
103
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 101

def 
  @target_account
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



108
109
110
111
112
113
114
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 108

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