import type { AcceptDateStrings } from '../../lib/wire.js'; import type { ChargePagePaginatedResponse, ListChargesParamsFilter, SortQueryInput } from '../types.js'; export interface ListChargesQuery { /** Determines which page of the collection to retrieve. */ page?: { size?: number; number?: number; }; /** * Sort charges returned in the response. * * Supported sort attributes are: * * - `id` * - `created_at` * - `service_period.from` * - `billing_period.from` */ sort?: SortQueryInput; /** * Filter charges. * * To filter charges by customer add the following query param: * `filter[customer_id][eq]=` or `filter[customer_id][oeq]=,`. * * To filter charges by status add the following query param: * `filter[status][oeq]=created,active` * * To filter charges by feature, use `filter[feature_id][oeq]=,` or * `filter[feature_key][oeq]=,`. * * See the `service_period_from` filter field for expressing a service-period * window query. */ filter?: ListChargesParamsFilter; /** * Expand full objects for referenced entities. * * Supported values are: * * - `real_time_usage`: Expand the charge's real-time usage; it sets the `usage` * and the `totals.realtime` fields. * - `customer`: Expand the charge's customer to the complete entity. * - `feature`: Expand the charge's feature to the complete entity. * - `subscription`: Expand the charge's subscription to the complete entity. * - `realization.invoice`: Expand each realization's invoice to the complete * entity. * - `realization.totals`: Expand each realization run's `totals`. * - `realization.detailed_lines`: Expand each realization run's `detailed_lines`. */ expand?: ('real_time_usage' | 'customer' | 'feature' | 'subscription' | 'realization.invoice' | 'realization.totals' | 'realization.detailed_lines')[]; } export type ListChargesRequest = AcceptDateStrings; export type ListChargesResponse = ChargePagePaginatedResponse;