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

A single item within an order.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ line_item_id` | `string` Output only. Line item ID. |
| `↳ line_item_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-commerce-consumer-procurement/latest/V1.LineItemInfo` Output only. Current state and information of this item. It tells what, e.g. which offer, is currently effective. |
| `↳ pending_change` | `https://docs.cloud.google.com/php/docs/reference/cloud-commerce-consumer-procurement/latest/V1.LineItemChange` Output only. A change made on the item which is pending and not yet effective. Absence of this field indicates the line item is not undergoing a change. |
| `↳ change_history` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-commerce-consumer-procurement/latest/V1.LineItemChange>` Output only. Changes made on the item that are not pending anymore which might be because they already took effect, were reverted by the customer, or were rejected by the partner. No more operations are allowed on these changes. |

### getLineItemId

Output only. Line item ID.

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

### setLineItemId

Output only. Line item ID.

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

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

### getLineItemInfo

Output only. Current state and information of this item. It tells what,
e.g. which offer, is currently effective.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-commerce-consumer-procurement/latest/V1.LineItemInfo|null` |   |

### hasLineItemInfo

### clearLineItemInfo

### setLineItemInfo

Output only. Current state and information of this item. It tells what,
e.g. which offer, is currently effective.

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

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

### getPendingChange

Output only. A change made on the item which is pending and not yet
effective. Absence of this field indicates the line item is not undergoing
a change.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-commerce-consumer-procurement/latest/V1.LineItemChange|null` |   |

### hasPendingChange

### clearPendingChange

### setPendingChange

Output only. A change made on the item which is pending and not yet
effective. Absence of this field indicates the line item is not undergoing
a change.

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

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

### getChangeHistory

Output only. Changes made on the item that are not pending anymore which
might be because they already took effect, were reverted by the customer,
or were rejected by the partner. No more operations are allowed on these
changes.

| **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.LineItemChange>` |   |

### setChangeHistory

Output only. Changes made on the item that are not pending anymore which
might be because they already took effect, were reverted by the customer,
or were rejected by the partner. No more operations are allowed on these
changes.

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

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