/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { accountMappingCreate } from "../funcs/accountMappingCreate.js"; import { accountMappingGet } from "../funcs/accountMappingGet.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 AccountMapping extends ClientSDK { /** * List bank feed accounts * * @remarks * The *List bank accounts* endpoint returns information about a source bank account and any current or potential target mapping accounts. * * A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software). * * > **For custom builds only** * > * > Only use this endpoint if you are building your own account management UI. */ async get( request: operations.GetBankAccountMappingRequest, options?: RequestOptions, ): Promise> { return unwrapAsync(accountMappingGet( this, request, options, )); } /** * Create bank feed account mapping * * @remarks * The *Create bank account mapping* endpoint creates a new mapping between a source bank account and a potential account in the accounting software (target account). * * A bank feed account mapping is a specified link between the source account (provided by the Codat user) and the target account (the end user's account in the underlying software). * * To find valid target account options, first call the [List bank feed account mappings](https://docs.codat.io//bank-feeds-api#/operations/get-bank-account-mapping) endpoint. * * > **For custom builds only** * > * > Only use this endpoint if you are building your own account management UI. * * #### Account mapping variability * * The method of mapping the source account to the target account varies depending on the accounting software your company uses. * * #### Mapping options: * * 1. **API Mapping**: Integrate the mapping journey directly into your application for a seamless user experience. * 2. **Codat UI Mapping**: If you prefer a quicker setup, you can utilize Codat's provided user interface for mapping. * 3. **Accounting Platform Mapping**: For some accounting software, the mapping process must be conducted within the software itself. * * ### Integration-specific behavior * * | Bank Feed Integration | API Mapping | Codat UI Mapping | Accounting Platform Mapping | * | --------------------- | ----------- | ---------------- | --------------------------- | * | Xero | ✅ | ✅ | | * | FreeAgent | ✅ | ✅ | | * | Oracle NetSuite | ✅ | ✅ | | * | Exact Online (NL) | ✅ | ✅ | | * | QuickBooks Online | | | ✅ | * | Sage | | | ✅ | */ async create( request: operations.CreateBankAccountMappingRequest, options?: RequestOptions, ): Promise { return unwrapAsync(accountMappingCreate( this, request, options, )); } }