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 { BankAccount, BankAccount$Outbound } from "./bankaccount.js"; import { BillLineItem, BillLineItem$Outbound, BillLineItemInput, BillLineItemInput$Outbound } from "./billlineitem.js"; import { Currency } from "./currency.js"; import { CustomMappings, CustomMappings$Outbound } from "./custommappings.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"; /** * Invoice status */ export declare const BillStatus: { readonly Draft: "draft"; readonly Submitted: "submitted"; readonly Authorised: "authorised"; readonly PartiallyPaid: "partially_paid"; readonly Paid: "paid"; readonly Void: "void"; readonly Credit: "credit"; readonly Deleted: "deleted"; }; /** * Invoice status */ export type BillStatus = ClosedEnum; export type Bill = { /** * A unique identifier for an object. */ id?: string | undefined; /** * The third-party API ID of original entity */ downstreamId?: string | null | undefined; /** * Reference to supplier bill number */ billNumber?: 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; /** * 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; /** * Amounts are including tax */ taxInclusive?: boolean | null | undefined; /** * Date bill was issued - YYYY-MM-DD. */ billDate?: RFCDate | undefined; /** * The due date is the date on which a payment is scheduled to be received - YYYY-MM-DD. */ dueDate?: RFCDate | undefined; /** * The paid date is the date on which a payment was sent to the supplier - YYYY-MM-DD. */ paidDate?: RFCDate | null | undefined; /** * A PO Number uniquely identifies a purchase order and is generally defined by the buyer. The buyer will match the PO number in the invoice to the Purchase Order. */ poNumber?: string | null | undefined; /** * Optional bill reference. */ reference?: string | null | undefined; lineItems?: Array | undefined; /** * Terms of payment. */ terms?: string | null | undefined; /** * Balance of bill due. */ balance?: number | null | undefined; /** * Amount of deposit made to this bill. */ deposit?: number | null | undefined; /** * Sub-total amount, normally before tax. */ subTotal?: number | null | undefined; /** * Total tax amount applied to this bill. */ totalTax?: number | null | undefined; /** * Total amount of bill, including tax. */ total?: number | null | undefined; /** * Applicable tax id/code override if tax is not supplied on a line item basis. */ taxCode?: string | null | undefined; notes?: string | null | undefined; /** * Invoice status */ status?: BillStatus | null | undefined; ledgerAccount?: LinkedLedgerAccount | null | undefined; /** * Payment method used for the transaction, such as cash, credit card, bank transfer, or check */ paymentMethod?: string | null | undefined; /** * The channel through which the transaction is processed. */ channel?: string | null | undefined; /** * language code according to ISO 639-1. For the United States - EN */ language?: string | null | 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; bankAccount?: BankAccount | undefined; /** * Discount percentage applied to this transaction. */ discountPercentage?: number | null | undefined; /** * A list of linked tracking categories. */ trackingCategories?: Array | 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; /** * 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; /** * When custom mappings are configured on the resource, the result is included here. */ customMappings?: CustomMappings | 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; /** * Accounting period */ accountingPeriod?: string | null | undefined; }; export type BillInput = { /** * Reference to supplier bill number */ billNumber?: 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; /** * 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; /** * Amounts are including tax */ taxInclusive?: boolean | null | undefined; /** * Date bill was issued - YYYY-MM-DD. */ billDate?: RFCDate | undefined; /** * The due date is the date on which a payment is scheduled to be received - YYYY-MM-DD. */ dueDate?: RFCDate | undefined; /** * The paid date is the date on which a payment was sent to the supplier - YYYY-MM-DD. */ paidDate?: RFCDate | null | undefined; /** * A PO Number uniquely identifies a purchase order and is generally defined by the buyer. The buyer will match the PO number in the invoice to the Purchase Order. */ poNumber?: string | null | undefined; /** * Optional bill reference. */ reference?: string | null | undefined; lineItems?: Array | undefined; /** * Terms of payment. */ terms?: string | null | undefined; /** * Balance of bill due. */ balance?: number | null | undefined; /** * Amount of deposit made to this bill. */ deposit?: number | null | undefined; /** * Sub-total amount, normally before tax. */ subTotal?: number | null | undefined; /** * Total tax amount applied to this bill. */ totalTax?: number | null | undefined; /** * Total amount of bill, including tax. */ total?: number | null | undefined; /** * Applicable tax id/code override if tax is not supplied on a line item basis. */ taxCode?: string | null | undefined; notes?: string | null | undefined; /** * Invoice status */ status?: BillStatus | null | undefined; ledgerAccount?: LinkedLedgerAccountInput | null | undefined; /** * Payment method used for the transaction, such as cash, credit card, bank transfer, or check */ paymentMethod?: string | null | undefined; /** * The channel through which the transaction is processed. */ channel?: string | null | undefined; /** * language code according to ISO 639-1. For the United States - EN */ language?: string | null | 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; bankAccount?: BankAccount | undefined; /** * Discount percentage applied to this transaction. */ discountPercentage?: number | 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; /** * Accounting period */ accountingPeriod?: string | null | undefined; }; /** @internal */ export declare const BillStatus$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const BillStatus$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 BillStatus$ { /** @deprecated use `BillStatus$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly Draft: "draft"; readonly Submitted: "submitted"; readonly Authorised: "authorised"; readonly PartiallyPaid: "partially_paid"; readonly Paid: "paid"; readonly Void: "void"; readonly Credit: "credit"; readonly Deleted: "deleted"; }>; /** @deprecated use `BillStatus$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly Draft: "draft"; readonly Submitted: "submitted"; readonly Authorised: "authorised"; readonly PartiallyPaid: "partially_paid"; readonly Paid: "paid"; readonly Void: "void"; readonly Credit: "credit"; readonly Deleted: "deleted"; }>; } /** @internal */ export declare const Bill$inboundSchema: z.ZodType; /** @internal */ export type Bill$Outbound = { id?: string | undefined; downstream_id?: string | null | undefined; bill_number?: string | null | undefined; supplier?: LinkedSupplier$Outbound | null | undefined; company_id?: string | null | undefined; currency?: string | null | undefined; currency_rate?: number | null | undefined; tax_inclusive?: boolean | null | undefined; bill_date?: string | undefined; due_date?: string | undefined; paid_date?: string | null | undefined; po_number?: string | null | undefined; reference?: string | null | undefined; line_items?: Array | undefined; terms?: string | null | undefined; balance?: number | null | undefined; deposit?: number | null | undefined; sub_total?: number | null | undefined; total_tax?: number | null | undefined; total?: number | null | undefined; tax_code?: string | null | undefined; notes?: string | null | undefined; status?: string | null | undefined; ledger_account?: LinkedLedgerAccount$Outbound | null | undefined; payment_method?: string | null | undefined; channel?: string | null | undefined; language?: string | null | undefined; accounting_by_row?: boolean | null | undefined; bank_account?: BankAccount$Outbound | undefined; discount_percentage?: number | null | undefined; tracking_categories?: Array | null | undefined; updated_by?: string | null | undefined; created_by?: string | null | undefined; updated_at?: string | null | undefined; created_at?: string | null | undefined; row_version?: string | null | undefined; custom_mappings?: CustomMappings$Outbound | null | undefined; pass_through?: Array | undefined; accounting_period?: string | null | undefined; }; /** @internal */ export declare const Bill$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 Bill$ { /** @deprecated use `Bill$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Bill$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Bill$Outbound` instead. */ type Outbound = Bill$Outbound; } export declare function billToJSON(bill: Bill): string; export declare function billFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const BillInput$inboundSchema: z.ZodType; /** @internal */ export type BillInput$Outbound = { bill_number?: string | null | undefined; supplier?: LinkedSupplierInput$Outbound | null | undefined; company_id?: string | null | undefined; currency?: string | null | undefined; currency_rate?: number | null | undefined; tax_inclusive?: boolean | null | undefined; bill_date?: string | undefined; due_date?: string | undefined; paid_date?: string | null | undefined; po_number?: string | null | undefined; reference?: string | null | undefined; line_items?: Array | undefined; terms?: string | null | undefined; balance?: number | null | undefined; deposit?: number | null | undefined; sub_total?: number | null | undefined; total_tax?: number | null | undefined; total?: number | null | undefined; tax_code?: string | null | undefined; notes?: string | null | undefined; status?: string | null | undefined; ledger_account?: LinkedLedgerAccountInput$Outbound | null | undefined; payment_method?: string | null | undefined; channel?: string | null | undefined; language?: string | null | undefined; accounting_by_row?: boolean | null | undefined; bank_account?: BankAccount$Outbound | undefined; discount_percentage?: number | null | undefined; tracking_categories?: Array | null | undefined; row_version?: string | null | undefined; pass_through?: Array | undefined; accounting_period?: string | null | undefined; }; /** @internal */ export declare const BillInput$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 BillInput$ { /** @deprecated use `BillInput$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `BillInput$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `BillInput$Outbound` instead. */ type Outbound = BillInput$Outbound; } export declare function billInputToJSON(billInput: BillInput): string; export declare function billInputFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=bill.d.ts.map