# TaxWithholdingFactory

Factory generates information for a Tax Withholding entity

## Hierarchy

* [Factory](https://developers.polymath.network/classic-sdk/classes/_entities_factories_factory_.factory)‹[TaxWithholding](https://developers.polymath.network/classic-sdk/classes/_entities_taxwithholding_.taxwithholding), [Params](https://developers.polymath.network/classic-sdk/interfaces/_entities_taxwithholding_.params), [UniqueIdentifiers](https://developers.polymath.network/classic-sdk/interfaces/_entities_taxwithholding_.uniqueidentifiers)›

  ↳ **TaxWithholdingFactory**

## Index

### Constructors

* [constructor](#constructor)

### Properties

* [Entity](#entity)
* [cache](#cache)
* [context](#context)

### Methods

* [create](#create)
* [fetch](#fetch)
* [refresh](#refresh)
* [update](#update)

## Constructors

### constructor

\+ **new TaxWithholdingFactory**(`context`: [Context](https://developers.polymath.network/classic-sdk/classes/_context_.context)): [*TaxWithholdingFactory*](https://developers.polymath.network/classic-sdk/classes/_entities_factories_taxwithholdingfactory_.taxwithholdingfactory)

*Overrides* [*Factory*](https://developers.polymath.network/classic-sdk/classes/_entities_factories_factory_.factory)*.*[*constructor*](https://developers.polymath.network/classic-sdk/_entities_factories_factory_.factory#constructor)

*Defined in* [*src/entities/factories/TaxWithholdingFactory.ts:71*](https://github.com/PolymathNetwork/polymath-sdk/blob/e8bbc1e/src/entities/factories/TaxWithholdingFactory.ts#L71)

Create an instance of the Tax Withholding Factory

**Parameters:**

| Name      | Type                                                                                 |
| --------- | ------------------------------------------------------------------------------------ |
| `context` | [Context](https://developers.polymath.network/classic-sdk/classes/_context_.context) |

**Returns:** [*TaxWithholdingFactory*](https://developers.polymath.network/classic-sdk/classes/_entities_factories_taxwithholdingfactory_.taxwithholdingfactory)

## Properties

### Entity

• **Entity**: [*EntityClass*](https://developers.polymath.network/classic-sdk/interfaces/_entities_factories_factory_.entityclass)*‹*[*Params*](https://developers.polymath.network/classic-sdk/interfaces/_entities_taxwithholding_.params)*,* [*UniqueIdentifiers*](https://developers.polymath.network/classic-sdk/interfaces/_entities_taxwithholding_.uniqueidentifiers)*›*

*Inherited from* [*Factory*](https://developers.polymath.network/classic-sdk/classes/_entities_factories_factory_.factory)*.*[*Entity*](https://developers.polymath.network/classic-sdk/_entities_factories_factory_.factory#entity)

*Defined in* [*src/entities/factories/Factory.ts:37*](https://github.com/PolymathNetwork/polymath-sdk/blob/e8bbc1e/src/entities/factories/Factory.ts#L37)

entity class that this Factory is in charge of generating and caching

### cache

• **cache**: *object*

*Inherited from* [*Factory*](https://developers.polymath.network/classic-sdk/classes/_entities_factories_factory_.factory)*.*[*cache*](https://developers.polymath.network/classic-sdk/_entities_factories_factory_.factory#cache)

*Defined in* [*src/entities/factories/Factory.ts:28*](https://github.com/PolymathNetwork/polymath-sdk/blob/e8bbc1e/src/entities/factories/Factory.ts#L28)

#### Type declaration:

* \[ **key**: *string*]: [TaxWithholding](https://developers.polymath.network/classic-sdk/classes/_entities_taxwithholding_.taxwithholding) | undefined

### context

• **context**: [*Context*](https://developers.polymath.network/classic-sdk/classes/_context_.context)

*Inherited from* [*Factory*](https://developers.polymath.network/classic-sdk/classes/_entities_factories_factory_.factory)*.*[*context*](https://developers.polymath.network/classic-sdk/_entities_factories_factory_.factory#context)

*Defined in* [*src/entities/factories/Factory.ts:32*](https://github.com/PolymathNetwork/polymath-sdk/blob/e8bbc1e/src/entities/factories/Factory.ts#L32)

## Methods

### create

▸ **create**(`uid`: string, `params`: [Params](https://developers.polymath.network/classic-sdk/interfaces/_entities_taxwithholding_.params)): *EntityType*

*Inherited from* [*Factory*](https://developers.polymath.network/classic-sdk/classes/_entities_factories_factory_.factory)*.*[*create*](https://developers.polymath.network/classic-sdk/_entities_factories_factory_.factory#create)

*Defined in* [*src/entities/factories/Factory.ts:87*](https://github.com/PolymathNetwork/polymath-sdk/blob/e8bbc1e/src/entities/factories/Factory.ts#L87)

Get an entity from the cache. Creates it if it isn't cached, updates it if it is

**Parameters:**

| Name     | Type                                                                                                  | Description                      |
| -------- | ----------------------------------------------------------------------------------------------------- | -------------------------------- |
| `uid`    | string                                                                                                | unique identifier for the entity |
| `params` | [Params](https://developers.polymath.network/classic-sdk/interfaces/_entities_taxwithholding_.params) | constructor data for the entity  |

**Returns:** *EntityType*

### fetch

▸ **fetch**(`uid`: string): *Promise‹EntityType›*

*Inherited from* [*Factory*](https://developers.polymath.network/classic-sdk/classes/_entities_factories_factory_.factory)*.*[*fetch*](https://developers.polymath.network/classic-sdk/_entities_factories_factory_.factory#fetch)

*Defined in* [*src/entities/factories/Factory.ts:57*](https://github.com/PolymathNetwork/polymath-sdk/blob/e8bbc1e/src/entities/factories/Factory.ts#L57)

Get an entity from the cache. Fetches the necessary data to create it if it isn't cached, refreshes it if it is

**Parameters:**

| Name  | Type   | Description                      |
| ----- | ------ | -------------------------------- |
| `uid` | string | unique identifier for the entity |

**Returns:** *Promise‹EntityType›*

### refresh

▸ **refresh**(`uid`: string): *Promise‹void›*

*Inherited from* [*Factory*](https://developers.polymath.network/classic-sdk/classes/_entities_factories_factory_.factory)*.*[*refresh*](https://developers.polymath.network/classic-sdk/_entities_factories_factory_.factory#refresh)

*Defined in* [*src/entities/factories/Factory.ts:108*](https://github.com/PolymathNetwork/polymath-sdk/blob/e8bbc1e/src/entities/factories/Factory.ts#L108)

Fetch the data for an entity and updates its properties

**Parameters:**

| Name  | Type   | Description                      |
| ----- | ------ | -------------------------------- |
| `uid` | string | unique identifier for the entity |

**Returns:** *Promise‹void›*

### update

▸ **update**(`uid`: string, `params`: Partial‹[Params](https://developers.polymath.network/classic-sdk/interfaces/_entities_taxwithholding_.params)›): *Promise‹void›*

*Inherited from* [*Factory*](https://developers.polymath.network/classic-sdk/classes/_entities_factories_factory_.factory)*.*[*update*](https://developers.polymath.network/classic-sdk/_entities_factories_factory_.factory#update)

*Defined in* [*src/entities/factories/Factory.ts:126*](https://github.com/PolymathNetwork/polymath-sdk/blob/e8bbc1e/src/entities/factories/Factory.ts#L126)

Update an entity's properties in place

**Parameters:**

| Name     | Type                                                                                                           | Description                       |
| -------- | -------------------------------------------------------------------------------------------------------------- | --------------------------------- |
| `uid`    | string                                                                                                         | unique identifier for the entity  |
| `params` | Partial‹[Params](https://developers.polymath.network/classic-sdk/interfaces/_entities_taxwithholding_.params)› | properties that should be updated |

**Returns:** *Promise‹void›*
