# Google Cloud Commerce Consumer Procurement V1 Client - Class Order (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 Order.

Represents a purchase made by a customer on Cloud Marketplace.

Creating an order makes sure that both the Google backend systems
as well as external service provider's systems (if needed) allow use of
purchased products and ensures the appropriate billing events occur.
An Order can be made against one Product with multiple add-ons (optional) or
one Quote which might reference multiple products.
Customers typically choose a price plan for each Product purchased when
they create an order and can change their plan later, if the product allows.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. The resource name of the order. Has the form `billingAccounts/{billing_account}/orders/{order}`. |
| `↳ display_name` | `string` Required. The user-specified name of the order. |
| `↳ line_items` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-commerce-consumer-procurement/latest/V1.LineItem>` Output only. The items being purchased. |
| `↳ cancelled_line_items` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-commerce-consumer-procurement/latest/V1.LineItem>` Output only. Line items that were cancelled. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The creation timestamp. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The last update timestamp. |
| `↳ etag` | `string` The weak etag of the order. |

### getName

Output only. The resource name of the order.

Has the form
`billingAccounts/{billing_account}/orders/{order}`.

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

### setName

Output only. The resource name of the order.

Has the form
`billingAccounts/{billing_account}/orders/{order}`.

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

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

### getDisplayName

Required. The user-specified name of the order.

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

### setDisplayName

Required. The user-specified name of the order.

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

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

### getLineItems

Output only. The items being purchased.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-commerce-consumer-procurement/latest/V1.LineItem>` |   |

### setLineItems

Output only. The items being purchased.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-commerce-consumer-procurement/latest/V1.LineItem>` |

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

### getCancelledLineItems

Output only. Line items that were cancelled.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-commerce-consumer-procurement/latest/V1.LineItem>` |   |

### setCancelledLineItems

Output only. Line items that were cancelled.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-commerce-consumer-procurement/latest/V1.LineItem>` |

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

### getCreateTime

Output only. The creation timestamp.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The creation timestamp.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getUpdateTime

Output only. The last update timestamp.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The last update timestamp.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getEtag

The weak etag of the order.

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

### setEtag

The weak etag of the order.

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

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