# Cloud Commerce Consumer Procurement v1 API - Class ConsumerProcurementServiceClient (1.6.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.6.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient)
- [1.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/1.5.0/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/1.4.0/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/1.3.0/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/1.2.0/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/1.1.0/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/1.0.0/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient)

    public abstract class ConsumerProcurementServiceClient

Reference documentation and code samples for the Cloud Commerce Consumer Procurement v1 API class ConsumerProcurementServiceClient.

ConsumerProcurementService client wrapper, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ConsumerProcurementServiceClient

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

[ConsumerProcurementServiceClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClientImpl)

## Namespace

[Google.Cloud.Commerce.Consumer.Procurement.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1)

## Assembly

Google.Cloud.Commerce.Consumer.Procurement.V1.dll

## Remarks

ConsumerProcurementService allows customers to make purchases of products
served by the Cloud Commerce platform.

When purchases are made, the
\[ConsumerProcurementService\]\[google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService\]
programs the appropriate backends, including both Google's own
infrastructure, as well as third-party systems, and to enable billing setup
for charging for the procured item.

## Properties

### CancelOrderOperationsClient

    public virtual OperationsClient CancelOrderOperationsClient { get; }

The long-running operations client for `CancelOrder`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the ConsumerProcurementService service, which is a host of
"cloudcommerceconsumerprocurement.googleapis.com" and a port of 443.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default ConsumerProcurementService scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** The default ConsumerProcurementService scopes are:

- <https://www.googleapis.com/auth/cloud-platform>

<br />

### GrpcClient

    public virtual ConsumerProcurementService.ConsumerProcurementServiceClient GrpcClient { get; }

The underlying gRPC ConsumerProcurementService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementService.ConsumerProcurementServiceClient` |   |

### ModifyOrderOperationsClient

    public virtual OperationsClient ModifyOrderOperationsClient { get; }

The long-running operations client for `ModifyOrder`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### PlaceOrderOperationsClient

    public virtual OperationsClient PlaceOrderOperationsClient { get; }

The long-running operations client for `PlaceOrder`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata.html` |   |

## Methods

### CancelOrder(CancelOrderRequest, CallSettings)

    public virtual Operation<Order, CancelOrderMetadata> CancelOrder(CancelOrderRequest request, CallSettings callSettings = null)

Cancels an existing
\[Order\]\[google.cloud.commerce.consumer.procurement.v1.Order\]. Every product
procured in the Order will be cancelled.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Orderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderMetadata` | The RPC response. |

**Example**

    // Create client
    ConsumerProcurementServiceClient consumerProcurementServiceClient = ConsumerProcurementServiceClient.Create();
    // Initialize request argument(s)
    CancelOrderRequest request = new CancelOrderRequest
    {
        Name = "",
        Etag = "",
        CancellationPolicy = CancelOrderRequest.Types.CancellationPolicy.Unspecified,
    };
    // Make the request
    Operation<Order, CancelOrderMetadata> response = consumerProcurementServiceClient.CancelOrder(request);

    // Poll until the returned long-running operation is complete
    Operation<Order, CancelOrderMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Order result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Order, CancelOrderMetadata> retrievedResponse = consumerProcurementServiceClient.PollOnceCancelOrder(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Order retrievedResult = retrievedResponse.Result;
    }

### CancelOrderAsync(CancelOrderRequest, CallSettings)

    public virtual Task<Operation<Order, CancelOrderMetadata>> CancelOrderAsync(CancelOrderRequest request, CallSettings callSettings = null)

Cancels an existing
\[Order\]\[google.cloud.commerce.consumer.procurement.v1.Order\]. Every product
procured in the Order will be cancelled.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Orderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ConsumerProcurementServiceClient consumerProcurementServiceClient = await ConsumerProcurementServiceClient.CreateAsync();
    // Initialize request argument(s)
    CancelOrderRequest request = new CancelOrderRequest
    {
        Name = "",
        Etag = "",
        CancellationPolicy = CancelOrderRequest.Types.CancellationPolicy.Unspecified,
    };
    // Make the request
    Operation<Order, CancelOrderMetadata> response = await consumerProcurementServiceClient.CancelOrderAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Order, CancelOrderMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Order result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Order, CancelOrderMetadata> retrievedResponse = await consumerProcurementServiceClient.PollOnceCancelOrderAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Order retrievedResult = retrievedResponse.Result;
    }

### CancelOrderAsync(CancelOrderRequest, CancellationToken)

    public virtual Task<Operation<Order, CancelOrderMetadata>> CancelOrderAsync(CancelOrderRequest request, CancellationToken cancellationToken)

Cancels an existing
\[Order\]\[google.cloud.commerce.consumer.procurement.v1.Order\]. Every product
procured in the Order will be cancelled.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Orderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ConsumerProcurementServiceClient consumerProcurementServiceClient = await ConsumerProcurementServiceClient.CreateAsync();
    // Initialize request argument(s)
    CancelOrderRequest request = new CancelOrderRequest
    {
        Name = "",
        Etag = "",
        CancellationPolicy = CancelOrderRequest.Types.CancellationPolicy.Unspecified,
    };
    // Make the request
    Operation<Order, CancelOrderMetadata> response = await consumerProcurementServiceClient.CancelOrderAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Order, CancelOrderMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Order result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Order, CancelOrderMetadata> retrievedResponse = await consumerProcurementServiceClient.PollOnceCancelOrderAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Order retrievedResult = retrievedResponse.Result;
    }

### Create()

    public static ConsumerProcurementServiceClient Create()

Synchronously creates a [ConsumerProcurementServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient) using the default credentials,
endpoint and settings. To specify custom credentials or other settings, use
[ConsumerProcurementServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClientBuilder).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient` | The created [ConsumerProcurementServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient). |

