| 1 |
# -*- coding: utf-8 -*- |
| 2 |
# File generated from our OpenAPI spec |
| 3 |
from stripe._request_options import RequestOptions |
| 4 |
from typing import List |
| 5 |
from typing_extensions import Literal, NotRequired, TypedDict |
| 6 |
|
| 7 |
|
| 8 |
class SubscriptionListParams(RequestOptions): |
| 9 |
automatic_tax: NotRequired["SubscriptionListParamsAutomaticTax"] |
| 10 |
""" |
| 11 |
Filter subscriptions by their automatic tax settings. |
| 12 |
""" |
| 13 |
collection_method: NotRequired[ |
| 14 |
Literal["charge_automatically", "send_invoice"] |
| 15 |
] |
| 16 |
""" |
| 17 |
The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. |
| 18 |
""" |
| 19 |
created: NotRequired["SubscriptionListParamsCreated|int"] |
| 20 |
""" |
| 21 |
Only return subscriptions that were created during the given date interval. |
| 22 |
""" |
| 23 |
current_period_end: NotRequired[ |
| 24 |
"SubscriptionListParamsCurrentPeriodEnd|int" |
| 25 |
] |
| 26 |
""" |
| 27 |
Only return subscriptions whose minimum item current_period_end falls within the given date interval. |
| 28 |
""" |
| 29 |
current_period_start: NotRequired[ |
| 30 |
"SubscriptionListParamsCurrentPeriodStart|int" |
| 31 |
] |
| 32 |
""" |
| 33 |
Only return subscriptions whose maximum item current_period_start falls within the given date interval. |
| 34 |
""" |
| 35 |
customer: NotRequired[str] |
| 36 |
""" |
| 37 |
The ID of the customer whose subscriptions you're retrieving. |
| 38 |
""" |
| 39 |
customer_account: NotRequired[str] |
| 40 |
""" |
| 41 |
The ID of the account representing the customer whose subscriptions you're retrieving. |
| 42 |
""" |
| 43 |
ending_before: NotRequired[str] |
| 44 |
""" |
| 45 |
A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. |
| 46 |
""" |
| 47 |
expand: NotRequired[List[str]] |
| 48 |
""" |
| 49 |
Specifies which fields in the response should be expanded. |
| 50 |
""" |
| 51 |
limit: NotRequired[int] |
| 52 |
""" |
| 53 |
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. |
| 54 |
""" |
| 55 |
plan: NotRequired[str] |
| 56 |
""" |
| 57 |
The ID of the plan whose subscriptions will be retrieved. |
| 58 |
""" |
| 59 |
price: NotRequired[str] |
| 60 |
""" |
| 61 |
Filter for subscriptions that contain this recurring price ID. |
| 62 |
""" |
| 63 |
starting_after: NotRequired[str] |
| 64 |
""" |
| 65 |
A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. |
| 66 |
""" |
| 67 |
status: NotRequired[ |
| 68 |
Literal[ |
| 69 |
"active", |
| 70 |
"all", |
| 71 |
"canceled", |
| 72 |
"ended", |
| 73 |
"incomplete", |
| 74 |
"incomplete_expired", |
| 75 |
"past_due", |
| 76 |
"paused", |
| 77 |
"trialing", |
| 78 |
"unpaid", |
| 79 |
] |
| 80 |
] |
| 81 |
""" |
| 82 |
The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://docs.stripe.com/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. |
| 83 |
""" |
| 84 |
test_clock: NotRequired[str] |
| 85 |
""" |
| 86 |
Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set. |
| 87 |
""" |
| 88 |
|
| 89 |
|
| 90 |
class SubscriptionListParamsAutomaticTax(TypedDict): |
| 91 |
enabled: bool |
| 92 |
""" |
| 93 |
Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. |
| 94 |
""" |
| 95 |
|
| 96 |
|
| 97 |
class SubscriptionListParamsCreated(TypedDict): |
| 98 |
gt: NotRequired[int] |
| 99 |
""" |
| 100 |
Minimum value to filter by (exclusive) |
| 101 |
""" |
| 102 |
gte: NotRequired[int] |
| 103 |
""" |
| 104 |
Minimum value to filter by (inclusive) |
| 105 |
""" |
| 106 |
lt: NotRequired[int] |
| 107 |
""" |
| 108 |
Maximum value to filter by (exclusive) |
| 109 |
""" |
| 110 |
lte: NotRequired[int] |
| 111 |
""" |
| 112 |
Maximum value to filter by (inclusive) |
| 113 |
""" |
| 114 |
|
| 115 |
|
| 116 |
class SubscriptionListParamsCurrentPeriodEnd(TypedDict): |
| 117 |
gt: NotRequired[int] |
| 118 |
""" |
| 119 |
Minimum value to filter by (exclusive) |
| 120 |
""" |
| 121 |
gte: NotRequired[int] |
| 122 |
""" |
| 123 |
Minimum value to filter by (inclusive) |
| 124 |
""" |
| 125 |
lt: NotRequired[int] |
| 126 |
""" |
| 127 |
Maximum value to filter by (exclusive) |
| 128 |
""" |
| 129 |
lte: NotRequired[int] |
| 130 |
""" |
| 131 |
Maximum value to filter by (inclusive) |
| 132 |
""" |
| 133 |
|
| 134 |
|
| 135 |
class SubscriptionListParamsCurrentPeriodStart(TypedDict): |
| 136 |
gt: NotRequired[int] |
| 137 |
""" |
| 138 |
Minimum value to filter by (exclusive) |
| 139 |
""" |
| 140 |
gte: NotRequired[int] |
| 141 |
""" |
| 142 |
Minimum value to filter by (inclusive) |
| 143 |
""" |
| 144 |
lt: NotRequired[int] |
| 145 |
""" |
| 146 |
Maximum value to filter by (exclusive) |
| 147 |
""" |
| 148 |
lte: NotRequired[int] |
| 149 |
""" |
| 150 |
Maximum value to filter by (inclusive) |
| 151 |
""" |