# Google Shopping Merchant Order Tracking V1beta Client - Class OrderTrackingSignal (1.2.1)

1.2.1 (latest) 1.2.0 1.1.3 1.0.0 0.2.0 0.1.1

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Shopping Merchant Order Tracking V1beta Client class OrderTrackingSignal.

Represents a business trade from which signals are extracted, such as
shipping.

Generated from protobuf message `google.shopping.merchant.ordertracking.v1beta.OrderTrackingSignal`

## Namespace

Google \\ Shopping \\ Merchant \\ OrderTracking \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ order_tracking_signal_id` | `int|string` Output only. The ID that uniquely identifies this order tracking signal. |
| `↳ merchant_id` | `int|string` Optional. The Google Merchant Center ID of this order tracking signal. This value is optional. If left unset, the caller's Merchant Center ID is used. You must request access in order to provide data on behalf of another business. For more information, see [Submitting Order Tracking Signals](https://docs.cloud.google.com/shopping-content/guides/order-tracking-signals). |
| `↳ order_created_time` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.DateTime.html` Required. The time when the order was created on the businesses side. Include the year and timezone string, if available. |
| `↳ order_id` | `string` Required. The ID of the order on the businesses side. This field will be hashed in returned OrderTrackingSignal creation response. |
| `↳ shipping_info` | `array<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-ordertracking/latest/V1beta.OrderTrackingSignal.ShippingInfo>` Required. The shipping information for the order. |
| `↳ line_items` | `array<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-ordertracking/latest/V1beta.OrderTrackingSignal.LineItemDetails>` Required. Information about line items in the order. |
| `↳ shipment_line_item_mapping` | `array<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-ordertracking/latest/V1beta.OrderTrackingSignal.ShipmentLineItemMapping>` Optional. The mapping of the line items to the shipment information. |
| `↳ customer_shipping_fee` | `https://docs.cloud.google.com/php/docs/reference/shopping-common-protos/latest/Type.Price.html` Optional. The shipping fee of the order; this value should be set to zero in the case of free shipping. |
| `↳ delivery_postal_code` | `string` Optional. The delivery postal code, as a continuous string without spaces or dashes, for example "95016". This field will be anonymized in returned OrderTrackingSignal creation response. |
| `↳ delivery_region_code` | `string` Optional. The [CLDR territory code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the shipping destination. |

### getOrderTrackingSignalId

Output only. The ID that uniquely identifies this order tracking signal.

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

### setOrderTrackingSignalId

Output only. The ID that uniquely identifies this order tracking signal.

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

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

### getMerchantId

Optional. The Google Merchant Center ID of this order tracking signal. This
value is optional. If left unset, the caller's Merchant Center ID is used.

You must request access in order to provide data on behalf of another
business. For more information, see [Submitting Order Tracking
Signals](https://docs.cloud.google.com/shopping-content/guides/order-tracking-signals).

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

### setMerchantId

Optional. The Google Merchant Center ID of this order tracking signal. This
value is optional. If left unset, the caller's Merchant Center ID is used.

You must request access in order to provide data on behalf of another
business. For more information, see [Submitting Order Tracking
Signals](https://docs.cloud.google.com/shopping-content/guides/order-tracking-signals).

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

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

### getOrderCreatedTime

Required. The time when the order was created on the businesses side.

Include the year and timezone string, if available.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.DateTime.html|null` |   |

### hasOrderCreatedTime

### clearOrderCreatedTime

### setOrderCreatedTime

Required. The time when the order was created on the businesses side.

Include the year and timezone string, if available.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.DateTime.html` |

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

### getOrderId

Required. The ID of the order on the businesses side. This field will be
hashed in returned OrderTrackingSignal creation response.

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

### setOrderId

Required. The ID of the order on the businesses side. This field will be
hashed in returned OrderTrackingSignal creation response.

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

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

### getShippingInfo

Required. The shipping information for the order.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-ordertracking/latest/V1beta.OrderTrackingSignal.ShippingInfo>` |   |

### setShippingInfo

Required. The shipping information for the order.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-ordertracking/latest/V1beta.OrderTrackingSignal.ShippingInfo>` |

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

### getLineItems

Required. Information about line items in the order.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-ordertracking/latest/V1beta.OrderTrackingSignal.LineItemDetails>` |   |

### setLineItems

Required. Information about line items in the order.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-ordertracking/latest/V1beta.OrderTrackingSignal.LineItemDetails>` |

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

### getShipmentLineItemMapping

Optional. The mapping of the line items to the shipment information.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-ordertracking/latest/V1beta.OrderTrackingSignal.ShipmentLineItemMapping>` |   |

### setShipmentLineItemMapping

Optional. The mapping of the line items to the shipment information.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/shopping-merchant-ordertracking/latest/V1beta.OrderTrackingSignal.ShipmentLineItemMapping>` |

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

### getCustomerShippingFee

Optional. The shipping fee of the order;
this value should be set to zero in the case of free shipping.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/shopping-common-protos/latest/Type.Price.html|null` |   |

### hasCustomerShippingFee

### clearCustomerShippingFee

### setCustomerShippingFee

Optional. The shipping fee of the order;
this value should be set to zero in the case of free shipping.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/shopping-common-protos/latest/Type.Price.html` |

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

### getDeliveryPostalCode

Optional. The delivery postal code, as a continuous string without spaces
or dashes, for example "95016". This field will be anonymized in returned
OrderTrackingSignal creation response.

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

### setDeliveryPostalCode

Optional. The delivery postal code, as a continuous string without spaces
or dashes, for example "95016". This field will be anonymized in returned
OrderTrackingSignal creation response.

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

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

### getDeliveryRegionCode

Optional. The [CLDR territory code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for
the shipping destination.

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

### setDeliveryRegionCode

Optional. The [CLDR territory code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for
the shipping destination.

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

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