import * as z from "zod/v4-mini";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
import { Address, Address$Outbound } from "./address.js";
import { DiscountFixedOnceForeverDurationBase, DiscountFixedOnceForeverDurationBase$Outbound } from "./discountfixedonceforeverdurationbase.js";
import { DiscountFixedRepeatDurationBase, DiscountFixedRepeatDurationBase$Outbound } from "./discountfixedrepeatdurationbase.js";
import { DiscountPercentageOnceForeverDurationBase, DiscountPercentageOnceForeverDurationBase$Outbound } from "./discountpercentageonceforeverdurationbase.js";
import { DiscountPercentageRepeatDurationBase, DiscountPercentageRepeatDurationBase$Outbound } from "./discountpercentagerepeatdurationbase.js";
import { MetadataOutputType, MetadataOutputType$Outbound } from "./metadataoutputtype.js";
import { OrderBillingReason } from "./orderbillingreason.js";
import { OrderCustomer, OrderCustomer$Outbound } from "./ordercustomer.js";
import { OrderItemSchema, OrderItemSchema$Outbound } from "./orderitemschema.js";
import { OrderProduct, OrderProduct$Outbound } from "./orderproduct.js";
import { OrderStatus } from "./orderstatus.js";
import { OrderSubscription, OrderSubscription$Outbound } from "./ordersubscription.js";
export type OrderCustomFieldData = string | number | boolean | Date;
export type OrderDiscount = DiscountFixedRepeatDurationBase | DiscountFixedOnceForeverDurationBase | DiscountPercentageRepeatDurationBase | DiscountPercentageOnceForeverDurationBase;
export type Order = {
    /**
     * The ID of the object.
     */
    id: string;
    /**
     * Creation timestamp of the object.
     */
    createdAt: Date;
    /**
     * Last modification timestamp of the object.
     */
    modifiedAt: Date | null;
    status: OrderStatus;
    /**
     * Whether the order has been paid for.
     */
    paid: boolean;
    /**
     * Amount in cents, before discounts and taxes.
     */
    subtotalAmount: number;
    /**
     * Discount amount in cents.
     */
    discountAmount: number;
    /**
     * Amount in cents, after discounts but before taxes.
     */
    netAmount: number;
    /**
     * Sales tax amount in cents.
     */
    taxAmount: number;
    /**
     * Amount in cents, after discounts and taxes.
     */
    totalAmount: number;
    /**
     * Customer's balance amount applied to this invoice. Can increase the total amount paid, if the customer has a negative balance,  or decrease it, if the customer has a positive balance.Amount in cents.
     */
    appliedBalanceAmount: number;
    /**
     * Amount in cents that is due for this order.
     */
    dueAmount: number;
    /**
     * Amount refunded in cents.
     */
    refundedAmount: number;
    /**
     * Sales tax refunded in cents.
     */
    refundedTaxAmount: number;
    currency: string;
    billingReason: OrderBillingReason;
    /**
     * The name of the customer that should appear on the invoice.
     */
    billingName: string | null;
    billingAddress: Address | null;
    /**
     * The invoice number associated with this order. `null` while the order is in `draft` status; assigned at finalize.
     */
    invoiceNumber: string | null;
    /**
     * Whether an invoice has been generated for this order.
     */
    isInvoiceGenerated: boolean;
    /**
     * The receipt number for this order. Set once the order is paid for organizations with receipts enabled. When set, a downloadable receipt PDF can be obtained via the receipt endpoint.
     */
    receiptNumber: string | null;
    /**
     * Number of seats purchased (for seat-based one-time orders).
     */
    seats?: number | null | undefined;
    customerId: string;
    productId: string | null;
    discountId: string | null;
    subscriptionId: string | null;
    checkoutId: string | null;
    /**
     * When the next automatic payment retry is scheduled. `null` if the order is not in dunning or all retries have been exhausted.
     */
    nextPaymentAttemptAt?: Date | null | undefined;
    metadata: {
        [k: string]: MetadataOutputType;
    };
    /**
     * Key-value object storing custom field values.
     */
    customFieldData?: {
        [k: string]: string | number | boolean | Date | null;
    } | undefined;
    /**
     * Platform fee amount in cents.
     */
    platformFeeAmount: number;
    /**
     * Currency of the platform fee.
     */
    platformFeeCurrency: string | null;
    customer: OrderCustomer;
    product: OrderProduct | null;
    discount: DiscountFixedRepeatDurationBase | DiscountFixedOnceForeverDurationBase | DiscountPercentageRepeatDurationBase | DiscountPercentageOnceForeverDurationBase | null;
    subscription: OrderSubscription | null;
    /**
     * Line items composing the order.
     */
    items: Array<OrderItemSchema>;
    /**
     * A summary description of the order.
     */
    description: string;
    /**
     * Amount in cents that can still be refunded (net, before taxes). Accounts for any applied customer balance and previous refunds.
     */
    refundableAmount: number;
    /**
     * Sales tax in cents that would be refunded if the full refundable amount is refunded.
     */
    refundableTaxAmount: number;
};
/** @internal */
export declare const OrderCustomFieldData$inboundSchema: z.ZodMiniType<OrderCustomFieldData, unknown>;
/** @internal */
export type OrderCustomFieldData$Outbound = string | number | boolean | string;
/** @internal */
export declare const OrderCustomFieldData$outboundSchema: z.ZodMiniType<OrderCustomFieldData$Outbound, OrderCustomFieldData>;
export declare function orderCustomFieldDataToJSON(orderCustomFieldData: OrderCustomFieldData): string;
export declare function orderCustomFieldDataFromJSON(jsonString: string): SafeParseResult<OrderCustomFieldData, SDKValidationError>;
/** @internal */
export declare const OrderDiscount$inboundSchema: z.ZodMiniType<OrderDiscount, unknown>;
/** @internal */
export type OrderDiscount$Outbound = DiscountFixedRepeatDurationBase$Outbound | DiscountFixedOnceForeverDurationBase$Outbound | DiscountPercentageRepeatDurationBase$Outbound | DiscountPercentageOnceForeverDurationBase$Outbound;
/** @internal */
export declare const OrderDiscount$outboundSchema: z.ZodMiniType<OrderDiscount$Outbound, OrderDiscount>;
export declare function orderDiscountToJSON(orderDiscount: OrderDiscount): string;
export declare function orderDiscountFromJSON(jsonString: string): SafeParseResult<OrderDiscount, SDKValidationError>;
/** @internal */
export declare const Order$inboundSchema: z.ZodMiniType<Order, unknown>;
/** @internal */
export type Order$Outbound = {
    id: string;
    created_at: string;
    modified_at: string | null;
    status: string;
    paid: boolean;
    subtotal_amount: number;
    discount_amount: number;
    net_amount: number;
    tax_amount: number;
    total_amount: number;
    applied_balance_amount: number;
    due_amount: number;
    refunded_amount: number;
    refunded_tax_amount: number;
    currency: string;
    billing_reason: string;
    billing_name: string | null;
    billing_address: Address$Outbound | null;
    invoice_number: string | null;
    is_invoice_generated: boolean;
    receipt_number: string | null;
    seats?: number | null | undefined;
    customer_id: string;
    product_id: string | null;
    discount_id: string | null;
    subscription_id: string | null;
    checkout_id: string | null;
    next_payment_attempt_at?: string | null | undefined;
    metadata: {
        [k: string]: MetadataOutputType$Outbound;
    };
    custom_field_data?: {
        [k: string]: string | number | boolean | string | null;
    } | undefined;
    platform_fee_amount: number;
    platform_fee_currency: string | null;
    customer: OrderCustomer$Outbound;
    product: OrderProduct$Outbound | null;
    discount: DiscountFixedRepeatDurationBase$Outbound | DiscountFixedOnceForeverDurationBase$Outbound | DiscountPercentageRepeatDurationBase$Outbound | DiscountPercentageOnceForeverDurationBase$Outbound | null;
    subscription: OrderSubscription$Outbound | null;
    items: Array<OrderItemSchema$Outbound>;
    description: string;
    refundable_amount: number;
    refundable_tax_amount: number;
};
/** @internal */
export declare const Order$outboundSchema: z.ZodMiniType<Order$Outbound, Order>;
export declare function orderToJSON(order: Order): string;
export declare function orderFromJSON(jsonString: string): SafeParseResult<Order, SDKValidationError>;
//# sourceMappingURL=order.d.ts.map