import * as utils from "../internal/utils"; import * as operations from "../sdk/models/operations"; import { SDKConfiguration } from "./sdk"; import { AxiosRequestConfig } from "axios"; /** * Bill payments */ export declare class BillPayments { private sdkConfiguration; constructor(sdkConfig: SDKConfiguration); /** * Create bill payments * * @remarks * The *Create bill payment* endpoint creates a new [bill payment](https://docs.codat.io/accounting-api#/schemas/BillPayment) for a given company's connection. * * [Bill payments](https://docs.codat.io/accounting-api#/schemas/BillPayment) are an allocation of money within any customer accounts payable account. * * **Integration-specific behaviour** * * Required data may vary by integration. To see what data to post, first call [Get create bill payment model](https://docs.codat.io/accounting-api#/operations/get-create-billPayments-model). * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support creating an account. * */ create(req: operations.CreateBillPaymentRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * Delete bill payment * * @remarks * The *Delete bill payment* endpoint allows you to delete a specified bill payment from an accounting platform. * * [Bill payments](https://docs.codat.io/codat-api#/schemas/BillPayment) are an allocation of money within any customer accounts payable account. * * ### Process * 1. Pass the `{billPaymentId}` to the *Delete bill payment* endpoint and store the `pushOperationKey` returned. * 2. Check the status of the delete operation by checking the status of the push operation either via * 1. [Push operation webhook](https://docs.codat.io/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised), * 2. [Push operation status endpoint](https://docs.codat.io/codat-api#/operations/get-push-operation). * * A `Success` status indicates that the bill payment object was deleted from the accounting platform. * 3. (Optional) Check that the bill payment was deleted from the accounting platform. * * ### Effect on related objects * Be aware that deleting a bill payment from an accounting platform might cause related objects to be modified. * * ## Integration specifics * Integrations that support soft delete do not permanently delete the object in the accounting platform. * * | Integration | Soft Delete | Details | * |-------------|-------------|------------------------------------------------------------------------------------------------------| * | QuickBooks Online | No | - * | Oracle NetSuite | No | See [here](/integrations/accounting/netsuite/accounting-netsuite-how-deleting-bill-payments-works) to learn more. * | Xero | Yes | - * | Sage Intacct | No | Some bill payments in Sage Intacct can only be deleted, whilst others can only be voided. Codat have applied logic to handle this complexity. * * > **Supported integrations** * > * > This functionality is currently supported for our QuickBooks Online, Oracle NetSuite, Xero and Sage Intacct integrations. * */ delete(req: operations.DeleteBillPaymentRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * Get bill payment * * @remarks * The *Get bill payment* endpoint returns a single bill payment for a given billPaymentId. * * [Bill payments](https://docs.codat.io/accounting-api#/schemas/BillPayment) are an allocation of money within any customer accounts payable account. * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support getting a specific bill payment. * * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). * */ get(req: operations.GetBillPaymentsRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * Get create bill payment model * * @remarks * The *Get create bill payment model* endpoint returns the expected data for the request payload when creating a [bill payment](https://docs.codat.io/accounting-api#/schemas/BillPayment) for a given company and integration. * * [Bill payments](https://docs.codat.io/accounting-api#/schemas/BillPayment) are an allocation of money within any customer accounts payable account. * * **Integration-specific behaviour** * * See the *response examples* for integration-specific indicative models. * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support creating a bill payment. * */ getCreateModel(req: operations.GetCreateBillPaymentsModelRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * List bill payments * * @remarks * The *List bill payments* endpoint returns a list of [bill payments](https://docs.codat.io/accounting-api#/schemas/BillPayment) for a given company's connection. * * [Bill payments](https://docs.codat.io/accounting-api#/schemas/BillPayment) are an allocation of money within any customer accounts payable account. * * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/codat-api#/operations/refresh-company-data). * */ list(req: operations.ListBillPaymentsRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; }