import * as z from "zod/v3";
import { ClosedEnum } from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
import { Currency } from "./currency.js";
import { CustomField, CustomField$Outbound } from "./customfield.js";
import { ExpenseLineItem } from "./expenselineitem.js";
import { ExpenseLineItemInput, ExpenseLineItemInput$Outbound } from "./expenselineiteminput.js";
import { LinkedBankAccount, LinkedBankAccount$Outbound } from "./linkedbankaccount.js";
import { LinkedLedgerAccount, LinkedLedgerAccount$Outbound } from "./linkedledgeraccount.js";
import { LinkedSupplier } from "./linkedsupplier.js";
import { LinkedSupplierInput, LinkedSupplierInput$Outbound } from "./linkedsupplierinput.js";
import { LinkedTaxRate } from "./linkedtaxrate.js";
import { LinkedTaxRateInput, LinkedTaxRateInput$Outbound } from "./linkedtaxrateinput.js";
import { PassThroughBody, PassThroughBody$Outbound } from "./passthroughbody.js";
/**
 * The type of payment for the expense.
 */
export declare const ExpensePaymentType: {
    readonly Cash: "cash";
    readonly Check: "check";
    readonly CreditCard: "credit_card";
    readonly Other: "other";
};
/**
 * The type of payment for the expense.
 */
export type ExpensePaymentType = ClosedEnum<typeof ExpensePaymentType>;
/**
 * The type of expense.
 */
export declare const ExpenseType: {
    readonly Expense: "expense";
    readonly Refund: "refund";
};
/**
 * The type of expense.
 */
export type ExpenseType = ClosedEnum<typeof ExpenseType>;
/**
 * Expense status
 */
export declare const ExpenseStatus: {
    readonly Draft: "draft";
    readonly Posted: "posted";
};
/**
 * Expense status
 */
