8000 Update generated code for v1771 · stripe/stripe-python@6060c4e · GitHub
[go: up one dir, main page]

Skip to content

Commit 6060c4e

Browse files
Update generated code for v1771
1 parent 5835b20 commit 6060c4e

16 files changed

+703
-14
lines changed

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1770
1+
v1771

stripe/_account_session.py

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,32 @@ class Features(StripeObject):
120120
features: Features
121121
_inner_class_types = {"features": Features}
122122

123+
class DisputesList(StripeObject):
124+
class Features(StripeObject):
125+
capture_payments: bool
126+
"""
127+
Whether to allow capturing and cancelling payment intents. This is `true` by default.
128+
"""
129+
destination_on_behalf_of_charge_management: bool
130+
"""
131+
Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
132+
"""
133+
dispute_management: bool
134+
"""
135+
Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
136+
"""
137+
refund_management: bool
138+
"""
139+
Whether to allow sending refunds. This is `true` by default.
140+
"""
141+
142+
enabled: bool
143+
"""
144+
Whether the embedded component is enabled.
145+
"""
146+
features: Features
147+
_inner_class_types = {"features": Features}
148+
123149
class Documents(StripeObject):
124150
class Features(StripeObject):
125151
pass
@@ -271,6 +297,28 @@ class Features(StripeObject):
271297
features: Features
272298
_inner_class_types = {"features": Features}
273299

300+
class PaymentDisputes(StripeObject):
301+
class Features(StripeObject):
302+
destination_on_behalf_of_charge_management: bool
303+
"""
304+
Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
305+
"""
306+
dispute_management: bool
307+
"""
308+
Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
309+
"""
310+
refund_management: bool
311+
"""
312+
Whether to allow sending refunds. This is `true` by default.
313+
"""
314+
315+
enabled: bool
316+
"""
317+
Whether the embedded component is enabled.
318+
"""
319+
features: Features
320+
_inner_class_types = {"features": Features}
321+
274322
class Payments(StripeObject):
275323
class Features(StripeObject):
276324
capture_payments: bool
@@ -366,13 +414,15 @@ class Features(StripeObject):
366414
capital_financing: Optional[CapitalFinancing]
367415
capital_financing_application: Optional[CapitalFinancingApplication]
368416
capital_financing_promotion: Optional[CapitalFinancingPromotion]
417+
disputes_list: DisputesList
369418
documents: Documents
370419
financial_account: FinancialAccount
371420
financial_account_transactions: FinancialAccountTransactions
372421
issuing_card: IssuingCard
373422
issuing_cards_list: IssuingCardsList
374423
notification_banner: NotificationBanner
375424
payment_details: PaymentDetails
425+
payment_disputes: PaymentDisputes
376426
payments: Payments
377427
payouts: Payouts
378428
payouts_list: PayoutsList
@@ -385,13 +435,15 @@ class Features(StripeObject):
385435
"capital_financing": CapitalFinancing,
386436
"capital_financing_application": CapitalFinancingApplication,
387437
"capital_financing_promotion": CapitalFinancingPromotion,
438+
"disputes_list": DisputesList,
388439
"documents": Documents,
389440
"financial_account": FinancialAccount,
390441
"financial_account_transactions": FinancialAccountTransactions,
391442
"issuing_card": IssuingCard,
392443
"issuing_cards_list": IssuingCardsList,
393444
"notification_banner": NotificationBanner,
394445
"payment_details": PaymentDetails,
446+
"payment_disputes": PaymentDisputes,
395447
"payments": Payments,
396448
"payouts": Payouts,
397449
"payouts_list": PayoutsList,
@@ -466,6 +518,12 @@ class CreateParamsComponents(TypedDict):
466518
"""
467519
Configuration for the capital overview embedded component.
468520
"""
521+
disputes_list: NotRequired[
522+
"AccountSession.CreateParamsComponentsDisputesList"
523+
]
524+
"""
525+
Configuration for the disputes list embedded component.
526+
"""
469527
documents: NotRequired[
470528
"AccountSession.CreateParamsComponentsDocuments"
471529
]
@@ -751,6 +809,36 @@ class CreateParamsComponentsCapitalOverview(TypedDict):
751809
class CreateParamsComponentsCapitalOverviewFeatures(TypedDict):
752810
pass
753811