### CreateAsync(CancellationToken)

    public static Task<ConsumerProcurementServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a [ConsumerProcurementServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient) using the default credentials,
endpoint and settings. To specify custom credentials or other settings, use
[ConsumerProcurementServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClientBuilder).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient` | The task representing the created [ConsumerProcurementServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient). |

### GetOrder(GetOrderRequest, CallSettings)

    public virtual Order GetOrder(GetOrderRequest request, CallSettings callSettings = null)

Returns the requested
\[Order\]\[google.cloud.commerce.consumer.procurement.v1.Order\] resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.GetOrderRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Order` | The RPC response. |

**Example**

    // Create client
    ConsumerProcurementServiceClient consumerProcurementServiceClient = ConsumerProcurementServiceClient.Create();
    // Initialize request argument(s)
    GetOrderRequest request = new GetOrderRequest { Name = "", };
    // Make the request
    Order response = consumerProcurementServiceClient.GetOrder(request);

### GetOrder(string, CallSettings)

    public virtual Order GetOrder(string name, CallSettings callSettings = null)

Returns the requested
\[Order\]\[google.cloud.commerce.consumer.procurement.v1.Order\] resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the order to retrieve. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Order` | The RPC response. |

**Example**

    // Create client
    ConsumerProcurementServiceClient consumerProcurementServiceClient = ConsumerProcurementServiceClient.Create();
    // Initialize request argument(s)
    string name = "";
    // Make the request
    Order response = consumerProcurementServiceClient.GetOrder(name);

### GetOrderAsync(GetOrderRequest, CallSettings)

    public virtual Task<Order> GetOrderAsync(GetOrderRequest request, CallSettings callSettings = null)

Returns the requested
\[Order\]\[google.cloud.commerce.consumer.procurement.v1.Order\] resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.GetOrderRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Order` | A Task containing the RPC response. |

**Example**

    // Create client
    ConsumerProcurementServiceClient consumerProcurementServiceClient = await ConsumerProcurementServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetOrderRequest request = new GetOrderRequest { Name = "", };
    // Make the request
    Order response = await consumerProcurementServiceClient.GetOrderAsync(request);

### GetOrderAsync(GetOrderRequest, CancellationToken)

    public virtual Task<Order> GetOrderAsync(GetOrderRequest request, CancellationToken cancellationToken)

Returns the requested
\[Order\]\[google.cloud.commerce.consumer.procurement.v1.Order\] resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.GetOrderRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Order` | A Task containing the RPC response. |

**Example**

    // Create client
    ConsumerProcurementServiceClient consumerProcurementServiceClient = await ConsumerProcurementServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetOrderRequest request = new GetOrderRequest { Name = "", };
    // Make the request
    Order response = await consumerProcurementServiceClient.GetOrderAsync(request);

### GetOrderAsync(string, CallSettings)

    public virtual Task<Order> GetOrderAsync(string name, CallSettings callSettings = null)

Returns the requested
\[Order\]\[google.cloud.commerce.consumer.procurement.v1.Order\] resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the order to retrieve. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Order` | A Task containing the RPC response. |

**Example**

    // Create client
    ConsumerProcurementServiceClient consumerProcurementServiceClient = await ConsumerProcurementServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "";
    // Make the request
    Order response = await consumerProcurementServiceClient.GetOrderAsync(name);

### GetOrderAsync(string, CancellationToken)

    public virtual Task<Order> GetOrderAsync(string name, CancellationToken cancellationToken)

