# Google Cloud Channel V1 Client - Class Offer (2.4.1)

2.4.1 (latest) 2.4.0 2.3.1 2.2.1 2.1.4 2.0.0 1.9.5 1.8.2 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.1 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Channel V1 Client class Offer.

Represents an offer made to resellers for purchase.

An offer is associated with a [Sku](https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Sku), has a plan
for payment, a price, and defines the constraints for buying.

Generated from protobuf message `google.cloud.channel.v1.Offer`

## Namespace

Google \\ Cloud \\ Channel \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Resource Name of the Offer. Format: accounts/{account_id}/offers/{offer_id} |
| `↳ marketing_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.MarketingInfo` Marketing information for the Offer. |
| `↳ sku` | `https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Sku` SKU the offer is associated with. |
| `↳ plan` | `https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Plan` Describes the payment plan for the Offer. |
| `↳ constraints` | `https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Constraints` Constraints on transacting the Offer. |
| `↳ price_by_resources` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.PriceByResource>` Price for each monetizable resource type. |
| `↳ start_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Start of the Offer validity time. |
| `↳ end_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. End of the Offer validity time. |
| `↳ parameter_definitions` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.ParameterDefinition>` Parameters required to use current Offer to purchase. |
| `↳ deal_code` | `string` The deal code of the offer to get a special promotion or discount. |

### getName

Resource Name of the Offer.

Format: accounts/{account_id}/offers/{offer_id}

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

### setName

Resource Name of the Offer.

Format: accounts/{account_id}/offers/{offer_id}

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

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

### getMarketingInfo

Marketing information for the Offer.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.MarketingInfo|null` |   |

### hasMarketingInfo

### clearMarketingInfo

### setMarketingInfo

Marketing information for the Offer.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.MarketingInfo` |

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

### getSku

SKU the offer is associated with.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Sku|null` |   |

### hasSku

### clearSku

### setSku

SKU the offer is associated with.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Sku` |

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

### getPlan

Describes the payment plan for the Offer.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Plan|null` |   |

### hasPlan

### clearPlan

### setPlan

Describes the payment plan for the Offer.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Plan` |

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

### getConstraints

Constraints on transacting the Offer.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Constraints|null` |   |

### hasConstraints

### clearConstraints

### setConstraints

Constraints on transacting the Offer.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Constraints` |

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

### getPriceByResources

Price for each monetizable resource type.

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

### setPriceByResources

Price for each monetizable resource type.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.PriceByResource>` |

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

### getStartTime

Start of the Offer validity time.

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

### hasStartTime

### clearStartTime

### setStartTime

Start of the Offer validity time.

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

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

### getEndTime

Output only. End of the Offer validity time.

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

### hasEndTime

### clearEndTime

### setEndTime

Output only. End of the Offer validity time.

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

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

### getParameterDefinitions

Parameters required to use current Offer to purchase.

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

### setParameterDefinitions

Parameters required to use current Offer to purchase.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.ParameterDefinition>` |

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

### getDealCode

The deal code of the offer to get a special promotion or discount.

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

### setDealCode

The deal code of the offer to get a special promotion or discount.

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

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