import * as utils from "../internal/utils"; import * as operations from "../sdk/models/operations"; import { SDKConfiguration } from "./sdk"; import { AxiosRequestConfig } from "axios"; /** * Customers */ export declare enum DownloadAttachmentAcceptEnum { applicationJson = "application/json", applicationOctetStream = "application/octet-stream" } export declare class Customers { private sdkConfiguration; constructor(sdkConfig: SDKConfiguration); /** * Create customer * * @remarks * The *Create customer* endpoint creates a new [customer](https://docs.codat.io/accounting-api#/schemas/Customer) for a given company's connection. * * [Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. * * **Integration-specific behaviour** * * Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/accounting-api#/operations/get-create-update-customers-model). * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support creating an account. * */ create(req: operations.CreateCustomerRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * Download customer attachment * * @remarks * The *Download customer attachment* endpoint downloads a specific attachment for a given `customerId` and `attachmentId`. * * [Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support downloading a customer attachment. * */ downloadAttachment(req: operations.DownloadCustomerAttachmentRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig, acceptHeaderOverride?: DownloadAttachmentAcceptEnum): Promise; /** * Get customer * * @remarks * The *Get customer* endpoint returns a single customer for a given customerId. * * [Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support getting a specific customer. * * 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.GetCustomerRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * Get customer attachment * * @remarks * The *Get customer attachment* endpoint returns a specific attachment for a given `customerId` and `attachmentId`. * * [Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support getting a customer attachment. * */ getAttachment(req: operations.GetCustomerAttachmentRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * Get create/update customer model * * @remarks * The *Get create/update customer model* endpoint returns the expected data for the request payload when creating and updating a [customer](https://docs.codat.io/accounting-api#/schemas/Customer) for a given company and integration. * * [Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. * * **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=customers) for integrations that support creating and updating a customer. * */ getCreateUpdateModel(req: operations.GetCreateUpdateCustomersModelRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * List customers * * @remarks * The *List customers* endpoint returns a list of [customers](https://docs.codat.io/accounting-api#/schemas/Customer) for a given company's connection. * * [Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. * * 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.ListCustomersRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * List customer attachments * * @remarks * The *List customer attachments* endpoint returns a list of attachments avialable to download for given `customerId`. * * [Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support listing customer attachments. * */ listAttachments(req: operations.ListCustomerAttachmentsRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * Update customer * * @remarks * The *Update customer* endpoint updates an existing [customer](https://docs.codat.io/accounting-api#/schemas/Customer) for a given company's connection. * * [Customers](https://docs.codat.io/accounting-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. * * **Integration-specific behaviour** * * Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/accounting-api#/operations/get-create-update-customers-model). * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=customers) for integrations that support creating an account. * */ update(req: operations.UpdateCustomerRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; }