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 CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2c60f902831f969f228cecd1f52a81ca240c433c
7144865eb6d660c8cc5832aabf84f296918b112d
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2229
v2239
16 changes: 16 additions & 0 deletions stripe/_account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,17 @@ class Features(StripeObject):
features: Features
_inner_class_types = {"features": Features}

class Bills(StripeObject):
class Features(StripeObject):
pass

enabled: bool
"""
Whether the embedded component is enabled.
"""
features: Features
_inner_class_types = {"features": Features}

class CapitalFinancing(StripeObject):
class Features(StripeObject):
pass
Expand Down Expand Up @@ -529,6 +540,10 @@ class Features(StripeObject):
Configuration for the [agentic commerce settings](https://docs.stripe.com/connect/supported-embedded-components/agentic-commerce-settings/) embedded component.
"""
balances: Balances
bills: Optional[Bills]
"""
Configuration for the [Bills](https://docs.stripe.com/connect/supported-embedded-components/bills/) embedded component.
"""
capital_financing: Optional[CapitalFinancing]
capital_financing_application: Optional[CapitalFinancingApplication]
capital_financing_promotion: Optional[CapitalFinancingPromotion]
Expand Down Expand Up @@ -577,6 +592,7 @@ class Features(StripeObject):
"account_onboarding": AccountOnboarding,
"agentic_commerce_settings": AgenticCommerceSettings,
"balances": Balances,
"bills": Bills,
"capital_financing": CapitalFinancing,
"capital_financing_application": CapitalFinancingApplication,
"capital_financing_promotion": CapitalFinancingPromotion,
Expand Down
12 changes: 12 additions & 0 deletions stripe/_balance_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,22 @@ class SettlementTiming(StripeObject):
"""
A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](https://docs.stripe.com/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`.
"""
default_settlement_currency: Optional[str]
"""
The default settlement currency for the account.
"""
payouts: Optional[Payouts]
"""
Settings specific to the account's payouts.
"""
settlement_currencies: Optional[
UntypedStripeObject[
Literal["disabled", "enabled", "restricted_by_application"]
]
]
"""
A hash of settlement currencies and their states. Each key is an ISO 4217 currency code, and the value is one of `enabled`, `disabled`, or `restricted_by_application`.
"""
settlement_timing: SettlementTiming
_inner_class_types = {
"payouts": Payouts,
Expand Down
10 changes: 10 additions & 0 deletions stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,14 @@ class Boleto(StripeObject):
"""

class Card(StripeObject):
class AccountFunding(StripeObject):
processed_transaction_type: Optional[
Literal["account_funding", "purchase"]
]
"""
The transaction type of the card transaction. One of `account_funding` or `purchase`.
"""

class Benefits(StripeObject):
issuer: Optional[str]
"""
Expand Down Expand Up @@ -834,6 +842,7 @@ class ShippingAddress(StripeObject):
"visa_checkout": VisaCheckout,
}

account_funding: Optional[AccountFunding]
amount_authorized: Optional[int]
"""
The authorized amount.
Expand Down Expand Up @@ -950,6 +959,7 @@ class ShippingAddress(StripeObject):
If this Card is part of a card wallet, this contains the details of the card wallet.
"""
_inner_class_types = {
"account_funding": AccountFunding,
"benefits": Benefits,
"checks": Checks,
"decremental_authorization": DecrementalAuthorization,
Expand Down
4 changes: 4 additions & 0 deletions stripe/_invoice_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ class ScheduleDetails(StripeObject):
"""
The subscription schedule that generated this invoice item
"""
subscription: Optional[str]
"""
The subscription associated with this schedule
"""

class SubscriptionDetails(StripeObject):
subscription: str
Expand Down
119 changes: 119 additions & 0 deletions stripe/_payment_attempt_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
from stripe.params._payment_attempt_record_report_authenticated_params import (
PaymentAttemptRecordReportAuthenticatedParams,
)
from stripe.params._payment_attempt_record_report_authorized_params import (
PaymentAttemptRecordReportAuthorizedParams,
)
from stripe.params._payment_attempt_record_report_canceled_params import (
PaymentAttemptRecordReportCanceledParams,
)
Expand Down Expand Up @@ -2430,6 +2433,122 @@ async def report_authenticated_async( # pyright: ignore[reportGeneralTypeIssues
),
)

@classmethod
def _cls_report_authorized(
cls,
payment_attempt_record: str,
**params: Unpack["PaymentAttemptRecordReportAuthorizedParams"],
) -> "PaymentAttemptRecord":
"""
Report that the specified Payment Attempt Record was authorized.
"""
return cast(
"PaymentAttemptRecord",
cls._static_request(
"post",
"/v1/payment_attempt_records/{payment_attempt_record}/report_authorized".format(
payment_attempt_record=sanitize_id(payment_attempt_record)
),
params=params,
),
)

@overload
@staticmethod
def report_authorized(
payment_attempt_record: str,
**params: Unpack["PaymentAttemptRecordReportAuthorizedParams"],
) -> "PaymentAttemptRecord":
"""
Report that the specified Payment Attempt Record was authorized.
"""
...

@overload
def report_authorized(
self, **params: Unpack["PaymentAttemptRecordReportAuthorizedParams"]
) -> "PaymentAttemptRecord":
"""
Report that the specified Payment Attempt Record was authorized.
"""
...

@class_method_variant("_cls_report_authorized")
def report_authorized( # pyright: ignore[reportGeneralTypeIssues]
self, **params: Unpack["PaymentAttemptRecordReportAuthorizedParams"]
) -> "PaymentAttemptRecord":
"""
Report that the specified Payment Attempt Record was authorized.
"""
return cast(
"PaymentAttemptRecord",
self._request(
"post",
"/v1/payment_attempt_records/{payment_attempt_record}/report_authorized".format(
payment_attempt_record=sanitize_id(self._data.get("id"))
),
params=params,
),
)

@classmethod
async def _cls_report_authorized_async(
cls,
payment_attempt_record: str,
**params: Unpack["PaymentAttemptRecordReportAuthorizedParams"],
) -> "PaymentAttemptRecord":
"""
Report that the specified Payment Attempt Record was authorized.
"""
return cast(
"PaymentAttemptRecord",
await cls._static_request_async(
"post",
"/v1/payment_attempt_records/{payment_attempt_record}/report_authorized".format(
payment_attempt_record=sanitize_id(payment_attempt_record)
),
params=params,
),
)

@overload
@staticmethod
async def report_authorized_async(
payment_attempt_record: str,
**params: Unpack["PaymentAttemptRecordReportAuthorizedParams"],
) -> "PaymentAttemptRecord":
"""
Report that the specified Payment Attempt Record was authorized.
"""
...

@overload
async def report_authorized_async(
self, **params: Unpack["PaymentAttemptRecordReportAuthorizedParams"]
) -> "PaymentAttemptRecord":
"""
Report that the specified Payment Attempt Record was authorized.
"""
...

@class_method_variant("_cls_report_authorized_async")
async def report_authorized_async( # pyright: ignore[reportGeneralTypeIssues]
self, **params: Unpack["PaymentAttemptRecordReportAuthorizedParams"]
) -> "PaymentAttemptRecord":
"""
Report that the specified Payment Attempt Record was authorized.
"""
return cast(
"PaymentAttemptRecord",
await self._request_async(
"post",
"/v1/payment_attempt_records/{payment_attempt_record}/report_authorized".format(
payment_attempt_record=sanitize_id(self._data.get("id"))
),
params=params,
),
)

@classmethod
def _cls_report_canceled(
cls,
Expand Down
47 changes: 47 additions & 0 deletions stripe/_payment_attempt_record_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
from stripe.params._payment_attempt_record_report_authenticated_params import (
PaymentAttemptRecordReportAuthenticatedParams,
)
from stripe.params._payment_attempt_record_report_authorized_params import (
PaymentAttemptRecordReportAuthorizedParams,
)
from stripe.params._payment_attempt_record_report_canceled_params import (
PaymentAttemptRecordReportCanceledParams,
)
Expand Down Expand Up @@ -162,6 +165,50 @@ async def report_authenticated_async(
),
)

def report_authorized(
self,
payment_attempt_record: str,
params: Optional["PaymentAttemptRecordReportAuthorizedParams"] = None,
options: Optional["RequestOptions"] = None,
) -> "PaymentAttemptRecord":
"""
Report that the specified Payment Attempt Record was authorized.
"""
return cast(
"PaymentAttemptRecord",
self._request(
"post",
"/v1/payment_attempt_records/{payment_attempt_record}/report_authorized".format(
payment_attempt_record=sanitize_id(payment_attempt_record),
),
base_address="api",
params=params,
options=options,
),
)

async def report_authorized_async(
self,
payment_attempt_record: str,
params: Optional["PaymentAttemptRecordReportAuthorizedParams"] = None,
options: Optional["RequestOptions"] = None,
) -> "PaymentAttemptRecord":
"""
Report that the specified Payment Attempt Record was authorized.
"""
return cast(
"PaymentAttemptRecord",
await self._request_async(
"post",
"/v1/payment_attempt_records/{payment_attempt_record}/report_authorized".format(
payment_attempt_record=sanitize_id(payment_attempt_record),
),
base_address="api",
params=params,
options=options,
),
)

def report_canceled(
self,
payment_attempt_record: str,
Expand Down
Loading
Loading