Cloud Commerce Consumer Procurement v1 API - Class ConsumerProcurementService.ConsumerProcurementServiceClient (1.3.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 > ClientBase > ClientBaseConsumerProcurementServiceConsumerProcurementServiceClient > ConsumerProcurementService.ConsumerProcurementServiceClient

Namespace

Google.Cloud.Commerce.Consumer.Procurement.V1

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

CreateOperationsClient()

public virtual Operations.OperationsClient CreateOperationsClient()

Creates a new instance of Operations.OperationsClient 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 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 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 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 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.

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

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 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 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.