Class NotificationsApiServiceClient
NotificationsApiService client wrapper, for convenient use.
Namespace: Google.Shopping.Merchant.Notifications.V1Beta
Assembly: Google.Shopping.Merchant.Notifications.V1Beta.dll
Syntax
public abstract class NotificationsApiServiceClient
Remarks
Service to manage notification subscriptions for merchants
Properties
DefaultEndpoint
The default endpoint for the NotificationsApiService service, which is a host of "merchantapi.googleapis.com" and a port of 443.
Declaration
public static string DefaultEndpoint { get; }
Property Value
Type | Description |
---|---|
string |
DefaultScopes
The default NotificationsApiService scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<string> |
Remarks
The default NotificationsApiService scopes are:
- https://www.googleapis.com/auth/content
GrpcClient
The underlying gRPC NotificationsApiService client
Declaration
public virtual NotificationsApiService.NotificationsApiServiceClient GrpcClient { get; }
Property Value
Type | Description |
---|---|
NotificationsApiService.NotificationsApiServiceClient |
ServiceMetadata
The service metadata associated with this client type.
Declaration
public static ServiceMetadata ServiceMetadata { get; }
Property Value
Type | Description |
---|---|
ServiceMetadata |
Methods
Create()
Synchronously creates a NotificationsApiServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use NotificationsApiServiceClientBuilder.
Declaration
public static NotificationsApiServiceClient Create()
Returns
Type | Description |
---|---|
NotificationsApiServiceClient | The created NotificationsApiServiceClient. |
CreateAsync(CancellationToken)
Asynchronously creates a NotificationsApiServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use NotificationsApiServiceClientBuilder.
Declaration
public static Task<NotificationsApiServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The CancellationToken to use while creating the client. |
Returns
Type | Description |
---|---|
Task<NotificationsApiServiceClient> | The task representing the created NotificationsApiServiceClient. |
CreateNotificationSubscription(AccountName, NotificationSubscription, CallSettings)
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):
- Subscription for all managed accounts + subscription for self
- Multiple "partial" subscriptions for managed accounts + subscription for self
we will not allow (per merchant as a subscriber per event type):
- multiple self subscriptions.
- multiple "all managed accounts" subscriptions.
- all and partial subscriptions at the same time.
- multiple partial subscriptions for the same target account
Declaration
public virtual NotificationSubscription CreateNotificationSubscription(AccountName parent, NotificationSubscription notificationSubscription, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AccountName | parent | Required. The merchant account that owns the new notification subscription.
Format: |
NotificationSubscription | notificationSubscription | Required. The notification subscription to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
NotificationSubscription | The RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = NotificationsApiServiceClient.Create();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
NotificationSubscription notificationSubscription = new NotificationSubscription();
// Make the request
NotificationSubscription response = notificationsApiServiceClient.CreateNotificationSubscription(parent, notificationSubscription);
CreateNotificationSubscription(CreateNotificationSubscriptionRequest, CallSettings)
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):
- Subscription for all managed accounts + subscription for self
- Multiple "partial" subscriptions for managed accounts + subscription for self
we will not allow (per merchant as a subscriber per event type):
- multiple self subscriptions.
- multiple "all managed accounts" subscriptions.
- all and partial subscriptions at the same time.
- multiple partial subscriptions for the same target account
Declaration
public virtual NotificationSubscription CreateNotificationSubscription(CreateNotificationSubscriptionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateNotificationSubscriptionRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
NotificationSubscription | The RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = NotificationsApiServiceClient.Create();
// Initialize request argument(s)
CreateNotificationSubscriptionRequest request = new CreateNotificationSubscriptionRequest
{
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
NotificationSubscription = new NotificationSubscription(),
};
// Make the request
NotificationSubscription response = notificationsApiServiceClient.CreateNotificationSubscription(request);
CreateNotificationSubscription(string, NotificationSubscription, CallSettings)
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):
- Subscription for all managed accounts + subscription for self
- Multiple "partial" subscriptions for managed accounts + subscription for self
we will not allow (per merchant as a subscriber per event type):
- multiple self subscriptions.
- multiple "all managed accounts" subscriptions.
- all and partial subscriptions at the same time.
- multiple partial subscriptions for the same target account
Declaration
public virtual NotificationSubscription CreateNotificationSubscription(string parent, NotificationSubscription notificationSubscription, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The merchant account that owns the new notification subscription.
Format: |
NotificationSubscription | notificationSubscription | Required. The notification subscription to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
NotificationSubscription | The RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = NotificationsApiServiceClient.Create();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
NotificationSubscription notificationSubscription = new NotificationSubscription();
// Make the request
NotificationSubscription response = notificationsApiServiceClient.CreateNotificationSubscription(parent, notificationSubscription);
CreateNotificationSubscriptionAsync(AccountName, NotificationSubscription, CallSettings)
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):
- Subscription for all managed accounts + subscription for self
- Multiple "partial" subscriptions for managed accounts + subscription for self
we will not allow (per merchant as a subscriber per event type):
- multiple self subscriptions.
- multiple "all managed accounts" subscriptions.
- all and partial subscriptions at the same time.
- multiple partial subscriptions for the same target account
Declaration
public virtual Task<NotificationSubscription> CreateNotificationSubscriptionAsync(AccountName parent, NotificationSubscription notificationSubscription, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AccountName | parent | Required. The merchant account that owns the new notification subscription.
Format: |
NotificationSubscription | notificationSubscription | Required. The notification subscription to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<NotificationSubscription> | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
NotificationSubscription notificationSubscription = new NotificationSubscription();
// Make the request
NotificationSubscription response = await notificationsApiServiceClient.CreateNotificationSubscriptionAsync(parent, notificationSubscription);
CreateNotificationSubscriptionAsync(AccountName, NotificationSubscription, CancellationToken)
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):
- Subscription for all managed accounts + subscription for self
- Multiple "partial" subscriptions for managed accounts + subscription for self
we will not allow (per merchant as a subscriber per event type):
- multiple self subscriptions.
- multiple "all managed accounts" subscriptions.
- all and partial subscriptions at the same time.
- multiple partial subscriptions for the same target account
Declaration
public virtual Task<NotificationSubscription> CreateNotificationSubscriptionAsync(AccountName parent, NotificationSubscription notificationSubscription, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
AccountName | parent | Required. The merchant account that owns the new notification subscription.
Format: |
NotificationSubscription | notificationSubscription | Required. The notification subscription to create. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<NotificationSubscription> | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
NotificationSubscription notificationSubscription = new NotificationSubscription();
// Make the request
NotificationSubscription response = await notificationsApiServiceClient.CreateNotificationSubscriptionAsync(parent, notificationSubscription);
CreateNotificationSubscriptionAsync(CreateNotificationSubscriptionRequest, CallSettings)
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):
- Subscription for all managed accounts + subscription for self
- Multiple "partial" subscriptions for managed accounts + subscription for self
we will not allow (per merchant as a subscriber per event type):
- multiple self subscriptions.
- multiple "all managed accounts" subscriptions.
- all and partial subscriptions at the same time.
- multiple partial subscriptions for the same target account
Declaration
public virtual Task<NotificationSubscription> CreateNotificationSubscriptionAsync(CreateNotificationSubscriptionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateNotificationSubscriptionRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<NotificationSubscription> | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
CreateNotificationSubscriptionRequest request = new CreateNotificationSubscriptionRequest
{
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
NotificationSubscription = new NotificationSubscription(),
};
// Make the request
NotificationSubscription response = await notificationsApiServiceClient.CreateNotificationSubscriptionAsync(request);
CreateNotificationSubscriptionAsync(CreateNotificationSubscriptionRequest, CancellationToken)
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):
- Subscription for all managed accounts + subscription for self
- Multiple "partial" subscriptions for managed accounts + subscription for self
we will not allow (per merchant as a subscriber per event type):
- multiple self subscriptions.
- multiple "all managed accounts" subscriptions.
- all and partial subscriptions at the same time.
- multiple partial subscriptions for the same target account
Declaration
public virtual Task<NotificationSubscription> CreateNotificationSubscriptionAsync(CreateNotificationSubscriptionRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CreateNotificationSubscriptionRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<NotificationSubscription> | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
CreateNotificationSubscriptionRequest request = new CreateNotificationSubscriptionRequest
{
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
NotificationSubscription = new NotificationSubscription(),
};
// Make the request
NotificationSubscription response = await notificationsApiServiceClient.CreateNotificationSubscriptionAsync(request);
CreateNotificationSubscriptionAsync(string, NotificationSubscription, CallSettings)
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):
- Subscription for all managed accounts + subscription for self
- Multiple "partial" subscriptions for managed accounts + subscription for self
we will not allow (per merchant as a subscriber per event type):
- multiple self subscriptions.
- multiple "all managed accounts" subscriptions.
- all and partial subscriptions at the same time.
- multiple partial subscriptions for the same target account
Declaration
public virtual Task<NotificationSubscription> CreateNotificationSubscriptionAsync(string parent, NotificationSubscription notificationSubscription, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The merchant account that owns the new notification subscription.
Format: |
NotificationSubscription | notificationSubscription | Required. The notification subscription to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<NotificationSubscription> | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
NotificationSubscription notificationSubscription = new NotificationSubscription();
// Make the request
NotificationSubscription response = await notificationsApiServiceClient.CreateNotificationSubscriptionAsync(parent, notificationSubscription);
CreateNotificationSubscriptionAsync(string, NotificationSubscription, CancellationToken)
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):
- Subscription for all managed accounts + subscription for self
- Multiple "partial" subscriptions for managed accounts + subscription for self
we will not allow (per merchant as a subscriber per event type):
- multiple self subscriptions.
- multiple "all managed accounts" subscriptions.
- all and partial subscriptions at the same time.
- multiple partial subscriptions for the same target account
Declaration
public virtual Task<NotificationSubscription> CreateNotificationSubscriptionAsync(string parent, NotificationSubscription notificationSubscription, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The merchant account that owns the new notification subscription.
Format: |
NotificationSubscription | notificationSubscription | Required. The notification subscription to create. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<NotificationSubscription> | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
NotificationSubscription notificationSubscription = new NotificationSubscription();
// Make the request
NotificationSubscription response = await notificationsApiServiceClient.CreateNotificationSubscriptionAsync(parent, notificationSubscription);
DeleteNotificationSubscription(DeleteNotificationSubscriptionRequest, CallSettings)
Deletes a notification subscription for a merchant.
Declaration
public virtual void DeleteNotificationSubscription(DeleteNotificationSubscriptionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeleteNotificationSubscriptionRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = NotificationsApiServiceClient.Create();
// Initialize request argument(s)
DeleteNotificationSubscriptionRequest request = new DeleteNotificationSubscriptionRequest
{
NotificationSubscriptionName = NotificationSubscriptionName.FromAccountNotificationSubscription("[ACCOUNT]", "[NOTIFICATION_SUBSCRIPTION]"),
};
// Make the request
notificationsApiServiceClient.DeleteNotificationSubscription(request);
DeleteNotificationSubscription(NotificationSubscriptionName, CallSettings)
Deletes a notification subscription for a merchant.
Declaration
public virtual void DeleteNotificationSubscription(NotificationSubscriptionName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
NotificationSubscriptionName | name | Required. The name of the notification subscription to be deleted. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = NotificationsApiServiceClient.Create();
// Initialize request argument(s)
NotificationSubscriptionName name = NotificationSubscriptionName.FromAccountNotificationSubscription("[ACCOUNT]", "[NOTIFICATION_SUBSCRIPTION]");
// Make the request
notificationsApiServiceClient.DeleteNotificationSubscription(name);
DeleteNotificationSubscription(string, CallSettings)
Deletes a notification subscription for a merchant.
Declaration
public virtual void DeleteNotificationSubscription(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the notification subscription to be deleted. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = NotificationsApiServiceClient.Create();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/notificationsubscriptions/[NOTIFICATION_SUBSCRIPTION]";
// Make the request
notificationsApiServiceClient.DeleteNotificationSubscription(name);
DeleteNotificationSubscriptionAsync(DeleteNotificationSubscriptionRequest, CallSettings)
Deletes a notification subscription for a merchant.
Declaration
public virtual Task DeleteNotificationSubscriptionAsync(DeleteNotificationSubscriptionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeleteNotificationSubscriptionRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteNotificationSubscriptionRequest request = new DeleteNotificationSubscriptionRequest
{
NotificationSubscriptionName = NotificationSubscriptionName.FromAccountNotificationSubscription("[ACCOUNT]", "[NOTIFICATION_SUBSCRIPTION]"),
};
// Make the request
await notificationsApiServiceClient.DeleteNotificationSubscriptionAsync(request);
DeleteNotificationSubscriptionAsync(DeleteNotificationSubscriptionRequest, CancellationToken)
Deletes a notification subscription for a merchant.
Declaration
public virtual Task DeleteNotificationSubscriptionAsync(DeleteNotificationSubscriptionRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DeleteNotificationSubscriptionRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteNotificationSubscriptionRequest request = new DeleteNotificationSubscriptionRequest
{
NotificationSubscriptionName = NotificationSubscriptionName.FromAccountNotificationSubscription("[ACCOUNT]", "[NOTIFICATION_SUBSCRIPTION]"),
};
// Make the request
await notificationsApiServiceClient.DeleteNotificationSubscriptionAsync(request);
DeleteNotificationSubscriptionAsync(NotificationSubscriptionName, CallSettings)
Deletes a notification subscription for a merchant.
Declaration
public virtual Task DeleteNotificationSubscriptionAsync(NotificationSubscriptionName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
NotificationSubscriptionName | name | Required. The name of the notification subscription to be deleted. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
NotificationSubscriptionName name = NotificationSubscriptionName.FromAccountNotificationSubscription("[ACCOUNT]", "[NOTIFICATION_SUBSCRIPTION]");
// Make the request
await notificationsApiServiceClient.DeleteNotificationSubscriptionAsync(name);
DeleteNotificationSubscriptionAsync(NotificationSubscriptionName, CancellationToken)
Deletes a notification subscription for a merchant.
Declaration
public virtual Task DeleteNotificationSubscriptionAsync(NotificationSubscriptionName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
NotificationSubscriptionName | name | Required. The name of the notification subscription to be deleted. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
NotificationSubscriptionName name = NotificationSubscriptionName.FromAccountNotificationSubscription("[ACCOUNT]", "[NOTIFICATION_SUBSCRIPTION]");
// Make the request
await notificationsApiServiceClient.DeleteNotificationSubscriptionAsync(name);
DeleteNotificationSubscriptionAsync(string, CallSettings)
Deletes a notification subscription for a merchant.
Declaration
public virtual Task DeleteNotificationSubscriptionAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the notification subscription to be deleted. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/notificationsubscriptions/[NOTIFICATION_SUBSCRIPTION]";
// Make the request
await notificationsApiServiceClient.DeleteNotificationSubscriptionAsync(name);
DeleteNotificationSubscriptionAsync(string, CancellationToken)
Deletes a notification subscription for a merchant.
Declaration
public virtual Task DeleteNotificationSubscriptionAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the notification subscription to be deleted. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/notificationsubscriptions/[NOTIFICATION_SUBSCRIPTION]";
// Make the request
await notificationsApiServiceClient.DeleteNotificationSubscriptionAsync(name);
GetNotificationSubscription(GetNotificationSubscriptionRequest, CallSettings)
Gets notification subscriptions for an account.
Declaration
public virtual NotificationSubscription GetNotificationSubscription(GetNotificationSubscriptionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetNotificationSubscriptionRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
NotificationSubscription | The RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = NotificationsApiServiceClient.Create();
// Initialize request argument(s)
GetNotificationSubscriptionRequest request = new GetNotificationSubscriptionRequest
{
NotificationSubscriptionName = NotificationSubscriptionName.FromAccountNotificationSubscription("[ACCOUNT]", "[NOTIFICATION_SUBSCRIPTION]"),
};
// Make the request
NotificationSubscription response = notificationsApiServiceClient.GetNotificationSubscription(request);
GetNotificationSubscription(NotificationSubscriptionName, CallSettings)
Gets notification subscriptions for an account.
Declaration
public virtual NotificationSubscription GetNotificationSubscription(NotificationSubscriptionName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
NotificationSubscriptionName | name | Required. The |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
NotificationSubscription | The RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = NotificationsApiServiceClient.Create();
// Initialize request argument(s)
NotificationSubscriptionName name = NotificationSubscriptionName.FromAccountNotificationSubscription("[ACCOUNT]", "[NOTIFICATION_SUBSCRIPTION]");
// Make the request
NotificationSubscription response = notificationsApiServiceClient.GetNotificationSubscription(name);
GetNotificationSubscription(string, CallSettings)
Gets notification subscriptions for an account.
Declaration
public virtual NotificationSubscription GetNotificationSubscription(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
NotificationSubscription | The RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = NotificationsApiServiceClient.Create();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/notificationsubscriptions/[NOTIFICATION_SUBSCRIPTION]";
// Make the request
NotificationSubscription response = notificationsApiServiceClient.GetNotificationSubscription(name);
GetNotificationSubscriptionAsync(GetNotificationSubscriptionRequest, CallSettings)
Gets notification subscriptions for an account.
Declaration
public virtual Task<NotificationSubscription> GetNotificationSubscriptionAsync(GetNotificationSubscriptionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetNotificationSubscriptionRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<NotificationSubscription> | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
GetNotificationSubscriptionRequest request = new GetNotificationSubscriptionRequest
{
NotificationSubscriptionName = NotificationSubscriptionName.FromAccountNotificationSubscription("[ACCOUNT]", "[NOTIFICATION_SUBSCRIPTION]"),
};
// Make the request
NotificationSubscription response = await notificationsApiServiceClient.GetNotificationSubscriptionAsync(request);
GetNotificationSubscriptionAsync(GetNotificationSubscriptionRequest, CancellationToken)
Gets notification subscriptions for an account.
Declaration
public virtual Task<NotificationSubscription> GetNotificationSubscriptionAsync(GetNotificationSubscriptionRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
GetNotificationSubscriptionRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<NotificationSubscription> | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
GetNotificationSubscriptionRequest request = new GetNotificationSubscriptionRequest
{
NotificationSubscriptionName = NotificationSubscriptionName.FromAccountNotificationSubscription("[ACCOUNT]", "[NOTIFICATION_SUBSCRIPTION]"),
};
// Make the request
NotificationSubscription response = await notificationsApiServiceClient.GetNotificationSubscriptionAsync(request);
GetNotificationSubscriptionAsync(NotificationSubscriptionName, CallSettings)
Gets notification subscriptions for an account.
Declaration
public virtual Task<NotificationSubscription> GetNotificationSubscriptionAsync(NotificationSubscriptionName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
NotificationSubscriptionName | name | Required. The |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<NotificationSubscription> | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
NotificationSubscriptionName name = NotificationSubscriptionName.FromAccountNotificationSubscription("[ACCOUNT]", "[NOTIFICATION_SUBSCRIPTION]");
// Make the request
NotificationSubscription response = await notificationsApiServiceClient.GetNotificationSubscriptionAsync(name);
GetNotificationSubscriptionAsync(NotificationSubscriptionName, CancellationToken)
Gets notification subscriptions for an account.
Declaration
public virtual Task<NotificationSubscription> GetNotificationSubscriptionAsync(NotificationSubscriptionName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
NotificationSubscriptionName | name | Required. The |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<NotificationSubscription> | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
NotificationSubscriptionName name = NotificationSubscriptionName.FromAccountNotificationSubscription("[ACCOUNT]", "[NOTIFICATION_SUBSCRIPTION]");
// Make the request
NotificationSubscription response = await notificationsApiServiceClient.GetNotificationSubscriptionAsync(name);
GetNotificationSubscriptionAsync(string, CallSettings)
Gets notification subscriptions for an account.
Declaration
public virtual Task<NotificationSubscription> GetNotificationSubscriptionAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<NotificationSubscription> | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/notificationsubscriptions/[NOTIFICATION_SUBSCRIPTION]";
// Make the request
NotificationSubscription response = await notificationsApiServiceClient.GetNotificationSubscriptionAsync(name);
GetNotificationSubscriptionAsync(string, CancellationToken)
Gets notification subscriptions for an account.
Declaration
public virtual Task<NotificationSubscription> GetNotificationSubscriptionAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<NotificationSubscription> | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/notificationsubscriptions/[NOTIFICATION_SUBSCRIPTION]";
// Make the request
NotificationSubscription response = await notificationsApiServiceClient.GetNotificationSubscriptionAsync(name);
ListNotificationSubscriptions(AccountName, string, int?, CallSettings)
Gets all the notification subscriptions for a merchant.
Declaration
public virtual PagedEnumerable<ListNotificationSubscriptionsResponse, NotificationSubscription> ListNotificationSubscriptions(AccountName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AccountName | parent | Required. The merchant account who owns the notification subscriptions.
Format: |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedEnumerable<ListNotificationSubscriptionsResponse, NotificationSubscription> | A pageable sequence of NotificationSubscription resources. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = NotificationsApiServiceClient.Create();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
PagedEnumerable<ListNotificationSubscriptionsResponse, NotificationSubscription> response = notificationsApiServiceClient.ListNotificationSubscriptions(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (NotificationSubscription item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNotificationSubscriptionsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (NotificationSubscription item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationSubscription> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationSubscription item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListNotificationSubscriptions(ListNotificationSubscriptionsRequest, CallSettings)
Gets all the notification subscriptions for a merchant.
Declaration
public virtual PagedEnumerable<ListNotificationSubscriptionsResponse, NotificationSubscription> ListNotificationSubscriptions(ListNotificationSubscriptionsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListNotificationSubscriptionsRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedEnumerable<ListNotificationSubscriptionsResponse, NotificationSubscription> | A pageable sequence of NotificationSubscription resources. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = NotificationsApiServiceClient.Create();
// Initialize request argument(s)
ListNotificationSubscriptionsRequest request = new ListNotificationSubscriptionsRequest
{
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
};
// Make the request
PagedEnumerable<ListNotificationSubscriptionsResponse, NotificationSubscription> response = notificationsApiServiceClient.ListNotificationSubscriptions(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (NotificationSubscription item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNotificationSubscriptionsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (NotificationSubscription item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationSubscription> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationSubscription item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListNotificationSubscriptions(string, string, int?, CallSettings)
Gets all the notification subscriptions for a merchant.
Declaration
public virtual PagedEnumerable<ListNotificationSubscriptionsResponse, NotificationSubscription> ListNotificationSubscriptions(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The merchant account who owns the notification subscriptions.
Format: |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedEnumerable<ListNotificationSubscriptionsResponse, NotificationSubscription> | A pageable sequence of NotificationSubscription resources. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = NotificationsApiServiceClient.Create();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
PagedEnumerable<ListNotificationSubscriptionsResponse, NotificationSubscription> response = notificationsApiServiceClient.ListNotificationSubscriptions(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (NotificationSubscription item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNotificationSubscriptionsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (NotificationSubscription item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationSubscription> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationSubscription item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListNotificationSubscriptionsAsync(AccountName, string, int?, CallSettings)
Gets all the notification subscriptions for a merchant.
Declaration
public virtual PagedAsyncEnumerable<ListNotificationSubscriptionsResponse, NotificationSubscription> ListNotificationSubscriptionsAsync(AccountName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AccountName | parent | Required. The merchant account who owns the notification subscriptions.
Format: |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedAsyncEnumerable<ListNotificationSubscriptionsResponse, NotificationSubscription> | A pageable asynchronous sequence of NotificationSubscription resources. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
PagedAsyncEnumerable<ListNotificationSubscriptionsResponse, NotificationSubscription> response = notificationsApiServiceClient.ListNotificationSubscriptionsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotificationSubscription item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNotificationSubscriptionsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (NotificationSubscription item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationSubscription> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationSubscription item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListNotificationSubscriptionsAsync(ListNotificationSubscriptionsRequest, CallSettings)
Gets all the notification subscriptions for a merchant.
Declaration
public virtual PagedAsyncEnumerable<ListNotificationSubscriptionsResponse, NotificationSubscription> ListNotificationSubscriptionsAsync(ListNotificationSubscriptionsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListNotificationSubscriptionsRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedAsyncEnumerable<ListNotificationSubscriptionsResponse, NotificationSubscription> | A pageable asynchronous sequence of NotificationSubscription resources. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
ListNotificationSubscriptionsRequest request = new ListNotificationSubscriptionsRequest
{
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
};
// Make the request
PagedAsyncEnumerable<ListNotificationSubscriptionsResponse, NotificationSubscription> response = notificationsApiServiceClient.ListNotificationSubscriptionsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotificationSubscription item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNotificationSubscriptionsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (NotificationSubscription item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationSubscription> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationSubscription item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListNotificationSubscriptionsAsync(string, string, int?, CallSettings)
Gets all the notification subscriptions for a merchant.
Declaration
public virtual PagedAsyncEnumerable<ListNotificationSubscriptionsResponse, NotificationSubscription> ListNotificationSubscriptionsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The merchant account who owns the notification subscriptions.
Format: |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedAsyncEnumerable<ListNotificationSubscriptionsResponse, NotificationSubscription> | A pageable asynchronous sequence of NotificationSubscription resources. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
PagedAsyncEnumerable<ListNotificationSubscriptionsResponse, NotificationSubscription> response = notificationsApiServiceClient.ListNotificationSubscriptionsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((NotificationSubscription item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNotificationSubscriptionsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (NotificationSubscription item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<NotificationSubscription> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (NotificationSubscription item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Declaration
public static Task ShutdownDefaultChannelsAsync()
Returns
Type | Description |
---|---|
Task | A task representing the asynchronous shutdown operation. |
Remarks
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
UpdateNotificationSubscription(NotificationSubscription, FieldMask, CallSettings)
Updates an existing notification subscription for a merchant.
Declaration
public virtual NotificationSubscription UpdateNotificationSubscription(NotificationSubscription notificationSubscription, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
NotificationSubscription | notificationSubscription | Required. The new version of the notification subscription that should be updated. |
FieldMask | updateMask | List of fields being updated. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
NotificationSubscription | The RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = NotificationsApiServiceClient.Create();
// Initialize request argument(s)
NotificationSubscription notificationSubscription = new NotificationSubscription();
FieldMask updateMask = new FieldMask();
// Make the request
NotificationSubscription response = notificationsApiServiceClient.UpdateNotificationSubscription(notificationSubscription, updateMask);
UpdateNotificationSubscription(UpdateNotificationSubscriptionRequest, CallSettings)
Updates an existing notification subscription for a merchant.
Declaration
public virtual NotificationSubscription UpdateNotificationSubscription(UpdateNotificationSubscriptionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateNotificationSubscriptionRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
NotificationSubscription | The RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = NotificationsApiServiceClient.Create();
// Initialize request argument(s)
UpdateNotificationSubscriptionRequest request = new UpdateNotificationSubscriptionRequest
{
NotificationSubscription = new NotificationSubscription(),
UpdateMask = new FieldMask(),
};
// Make the request
NotificationSubscription response = notificationsApiServiceClient.UpdateNotificationSubscription(request);
UpdateNotificationSubscriptionAsync(NotificationSubscription, FieldMask, CallSettings)
Updates an existing notification subscription for a merchant.
Declaration
public virtual Task<NotificationSubscription> UpdateNotificationSubscriptionAsync(NotificationSubscription notificationSubscription, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
NotificationSubscription | notificationSubscription | Required. The new version of the notification subscription that should be updated. |
FieldMask | updateMask | List of fields being updated. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<NotificationSubscription> | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
NotificationSubscription notificationSubscription = new NotificationSubscription();
FieldMask updateMask = new FieldMask();
// Make the request
NotificationSubscription response = await notificationsApiServiceClient.UpdateNotificationSubscriptionAsync(notificationSubscription, updateMask);
UpdateNotificationSubscriptionAsync(NotificationSubscription, FieldMask, CancellationToken)
Updates an existing notification subscription for a merchant.
Declaration
public virtual Task<NotificationSubscription> UpdateNotificationSubscriptionAsync(NotificationSubscription notificationSubscription, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
NotificationSubscription | notificationSubscription | Required. The new version of the notification subscription that should be updated. |
FieldMask | updateMask | List of fields being updated. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<NotificationSubscription> | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
NotificationSubscription notificationSubscription = new NotificationSubscription();
FieldMask updateMask = new FieldMask();
// Make the request
NotificationSubscription response = await notificationsApiServiceClient.UpdateNotificationSubscriptionAsync(notificationSubscription, updateMask);
UpdateNotificationSubscriptionAsync(UpdateNotificationSubscriptionRequest, CallSettings)
Updates an existing notification subscription for a merchant.
Declaration
public virtual Task<NotificationSubscription> UpdateNotificationSubscriptionAsync(UpdateNotificationSubscriptionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateNotificationSubscriptionRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<NotificationSubscription> | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateNotificationSubscriptionRequest request = new UpdateNotificationSubscriptionRequest
{
NotificationSubscription = new NotificationSubscription(),
UpdateMask = new FieldMask(),
};
// Make the request
NotificationSubscription response = await notificationsApiServiceClient.UpdateNotificationSubscriptionAsync(request);
UpdateNotificationSubscriptionAsync(UpdateNotificationSubscriptionRequest, CancellationToken)
Updates an existing notification subscription for a merchant.
Declaration
public virtual Task<NotificationSubscription> UpdateNotificationSubscriptionAsync(UpdateNotificationSubscriptionRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
UpdateNotificationSubscriptionRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<NotificationSubscription> | A Task containing the RPC response. |
Sample code
// Create client
NotificationsApiServiceClient notificationsApiServiceClient = await NotificationsApiServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateNotificationSubscriptionRequest request = new UpdateNotificationSubscriptionRequest
{
NotificationSubscription = new NotificationSubscription(),
UpdateMask = new FieldMask(),
};
// Make the request
NotificationSubscription response = await notificationsApiServiceClient.UpdateNotificationSubscriptionAsync(request);