Skip to content
Open
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 .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.0.20"
".": "0.1.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 135
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-c28f76de0001bfa87ee1b13b38528823b96c236b51d3706bc7fbe2ef22ed1c96.yml
openapi_spec_hash: 8476411081a6a94534139b21c3cf74b7
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-4fe579c1f59d4d7b14f08207325df32c9261bb2bca524d114fb27618e4a7987f.yml
openapi_spec_hash: 24ce983a4a29faf534bf0512dfc5bdfb
config_hash: c4e43bac321badafc3ba52b6c6c4e646
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## 0.1.0 (2026-01-01)

Full Changelog: [v0.0.20...v0.1.0](https://github.com/whopio/whopsdk-python/compare/v0.0.20...v0.1.0)

### Features

* **api:** api update ([a94ed18](https://github.com/whopio/whopsdk-python/commit/a94ed183fe791304c081bce91b7ccbd4d886099a))
* **api:** api update ([1db8a0e](https://github.com/whopio/whopsdk-python/commit/1db8a0e90ce8aecdc98453d56666ff532ea5653b))
* **api:** api update ([67cbed8](https://github.com/whopio/whopsdk-python/commit/67cbed8c20b394d39c019ada21212537eb393ca4))
* **api:** api update ([4a91396](https://github.com/whopio/whopsdk-python/commit/4a91396f7231d325be8f0a5e019ddf9fc0cf9092))
* **api:** api update ([178a244](https://github.com/whopio/whopsdk-python/commit/178a244f1af3783a3fc0b2a894ff82b7004084a9))
* **api:** api update ([58e3e4f](https://github.com/whopio/whopsdk-python/commit/58e3e4fd76c5bee88c8c863766db5bc7a7a1228d))
* **api:** api update ([59b2893](https://github.com/whopio/whopsdk-python/commit/59b28939a8a030734004c16f6945f6bab277dbe5))


### Bug Fixes

* use async_to_httpx_files in patch method ([c3f1923](https://github.com/whopio/whopsdk-python/commit/c3f19234a7efea6c6048c09ae693839b5c7654ce))


### Chores

* **internal:** add `--fix` argument to lint script ([ee64709](https://github.com/whopio/whopsdk-python/commit/ee64709e6629563c7cce0733015c3dd2a7411e83))

## 0.0.20 (2025-12-16)

Full Changelog: [v0.0.19...v0.0.20](https://github.com/whopio/whopsdk-python/compare/v0.0.19...v0.0.20)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2025 Whop
Copyright 2026 Whop

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
1 change: 1 addition & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ from whop_sdk.types import (
WithdrawalCreatedWebhookEvent,
WithdrawalUpdatedWebhookEvent,
CourseLessonInteractionCompletedWebhookEvent,
PayoutMethodCreatedWebhookEvent,
PaymentCreatedWebhookEvent,
PaymentSucceededWebhookEvent,
PaymentFailedWebhookEvent,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "whop-sdk"
version = "0.0.20"
version = "0.1.0"
description = "The official Python library for the Whop API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
9 changes: 7 additions & 2 deletions scripts/lint
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ set -e

cd "$(dirname "$0")/.."

echo "==> Running lints"
rye run lint
if [ "$1" = "--fix" ]; then
echo "==> Running lints with --fix"
rye run fix:ruff
else
echo "==> Running lints"
rye run lint
fi

echo "==> Making sure it imports"
rye run python -c 'import whop_sdk'
2 changes: 1 addition & 1 deletion src/whop_sdk/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,7 @@ async def patch(
options: RequestOptions = {},
) -> ResponseT:
opts = FinalRequestOptions.construct(
method="patch", url=path, json_data=body, files=to_httpx_files(files), **options
method="patch", url=path, json_data=body, files=await async_to_httpx_files(files), **options

This comment was marked as outdated.

)
return await self.request(cast_to, opts)

Expand Down
2 changes: 1 addition & 1 deletion src/whop_sdk/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "whop_sdk"
__version__ = "0.0.20" # x-release-please-version
__version__ = "0.1.0" # x-release-please-version
54 changes: 38 additions & 16 deletions src/whop_sdk/resources/payment_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def retrieve(
self,
id: str,
*,
member_id: str,
company_id: Optional[str] | Omit = omit,
member_id: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -64,14 +65,16 @@ def retrieve(
such as a card, bank account, or digital wallet. It holds the necessary billing
details and can be attached to a member for future one-time or recurring
charges. This lets you reuse the same payment credentials across multiple
payments.
payments. You must provide exactly one of company_id or member_id.

Required permissions:

- `member:payment_methods:read`

Args:
member_id: The ID of the Member associated with the PaymentMethod
company_id: The ID of the Company. Provide either this or member_id (not both).

member_id: The ID of the Member. Provide either this or company_id (not both).

extra_headers: Send extra headers

Expand All @@ -93,7 +96,11 @@ def retrieve(
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{"member_id": member_id}, payment_method_retrieve_params.PaymentMethodRetrieveParams
{
"company_id": company_id,
"member_id": member_id,
},
Comment on lines 96 to +102

This comment was marked as outdated.

payment_method_retrieve_params.PaymentMethodRetrieveParams,
),
),
cast_to=cast(
Expand All @@ -105,14 +112,15 @@ def retrieve(
def list(
self,
*,
member_id: str,
after: Optional[str] | Omit = omit,
before: Optional[str] | Omit = omit,
company_id: Optional[str] | Omit = omit,
created_after: Union[str, datetime, None] | Omit = omit,
created_before: Union[str, datetime, None] | Omit = omit,
direction: Optional[Direction] | Omit = omit,
first: Optional[int] | Omit = omit,
last: Optional[int] | Omit = omit,
member_id: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -132,12 +140,12 @@ def list(
- `member:payment_methods:read`

Args:
member_id: The ID of the Member to list payment methods for

after: Returns the elements in the list that come after the specified cursor.

before: Returns the elements in the list that come before the specified cursor.

company_id: The ID of the Company. Provide either this or member_id (not both).

created_after: The minimum creation date to filter by

created_before: The maximum creation date to filter by
Expand All @@ -148,6 +156,8 @@ def list(

last: Returns the last _n_ elements from the list.

member_id: The ID of the Member to list payment methods for

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -166,14 +176,15 @@ def list(
timeout=timeout,
query=maybe_transform(
{
"member_id": member_id,
"after": after,
"before": before,
"company_id": company_id,
"created_after": created_after,
"created_before": created_before,
"direction": direction,
"first": first,
"last": last,
"member_id": member_id,
},
payment_method_list_params.PaymentMethodListParams,
),
Expand Down Expand Up @@ -208,7 +219,8 @@ async def retrieve(
self,
id: str,
*,
member_id: str,
company_id: Optional[str] | Omit = omit,
member_id: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -221,14 +233,16 @@ async def retrieve(
such as a card, bank account, or digital wallet. It holds the necessary billing
details and can be attached to a member for future one-time or recurring
charges. This lets you reuse the same payment credentials across multiple
payments.
payments. You must provide exactly one of company_id or member_id.

Required permissions:

- `member:payment_methods:read`

Args:
member_id: The ID of the Member associated with the PaymentMethod
company_id: The ID of the Company. Provide either this or member_id (not both).

member_id: The ID of the Member. Provide either this or company_id (not both).

extra_headers: Send extra headers

Expand All @@ -250,7 +264,11 @@ async def retrieve(
extra_body=extra_body,
timeout=timeout,
query=await async_maybe_transform(
{"member_id": member_id}, payment_method_retrieve_params.PaymentMethodRetrieveParams
{
"company_id": company_id,
"member_id": member_id,
},
payment_method_retrieve_params.PaymentMethodRetrieveParams,
),
),
cast_to=cast(
Expand All @@ -262,14 +280,15 @@ async def retrieve(
def list(
self,
*,
member_id: str,
after: Optional[str] | Omit = omit,
before: Optional[str] | Omit = omit,
company_id: Optional[str] | Omit = omit,
created_after: Union[str, datetime, None] | Omit = omit,
created_before: Union[str, datetime, None] | Omit = omit,
direction: Optional[Direction] | Omit = omit,
first: Optional[int] | Omit = omit,
last: Optional[int] | Omit = omit,
member_id: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -289,12 +308,12 @@ def list(
- `member:payment_methods:read`

Args:
member_id: The ID of the Member to list payment methods for

after: Returns the elements in the list that come after the specified cursor.

before: Returns the elements in the list that come before the specified cursor.

company_id: The ID of the Company. Provide either this or member_id (not both).

created_after: The minimum creation date to filter by

created_before: The maximum creation date to filter by
Expand All @@ -305,6 +324,8 @@ def list(

last: Returns the last _n_ elements from the list.

member_id: The ID of the Member to list payment methods for

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -323,14 +344,15 @@ def list(
timeout=timeout,
query=maybe_transform(
{
"member_id": member_id,
"after": after,
"before": before,
"company_id": company_id,
"created_after": created_after,
"created_before": created_before,
"direction": direction,
"first": first,
"last": last,
"member_id": member_id,
},
payment_method_list_params.PaymentMethodListParams,
),
Expand Down
Loading