Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code #1033

Merged
merged 2 commits into from
Sep 7, 2023
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 OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v498
v510
1 change: 1 addition & 0 deletions stripe/api_resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
from stripe.api_resources.payment_intent import PaymentIntent
from stripe.api_resources.payment_link import PaymentLink
from stripe.api_resources.payment_method import PaymentMethod
from stripe.api_resources.payment_method_domain import PaymentMethodDomain
from stripe.api_resources.payout import Payout
from stripe.api_resources.person import Person
from stripe.api_resources.plan import Plan
Expand Down
2 changes: 1 addition & 1 deletion stripe/api_resources/account_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class AccountLink(CreateableAPIResource["AccountLink"]):
Account Links are the means by which a Connect platform grants a connected account permission to access
Stripe-hosted applications, such as Connect Onboarding.

Related guide: [Connect Onboarding](https://stripe.com/docs/connect/connect-onboarding)
Related guide: [Connect Onboarding](https://stripe.com/docs/connect/custom/hosted-onboarding)
"""

OBJECT_NAME = "account_link"
Expand Down
66 changes: 66 additions & 0 deletions stripe/api_resources/payment_method_domain.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
from __future__ import absolute_import, division, print_function

from stripe import util
from stripe.api_resources.abstract import CreateableAPIResource
from stripe.api_resources.abstract import ListableAPIResource
from stripe.api_resources.abstract import UpdateableAPIResource
from stripe.stripe_object import StripeObject
from typing_extensions import Literal


class PaymentMethodDomain(
CreateableAPIResource["PaymentMethodDomain"],
ListableAPIResource["PaymentMethodDomain"],
UpdateableAPIResource["PaymentMethodDomain"],
):
"""
A payment method domain represents a web domain that you have registered with Stripe.
Stripe Elements use registered payment method domains to control where certain payment methods are shown.

Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).
"""

OBJECT_NAME = "payment_method_domain"
apple_pay: StripeObject
created: str
domain_name: str
enabled: bool
google_pay: StripeObject
id: str
link: StripeObject
livemode: bool
object: Literal["payment_method_domain"]
paypal: StripeObject

@classmethod
def _cls_validate(
cls,
payment_method_domain,
api_key=None,
stripe_version=None,
stripe_account=None,
**params
):
return cls._static_request(
"post",
"/v1/payment_method_domains/{payment_method_domain}/validate".format(
payment_method_domain=util.sanitize_id(payment_method_domain)
),
api_key=api_key,
stripe_version=stripe_version,
stripe_account=stripe_account,
params=params,
)

@util.class_method_variant("_cls_validate")
def validate(self, idempotency_key=None, **params):
return self._request(
"post",
"/v1/payment_method_domains/{payment_method_domain}/validate".format(
payment_method_domain=util.sanitize_id(self.get("id"))
),
idempotency_key=idempotency_key,
params=params,
)
1 change: 1 addition & 0 deletions stripe/api_resources/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class Product(
created: str
default_price: Optional[ExpandableField["Price"]]
description: Optional[str]
features: List[StripeObject]
id: str
images: List[str]
livemode: bool
Expand Down
1 change: 1 addition & 0 deletions stripe/object_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
api_resources.PaymentIntent.OBJECT_NAME: api_resources.PaymentIntent,
api_resources.PaymentLink.OBJECT_NAME: api_resources.PaymentLink,
api_resources.PaymentMethod.OBJECT_NAME: api_resources.PaymentMethod,
api_resources.PaymentMethodDomain.OBJECT_NAME: api_resources.PaymentMethodDomain,
api_resources.Payout.OBJECT_NAME: api_resources.Payout,
api_resources.Person.OBJECT_NAME: api_resources.Person,
api_resources.Plan.OBJECT_NAME: api_resources.Plan,
Expand Down