Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"standardwebhooks": ">=1.0.1,<2"
}
},
"originGitCommit": "b997d8e562a0cd10912f9d5375336f9c4319f488",
"originGitCommit": "ecad5a5d0f90b1f058f39ae980c200701e10e3e1",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "2.8.1",
Expand Down
8 changes: 7 additions & 1 deletion .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -27534,6 +27534,14 @@ client.invoices.create(
<dl>
<dd>

**subscription_starts_at:** `typing.Optional[datetime.datetime]` — When the first billing period of the invoice's recurring items starts, as an ISO 8601 timestamp in the future. Renewals count from this moment. `null` starts the period when the invoice is paid. Needs a recurring item. Can be updated on drafts. A start date replaces a variant's free trial, and the invoice bills the full price.

</dd>
</dl>

<dl>
<dd>

**time_zone:** `typing.Optional[str]` — The IANA time zone for the dates on the invoice's email and PDF. Set it so the due date reads as the day you picked. When omitted, a new invoice uses the time zone Whop has for the user creating it, else UTC. Can be updated on drafts.

</dd>
Expand Down Expand Up @@ -27849,6 +27857,14 @@ client.invoices.update(
<dl>
<dd>

**subscription_starts_at:** `typing.Optional[datetime.datetime]` — When the first billing period of the invoice's recurring items starts, as an ISO 8601 timestamp in the future. Renewals count from this moment. `null` starts the period when the invoice is paid. Needs a recurring item. Can be updated on drafts. A start date replaces a variant's free trial, and the invoice bills the full price.

</dd>
</dl>

<dl>
<dd>

**time_zone:** `typing.Optional[str]` — The IANA time zone for the dates on the invoice's email and PDF. Set it so the due date reads as the day you picked. When omitted, a new invoice uses the time zone Whop has for the user creating it, else UTC. Can be updated on drafts.

</dd>
Expand Down
20 changes: 20 additions & 0 deletions src/whop_sdk/invoices/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ def create(
payment_method_configuration: typing.Optional[CreateInvoicesRequestPaymentMethodConfiguration] = OMIT,
payment_method_id: typing.Optional[str] = OMIT,
recipient_emails: typing.Optional[typing.Sequence[str]] = OMIT,
subscription_starts_at: typing.Optional[dt.datetime] = OMIT,
time_zone: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> Invoice:
Expand Down Expand Up @@ -233,6 +234,9 @@ def create(
recipient_emails : typing.Optional[typing.Sequence[str]]
Email addresses saved for invoice delivery, independent of the billed customer. Saving them sends no email. Defaults to the customer email when omitted on create. Can be updated on draft, open, or uncollectible invoices.

subscription_starts_at : typing.Optional[dt.datetime]
When the first billing period of the invoice's recurring items starts, as an ISO 8601 timestamp in the future. Renewals count from this moment. `null` starts the period when the invoice is paid. Needs a recurring item. Can be updated on drafts. A start date replaces a variant's free trial, and the invoice bills the full price.

time_zone : typing.Optional[str]
The IANA time zone for the dates on the invoice's email and PDF. Set it so the due date reads as the day you picked. When omitted, a new invoice uses the time zone Whop has for the user creating it, else UTC. Can be updated on drafts.

Expand Down Expand Up @@ -273,6 +277,7 @@ def create(
payment_method_configuration=payment_method_configuration,
payment_method_id=payment_method_id,
recipient_emails=recipient_emails,
subscription_starts_at=subscription_starts_at,
time_zone=time_zone,
request_options=request_options,
)
Expand Down Expand Up @@ -359,6 +364,7 @@ def update(
payment_method_configuration: typing.Optional[UpdateInvoicesRequestPaymentMethodConfiguration] = OMIT,
payment_method_id: typing.Optional[str] = OMIT,
recipient_emails: typing.Optional[typing.Sequence[str]] = OMIT,
subscription_starts_at: typing.Optional[dt.datetime] = OMIT,
time_zone: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> Invoice:
Expand Down Expand Up @@ -403,6 +409,9 @@ def update(
recipient_emails : typing.Optional[typing.Sequence[str]]
Email addresses saved for invoice delivery, independent of the billed customer. Saving them sends no email. Defaults to the customer email when omitted on create. Can be updated on draft, open, or uncollectible invoices.

subscription_starts_at : typing.Optional[dt.datetime]
When the first billing period of the invoice's recurring items starts, as an ISO 8601 timestamp in the future. Renewals count from this moment. `null` starts the period when the invoice is paid. Needs a recurring item. Can be updated on drafts. A start date replaces a variant's free trial, and the invoice bills the full price.

time_zone : typing.Optional[str]
The IANA time zone for the dates on the invoice's email and PDF. Set it so the due date reads as the day you picked. When omitted, a new invoice uses the time zone Whop has for the user creating it, else UTC. Can be updated on drafts.

Expand Down Expand Up @@ -440,6 +449,7 @@ def update(
payment_method_configuration=payment_method_configuration,
payment_method_id=payment_method_id,
recipient_emails=recipient_emails,
subscription_starts_at=subscription_starts_at,
time_zone=time_zone,
request_options=request_options,
)
Expand Down Expand Up @@ -903,6 +913,7 @@ async def create(
payment_method_configuration: typing.Optional[CreateInvoicesRequestPaymentMethodConfiguration] = OMIT,
payment_method_id: typing.Optional[str] = OMIT,
recipient_emails: typing.Optional[typing.Sequence[str]] = OMIT,
subscription_starts_at: typing.Optional[dt.datetime] = OMIT,
time_zone: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> Invoice:
Expand Down Expand Up @@ -953,6 +964,9 @@ async def create(
recipient_emails : typing.Optional[typing.Sequence[str]]
Email addresses saved for invoice delivery, independent of the billed customer. Saving them sends no email. Defaults to the customer email when omitted on create. Can be updated on draft, open, or uncollectible invoices.

subscription_starts_at : typing.Optional[dt.datetime]
When the first billing period of the invoice's recurring items starts, as an ISO 8601 timestamp in the future. Renewals count from this moment. `null` starts the period when the invoice is paid. Needs a recurring item. Can be updated on drafts. A start date replaces a variant's free trial, and the invoice bills the full price.

time_zone : typing.Optional[str]
The IANA time zone for the dates on the invoice's email and PDF. Set it so the due date reads as the day you picked. When omitted, a new invoice uses the time zone Whop has for the user creating it, else UTC. Can be updated on drafts.

Expand Down Expand Up @@ -1001,6 +1015,7 @@ async def main() -> None:
payment_method_configuration=payment_method_configuration,
payment_method_id=payment_method_id,
recipient_emails=recipient_emails,
subscription_starts_at=subscription_starts_at,
time_zone=time_zone,
request_options=request_options,
)
Expand Down Expand Up @@ -1105,6 +1120,7 @@ async def update(
payment_method_configuration: typing.Optional[UpdateInvoicesRequestPaymentMethodConfiguration] = OMIT,
payment_method_id: typing.Optional[str] = OMIT,
recipient_emails: typing.Optional[typing.Sequence[str]] = OMIT,
subscription_starts_at: typing.Optional[dt.datetime] = OMIT,
time_zone: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> Invoice:
Expand Down Expand Up @@ -1149,6 +1165,9 @@ async def update(
recipient_emails : typing.Optional[typing.Sequence[str]]
Email addresses saved for invoice delivery, independent of the billed customer. Saving them sends no email. Defaults to the customer email when omitted on create. Can be updated on draft, open, or uncollectible invoices.

subscription_starts_at : typing.Optional[dt.datetime]
When the first billing period of the invoice's recurring items starts, as an ISO 8601 timestamp in the future. Renewals count from this moment. `null` starts the period when the invoice is paid. Needs a recurring item. Can be updated on drafts. A start date replaces a variant's free trial, and the invoice bills the full price.

time_zone : typing.Optional[str]
The IANA time zone for the dates on the invoice's email and PDF. Set it so the due date reads as the day you picked. When omitted, a new invoice uses the time zone Whop has for the user creating it, else UTC. Can be updated on drafts.

Expand Down Expand Up @@ -1194,6 +1213,7 @@ async def main() -> None:
payment_method_configuration=payment_method_configuration,
payment_method_id=payment_method_id,
recipient_emails=recipient_emails,
subscription_starts_at=subscription_starts_at,
time_zone=time_zone,
request_options=request_options,
)
Expand Down
20 changes: 20 additions & 0 deletions src/whop_sdk/invoices/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ def create(
payment_method_configuration: typing.Optional[CreateInvoicesRequestPaymentMethodConfiguration] = OMIT,
payment_method_id: typing.Optional[str] = OMIT,
recipient_emails: typing.Optional[typing.Sequence[str]] = OMIT,
subscription_starts_at: typing.Optional[dt.datetime] = OMIT,
time_zone: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[Invoice]:
Expand Down Expand Up @@ -306,6 +307,9 @@ def create(
recipient_emails : typing.Optional[typing.Sequence[str]]
Email addresses saved for invoice delivery, independent of the billed customer. Saving them sends no email. Defaults to the customer email when omitted on create. Can be updated on draft, open, or uncollectible invoices.

subscription_starts_at : typing.Optional[dt.datetime]
When the first billing period of the invoice's recurring items starts, as an ISO 8601 timestamp in the future. Renewals count from this moment. `null` starts the period when the invoice is paid. Needs a recurring item. Can be updated on drafts. A start date replaces a variant's free trial, and the invoice bills the full price.

time_zone : typing.Optional[str]
The IANA time zone for the dates on the invoice's email and PDF. Set it so the due date reads as the day you picked. When omitted, a new invoice uses the time zone Whop has for the user creating it, else UTC. Can be updated on drafts.

Expand Down Expand Up @@ -346,6 +350,7 @@ def create(
),
"payment_method_id": payment_method_id,
"recipient_emails": recipient_emails,
"subscription_starts_at": subscription_starts_at,
"time_zone": time_zone,
},
headers={
Expand Down Expand Up @@ -595,6 +600,7 @@ def update(
payment_method_configuration: typing.Optional[UpdateInvoicesRequestPaymentMethodConfiguration] = OMIT,
payment_method_id: typing.Optional[str] = OMIT,
recipient_emails: typing.Optional[typing.Sequence[str]] = OMIT,
subscription_starts_at: typing.Optional[dt.datetime] = OMIT,
time_zone: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[Invoice]:
Expand Down Expand Up @@ -639,6 +645,9 @@ def update(
recipient_emails : typing.Optional[typing.Sequence[str]]
Email addresses saved for invoice delivery, independent of the billed customer. Saving them sends no email. Defaults to the customer email when omitted on create. Can be updated on draft, open, or uncollectible invoices.

subscription_starts_at : typing.Optional[dt.datetime]
When the first billing period of the invoice's recurring items starts, as an ISO 8601 timestamp in the future. Renewals count from this moment. `null` starts the period when the invoice is paid. Needs a recurring item. Can be updated on drafts. A start date replaces a variant's free trial, and the invoice bills the full price.

time_zone : typing.Optional[str]
The IANA time zone for the dates on the invoice's email and PDF. Set it so the due date reads as the day you picked. When omitted, a new invoice uses the time zone Whop has for the user creating it, else UTC. Can be updated on drafts.

Expand Down Expand Up @@ -676,6 +685,7 @@ def update(
),
"payment_method_id": payment_method_id,
"recipient_emails": recipient_emails,
"subscription_starts_at": subscription_starts_at,
"time_zone": time_zone,
},
headers={
Expand Down Expand Up @@ -1627,6 +1637,7 @@ async def create(
payment_method_configuration: typing.Optional[CreateInvoicesRequestPaymentMethodConfiguration] = OMIT,
payment_method_id: typing.Optional[str] = OMIT,
recipient_emails: typing.Optional[typing.Sequence[str]] = OMIT,
subscription_starts_at: typing.Optional[dt.datetime] = OMIT,
time_zone: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[Invoice]:
Expand Down Expand Up @@ -1677,6 +1688,9 @@ async def create(
recipient_emails : typing.Optional[typing.Sequence[str]]
Email addresses saved for invoice delivery, independent of the billed customer. Saving them sends no email. Defaults to the customer email when omitted on create. Can be updated on draft, open, or uncollectible invoices.

subscription_starts_at : typing.Optional[dt.datetime]
When the first billing period of the invoice's recurring items starts, as an ISO 8601 timestamp in the future. Renewals count from this moment. `null` starts the period when the invoice is paid. Needs a recurring item. Can be updated on drafts. A start date replaces a variant's free trial, and the invoice bills the full price.

time_zone : typing.Optional[str]
The IANA time zone for the dates on the invoice's email and PDF. Set it so the due date reads as the day you picked. When omitted, a new invoice uses the time zone Whop has for the user creating it, else UTC. Can be updated on drafts.

Expand Down Expand Up @@ -1717,6 +1731,7 @@ async def create(
),
"payment_method_id": payment_method_id,
"recipient_emails": recipient_emails,
"subscription_starts_at": subscription_starts_at,
"time_zone": time_zone,
},
headers={
Expand Down Expand Up @@ -1968,6 +1983,7 @@ async def update(
payment_method_configuration: typing.Optional[UpdateInvoicesRequestPaymentMethodConfiguration] = OMIT,
payment_method_id: typing.Optional[str] = OMIT,
recipient_emails: typing.Optional[typing.Sequence[str]] = OMIT,
subscription_starts_at: typing.Optional[dt.datetime] = OMIT,
time_zone: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[Invoice]:
Expand Down Expand Up @@ -2012,6 +2028,9 @@ async def update(
recipient_emails : typing.Optional[typing.Sequence[str]]
Email addresses saved for invoice delivery, independent of the billed customer. Saving them sends no email. Defaults to the customer email when omitted on create. Can be updated on draft, open, or uncollectible invoices.

subscription_starts_at : typing.Optional[dt.datetime]
When the first billing period of the invoice's recurring items starts, as an ISO 8601 timestamp in the future. Renewals count from this moment. `null` starts the period when the invoice is paid. Needs a recurring item. Can be updated on drafts. A start date replaces a variant's free trial, and the invoice bills the full price.

time_zone : typing.Optional[str]
The IANA time zone for the dates on the invoice's email and PDF. Set it so the due date reads as the day you picked. When omitted, a new invoice uses the time zone Whop has for the user creating it, else UTC. Can be updated on drafts.

Expand Down Expand Up @@ -2049,6 +2068,7 @@ async def update(
),
"payment_method_id": payment_method_id,
"recipient_emails": recipient_emails,
"subscription_starts_at": subscription_starts_at,
"time_zone": time_zone,
},
headers={
Expand Down
5 changes: 5 additions & 0 deletions src/whop_sdk/types/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ class Invoice(UniversalBaseModel):
"""

status: InvoiceStatus
subscription_starts_at: typing.Optional[str] = pydantic.Field(default=None)
"""
When the first billing period of the invoice's recurring items starts, as an ISO 8601 timestamp. Renewals count from this moment. `null` starts the period when the invoice is paid, and so does a time that has passed by then. An invoice with a start date skips its variants' free trial.
"""

subtotal: Money
tax_amount: typing.Optional[Money] = None
time_zone: str = pydantic.Field()
Expand Down
Loading