Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TransactionPatternApi

TransactionPatternApi - object-oriented interface

export
class

TransactionPatternApi

extends

{BaseAPI}

Hierarchy

Index

Constructors

constructor

Methods

activateTransactionPattern

  • activateTransactionPattern(accessId: string, accountId: string, patternId: string, activated: boolean, options?: any): Promise<TransactionPattern>
  • Disabling the transaction pattern results in ignoring the pattern in the forecast. The transaction pattern still exists and relationships to transactions are not modified.

    summary

    Enable a transaction pattern

    throws

    {RequiredError}

    memberof

    TransactionPatternApi

    Parameters

    • accessId: string

      The accessId for which to activate the pattern

    • accountId: string

      The accountId for which to activate the pattern

    • patternId: string

      The patternId to (de)activate

    • activated: boolean

      If `true`, the pattern will be used for forecast calculations; `false` will be ignored.

    • Optional options: any

    Returns Promise<TransactionPattern>

deleteTransactionPattern

  • deleteTransactionPattern(accessId: string, accountId: string, patternId: string, options?: any): Promise<Response>
  • Delete the transaction pattern identified by the patternId. All associated transactions will be updated to {{patternId = null}}.

    summary

    Delete transaction pattern

    throws

    {RequiredError}

    memberof

    TransactionPatternApi

    Parameters

    • accessId: string

      The accessId for the transaction pattern to delete

    • accountId: string

      The accountId for the transaction pattern to delete

    • patternId: string

      The patternId to delete

    • Optional options: any

    Returns Promise<Response>

getTransactionPattern

  • getTransactionPattern(accessId: string, accountId: string, patternId: string, options?: any): Promise<TransactionPattern>
  • Returns the transaction pattern identified by patternId in relation to accountId.

    summary

    Get transaction pattern

    throws

    {RequiredError}

    memberof

    TransactionPatternApi

    Parameters

    • accessId: string

      The accessId for the pattern to retrieve

    • accountId: string

      The accoundId for the pattern to retrieve

    • patternId: string

      The patternId for the pattern to retrieve

    • Optional options: any

    Returns Promise<TransactionPattern>

listTransactionPatterns

  • listTransactionPatterns(accessId: string, accountId: string, options?: any): Promise<TransactionPattern[]>
  • Returns all transaction patterns for accountId. Transaction patterns are recurring transactions automatically identified by the server or manually created via create transaction pattern.

    summary

    List transaction patterns for account

    throws

    {RequiredError}

    memberof

    TransactionPatternApi

    Parameters

    • accessId: string

      The accessId for which to retrieve transaction patterns

    • accountId: string

      The accountId for which to retrieve transaction patterns

    • Optional options: any

    Returns Promise<TransactionPattern[]>

postTransactionPattern

  • Create a new pattern for an accountId. The cycle can be MONTHLY, QUARTERLY, SEMI_ANNUALLY or ANNUALLY. The day can be between 1 and 366, depending on cycle: | cycle | day range | example | | --- | --- | --- | | MONTHLY | 1-31 | every 29th of the month => 29 | | QUARTERLY | 1-92 | 23rd of February (23rd of May, etc.) => 54 (31 [complete first month] + 23 [days in second month]) | | SEMI_ANNUALLY | 1-184 | 1st of May and 1st of November => 121 (for first half of year: 31 + 28 + 31 + 30 + 1) | | ANNUALLY | 1-366 | 24th of December => 358 | If a similar pattern already exists, you will receive an HTTP status code 409.

    summary

    Create a new pattern

    throws

    {RequiredError}

    memberof

    TransactionPatternApi

    Parameters

    • accessId: string

      The accessId with which the newly created pattern is associated

    • accountId: string

      The accountId with which the newly created pattern is associated

    • transactionPatternDto: TransactionPattern

      The transaction pattern to create

    • Optional options: any

    Returns Promise<TransactionPattern>