Cloud Commerce Consumer Procurement v1 API - Class ConsumerProcurementService.ConsumerProcurementServiceClient (1.1.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
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

ConsumerProcurementServiceClient(ChannelBase)

public ConsumerProcurementServiceClient(ChannelBase channel)

Creates a new client for ConsumerProcurementService

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

ConsumerProcurementServiceClient(ClientBaseConfiguration)

protected ConsumerProcurementServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

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
TypeDescription
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
NameDescription
requestGetOrderRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetOrderRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestGetOrderRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetOrderRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestListOrdersRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestListOrdersRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestListOrdersRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestListOrdersRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallListOrdersResponse

The call object.

NewInstance(ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
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
NameDescription
requestPlaceOrderRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestPlaceOrderRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestPlaceOrderRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestPlaceOrderRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.