import * as z from "zod"; import { ClosedEnum } 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, Allocation$Outbound, AllocationInput, AllocationInput$Outbound } from "./allocation.js"; import { Currency } from "./currency.js"; import { CustomField, CustomField$Outbound } from "./customfield.js"; import { CustomMappings, CustomMappings$Outbound } from "./custommappings.js"; import { InvoiceLineItem, InvoiceLineItem$Outbound, InvoiceLineItemInput, InvoiceLineItemInput$Outbound } from "./invoicelineitem.js"; import { LinkedCustomer, LinkedCustomer$Outbound } from "./linkedcustomer.js"; import { LinkedCustomerInput, LinkedCustomerInput$Outbound } from "./linkedcustomerinput.js"; import { LinkedLedgerAccount, LinkedLedgerAccount$Outbound } from "./linkedledgeraccount.js"; import { LinkedLedgerAccountInput, LinkedLedgerAccountInput$Outbound } from "./linkedledgeraccountinput.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 Paid: "paid"; readonly Voided: "voided"; readonly Deleted: "deleted"; }; /** * Status of credit notes */ export type CreditNoteStatus = ClosedEnum; /** * Type of payment */ export declare const CreditNoteType: { readonly AccountsReceivableCredit: "accounts_receivable_credit"; readonly AccountsPayableCredit: "accounts_payable_credit"; }; /** * Type of payment */ export type CreditNoteType = ClosedEnum; 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 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; /** * 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 | undefined; allocations?: Array | 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; billingAddress?: Address | undefined; shippingAddress?: Address | 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; customFields?: Array | 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 CreditNoteInput = { /** * Credit note number. */ number?: string | null | undefined; /** * The customer this entity is linked to. */ customer?: LinkedCustomerInput | 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; /** * 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?: LinkedLedgerAccountInput | null | undefined; lineItems?: Array | undefined; allocations?: Array | 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; billingAddress?: Address | undefined; shippingAddress?: Address | undefined; /** * A list of linked tracking categories. */ trackingCategories?: Array | null | undefined; customFields?: Array | 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 CreditNoteStatus$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const CreditNoteStatus$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 CreditNoteStatus$ { /** @deprecated use `CreditNoteStatus$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly Draft: "draft"; readonly Authorised: "authorised"; readonly Paid: "paid"; readonly Voided: "voided"; readonly Deleted: "deleted"; }>; /** @deprecated use `CreditNoteStatus$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly Draft: "draft"; readonly Authorised: "authorised"; readonly Paid: "paid"; readonly Voided: "voided"; readonly Deleted: "deleted"; }>; } /** @internal */ export declare const CreditNoteType$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const CreditNoteType$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 CreditNoteType$ { /** @deprecated use `CreditNoteType$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly AccountsReceivableCredit: "accounts_receivable_credit"; readonly AccountsPayableCredit: "accounts_payable_credit"; }>; /** @deprecated use `CreditNoteType$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly AccountsReceivableCredit: "accounts_receivable_credit"; readonly AccountsPayableCredit: "accounts_payable_credit"; }>; } /** @internal */ export declare const CreditNote$inboundSchema: z.ZodType; /** @internal */ export type CreditNote$Outbound = { id: string; number?: string | null | undefined; customer?: LinkedCustomer$Outbound | null | undefined; company_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 | undefined; allocations?: Array | undefined; note?: string | null | undefined; terms?: string | null | undefined; billing_address?: Address$Outbound | undefined; shipping_address?: Address$Outbound | undefined; tracking_categories?: Array | null | undefined; custom_mappings?: CustomMappings$Outbound | null | undefined; custom_fields?: Array | 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 CreditNote$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 CreditNote$ { /** @deprecated use `CreditNote$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `CreditNote$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `CreditNote$Outbound` instead. */ type Outbound = CreditNote$Outbound; } export declare function creditNoteToJSON(creditNote: CreditNote): string; export declare function creditNoteFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const CreditNoteInput$inboundSchema: z.ZodType; /** @internal */ export type CreditNoteInput$Outbound = { number?: string | null | undefined; customer?: LinkedCustomerInput$Outbound | null | undefined; company_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?: LinkedLedgerAccountInput$Outbound | null | undefined; line_items?: Array | undefined; allocations?: Array | undefined; note?: string | null | undefined; terms?: string | null | undefined; billing_address?: Address$Outbound | undefined; shipping_address?: Address$Outbound | undefined; tracking_categories?: Array | null | undefined; custom_fields?: Array | undefined; row_version?: string | null | undefined; pass_through?: Array | undefined; }; /** @internal */ export declare const CreditNoteInput$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 CreditNoteInput$ { /** @deprecated use `CreditNoteInput$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `CreditNoteInput$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `CreditNoteInput$Outbound` instead. */ type Outbound = CreditNoteInput$Outbound; } export declare function creditNoteInputToJSON(creditNoteInput: CreditNoteInput): string; export declare function creditNoteInputFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=creditnote.d.ts.map