812+
class CreateParamsComponentsDisputesList(TypedDict):
813+
enabled: bool
814+
"""
815+
Whether the embedded component is enabled.
816+
"""
817+
features: NotRequired[
818+
"AccountSession.CreateParamsComponentsDisputesListFeatures"
819+
]
820+
"""
821+
The list of features enabled in the embedded component.
822+
"""
823+
824+
class CreateParamsComponentsDisputesListFeatures(TypedDict):
825+
capture_payments: NotRequired[bool]
826+
"""
827+
Whether to allow capturing and cancelling payment intents. This is `true` by default.
828+
"""
829+
destination_on_behalf_of_charge_management: NotRequired[bool]
830+
"""
831+
Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
832+
"""
833+
dispute_management: NotRequired[bool]
834+
"""
835+
Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
836+
"""
837+
refund_management: NotRequired[bool]
838+
"""
839+
Whether to allow sending refunds. This is `true` by default.
840+
"""
841+
754842
class CreateParamsComponentsDocuments(TypedDict):
755843
enabled: bool
756844
"""

stripe/_account_session_service.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ class CreateParamsComponents(TypedDict):
7777
"""
7878
Configuration for the capital overview embedded component.
7979
"""
80+
disputes_list: NotRequired[
81+
"AccountSessionService.CreateParamsComponentsDisputesList"
82+
]
83+
"""
84+
Configuration for the disputes list embedded component.
85+
"""
8086
documents: NotRequired[
8187
"AccountSessionService.CreateParamsComponentsDocuments"
8288
]
@@ -366,6 +372,36 @@ class CreateParamsComponentsCapitalOverview(TypedDict):
366372
class CreateParamsComponentsCapitalOverviewFeatures(TypedDict):
367373
pass
368374

375+
class CreateParamsComponentsDisputesList(TypedDict):
376+
enabled: bool
377+
"""
378+
Whether the embedded component is enabled.
379+
"""
380+
features: NotRequired[
381+
"AccountSessionService.CreateParamsComponentsDisputesListFeatures"
382+
]
383+
"""
384+
The list of features enabled in the embedded component.
385+
"""
386+
387+
class CreateParamsComponentsDisputesListFeatures(TypedDict):
388+
capture_payments: NotRequired[bool]
389+
"""
390+
Whether to allow capturing and cancelling payment intents. This is `true` by default.
391+
"""
392+
destination_on_behalf_of_charge_management: NotRequired[bool]
393+
"""
394+
Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
395+
"""
396+
dispute_management: NotRequired[bool]
397+
"""
398+
Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
399+
"""
400+
refund_management: NotRequired[bool]
401+
"""
402+
Whether to allow sending refunds. This is `true` by default.
403+
"""
404+
369405
class CreateParamsComponentsDocuments(TypedDict):
370406
enabled: bool
371407
"""

