Class ConversionSourcesServiceClient
ConversionSourcesService client wrapper, for convenient use.
Namespace: Google.Shopping.Merchant.Conversions.V1Beta
Assembly: Google.Shopping.Merchant.Conversions.V1Beta.dll
Syntax
public abstract class ConversionSourcesServiceClient
Remarks
Service for managing conversion sources for a merchant account.
Properties
DefaultEndpoint
The default endpoint for the ConversionSourcesService 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 ConversionSourcesService scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<string> |
Remarks
The default ConversionSourcesService scopes are:
- https://www.googleapis.com/auth/content
GrpcClient
The underlying gRPC ConversionSourcesService client
Declaration
public virtual ConversionSourcesService.ConversionSourcesServiceClient GrpcClient { get; }
Property Value
Type | Description |
---|---|
ConversionSourcesService.ConversionSourcesServiceClient |
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 ConversionSourcesServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ConversionSourcesServiceClientBuilder.
Declaration
public static ConversionSourcesServiceClient Create()
Returns
Type | Description |
---|---|
ConversionSourcesServiceClient | The created ConversionSourcesServiceClient. |
CreateAsync(CancellationToken)
Asynchronously creates a ConversionSourcesServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ConversionSourcesServiceClientBuilder.
Declaration
public static Task<ConversionSourcesServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The CancellationToken to use while creating the client. |
Returns
Type | Description |
---|---|
Task<ConversionSourcesServiceClient> | The task representing the created ConversionSourcesServiceClient. |
CreateConversionSource(AccountName, ConversionSource, CallSettings)
Creates a new conversion source.
Declaration
public virtual ConversionSource CreateConversionSource(AccountName parent, ConversionSource conversionSource, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AccountName | parent | Required. The merchant account that will own the new conversion source. Format: accounts/{account} |
ConversionSource | conversionSource | Required. The conversion source description. A new ID will be automatically assigned to it upon creation. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
ConversionSource | The RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = ConversionSourcesServiceClient.Create();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
ConversionSource conversionSource = new ConversionSource();
// Make the request
ConversionSource response = conversionSourcesServiceClient.CreateConversionSource(parent, conversionSource);
CreateConversionSource(CreateConversionSourceRequest, CallSettings)
Creates a new conversion source.
Declaration
public virtual ConversionSource CreateConversionSource(CreateConversionSourceRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateConversionSourceRequest | 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 |
---|---|
ConversionSource | The RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = ConversionSourcesServiceClient.Create();
// Initialize request argument(s)
CreateConversionSourceRequest request = new CreateConversionSourceRequest
{
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
ConversionSource = new ConversionSource(),
};
// Make the request
ConversionSource response = conversionSourcesServiceClient.CreateConversionSource(request);
CreateConversionSource(string, ConversionSource, CallSettings)
Creates a new conversion source.
Declaration
public virtual ConversionSource CreateConversionSource(string parent, ConversionSource conversionSource, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The merchant account that will own the new conversion source. Format: accounts/{account} |
ConversionSource | conversionSource | Required. The conversion source description. A new ID will be automatically assigned to it upon creation. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
ConversionSource | The RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = ConversionSourcesServiceClient.Create();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
ConversionSource conversionSource = new ConversionSource();
// Make the request
ConversionSource response = conversionSourcesServiceClient.CreateConversionSource(parent, conversionSource);
CreateConversionSourceAsync(AccountName, ConversionSource, CallSettings)
Creates a new conversion source.
Declaration
public virtual Task<ConversionSource> CreateConversionSourceAsync(AccountName parent, ConversionSource conversionSource, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AccountName | parent | Required. The merchant account that will own the new conversion source. Format: accounts/{account} |
ConversionSource | conversionSource | Required. The conversion source description. A new ID will be automatically assigned to it upon creation. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<ConversionSource> | A Task containing the RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
ConversionSource conversionSource = new ConversionSource();
// Make the request
ConversionSource response = await conversionSourcesServiceClient.CreateConversionSourceAsync(parent, conversionSource);
CreateConversionSourceAsync(AccountName, ConversionSource, CancellationToken)
Creates a new conversion source.
Declaration
public virtual Task<ConversionSource> CreateConversionSourceAsync(AccountName parent, ConversionSource conversionSource, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
AccountName | parent | Required. The merchant account that will own the new conversion source. Format: accounts/{account} |
ConversionSource | conversionSource | Required. The conversion source description. A new ID will be automatically assigned to it upon creation. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<ConversionSource> | A Task containing the RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
ConversionSource conversionSource = new ConversionSource();
// Make the request
ConversionSource response = await conversionSourcesServiceClient.CreateConversionSourceAsync(parent, conversionSource);
CreateConversionSourceAsync(CreateConversionSourceRequest, CallSettings)
Creates a new conversion source.
Declaration
public virtual Task<ConversionSource> CreateConversionSourceAsync(CreateConversionSourceRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateConversionSourceRequest | 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<ConversionSource> | A Task containing the RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
CreateConversionSourceRequest request = new CreateConversionSourceRequest
{
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
ConversionSource = new ConversionSource(),
};
// Make the request
ConversionSource response = await conversionSourcesServiceClient.CreateConversionSourceAsync(request);
CreateConversionSourceAsync(CreateConversionSourceRequest, CancellationToken)
Creates a new conversion source.
Declaration
public virtual Task<ConversionSource> CreateConversionSourceAsync(CreateConversionSourceRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CreateConversionSourceRequest | 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<ConversionSource> | A Task containing the RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
CreateConversionSourceRequest request = new CreateConversionSourceRequest
{
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
ConversionSource = new ConversionSource(),
};
// Make the request
ConversionSource response = await conversionSourcesServiceClient.CreateConversionSourceAsync(request);
CreateConversionSourceAsync(string, ConversionSource, CallSettings)
Creates a new conversion source.
Declaration
public virtual Task<ConversionSource> CreateConversionSourceAsync(string parent, ConversionSource conversionSource, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The merchant account that will own the new conversion source. Format: accounts/{account} |
ConversionSource | conversionSource | Required. The conversion source description. A new ID will be automatically assigned to it upon creation. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<ConversionSource> | A Task containing the RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
ConversionSource conversionSource = new ConversionSource();
// Make the request
ConversionSource response = await conversionSourcesServiceClient.CreateConversionSourceAsync(parent, conversionSource);
CreateConversionSourceAsync(string, ConversionSource, CancellationToken)
Creates a new conversion source.
Declaration
public virtual Task<ConversionSource> CreateConversionSourceAsync(string parent, ConversionSource conversionSource, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The merchant account that will own the new conversion source. Format: accounts/{account} |
ConversionSource | conversionSource | Required. The conversion source description. A new ID will be automatically assigned to it upon creation. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<ConversionSource> | A Task containing the RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
ConversionSource conversionSource = new ConversionSource();
// Make the request
ConversionSource response = await conversionSourcesServiceClient.CreateConversionSourceAsync(parent, conversionSource);
DeleteConversionSource(ConversionSourceName, CallSettings)
Archives an existing conversion source. If the conversion source is a Merchant Center Destination, it will be recoverable for 30 days. If the conversion source is a Google Analytics Link, it will be deleted immediately and can be restored by creating a new one.
Declaration
public virtual void DeleteConversionSource(ConversionSourceName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ConversionSourceName | name | Required. The name of the conversion source to be deleted. Format: accounts/{account}/conversionSources/{conversion_source} |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = ConversionSourcesServiceClient.Create();
// Initialize request argument(s)
ConversionSourceName name = ConversionSourceName.FromAccountConversionSource("[ACCOUNT]", "[CONVERSION_SOURCE]");
// Make the request
conversionSourcesServiceClient.DeleteConversionSource(name);
DeleteConversionSource(DeleteConversionSourceRequest, CallSettings)
Archives an existing conversion source. If the conversion source is a Merchant Center Destination, it will be recoverable for 30 days. If the conversion source is a Google Analytics Link, it will be deleted immediately and can be restored by creating a new one.
Declaration
public virtual void DeleteConversionSource(DeleteConversionSourceRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeleteConversionSourceRequest | 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
ConversionSourcesServiceClient conversionSourcesServiceClient = ConversionSourcesServiceClient.Create();
// Initialize request argument(s)
DeleteConversionSourceRequest request = new DeleteConversionSourceRequest
{
ConversionSourceName = ConversionSourceName.FromAccountConversionSource("[ACCOUNT]", "[CONVERSION_SOURCE]"),
};
// Make the request
conversionSourcesServiceClient.DeleteConversionSource(request);
DeleteConversionSource(string, CallSettings)
Archives an existing conversion source. If the conversion source is a Merchant Center Destination, it will be recoverable for 30 days. If the conversion source is a Google Analytics Link, it will be deleted immediately and can be restored by creating a new one.
Declaration
public virtual void DeleteConversionSource(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the conversion source to be deleted. Format: accounts/{account}/conversionSources/{conversion_source} |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = ConversionSourcesServiceClient.Create();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/conversionSources/[CONVERSION_SOURCE]";
// Make the request
conversionSourcesServiceClient.DeleteConversionSource(name);
DeleteConversionSourceAsync(ConversionSourceName, CallSettings)
Archives an existing conversion source. If the conversion source is a Merchant Center Destination, it will be recoverable for 30 days. If the conversion source is a Google Analytics Link, it will be deleted immediately and can be restored by creating a new one.
Declaration
public virtual Task DeleteConversionSourceAsync(ConversionSourceName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ConversionSourceName | name | Required. The name of the conversion source to be deleted. Format: accounts/{account}/conversionSources/{conversion_source} |
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
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
ConversionSourceName name = ConversionSourceName.FromAccountConversionSource("[ACCOUNT]", "[CONVERSION_SOURCE]");
// Make the request
await conversionSourcesServiceClient.DeleteConversionSourceAsync(name);
DeleteConversionSourceAsync(ConversionSourceName, CancellationToken)
Archives an existing conversion source. If the conversion source is a Merchant Center Destination, it will be recoverable for 30 days. If the conversion source is a Google Analytics Link, it will be deleted immediately and can be restored by creating a new one.
Declaration
public virtual Task DeleteConversionSourceAsync(ConversionSourceName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ConversionSourceName | name | Required. The name of the conversion source to be deleted. Format: accounts/{account}/conversionSources/{conversion_source} |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
ConversionSourceName name = ConversionSourceName.FromAccountConversionSource("[ACCOUNT]", "[CONVERSION_SOURCE]");
// Make the request
await conversionSourcesServiceClient.DeleteConversionSourceAsync(name);
DeleteConversionSourceAsync(DeleteConversionSourceRequest, CallSettings)
Archives an existing conversion source. If the conversion source is a Merchant Center Destination, it will be recoverable for 30 days. If the conversion source is a Google Analytics Link, it will be deleted immediately and can be restored by creating a new one.
Declaration
public virtual Task DeleteConversionSourceAsync(DeleteConversionSourceRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeleteConversionSourceRequest | 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
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteConversionSourceRequest request = new DeleteConversionSourceRequest
{
ConversionSourceName = ConversionSourceName.FromAccountConversionSource("[ACCOUNT]", "[CONVERSION_SOURCE]"),
};
// Make the request
await conversionSourcesServiceClient.DeleteConversionSourceAsync(request);
DeleteConversionSourceAsync(DeleteConversionSourceRequest, CancellationToken)
Archives an existing conversion source. If the conversion source is a Merchant Center Destination, it will be recoverable for 30 days. If the conversion source is a Google Analytics Link, it will be deleted immediately and can be restored by creating a new one.
Declaration
public virtual Task DeleteConversionSourceAsync(DeleteConversionSourceRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DeleteConversionSourceRequest | 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
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteConversionSourceRequest request = new DeleteConversionSourceRequest
{
ConversionSourceName = ConversionSourceName.FromAccountConversionSource("[ACCOUNT]", "[CONVERSION_SOURCE]"),
};
// Make the request
await conversionSourcesServiceClient.DeleteConversionSourceAsync(request);
DeleteConversionSourceAsync(string, CallSettings)
Archives an existing conversion source. If the conversion source is a Merchant Center Destination, it will be recoverable for 30 days. If the conversion source is a Google Analytics Link, it will be deleted immediately and can be restored by creating a new one.
Declaration
public virtual Task DeleteConversionSourceAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the conversion source to be deleted. Format: accounts/{account}/conversionSources/{conversion_source} |
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
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/conversionSources/[CONVERSION_SOURCE]";
// Make the request
await conversionSourcesServiceClient.DeleteConversionSourceAsync(name);
DeleteConversionSourceAsync(string, CancellationToken)
Archives an existing conversion source. If the conversion source is a Merchant Center Destination, it will be recoverable for 30 days. If the conversion source is a Google Analytics Link, it will be deleted immediately and can be restored by creating a new one.
Declaration
public virtual Task DeleteConversionSourceAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the conversion source to be deleted. Format: accounts/{account}/conversionSources/{conversion_source} |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task | A Task containing the RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/conversionSources/[CONVERSION_SOURCE]";
// Make the request
await conversionSourcesServiceClient.DeleteConversionSourceAsync(name);
GetConversionSource(ConversionSourceName, CallSettings)
Fetches a conversion source.
Declaration
public virtual ConversionSource GetConversionSource(ConversionSourceName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ConversionSourceName | name | Required. The name of the conversion source to be fetched. Format: accounts/{account}/conversionsources/{conversion_source} |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
ConversionSource | The RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = ConversionSourcesServiceClient.Create();
// Initialize request argument(s)
ConversionSourceName name = ConversionSourceName.FromAccountConversionSource("[ACCOUNT]", "[CONVERSION_SOURCE]");
// Make the request
ConversionSource response = conversionSourcesServiceClient.GetConversionSource(name);
GetConversionSource(GetConversionSourceRequest, CallSettings)
Fetches a conversion source.
Declaration
public virtual ConversionSource GetConversionSource(GetConversionSourceRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetConversionSourceRequest | 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 |
---|---|
ConversionSource | The RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = ConversionSourcesServiceClient.Create();
// Initialize request argument(s)
GetConversionSourceRequest request = new GetConversionSourceRequest
{
ConversionSourceName = ConversionSourceName.FromAccountConversionSource("[ACCOUNT]", "[CONVERSION_SOURCE]"),
};
// Make the request
ConversionSource response = conversionSourcesServiceClient.GetConversionSource(request);
GetConversionSource(string, CallSettings)
Fetches a conversion source.
Declaration
public virtual ConversionSource GetConversionSource(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the conversion source to be fetched. Format: accounts/{account}/conversionsources/{conversion_source} |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
ConversionSource | The RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = ConversionSourcesServiceClient.Create();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/conversionSources/[CONVERSION_SOURCE]";
// Make the request
ConversionSource response = conversionSourcesServiceClient.GetConversionSource(name);
GetConversionSourceAsync(ConversionSourceName, CallSettings)
Fetches a conversion source.
Declaration
public virtual Task<ConversionSource> GetConversionSourceAsync(ConversionSourceName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ConversionSourceName | name | Required. The name of the conversion source to be fetched. Format: accounts/{account}/conversionsources/{conversion_source} |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<ConversionSource> | A Task containing the RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
ConversionSourceName name = ConversionSourceName.FromAccountConversionSource("[ACCOUNT]", "[CONVERSION_SOURCE]");
// Make the request
ConversionSource response = await conversionSourcesServiceClient.GetConversionSourceAsync(name);
GetConversionSourceAsync(ConversionSourceName, CancellationToken)
Fetches a conversion source.
Declaration
public virtual Task<ConversionSource> GetConversionSourceAsync(ConversionSourceName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ConversionSourceName | name | Required. The name of the conversion source to be fetched. Format: accounts/{account}/conversionsources/{conversion_source} |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<ConversionSource> | A Task containing the RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
ConversionSourceName name = ConversionSourceName.FromAccountConversionSource("[ACCOUNT]", "[CONVERSION_SOURCE]");
// Make the request
ConversionSource response = await conversionSourcesServiceClient.GetConversionSourceAsync(name);
GetConversionSourceAsync(GetConversionSourceRequest, CallSettings)
Fetches a conversion source.
Declaration
public virtual Task<ConversionSource> GetConversionSourceAsync(GetConversionSourceRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetConversionSourceRequest | 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<ConversionSource> | A Task containing the RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
GetConversionSourceRequest request = new GetConversionSourceRequest
{
ConversionSourceName = ConversionSourceName.FromAccountConversionSource("[ACCOUNT]", "[CONVERSION_SOURCE]"),
};
// Make the request
ConversionSource response = await conversionSourcesServiceClient.GetConversionSourceAsync(request);
GetConversionSourceAsync(GetConversionSourceRequest, CancellationToken)
Fetches a conversion source.
Declaration
public virtual Task<ConversionSource> GetConversionSourceAsync(GetConversionSourceRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
GetConversionSourceRequest | 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<ConversionSource> | A Task containing the RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
GetConversionSourceRequest request = new GetConversionSourceRequest
{
ConversionSourceName = ConversionSourceName.FromAccountConversionSource("[ACCOUNT]", "[CONVERSION_SOURCE]"),
};
// Make the request
ConversionSource response = await conversionSourcesServiceClient.GetConversionSourceAsync(request);
GetConversionSourceAsync(string, CallSettings)
Fetches a conversion source.
Declaration
public virtual Task<ConversionSource> GetConversionSourceAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the conversion source to be fetched. Format: accounts/{account}/conversionsources/{conversion_source} |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<ConversionSource> | A Task containing the RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/conversionSources/[CONVERSION_SOURCE]";
// Make the request
ConversionSource response = await conversionSourcesServiceClient.GetConversionSourceAsync(name);
GetConversionSourceAsync(string, CancellationToken)
Fetches a conversion source.
Declaration
public virtual Task<ConversionSource> GetConversionSourceAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the conversion source to be fetched. Format: accounts/{account}/conversionsources/{conversion_source} |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<ConversionSource> | A Task containing the RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]/conversionSources/[CONVERSION_SOURCE]";
// Make the request
ConversionSource response = await conversionSourcesServiceClient.GetConversionSourceAsync(name);
ListConversionSources(AccountName, string, int?, CallSettings)
Retrieves the list of conversion sources the caller has access to.
Declaration
public virtual PagedEnumerable<ListConversionSourcesResponse, ConversionSource> ListConversionSources(AccountName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AccountName | parent | Required. The merchant account who owns the collection of conversion sources. Format: accounts/{account} |
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<ListConversionSourcesResponse, ConversionSource> | A pageable sequence of ConversionSource resources. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = ConversionSourcesServiceClient.Create();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
PagedEnumerable<ListConversionSourcesResponse, ConversionSource> response = conversionSourcesServiceClient.ListConversionSources(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (ConversionSource 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 (ListConversionSourcesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ConversionSource 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<ConversionSource> 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 (ConversionSource 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;
ListConversionSources(ListConversionSourcesRequest, CallSettings)
Retrieves the list of conversion sources the caller has access to.
Declaration
public virtual PagedEnumerable<ListConversionSourcesResponse, ConversionSource> ListConversionSources(ListConversionSourcesRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListConversionSourcesRequest | 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<ListConversionSourcesResponse, ConversionSource> | A pageable sequence of ConversionSource resources. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = ConversionSourcesServiceClient.Create();
// Initialize request argument(s)
ListConversionSourcesRequest request = new ListConversionSourcesRequest
{
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
ShowDeleted = false,
};
// Make the request
PagedEnumerable<ListConversionSourcesResponse, ConversionSource> response = conversionSourcesServiceClient.ListConversionSources(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (ConversionSource 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 (ListConversionSourcesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ConversionSource 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<ConversionSource> 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 (ConversionSource 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;
ListConversionSources(string, string, int?, CallSettings)
Retrieves the list of conversion sources the caller has access to.
Declaration
public virtual PagedEnumerable<ListConversionSourcesResponse, ConversionSource> ListConversionSources(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The merchant account who owns the collection of conversion sources. Format: accounts/{account} |
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<ListConversionSourcesResponse, ConversionSource> | A pageable sequence of ConversionSource resources. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = ConversionSourcesServiceClient.Create();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
PagedEnumerable<ListConversionSourcesResponse, ConversionSource> response = conversionSourcesServiceClient.ListConversionSources(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (ConversionSource 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 (ListConversionSourcesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ConversionSource 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<ConversionSource> 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 (ConversionSource 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;
ListConversionSourcesAsync(AccountName, string, int?, CallSettings)
Retrieves the list of conversion sources the caller has access to.
Declaration
public virtual PagedAsyncEnumerable<ListConversionSourcesResponse, ConversionSource> ListConversionSourcesAsync(AccountName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AccountName | parent | Required. The merchant account who owns the collection of conversion sources. Format: accounts/{account} |
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<ListConversionSourcesResponse, ConversionSource> | A pageable asynchronous sequence of ConversionSource resources. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
PagedAsyncEnumerable<ListConversionSourcesResponse, ConversionSource> response = conversionSourcesServiceClient.ListConversionSourcesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ConversionSource 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((ListConversionSourcesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ConversionSource 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<ConversionSource> 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 (ConversionSource 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;
ListConversionSourcesAsync(ListConversionSourcesRequest, CallSettings)
Retrieves the list of conversion sources the caller has access to.
Declaration
public virtual PagedAsyncEnumerable<ListConversionSourcesResponse, ConversionSource> ListConversionSourcesAsync(ListConversionSourcesRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListConversionSourcesRequest | 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<ListConversionSourcesResponse, ConversionSource> | A pageable asynchronous sequence of ConversionSource resources. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
ListConversionSourcesRequest request = new ListConversionSourcesRequest
{
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
ShowDeleted = false,
};
// Make the request
PagedAsyncEnumerable<ListConversionSourcesResponse, ConversionSource> response = conversionSourcesServiceClient.ListConversionSourcesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ConversionSource 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((ListConversionSourcesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ConversionSource 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<ConversionSource> 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 (ConversionSource 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;
ListConversionSourcesAsync(string, string, int?, CallSettings)
Retrieves the list of conversion sources the caller has access to.
Declaration
public virtual PagedAsyncEnumerable<ListConversionSourcesResponse, ConversionSource> ListConversionSourcesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The merchant account who owns the collection of conversion sources. Format: accounts/{account} |
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<ListConversionSourcesResponse, ConversionSource> | A pageable asynchronous sequence of ConversionSource resources. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
PagedAsyncEnumerable<ListConversionSourcesResponse, ConversionSource> response = conversionSourcesServiceClient.ListConversionSourcesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ConversionSource 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((ListConversionSourcesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ConversionSource 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<ConversionSource> 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 (ConversionSource 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.
UndeleteConversionSource(UndeleteConversionSourceRequest, CallSettings)
Re-enables an archived conversion source. Only Available for Merchant Center Destination conversion sources.
Declaration
public virtual ConversionSource UndeleteConversionSource(UndeleteConversionSourceRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UndeleteConversionSourceRequest | 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 |
---|---|
ConversionSource | The RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = ConversionSourcesServiceClient.Create();
// Initialize request argument(s)
UndeleteConversionSourceRequest request = new UndeleteConversionSourceRequest
{
ConversionSourceName = ConversionSourceName.FromAccountConversionSource("[ACCOUNT]", "[CONVERSION_SOURCE]"),
};
// Make the request
ConversionSource response = conversionSourcesServiceClient.UndeleteConversionSource(request);
UndeleteConversionSourceAsync(UndeleteConversionSourceRequest, CallSettings)
Re-enables an archived conversion source. Only Available for Merchant Center Destination conversion sources.
Declaration
public virtual Task<ConversionSource> UndeleteConversionSourceAsync(UndeleteConversionSourceRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UndeleteConversionSourceRequest | 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<ConversionSource> | A Task containing the RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
UndeleteConversionSourceRequest request = new UndeleteConversionSourceRequest
{
ConversionSourceName = ConversionSourceName.FromAccountConversionSource("[ACCOUNT]", "[CONVERSION_SOURCE]"),
};
// Make the request
ConversionSource response = await conversionSourcesServiceClient.UndeleteConversionSourceAsync(request);
UndeleteConversionSourceAsync(UndeleteConversionSourceRequest, CancellationToken)
Re-enables an archived conversion source. Only Available for Merchant Center Destination conversion sources.
Declaration
public virtual Task<ConversionSource> UndeleteConversionSourceAsync(UndeleteConversionSourceRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
UndeleteConversionSourceRequest | 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<ConversionSource> | A Task containing the RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
UndeleteConversionSourceRequest request = new UndeleteConversionSourceRequest
{
ConversionSourceName = ConversionSourceName.FromAccountConversionSource("[ACCOUNT]", "[CONVERSION_SOURCE]"),
};
// Make the request
ConversionSource response = await conversionSourcesServiceClient.UndeleteConversionSourceAsync(request);
UpdateConversionSource(ConversionSource, FieldMask, CallSettings)
Updates information of an existing conversion source. Available only for Merchant Center Destination conversion sources.
Declaration
public virtual ConversionSource UpdateConversionSource(ConversionSource conversionSource, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ConversionSource | conversionSource | Required. The new version of the conversion source data. Format: accounts/{account}/conversionSources/{conversion_source} |
FieldMask | updateMask | Required. List of fields being updated. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
ConversionSource | The RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = ConversionSourcesServiceClient.Create();
// Initialize request argument(s)
ConversionSource conversionSource = new ConversionSource();
FieldMask updateMask = new FieldMask();
// Make the request
ConversionSource response = conversionSourcesServiceClient.UpdateConversionSource(conversionSource, updateMask);
UpdateConversionSource(UpdateConversionSourceRequest, CallSettings)
Updates information of an existing conversion source. Available only for Merchant Center Destination conversion sources.
Declaration
public virtual ConversionSource UpdateConversionSource(UpdateConversionSourceRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateConversionSourceRequest | 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 |
---|---|
ConversionSource | The RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = ConversionSourcesServiceClient.Create();
// Initialize request argument(s)
UpdateConversionSourceRequest request = new UpdateConversionSourceRequest
{
ConversionSource = new ConversionSource(),
UpdateMask = new FieldMask(),
};
// Make the request
ConversionSource response = conversionSourcesServiceClient.UpdateConversionSource(request);
UpdateConversionSourceAsync(ConversionSource, FieldMask, CallSettings)
Updates information of an existing conversion source. Available only for Merchant Center Destination conversion sources.
Declaration
public virtual Task<ConversionSource> UpdateConversionSourceAsync(ConversionSource conversionSource, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ConversionSource | conversionSource | Required. The new version of the conversion source data. Format: accounts/{account}/conversionSources/{conversion_source} |
FieldMask | updateMask | Required. List of fields being updated. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<ConversionSource> | A Task containing the RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
ConversionSource conversionSource = new ConversionSource();
FieldMask updateMask = new FieldMask();
// Make the request
ConversionSource response = await conversionSourcesServiceClient.UpdateConversionSourceAsync(conversionSource, updateMask);
UpdateConversionSourceAsync(ConversionSource, FieldMask, CancellationToken)
Updates information of an existing conversion source. Available only for Merchant Center Destination conversion sources.
Declaration
public virtual Task<ConversionSource> UpdateConversionSourceAsync(ConversionSource conversionSource, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ConversionSource | conversionSource | Required. The new version of the conversion source data. Format: accounts/{account}/conversionSources/{conversion_source} |
FieldMask | updateMask | Required. List of fields being updated. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<ConversionSource> | A Task containing the RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
ConversionSource conversionSource = new ConversionSource();
FieldMask updateMask = new FieldMask();
// Make the request
ConversionSource response = await conversionSourcesServiceClient.UpdateConversionSourceAsync(conversionSource, updateMask);
UpdateConversionSourceAsync(UpdateConversionSourceRequest, CallSettings)
Updates information of an existing conversion source. Available only for Merchant Center Destination conversion sources.
Declaration
public virtual Task<ConversionSource> UpdateConversionSourceAsync(UpdateConversionSourceRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateConversionSourceRequest | 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<ConversionSource> | A Task containing the RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateConversionSourceRequest request = new UpdateConversionSourceRequest
{
ConversionSource = new ConversionSource(),
UpdateMask = new FieldMask(),
};
// Make the request
ConversionSource response = await conversionSourcesServiceClient.UpdateConversionSourceAsync(request);
UpdateConversionSourceAsync(UpdateConversionSourceRequest, CancellationToken)
Updates information of an existing conversion source. Available only for Merchant Center Destination conversion sources.
Declaration
public virtual Task<ConversionSource> UpdateConversionSourceAsync(UpdateConversionSourceRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
UpdateConversionSourceRequest | 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<ConversionSource> | A Task containing the RPC response. |
Sample code
// Create client
ConversionSourcesServiceClient conversionSourcesServiceClient = await ConversionSourcesServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateConversionSourceRequest request = new UpdateConversionSourceRequest
{
ConversionSource = new ConversionSource(),
UpdateMask = new FieldMask(),
};
// Make the request
ConversionSource response = await conversionSourcesServiceClient.UpdateConversionSourceAsync(request);