/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { transactionsCreate } from "../funcs/transactionsCreate.js"; import { transactionsGetCreateModel } from "../funcs/transactionsGetCreateModel.js"; import { transactionsGetCreateOperation } from "../funcs/transactionsGetCreateOperation.js"; import { transactionsListCreateOperations } from "../funcs/transactionsListCreateOperations.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "./models/operations/index.js"; import * as shared from "./models/shared/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Transactions extends ClientSDK { /** * Create bank transactions * * @remarks * The *Create bank transactions* endpoint creates new [bank transactions](https://docs.codat.io/bank-feeds-api#/schemas/BankTransactions) for a given company's connection. * * [Bank transactions](https://docs.codat.io/bank-feeds-api#/schemas/BankTransactions) are records of monetary amounts that have moved in and out of an SMB's bank account. * * **Integration-specific behavior** * * The required properties may vary based on the integration. For detailed requirements specific to each accounting software, refer to the API reference examples. * Alternatively, you can view the [Get create bank transaction model](https://docs.codat.io/bank-feeds-api#/operations/get-create-bank-transactions-model) for more information. */ async create( request: operations.CreateBankTransactionsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(transactionsCreate( this, request, options, )); } /** * Get create bank transactions model * * @remarks * The *Get create bank account transactions model* endpoint returns the expected data for the request payload when creating [bank account transactions](https://docs.codat.io/bank-feeds-api#/schemas/BankTransactions) for a given company and integration. * * [Bank account transactions](https://docs.codat.io/bank-feeds-api#/schemas/BankTransactions) are records of money that has moved in and out of an SMB's bank account. * * **Integration-specific behavior** * * See the *response examples* for integration-specific indicative models. */ async getCreateModel( request: operations.GetCreateBankTransactionsModelRequest, options?: RequestOptions, ): Promise { return unwrapAsync(transactionsGetCreateModel( this, request, options, )); } /** * Get create operation * * @remarks * The **Get create operation** endpoint returns a specific [write operation](/using-the-api/push) identified by the `pushOperationKey` that was performed on the company. * * Write operations are actions that send requests to Codat, enabling the creation, updating, deletion of records, or uploading attachments in the connected accounting software. * * For bank feeds, your push operations will only relate to the `bankTransactions` data type. */ async getCreateOperation( request: operations.GetCreateOperationRequest, options?: RequestOptions, ): Promise { return unwrapAsync(transactionsGetCreateOperation( this, request, options, )); } /** * List create operations * * @remarks * The **List create operations** endpoint returns a list of [write operations](/using-the-api/push) performed on the company. * * Write operations are actions that send requests to Codat, enabling the creation, updating, deletion of records, or uploading attachments in the connected accounting software. * * For bank feeds, use this endpoint to view write operations related to the `bankTransactions` data type. */ async listCreateOperations( request: operations.ListCreateOperationsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(transactionsListCreateOperations( this, request, options, )); } }