Returns the requested
\[Order\]\[google.cloud.commerce.consumer.procurement.v1.Order\] resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The name of the order to retrieve. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Order` | A Task containing the RPC response. |

**Example**

    // Create client
    ConsumerProcurementServiceClient consumerProcurementServiceClient = await ConsumerProcurementServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "";
    // Make the request
    Order response = await consumerProcurementServiceClient.GetOrderAsync(name);

### ListOrders(ListOrdersRequest, CallSettings)

    public virtual PagedEnumerable<ListOrdersResponse, Order> ListOrders(ListOrdersRequest request, CallSettings callSettings = null)

Lists \[Order\]\[google.cloud.commerce.consumer.procurement.v1.Order\]
resources that the user has access to, within the scope of the parent
resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ListOrdersRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ListOrdersResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Order` | A pageable sequence of [Order](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Order) resources. |

**Example**

    // Create client
    ConsumerProcurementServiceClient consumerProcurementServiceClient = ConsumerProcurementServiceClient.Create();
    // Initialize request argument(s)
    ListOrdersRequest request = new ListOrdersRequest
    {
        Parent = "",
        Filter = "",
    };
    // Make the request
    PagedEnumerable<ListOrdersResponse, Order> response = consumerProcurementServiceClient.ListOrders(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Order 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 (ListOrdersResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Order 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<Order> 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 (Order 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;

### ListOrders(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListOrdersResponse, Order> ListOrders(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists \[Order\]\[google.cloud.commerce.consumer.procurement.v1.Order\]
resources that the user has access to, within the scope of the parent
resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource to query for orders. This field has the form `billingAccounts/{billing-account-id}`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ListOrdersResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Order` | A pageable sequence of [Order](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Order) resources. |

**Example**

    // Create client
    ConsumerProcurementServiceClient consumerProcurementServiceClient = ConsumerProcurementServiceClient.Create();
    // Initialize request argument(s)
    string parent = "";
    // Make the request
    PagedEnumerable<ListOrdersResponse, Order> response = consumerProcurementServiceClient.ListOrders(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Order 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 (ListOrdersResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Order 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<Order> 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 (Order 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;

### ListOrdersAsync(ListOrdersRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListOrdersResponse, Order> ListOrdersAsync(ListOrdersRequest request, CallSettings callSettings = null)

Lists \[Order\]\[google.cloud.commerce.consumer.procurement.v1.Order\]
resources that the user has access to, within the scope of the parent
resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ListOrdersRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ListOrdersResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Order` | A pageable asynchronous sequence of [Order](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Order) resources. |

**Example**

    // Create client
    ConsumerProcurementServiceClient consumerProcurementServiceClient = await ConsumerProcurementServiceClient.CreateAsync();
    // Initialize request argument(s)
    ListOrdersRequest request = new ListOrdersRequest
    {
        Parent = "",
        Filter = "",
    };
    // Make the request
    PagedAsyncEnumerable<ListOrdersResponse, Order> response = consumerProcurementServiceClient.ListOrdersAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((Order 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((ListOrdersResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Order 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<Order> 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 (Order 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;

### ListOrdersAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListOrdersResponse, Order> ListOrdersAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists \[Order\]\[google.cloud.commerce.consumer.procurement.v1.Order\]
resources that the user has access to, within the scope of the parent
resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource to query for orders. This field has the form `billingAccounts/{billing-account-id}`. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ListOrdersResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Order` | A pageable asynchronous sequence of [Order](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Order) resources. |

**Example**

    // Create client
    ConsumerProcurementServiceClient consumerProcurementServiceClient = await ConsumerProcurementServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "";
    // Make the request
    PagedAsyncEnumerable<ListOrdersResponse, Order> response = consumerProcurementServiceClient.ListOrdersAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((Order 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((ListOrdersResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Order 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<Order> 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 (Order 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;

### ModifyOrder(ModifyOrderRequest, CallSettings)

    public virtual Operation<Order, ModifyOrderMetadata> ModifyOrder(ModifyOrderRequest request, CallSettings callSettings = null)

Modifies an existing
\[Order\]\[google.cloud.commerce.consumer.procurement.v1.Order\] resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Orderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderMetadata` | The RPC response. |

**Example**

    // Create client
    ConsumerProcurementServiceClient consumerProcurementServiceClient = ConsumerProcurementServiceClient.Create();
    // Initialize request argument(s)
    ModifyOrderRequest request = new ModifyOrderRequest
    {
        Name = "",
        Etag = "",
        DisplayName = "",
        Modifications =
        {
            new ModifyOrderRequest.Types.Modification(),
        },
    };
    // Make the request
    Operation<Order, ModifyOrderMetadata> response = consumerProcurementServiceClient.ModifyOrder(request);

    // Poll until the returned long-running operation is complete
    Operation<Order, ModifyOrderMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Order result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Order, ModifyOrderMetadata> retrievedResponse = consumerProcurementServiceClient.PollOnceModifyOrder(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Order retrievedResult = retrievedResponse.Result;
    }

### ModifyOrderAsync(ModifyOrderRequest, CallSettings)

    public virtual Task<Operation<Order, ModifyOrderMetadata>> ModifyOrderAsync(ModifyOrderRequest request, CallSettings callSettings = null)

Modifies an existing
\[Order\]\[google.cloud.commerce.consumer.procurement.v1.Order\] resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Orderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ConsumerProcurementServiceClient consumerProcurementServiceClient = await ConsumerProcurementServiceClient.CreateAsync();
    // Initialize request argument(s)
    ModifyOrderRequest request = new ModifyOrderRequest
    {
        Name = "",
        Etag = "",
        DisplayName = "",
        Modifications =
        {
            new ModifyOrderRequest.Types.Modification(),
        },
    };
    // Make the request
    Operation<Order, ModifyOrderMetadata> response = await consumerProcurementServiceClient.ModifyOrderAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Order, ModifyOrderMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Order result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Order, ModifyOrderMetadata> retrievedResponse = await consumerProcurementServiceClient.PollOnceModifyOrderAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Order retrievedResult = retrievedResponse.Result;
    }

### ModifyOrderAsync(ModifyOrderRequest, CancellationToken)

    public virtual Task<Operation<Order, ModifyOrderMetadata>> ModifyOrderAsync(ModifyOrderRequest request, CancellationToken cancellationToken)

Modifies an existing
\[Order\]\[google.cloud.commerce.consumer.procurement.v1.Order\] resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Orderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ConsumerProcurementServiceClient consumerProcurementServiceClient = await ConsumerProcurementServiceClient.CreateAsync();
    // Initialize request argument(s)
    ModifyOrderRequest request = new ModifyOrderRequest
    {
        Name = "",
        Etag = "",
        DisplayName = "",
        Modifications =
        {
            new ModifyOrderRequest.Types.Modification(),
        },
    };
    // Make the request
    Operation<Order, ModifyOrderMetadata> response = await consumerProcurementServiceClient.ModifyOrderAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Order, ModifyOrderMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Order result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Order, ModifyOrderMetadata> retrievedResponse = await consumerProcurementServiceClient.PollOnceModifyOrderAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Order retrievedResult = retrievedResponse.Result;
    }

### PlaceOrder(PlaceOrderRequest, CallSettings)

    public virtual Operation<Order, PlaceOrderMetadata> PlaceOrder(PlaceOrderRequest request, CallSettings callSettings = null)

Creates a new \[Order\]\[google.cloud.commerce.consumer.procurement.v1.Order\].

This API only supports GCP spend-based committed use
discounts specified by GCP documentation.

The returned long-running operation is in-progress until the backend
completes the creation of the resource. Once completed, the order is
in
\[OrderState.ORDER_STATE_ACTIVE\]\[google.cloud.commerce.consumer.procurement.v1.OrderState.ORDER_STATE_ACTIVE\].
In case of failure, the order resource will be removed.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.PlaceOrderRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Orderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.PlaceOrderMetadata` | The RPC response. |

**Example**

    // Create client
    ConsumerProcurementServiceClient consumerProcurementServiceClient = ConsumerProcurementServiceClient.Create();
    // Initialize request argument(s)
    PlaceOrderRequest request = new PlaceOrderRequest
    {
        ParentAsBillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
        DisplayName = "",
        RequestId = "",
        LineItemInfo = { new LineItemInfo(), },
    };
    // Make the request
    Operation<Order, PlaceOrderMetadata> response = consumerProcurementServiceClient.PlaceOrder(request);

    // Poll until the returned long-running operation is complete
    Operation<Order, PlaceOrderMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Order result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Order, PlaceOrderMetadata> retrievedResponse = consumerProcurementServiceClient.PollOncePlaceOrder(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Order retrievedResult = retrievedResponse.Result;
    }

### PlaceOrderAsync(PlaceOrderRequest, CallSettings)

    public virtual Task<Operation<Order, PlaceOrderMetadata>> PlaceOrderAsync(PlaceOrderRequest request, CallSettings callSettings = null)

Creates a new \[Order\]\[google.cloud.commerce.consumer.procurement.v1.Order\].

This API only supports GCP spend-based committed use
discounts specified by GCP documentation.

The returned long-running operation is in-progress until the backend
completes the creation of the resource. Once completed, the order is
in
\[OrderState.ORDER_STATE_ACTIVE\]\[google.cloud.commerce.consumer.procurement.v1.OrderState.ORDER_STATE_ACTIVE\].
In case of failure, the order resource will be removed.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.PlaceOrderRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Orderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.PlaceOrderMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ConsumerProcurementServiceClient consumerProcurementServiceClient = await ConsumerProcurementServiceClient.CreateAsync();
    // Initialize request argument(s)
    PlaceOrderRequest request = new PlaceOrderRequest
    {
        ParentAsBillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
        DisplayName = "",
        RequestId = "",
        LineItemInfo = { new LineItemInfo(), },
    };
    // Make the request
    Operation<Order, PlaceOrderMetadata> response = await consumerProcurementServiceClient.PlaceOrderAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Order, PlaceOrderMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Order result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Order, PlaceOrderMetadata> retrievedResponse = await consumerProcurementServiceClient.PollOncePlaceOrderAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Order retrievedResult = retrievedResponse.Result;
    }

### PlaceOrderAsync(PlaceOrderRequest, CancellationToken)

    public virtual Task<Operation<Order, PlaceOrderMetadata>> PlaceOrderAsync(PlaceOrderRequest request, CancellationToken cancellationToken)

Creates a new \[Order\]\[google.cloud.commerce.consumer.procurement.v1.Order\].

This API only supports GCP spend-based committed use
discounts specified by GCP documentation.

The returned long-running operation is in-progress until the backend
completes the creation of the resource. Once completed, the order is
in
\[OrderState.ORDER_STATE_ACTIVE\]\[google.cloud.commerce.consumer.procurement.v1.OrderState.ORDER_STATE_ACTIVE\].
In case of failure, the order resource will be removed.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.PlaceOrderRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Orderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.PlaceOrderMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ConsumerProcurementServiceClient consumerProcurementServiceClient = await ConsumerProcurementServiceClient.CreateAsync();
    // Initialize request argument(s)
    PlaceOrderRequest request = new PlaceOrderRequest
    {
        ParentAsBillingAccountName = BillingAccountName.FromBillingAccount("[BILLING_ACCOUNT]"),
        DisplayName = "",
        RequestId = "",
        LineItemInfo = { new LineItemInfo(), },
    };
    // Make the request
    Operation<Order, PlaceOrderMetadata> response = await consumerProcurementServiceClient.PlaceOrderAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<Order, PlaceOrderMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Order result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<Order, PlaceOrderMetadata> retrievedResponse = await consumerProcurementServiceClient.PollOncePlaceOrderAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Order retrievedResult = retrievedResponse.Result;
    }

### PollOnceCancelOrder(string, CallSettings)

    public virtual Operation<Order, CancelOrderMetadata> PollOnceCancelOrder(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `CancelOrder`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Orderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderMetadata` | The result of polling the operation. |

### PollOnceCancelOrderAsync(string, CallSettings)

    public virtual Task<Operation<Order, CancelOrderMetadata>> PollOnceCancelOrderAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`CancelOrder`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Orderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.CancelOrderMetadata` | A task representing the result of polling the operation. |

### PollOnceModifyOrder(string, CallSettings)

    public virtual Operation<Order, ModifyOrderMetadata> PollOnceModifyOrder(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `ModifyOrder`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Orderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderMetadata` | The result of polling the operation. |

### PollOnceModifyOrderAsync(string, CallSettings)

    public virtual Task<Operation<Order, ModifyOrderMetadata>> PollOnceModifyOrderAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`ModifyOrder`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Orderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ModifyOrderMetadata` | A task representing the result of polling the operation. |

### PollOncePlaceOrder(string, CallSettings)

    public virtual Operation<Order, PlaceOrderMetadata> PollOncePlaceOrder(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `PlaceOrder`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Orderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.PlaceOrderMetadata` | The result of polling the operation. |

### PollOncePlaceOrderAsync(string, CallSettings)

    public virtual Task<Operation<Order, PlaceOrderMetadata>> PollOncePlaceOrderAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`PlaceOrder`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.Orderhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.PlaceOrderMetadata` | A task representing the result of polling the operation. |

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient#Google_Cloud_Commerce_Consumer_Procurement_V1_ConsumerProcurementServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient#Google_Cloud_Commerce_Consumer_Procurement_V1_ConsumerProcurementServiceClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient#Google_Cloud_Commerce_Consumer_Procurement_V1_ConsumerProcurementServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementServiceClient#Google_Cloud_Commerce_Consumer_Procurement_V1_ConsumerProcurementServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.