export type ExpenseStatus = ClosedEnum<typeof ExpenseStatus>;
export type Expense = {
    /**
     * A unique identifier for an object.
     */
    id?: string | undefined;
    /**
     * Number.
     */
    number?: string | null | undefined;
    /**
     * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD
     */
    transactionDate: Date | null;
    /**
     * The unique identifier for the ledger account that this expense should be credited to. Deprecated, use account instead.
     *
     * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
     */
    accountId?: string | undefined;
    account?: LinkedLedgerAccount | null | undefined;
    bankAccount?: LinkedBankAccount | null | undefined;
    /**
     * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable to customers.
     */
    customerId?: string | undefined;
    /**
     * The ID of the supplier this entity is linked to. Deprecated, use supplier instead.
     *
     * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
     */
    supplierId?: string | undefined;
    /**
     * The supplier this entity is linked to.
     */
    supplier?: LinkedSupplier | null | undefined;
    /**
     * The company ID the transaction belongs to
     */
    companyId?: string | null | undefined;
    /**
     * The ID of the department
     */
    departmentId?: string | null | undefined;
    /**
     * The type of payment for the expense.
     */
    paymentType?: ExpensePaymentType | 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;
    /**
     * The type of expense.
     */
    type?: ExpenseType | null | undefined;
    /**
     * The memo of the expense.
     */
    memo?: string | null | undefined;
    taxRate?: LinkedTaxRate | undefined;
    /**
     * Amounts are including tax
     */
    taxInclusive?: boolean | null | undefined;
    /**
     * Subtotal amount, normally before tax.
     */
    subTotal?: number | null | undefined;
    /**
     * Total tax amount applied to this transaction.
     */
    totalTax?: number | null | undefined;
    /**
     * The total amount of the expense line item.
     */
    totalAmount?: number | null | undefined;
    /**
     * Expense line items linked to this expense.
     */
    lineItems: Array<ExpenseLineItem>;
    /**
     * Optional reference identifier for the transaction.
     */
    reference?: string | null | undefined;
    /**
     * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero.
     */
    sourceDocumentUrl?: string | null | undefined;
    customFields?: Array<CustomField> | undefined;
    /**
     * When custom mappings are configured on the resource, the result is included here.
     */
    customMappings?: {
        [k: string]: any;
    } | null | undefined;
    /**
     * Expense status
     */
    status?: ExpenseStatus | 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;
    /**
     * The user who last updated the object.
     */
    updatedBy?: string | null | undefined;
    /**
     * The user who created the object.
     */
    createdBy?: 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<PassThroughBody> | undefined;
};
export type ExpenseInput = {
    /**
     * Number.
     */
    number?: string | null | undefined;
    /**
     * The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD
     */
    transactionDate: Date | null;
    /**
     * The unique identifier for the ledger account that this expense should be credited to. Deprecated, use account instead.
     *
     * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
     */
    accountId?: string | undefined;
    account?: LinkedLedgerAccount | null | undefined;
    bankAccount?: LinkedBankAccount | null | undefined;
    /**
     * The ID of the customer this entity is linked to. Used for expenses that should be marked as billable to customers.
     */
    customerId?: string | undefined;
    /**
     * The ID of the supplier this entity is linked to. Deprecated, use supplier instead.
     *
     * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
     */
    supplierId?: string | undefined;
    /**
     * The supplier this entity is linked to.
     */
    supplier?: LinkedSupplierInput | null | undefined;
    /**
     * The company ID the transaction belongs to
     */
    companyId?: string | null | undefined;
    /**
     * The ID of the department
     */
    departmentId?: string | null | undefined;
    /**
     * The type of payment for the expense.
     */
    paymentType?: ExpensePaymentType | 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;
    /**
     * The type of expense.
     */
    type?: ExpenseType | null | undefined;
    /**
     * The memo of the expense.
     */
    memo?: string | null | undefined;
    taxRate?: LinkedTaxRateInput | undefined;
    /**
     * Amounts are including tax
     */
    taxInclusive?: boolean | null | undefined;
    /**
     * Subtotal amount, normally before tax.
     */
    subTotal?: number | null | undefined;
    /**
     * Total tax amount applied to this transaction.
     */
    totalTax?: number | null | undefined;
    /**
     * The total amount of the expense line item.
     */
    totalAmount?: number | null | undefined;
    /**
     * Expense line items linked to this expense.
     */
    lineItems: Array<ExpenseLineItemInput>;
    /**
     * Optional reference identifier for the transaction.
     */
    reference?: string | null | undefined;
    /**
     * URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero.
     */
    sourceDocumentUrl?: string | null | undefined;
    customFields?: Array<CustomField> | undefined;
    /**
     * Expense status
     */
    status?: ExpenseStatus | 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<PassThroughBody> | undefined;
};
/** @internal */
export declare const ExpensePaymentType$inboundSchema: z.ZodNativeEnum<typeof ExpensePaymentType>;
/** @internal */
export declare const ExpensePaymentType$outboundSchema: z.ZodNativeEnum<typeof ExpensePaymentType>;
/** @internal */
export declare const ExpenseType$inboundSchema: z.ZodNativeEnum<typeof ExpenseType>;
/** @internal */
export declare const ExpenseType$outboundSchema: z.ZodNativeEnum<typeof ExpenseType>;
/** @internal */
export declare const ExpenseStatus$inboundSchema: z.ZodNativeEnum<typeof ExpenseStatus>;
/** @internal */
export declare const ExpenseStatus$outboundSchema: z.ZodNativeEnum<typeof ExpenseStatus>;
/** @internal */
export declare const Expense$inboundSchema: z.ZodType<Expense, z.ZodTypeDef, unknown>;
export declare function expenseFromJSON(jsonString: string): SafeParseResult<Expense, SDKValidationError>;
/** @internal */
export type ExpenseInput$Outbound = {
    number?: string | null | undefined;
    transaction_date: string | null;
    account_id?: string | undefined;
    account?: LinkedLedgerAccount$Outbound | null | undefined;
    bank_account?: LinkedBankAccount$Outbound | null | undefined;
    customer_id?: string | undefined;
    supplier_id?: string | undefined;
    supplier?: LinkedSupplierInput$Outbound | null | undefined;
    company_id?: string | null | undefined;
    department_id?: string | null | undefined;
    payment_type?: string | null | undefined;
    currency?: string | null | undefined;
    currency_rate?: number | null | undefined;
    type?: string | null | undefined;
    memo?: string | null | undefined;
    tax_rate?: LinkedTaxRateInput$Outbound | undefined;
    tax_inclusive?: boolean | null | undefined;
    sub_total?: number | null | undefined;
    total_tax?: number | null | undefined;
    total_amount?: number | null | undefined;
    line_items: Array<ExpenseLineItemInput$Outbound>;
    reference?: string | null | undefined;
    source_document_url?: string | null | undefined;
    custom_fields?: Array<CustomField$Outbound> | undefined;
    status?: string | null | undefined;
    row_version?: string | null | undefined;
    pass_through?: Array<PassThroughBody$Outbound> | undefined;
};
/** @internal */
export declare const ExpenseInput$outboundSchema: z.ZodType<ExpenseInput$Outbound, z.ZodTypeDef, ExpenseInput>;
export declare function expenseInputToJSON(expenseInput: ExpenseInput): string;
//# sourceMappingURL=expense.d.ts.map