diff --git a/.fern/metadata.json b/.fern/metadata.json index c7c94ce9e..772ca625c 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -15,7 +15,7 @@ "standardwebhooks": ">=1.0.1,<2" } }, - "originGitCommit": "7bcc6a2b72af681cce67c15577579d8db1613a1a", + "originGitCommit": "f7cde5506d2791bbd0c2529a3db673aff245364a", "originGitCommitIsDirty": false, "invokedBy": "ci", "requestedVersion": "2.8.1", diff --git a/.fern/replay.lock b/.fern/replay.lock index 53a40146b..13eb00bb6 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -6000,5 +6000,11 @@ generations: cli_version: unknown generator_versions: fernapi/fern-python-sdk: 5.39.2 -current_generation: 0a3c7cd253eb2fc6712ef444a36a34260facd776 + - commit_sha: 3e52dab8e856349a1818175eb571fe5fe5412fad + tree_hash: a431c744313c3e7c01cd9d2a823db87ca6c182c4 + timestamp: 2026-11-22T04:29:18.595Z + cli_version: unknown + generator_versions: + fernapi/fern-python-sdk: 5.39.2 +current_generation: 3e52dab8e856349a1818175eb571fe5fe5412fad patches: [] diff --git a/reference.md b/reference.md index aa0639af3..59a15cb5c 100644 --- a/reference.md +++ b/reference.md @@ -1226,6 +1226,14 @@ client.accounts.update(
+**statement_descriptor:** `typing.Optional[str]` — The text on buyers' card statements for this account's payments. It must be 5 to 22 characters with at least one letter, using only A-Z and 0-9 after any `WHOP*` prefix. It must start with `WHOP*` while Whop is the merchant of record. Once the account has switched to being its own merchant of record (`merchant_of_record` in account preferences), it can be set without the prefix. `null` clears it. Requires the `payout:account:update` scope. + +
+
+ +
+
+ **store_page_config:** `typing.Optional[UpdateAccountsRequestStorePageConfig]` — Account store page display configuration.
@@ -36249,7 +36257,7 @@ client.payments.create(
-**statement_descriptor:** `typing.Optional[str]` — Overrides the text on the buyer's card statement for this payment only. Takes precedence over the product's and account's custom descriptors, and changes neither. Must start with `WHOP*` unless the business processes as the merchant of record. For businesses processing as the merchant of record, omit the `WHOP*` prefix; the descriptor appears as provided. Must be 5-22 characters, contain at least one letter, and use only Latin letters, numbers, spaces, underscores, hyphens, or asterisks. +**statement_descriptor:** `typing.Optional[str]` — Overrides the text on the buyer's card statement for this payment only. Takes precedence over the product's and account's custom descriptors, and changes neither. Must start with `WHOP*` unless the business processes as the merchant of record. For a business processing as the merchant of record, Whop removes a `WHOP*` prefix when at least 5 characters, including a letter, remain. Must be 5-22 characters, contain at least one letter, and use only Latin letters, numbers, spaces, underscores, hyphens, or asterisks.
@@ -53661,7 +53669,7 @@ client.accounts.preferences.update(
-**merchant_of_record:** `typing.Optional[UpdatePreferencesRequestMerchantOfRecord]` — Set it to `account` to make the account the merchant of record. Only some business categories can switch. The business must be verified. The switch cannot be undone. The response shows `pending` until approval. Checkout takes no payments until then. After the switch, the account accepts only card, Apple Pay, Google Pay and crypto payments. PayPal, buy now pay later and local payment methods stop. Requires the `payout:account:update` scope on your API key. +**merchant_of_record:** `typing.Optional[UpdatePreferencesRequestMerchantOfRecord]` — Set it to `account` to make the account the merchant of record. Only some business categories can switch. A subaccount can also switch when Whop has approved its platform. Its business category must not be prohibited. The business must be verified. The switch cannot be undone. The response shows `pending` until approval. Checkout takes no payments until then. After the switch, the account accepts only card, Apple Pay, Google Pay and crypto payments. PayPal, buy now pay later and local payment methods stop. Requires the `payout:account:update` scope on your API key.
diff --git a/src/whop_sdk/__init__.py b/src/whop_sdk/__init__.py index 77090d34b..66dd62829 100644 --- a/src/whop_sdk/__init__.py +++ b/src/whop_sdk/__init__.py @@ -68,6 +68,7 @@ AccountLevel, AccountLink, AccountLinkUseCases, + AccountMerchantOfRecord, AccountOnboardingType, AccountOpengraphImageVariant, AccountParent, @@ -3613,6 +3614,7 @@ "AccountLevel": ".types", "AccountLink": ".types", "AccountLinkUseCases": ".types", + "AccountMerchantOfRecord": ".types", "AccountOnboardingType": ".types", "AccountOpengraphImageVariant": ".types", "AccountParent": ".types", @@ -7021,6 +7023,7 @@ def __dir__(): "AccountLevel", "AccountLink", "AccountLinkUseCases", + "AccountMerchantOfRecord", "AccountOnboardingType", "AccountOpengraphImageVariant", "AccountParent", diff --git a/src/whop_sdk/accounts/client.py b/src/whop_sdk/accounts/client.py index 394d9efc8..d10712957 100644 --- a/src/whop_sdk/accounts/client.py +++ b/src/whop_sdk/accounts/client.py @@ -513,6 +513,7 @@ def update( show_reviews_dtc: typing.Optional[bool] = OMIT, show_user_directory: typing.Optional[bool] = OMIT, social_links: typing.Optional[typing.Sequence[typing.Dict[str, typing.Any]]] = OMIT, + statement_descriptor: typing.Optional[str] = OMIT, store_page_config: typing.Optional[UpdateAccountsRequestStorePageConfig] = OMIT, target_audience: typing.Optional[str] = OMIT, tax_collection_enabled_states: typing.Optional[ @@ -643,6 +644,9 @@ def update( social_links : typing.Optional[typing.Sequence[typing.Dict[str, typing.Any]]] The full list of social links to display for the account. + statement_descriptor : typing.Optional[str] + The text on buyers' card statements for this account's payments. It must be 5 to 22 characters with at least one letter, using only A-Z and 0-9 after any `WHOP*` prefix. It must start with `WHOP*` while Whop is the merchant of record. Once the account has switched to being its own merchant of record (`merchant_of_record` in account preferences), it can be set without the prefix. `null` clears it. Requires the `payout:account:update` scope. + store_page_config : typing.Optional[UpdateAccountsRequestStorePageConfig] Account store page display configuration. @@ -739,6 +743,7 @@ def update( show_reviews_dtc=show_reviews_dtc, show_user_directory=show_user_directory, social_links=social_links, + statement_descriptor=statement_descriptor, store_page_config=store_page_config, target_audience=target_audience, tax_collection_enabled_states=tax_collection_enabled_states, @@ -1588,6 +1593,7 @@ async def update( show_reviews_dtc: typing.Optional[bool] = OMIT, show_user_directory: typing.Optional[bool] = OMIT, social_links: typing.Optional[typing.Sequence[typing.Dict[str, typing.Any]]] = OMIT, + statement_descriptor: typing.Optional[str] = OMIT, store_page_config: typing.Optional[UpdateAccountsRequestStorePageConfig] = OMIT, target_audience: typing.Optional[str] = OMIT, tax_collection_enabled_states: typing.Optional[ @@ -1718,6 +1724,9 @@ async def update( social_links : typing.Optional[typing.Sequence[typing.Dict[str, typing.Any]]] The full list of social links to display for the account. + statement_descriptor : typing.Optional[str] + The text on buyers' card statements for this account's payments. It must be 5 to 22 characters with at least one letter, using only A-Z and 0-9 after any `WHOP*` prefix. It must start with `WHOP*` while Whop is the merchant of record. Once the account has switched to being its own merchant of record (`merchant_of_record` in account preferences), it can be set without the prefix. `null` clears it. Requires the `payout:account:update` scope. + store_page_config : typing.Optional[UpdateAccountsRequestStorePageConfig] Account store page display configuration. @@ -1822,6 +1831,7 @@ async def main() -> None: show_reviews_dtc=show_reviews_dtc, show_user_directory=show_user_directory, social_links=social_links, + statement_descriptor=statement_descriptor, store_page_config=store_page_config, target_audience=target_audience, tax_collection_enabled_states=tax_collection_enabled_states, diff --git a/src/whop_sdk/accounts/preferences/client.py b/src/whop_sdk/accounts/preferences/client.py index 9b8516e5c..092f6c802 100644 --- a/src/whop_sdk/accounts/preferences/client.py +++ b/src/whop_sdk/accounts/preferences/client.py @@ -181,7 +181,7 @@ def update( Replaces the account's own cancel reasons, shown to members in this order when they cancel. Pass an option's `id` to keep it, for example when renaming it. Options without an `id` are added, and options left out are removed. Pass an empty array to go back to Whop's default reasons. Members who already picked an option keep the label they saw. Requires the `company:manage_checkout` scope on your API key. merchant_of_record : typing.Optional[UpdatePreferencesRequestMerchantOfRecord] - Set it to `account` to make the account the merchant of record. Only some business categories can switch. The business must be verified. The switch cannot be undone. The response shows `pending` until approval. Checkout takes no payments until then. After the switch, the account accepts only card, Apple Pay, Google Pay and crypto payments. PayPal, buy now pay later and local payment methods stop. Requires the `payout:account:update` scope on your API key. + Set it to `account` to make the account the merchant of record. Only some business categories can switch. A subaccount can also switch when Whop has approved its platform. Its business category must not be prohibited. The business must be verified. The switch cannot be undone. The response shows `pending` until approval. Checkout takes no payments until then. After the switch, the account accepts only card, Apple Pay, Google Pay and crypto payments. PayPal, buy now pay later and local payment methods stop. Requires the `payout:account:update` scope on your API key. off_session_payment_rules : typing.Optional[bool] Whether this account's active payment rules apply to future off-session charges, including renewals. Off by default. Requires the payment:manage scope on your API key. @@ -415,7 +415,7 @@ async def update( Replaces the account's own cancel reasons, shown to members in this order when they cancel. Pass an option's `id` to keep it, for example when renaming it. Options without an `id` are added, and options left out are removed. Pass an empty array to go back to Whop's default reasons. Members who already picked an option keep the label they saw. Requires the `company:manage_checkout` scope on your API key. merchant_of_record : typing.Optional[UpdatePreferencesRequestMerchantOfRecord] - Set it to `account` to make the account the merchant of record. Only some business categories can switch. The business must be verified. The switch cannot be undone. The response shows `pending` until approval. Checkout takes no payments until then. After the switch, the account accepts only card, Apple Pay, Google Pay and crypto payments. PayPal, buy now pay later and local payment methods stop. Requires the `payout:account:update` scope on your API key. + Set it to `account` to make the account the merchant of record. Only some business categories can switch. A subaccount can also switch when Whop has approved its platform. Its business category must not be prohibited. The business must be verified. The switch cannot be undone. The response shows `pending` until approval. Checkout takes no payments until then. After the switch, the account accepts only card, Apple Pay, Google Pay and crypto payments. PayPal, buy now pay later and local payment methods stop. Requires the `payout:account:update` scope on your API key. off_session_payment_rules : typing.Optional[bool] Whether this account's active payment rules apply to future off-session charges, including renewals. Off by default. Requires the payment:manage scope on your API key. diff --git a/src/whop_sdk/accounts/preferences/raw_client.py b/src/whop_sdk/accounts/preferences/raw_client.py index ca9f94c79..a292a465d 100644 --- a/src/whop_sdk/accounts/preferences/raw_client.py +++ b/src/whop_sdk/accounts/preferences/raw_client.py @@ -212,7 +212,7 @@ def update( Replaces the account's own cancel reasons, shown to members in this order when they cancel. Pass an option's `id` to keep it, for example when renaming it. Options without an `id` are added, and options left out are removed. Pass an empty array to go back to Whop's default reasons. Members who already picked an option keep the label they saw. Requires the `company:manage_checkout` scope on your API key. merchant_of_record : typing.Optional[UpdatePreferencesRequestMerchantOfRecord] - Set it to `account` to make the account the merchant of record. Only some business categories can switch. The business must be verified. The switch cannot be undone. The response shows `pending` until approval. Checkout takes no payments until then. After the switch, the account accepts only card, Apple Pay, Google Pay and crypto payments. PayPal, buy now pay later and local payment methods stop. Requires the `payout:account:update` scope on your API key. + Set it to `account` to make the account the merchant of record. Only some business categories can switch. A subaccount can also switch when Whop has approved its platform. Its business category must not be prohibited. The business must be verified. The switch cannot be undone. The response shows `pending` until approval. Checkout takes no payments until then. After the switch, the account accepts only card, Apple Pay, Google Pay and crypto payments. PayPal, buy now pay later and local payment methods stop. Requires the `payout:account:update` scope on your API key. off_session_payment_rules : typing.Optional[bool] Whether this account's active payment rules apply to future off-session charges, including renewals. Off by default. Requires the payment:manage scope on your API key. @@ -532,7 +532,7 @@ async def update( Replaces the account's own cancel reasons, shown to members in this order when they cancel. Pass an option's `id` to keep it, for example when renaming it. Options without an `id` are added, and options left out are removed. Pass an empty array to go back to Whop's default reasons. Members who already picked an option keep the label they saw. Requires the `company:manage_checkout` scope on your API key. merchant_of_record : typing.Optional[UpdatePreferencesRequestMerchantOfRecord] - Set it to `account` to make the account the merchant of record. Only some business categories can switch. The business must be verified. The switch cannot be undone. The response shows `pending` until approval. Checkout takes no payments until then. After the switch, the account accepts only card, Apple Pay, Google Pay and crypto payments. PayPal, buy now pay later and local payment methods stop. Requires the `payout:account:update` scope on your API key. + Set it to `account` to make the account the merchant of record. Only some business categories can switch. A subaccount can also switch when Whop has approved its platform. Its business category must not be prohibited. The business must be verified. The switch cannot be undone. The response shows `pending` until approval. Checkout takes no payments until then. After the switch, the account accepts only card, Apple Pay, Google Pay and crypto payments. PayPal, buy now pay later and local payment methods stop. Requires the `payout:account:update` scope on your API key. off_session_payment_rules : typing.Optional[bool] Whether this account's active payment rules apply to future off-session charges, including renewals. Off by default. Requires the payment:manage scope on your API key. diff --git a/src/whop_sdk/accounts/preferences/types/retrieve_preferences_response.py b/src/whop_sdk/accounts/preferences/types/retrieve_preferences_response.py index 2d0ec90e9..e28d79085 100644 --- a/src/whop_sdk/accounts/preferences/types/retrieve_preferences_response.py +++ b/src/whop_sdk/accounts/preferences/types/retrieve_preferences_response.py @@ -145,7 +145,7 @@ class RetrievePreferencesResponse(UniversalBaseModel): merchant_of_record: typing.Optional[RetrievePreferencesResponseMerchantOfRecord] = pydantic.Field(default=None) """ - The merchant of record for the account's payments. `whop` means Whop is the merchant of record and the account can switch. `null` means Whop is the merchant of record and the account's business category cannot switch. `pending` means the account switched and waits for approval. Checkout takes no payments until then. `account` means the account is the merchant of record. + The merchant of record for the account's payments. `whop` means Whop is the merchant of record and the account can switch. `null` means Whop is the merchant of record and the account cannot switch. `pending` means the account switched and waits for approval. Checkout takes no payments until then. `account` means the account is the merchant of record. """ off_session_payment_rules: bool = pydantic.Field() diff --git a/src/whop_sdk/accounts/preferences/types/update_preferences_response.py b/src/whop_sdk/accounts/preferences/types/update_preferences_response.py index 4c9e6cec6..476bd49d7 100644 --- a/src/whop_sdk/accounts/preferences/types/update_preferences_response.py +++ b/src/whop_sdk/accounts/preferences/types/update_preferences_response.py @@ -143,7 +143,7 @@ class UpdatePreferencesResponse(UniversalBaseModel): merchant_of_record: typing.Optional[UpdatePreferencesResponseMerchantOfRecord] = pydantic.Field(default=None) """ - The merchant of record for the account's payments. `whop` means Whop is the merchant of record and the account can switch. `null` means Whop is the merchant of record and the account's business category cannot switch. `pending` means the account switched and waits for approval. Checkout takes no payments until then. `account` means the account is the merchant of record. + The merchant of record for the account's payments. `whop` means Whop is the merchant of record and the account can switch. `null` means Whop is the merchant of record and the account cannot switch. `pending` means the account switched and waits for approval. Checkout takes no payments until then. `account` means the account is the merchant of record. """ off_session_payment_rules: bool = pydantic.Field() diff --git a/src/whop_sdk/accounts/raw_client.py b/src/whop_sdk/accounts/raw_client.py index 78fb48b7f..ec568ee7d 100644 --- a/src/whop_sdk/accounts/raw_client.py +++ b/src/whop_sdk/accounts/raw_client.py @@ -801,6 +801,7 @@ def update( show_reviews_dtc: typing.Optional[bool] = OMIT, show_user_directory: typing.Optional[bool] = OMIT, social_links: typing.Optional[typing.Sequence[typing.Dict[str, typing.Any]]] = OMIT, + statement_descriptor: typing.Optional[str] = OMIT, store_page_config: typing.Optional[UpdateAccountsRequestStorePageConfig] = OMIT, target_audience: typing.Optional[str] = OMIT, tax_collection_enabled_states: typing.Optional[ @@ -931,6 +932,9 @@ def update( social_links : typing.Optional[typing.Sequence[typing.Dict[str, typing.Any]]] The full list of social links to display for the account. + statement_descriptor : typing.Optional[str] + The text on buyers' card statements for this account's payments. It must be 5 to 22 characters with at least one letter, using only A-Z and 0-9 after any `WHOP*` prefix. It must start with `WHOP*` while Whop is the merchant of record. Once the account has switched to being its own merchant of record (`merchant_of_record` in account preferences), it can be set without the prefix. `null` clears it. Requires the `payout:account:update` scope. + store_page_config : typing.Optional[UpdateAccountsRequestStorePageConfig] Account store page display configuration. @@ -1049,6 +1053,7 @@ def update( "show_reviews_dtc": show_reviews_dtc, "show_user_directory": show_user_directory, "social_links": social_links, + "statement_descriptor": statement_descriptor, "store_page_config": convert_and_respect_annotation_metadata( object_=store_page_config, annotation=typing.Optional[UpdateAccountsRequestStorePageConfig], @@ -2353,6 +2358,7 @@ async def update( show_reviews_dtc: typing.Optional[bool] = OMIT, show_user_directory: typing.Optional[bool] = OMIT, social_links: typing.Optional[typing.Sequence[typing.Dict[str, typing.Any]]] = OMIT, + statement_descriptor: typing.Optional[str] = OMIT, store_page_config: typing.Optional[UpdateAccountsRequestStorePageConfig] = OMIT, target_audience: typing.Optional[str] = OMIT, tax_collection_enabled_states: typing.Optional[ @@ -2483,6 +2489,9 @@ async def update( social_links : typing.Optional[typing.Sequence[typing.Dict[str, typing.Any]]] The full list of social links to display for the account. + statement_descriptor : typing.Optional[str] + The text on buyers' card statements for this account's payments. It must be 5 to 22 characters with at least one letter, using only A-Z and 0-9 after any `WHOP*` prefix. It must start with `WHOP*` while Whop is the merchant of record. Once the account has switched to being its own merchant of record (`merchant_of_record` in account preferences), it can be set without the prefix. `null` clears it. Requires the `payout:account:update` scope. + store_page_config : typing.Optional[UpdateAccountsRequestStorePageConfig] Account store page display configuration. @@ -2601,6 +2610,7 @@ async def update( "show_reviews_dtc": show_reviews_dtc, "show_user_directory": show_user_directory, "social_links": social_links, + "statement_descriptor": statement_descriptor, "store_page_config": convert_and_respect_annotation_metadata( object_=store_page_config, annotation=typing.Optional[UpdateAccountsRequestStorePageConfig], diff --git a/src/whop_sdk/payments/client.py b/src/whop_sdk/payments/client.py index dbf655872..6d84b79a1 100644 --- a/src/whop_sdk/payments/client.py +++ b/src/whop_sdk/payments/client.py @@ -402,7 +402,7 @@ def create( Where physical goods ship, returned on the payment as `shipping_address`. Only the keys you supply are kept; omit it for digital goods. statement_descriptor : typing.Optional[str] - Overrides the text on the buyer's card statement for this payment only. Takes precedence over the product's and account's custom descriptors, and changes neither. Must start with `WHOP*` unless the business processes as the merchant of record. For businesses processing as the merchant of record, omit the `WHOP*` prefix; the descriptor appears as provided. Must be 5-22 characters, contain at least one letter, and use only Latin letters, numbers, spaces, underscores, hyphens, or asterisks. + Overrides the text on the buyer's card statement for this payment only. Takes precedence over the product's and account's custom descriptors, and changes neither. Must start with `WHOP*` unless the business processes as the merchant of record. For a business processing as the merchant of record, Whop removes a `WHOP*` prefix when at least 5 characters, including a letter, remain. Must be 5-22 characters, contain at least one letter, and use only Latin letters, numbers, spaces, underscores, hyphens, or asterisks. promo_code : typing.Optional[str] The promo code as the buyer typed it, matched within the account regardless of case and surrounding spaces, as checkout matches it. It must be valid for the variant. Send it or `promo_code_id`, not both; an empty or whitespace-only string counts as not sent. A code the account does not have, or one that is no longer active, is refused before anything is written, with the error code `promo_invalid`. A code this purchase cannot use, such as one with no uses left or one restricted to other variants, products or buyers, is refused with `promo_invalid` too, and the error's message says why. @@ -1480,7 +1480,7 @@ async def create( Where physical goods ship, returned on the payment as `shipping_address`. Only the keys you supply are kept; omit it for digital goods. statement_descriptor : typing.Optional[str] - Overrides the text on the buyer's card statement for this payment only. Takes precedence over the product's and account's custom descriptors, and changes neither. Must start with `WHOP*` unless the business processes as the merchant of record. For businesses processing as the merchant of record, omit the `WHOP*` prefix; the descriptor appears as provided. Must be 5-22 characters, contain at least one letter, and use only Latin letters, numbers, spaces, underscores, hyphens, or asterisks. + Overrides the text on the buyer's card statement for this payment only. Takes precedence over the product's and account's custom descriptors, and changes neither. Must start with `WHOP*` unless the business processes as the merchant of record. For a business processing as the merchant of record, Whop removes a `WHOP*` prefix when at least 5 characters, including a letter, remain. Must be 5-22 characters, contain at least one letter, and use only Latin letters, numbers, spaces, underscores, hyphens, or asterisks. promo_code : typing.Optional[str] The promo code as the buyer typed it, matched within the account regardless of case and surrounding spaces, as checkout matches it. It must be valid for the variant. Send it or `promo_code_id`, not both; an empty or whitespace-only string counts as not sent. A code the account does not have, or one that is no longer active, is refused before anything is written, with the error code `promo_invalid`. A code this purchase cannot use, such as one with no uses left or one restricted to other variants, products or buyers, is refused with `promo_invalid` too, and the error's message says why. diff --git a/src/whop_sdk/payments/raw_client.py b/src/whop_sdk/payments/raw_client.py index 8c349cf97..b005f7635 100644 --- a/src/whop_sdk/payments/raw_client.py +++ b/src/whop_sdk/payments/raw_client.py @@ -485,7 +485,7 @@ def create( Where physical goods ship, returned on the payment as `shipping_address`. Only the keys you supply are kept; omit it for digital goods. statement_descriptor : typing.Optional[str] - Overrides the text on the buyer's card statement for this payment only. Takes precedence over the product's and account's custom descriptors, and changes neither. Must start with `WHOP*` unless the business processes as the merchant of record. For businesses processing as the merchant of record, omit the `WHOP*` prefix; the descriptor appears as provided. Must be 5-22 characters, contain at least one letter, and use only Latin letters, numbers, spaces, underscores, hyphens, or asterisks. + Overrides the text on the buyer's card statement for this payment only. Takes precedence over the product's and account's custom descriptors, and changes neither. Must start with `WHOP*` unless the business processes as the merchant of record. For a business processing as the merchant of record, Whop removes a `WHOP*` prefix when at least 5 characters, including a letter, remain. Must be 5-22 characters, contain at least one letter, and use only Latin letters, numbers, spaces, underscores, hyphens, or asterisks. promo_code : typing.Optional[str] The promo code as the buyer typed it, matched within the account regardless of case and surrounding spaces, as checkout matches it. It must be valid for the variant. Send it or `promo_code_id`, not both; an empty or whitespace-only string counts as not sent. A code the account does not have, or one that is no longer active, is refused before anything is written, with the error code `promo_invalid`. A code this purchase cannot use, such as one with no uses left or one restricted to other variants, products or buyers, is refused with `promo_invalid` too, and the error's message says why. @@ -2268,7 +2268,7 @@ async def create( Where physical goods ship, returned on the payment as `shipping_address`. Only the keys you supply are kept; omit it for digital goods. statement_descriptor : typing.Optional[str] - Overrides the text on the buyer's card statement for this payment only. Takes precedence over the product's and account's custom descriptors, and changes neither. Must start with `WHOP*` unless the business processes as the merchant of record. For businesses processing as the merchant of record, omit the `WHOP*` prefix; the descriptor appears as provided. Must be 5-22 characters, contain at least one letter, and use only Latin letters, numbers, spaces, underscores, hyphens, or asterisks. + Overrides the text on the buyer's card statement for this payment only. Takes precedence over the product's and account's custom descriptors, and changes neither. Must start with `WHOP*` unless the business processes as the merchant of record. For a business processing as the merchant of record, Whop removes a `WHOP*` prefix when at least 5 characters, including a letter, remain. Must be 5-22 characters, contain at least one letter, and use only Latin letters, numbers, spaces, underscores, hyphens, or asterisks. promo_code : typing.Optional[str] The promo code as the buyer typed it, matched within the account regardless of case and surrounding spaces, as checkout matches it. It must be valid for the variant. Send it or `promo_code_id`, not both; an empty or whitespace-only string counts as not sent. A code the account does not have, or one that is no longer active, is refused before anything is written, with the error code `promo_invalid`. A code this purchase cannot use, such as one with no uses left or one restricted to other variants, products or buyers, is refused with `promo_invalid` too, and the error's message says why. diff --git a/src/whop_sdk/types/__init__.py b/src/whop_sdk/types/__init__.py index 6a9400b41..9defbed20 100644 --- a/src/whop_sdk/types/__init__.py +++ b/src/whop_sdk/types/__init__.py @@ -67,6 +67,7 @@ from .account_level import AccountLevel from .account_link import AccountLink from .account_link_use_cases import AccountLinkUseCases + from .account_merchant_of_record import AccountMerchantOfRecord from .account_onboarding_type import AccountOnboardingType from .account_opengraph_image_variant import AccountOpengraphImageVariant from .account_parent import AccountParent @@ -1722,6 +1723,7 @@ "AccountLevel": ".account_level", "AccountLink": ".account_link", "AccountLinkUseCases": ".account_link_use_cases", + "AccountMerchantOfRecord": ".account_merchant_of_record", "AccountOnboardingType": ".account_onboarding_type", "AccountOpengraphImageVariant": ".account_opengraph_image_variant", "AccountParent": ".account_parent", @@ -3261,6 +3263,7 @@ def __dir__(): "AccountLevel", "AccountLink", "AccountLinkUseCases", + "AccountMerchantOfRecord", "AccountOnboardingType", "AccountOpengraphImageVariant", "AccountParent", diff --git a/src/whop_sdk/types/account.py b/src/whop_sdk/types/account.py index 09f26a251..ca9c95022 100644 --- a/src/whop_sdk/types/account.py +++ b/src/whop_sdk/types/account.py @@ -13,6 +13,7 @@ from .account_financing import AccountFinancing from .account_home_preferences_item import AccountHomePreferencesItem from .account_level import AccountLevel +from .account_merchant_of_record import AccountMerchantOfRecord from .account_onboarding_type import AccountOnboardingType from .account_opengraph_image_variant import AccountOpengraphImageVariant from .account_parent import AccountParent @@ -38,7 +39,7 @@ class Account(UniversalBaseModel): ads_spend_usd: typing.Optional[float] = pydantic.Field(default=None) """ - Lifetime charged ad spend for the account, in USD. Computed only on `list` for callers with `stats:read` on the account; `null` otherwise. + Lifetime charged ad spend for the account, in USD. Computed only on `list` for callers with `stats:read` on the account, and `null` otherwise. """ balances: typing.List[AccountBalanceToken] @@ -178,6 +179,11 @@ class Account(UniversalBaseModel): Account logo image URL. """ + merchant_of_record: typing.Optional[AccountMerchantOfRecord] = pydantic.Field(default=None) + """ + The merchant of record for the account's payments. `whop` means Whop is the merchant of record and the account can switch. `null` means Whop is the merchant of record and the account cannot switch. `pending` means the account switched and waits for approval. Checkout takes no payments until then. `required_actions` lists what the account must answer, or says that it was not approved. `account` means the account is the merchant of record. Switch with `merchant_of_record` on `PATCH /accounts/{id}/preferences`. Whop sends `account.updated` when this value changes. + """ + metadata: typing.Dict[str, typing.Any] = pydantic.Field() """ Arbitrary key/value metadata supplied at account creation. @@ -305,6 +311,11 @@ class Account(UniversalBaseModel): """ social_links: typing.List[AccountSocialLink] + statement_descriptor: typing.Optional[str] = pydantic.Field(default=None) + """ + The text on buyers' card statements for this account's payments, up to 22 characters. While Whop is the merchant of record, it starts with `WHOP*`. Whop drops the `WHOP*` prefix when the account is its own merchant of record and can take card payments. It keeps the prefix if fewer than five characters or no letters would remain. A product or payment descriptor takes precedence. `null` uses a descriptor made from the account's title. + """ + status: typing.Optional[str] = pydantic.Field(default=None) """ Whether the account can operate on Whop: `active` or `suspended`. Computed on `list`, `retrieve`, `me`, and `suspend`; `null` otherwise. @@ -379,12 +390,12 @@ class Account(UniversalBaseModel): volume_l30d_usd: typing.Optional[float] = pydantic.Field(default=None) """ - Volume through the account in the last 30 days (GMV from paid receipts), normalized to USD. Computed only on `list` for callers with `stats:read` on the account; `null` otherwise. + Volume through the account in the last 30 days (GMV from paid receipts), normalized to USD. Computed only on `list` for callers with `stats:read` on the account, and `null` otherwise. """ volume_usd: typing.Optional[float] = pydantic.Field(default=None) """ - Lifetime volume through the account — sales plus transfers received — normalized to USD. Computed only on `list` for callers with `stats:read` on the account; `null` otherwise. + Lifetime volume through the account (sales plus transfers received), normalized to USD. Computed only on `list` for callers with `stats:read` on the account, and `null` otherwise. """ wallet: typing.Optional[AccountWallet] = pydantic.Field(default=None) diff --git a/src/whop_sdk/types/account_merchant_of_record.py b/src/whop_sdk/types/account_merchant_of_record.py new file mode 100644 index 000000000..fbec4856c --- /dev/null +++ b/src/whop_sdk/types/account_merchant_of_record.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AccountMerchantOfRecord = typing.Union[typing.Literal["whop", "pending", "account"], typing.Any] diff --git a/src/whop_sdk/types/account_preferences.py b/src/whop_sdk/types/account_preferences.py index b6a4bec9c..0c5b00499 100644 --- a/src/whop_sdk/types/account_preferences.py +++ b/src/whop_sdk/types/account_preferences.py @@ -122,7 +122,7 @@ class AccountPreferences(UniversalBaseModel): feedback_options: typing.List[FeedbackOption] merchant_of_record: typing.Optional[AccountPreferencesMerchantOfRecord] = pydantic.Field(default=None) """ - The merchant of record for the account's payments. `whop` means Whop is the merchant of record and the account can switch. `null` means Whop is the merchant of record and the account's business category cannot switch. `pending` means the account switched and waits for approval. Checkout takes no payments until then. `account` means the account is the merchant of record. + The merchant of record for the account's payments. `whop` means Whop is the merchant of record and the account can switch. `null` means Whop is the merchant of record and the account cannot switch. `pending` means the account switched and waits for approval. Checkout takes no payments until then. `account` means the account is the merchant of record. """ off_session_payment_rules: bool = pydantic.Field()