import { APIResource } from "../core/resource.js"; import { APIPromise } from "../core/api-promise.js"; import { RequestOptions } from "../internal/request-options.js"; export declare class Customers extends APIResource { /** * Get unique customers for a creator */ list(query?: CustomerListParams | null | undefined, options?: RequestOptions): APIPromise; /** * Charge a customer using a specific payment method */ charge(customerID: string, body?: CustomerChargeParams | null | undefined, options?: RequestOptions): APIPromise; /** * Get saved payment methods for a customer */ retrievePaymentMethods(customerID: string, options?: RequestOptions): APIPromise; } export interface CustomerListResponse { data?: CustomerListResponse.Data; message?: string; status?: string; } export declare namespace CustomerListResponse { interface Data { customers?: Array; pagination?: Data.Pagination; } namespace Data { interface Customer { id?: string; country_code?: string | null; email?: string; last_transaction_date?: string; name?: string; phone?: string | null; total_spent?: number; total_transactions?: number; } interface Pagination { current_page?: number; has_more?: boolean; per_page?: number; total_items?: number; total_pages?: number; } } } export interface CustomerChargeResponse { data?: CustomerChargeResponse.Data; message?: string; status?: string; } export declare namespace CustomerChargeResponse { interface Data { amount?: number; charge_id?: string; created_at?: string; status?: string; } } export interface CustomerRetrievePaymentMethodsResponse { data?: CustomerRetrievePaymentMethodsResponse.Data; message?: string; status?: string; } export declare namespace CustomerRetrievePaymentMethodsResponse { interface Data { customer?: Data.Customer; payment_methods?: Array; } namespace Data { interface Customer { id?: string; email?: string; name?: string; } interface PaymentMethod { id?: string; brand?: string | null; exp_month?: number | null; exp_year?: number | null; is_default?: boolean | null; last4?: string | null; type?: string; } } } export interface CustomerListParams { /** * Page number for pagination */ page?: number; /** * Number of items per page */ per_page?: number; /** * Search term to filter customers by email, name, or phone */ search?: string; } export interface CustomerChargeParams { amount_cents?: number; description?: string; metadata?: { [key: string]: unknown; }; payment_method_id?: string; } export declare namespace Customers { export { type CustomerListResponse as CustomerListResponse, type CustomerChargeResponse as CustomerChargeResponse, type CustomerRetrievePaymentMethodsResponse as CustomerRetrievePaymentMethodsResponse, type CustomerListParams as CustomerListParams, type CustomerChargeParams as CustomerChargeParams, }; } //# sourceMappingURL=customers.d.ts.map