# Google Shopping Merchant Accounts V1beta Client - Class CarrierRate (1.4.1)

1.4.1 (latest) 1.4.0 1.3.1 1.2.2 1.1.0 1.0.0 0.10.0 0.9.1 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.3 0.2.0 0.1.0

> [!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 Accounts V1beta Client class CarrierRate.

A list of carrier rates that can be referred to by
`main_table` or `single_value`.

Generated from protobuf message `google.shopping.merchant.accounts.v1beta.CarrierRate`

## Namespace

Google \\ Shopping \\ Merchant \\ Accounts \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. Name of the carrier rate. Must be unique per rate group. |
| `↳ carrier` | `string` Required. Carrier service, such as `"UPS"` or `"Fedex"`. |
| `↳ carrier_service` | `string` Required. Carrier service, such as `"ground"` or `"2 days"`. |
| `↳ origin_postal_code` | `string` Required. Shipping origin for this carrier rate. |
| `↳ percentage_adjustment` | `string` Optional. Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example `"5.4"` increases the rate by 5.4%, `"-3"` decreases the rate by 3%. |
| `↳ flat_adjustment` | `https://docs.cloud.google.com/php/docs/reference/shopping-common-protos/latest/Type.Price.html` Optional. Additive shipping rate modifier. Can be negative. For example `{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate, `{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the rate. |

### getName

Required. Name of the carrier rate. Must be unique per rate group.

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

### hasName

### clearName

### setName

Required. Name of the carrier rate. Must be unique per rate group.

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

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

### getCarrier

Required. Carrier service, such as `"UPS"` or `"Fedex"`.

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

### hasCarrier

### clearCarrier

### setCarrier

Required. Carrier service, such as `"UPS"` or `"Fedex"`.

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

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

### getCarrierService

Required. Carrier service, such as `"ground"` or `"2 days"`.

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

### hasCarrierService

### clearCarrierService

### setCarrierService

Required. Carrier service, such as `"ground"` or `"2 days"`.

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

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

### getOriginPostalCode

Required. Shipping origin for this carrier rate.

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

### hasOriginPostalCode

### clearOriginPostalCode

### setOriginPostalCode

Required. Shipping origin for this carrier rate.

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

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

### getPercentageAdjustment

Optional. Multiplicative shipping rate modifier as a number in decimal
notation. Can be negative. For example `"5.4"` increases the rate by 5.4%,
`"-3"` decreases the rate by 3%.

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

### hasPercentageAdjustment

### clearPercentageAdjustment

### setPercentageAdjustment

Optional. Multiplicative shipping rate modifier as a number in decimal
notation. Can be negative. For example `"5.4"` increases the rate by 5.4%,
`"-3"` decreases the rate by 3%.

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

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

### getFlatAdjustment

Optional. Additive shipping rate modifier. Can be negative. For example
`{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate,
`{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the
rate.

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

### hasFlatAdjustment

### clearFlatAdjustment

### setFlatAdjustment

Optional. Additive shipping rate modifier. Can be negative. For example
`{ "amount_micros": 1, "currency_code" : "USD" }` adds $1 to the rate,
`{ "amount_micros": -3, "currency_code" : "USD" }` removes $3 from the
rate.

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

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