    import BidVariable from 'pvbid-sdk/src/domain/BidVariable.js'

public class | source

# BidVariable

#### Extends:

eventemitter3~EventEmitter → AdvanceEventEmitter → BidEntity → BidVariable

Bid Variable Class

## Constructor Summary

Public Constructor
public | constructor(bidVariableData: object, bid: Bid) Creates an instance of BidVariable. |

## Member Summary

Public Members
public | bid: Bid Reference to the bid that the bid variable belongs to. |
public get | config: object |
public get | isReserved: boolean |
public get | title: string |
public set | title: string |
public get | type: string Gets the bid entity type. |
public get | value: number | string | boolean |
public set | value: number | string | boolean |
public get | valueType: string |
public set | valueType: string |

## Method Summary

Public Methods
public | dependants(): BidEntity[] Gets an array of dependant bid entities that rely on the Bid Variable. |
public | dirty() Flags the bid variable and corresponding bid as dirty and to be saved. |

## Inherited Summary

From class AdvanceEventEmitter
public | maxEvents: number Maximum number of events fired for the requester before events stop. |
public | on(eventName: string, requesterId: string, callback: function) |
public | onDelay(eventName: string, ms: number, requesterId: string, callback: function) |
public | removeListenerByRequester(eventName: string, requesterId: string) Removes event listeners by event and requesterId. |

From class BidEntity
public get | id: number Gets the id of the bid entity. |
public get | title: string Gets the bid entity title. |
public set | title: string Sets the bid entity title. |
public get | type: string Gets the bid entity type. |
public abstract | assess(dependency: BidEntity) Assesses bid entity. |
public | dependants(): BidEntity[] Gets an array of depndants that rely on the bid entity. |
public | dependencies(): BidEntity[] Gets all the dependencies that the bid entity relies on. |
public | dirty() Flags the bid entity as dirty and to be saved. |
public | exportData(): object Exports the internal data for the bid entity. |
public | hasNullDependency(field: string): boolean Determines if bid entity relies on a null or undefined dependency value |
public | isDirty(): boolean Determines of bid entity is dirty. |
public | pristine() Marks the bid entity as clean. |

## Public Constructors

### public constructor(bidVariableData: object, bid: Bid) source

Creates an instance of BidVariable.

#### Override:

BidEntity#constructor

#### Params:

Name | Type | Attribute | Description
bidVariableData | object |  |
bid | Bid |  |

## Public Members

### public bid: Bid source

Reference to the bid that the bid variable belongs to.

### public get config: object source

### public get isReserved: boolean source

### public get title: string source

Gets the bid entity title.

#### Override:

BidEntity#title

### public set title: string source

Gets the bid entity title.

#### Override:

BidEntity#title

### public get type: string source

Gets the bid entity type.

#### Override:

BidEntity#type

### public get value: number | string | boolean source

### public set value: number | string | boolean source

### public get valueType: string source

### public set valueType: string source

## Public Methods

### public dependants(): BidEntity[] source

Gets an array of dependant bid entities that rely on the Bid Variable.

#### Override:

BidEntity#dependants

#### Return:

BidEntity[]

### public dirty() source

Flags the bid variable and corresponding bid as dirty and to be saved.

#### Override:

BidEntity#dirty