1.6.0 (latest) 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    public class ConsumerProcurementService.ConsumerProcurementServiceClient : ClientBase<ConsumerProcurementService.ConsumerProcurementServiceClient>

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

Client for ConsumerProcurementService

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [ClientBase](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.md.txt) \> [ClientBase](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase-1.md.txt)[ConsumerProcurementService](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementService.md.txt)[ConsumerProcurementServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Commerce.Consumer.Procurement.V1/latest/Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementService.ConsumerProcurementServiceClient.md.txt) \> ConsumerProcurementService.ConsumerProcurementServiceClient

## Inherited Members

[ClientBase\<ConsumerProcurementService.ConsumerProcurementServiceClient\>.WithHost(string)](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase-1.md.txt#Grpc_Core_ClientBase_1_WithHost_System_String_) [ClientBase.CallInvoker](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.md.txt#Grpc_Core_ClientBase_CallInvoker) [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)

## 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.md.txt)

## Assembly

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

## Constructors

### ConsumerProcurementServiceClient()

    protected ConsumerProcurementServiceClient()

Protected parameterless constructor to allow creation of test doubles.

### ConsumerProcurementServiceClient(CallInvoker)

    public ConsumerProcurementServiceClient(CallInvoker callInvoker)

Creates a new client for ConsumerProcurementService that uses a custom `CallInvoker`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `callInvoker` | `CallInvoker` The callInvoker to use to make remote calls. |

### ConsumerProcurementServiceClient(ChannelBase)

    public ConsumerProcurementServiceClient(ChannelBase channel)

Creates a new client for ConsumerProcurementService

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `channel` | `ChannelBase` The channel to use to make remote calls. |

### ConsumerProcurementServiceClient(ClientBaseConfiguration)

    protected ConsumerProcurementServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `configuration` | `ClientBaseClientBaseConfiguration` The client configuration. |

## Methods

### CancelOrder(CancelOrderRequest, CallOptions)

    public virtual Operation CancelOrder(CancelOrderRequest request, CallOptions options)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CancelOrderRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Operation` | The response received from the server. |

### CancelOrder(CancelOrderRequest, Metadata, DateTime?, CancellationToken)

    public virtual Operation CancelOrder(CancelOrderRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CancelOrderRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Operation` | The response received from the server. |

### CancelOrderAsync(CancelOrderRequest, CallOptions)

    public virtual AsyncUnaryCall<Operation> CancelOrderAsync(CancelOrderRequest request, CallOptions options)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CancelOrderRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallOperation` | The call object. |

### CancelOrderAsync(CancelOrderRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Operation> CancelOrderAsync(CancelOrderRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CancelOrderRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallOperation` | The call object. |

### CreateOperationsClient()

    public virtual Operations.OperationsClient CreateOperationsClient()

Creates a new instance of [Operations.OperationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operations.OperationsClient.md.txt) using the same call invoker as
this client.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationsOperationsClient` | A new Operations client for the same target as this client. |

### GetOrder(GetOrderRequest, CallOptions)

    public virtual Order GetOrder(GetOrderRequest request, CallOptions options)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetOrderRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Order` | The response received from the server. |

### GetOrder(GetOrderRequest, Metadata, DateTime?, CancellationToken)

    public virtual Order GetOrder(GetOrderRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetOrderRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Order` | The response received from the server. |

### GetOrderAsync(GetOrderRequest, CallOptions)

    public virtual AsyncUnaryCall<Order> GetOrderAsync(GetOrderRequest request, CallOptions options)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetOrderRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallOrder` | The call object. |

### GetOrderAsync(GetOrderRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Order> GetOrderAsync(GetOrderRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetOrderRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallOrder` | The call object. |

### ListOrders(ListOrdersRequest, CallOptions)

    public virtual ListOrdersResponse ListOrders(ListOrdersRequest request, CallOptions options)

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` | `ListOrdersRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ListOrdersResponse` | The response received from the server. |

### ListOrders(ListOrdersRequest, Metadata, DateTime?, CancellationToken)

    public virtual ListOrdersResponse ListOrders(ListOrdersRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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` | `ListOrdersRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ListOrdersResponse` | The response received from the server. |

### ListOrdersAsync(ListOrdersRequest, CallOptions)

    public virtual AsyncUnaryCall<ListOrdersResponse> ListOrdersAsync(ListOrdersRequest request, CallOptions options)

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` | `ListOrdersRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallListOrdersResponse` | The call object. |

### ListOrdersAsync(ListOrdersRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<ListOrdersResponse> ListOrdersAsync(ListOrdersRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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` | `ListOrdersRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallListOrdersResponse` | The call object. |

### ModifyOrder(ModifyOrderRequest, CallOptions)

    public virtual Operation ModifyOrder(ModifyOrderRequest request, CallOptions options)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ModifyOrderRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Operation` | The response received from the server. |

### ModifyOrder(ModifyOrderRequest, Metadata, DateTime?, CancellationToken)

    public virtual Operation ModifyOrder(ModifyOrderRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ModifyOrderRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Operation` | The response received from the server. |

### ModifyOrderAsync(ModifyOrderRequest, CallOptions)

    public virtual AsyncUnaryCall<Operation> ModifyOrderAsync(ModifyOrderRequest request, CallOptions options)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ModifyOrderRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallOperation` | The call object. |

### ModifyOrderAsync(ModifyOrderRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Operation> ModifyOrderAsync(ModifyOrderRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ModifyOrderRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallOperation` | The call object. |

### NewInstance(ClientBaseConfiguration)

    protected override ConsumerProcurementService.ConsumerProcurementServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given `ClientBaseConfiguration`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `configuration` | `ClientBaseClientBaseConfiguration` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ConsumerProcurementServiceConsumerProcurementServiceClient` |   |

**Overrides** Grpc.Core.ClientBase\<Google.Cloud.Commerce.Consumer.Procurement.V1.ConsumerProcurementService.ConsumerProcurementServiceClient\>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

### PlaceOrder(PlaceOrderRequest, CallOptions)

    public virtual Operation PlaceOrder(PlaceOrderRequest request, CallOptions options)

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` | `PlaceOrderRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Operation` | The response received from the server. |

### PlaceOrder(PlaceOrderRequest, Metadata, DateTime?, CancellationToken)

    public virtual Operation PlaceOrder(PlaceOrderRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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` | `PlaceOrderRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Operation` | The response received from the server. |

### PlaceOrderAsync(PlaceOrderRequest, CallOptions)

    public virtual AsyncUnaryCall<Operation> PlaceOrderAsync(PlaceOrderRequest request, CallOptions options)

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` | `PlaceOrderRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallOperation` | The call object. |

### PlaceOrderAsync(PlaceOrderRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Operation> PlaceOrderAsync(PlaceOrderRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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` | `PlaceOrderRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallOperation` | The call object. |