# Google Cloud Commerce Consumer Procurement V1 Client - Class CancelOrderRequest (1.3.3)

1.3.3 (latest) 1.3.2 1.2.2 1.1.3 1.0.0 0.2.5 0.1.1 Reference documentation and code samples for the Google Cloud Commerce Consumer Procurement V1 Client class CancelOrderRequest.

Request message for
[ConsumerProcurementService.CancelOrder](https://docs.cloud.google.com/php/docs/reference/cloud-commerce-consumer-procurement/latest/V1.Client.ConsumerProcurementServiceClient#_Google_Cloud_Commerce_Consumer_Procurement_V1_Client_ConsumerProcurementServiceClient__cancelOrder__).

Generated from protobuf message `google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest`

## Namespace

Google \\ Cloud \\ Commerce \\ Consumer \\ Procurement \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. The resource name of the order. |
| `↳ etag` | `string` Optional. The weak etag, which can be optionally populated, of the order that this cancel request is based on. Validation checking will only happen if the invoker supplies this field. |
| `↳ cancellation_policy` | `int` Optional. Cancellation policy of this request. |

### getName

Required. The resource name of the order.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

Required. The resource name of the order.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getEtag

Optional. The weak etag, which can be optionally populated, of the order
that this cancel request is based on. Validation checking will only happen
if the invoker supplies this field.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setEtag

Optional. The weak etag, which can be optionally populated, of the order
that this cancel request is based on. Validation checking will only happen
if the invoker supplies this field.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCancellationPolicy

Optional. Cancellation policy of this request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [CancellationPolicy](https://docs.cloud.google.com/php/docs/reference/cloud-commerce-consumer-procurement/latest/V1.CancelOrderRequest.CancellationPolicy). |

### setCancellationPolicy

Optional. Cancellation policy of this request.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [CancellationPolicy](https://docs.cloud.google.com/php/docs/reference/cloud-commerce-consumer-procurement/latest/V1.CancelOrderRequest.CancellationPolicy). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |