# Schedules

Handles all Asset Checkpoint Schedules related functionality

## Hierarchy

* Namespace‹[Asset](https://developers.polymath.network/polymesh-sdk-api-reference/classes/asset)›

  ↳ **Schedules**

## Index

### Properties

* [context](#protected-context)
* [parent](#protected-parent)

### Methods

* [complexityOf](#complexityof)
* [create](#create)
* [currentComplexity](#currentcomplexity)
* [get](#get)
* [getOne](#getone)
* [maxComplexity](#maxcomplexity)
* [remove](#remove)

## Properties

### `Protected` context

• **context**: *Context*

*Inherited from void*

*Defined in* [*src/api/entities/Namespace.ts:11*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Namespace.ts#L11)

***

### `Protected` parent

• **parent**: [*Asset*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/asset)

*Inherited from void*

*Defined in* [*src/api/entities/Namespace.ts:9*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Namespace.ts#L9)

## Methods

### complexityOf

▸ **complexityOf**(`period`: [CalendarPeriod](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/calendarperiod.md)): *BigNumber*

*Defined in* [*src/api/entities/Asset/Checkpoints/Schedules.ts:127*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Asset/Checkpoints/Schedules.ts#L127)

Calculate an abstract measure of the complexity of a given Calendar Period

**Parameters:**

| Name     | Type                                                                                                                  |
| -------- | --------------------------------------------------------------------------------------------------------------------- |
| `period` | [CalendarPeriod](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/calendarperiod.md) |

**Returns:** *BigNumber*

***

### create

▸ **create**(`args`: [CreateCheckpointScheduleParams](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/createcheckpointscheduleparams.md), `opts?`: [ProcedureOpts](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/transactionqueue)*‹*[*CheckpointSchedule*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/checkpointschedule)*››*

*Defined in* [*src/api/entities/Asset/Checkpoints/Schedules.ts:57*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Asset/Checkpoints/Schedules.ts#L57)

Create a schedule for Checkpoint creation (i.e. "Create a checkpoint every week for 5 weeks, starting next tuesday")

**`note`** due to chain limitations, schedules are advanced and (if appropriate) executed whenever the Asset is redeemed, issued or transferred between portfolios. This means that on an Asset without much movement, there may be disparities between intended Checkpoint creation dates and the actual date when they are created. This, however, has no effect on the Checkpoint's accuracy regarding to balances

**`note`** this method is of type [ProcedureMethod](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/proceduremethod.md), which means you can call [create.checkAuthorization](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/proceduremethod.md#checkauthorization) on it to see whether the signing Account and Identity have the required roles and permissions to run it

**Parameters:**

| Name    | Type                                                                                                                                                  |
| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `args`  | [CreateCheckpointScheduleParams](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/createcheckpointscheduleparams.md) |
| `opts?` | [ProcedureOpts](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/procedureopts.md)                                   |

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/transactionqueue)*‹*[*CheckpointSchedule*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/checkpointschedule)*››*

***

### currentComplexity

▸ **currentComplexity**(): *Promise‹BigNumber›*

*Defined in* [*src/api/entities/Asset/Checkpoints/Schedules.ts:135*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Asset/Checkpoints/Schedules.ts#L135)

Calculate the sum of the complexity of all current Checkpoint Schedules for this Asset. The number cannot exceed the Asset's maximum complexity (obtained via [maxComplexity](#maxcomplexity))

**Returns:** *Promise‹BigNumber›*

***

### get

▸ **get**(): *Promise‹*[*ScheduleWithDetails*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/schedulewithdetails.md)*\[]›*

*Defined in* [*src/api/entities/Asset/Checkpoints/Schedules.ts:94*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Asset/Checkpoints/Schedules.ts#L94)

Retrieve all active Checkpoint Schedules

**Returns:** *Promise‹*[*ScheduleWithDetails*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/schedulewithdetails.md)*\[]›*

***

### getOne

▸ **getOne**(`__namedParameters`: object): *Promise‹*[*ScheduleWithDetails*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/schedulewithdetails.md)*›*

*Defined in* [*src/api/entities/Asset/Checkpoints/Schedules.ts:76*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Asset/Checkpoints/Schedules.ts#L76)

Retrieve a single Checkpoint Schedule associated to this Asset by its ID

**`throws`** if there is no Schedule with the passed ID

**Parameters:**

▪ **\_\_namedParameters**: *object*

| Name | Type        |
| ---- | ----------- |
| `id` | BigNumber‹› |

**Returns:** *Promise‹*[*ScheduleWithDetails*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/schedulewithdetails.md)*›*

***

### maxComplexity

▸ **maxComplexity**(): *Promise‹BigNumber›*

*Defined in* [*src/api/entities/Asset/Checkpoints/Schedules.ts:144*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Asset/Checkpoints/Schedules.ts#L144)

Retrieve the maximum allowed Schedule complexity for this Asset

**Returns:** *Promise‹BigNumber›*

***

### remove

▸ **remove**(`args`: [RemoveCheckpointScheduleParams](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/removecheckpointscheduleparams.md), `opts?`: [ProcedureOpts](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/transactionqueue)*‹void››*

*Defined in* [*src/api/entities/Asset/Checkpoints/Schedules.ts:67*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Asset/Checkpoints/Schedules.ts#L67)

Remove the supplied Checkpoint Schedule for a given Asset

**`note`** this method is of type [ProcedureMethod](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/proceduremethod.md), which means you can call [remove.checkAuthorization](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/proceduremethod.md#checkauthorization) on it to see whether the signing Account and Identity have the required roles and permissions to run it

**Parameters:**

| Name    | Type                                                                                                                                                  |
| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `args`  | [RemoveCheckpointScheduleParams](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/removecheckpointscheduleparams.md) |
| `opts?` | [ProcedureOpts](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/procedureopts.md)                                   |

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/transactionqueue)*‹void››*
