# WHMCS\Cart\Item\ItemInterface

`Interface`

## Methods

### getUuid

```php
public function getUuid(): string
```

Runtime unique id for cart item

**Returns** `string`

### setId

```php
public function setId(?string $id): self
```

Set type prefixed product identifier

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `string|null` | `$id` |  |


**Returns** `self`

### getId

```php
public function getId(): ?string
```

Get prefixed product identifier

**Returns** `string\|null`

### setName

```php
public function setName(string $name): self
```

Set description name

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `string` | `$name` |  |


**Returns** `self`

### getName

```php
public function getName(): string
```

Get description name

**Returns** `string`

### setBillingCycle

```php
public function setBillingCycle($billingCycle): self
```

Set billing cycle, such as free, onetime, monthly, quarterly, etc

**Returns** `self`

### getBillingCycle

```php
public function getBillingCycle(): string
```

Get billing cycle

**Returns** `string`

### setBillingPeriod

```php
public function setBillingPeriod(string $billingPeriod): self
```

Start date for items that renew

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `string` | `$billingPeriod` |  |


**Returns** `self`

### getBillingPeriod

```php
public function getBillingPeriod(): int
```

Get start date for items that renew

**Returns** `int`

### setQuantity

```php
public function setQuantity(int $qty): self
```

Set quantity for scaling quantity items

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `int` | `$qty` |  |


**Returns** `self`

### getQuantity

```php
public function getQuantity(): int
```

Get quantity for scaling quantity items

**Returns** `int`

### setAmount

```php
public function setAmount(Price $amount): self
```

Set initial cost amount

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `Price` | `$amount` |  |


**Returns** `self`

### getAmount

```php
public function getAmount(): Price
```

Get Initial cost amount

**Returns** `Price`

### setRecurringAmount

```php
public function setRecurringAmount(Price $recurring = null): self
```

Set recurring cost amount

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `Price|null` | `$recurring` |  |


**Returns** `self`

### getRecurringAmount

```php
public function getRecurringAmount(): ?Price
```

Get recurring cost amount

**Returns** `Price\|null`

### setTaxed

```php
public function setTaxed(bool $taxed): self
```

Set taxable status of item

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `bool` | `$taxed` |  |


**Returns** `self`

### isTaxed

```php
public function isTaxed(): bool
```

Is item taxable

**Returns** `bool`

### setInitialPeriod

```php
public function setInitialPeriod(string $period, string $cycle): self
```

Set initial period in days for prorated item

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `string` | `$period` |  |
| `string` | `$cycle` |  |


**Returns** `self`

### hasInitialPeriod

```php
public function hasInitialPeriod(): bool
```

If an initial period is defined (prorata)

**Returns** `bool`

### isRecurring

```php
public function isRecurring(): bool
```

If the item is a of a recurring cycle

**Returns** `bool`

### getType

```php
public function getType(): string
```

Item type such as Product, Addon, Domain or generic Item

**Returns** `string`

### getSetupAmount

```php
public function getSetupAmount(): Price
```

The setup amount

**Returns** `Price`

### setSetupAmount

```php
public function setSetupAmount(?Price $amount)
```

Set the setup amount

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `Price|null` | `$amount` |  |


### getRecurringBasePrice

```php
public function getRecurringBasePrice(): Price
```

The recurring base price without Tax or Setup fee

**Returns** `Price`

### setRecurringBasePrice

```php
public function setRecurringBasePrice(?Price $amount)
```

Set the base prince

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `Price|null` | `$amount` |  |


### getItemName

```php
public function getItemName(): string
```

Item's name without concatenated group's name

**Returns** `string`

### setItemName

```php
public function setItemName(string $name)
```

### getItemGroupName

```php
public function getItemGroupName(): string
```

Item's group name (without its name)

**Returns** `string`

### setItemGroupName

```php
public function setItemGroupName(string $groupName)
```

### getItemGroupId

```php
public function getItemGroupId(): int
```

### setItemGroupId

```php
public function setItemGroupId(int $groupId)
```

### getAmountExcludeTaxSetup

```php
public function getAmountExcludeTaxSetup(): Price
```

Initial cost without Tax and Setup fee

**Returns** `Price`

### setAmountExcludeTaxSetup

```php
public function setAmountExcludeTaxSetup(?Price $price)
```

### isFree

```php
public function isFree(): bool
```

If the cart item has free billing cycle

**Returns** `bool`