import * as z from "zod/v3";
import { OpenEnum } from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
import { Address, Address$Outbound } from "./address.js";
import { Allocation, AllocationInput, AllocationInput$Outbound } from "./allocation.js";
import { Currency } from "./currency.js";
import { CustomField, CustomField$Outbound } from "./customfield.js";
import { InvoiceLineItem, InvoiceLineItemInput, InvoiceLineItemInput$Outbound } from "./invoicelineitem.js";
import { LinkedCustomer } from "./linkedcustomer.js";
import { LinkedCustomerInput, LinkedCustomerInput$Outbound } from "./linkedcustomerinput.js";
import { LinkedLedgerAccount, LinkedLedgerAccount$Outbound } from "./linkedledgeraccount.js";
import { LinkedTrackingCategory, LinkedTrackingCategory$Outbound } from "./linkedtrackingcategory.js";
import { PassThroughBody, PassThroughBody$Outbound } from "./passthroughbody.js";
/**
 * Status of credit notes
 */
export declare const CreditNoteStatus: {
    readonly Draft: "draft";
    readonly Authorised: "authorised";
    readonly Posted: "posted";
    readonly PartiallyPaid: "partially_paid";
    readonly Paid: "paid";
    readonly Voided: "voided";
    readonly Deleted: "deleted";
};
/**
 * Status of credit notes
 */
export type CreditNoteStatus = OpenEnum<typeof CreditNoteStatus>;
/**
 * Type of payment
 */
export declare const CreditNoteType: {
    readonly AccountsReceivableCredit: "accounts_receivable_credit";
    readonly AccountsPayableCredit: "accounts_payable_credit";
};
/**
 * Type of payment
 */
