import * as utils from "../internal/utils"; import * as operations from "../sdk/models/operations"; import { SDKConfiguration } from "./sdk"; import { AxiosRequestConfig } from "axios"; /** * Direct incomes */ export declare enum DownloadAttachmentAcceptEnum { applicationJson = "application/json", applicationOctetStream = "application/octet-stream" } export declare class DirectIncomes { private sdkConfiguration; constructor(sdkConfig: SDKConfiguration); /** * Create direct income * * @remarks * The *Create direct income* endpoint creates a new [direct income](https://docs.codat.io/accounting-api#/schemas/DirectIncome) for a given company's connection. * * [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale. For example, cash sales of items to a customer, referral commissions, and service fee refunds are considered direct incomes. * * **Integration-specific behaviour** * * Required data may vary by integration. To see what data to post, first call [Get create direct income model](https://docs.codat.io/accounting-api#/operations/get-create-directIncomes-model). * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support creating an account. * */ create(req: operations.CreateDirectIncomeRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * Download direct income attachment * * @remarks * The *Download direct income attachment* endpoint downloads a specific attachment for a given `directIncomeId` and `attachmentId`. * * [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale. * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support downloading a direct income attachment. * */ downloadAttachment(req: operations.DownloadDirectIncomeAttachmentRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig, acceptHeaderOverride?: DownloadAttachmentAcceptEnum): Promise; /** * Get direct income * * @remarks * The *Get direct income* endpoint returns a single direct income for a given directIncomeId. * * [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale. * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support getting a specific direct income. * * 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.GetDirectIncomeRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * Get direct income attachment * * @remarks * The *Get direct income attachment* endpoint returns a specific attachment for a given `directIncomeId` and `attachmentId`. * * [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale. * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support getting a direct income attachment. * */ getAttachment(req: operations.GetDirectIncomeAttachmentRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * Get create direct income model * * @remarks * The *Get create direct income model* endpoint returns the expected data for the request payload when creating a [direct income](https://docs.codat.io/accounting-api#/schemas/DirectIncome) for a given company and integration. * * [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale. * * **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=directIncomes) for integrations that support creating a direct income. * */ getCreateModel(req: operations.GetCreateDirectIncomesModelRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * List direct incomes * * @remarks * The *List direct incomes* endpoint returns a list of [direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) for a given company's connection. * * [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale. * * 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.ListDirectIncomesRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * List direct income attachments * * @remarks * The *List direct income attachments* endpoint returns a list of attachments available to download for given `directIncomeId`. * * [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale. * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support listing direct income attachments. * */ listAttachments(req: operations.ListDirectIncomeAttachmentsRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * Create direct income attachment * * @remarks * The *Upload direct income attachment* endpoint uploads an attachment and assigns it against a specific `directIncomeId`. * * [Direct incomes](https://docs.codat.io/accounting-api#/schemas/DirectIncome) are sales of items directly to a customer where payment is received at the point of the sale. * * **Integration-specific behaviour** * * For more details on supported file types by integration see [Attachments](https://docs.codat.io/accounting-api#/schemas/Attachment). * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=directIncomes) for integrations that support uploading a direct income attachment. * */ uploadAttachment(req: operations.UploadDirectIncomeAttachmentRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; }