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": "55b208b8f227a5947de9c2bf849ddf06375d5e7d",
"originGitCommit": "b80eac0615e24d2cdfc26297d0bbd053c8e5cf35",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "1.0.14",
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.

250 changes: 125 additions & 125 deletions poetry.lock

Large diffs are not rendered by default.

147 changes: 141 additions & 6 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1298,6 +1298,14 @@ client.accounts.transfer_ownership(
<dl>
<dd>

**message:** `typing.Optional[str]` — A note from the partner, shown as a quote in the invite email and signed with their name. Requires `as_partner`; sending it on an ordinary transfer is a 400. Omit it and the email sends without a note.

</dd>
</dl>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
Expand Down Expand Up @@ -4229,7 +4237,7 @@ client.ads.create()
<dl>
<dd>

**url_parameters:** `typing.Optional[typing.Dict[str, typing.Any]]` — Query parameters to append to the destination URL, keyed by parameter name. Merged with any query string on `url`. Whop adds its own click-attribution parameters; those are reserved and rejected if you set them (utm_meta_ad_id, utm_meta_adset_id, utm_meta_campaign_id, utm_source, utm_placement, utm_medium, utm_content, utm_adset, utm_whop, wacid, wasid, waid, tw_source, tw_adid).
**url_parameters:** `typing.Optional[typing.Dict[str, typing.Any]]` — Query parameters to append to the destination URL, keyed by parameter name. Merged with any query string on `url`. Whop adds its own click-attribution parameters; those are reserved and rejected if you set them. Which keys are reserved depends on the ad's network — Meta: utm_meta_ad_id, utm_meta_adset_id, utm_meta_campaign_id, utm_source, utm_placement, utm_medium, utm_content, utm_adset, utm_whop, wacid, wasid, waid, tw_source, tw_adid; TikTok: waid, wasid, wacid, ad_id, adset_id, campaign_id, utm_source, utm_medium, utm_placement, utm_whop, tw_source, tw_adid.

</dd>
</dl>
Expand Down Expand Up @@ -4600,7 +4608,7 @@ client.ads.update(
<dl>
<dd>

**url_parameters:** `typing.Optional[typing.Dict[str, typing.Any]]` — Query parameters to append to the destination URL, keyed by parameter name. Merged with any query string on `url`. Whop adds its own click-attribution parameters; those are reserved and rejected if you set them (utm_meta_ad_id, utm_meta_adset_id, utm_meta_campaign_id, utm_source, utm_placement, utm_medium, utm_content, utm_adset, utm_whop, wacid, wasid, waid, tw_source, tw_adid).
**url_parameters:** `typing.Optional[typing.Dict[str, typing.Any]]` — Query parameters to append to the destination URL, keyed by parameter name. Merged with any query string on `url`. Whop adds its own click-attribution parameters; those are reserved and rejected if you set them. Which keys are reserved depends on the ad's network — Meta: utm_meta_ad_id, utm_meta_adset_id, utm_meta_campaign_id, utm_source, utm_placement, utm_medium, utm_content, utm_adset, utm_whop, wacid, wasid, waid, tw_source, tw_adid; TikTok: waid, wasid, wacid, ad_id, adset_id, campaign_id, utm_source, utm_medium, utm_placement, utm_whop, tw_source, tw_adid.

</dd>
</dl>
Expand Down Expand Up @@ -17186,7 +17194,7 @@ client.events.list()
<dl>
<dd>

**source:** `typing.Optional[str]` — Canonical source path, exact or with a trailing :* prefix (whop:<campaign>:*, ext:meta:*, referrer:<domain>, direct). Restricts the list to conversion targets attributed to that source — the debuggability twin of a metric cell's source parameter.
**source:** `typing.Optional[str]` — Canonical source path, exact or with a trailing :* prefix (whop:<campaign>:*, ext:meta:*, referrer:<domain>, direct). Restricts the list to conversion targets attributed to that source — the debuggability twin of a metric cell's source parameter. A whop:... source combined with non-conversion event names (event=pixel.page) instead lists the events whose ad click resolved to that entity — the page views an ad drove.

</dd>
</dl>
Expand Down Expand Up @@ -19222,7 +19230,7 @@ client.files.list(
<dl>
<dd>

Creates a file and returns a presigned destination to upload its bytes to. PUT the bytes to `upload_url` (single-part), or to each of `multipart_upload_urls` and then call Complete File Multipart Upload. Once the bytes land the file becomes `ready`, and its ID can be attached wherever a file is accepted — account legal documents, dispute evidence documents.
Creates a file and returns a presigned destination to upload its bytes to. PUT the bytes to `upload_url` (single-part), or to each of `multipart_upload_urls` and then call Complete File Multipart Upload. Once the bytes land the file becomes `ready`, and its ID can be attached wherever a file is accepted — account legal documents, dispute evidence documents. For a step-by-step walkthrough of single-part and multipart uploads, see the [direct file uploads guide](/developer/guides/direct-file-uploads).
</dd>
</dl>
</dd>
Expand Down Expand Up @@ -19392,7 +19400,7 @@ client.files.retrieve(
<dl>
<dd>

Assembles the parts of a multipart upload after every part has been PUT to its presigned URL. Pass the `multipart_upload_id` from Create File and each part's `ETag` response header.
Assembles the parts of a multipart upload after every part has been PUT to its presigned URL. Pass the `multipart_upload_id` from Create File and each part's `ETag` response header. For a step-by-step walkthrough of multipart uploads, see the [direct file uploads guide](/developer/guides/direct-file-uploads).
</dd>
</dl>
</dd>
Expand Down Expand Up @@ -19577,6 +19585,14 @@ client.financial_activity.list()
<dl>
<dd>

**resource_id:** `typing.Optional[str]` — Optional prefixed resource ID. Returns activity associated with that resource.

</dd>
</dl>

<dl>
<dd>

**currency:** `typing.Optional[str]` — Optional currency code filter, for example `usd`.

</dd>
Expand Down Expand Up @@ -36920,7 +36936,7 @@ client.transfers.list_recipients(
<dl>
<dd>

**query:** `typing.Optional[str]` — Search anyone on Whop by name or username, plus your own accounts by name or ID. Omit it to get the team around the balance, the people you follow, and your own accounts. The list is the same whether the balance belongs to a company or to you. Searching from a `biz_` origin additionally requires the member:basic:read scope. A credential scoped to a single company is the exception to the search itself: it only ever sees that company's own people. Complete email addresses return no matches.
**query:** `typing.Optional[str]` — Search anyone on Whop by name or username, plus your own accounts by name or ID. An exact business ID (`biz_`) returns that business first. Omit it to get the team around the balance, the people you follow, and your own accounts. The list is the same whether the balance belongs to a company or to you. Searching from a `biz_` origin additionally requires the member:basic:read scope. A credential scoped to a single company is the exception to the search itself: it only ever sees that company's own people. Complete email addresses return no matches.

</dd>
</dl>
Expand Down Expand Up @@ -40057,6 +40073,125 @@ client.bounties.submissions.retrieve(
</dl>


</dd>
</dl>
</details>

## FinancialReports Breakdown
<details><summary><code>client.financial_reports.breakdown.<a href="src/whop_sdk/financial_reports/breakdown/client.py">retrieve</a>(...) -> RetrieveBreakdownResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Returns the top entities behind one high-level financial report bucket and an aggregate remainder.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```python
from whop_sdk import Whop
from whop_sdk.environment import WhopEnvironment

client = Whop(
token="<token>",
environment=WhopEnvironment.DEFAULT,
)

client.financial_reports.breakdown.retrieve(
account_id="account_id",
bucket="transfers",
direction="money_in",
currency="currency",
from_date="from_date",
to_date="to_date",
)

```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**account_id:** `str` — The owning account ID (a biz_ identifier).

</dd>
</dl>

<dl>
<dd>

**bucket:** `RetrieveBreakdownRequestBucket` — The high-level report bucket to explain.

</dd>
</dl>

<dl>
<dd>

**direction:** `RetrieveBreakdownRequestDirection` — Whether to explain money received or money sent.

</dd>
</dl>

<dl>
<dd>

**currency:** `str` — The report currency to explain.

</dd>
</dl>

<dl>
<dd>

**from_date:** `str` — Start of the report window as an ISO 8601 timestamp.

</dd>
</dl>

<dl>
<dd>

**to_date:** `str` — Exclusive end of the report window as an ISO 8601 timestamp.

</dd>
</dl>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>
Expand Down
12 changes: 10 additions & 2 deletions src/whop_sdk/accounts/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@ def transfer_ownership(
*,
identifier: str,
as_partner: typing.Optional[bool] = OMIT,
message: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> TransferOwnershipAccountsResponse:
"""
Expand All @@ -709,6 +710,9 @@ def transfer_ownership(
as_partner : typing.Optional[bool]
If true, the current owner is credited as the account's Whop partner, earning partner commission on its sales. Requires the current owner to already be an enrolled Whop partner. Skipped if the account already has an active partner.

message : typing.Optional[str]
A note from the partner, shown as a quote in the invite email and signed with their name. Requires `as_partner`; sending it on an ordinary transfer is a 400. Omit it and the email sends without a note.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand All @@ -732,7 +736,7 @@ def transfer_ownership(
)
"""
_response = self._raw_client.transfer_ownership(
id, identifier=identifier, as_partner=as_partner, request_options=request_options
id, identifier=identifier, as_partner=as_partner, message=message, request_options=request_options
)
return _response.data

Expand Down Expand Up @@ -1448,6 +1452,7 @@ async def transfer_ownership(
*,
identifier: str,
as_partner: typing.Optional[bool] = OMIT,
message: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> TransferOwnershipAccountsResponse:
"""
Expand All @@ -1464,6 +1469,9 @@ async def transfer_ownership(
as_partner : typing.Optional[bool]
If true, the current owner is credited as the account's Whop partner, earning partner commission on its sales. Requires the current owner to already be an enrolled Whop partner. Skipped if the account already has an active partner.

message : typing.Optional[str]
A note from the partner, shown as a quote in the invite email and signed with their name. Requires `as_partner`; sending it on an ordinary transfer is a 400. Omit it and the email sends without a note.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand Down Expand Up @@ -1495,7 +1503,7 @@ async def main() -> None:
asyncio.run(main())
"""
_response = await self._raw_client.transfer_ownership(
id, identifier=identifier, as_partner=as_partner, request_options=request_options
id, identifier=identifier, as_partner=as_partner, message=message, request_options=request_options
)
return _response.data

Expand Down
10 changes: 10 additions & 0 deletions src/whop_sdk/accounts/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,7 @@ def transfer_ownership(
*,
identifier: str,
as_partner: typing.Optional[bool] = OMIT,
message: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[TransferOwnershipAccountsResponse]:
"""
Expand All @@ -995,6 +996,9 @@ def transfer_ownership(
as_partner : typing.Optional[bool]
If true, the current owner is credited as the account's Whop partner, earning partner commission on its sales. Requires the current owner to already be an enrolled Whop partner. Skipped if the account already has an active partner.

message : typing.Optional[str]
A note from the partner, shown as a quote in the invite email and signed with their name. Requires `as_partner`; sending it on an ordinary transfer is a 400. Omit it and the email sends without a note.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand All @@ -1009,6 +1013,7 @@ def transfer_ownership(
json={
"as_partner": as_partner,
"identifier": identifier,
"message": message,
},
headers={
"content-type": "application/json",
Expand Down Expand Up @@ -1986,6 +1991,7 @@ async def transfer_ownership(
*,
identifier: str,
as_partner: typing.Optional[bool] = OMIT,
message: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[TransferOwnershipAccountsResponse]:
"""
Expand All @@ -2002,6 +2008,9 @@ async def transfer_ownership(
as_partner : typing.Optional[bool]
If true, the current owner is credited as the account's Whop partner, earning partner commission on its sales. Requires the current owner to already be an enrolled Whop partner. Skipped if the account already has an active partner.

message : typing.Optional[str]
A note from the partner, shown as a quote in the invite email and signed with their name. Requires `as_partner`; sending it on an ordinary transfer is a 400. Omit it and the email sends without a note.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand All @@ -2016,6 +2025,7 @@ async def transfer_ownership(
json={
"as_partner": as_partner,
"identifier": identifier,
"message": message,
},
headers={
"content-type": "application/json",
Expand Down
8 changes: 4 additions & 4 deletions src/whop_sdk/ads/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def create(
The URL the ad links to. Query parameters are merged into url_parameters, so the stored URL is always bare.

url_parameters : typing.Optional[typing.Dict[str, typing.Any]]
Query parameters to append to the destination URL, keyed by parameter name. Merged with any query string on `url`. Whop adds its own click-attribution parameters; those are reserved and rejected if you set them (utm_meta_ad_id, utm_meta_adset_id, utm_meta_campaign_id, utm_source, utm_placement, utm_medium, utm_content, utm_adset, utm_whop, wacid, wasid, waid, tw_source, tw_adid).
Query parameters to append to the destination URL, keyed by parameter name. Merged with any query string on `url`. Whop adds its own click-attribution parameters; those are reserved and rejected if you set them. Which keys are reserved depends on the ad's network — Meta: utm_meta_ad_id, utm_meta_adset_id, utm_meta_campaign_id, utm_source, utm_placement, utm_medium, utm_content, utm_adset, utm_whop, wacid, wasid, waid, tw_source, tw_adid; TikTok: waid, wasid, wacid, ad_id, adset_id, campaign_id, utm_source, utm_medium, utm_placement, utm_whop, tw_source, tw_adid.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Expand Down Expand Up @@ -468,7 +468,7 @@ def update(
The URL the ad links to. Query parameters are merged into url_parameters, so the stored URL is always bare.

url_parameters : typing.Optional[typing.Dict[str, typing.Any]]
Query parameters to append to the destination URL, keyed by parameter name. Merged with any query string on `url`. Whop adds its own click-attribution parameters; those are reserved and rejected if you set them (utm_meta_ad_id, utm_meta_adset_id, utm_meta_campaign_id, utm_source, utm_placement, utm_medium, utm_content, utm_adset, utm_whop, wacid, wasid, waid, tw_source, tw_adid).
Query parameters to append to the destination URL, keyed by parameter name. Merged with any query string on `url`. Whop adds its own click-attribution parameters; those are reserved and rejected if you set them. Which keys are reserved depends on the ad's network — Meta: utm_meta_ad_id, utm_meta_adset_id, utm_meta_campaign_id, utm_source, utm_placement, utm_medium, utm_content, utm_adset, utm_whop, wacid, wasid, waid, tw_source, tw_adid; TikTok: waid, wasid, wacid, ad_id, adset_id, campaign_id, utm_source, utm_medium, utm_placement, utm_whop, tw_source, tw_adid.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Expand Down Expand Up @@ -871,7 +871,7 @@ async def create(
The URL the ad links to. Query parameters are merged into url_parameters, so the stored URL is always bare.

url_parameters : typing.Optional[typing.Dict[str, typing.Any]]
Query parameters to append to the destination URL, keyed by parameter name. Merged with any query string on `url`. Whop adds its own click-attribution parameters; those are reserved and rejected if you set them (utm_meta_ad_id, utm_meta_adset_id, utm_meta_campaign_id, utm_source, utm_placement, utm_medium, utm_content, utm_adset, utm_whop, wacid, wasid, waid, tw_source, tw_adid).
Query parameters to append to the destination URL, keyed by parameter name. Merged with any query string on `url`. Whop adds its own click-attribution parameters; those are reserved and rejected if you set them. Which keys are reserved depends on the ad's network — Meta: utm_meta_ad_id, utm_meta_adset_id, utm_meta_campaign_id, utm_source, utm_placement, utm_medium, utm_content, utm_adset, utm_whop, wacid, wasid, waid, tw_source, tw_adid; TikTok: waid, wasid, wacid, ad_id, adset_id, campaign_id, utm_source, utm_medium, utm_placement, utm_whop, tw_source, tw_adid.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Expand Down Expand Up @@ -1104,7 +1104,7 @@ async def update(
The URL the ad links to. Query parameters are merged into url_parameters, so the stored URL is always bare.

url_parameters : typing.Optional[typing.Dict[str, typing.Any]]
Query parameters to append to the destination URL, keyed by parameter name. Merged with any query string on `url`. Whop adds its own click-attribution parameters; those are reserved and rejected if you set them (utm_meta_ad_id, utm_meta_adset_id, utm_meta_campaign_id, utm_source, utm_placement, utm_medium, utm_content, utm_adset, utm_whop, wacid, wasid, waid, tw_source, tw_adid).
Query parameters to append to the destination URL, keyed by parameter name. Merged with any query string on `url`. Whop adds its own click-attribution parameters; those are reserved and rejected if you set them. Which keys are reserved depends on the ad's network — Meta: utm_meta_ad_id, utm_meta_adset_id, utm_meta_campaign_id, utm_source, utm_placement, utm_medium, utm_content, utm_adset, utm_whop, wacid, wasid, waid, tw_source, tw_adid; TikTok: waid, wasid, wacid, ad_id, adset_id, campaign_id, utm_source, utm_medium, utm_placement, utm_whop, tw_source, tw_adid.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Expand Down
Loading
Loading