# SubscriptionFilter

## Example Usage

```typescript
import { SubscriptionFilter } from "@flexprice/sdk/sdk/models";

let value: SubscriptionFilter = {};
```

## Fields

| Field                                                                                                                                                                                                                                                                                                                                                                               | Type                                                                                                                                                                                                                                                                                                                                                                                | Required                                                                                                                                                                                                                                                                                                                                                                            | Description                                                                                                                                                                                                                                                                                                                                                                         |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `activeAt`                                                                                                                                                                                                                                                                                                                                                                          | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)                                                                                                                                                                                                                                                                                       | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | ActiveAt filters subscriptions that are active at the given time                                                                                                                                                                                                                                                                                                                    |
| `billingCadence`                                                                                                                                                                                                                                                                                                                                                                    | [models.BillingCadence](../../sdk/models/billing-cadence.md)[]                                                                                                                                                                                                                                                                                                                      | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | BillingCadence filters by billing cadence                                                                                                                                                                                                                                                                                                                                           |
| `billingPeriod`                                                                                                                                                                                                                                                                                                                                                                     | [models.BillingPeriod](../../sdk/models/billing-period.md)[]                                                                                                                                                                                                                                                                                                                        | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | BillingPeriod filters by billing period                                                                                                                                                                                                                                                                                                                                             |
| `customerId`                                                                                                                                                                                                                                                                                                                                                                        | *string*                                                                                                                                                                                                                                                                                                                                                                            | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | CustomerID filters by customer ID                                                                                                                                                                                                                                                                                                                                                   |
| `customerIds`                                                                                                                                                                                                                                                                                                                                                                       | *string*[]                                                                                                                                                                                                                                                                                                                                                                          | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | CustomerIDs filters by customer IDs                                                                                                                                                                                                                                                                                                                                                 |
| `effectiveDateForUpdate`                                                                                                                                                                                                                                                                                                                                                            | *string*                                                                                                                                                                                                                                                                                                                                                                            | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | EffectiveDateForUpdate selects subscriptions that need a billing-period pass on or before this time:<br/>current_period_end <= date OR (cancel_at IS NOT NULL AND cancel_at <= date).<br/>When nil, period/cancel cutoff logic is not applied by this field (see TimeRangeFilter for legacy period-end filtering).                                                                  |
| `endTime`                                                                                                                                                                                                                                                                                                                                                                           | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)                                                                                                                                                                                                                                                                                       | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | N/A                                                                                                                                                                                                                                                                                                                                                                                 |
| `expand`                                                                                                                                                                                                                                                                                                                                                                            | *string*                                                                                                                                                                                                                                                                                                                                                                            | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | N/A                                                                                                                                                                                                                                                                                                                                                                                 |
| `externalCustomerId`                                                                                                                                                                                                                                                                                                                                                                | *string*                                                                                                                                                                                                                                                                                                                                                                            | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | ExternalCustomerID filters by external customer ID                                                                                                                                                                                                                                                                                                                                  |
| `filters`                                                                                                                                                                                                                                                                                                                                                                           | [models.FilterCondition](../../sdk/models/filter-condition.md)[]                                                                                                                                                                                                                                                                                                                    | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | N/A                                                                                                                                                                                                                                                                                                                                                                                 |
| `invoicingCustomerIds`                                                                                                                                                                                                                                                                                                                                                              | *string*[]                                                                                                                                                                                                                                                                                                                                                                          | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | InvoicingCustomerIDs filters by invoicing customer ID                                                                                                                                                                                                                                                                                                                               |
| `limit`                                                                                                                                                                                                                                                                                                                                                                             | *number*                                                                                                                                                                                                                                                                                                                                                                            | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | N/A                                                                                                                                                                                                                                                                                                                                                                                 |
| `offset`                                                                                                                                                                                                                                                                                                                                                                            | *number*                                                                                                                                                                                                                                                                                                                                                                            | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | N/A                                                                                                                                                                                                                                                                                                                                                                                 |
| `order`                                                                                                                                                                                                                                                                                                                                                                             | [models.SubscriptionFilterOrder](../../sdk/models/subscription-filter-order.md)                                                                                                                                                                                                                                                                                                     | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | N/A                                                                                                                                                                                                                                                                                                                                                                                 |
| `parentSubscriptionIds`                                                                                                                                                                                                                                                                                                                                                             | *string*[]                                                                                                                                                                                                                                                                                                                                                                          | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | ParentSubscriptionIDs filters by parent subscription IDs                                                                                                                                                                                                                                                                                                                            |
| `planId`                                                                                                                                                                                                                                                                                                                                                                            | *string*                                                                                                                                                                                                                                                                                                                                                                            | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | PlanID filters by plan ID                                                                                                                                                                                                                                                                                                                                                           |
| `sort`                                                                                                                                                                                                                                                                                                                                                                              | [models.SortCondition](../../sdk/models/sort-condition.md)[]                                                                                                                                                                                                                                                                                                                        | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | N/A                                                                                                                                                                                                                                                                                                                                                                                 |
| `startTime`                                                                                                                                                                                                                                                                                                                                                                         | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)                                                                                                                                                                                                                                                                                       | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | N/A                                                                                                                                                                                                                                                                                                                                                                                 |
| `status`                                                                                                                                                                                                                                                                                                                                                                            | [models.Status](../../sdk/models/status.md)                                                                                                                                                                                                                                                                                                                                         | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | N/A                                                                                                                                                                                                                                                                                                                                                                                 |
| `subscriptionIds`                                                                                                                                                                                                                                                                                                                                                                   | *string*[]                                                                                                                                                                                                                                                                                                                                                                          | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | N/A                                                                                                                                                                                                                                                                                                                                                                                 |
| `subscriptionStatus`                                                                                                                                                                                                                                                                                                                                                                | [models.SubscriptionStatus](../../sdk/models/subscription-status.md)[]                                                                                                                                                                                                                                                                                                              | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | SubscriptionStatus filters by subscription status                                                                                                                                                                                                                                                                                                                                   |
| `subscriptionType`                                                                                                                                                                                                                                                                                                                                                                  | [models.SubscriptionType](../../sdk/models/subscription-type.md)[]                                                                                                                                                                                                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | SubscriptionType filters by subscription type                                                                                                                                                                                                                                                                                                                                       |
| `trialEndDueLte`                                                                                                                                                                                                                                                                                                                                                                    | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)                                                                                                                                                                                                                                                                                       | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | TrialEndDueLTE, when set, restricts to subscriptions with trial_end not nil and trial_end <= trial_end_due_lte.<br/>Use with subscription_status trialing for trial-end cron processing.                                                                                                                                                                                            |
| `withCouponAssociations`                                                                                                                                                                                                                                                                                                                                                            | *boolean*                                                                                                                                                                                                                                                                                                                                                                           | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | WithCouponAssociations eager-loads coupon associations and their coupons.<br/><br/>Kept separate from WithLineItems because the coupon_associations table has no<br/>index leading with subscription_id, so Ent's edge load degrades to a full table<br/>scan. Only set it when the response actually surfaces the associations; the<br/>service layer back-fills it from expand="coupon_associations". |
| `withLineItems`                                                                                                                                                                                                                                                                                                                                                                     | *boolean*                                                                                                                                                                                                                                                                                                                                                                           | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                  | WithLineItems includes line items in the response.<br/><br/>Deprecated: use expand="subscription_line_items" instead. Retained for<br/>backwards compatibility and for internal callers that need to force-disable<br/>line item loading (set to false). The service layer ORs this with the<br/>expand check before invoking the repository.                                       |