# Google Shopping Merchant Lfp V1beta Client - Class LfpSale (1.2.1)

1.2.1 (latest) 1.2.0 1.1.3 1.0.0 0.4.0 0.3.2 0.2.0 0.1.3

> [!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 Lfp V1beta Client class LfpSale.

A sale for the merchant.

Generated from protobuf message `google.shopping.merchant.lfp.v1beta.LfpSale`

## Namespace

Google \\ Shopping \\ Merchant \\ Lfp \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. Identifier. The name of the `LfpSale` resource. Format: `accounts/{account}/lfpSales/{sale}` |
| `↳ target_account` | `int|string` Required. The Merchant Center ID of the merchant to submit the sale for. |
| `↳ store_code` | `string` Required. The identifier of the merchant's store. Either a `storeCode` inserted through the API or the code of the store in the Business Profile. |
| `↳ offer_id` | `string` Required. A unique identifier for the product. If both inventories and sales are submitted for a merchant, this id should match for the same product. **Note**: if the merchant sells the same product new and used, they should have different IDs. |
| `↳ region_code` | `string` Required. The [CLDR territory code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) for the country where the product is sold. |
| `↳ content_language` | `string` Required. The two-letter ISO 639-1 language code for the item. |
| `↳ gtin` | `string` Required. The Global Trade Item Number of the sold product. |
| `↳ price` | `https://docs.cloud.google.com/php/docs/reference/shopping-common-protos/latest/Type.Price.html` Required. The unit price of the product. |
| `↳ quantity` | `int|string` Required. The relative change of the available quantity. Negative for items returned. |
| `↳ sale_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Required. The timestamp for the sale. |
| `↳ uid` | `string` Output only. System generated globally unique ID for the `LfpSale`. |
| `↳ feed_label` | `string` Optional. The [feed label](https://developers.google.com/shopping-content/guides/products/feed-labels) for the product. If this is not set, it will default to `regionCode`. |

### getName

Output only. Identifier. The name of the `LfpSale` resource.

Format:
`accounts/{account}/lfpSales/{sale}`

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

### setName

Output only. Identifier. The name of the `LfpSale` resource.

Format:
`accounts/{account}/lfpSales/{sale}`

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

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

### getTargetAccount

Required. The Merchant Center ID of the merchant to submit the sale for.

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

### setTargetAccount

Required. The Merchant Center ID of the merchant to submit the sale for.

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

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

### getStoreCode

Required. The identifier of the merchant's store. Either a `storeCode`
inserted through the API or the code of the store in the Business Profile.

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

### setStoreCode

Required. The identifier of the merchant's store. Either a `storeCode`
inserted through the API or the code of the store in the Business Profile.

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

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

### getOfferId

Required. A unique identifier for the product. If both inventories and
sales are submitted for a merchant, this id should match for the same
product.

**Note**: if the merchant sells the same product new and used, they should
have different IDs.

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

### setOfferId

Required. A unique identifier for the product. If both inventories and
sales are submitted for a merchant, this id should match for the same
product.

**Note**: if the merchant sells the same product new and used, they should
have different IDs.

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

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

### getRegionCode

Required. The [CLDR territory
code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml)
for the country where the product is sold.

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

### setRegionCode

Required. The [CLDR territory
code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml)
for the country where the product is sold.

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

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

### getContentLanguage

Required. The two-letter ISO 639-1 language code for the item.

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

### setContentLanguage

Required. The two-letter ISO 639-1 language code for the item.

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

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

### getGtin

Required. The Global Trade Item Number of the sold product.

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

### setGtin

Required. The Global Trade Item Number of the sold product.

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

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

### getPrice

Required. The unit price of the product.

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

### hasPrice

### clearPrice

### setPrice

Required. The unit price of the product.

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

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

### getQuantity

Required. The relative change of the available quantity. Negative for items
returned.

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

### setQuantity

Required. The relative change of the available quantity. Negative for items
returned.

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

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

### getSaleTime

Required. The timestamp for the sale.

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

### hasSaleTime

### clearSaleTime

### setSaleTime

Required. The timestamp for the sale.

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

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

### getUid

Output only. System generated globally unique ID for the `LfpSale`.

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

### hasUid

### clearUid

### setUid

Output only. System generated globally unique ID for the `LfpSale`.

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

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

### getFeedLabel

Optional. The [feed
label](https://developers.google.com/shopping-content/guides/products/feed-labels)
for the product. If this is not set, it will default to `regionCode`.

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

### hasFeedLabel

### clearFeedLabel

### setFeedLabel

Optional. The [feed
label](https://developers.google.com/shopping-content/guides/products/feed-labels)
for the product. If this is not set, it will default to `regionCode`.

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

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