# api\_entities\_Subsidy.Subsidy

[@polymeshassociation/polymesh-sdk](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes) / [Modules](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/modules) / [api/entities/Subsidy](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/modules-1/api_entities_subsidy) / Subsidy

## Class: Subsidy

[api/entities/Subsidy](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/modules-1/api_entities_subsidy).Subsidy

Represents a Subsidy relationship on chain

### Hierarchy

* [`Entity`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_entity.entity)<[`UniqueIdentifiers`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/api_entities_subsidy.uniqueidentifiers), `HumanReadable`>

  ↳ **`Subsidy`**

### Table of contents

#### Properties

* [beneficiary](#beneficiary)
* [subsidizer](#subsidizer)
* [uuid](#uuid)

#### Methods

* [decreaseAllowance](#decreaseallowance)
* [exists](#exists)
* [getAllowance](#getallowance)
* [increaseAllowance](#increaseallowance)
* [isEqual](#isequal)
* [quit](#quit)
* [setAllowance](#setallowance)
* [toHuman](#tohuman)
* [generateUuid](#generateuuid)
* [unserialize](#unserialize)

### Properties

#### beneficiary

• **beneficiary**: [`Account`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_account.account)

Account whose transactions are being paid for

**Defined in**

[api/entities/Subsidy/index.ts:51](https://github.com/PolymathNetwork/polymesh-sdk/blob/31dfa0dc/src/api/entities/Subsidy/index.ts#L51)

***

#### subsidizer

• **subsidizer**: [`Account`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_account.account)

Account that is paying for the transactions

**Defined in**

[api/entities/Subsidy/index.ts:55](https://github.com/PolymathNetwork/polymesh-sdk/blob/31dfa0dc/src/api/entities/Subsidy/index.ts#L55)

***

#### uuid

• **uuid**: `string`

**Inherited from**

[Entity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_entity.entity).[uuid](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/api_entities_entity.entity#uuid)

**Defined in**

[api/entities/Entity.ts:46](https://github.com/PolymathNetwork/polymesh-sdk/blob/31dfa0dc/src/api/entities/Entity.ts#L46)

### Methods

#### decreaseAllowance

▸ **decreaseAllowance**(`args`, `opts?`): `Promise`<`TransactionQueue`<`void`, `void`, `unknown`\[]\[]>>

Decrease allowance for this Subsidy relationship

**`note`** Only the subsidizer is allowed to decrease the allowance

**`throws`** if the amount to decrease by is more than the existing allowance

**`note`** this method is of type [ProcedureMethod](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.proceduremethod), which means you can call [decreaseAllowance.checkAuthorization](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.proceduremethod#checkauthorization) on it to see whether the signing Account and Identity have the required roles and permissions to run it

**Parameters**

| Name    | Type                                                                                                                                                                                            |
| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `args`  | `Pick`<[`DecreaseAllowanceParams`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/api_procedures_modifyallowance.decreaseallowanceparams), `"allowance"`> |
| `opts?` | [`ProcedureOpts`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.procedureopts)                                                                     |

**Returns**

`Promise`<`TransactionQueue`<`void`, `void`, `unknown`\[]\[]>>

**Defined in**

[api/entities/Subsidy/index.ts:176](https://github.com/PolymathNetwork/polymesh-sdk/blob/31dfa0dc/src/api/entities/Subsidy/index.ts#L176)

***

#### exists

▸ **exists**(): `Promise`<`boolean`>

Determine whether this Subsidy relationship exists on chain

**Returns**

`Promise`<`boolean`>

**Overrides**

[Entity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_entity.entity).[exists](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/api_entities_entity.entity#exists)

**Defined in**

[api/entities/Subsidy/index.ts:183](https://github.com/PolymathNetwork/polymesh-sdk/blob/31dfa0dc/src/api/entities/Subsidy/index.ts#L183)

***

#### getAllowance

▸ **getAllowance**(): `Promise`<`BigNumber`>

Get amount of POLYX subsidized for this Subsidy relationship

**`throws`** if the Subsidy does not exist

**Returns**

`Promise`<`BigNumber`>

**Defined in**

[api/entities/Subsidy/index.ts:202](https://github.com/PolymathNetwork/polymesh-sdk/blob/31dfa0dc/src/api/entities/Subsidy/index.ts#L202)

***

#### increaseAllowance

▸ **increaseAllowance**(`args`, `opts?`): `Promise`<`TransactionQueue`<`void`, `void`, `unknown`\[]\[]>>

Increase allowance for this Subsidy relationship

**`note`** Only the subsidizer is allowed to increase the allowance

**`note`** this method is of type [ProcedureMethod](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.proceduremethod), which means you can call [increaseAllowance.checkAuthorization](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.proceduremethod#checkauthorization) on it to see whether the signing Account and Identity have the required roles and permissions to run it

**Parameters**

| Name    | Type                                                                                                                                                                                            |
| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `args`  | `Pick`<[`IncreaseAllowanceParams`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/api_procedures_modifyallowance.increaseallowanceparams), `"allowance"`> |
| `opts?` | [`ProcedureOpts`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.procedureopts)                                                                     |

**Returns**

`Promise`<`TransactionQueue`<`void`, `void`, `unknown`\[]\[]>>

**Defined in**

[api/entities/Subsidy/index.ts:162](https://github.com/PolymathNetwork/polymesh-sdk/blob/31dfa0dc/src/api/entities/Subsidy/index.ts#L162)

***

#### isEqual

▸ **isEqual**(`entity`): `boolean`

Determine whether this Entity is the same as another one

**Parameters**

| Name     | Type                                                                                                                                           |
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `entity` | [`Entity`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_entity.entity)<`unknown`, `unknown`> |

**Returns**

`boolean`

**Inherited from**

[Entity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_entity.entity).[isEqual](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/api_entities_entity.entity#isequal)

**Defined in**

[api/entities/Entity.ts:61](https://github.com/PolymathNetwork/polymesh-sdk/blob/31dfa0dc/src/api/entities/Entity.ts#L61)

***

#### quit

▸ **quit**(`opts?`): `Promise`<`TransactionQueue`<`void`, `void`, `unknown`\[]\[]>>

Terminate this Subsidy relationship. The beneficiary Account will be forced to pay for their own transactions

**`note`** both the beneficiary and the subsidizer are allowed to unilaterally quit the Subsidy

**`note`** this method is of type [NoArgsProcedureMethod](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.noargsproceduremethod), which means you can call [quit.checkAuthorization](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.noargsproceduremethod#checkauthorization) on it to see whether the signing Account and Identity have the required roles and permissions to run it

**Parameters**

| Name    | Type                                                                                                                        |
| ------- | --------------------------------------------------------------------------------------------------------------------------- |
| `opts?` | [`ProcedureOpts`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.procedureopts) |

**Returns**

`Promise`<`TransactionQueue`<`void`, `void`, `unknown`\[]\[]>>

**Defined in**

[api/entities/Subsidy/index.ts:136](https://github.com/PolymathNetwork/polymesh-sdk/blob/31dfa0dc/src/api/entities/Subsidy/index.ts#L136)

***

#### setAllowance

▸ **setAllowance**(`args`, `opts?`): `Promise`<`TransactionQueue`<`void`, `void`, `unknown`\[]\[]>>

Set allowance for this Subsidy relationship

**`note`** Only the subsidizer is allowed to set the allowance

**`throws`** if the allowance to set is equal to the current allowance

**`note`** this method is of type [ProcedureMethod](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.proceduremethod), which means you can call [setAllowance.checkAuthorization](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.proceduremethod#checkauthorization) on it to see whether the signing Account and Identity have the required roles and permissions to run it

**Parameters**

| Name    | Type                                                                                                                                                                                  |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `args`  | `Pick`<[`SetAllowanceParams`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/api_procedures_modifyallowance.setallowanceparams), `"allowance"`> |
| `opts?` | [`ProcedureOpts`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/types.procedureopts)                                                           |

**Returns**

`Promise`<`TransactionQueue`<`void`, `void`, `unknown`\[]\[]>>

**Defined in**

[api/entities/Subsidy/index.ts:150](https://github.com/PolymathNetwork/polymesh-sdk/blob/31dfa0dc/src/api/entities/Subsidy/index.ts#L150)

***

#### toHuman

▸ **toHuman**(): [`UniqueIdentifiers`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/api_entities_subsidy.uniqueidentifiers)

Return the Subsidy's static data

**Returns**

[`UniqueIdentifiers`](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/interfaces/api_entities_subsidy.uniqueidentifiers)

**Overrides**

[Entity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_entity.entity).[toHuman](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/api_entities_entity.entity#tohuman)

**Defined in**

[api/entities/Subsidy/index.ts:224](https://github.com/PolymathNetwork/polymesh-sdk/blob/31dfa0dc/src/api/entities/Subsidy/index.ts#L224)

***

#### generateUuid

▸ `Static` **generateUuid**<`Identifiers`>(`identifiers`): `string`

Generate the Entity's UUID from its identifying properties

**Type parameters**

| Name          |
| ------------- |
| `Identifiers` |

**Parameters**

| Name          | Type          |
| ------------- | ------------- |
| `identifiers` | `Identifiers` |

**Returns**

`string`

**Inherited from**

[Entity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_entity.entity).[generateUuid](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/api_entities_entity.entity#generateuuid)

**Defined in**

[api/entities/Entity.ts:14](https://github.com/PolymathNetwork/polymesh-sdk/blob/31dfa0dc/src/api/entities/Entity.ts#L14)

***

#### unserialize

▸ `Static` **unserialize**<`Identifiers`>(`serialized`): `Identifiers`

Unserialize a UUID into its Unique Identifiers

**Type parameters**

| Name          |
| ------------- |
| `Identifiers` |

**Parameters**

| Name         | Type     | Description         |
| ------------ | -------- | ------------------- |
| `serialized` | `string` | UUID to unserialize |

**Returns**

`Identifiers`

**Inherited from**

[Entity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/classes/api_entities_entity.entity).[unserialize](https://developers.polymath.network/polymesh-sdk-api-reference/docs-alpha/api_entities_entity.entity#unserialize)

**Defined in**

[api/entities/Entity.ts:23](https://github.com/PolymathNetwork/polymesh-sdk/blob/31dfa0dc/src/api/entities/Entity.ts#L23)
