Cloud Commerce Consumer Procurement v1 API - Class ConsumerProcurementServiceClientImpl (1.2.0)

public sealed class ConsumerProcurementServiceClientImpl : ConsumerProcurementServiceClient

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

ConsumerProcurementService client wrapper implementation, for convenient use.

Inheritance

object > ConsumerProcurementServiceClient > ConsumerProcurementServiceClientImpl

Namespace

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.

Constructors

ConsumerProcurementServiceClientImpl(ConsumerProcurementServiceClient, ConsumerProcurementServiceSettings, ILogger)

public ConsumerProcurementServiceClientImpl(ConsumerProcurementService.ConsumerProcurementServiceClient grpcClient, ConsumerProcurementServiceSettings settings, ILogger logger)

Constructs a client wrapper for the ConsumerProcurementService service, with the specified gRPC client and settings.

Parameters
Name Description
grpcClient ConsumerProcurementServiceConsumerProcurementServiceClient

The underlying gRPC client.

settings ConsumerProcurementServiceSettings

The base ConsumerProcurementServiceSettings used within this client.

logger ILogger

Optional ILogger to use within this client.

Properties

GrpcClient

public override ConsumerProcurementService.ConsumerProcurementServiceClient GrpcClient { get; }

The underlying gRPC ConsumerProcurementService client

Property Value
Type Description
ConsumerProcurementServiceConsumerProcurementServiceClient
Overrides

PlaceOrderOperationsClient

public override OperationsClient PlaceOrderOperationsClient { get; }

The long-running operations client for PlaceOrder.

Property Value
Type Description
OperationsClient
Overrides

Methods

GetOrder(GetOrderRequest, CallSettings)

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

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

Parameters
Name Description
request GetOrderRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Order

The RPC response.

Overrides

GetOrderAsync(GetOrderRequest, CallSettings)

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

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

Parameters
Name Description
request GetOrderRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOrder

A Task containing the RPC response.

Overrides

ListOrders(ListOrdersRequest, CallSettings)

public override 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 ListOrdersRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListOrdersResponseOrder

A pageable sequence of Order resources.

Overrides

ListOrdersAsync(ListOrdersRequest, CallSettings)

public override 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 ListOrdersRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListOrdersResponseOrder

A pageable asynchronous sequence of Order resources.

Overrides

PlaceOrder(PlaceOrderRequest, CallSettings)

public override 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 PlaceOrderRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationOrderPlaceOrderMetadata

The RPC response.

Overrides

PlaceOrderAsync(PlaceOrderRequest, CallSettings)

public override 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 PlaceOrderRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationOrderPlaceOrderMetadata

A Task containing the RPC response.

Overrides