import * as utils from "../internal/utils"; import * as operations from "../sdk/models/operations"; import { SDKConfiguration } from "./sdk"; import { AxiosRequestConfig } from "axios"; /** * Purchase orders */ export declare enum DownloadAttachmentAcceptEnum { applicationJson = "application/json", applicationOctetStream = "application/octet-stream" } export declare enum DownloadPurchaseOrderPdfAcceptEnum { applicationJson = "application/json", applicationPdf = "application/pdf" } export declare class PurchaseOrders { private sdkConfiguration; constructor(sdkConfig: SDKConfiguration); /** * Create purchase order * * @remarks * The *Create purchase order* endpoint creates a new [purchase order](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) for a given company's connection. * * [Purchase orders](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) represent a business's intent to purchase goods or services from a supplier. * * **Integration-specific behaviour** * * Required data may vary by integration. To see what data to post, first call [Get create/update purchase order model](https://docs.codat.io/accounting-api#/operations/get-create-update-purchaseOrders-model). * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support creating an account. * */ create(req: operations.CreatePurchaseOrderRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * Download purchase order attachment * * @remarks * The *Download purchase order attachment* endpoint downloads a specific attachment for a given `purchaseOrderId` and `attachmentId`. * * [Purchase Orders](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) represent a business's intent to purchase goods or services from a supplier. * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support downloading a purchase order attachment. * */ downloadAttachment(req: operations.DownloadPurchaseOrderAttachmentRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig, acceptHeaderOverride?: DownloadAttachmentAcceptEnum): Promise; /** * Download purchase order as PDF * * @remarks * The *Download purchase order as PDF* endpoint downloads the purchase order as a PDF for a given `purchaseOrderId`. * * [Purchase Orders](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) represent a business's intent to purchase goods or services from a supplier. * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support getting a purchase order as PDF. */ downloadPurchaseOrderPdf(req: operations.DownloadPurchaseOrderPdfRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig, acceptHeaderOverride?: DownloadPurchaseOrderPdfAcceptEnum): Promise; /** * Get purchase order * * @remarks * The *Get purchase order* endpoint returns a single purchase order for a given purchaseOrderId. * * [Purchase orders](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) represent a business's intent to purchase goods or services from a supplier. * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support getting a specific purchase order. * * 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.GetPurchaseOrderRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * Get purchase order attachment * * @remarks * The *Get purchase order attachment* endpoint returns a specific attachment for a given `purchaseOrderId` and `attachmentId`. * * [Purchase Orders](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) represent a business's intent to purchase goods or services from a supplier. * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support getting a purchase order attachment. * */ getAttachment(req: operations.GetPurchaseOrderAttachmentRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * Get create/update purchase order model * * @remarks * The *Get create/update purchase order model* endpoint returns the expected data for the request payload when creating and updating a [purchase order](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) for a given company and integration. * * [Purchase orders](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) represent a business's intent to purchase goods or services from a supplier. * * **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=purchaseOrders) for integrations that support creating and updating a purchase order. * */ getCreateUpdateModel(req: operations.GetCreateUpdatePurchaseOrdersModelRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * List purchase orders * * @remarks * The *List purchase orders* endpoint returns a list of [purchase orders](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) for a given company's connection. * * [Purchase orders](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) represent a business's intent to purchase goods or services from a supplier. * * 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.ListPurchaseOrdersRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * List purchase order attachments * * @remarks * The *List purchase order attachments* endpoint returns a list of attachments available to download for a given `purchaseOrderId`. * * [Purchase Orders](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) represent a business's intent to purchase goods or services from a supplier. * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support listing purchase order attachments. * */ listAttachments(req: operations.ListPurchaseOrderAttachmentsRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; /** * Update purchase order * * @remarks * The *Update purchase order* endpoint updates an existing [purchase order](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) for a given company's connection. * * [Purchase orders](https://docs.codat.io/accounting-api#/schemas/PurchaseOrder) represent a business's intent to purchase goods or services from a supplier. * * **Integration-specific behaviour** * * Required data may vary by integration. To see what data to post, first call [Get create/update purchase order model](https://docs.codat.io/accounting-api#/operations/get-create-update-purchaseOrders-model). * * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=purchaseOrders) for integrations that support creating an account. * */ update(req: operations.UpdatePurchaseOrderRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise; }