import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { RFCDate } from "../../types/rfcdate.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { Address, Address$Outbound } from "./address.js"; import { BankAccount, BankAccount$Outbound } from "./bankaccount.js"; import { Currency } from "./currency.js"; import { CustomMappings, CustomMappings$Outbound } from "./custommappings.js"; import { InvoiceLineItem, InvoiceLineItem$Outbound, InvoiceLineItemInput, InvoiceLineItemInput$Outbound } from "./invoicelineitem.js"; import { LinkedLedgerAccount, LinkedLedgerAccount$Outbound } from "./linkedledgeraccount.js"; import { LinkedLedgerAccountInput, LinkedLedgerAccountInput$Outbound } from "./linkedledgeraccountinput.js"; import { LinkedSupplier, LinkedSupplier$Outbound } from "./linkedsupplier.js"; import { LinkedSupplierInput, LinkedSupplierInput$Outbound } from "./linkedsupplierinput.js"; import { LinkedTrackingCategory, LinkedTrackingCategory$Outbound } from "./linkedtrackingcategory.js"; import { PassThroughBody, PassThroughBody$Outbound } from "./passthroughbody.js"; export declare const PurchaseOrderStatus: { readonly Draft: "draft"; readonly Open: "open"; readonly Closed: "closed"; readonly Deleted: "deleted"; readonly Billed: "billed"; readonly Other: "other"; }; export type PurchaseOrderStatus = ClosedEnum; export type PurchaseOrder = { /** * A unique identifier for an object. */ id?: string | undefined; /** * The third-party API ID of original entity */ downstreamId?: string | null | undefined; /** * A PO Number uniquely identifies a purchase order and is generally defined by the buyer. */ poNumber?: string | null | undefined; /** * Optional purchase order reference. */ reference?: string | null | undefined; /** * The supplier this entity is linked to. */ supplier?: LinkedSupplier | null | undefined; /** * The company or subsidiary id the transaction belongs to */ companyId?: string | null | undefined; status?: PurchaseOrderStatus | null | undefined; /** * Date purchase order was issued - YYYY-MM-DD. */ issuedDate?: RFCDate | null | undefined; /** * The date on which the purchase order is to be delivered - YYYY-MM-DD. */ deliveryDate?: RFCDate | null | undefined; /** * The date on which the order is expected to arrive - YYYY-MM-DD. */ expectedArrivalDate?: RFCDate | null | undefined; /** * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). */ currency?: Currency | null | undefined; /** * Currency Exchange Rate at the time entity was recorded/generated. */ currencyRate?: number | null | undefined; /** * Sub-total amount, normally before tax. */ subTotal?: number | null | undefined; /** * Total tax amount applied to this invoice. */ totalTax?: number | null | undefined; /** * Total amount of invoice, including tax. */ total?: number | null | undefined; /** * Amounts are including tax */ taxInclusive?: boolean | null | undefined; lineItems?: Array | undefined; shippingAddress?: Address | undefined; ledgerAccount?: LinkedLedgerAccount | null | undefined; /** * Optional purchase order template */ templateId?: string | null | undefined; /** * Discount percentage applied to this transaction. */ discountPercentage?: number | null | undefined; bankAccount?: BankAccount | undefined; /** * Indicates if accounting by row is used (true) or not (false). Accounting by row means that a separate ledger transaction is created for each row. */ accountingByRow?: boolean | null | undefined; /** * The due date is the date on which a payment is scheduled to be received - YYYY-MM-DD. */ dueDate?: RFCDate | undefined; /** * Payment method used for the transaction, such as cash, credit card, bank transfer, or check */ paymentMethod?: string | null | undefined; /** * Applicable tax id/code override if tax is not supplied on a line item basis. */ taxCode?: string | null | undefined; /** * The channel through which the transaction is processed. */ channel?: string | null | undefined; /** * Message for the supplier. This text appears on the Purchase Order. */ memo?: string | null | undefined; /** * A list of linked tracking categories. */ trackingCategories?: Array | null | undefined; /** * When custom mappings are configured on the resource, the result is included here. */ customMappings?: CustomMappings | null | undefined; /** * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. */ rowVersion?: string | null | undefined; /** * The user who last updated the object. */ updatedBy?: string | null | undefined; /** * The user who created the object. */ createdBy?: string | null | undefined; /** * The date and time when the object was last updated. */ updatedAt?: Date | null | undefined; /** * The date and time when the object was created. */ createdAt?: Date | null | undefined; /** * The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. */ passThrough?: Array | undefined; }; export type PurchaseOrderInput = { /** * A PO Number uniquely identifies a purchase order and is generally defined by the buyer. */ poNumber?: string | null | undefined; /** * Optional purchase order reference. */ reference?: string | null | undefined; /** * The supplier this entity is linked to. */ supplier?: LinkedSupplierInput | null | undefined; /** * The company or subsidiary id the transaction belongs to */ companyId?: string | null | undefined; status?: PurchaseOrderStatus | null | undefined; /** * Date purchase order was issued - YYYY-MM-DD. */ issuedDate?: RFCDate | null | undefined; /** * The date on which the purchase order is to be delivered - YYYY-MM-DD. */ deliveryDate?: RFCDate | null | undefined; /** * The date on which the order is expected to arrive - YYYY-MM-DD. */ expectedArrivalDate?: RFCDate | null | undefined; /** * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). */ currency?: Currency | null | undefined; /** * Currency Exchange Rate at the time entity was recorded/generated. */ currencyRate?: number | null | undefined; /** * Sub-total amount, normally before tax. */ subTotal?: number | null | undefined; /** * Total tax amount applied to this invoice. */ totalTax?: number | null | undefined; /** * Total amount of invoice, including tax. */ total?: number | null | undefined; /** * Amounts are including tax */ taxInclusive?: boolean | null | undefined; lineItems?: Array | undefined; shippingAddress?: Address | undefined; ledgerAccount?: LinkedLedgerAccountInput | null | undefined; /** * Optional purchase order template */ templateId?: string | null | undefined; /** * Discount percentage applied to this transaction. */ discountPercentage?: number | null | undefined; bankAccount?: BankAccount | undefined; /** * Indicates if accounting by row is used (true) or not (false). Accounting by row means that a separate ledger transaction is created for each row. */ accountingByRow?: boolean | null | undefined; /** * The due date is the date on which a payment is scheduled to be received - YYYY-MM-DD. */ dueDate?: RFCDate | undefined; /** * Payment method used for the transaction, such as cash, credit card, bank transfer, or check */ paymentMethod?: string | null | undefined; /** * Applicable tax id/code override if tax is not supplied on a line item basis. */ taxCode?: string | null | undefined; /** * The channel through which the transaction is processed. */ channel?: string | null | undefined; /** * Message for the supplier. This text appears on the Purchase Order. */ memo?: string | null | undefined; /** * A list of linked tracking categories. */ trackingCategories?: Array | null | undefined; /** * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object. */ rowVersion?: string | null | undefined; /** * The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. */ passThrough?: Array | undefined; }; /** @internal */ export declare const PurchaseOrderStatus$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const PurchaseOrderStatus$outboundSchema: z.ZodNativeEnum; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace PurchaseOrderStatus$ { /** @deprecated use `PurchaseOrderStatus$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly Draft: "draft"; readonly Open: "open"; readonly Closed: "closed"; readonly Deleted: "deleted"; readonly Billed: "billed"; readonly Other: "other"; }>; /** @deprecated use `PurchaseOrderStatus$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly Draft: "draft"; readonly Open: "open"; readonly Closed: "closed"; readonly Deleted: "deleted"; readonly Billed: "billed"; readonly Other: "other"; }>; } /** @internal */ export declare const PurchaseOrder$inboundSchema: z.ZodType; /** @internal */ export type PurchaseOrder$Outbound = { id?: string | undefined; downstream_id?: string | null | undefined; po_number?: string | null | undefined; reference?: string | null | undefined; supplier?: LinkedSupplier$Outbound | null | undefined; company_id?: string | null | undefined; status?: string | null | undefined; issued_date?: string | null | undefined; delivery_date?: string | null | undefined; expected_arrival_date?: string | null | undefined; currency?: string | null | undefined; currency_rate?: number | null | undefined; sub_total?: number | null | undefined; total_tax?: number | null | undefined; total?: number | null | undefined; tax_inclusive?: boolean | null | undefined; line_items?: Array | undefined; shipping_address?: Address$Outbound | undefined; ledger_account?: LinkedLedgerAccount$Outbound | null | undefined; template_id?: string | null | undefined; discount_percentage?: number | null | undefined; bank_account?: BankAccount$Outbound | undefined; accounting_by_row?: boolean | null | undefined; due_date?: string | undefined; payment_method?: string | null | undefined; tax_code?: string | null | undefined; channel?: string | null | undefined; memo?: string | null | undefined; tracking_categories?: Array | null | undefined; custom_mappings?: CustomMappings$Outbound | null | undefined; row_version?: string | null | undefined; updated_by?: string | null | undefined; created_by?: string | null | undefined; updated_at?: string | null | undefined; created_at?: string | null | undefined; pass_through?: Array | undefined; }; /** @internal */ export declare const PurchaseOrder$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace PurchaseOrder$ { /** @deprecated use `PurchaseOrder$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `PurchaseOrder$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `PurchaseOrder$Outbound` instead. */ type Outbound = PurchaseOrder$Outbound; } export declare function purchaseOrderToJSON(purchaseOrder: PurchaseOrder): string; export declare function purchaseOrderFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const PurchaseOrderInput$inboundSchema: z.ZodType; /** @internal */ export type PurchaseOrderInput$Outbound = { po_number?: string | null | undefined; reference?: string | null | undefined; supplier?: LinkedSupplierInput$Outbound | null | undefined; company_id?: string | null | undefined; status?: string | null | undefined; issued_date?: string | null | undefined; delivery_date?: string | null | undefined; expected_arrival_date?: string | null | undefined; currency?: string | null | undefined; currency_rate?: number | null | undefined; sub_total?: number | null | undefined; total_tax?: number | null | undefined; total?: number | null | undefined; tax_inclusive?: boolean | null | undefined; line_items?: Array | undefined; shipping_address?: Address$Outbound | undefined; ledger_account?: LinkedLedgerAccountInput$Outbound | null | undefined; template_id?: string | null | undefined; discount_percentage?: number | null | undefined; bank_account?: BankAccount$Outbound | undefined; accounting_by_row?: boolean | null | undefined; due_date?: string | undefined; payment_method?: string | null | undefined; tax_code?: string | null | undefined; channel?: string | null | undefined; memo?: string | null | undefined; tracking_categories?: Array | null | undefined; row_version?: string | null | undefined; pass_through?: Array | undefined; }; /** @internal */ export declare const PurchaseOrderInput$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace PurchaseOrderInput$ { /** @deprecated use `PurchaseOrderInput$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `PurchaseOrderInput$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `PurchaseOrderInput$Outbound` instead. */ type Outbound = PurchaseOrderInput$Outbound; } export declare function purchaseOrderInputToJSON(purchaseOrderInput: PurchaseOrderInput): string; export declare function purchaseOrderInputFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=purchaseorder.d.ts.map