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
8 changes: 8 additions & 0 deletions .hark/changes/2026-11-03_stripe-openapi_521cfcca.change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Update generated code
pr_url: https://github.com/stripe/stripe-python/pull/1961
semver_level: minor
is_stripe_api_change: true
---

* Add support for `business_profile_management` on `V2.Core.AccountSession.Component` and `v2.core.AccountSessionCreateParamsComponent`
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
305a4cda5bfda341d0099795803d0af4637923c0
fcd36ef9298b7a9e8a2a18bc4f6162b100aa8bbc
5 changes: 5 additions & 0 deletions stripe/params/v2/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,7 @@
AccountSessionCreateParamsComponentsBalanceReport as AccountSessionCreateParamsComponentsBalanceReport,
AccountSessionCreateParamsComponentsBalances as AccountSessionCreateParamsComponentsBalances,
AccountSessionCreateParamsComponentsBills as AccountSessionCreateParamsComponentsBills,
AccountSessionCreateParamsComponentsBusinessProfileManagement as AccountSessionCreateParamsComponentsBusinessProfileManagement,
AccountSessionCreateParamsComponentsCapitalFinancing as AccountSessionCreateParamsComponentsCapitalFinancing,
AccountSessionCreateParamsComponentsCapitalFinancingApplication as AccountSessionCreateParamsComponentsCapitalFinancingApplication,
AccountSessionCreateParamsComponentsCapitalFinancingPromotion as AccountSessionCreateParamsComponentsCapitalFinancingPromotion,
Expand Down Expand Up @@ -4548,6 +4549,10 @@
"stripe.params.v2.core._account_session_create_params",
False,
),
"AccountSessionCreateParamsComponentsBusinessProfileManagement": (
"stripe.params.v2.core._account_session_create_params",
False,
),
"AccountSessionCreateParamsComponentsCapitalFinancing": (
"stripe.params.v2.core._account_session_create_params",
False,
Expand Down
13 changes: 13 additions & 0 deletions stripe/params/v2/core/_account_session_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ class AccountSessionCreateParamsComponents(TypedDict):
"""
Settings for the Bills embedded component.
"""
business_profile_management: NotRequired[
"AccountSessionCreateParamsComponentsBusinessProfileManagement"
]
"""
Settings for the Business Profile Management embedded component.
"""
capital_financing: NotRequired[
"AccountSessionCreateParamsComponentsCapitalFinancing"
]
Expand Down Expand Up @@ -300,6 +306,13 @@ class AccountSessionCreateParamsComponentsBills(TypedDict):
"""


class AccountSessionCreateParamsComponentsBusinessProfileManagement(TypedDict):
enabled: bool
"""
Whether this embedded component is enabled.
"""


class AccountSessionCreateParamsComponentsCapitalFinancing(TypedDict):
enabled: bool
"""
Expand Down
19 changes: 19 additions & 0 deletions stripe/v2/core/_account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,20 @@ class Scopes(StripeObject):
"""
_inner_class_types = {"scopes": Scopes}

class BusinessProfileManagement(StripeObject):
class Scopes(StripeObject):
pass

enabled: bool
"""
Whether this embedded component is enabled.
"""
scopes: Scopes
"""
The scopes available to this embedded component.
"""
_inner_class_types = {"scopes": Scopes}

class CapitalFinancing(StripeObject):
class Scopes(StripeObject):
pass
Expand Down Expand Up @@ -880,6 +894,10 @@ class Scopes(StripeObject):
"""
Settings for the Bills embedded component.
"""
business_profile_management: BusinessProfileManagement
"""
Settings for the Business Profile Management embedded component.
"""
capital_financing: CapitalFinancing
"""
Settings for the Capital Financing embedded component.
Expand Down Expand Up @@ -1013,6 +1031,7 @@ class Scopes(StripeObject):
"balance_report": BalanceReport,
"balances": Balances,
"bills": Bills,
"business_profile_management": BusinessProfileManagement,
"capital_financing": CapitalFinancing,
"capital_financing_application": CapitalFinancingApplication,
"capital_financing_promotion": CapitalFinancingPromotion,
Expand Down
62 changes: 59 additions & 3 deletions tests/test_generated_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -46583,6 +46583,7 @@ def test_v2_core_account_session_post_service(
"balance_report": {"enabled": True},
"balances": {"enabled": True},
"bills": {"enabled": True},
"business_profile_management": {"enabled": True},
"capital_financing": {"enabled": True},
"capital_financing_application": {"enabled": True},
"capital_financing_promotion": {"enabled": True},
Expand Down Expand Up @@ -46622,7 +46623,7 @@ def test_v2_core_account_session_post_service(
path="/v2/core/account_sessions",
query_string="",
api_base="https://api.stripe.com",
post_data='{"account":"account","components":{"account_management":{"enabled":true},"account_onboarding":{"enabled":true},"agentic_commerce_settings":{"enabled":true},"app_install":{"enabled":true},"app_viewport":{"enabled":true},"balance_report":{"enabled":true},"balances":{"enabled":true},"bills":{"enabled":true},"capital_financing":{"enabled":true},"capital_financing_application":{"enabled":true},"capital_financing_promotion":{"enabled":true},"check_scanning":{"enabled":true},"disputes_list":{"enabled":true},"documents":{"enabled":true},"export_tax_transactions":{"enabled":true},"financial_account_rewards":{"enabled":true},"financial_accounts":{"enabled":true},"financial_accounts_transactions":{"enabled":true},"instant_payouts_promotion":{"enabled":true},"invoice_history":{"enabled":true},"issuing_card":{"enabled":true},"issuing_cards_list":{"enabled":true},"network_cost_passthrough_report":{"enabled":true},"notification_banner":{"enabled":true},"payment_details":{"enabled":true},"payment_disputes":{"enabled":true},"payment_method_settings":{"enabled":true},"payments":{"enabled":true},"payout_details":{"enabled":true},"payout_reconciliation_report":{"enabled":true},"payouts":{"enabled":true},"payouts_list":{"enabled":true},"product_tax_code_selector":{"enabled":true},"reporting_chart":{"enabled":true},"tax_registrations":{"enabled":true},"tax_settings":{"enabled":true},"tax_threshold_monitoring":{"enabled":true},"terminal_hardware_orders":{"enabled":true},"terminal_hardware_shop":{"enabled":true}}}',
post_data='{"account":"account","components":{"account_management":{"enabled":true},"account_onboarding":{"enabled":true},"agentic_commerce_settings":{"enabled":true},"app_install":{"enabled":true},"app_viewport":{"enabled":true},"balance_report":{"enabled":true},"balances":{"enabled":true},"bills":{"enabled":true},"business_profile_management":{"enabled":true},"capital_financing":{"enabled":true},"capital_financing_application":{"enabled":true},"capital_financing_promotion":{"enabled":true},"check_scanning":{"enabled":true},"disputes_list":{"enabled":true},"documents":{"enabled":true},"export_tax_transactions":{"enabled":true},"financial_account_rewards":{"enabled":true},"financial_accounts":{"enabled":true},"financial_accounts_transactions":{"enabled":true},"instant_payouts_promotion":{"enabled":true},"invoice_history":{"enabled":true},"issuing_card":{"enabled":true},"issuing_cards_list":{"enabled":true},"network_cost_passthrough_report":{"enabled":true},"notification_banner":{"enabled":true},"payment_details":{"enabled":true},"payment_disputes":{"enabled":true},"payment_method_settings":{"enabled":true},"payments":{"enabled":true},"payout_details":{"enabled":true},"payout_reconciliation_report":{"enabled":true},"payouts":{"enabled":true},"payouts_list":{"enabled":true},"product_tax_code_selector":{"enabled":true},"reporting_chart":{"enabled":true},"tax_registrations":{"enabled":true},"tax_settings":{"enabled":true},"tax_threshold_monitoring":{"enabled":true},"terminal_hardware_orders":{"enabled":true},"terminal_hardware_shop":{"enabled":true}}}',
is_json=True,
)

Expand Down Expand Up @@ -47696,7 +47697,7 @@ def test_v2_data_analytics_metric_query_post_service(
is_json=True,
)

def test_v2_data_operation_post_service(
def test_v2_data_operation_search_post_required_service(
self, http_client_mock: HTTPClientMock
) -> None:
http_client_mock.stub_request(
Expand All @@ -47718,6 +47719,35 @@ def test_v2_data_operation_post_service(
is_json=True,
)

def test_v2_data_operation_search_post_all_service(
self, http_client_mock: HTTPClientMock
) -> None:
http_client_mock.stub_request(
"post",
"/v2/data/operations/search",
)
client = StripeClient(
"sk_test_123",
http_client=http_client_mock.get_mock_http_client(),
)

client.v2.data.operations.search(
{
"catalogs": ["schemas"],
"limit": 102976443,
"page": "page",
"query": "query",
}
)
http_client_mock.assert_requested(
"post",
path="/v2/data/operations/search",
query_string="",
api_base="https://api.stripe.com",
post_data='{"catalogs":["schemas"],"limit":102976443,"page":"page","query":"query"}',
is_json=True,
)

def test_v2_data_query_run_post_service(
self, http_client_mock: HTTPClientMock
) -> None:
Expand Down Expand Up @@ -52263,7 +52293,33 @@ def test_v2_tax_manual_rule_post_3_service(
is_json=True,
)

def test_v2_tax_operation_post_service(
def test_v2_tax_operation_resolve_address_post_required_service(
self, http_client_mock: HTTPClientMock
) -> None:
http_client_mock.stub_request(
"post",
"/v2/tax/operations/resolve_address",
)
client = StripeClient(
"sk_test_123",
http_client=http_client_mock.get_mock_http_client(),
)

client.v2.tax.operations.resolve_address(
{
"address": {"country": "country"},
}
)
http_client_mock.assert_requested(
"post",
path="/v2/tax/operations/resolve_address",
query_string="",
api_base="https://api.stripe.com",
post_data='{"address":{"country":"country"}}',
is_json=True,
)

def test_v2_tax_operation_resolve_address_post_all_service(
self, http_client_mock: HTTPClientMock
) -> None:
http_client_mock.stub_request(
Expand Down
Loading