Class: Google::Apis::MerchantapiNotificationsV1beta::MerchantService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::MerchantapiNotificationsV1beta::MerchantService
- Defined in:
- lib/google/apis/merchantapi_notifications_v1beta/service.rb
Overview
Merchant API
Programmatically manage your Merchant Center Accounts.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://merchantapi.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#create_account_notificationsubscription(parent, notification_subscription_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiNotificationsV1beta::NotificationSubscription
Creates a notification subscription for a merchant.
-
#delete_account_notificationsubscription(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiNotificationsV1beta::Empty
Deletes a notification subscription for a merchant.
-
#get_account_notificationsubscription(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiNotificationsV1beta::NotificationSubscription
Gets notification subscriptions for an account.
-
#initialize ⇒ MerchantService
constructor
A new instance of MerchantService.
-
#list_account_notificationsubscriptions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiNotificationsV1beta::ListNotificationSubscriptionsResponse
Gets all the notification subscriptions for a merchant.
-
#patch_account_notificationsubscription(name, notification_subscription_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiNotificationsV1beta::NotificationSubscription
Updates an existing notification subscription for a merchant.
Constructor Details
#initialize ⇒ MerchantService
Returns a new instance of MerchantService.
47 48 49 50 51 52 |
# File 'lib/google/apis/merchantapi_notifications_v1beta/service.rb', line 47 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-merchantapi_notifications_v1beta', client_version: Google::Apis::MerchantapiNotificationsV1beta::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
40 41 42 |
# File 'lib/google/apis/merchantapi_notifications_v1beta/service.rb', line 40 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
45 46 47 |
# File 'lib/google/apis/merchantapi_notifications_v1beta/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#create_account_notificationsubscription(parent, notification_subscription_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiNotificationsV1beta::NotificationSubscription
Creates a notification subscription for a merchant. We will allow the following types of notification subscriptions to exist together (per merchant as a subscriber per event type): 1. Subscription for all managed accounts + subscription for self 2. Multiple "partial" subscriptions for managed accounts
- subscription for self we will not allow (per merchant as a subscriber per event type): 1. multiple self subscriptions. 2. multiple "all managed accounts" subscriptions. 3. all and partial subscriptions at the same time. 4. multiple partial subscriptions for the same target account
83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/google/apis/merchantapi_notifications_v1beta/service.rb', line 83 def create_account_notificationsubscription(parent, notification_subscription_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'notifications/v1beta/{+parent}/notificationsubscriptions', ) command.request_representation = Google::Apis::MerchantapiNotificationsV1beta::NotificationSubscription::Representation command.request_object = notification_subscription_object command.response_representation = Google::Apis::MerchantapiNotificationsV1beta::NotificationSubscription::Representation command.response_class = Google::Apis::MerchantapiNotificationsV1beta::NotificationSubscription command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_account_notificationsubscription(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiNotificationsV1beta::Empty
Deletes a notification subscription for a merchant.
115 116 117 118 119 120 121 122 123 |
# File 'lib/google/apis/merchantapi_notifications_v1beta/service.rb', line 115 def delete_account_notificationsubscription(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'notifications/v1beta/{+name}', ) command.response_representation = Google::Apis::MerchantapiNotificationsV1beta::Empty::Representation command.response_class = Google::Apis::MerchantapiNotificationsV1beta::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_account_notificationsubscription(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiNotificationsV1beta::NotificationSubscription
Gets notification subscriptions for an account.
145 146 147 148 149 150 151 152 153 |
# File 'lib/google/apis/merchantapi_notifications_v1beta/service.rb', line 145 def get_account_notificationsubscription(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'notifications/v1beta/{+name}', ) command.response_representation = Google::Apis::MerchantapiNotificationsV1beta::NotificationSubscription::Representation command.response_class = Google::Apis::MerchantapiNotificationsV1beta::NotificationSubscription command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_account_notificationsubscriptions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiNotificationsV1beta::ListNotificationSubscriptionsResponse
Gets all the notification subscriptions for a merchant.
183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/google/apis/merchantapi_notifications_v1beta/service.rb', line 183 def list_account_notificationsubscriptions(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'notifications/v1beta/{+parent}/notificationsubscriptions', ) command.response_representation = Google::Apis::MerchantapiNotificationsV1beta::ListNotificationSubscriptionsResponse::Representation command.response_class = Google::Apis::MerchantapiNotificationsV1beta::ListNotificationSubscriptionsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_account_notificationsubscription(name, notification_subscription_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MerchantapiNotificationsV1beta::NotificationSubscription
Updates an existing notification subscription for a merchant.
221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/google/apis/merchantapi_notifications_v1beta/service.rb', line 221 def patch_account_notificationsubscription(name, notification_subscription_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'notifications/v1beta/{+name}', ) command.request_representation = Google::Apis::MerchantapiNotificationsV1beta::NotificationSubscription::Representation command.request_object = notification_subscription_object command.response_representation = Google::Apis::MerchantapiNotificationsV1beta::NotificationSubscription::Representation command.response_class = Google::Apis::MerchantapiNotificationsV1beta::NotificationSubscription command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |