| 1 |
# -*- coding: utf-8 -*- |
| 2 |
# File generated from our OpenAPI spec |
| 3 |
from stripe._stripe_service import StripeService |
| 4 |
from typing import Optional, cast |
| 5 |
from typing_extensions import TYPE_CHECKING |
| 6 |
|
| 7 |
if TYPE_CHECKING: |
| 8 |
from stripe._request_options import RequestOptions |
| 9 |
from stripe.params.terminal._onboarding_link_create_params import ( |
| 10 |
OnboardingLinkCreateParams, |
| 11 |
) |
| 12 |
from stripe.terminal._onboarding_link import OnboardingLink |
| 13 |
|
| 14 |
|
| 15 |
class OnboardingLinkService(StripeService): |
| 16 |
def create( |
| 17 |
self, |
| 18 |
params: "OnboardingLinkCreateParams", |
| 19 |
options: Optional["RequestOptions"] = None, |
| 20 |
) -> "OnboardingLink": |
| 21 |
""" |
| 22 |
Creates a new OnboardingLink object that contains a redirect_url used for onboarding onto Tap to Pay on iPhone. |
| 23 |
""" |
| 24 |
return cast( |
| 25 |
"OnboardingLink", |
| 26 |
self._request( |
| 27 |
"post", |
| 28 |
"/v1/terminal/onboarding_links", |
| 29 |
base_address="api", |
| 30 |
params=params, |
| 31 |
options=options, |
| 32 |
), |
| 33 |
) |
| 34 |
|
| 35 |
async def create_async( |
| 36 |
self, |
| 37 |
params: "OnboardingLinkCreateParams", |
| 38 |
options: Optional["RequestOptions"] = None, |
| 39 |
) -> "OnboardingLink": |
| 40 |
""" |
| 41 |
Creates a new OnboardingLink object that contains a redirect_url used for onboarding onto Tap to Pay on iPhone. |
| 42 |
""" |
| 43 |
return cast( |
| 44 |
"OnboardingLink", |
| 45 |
await self._request_async( |
| 46 |
"post", |
| 47 |
"/v1/terminal/onboarding_links", |
| 48 |
base_address="api", |
| 49 |
params=params, |
| 50 |
options=options, |
| 51 |
), |
| 52 |
) |