export type CreditNoteType = OpenEnum<typeof CreditNoteType>;
export type CreditNote = {
    /**
     * Unique identifier representing the entity
     */
    id: string;
    /**
     * Credit note number.
     */
    number?: string | null | undefined;
    /**
     * The customer this entity is linked to.
     */
    customer?: LinkedCustomer | null | undefined;
    /**
     * The company ID the transaction belongs to
     */
    companyId?: string | null | undefined;
    /**
     * The ID of the location
     */
    locationId?: string | null | undefined;
    /**
     * The ID of the department
     */
    departmentId?: 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;
    /**
     * Sub-total amount, normally before tax.
     */
    subTotal?: number | null | undefined;
    /**
     * Amount of transaction
     */
    totalAmount: number;
    /**
     * Total tax amount applied to this invoice.
     */
    totalTax?: number | null | undefined;
    /**
     * Applicable tax id/code override if tax is not supplied on a line item basis.
     */
    taxCode?: string | null | undefined;
    /**
     * The balance reflecting any payments made against the transaction.
     */
    balance?: number | null | undefined;
    /**
     * Indicates the total credit amount still available to apply towards the payment.
     */
    remainingCredit?: number | null | undefined;
    /**
     * Status of credit notes
     */
    status?: CreditNoteStatus | undefined;
    /**
     * Optional reference message ie: Debit remittance detail.
     */
    reference?: string | null | undefined;
    /**
     * Date credit note issued - YYYY:MM::DDThh:mm:ss.sTZD
     */
    dateIssued?: Date | undefined;
    /**
     * Date credit note paid - YYYY:MM::DDThh:mm:ss.sTZD
     */
    datePaid?: Date | null | undefined;
    /**
     * Type of payment
     */
    type?: CreditNoteType | undefined;
    account?: LinkedLedgerAccount | null | undefined;
    lineItems?: Array<InvoiceLineItem> | undefined;
    allocations?: Array<Allocation> | undefined;
    /**
     * Optional note to be associated with the credit note.
     */
    note?: string | null | undefined;
    /**
     * Optional terms to be associated with the credit note.
     */
    terms?: string | null | undefined;
    /**
     * The ID of the payment terms
     */
    termsId?: string | null | undefined;
    billingAddress?: Address | undefined;
    shippingAddress?: Address | undefined;
    /**
     * A list of linked tracking categories.
     */
    trackingCategories?: Array<LinkedTrackingCategory | null> | null | undefined;
    /**
     * When custom mappings are configured on the resource, the result is included here.
     */
    customMappings?: {
        [k: string]: any;
    } | null | undefined;
    customFields?: Array<CustomField> | 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<PassThroughBody> | undefined;
};
export type CreditNoteInput = {
    /**
     * Credit note number.
     */
    number?: string | null | undefined;
    /**
     * The customer this entity is linked to.
     */
    customer?: LinkedCustomerInput | null | undefined;
    /**
     * The company ID the transaction belongs to
     */
    companyId?: string | null | undefined;
    /**
     * The ID of the location
     */
    locationId?: string | null | undefined;
    /**
     * The ID of the department
     */
    departmentId?: 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;
    /**
     * Sub-total amount, normally before tax.
     */
    subTotal?: number | null | undefined;
    /**
     * Amount of transaction
     */
    totalAmount: number;
    /**
     * Total tax amount applied to this invoice.
     */
    totalTax?: number | null | undefined;
    /**
     * Applicable tax id/code override if tax is not supplied on a line item basis.
     */
    taxCode?: string | null | undefined;
    /**
     * The balance reflecting any payments made against the transaction.
     */
    balance?: number | null | undefined;
    /**
     * Indicates the total credit amount still available to apply towards the payment.
     */
    remainingCredit?: number | null | undefined;
    /**
     * Status of credit notes
     */
    status?: CreditNoteStatus | undefined;
    /**
     * Optional reference message ie: Debit remittance detail.
     */
    reference?: string | null | undefined;
    /**
     * Date credit note issued - YYYY:MM::DDThh:mm:ss.sTZD
     */
    dateIssued?: Date | undefined;
    /**
     * Date credit note paid - YYYY:MM::DDThh:mm:ss.sTZD
     */
    datePaid?: Date | null | undefined;
    /**
     * Type of payment
     */
    type?: CreditNoteType | undefined;
    account?: LinkedLedgerAccount | null | undefined;
    lineItems?: Array<InvoiceLineItemInput> | undefined;
    allocations?: Array<AllocationInput> | undefined;
    /**
     * Optional note to be associated with the credit note.
     */
    note?: string | null | undefined;
    /**
     * Optional terms to be associated with the credit note.
     */
    terms?: string | null | undefined;
    /**
     * The ID of the payment terms
     */
    termsId?: string | null | undefined;
    billingAddress?: Address | undefined;
    shippingAddress?: Address | undefined;
    /**
     * A list of linked tracking categories.
     */
    trackingCategories?: Array<LinkedTrackingCategory | null> | null | undefined;
    customFields?: Array<CustomField> | 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 CreditNoteStatus$inboundSchema: z.ZodType<CreditNoteStatus, z.ZodTypeDef, unknown>;
/** @internal */
export declare const CreditNoteStatus$outboundSchema: z.ZodType<string, z.ZodTypeDef, CreditNoteStatus>;
/** @internal */
export declare const CreditNoteType$inboundSchema: z.ZodType<CreditNoteType, z.ZodTypeDef, unknown>;
/** @internal */
export declare const CreditNoteType$outboundSchema: z.ZodType<string, z.ZodTypeDef, CreditNoteType>;
/** @internal */
export declare const CreditNote$inboundSchema: z.ZodType<CreditNote, z.ZodTypeDef, unknown>;
export declare function creditNoteFromJSON(jsonString: string): SafeParseResult<CreditNote, SDKValidationError>;
/** @internal */
export type CreditNoteInput$Outbound = {
    number?: string | null | undefined;
    customer?: LinkedCustomerInput$Outbound | null | undefined;
    company_id?: string | null | undefined;
    location_id?: string | null | undefined;
    department_id?: string | null | undefined;
    currency?: string | null | undefined;
    currency_rate?: number | null | undefined;
    tax_inclusive?: boolean | null | undefined;
    sub_total?: number | null | undefined;
    total_amount: number;
    total_tax?: number | null | undefined;
    tax_code?: string | null | undefined;
    balance?: number | null | undefined;
    remaining_credit?: number | null | undefined;
    status?: string | undefined;
    reference?: string | null | undefined;
    date_issued?: string | undefined;
    date_paid?: string | null | undefined;
    type?: string | undefined;
    account?: LinkedLedgerAccount$Outbound | null | undefined;
    line_items?: Array<InvoiceLineItemInput$Outbound> | undefined;
    allocations?: Array<AllocationInput$Outbound> | undefined;
    note?: string | null | undefined;
    terms?: string | null | undefined;
    terms_id?: string | null | undefined;
    billing_address?: Address$Outbound | undefined;
    shipping_address?: Address$Outbound | undefined;
    tracking_categories?: Array<LinkedTrackingCategory$Outbound | null> | null | undefined;
    custom_fields?: Array<CustomField$Outbound> | undefined;
    row_version?: string | null | undefined;
    pass_through?: Array<PassThroughBody$Outbound> | undefined;
};
/** @internal */
export declare const CreditNoteInput$outboundSchema: z.ZodType<CreditNoteInput$Outbound, z.ZodTypeDef, CreditNoteInput>;
export declare function creditNoteInputToJSON(creditNoteInput: CreditNoteInput): string;
//# sourceMappingURL=creditnote.d.ts.map