stripe/_invoice.py

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3413,6 +3413,12 @@ class CreatePreviewParamsScheduleDetailsPhase(TypedDict):
34133413
"""
34143414
Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
34153415
"""
3416+
billing_thresholds: NotRequired[
3417+
"Literal['']|Invoice.CreatePreviewParamsScheduleDetailsPhaseBillingThresholds"
3418+
]
3419+
"""
3420+
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
3421+
"""
34163422
collection_method: NotRequired[
34173423
Literal["charge_automatically", "send_invoice"]
34183424
]
@@ -3638,6 +3644,16 @@ class CreatePreviewParamsScheduleDetailsPhaseAutomaticTaxLiability(
36383644
Type of the account referenced in the request.
36393645
"""
36403646

3647+
class CreatePreviewParamsScheduleDetailsPhaseBillingThresholds(TypedDict):
3648+
amount_gte: NotRequired[int]
3649+
"""
3650+
Monetary threshold that triggers the subscription to advance to a new billing period
3651+
"""
3652+
reset_billing_cycle_anchor: NotRequired[bool]
3653+
"""
3654+
Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
3655+
"""
3656+
36413657
class CreatePreviewParamsScheduleDetailsPhaseDiscount(TypedDict):
36423658
coupon: NotRequired[str]
36433659
"""
@@ -3717,6 +3733,12 @@ class CreatePreviewParamsScheduleDetailsPhaseInvoiceSettingsIssuer(
37173733
"""
37183734

37193735
class CreatePreviewParamsScheduleDetailsPhaseItem(TypedDict):
3736+
billing_thresholds: NotRequired[
3737+
"Literal['']|Invoice.CreatePreviewParamsScheduleDetailsPhaseItemBillingThresholds"
3738+
]
3739+
"""
3740+
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
3741+
"""
37203742
discounts: NotRequired[
37213743
"Literal['']|List[Invoice.CreatePreviewParamsScheduleDetailsPhaseItemDiscount]"
37223744
]
@@ -3756,6 +3778,14 @@ class CreatePreviewParamsScheduleDetailsPhaseItem(TypedDict):
37563778
Options that configure the trial on the subscription item.
37573779
"""
37583780

3781+
class CreatePreviewParamsScheduleDetailsPhaseItemBillingThresholds(
3782+
TypedDict,
3783+
):
3784+
usage_gte: int
3785+
"""
3786+
Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
3787+
"""
3788+
37593789
class CreatePreviewParamsScheduleDetailsPhaseItemDiscount(TypedDict):
37603790
coupon: NotRequired[str]
37613791
"""
@@ -4005,6 +4035,12 @@ class CreatePreviewParamsSubscriptionDetails(TypedDict):
40054035
"""
40064036

40074037
class CreatePreviewParamsSubscriptionDetailsItem(TypedDict):
4038+
billing_thresholds: NotRequired[
4039+
"Literal['']|Invoice.CreatePreviewParamsSubscriptionDetailsItemBillingThresholds"
4040+
]
4041+
"""
4042+
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
4043+
"""
40084044
clear_usage: NotRequired[bool]
40094045
"""
40104046
Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
@@ -4050,6 +4086,14 @@ class CreatePreviewParamsSubscriptionDetailsItem(TypedDict):
40504086
A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
40514087
"""
40524088

4089+
class CreatePreviewParamsSubscriptionDetailsItemBillingThresholds(
4090+
TypedDict,
4091+
):
4092+
usage_gte: int
4093+
"""
4094+
Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
4095+
"""
4096+
40534097
class CreatePreviewParamsSubscriptionDetailsItemDiscount(TypedDict):
40544098
coupon: NotRequired[str]
40554099
"""
@@ -5989,7 +6033,9 @@ def create_preview(
59896033
"""
59906034
At any time, you can preview the upcoming invoice for a subscription or subscription schedule. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.
59916035
5992-
You can also preview the effects of creating or updating a subscription or subscription schedule, including a preview of any prorations that will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request.
6036+
You can also preview the effects of creating or updating a subscription or subscription schedule, including a preview of any prorations that will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update.
6037+
6038+
The recommended way to get only the prorations being previewed on the invoice is to consider line items where parent.subscription_item_details.proration is true.
59936039
59946040
Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.
59956041
@@ -6011,7 +6057,9 @@ async def create_preview_async(
60116057
"""
60126058
At any time, you can preview the upcoming invoice for a subscription or subscription schedule. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.
60136059
6014-
You can also preview the effects of creating or updating a subscription or subscription schedule, including a preview of any prorations that will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request.
6060+
You can also preview the effects of creating or updating a subscription or subscription schedule, including a preview of any prorations that will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update.
6061+
6062+
The recommended way to get only the prorations being previewed on the invoice is to consider line items where parent.subscription_item_details.proration is true.
60156063
60166064
Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.
60176065

0 commit comments

Comments
 (0)
0