updates
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from importlib import import_module
|
||||
from typing_extensions import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from stripe.terminal._configuration import Configuration as Configuration
|
||||
from stripe.terminal._configuration_service import (
|
||||
ConfigurationService as ConfigurationService,
|
||||
)
|
||||
from stripe.terminal._connection_token import (
|
||||
ConnectionToken as ConnectionToken,
|
||||
)
|
||||
from stripe.terminal._connection_token_service import (
|
||||
ConnectionTokenService as ConnectionTokenService,
|
||||
)
|
||||
from stripe.terminal._location import Location as Location
|
||||
from stripe.terminal._location_service import (
|
||||
LocationService as LocationService,
|
||||
)
|
||||
from stripe.terminal._reader import Reader as Reader
|
||||
from stripe.terminal._reader_service import ReaderService as ReaderService
|
||||
|
||||
# name -> (import_target, is_submodule)
|
||||
_import_map = {
|
||||
"Configuration": ("stripe.terminal._configuration", False),
|
||||
"ConfigurationService": ("stripe.terminal._configuration_service", False),
|
||||
"ConnectionToken": ("stripe.terminal._connection_token", False),
|
||||
"ConnectionTokenService": (
|
||||
"stripe.terminal._connection_token_service",
|
||||
False,
|
||||
),
|
||||
"Location": ("stripe.terminal._location", False),
|
||||
"LocationService": ("stripe.terminal._location_service", False),
|
||||
"Reader": ("stripe.terminal._reader", False),
|
||||
"ReaderService": ("stripe.terminal._reader_service", False),
|
||||
}
|
||||
if not TYPE_CHECKING:
|
||||
|
||||
def __getattr__(name):
|
||||
try:
|
||||
target, is_submodule = _import_map[name]
|
||||
module = import_module(target)
|
||||
if is_submodule:
|
||||
return module
|
||||
|
||||
return getattr(
|
||||
module,
|
||||
name,
|
||||
)
|
||||
except KeyError:
|
||||
raise AttributeError()
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,778 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._createable_api_resource import CreateableAPIResource
|
||||
from stripe._deletable_api_resource import DeletableAPIResource
|
||||
from stripe._expandable_field import ExpandableField
|
||||
from stripe._list_object import ListObject
|
||||
from stripe._listable_api_resource import ListableAPIResource
|
||||
from stripe._stripe_object import StripeObject
|
||||
from stripe._updateable_api_resource import UpdateableAPIResource
|
||||
from stripe._util import class_method_variant, sanitize_id
|
||||
from typing import ClassVar, List, Optional, cast, overload
|
||||
from typing_extensions import Literal, Unpack, TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from stripe._file import File
|
||||
from stripe.params.terminal._configuration_create_params import (
|
||||
ConfigurationCreateParams,
|
||||
)
|
||||
from stripe.params.terminal._configuration_delete_params import (
|
||||
ConfigurationDeleteParams,
|
||||
)
|
||||
from stripe.params.terminal._configuration_list_params import (
|
||||
ConfigurationListParams,
|
||||
)
|
||||
from stripe.params.terminal._configuration_modify_params import (
|
||||
ConfigurationModifyParams,
|
||||
)
|
||||
from stripe.params.terminal._configuration_retrieve_params import (
|
||||
ConfigurationRetrieveParams,
|
||||
)
|
||||
|
||||
|
||||
class Configuration(
|
||||
CreateableAPIResource["Configuration"],
|
||||
DeletableAPIResource["Configuration"],
|
||||
ListableAPIResource["Configuration"],
|
||||
UpdateableAPIResource["Configuration"],
|
||||
):
|
||||
"""
|
||||
A Configurations object represents how features should be configured for terminal readers.
|
||||
For information about how to use it, see the [Terminal configurations documentation](https://docs.stripe.com/terminal/fleet/configurations-overview).
|
||||
"""
|
||||
|
||||
OBJECT_NAME: ClassVar[Literal["terminal.configuration"]] = (
|
||||
"terminal.configuration"
|
||||
)
|
||||
|
||||
class BbposWisepad3(StripeObject):
|
||||
splashscreen: Optional[ExpandableField["File"]]
|
||||
"""
|
||||
A File ID representing an image to display on the reader
|
||||
"""
|
||||
|
||||
class BbposWiseposE(StripeObject):
|
||||
splashscreen: Optional[ExpandableField["File"]]
|
||||
"""
|
||||
A File ID representing an image to display on the reader
|
||||
"""
|
||||
|
||||
class Offline(StripeObject):
|
||||
enabled: Optional[bool]
|
||||
"""
|
||||
Determines whether to allow transactions to be collected while reader is offline. Defaults to false.
|
||||
"""
|
||||
|
||||
class RebootWindow(StripeObject):
|
||||
end_hour: int
|
||||
"""
|
||||
Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour.
|
||||
"""
|
||||
start_hour: int
|
||||
"""
|
||||
Integer between 0 to 23 that represents the start hour of the reboot time window.
|
||||
"""
|
||||
|
||||
class StripeS700(StripeObject):
|
||||
splashscreen: Optional[ExpandableField["File"]]
|
||||
"""
|
||||
A File ID representing an image to display on the reader
|
||||
"""
|
||||
|
||||
class Tipping(StripeObject):
|
||||
class Aed(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Aud(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Bgn(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Cad(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Chf(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Czk(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Dkk(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Eur(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Gbp(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Gip(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Hkd(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Huf(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Jpy(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Mxn(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Myr(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Nok(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Nzd(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Pln(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Ron(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Sek(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Sgd(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
class Usd(StripeObject):
|
||||
fixed_amounts: Optional[List[int]]
|
||||
"""
|
||||
Fixed amounts displayed when collecting a tip
|
||||
"""
|
||||
percentages: Optional[List[int]]
|
||||
"""
|
||||
Percentages displayed when collecting a tip
|
||||
"""
|
||||
smart_tip_threshold: Optional[int]
|
||||
"""
|
||||
Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
||||
"""
|
||||
|
||||
aed: Optional[Aed]
|
||||
aud: Optional[Aud]
|
||||
bgn: Optional[Bgn]
|
||||
cad: Optional[Cad]
|
||||
chf: Optional[Chf]
|
||||
czk: Optional[Czk]
|
||||
dkk: Optional[Dkk]
|
||||
eur: Optional[Eur]
|
||||
gbp: Optional[Gbp]
|
||||
gip: Optional[Gip]
|
||||
hkd: Optional[Hkd]
|
||||
huf: Optional[Huf]
|
||||
jpy: Optional[Jpy]
|
||||
mxn: Optional[Mxn]
|
||||
myr: Optional[Myr]
|
||||
nok: Optional[Nok]
|
||||
nzd: Optional[Nzd]
|
||||
pln: Optional[Pln]
|
||||
ron: Optional[Ron]
|
||||
sek: Optional[Sek]
|
||||
sgd: Optional[Sgd]
|
||||
usd: Optional[Usd]
|
||||
_inner_class_types = {
|
||||
"aed": Aed,
|
||||
"aud": Aud,
|
||||
"bgn": Bgn,
|
||||
"cad": Cad,
|
||||
"chf": Chf,
|
||||
"czk": Czk,
|
||||
"dkk": Dkk,
|
||||
"eur": Eur,
|
||||
"gbp": Gbp,
|
||||
"gip": Gip,
|
||||
"hkd": Hkd,
|
||||
"huf": Huf,
|
||||
"jpy": Jpy,
|
||||
"mxn": Mxn,
|
||||
"myr": Myr,
|
||||
"nok": Nok,
|
||||
"nzd": Nzd,
|
||||
"pln": Pln,
|
||||
"ron": Ron,
|
||||
"sek": Sek,
|
||||
"sgd": Sgd,
|
||||
"usd": Usd,
|
||||
}
|
||||
|
||||
class VerifoneP400(StripeObject):
|
||||
splashscreen: Optional[ExpandableField["File"]]
|
||||
"""
|
||||
A File ID representing an image to display on the reader
|
||||
"""
|
||||
|
||||
class Wifi(StripeObject):
|
||||
class EnterpriseEapPeap(StripeObject):
|
||||
ca_certificate_file: Optional[str]
|
||||
"""
|
||||
A File ID representing a PEM file containing the server certificate
|
||||
"""
|
||||
password: str
|
||||
"""
|
||||
Password for connecting to the WiFi network
|
||||
"""
|
||||
ssid: str
|
||||
"""
|
||||
Name of the WiFi network
|
||||
"""
|
||||
username: str
|
||||
"""
|
||||
Username for connecting to the WiFi network
|
||||
"""
|
||||
|
||||
class EnterpriseEapTls(StripeObject):
|
||||
ca_certificate_file: Optional[str]
|
||||
"""
|
||||
A File ID representing a PEM file containing the server certificate
|
||||
"""
|
||||
client_certificate_file: str
|
||||
"""
|
||||
A File ID representing a PEM file containing the client certificate
|
||||
"""
|
||||
private_key_file: str
|
||||
"""
|
||||
A File ID representing a PEM file containing the client RSA private key
|
||||
"""
|
||||
private_key_file_password: Optional[str]
|
||||
"""
|
||||
Password for the private key file
|
||||
"""
|
||||
ssid: str
|
||||
"""
|
||||
Name of the WiFi network
|
||||
"""
|
||||
|
||||
class PersonalPsk(StripeObject):
|
||||
password: str
|
||||
"""
|
||||
Password for connecting to the WiFi network
|
||||
"""
|
||||
ssid: str
|
||||
"""
|
||||
Name of the WiFi network
|
||||
"""
|
||||
|
||||
enterprise_eap_peap: Optional[EnterpriseEapPeap]
|
||||
enterprise_eap_tls: Optional[EnterpriseEapTls]
|
||||
personal_psk: Optional[PersonalPsk]
|
||||
type: Literal[
|
||||
"enterprise_eap_peap", "enterprise_eap_tls", "personal_psk"
|
||||
]
|
||||
"""
|
||||
Security type of the WiFi network. The hash with the corresponding name contains the credentials for this security type.
|
||||
"""
|
||||
_inner_class_types = {
|
||||
"enterprise_eap_peap": EnterpriseEapPeap,
|
||||
"enterprise_eap_tls": EnterpriseEapTls,
|
||||
"personal_psk": PersonalPsk,
|
||||
}
|
||||
|
||||
bbpos_wisepad3: Optional[BbposWisepad3]
|
||||
bbpos_wisepos_e: Optional[BbposWiseposE]
|
||||
deleted: Optional[Literal[True]]
|
||||
"""
|
||||
Always true for a deleted object
|
||||
"""
|
||||
id: str
|
||||
"""
|
||||
Unique identifier for the object.
|
||||
"""
|
||||
is_account_default: Optional[bool]
|
||||
"""
|
||||
Whether this Configuration is the default for your account
|
||||
"""
|
||||
livemode: bool
|
||||
"""
|
||||
Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
"""
|
||||
name: Optional[str]
|
||||
"""
|
||||
String indicating the name of the Configuration object, set by the user
|
||||
"""
|
||||
object: Literal["terminal.configuration"]
|
||||
"""
|
||||
String representing the object's type. Objects of the same type share the same value.
|
||||
"""
|
||||
offline: Optional[Offline]
|
||||
reboot_window: Optional[RebootWindow]
|
||||
stripe_s700: Optional[StripeS700]
|
||||
tipping: Optional[Tipping]
|
||||
verifone_p400: Optional[VerifoneP400]
|
||||
wifi: Optional[Wifi]
|
||||
|
||||
@classmethod
|
||||
def create(
|
||||
cls, **params: Unpack["ConfigurationCreateParams"]
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Creates a new Configuration object.
|
||||
"""
|
||||
return cast(
|
||||
"Configuration",
|
||||
cls._static_request(
|
||||
"post",
|
||||
cls.class_url(),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def create_async(
|
||||
cls, **params: Unpack["ConfigurationCreateParams"]
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Creates a new Configuration object.
|
||||
"""
|
||||
return cast(
|
||||
"Configuration",
|
||||
await cls._static_request_async(
|
||||
"post",
|
||||
cls.class_url(),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def _cls_delete(
|
||||
cls, sid: str, **params: Unpack["ConfigurationDeleteParams"]
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Deletes a Configuration object.
|
||||
"""
|
||||
url = "%s/%s" % (cls.class_url(), sanitize_id(sid))
|
||||
return cast(
|
||||
"Configuration",
|
||||
cls._static_request(
|
||||
"delete",
|
||||
url,
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@overload
|
||||
@staticmethod
|
||||
def delete(
|
||||
sid: str, **params: Unpack["ConfigurationDeleteParams"]
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Deletes a Configuration object.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
def delete(
|
||||
self, **params: Unpack["ConfigurationDeleteParams"]
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Deletes a Configuration object.
|
||||
"""
|
||||
...
|
||||
|
||||
@class_method_variant("_cls_delete")
|
||||
def delete( # pyright: ignore[reportGeneralTypeIssues]
|
||||
self, **params: Unpack["ConfigurationDeleteParams"]
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Deletes a Configuration object.
|
||||
"""
|
||||
return self._request_and_refresh(
|
||||
"delete",
|
||||
self.instance_url(),
|
||||
params=params,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def _cls_delete_async(
|
||||
cls, sid: str, **params: Unpack["ConfigurationDeleteParams"]
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Deletes a Configuration object.
|
||||
"""
|
||||
url = "%s/%s" % (cls.class_url(), sanitize_id(sid))
|
||||
return cast(
|
||||
"Configuration",
|
||||
await cls._static_request_async(
|
||||
"delete",
|
||||
url,
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@overload
|
||||
@staticmethod
|
||||
async def delete_async(
|
||||
sid: str, **params: Unpack["ConfigurationDeleteParams"]
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Deletes a Configuration object.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
async def delete_async(
|
||||
self, **params: Unpack["ConfigurationDeleteParams"]
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Deletes a Configuration object.
|
||||
"""
|
||||
...
|
||||
|
||||
@class_method_variant("_cls_delete_async")
|
||||
async def delete_async( # pyright: ignore[reportGeneralTypeIssues]
|
||||
self, **params: Unpack["ConfigurationDeleteParams"]
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Deletes a Configuration object.
|
||||
"""
|
||||
return await self._request_and_refresh_async(
|
||||
"delete",
|
||||
self.instance_url(),
|
||||
params=params,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def list(
|
||||
cls, **params: Unpack["ConfigurationListParams"]
|
||||
) -> ListObject["Configuration"]:
|
||||
"""
|
||||
Returns a list of Configuration objects.
|
||||
"""
|
||||
result = cls._static_request(
|
||||
"get",
|
||||
cls.class_url(),
|
||||
params=params,
|
||||
)
|
||||
if not isinstance(result, ListObject):
|
||||
raise TypeError(
|
||||
"Expected list object from API, got %s"
|
||||
% (type(result).__name__)
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
@classmethod
|
||||
async def list_async(
|
||||
cls, **params: Unpack["ConfigurationListParams"]
|
||||
) -> ListObject["Configuration"]:
|
||||
"""
|
||||
Returns a list of Configuration objects.
|
||||
"""
|
||||
result = await cls._static_request_async(
|
||||
"get",
|
||||
cls.class_url(),
|
||||
params=params,
|
||||
)
|
||||
if not isinstance(result, ListObject):
|
||||
raise TypeError(
|
||||
"Expected list object from API, got %s"
|
||||
% (type(result).__name__)
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
@classmethod
|
||||
def modify(
|
||||
cls, id: str, **params: Unpack["ConfigurationModifyParams"]
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Updates a new Configuration object.
|
||||
"""
|
||||
url = "%s/%s" % (cls.class_url(), sanitize_id(id))
|
||||
return cast(
|
||||
"Configuration",
|
||||
cls._static_request(
|
||||
"post",
|
||||
url,
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def modify_async(
|
||||
cls, id: str, **params: Unpack["ConfigurationModifyParams"]
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Updates a new Configuration object.
|
||||
"""
|
||||
url = "%s/%s" % (cls.class_url(), sanitize_id(id))
|
||||
return cast(
|
||||
"Configuration",
|
||||
await cls._static_request_async(
|
||||
"post",
|
||||
url,
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def retrieve(
|
||||
cls, id: str, **params: Unpack["ConfigurationRetrieveParams"]
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Retrieves a Configuration object.
|
||||
"""
|
||||
instance = cls(id, **params)
|
||||
instance.refresh()
|
||||
return instance
|
||||
|
||||
@classmethod
|
||||
async def retrieve_async(
|
||||
cls, id: str, **params: Unpack["ConfigurationRetrieveParams"]
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Retrieves a Configuration object.
|
||||
"""
|
||||
instance = cls(id, **params)
|
||||
await instance.refresh_async()
|
||||
return instance
|
||||
|
||||
_inner_class_types = {
|
||||
"bbpos_wisepad3": BbposWisepad3,
|
||||
"bbpos_wisepos_e": BbposWiseposE,
|
||||
"offline": Offline,
|
||||
"reboot_window": RebootWindow,
|
||||
"stripe_s700": StripeS700,
|
||||
"tipping": Tipping,
|
||||
"verifone_p400": VerifoneP400,
|
||||
"wifi": Wifi,
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._stripe_service import StripeService
|
||||
from stripe._util import sanitize_id
|
||||
from typing import Optional, cast
|
||||
from typing_extensions import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from stripe._list_object import ListObject
|
||||
from stripe._request_options import RequestOptions
|
||||
from stripe.params.terminal._configuration_create_params import (
|
||||
ConfigurationCreateParams,
|
||||
)
|
||||
from stripe.params.terminal._configuration_delete_params import (
|
||||
ConfigurationDeleteParams,
|
||||
)
|
||||
from stripe.params.terminal._configuration_list_params import (
|
||||
ConfigurationListParams,
|
||||
)
|
||||
from stripe.params.terminal._configuration_retrieve_params import (
|
||||
ConfigurationRetrieveParams,
|
||||
)
|
||||
from stripe.params.terminal._configuration_update_params import (
|
||||
ConfigurationUpdateParams,
|
||||
)
|
||||
from stripe.terminal._configuration import Configuration
|
||||
|
||||
|
||||
class ConfigurationService(StripeService):
|
||||
def delete(
|
||||
self,
|
||||
configuration: str,
|
||||
params: Optional["ConfigurationDeleteParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Deletes a Configuration object.
|
||||
"""
|
||||
return cast(
|
||||
"Configuration",
|
||||
self._request(
|
||||
"delete",
|
||||
"/v1/terminal/configurations/{configuration}".format(
|
||||
configuration=sanitize_id(configuration),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def delete_async(
|
||||
self,
|
||||
configuration: str,
|
||||
params: Optional["ConfigurationDeleteParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Deletes a Configuration object.
|
||||
"""
|
||||
return cast(
|
||||
"Configuration",
|
||||
await self._request_async(
|
||||
"delete",
|
||||
"/v1/terminal/configurations/{configuration}".format(
|
||||
configuration=sanitize_id(configuration),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def retrieve(
|
||||
self,
|
||||
configuration: str,
|
||||
params: Optional["ConfigurationRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Retrieves a Configuration object.
|
||||
"""
|
||||
return cast(
|
||||
"Configuration",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/terminal/configurations/{configuration}".format(
|
||||
configuration=sanitize_id(configuration),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def retrieve_async(
|
||||
self,
|
||||
configuration: str,
|
||||
params: Optional["ConfigurationRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Retrieves a Configuration object.
|
||||
"""
|
||||
return cast(
|
||||
"Configuration",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/terminal/configurations/{configuration}".format(
|
||||
configuration=sanitize_id(configuration),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def update(
|
||||
self,
|
||||
configuration: str,
|
||||
params: Optional["ConfigurationUpdateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Updates a new Configuration object.
|
||||
"""
|
||||
return cast(
|
||||
"Configuration",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/terminal/configurations/{configuration}".format(
|
||||
configuration=sanitize_id(configuration),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def update_async(
|
||||
self,
|
||||
configuration: str,
|
||||
params: Optional["ConfigurationUpdateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Updates a new Configuration object.
|
||||
"""
|
||||
return cast(
|
||||
"Configuration",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/terminal/configurations/{configuration}".format(
|
||||
configuration=sanitize_id(configuration),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def list(
|
||||
self,
|
||||
params: Optional["ConfigurationListParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[Configuration]":
|
||||
"""
|
||||
Returns a list of Configuration objects.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[Configuration]",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/terminal/configurations",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def list_async(
|
||||
self,
|
||||
params: Optional["ConfigurationListParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[Configuration]":
|
||||
"""
|
||||
Returns a list of Configuration objects.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[Configuration]",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/terminal/configurations",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def create(
|
||||
self,
|
||||
params: Optional["ConfigurationCreateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Creates a new Configuration object.
|
||||
"""
|
||||
return cast(
|
||||
"Configuration",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/terminal/configurations",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def create_async(
|
||||
self,
|
||||
params: Optional["ConfigurationCreateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Configuration":
|
||||
"""
|
||||
Creates a new Configuration object.
|
||||
"""
|
||||
return cast(
|
||||
"Configuration",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/terminal/configurations",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
@@ -0,0 +1,66 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._createable_api_resource import CreateableAPIResource
|
||||
from typing import ClassVar, Optional, cast
|
||||
from typing_extensions import Literal, Unpack, TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from stripe.params.terminal._connection_token_create_params import (
|
||||
ConnectionTokenCreateParams,
|
||||
)
|
||||
|
||||
|
||||
class ConnectionToken(CreateableAPIResource["ConnectionToken"]):
|
||||
"""
|
||||
A Connection Token is used by the Stripe Terminal SDK to connect to a reader.
|
||||
|
||||
Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations)
|
||||
"""
|
||||
|
||||
OBJECT_NAME: ClassVar[Literal["terminal.connection_token"]] = (
|
||||
"terminal.connection_token"
|
||||
)
|
||||
location: Optional[str]
|
||||
"""
|
||||
The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens).
|
||||
"""
|
||||
object: Literal["terminal.connection_token"]
|
||||
"""
|
||||
String representing the object's type. Objects of the same type share the same value.
|
||||
"""
|
||||
secret: str
|
||||
"""
|
||||
Your application should pass this token to the Stripe Terminal SDK.
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def create(
|
||||
cls, **params: Unpack["ConnectionTokenCreateParams"]
|
||||
) -> "ConnectionToken":
|
||||
"""
|
||||
To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.
|
||||
"""
|
||||
return cast(
|
||||
"ConnectionToken",
|
||||
cls._static_request(
|
||||
"post",
|
||||
cls.class_url(),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def create_async(
|
||||
cls, **params: Unpack["ConnectionTokenCreateParams"]
|
||||
) -> "ConnectionToken":
|
||||
"""
|
||||
To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.
|
||||
"""
|
||||
return cast(
|
||||
"ConnectionToken",
|
||||
await cls._static_request_async(
|
||||
"post",
|
||||
cls.class_url(),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
@@ -0,0 +1,52 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._stripe_service import StripeService
|
||||
from typing import Optional, cast
|
||||
from typing_extensions import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from stripe._request_options import RequestOptions
|
||||
from stripe.params.terminal._connection_token_create_params import (
|
||||
ConnectionTokenCreateParams,
|
||||
)
|
||||
from stripe.terminal._connection_token import ConnectionToken
|
||||
|
||||
|
||||
class ConnectionTokenService(StripeService):
|
||||
def create(
|
||||
self,
|
||||
params: Optional["ConnectionTokenCreateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ConnectionToken":
|
||||
"""
|
||||
To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.
|
||||
"""
|
||||
return cast(
|
||||
"ConnectionToken",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/terminal/connection_tokens",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def create_async(
|
||||
self,
|
||||
params: Optional["ConnectionTokenCreateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ConnectionToken":
|
||||
"""
|
||||
To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.
|
||||
"""
|
||||
return cast(
|
||||
"ConnectionToken",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/terminal/connection_tokens",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
@@ -0,0 +1,401 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._createable_api_resource import CreateableAPIResource
|
||||
from stripe._deletable_api_resource import DeletableAPIResource
|
||||
from stripe._list_object import ListObject
|
||||
from stripe._listable_api_resource import ListableAPIResource
|
||||
from stripe._stripe_object import StripeObject
|
||||
from stripe._updateable_api_resource import UpdateableAPIResource
|
||||
from stripe._util import class_method_variant, sanitize_id
|
||||
from typing import ClassVar, Dict, Optional, cast, overload
|
||||
from typing_extensions import Literal, Unpack, TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from stripe.params.terminal._location_create_params import (
|
||||
LocationCreateParams,
|
||||
)
|
||||
from stripe.params.terminal._location_delete_params import (
|
||||
LocationDeleteParams,
|
||||
)
|
||||
from stripe.params.terminal._location_list_params import LocationListParams
|
||||
from stripe.params.terminal._location_modify_params import (
|
||||
LocationModifyParams,
|
||||
)
|
||||
from stripe.params.terminal._location_retrieve_params import (
|
||||
LocationRetrieveParams,
|
||||
)
|
||||
|
||||
|
||||
class Location(
|
||||
CreateableAPIResource["Location"],
|
||||
DeletableAPIResource["Location"],
|
||||
ListableAPIResource["Location"],
|
||||
UpdateableAPIResource["Location"],
|
||||
):
|
||||
"""
|
||||
A Location represents a grouping of readers.
|
||||
|
||||
Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations)
|
||||
"""
|
||||
|
||||
OBJECT_NAME: ClassVar[Literal["terminal.location"]] = "terminal.location"
|
||||
|
||||
class Address(StripeObject):
|
||||
city: Optional[str]
|
||||
"""
|
||||
City, district, suburb, town, or village.
|
||||
"""
|
||||
country: Optional[str]
|
||||
"""
|
||||
Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
"""
|
||||
line1: Optional[str]
|
||||
"""
|
||||
Address line 1, such as the street, PO Box, or company name.
|
||||
"""
|
||||
line2: Optional[str]
|
||||
"""
|
||||
Address line 2, such as the apartment, suite, unit, or building.
|
||||
"""
|
||||
postal_code: Optional[str]
|
||||
"""
|
||||
ZIP or postal code.
|
||||
"""
|
||||
state: Optional[str]
|
||||
"""
|
||||
State, county, province, or region.
|
||||
"""
|
||||
|
||||
class AddressKana(StripeObject):
|
||||
city: Optional[str]
|
||||
"""
|
||||
City/Ward.
|
||||
"""
|
||||
country: Optional[str]
|
||||
"""
|
||||
Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
"""
|
||||
line1: Optional[str]
|
||||
"""
|
||||
Block/Building number.
|
||||
"""
|
||||
line2: Optional[str]
|
||||
"""
|
||||
Building details.
|
||||
"""
|
||||
postal_code: Optional[str]
|
||||
"""
|
||||
ZIP or postal code.
|
||||
"""
|
||||
state: Optional[str]
|
||||
"""
|
||||
Prefecture.
|
||||
"""
|
||||
town: Optional[str]
|
||||
"""
|
||||
Town/cho-me.
|
||||
"""
|
||||
|
||||
class AddressKanji(StripeObject):
|
||||
city: Optional[str]
|
||||
"""
|
||||
City/Ward.
|
||||
"""
|
||||
country: Optional[str]
|
||||
"""
|
||||
Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
"""
|
||||
line1: Optional[str]
|
||||
"""
|
||||
Block/Building number.
|
||||
"""
|
||||
line2: Optional[str]
|
||||
"""
|
||||
Building details.
|
||||
"""
|
||||
postal_code: Optional[str]
|
||||
"""
|
||||
ZIP or postal code.
|
||||
"""
|
||||
state: Optional[str]
|
||||
"""
|
||||
Prefecture.
|
||||
"""
|
||||
town: Optional[str]
|
||||
"""
|
||||
Town/cho-me.
|
||||
"""
|
||||
|
||||
address: Address
|
||||
address_kana: Optional[AddressKana]
|
||||
address_kanji: Optional[AddressKanji]
|
||||
configuration_overrides: Optional[str]
|
||||
"""
|
||||
The ID of a configuration that will be used to customize all readers in this location.
|
||||
"""
|
||||
deleted: Optional[Literal[True]]
|
||||
"""
|
||||
Always true for a deleted object
|
||||
"""
|
||||
display_name: str
|
||||
"""
|
||||
The display name of the location.
|
||||
"""
|
||||
display_name_kana: Optional[str]
|
||||
"""
|
||||
The Kana variation of the display name of the location.
|
||||
"""
|
||||
display_name_kanji: Optional[str]
|
||||
"""
|
||||
The Kanji variation of the display name of the location.
|
||||
"""
|
||||
id: str
|
||||
"""
|
||||
Unique identifier for the object.
|
||||
"""
|
||||
livemode: bool
|
||||
"""
|
||||
Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
"""
|
||||
metadata: Dict[str, str]
|
||||
"""
|
||||
Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
"""
|
||||
object: Literal["terminal.location"]
|
||||
"""
|
||||
String representing the object's type. Objects of the same type share the same value.
|
||||
"""
|
||||
phone: Optional[str]
|
||||
"""
|
||||
The phone number of the location.
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def create(cls, **params: Unpack["LocationCreateParams"]) -> "Location":
|
||||
"""
|
||||
Creates a new Location object.
|
||||
For further details, including which address fields are required in each country, see the [Manage locations](https://docs.stripe.com/docs/terminal/fleet/locations) guide.
|
||||
"""
|
||||
return cast(
|
||||
"Location",
|
||||
cls._static_request(
|
||||
"post",
|
||||
cls.class_url(),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def create_async(
|
||||
cls, **params: Unpack["LocationCreateParams"]
|
||||
) -> "Location":
|
||||
"""
|
||||
Creates a new Location object.
|
||||
For further details, including which address fields are required in each country, see the [Manage locations](https://docs.stripe.com/docs/terminal/fleet/locations) guide.
|
||||
"""
|
||||
return cast(
|
||||
"Location",
|
||||
await cls._static_request_async(
|
||||
"post",
|
||||
cls.class_url(),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def _cls_delete(
|
||||
cls, sid: str, **params: Unpack["LocationDeleteParams"]
|
||||
) -> "Location":
|
||||
"""
|
||||
Deletes a Location object.
|
||||
"""
|
||||
url = "%s/%s" % (cls.class_url(), sanitize_id(sid))
|
||||
return cast(
|
||||
"Location",
|
||||
cls._static_request(
|
||||
"delete",
|
||||
url,
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@overload
|
||||
@staticmethod
|
||||
def delete(
|
||||
sid: str, **params: Unpack["LocationDeleteParams"]
|
||||
) -> "Location":
|
||||
"""
|
||||
Deletes a Location object.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
def delete(self, **params: Unpack["LocationDeleteParams"]) -> "Location":
|
||||
"""
|
||||
Deletes a Location object.
|
||||
"""
|
||||
...
|
||||
|
||||
@class_method_variant("_cls_delete")
|
||||
def delete( # pyright: ignore[reportGeneralTypeIssues]
|
||||
self, **params: Unpack["LocationDeleteParams"]
|
||||
) -> "Location":
|
||||
"""
|
||||
Deletes a Location object.
|
||||
"""
|
||||
return self._request_and_refresh(
|
||||
"delete",
|
||||
self.instance_url(),
|
||||
params=params,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def _cls_delete_async(
|
||||
cls, sid: str, **params: Unpack["LocationDeleteParams"]
|
||||
) -> "Location":
|
||||
"""
|
||||
Deletes a Location object.
|
||||
"""
|
||||
url = "%s/%s" % (cls.class_url(), sanitize_id(sid))
|
||||
return cast(
|
||||
"Location",
|
||||
await cls._static_request_async(
|
||||
"delete",
|
||||
url,
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@overload
|
||||
@staticmethod
|
||||
async def delete_async(
|
||||
sid: str, **params: Unpack["LocationDeleteParams"]
|
||||
) -> "Location":
|
||||
"""
|
||||
Deletes a Location object.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
async def delete_async(
|
||||
self, **params: Unpack["LocationDeleteParams"]
|
||||
) -> "Location":
|
||||
"""
|
||||
Deletes a Location object.
|
||||
"""
|
||||
...
|
||||
|
||||
@class_method_variant("_cls_delete_async")
|
||||
async def delete_async( # pyright: ignore[reportGeneralTypeIssues]
|
||||
self, **params: Unpack["LocationDeleteParams"]
|
||||
) -> "Location":
|
||||
"""
|
||||
Deletes a Location object.
|
||||
"""
|
||||
return await self._request_and_refresh_async(
|
||||
"delete",
|
||||
self.instance_url(),
|
||||
params=params,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def list(
|
||||
cls, **params: Unpack["LocationListParams"]
|
||||
) -> ListObject["Location"]:
|
||||
"""
|
||||
Returns a list of Location objects.
|
||||
"""
|
||||
result = cls._static_request(
|
||||
"get",
|
||||
cls.class_url(),
|
||||
params=params,
|
||||
)
|
||||
if not isinstance(result, ListObject):
|
||||
raise TypeError(
|
||||
"Expected list object from API, got %s"
|
||||
% (type(result).__name__)
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
@classmethod
|
||||
async def list_async(
|
||||
cls, **params: Unpack["LocationListParams"]
|
||||
) -> ListObject["Location"]:
|
||||
"""
|
||||
Returns a list of Location objects.
|
||||
"""
|
||||
result = await cls._static_request_async(
|
||||
"get",
|
||||
cls.class_url(),
|
||||
params=params,
|
||||
)
|
||||
if not isinstance(result, ListObject):
|
||||
raise TypeError(
|
||||
"Expected list object from API, got %s"
|
||||
% (type(result).__name__)
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
@classmethod
|
||||
def modify(
|
||||
cls, id: str, **params: Unpack["LocationModifyParams"]
|
||||
) -> "Location":
|
||||
"""
|
||||
Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
||||
"""
|
||||
url = "%s/%s" % (cls.class_url(), sanitize_id(id))
|
||||
return cast(
|
||||
"Location",
|
||||
cls._static_request(
|
||||
"post",
|
||||
url,
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def modify_async(
|
||||
cls, id: str, **params: Unpack["LocationModifyParams"]
|
||||
) -> "Location":
|
||||
"""
|
||||
Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
||||
"""
|
||||
url = "%s/%s" % (cls.class_url(), sanitize_id(id))
|
||||
return cast(
|
||||
"Location",
|
||||
await cls._static_request_async(
|
||||
"post",
|
||||
url,
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def retrieve(
|
||||
cls, id: str, **params: Unpack["LocationRetrieveParams"]
|
||||
) -> "Location":
|
||||
"""
|
||||
Retrieves a Location object.
|
||||
"""
|
||||
instance = cls(id, **params)
|
||||
instance.refresh()
|
||||
return instance
|
||||
|
||||
@classmethod
|
||||
async def retrieve_async(
|
||||
cls, id: str, **params: Unpack["LocationRetrieveParams"]
|
||||
) -> "Location":
|
||||
"""
|
||||
Retrieves a Location object.
|
||||
"""
|
||||
instance = cls(id, **params)
|
||||
await instance.refresh_async()
|
||||
return instance
|
||||
|
||||
_inner_class_types = {
|
||||
"address": Address,
|
||||
"address_kana": AddressKana,
|
||||
"address_kanji": AddressKanji,
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._stripe_service import StripeService
|
||||
from stripe._util import sanitize_id
|
||||
from typing import Optional, cast
|
||||
from typing_extensions import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from stripe._list_object import ListObject
|
||||
from stripe._request_options import RequestOptions
|
||||
from stripe.params.terminal._location_create_params import (
|
||||
LocationCreateParams,
|
||||
)
|
||||
from stripe.params.terminal._location_delete_params import (
|
||||
LocationDeleteParams,
|
||||
)
|
||||
from stripe.params.terminal._location_list_params import LocationListParams
|
||||
from stripe.params.terminal._location_retrieve_params import (
|
||||
LocationRetrieveParams,
|
||||
)
|
||||
from stripe.params.terminal._location_update_params import (
|
||||
LocationUpdateParams,
|
||||
)
|
||||
from stripe.terminal._location import Location
|
||||
|
||||
|
||||
class LocationService(StripeService):
|
||||
def delete(
|
||||
self,
|
||||
location: str,
|
||||
params: Optional["LocationDeleteParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Location":
|
||||
"""
|
||||
Deletes a Location object.
|
||||
"""
|
||||
return cast(
|
||||
"Location",
|
||||
self._request(
|
||||
"delete",
|
||||
"/v1/terminal/locations/{location}".format(
|
||||
location=sanitize_id(location),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def delete_async(
|
||||
self,
|
||||
location: str,
|
||||
params: Optional["LocationDeleteParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Location":
|
||||
"""
|
||||
Deletes a Location object.
|
||||
"""
|
||||
return cast(
|
||||
"Location",
|
||||
await self._request_async(
|
||||
"delete",
|
||||
"/v1/terminal/locations/{location}".format(
|
||||
location=sanitize_id(location),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def retrieve(
|
||||
self,
|
||||
location: str,
|
||||
params: Optional["LocationRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Location":
|
||||
"""
|
||||
Retrieves a Location object.
|
||||
"""
|
||||
return cast(
|
||||
"Location",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/terminal/locations/{location}".format(
|
||||
location=sanitize_id(location),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def retrieve_async(
|
||||
self,
|
||||
location: str,
|
||||
params: Optional["LocationRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Location":
|
||||
"""
|
||||
Retrieves a Location object.
|
||||
"""
|
||||
return cast(
|
||||
"Location",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/terminal/locations/{location}".format(
|
||||
location=sanitize_id(location),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def update(
|
||||
self,
|
||||
location: str,
|
||||
params: Optional["LocationUpdateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Location":
|
||||
"""
|
||||
Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
||||
"""
|
||||
return cast(
|
||||
"Location",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/terminal/locations/{location}".format(
|
||||
location=sanitize_id(location),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def update_async(
|
||||
self,
|
||||
location: str,
|
||||
params: Optional["LocationUpdateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Location":
|
||||
"""
|
||||
Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
||||
"""
|
||||
return cast(
|
||||
"Location",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/terminal/locations/{location}".format(
|
||||
location=sanitize_id(location),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def list(
|
||||
self,
|
||||
params: Optional["LocationListParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[Location]":
|
||||
"""
|
||||
Returns a list of Location objects.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[Location]",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/terminal/locations",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def list_async(
|
||||
self,
|
||||
params: Optional["LocationListParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[Location]":
|
||||
"""
|
||||
Returns a list of Location objects.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[Location]",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/terminal/locations",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def create(
|
||||
self,
|
||||
params: Optional["LocationCreateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Location":
|
||||
"""
|
||||
Creates a new Location object.
|
||||
For further details, including which address fields are required in each country, see the [Manage locations](https://docs.stripe.com/docs/terminal/fleet/locations) guide.
|
||||
"""
|
||||
return cast(
|
||||
"Location",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/terminal/locations",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def create_async(
|
||||
self,
|
||||
params: Optional["LocationCreateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Location":
|
||||
"""
|
||||
Creates a new Location object.
|
||||
For further details, including which address fields are required in each country, see the [Manage locations](https://docs.stripe.com/docs/terminal/fleet/locations) guide.
|
||||
"""
|
||||
return cast(
|
||||
"Location",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/terminal/locations",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
2034
Backend/venv/lib/python3.12/site-packages/stripe/terminal/_reader.py
Normal file
2034
Backend/venv/lib/python3.12/site-packages/stripe/terminal/_reader.py
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,604 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._stripe_service import StripeService
|
||||
from stripe._util import sanitize_id
|
||||
from typing import Optional, cast
|
||||
from typing_extensions import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from stripe._list_object import ListObject
|
||||
from stripe._request_options import RequestOptions
|
||||
from stripe.params.terminal._reader_cancel_action_params import (
|
||||
ReaderCancelActionParams,
|
||||
)
|
||||
from stripe.params.terminal._reader_collect_inputs_params import (
|
||||
ReaderCollectInputsParams,
|
||||
)
|
||||
from stripe.params.terminal._reader_collect_payment_method_params import (
|
||||
ReaderCollectPaymentMethodParams,
|
||||
)
|
||||
from stripe.params.terminal._reader_confirm_payment_intent_params import (
|
||||
ReaderConfirmPaymentIntentParams,
|
||||
)
|
||||
from stripe.params.terminal._reader_create_params import ReaderCreateParams
|
||||
from stripe.params.terminal._reader_delete_params import ReaderDeleteParams
|
||||
from stripe.params.terminal._reader_list_params import ReaderListParams
|
||||
from stripe.params.terminal._reader_process_payment_intent_params import (
|
||||
ReaderProcessPaymentIntentParams,
|
||||
)
|
||||
from stripe.params.terminal._reader_process_setup_intent_params import (
|
||||
ReaderProcessSetupIntentParams,
|
||||
)
|
||||
from stripe.params.terminal._reader_refund_payment_params import (
|
||||
ReaderRefundPaymentParams,
|
||||
)
|
||||
from stripe.params.terminal._reader_retrieve_params import (
|
||||
ReaderRetrieveParams,
|
||||
)
|
||||
from stripe.params.terminal._reader_set_reader_display_params import (
|
||||
ReaderSetReaderDisplayParams,
|
||||
)
|
||||
from stripe.params.terminal._reader_update_params import ReaderUpdateParams
|
||||
from stripe.terminal._reader import Reader
|
||||
|
||||
|
||||
class ReaderService(StripeService):
|
||||
def delete(
|
||||
self,
|
||||
reader: str,
|
||||
params: Optional["ReaderDeleteParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Deletes a Reader object.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
self._request(
|
||||
"delete",
|
||||
"/v1/terminal/readers/{reader}".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def delete_async(
|
||||
self,
|
||||
reader: str,
|
||||
params: Optional["ReaderDeleteParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Deletes a Reader object.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
await self._request_async(
|
||||
"delete",
|
||||
"/v1/terminal/readers/{reader}".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def retrieve(
|
||||
self,
|
||||
reader: str,
|
||||
params: Optional["ReaderRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Retrieves a Reader object.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/terminal/readers/{reader}".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def retrieve_async(
|
||||
self,
|
||||
reader: str,
|
||||
params: Optional["ReaderRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Retrieves a Reader object.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/terminal/readers/{reader}".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def update(
|
||||
self,
|
||||
reader: str,
|
||||
params: Optional["ReaderUpdateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/terminal/readers/{reader}".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def update_async(
|
||||
self,
|
||||
reader: str,
|
||||
params: Optional["ReaderUpdateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/terminal/readers/{reader}".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def list(
|
||||
self,
|
||||
params: Optional["ReaderListParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[Reader]":
|
||||
"""
|
||||
Returns a list of Reader objects.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[Reader]",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/terminal/readers",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def list_async(
|
||||
self,
|
||||
params: Optional["ReaderListParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[Reader]":
|
||||
"""
|
||||
Returns a list of Reader objects.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[Reader]",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/terminal/readers",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def create(
|
||||
self,
|
||||
params: "ReaderCreateParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Creates a new Reader object.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/terminal/readers",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def create_async(
|
||||
self,
|
||||
params: "ReaderCreateParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Creates a new Reader object.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/terminal/readers",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def cancel_action(
|
||||
self,
|
||||
reader: str,
|
||||
params: Optional["ReaderCancelActionParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Cancels the current reader action. See [Programmatic Cancellation](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/terminal/readers/{reader}/cancel_action".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def cancel_action_async(
|
||||
self,
|
||||
reader: str,
|
||||
params: Optional["ReaderCancelActionParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Cancels the current reader action. See [Programmatic Cancellation](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#programmatic-cancellation) for more details.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/terminal/readers/{reader}/cancel_action".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def collect_inputs(
|
||||
self,
|
||||
reader: str,
|
||||
params: "ReaderCollectInputsParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Initiates an [input collection flow](https://docs.stripe.com/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/terminal/readers/{reader}/collect_inputs".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def collect_inputs_async(
|
||||
self,
|
||||
reader: str,
|
||||
params: "ReaderCollectInputsParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Initiates an [input collection flow](https://docs.stripe.com/docs/terminal/features/collect-inputs) on a Reader to display input forms and collect information from your customers.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/terminal/readers/{reader}/collect_inputs".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def collect_payment_method(
|
||||
self,
|
||||
reader: str,
|
||||
params: "ReaderCollectPaymentMethodParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/terminal/readers/{reader}/collect_payment_method".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def collect_payment_method_async(
|
||||
self,
|
||||
reader: str,
|
||||
params: "ReaderCollectPaymentMethodParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. See [Collecting a Payment method](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#collect-a-paymentmethod) for more details.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/terminal/readers/{reader}/collect_payment_method".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def confirm_payment_intent(
|
||||
self,
|
||||
reader: str,
|
||||
params: "ReaderConfirmPaymentIntentParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Finalizes a payment on a Reader. See [Confirming a Payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/terminal/readers/{reader}/confirm_payment_intent".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def confirm_payment_intent_async(
|
||||
self,
|
||||
reader: str,
|
||||
params: "ReaderConfirmPaymentIntentParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Finalizes a payment on a Reader. See [Confirming a Payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=inspect#confirm-the-paymentintent) for more details.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/terminal/readers/{reader}/confirm_payment_intent".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def process_payment_intent(
|
||||
self,
|
||||
reader: str,
|
||||
params: "ReaderProcessPaymentIntentParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Initiates a payment flow on a Reader. See [process the payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/terminal/readers/{reader}/process_payment_intent".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def process_payment_intent_async(
|
||||
self,
|
||||
reader: str,
|
||||
params: "ReaderProcessPaymentIntentParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Initiates a payment flow on a Reader. See [process the payment](https://docs.stripe.com/docs/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven&process=immediately#process-payment) for more details.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/terminal/readers/{reader}/process_payment_intent".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def process_setup_intent(
|
||||
self,
|
||||
reader: str,
|
||||
params: "ReaderProcessSetupIntentParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Initiates a SetupIntent flow on a Reader. See [Save directly without charging](https://docs.stripe.com/docs/terminal/features/saving-payment-details/save-directly) for more details.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/terminal/readers/{reader}/process_setup_intent".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def process_setup_intent_async(
|
||||
self,
|
||||
reader: str,
|
||||
params: "ReaderProcessSetupIntentParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Initiates a SetupIntent flow on a Reader. See [Save directly without charging](https://docs.stripe.com/docs/terminal/features/saving-payment-details/save-directly) for more details.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/terminal/readers/{reader}/process_setup_intent".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def refund_payment(
|
||||
self,
|
||||
reader: str,
|
||||
params: Optional["ReaderRefundPaymentParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Initiates an in-person refund on a Reader. See [Refund an Interac Payment](https://docs.stripe.com/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/terminal/readers/{reader}/refund_payment".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def refund_payment_async(
|
||||
self,
|
||||
reader: str,
|
||||
params: Optional["ReaderRefundPaymentParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Initiates an in-person refund on a Reader. See [Refund an Interac Payment](https://docs.stripe.com/docs/terminal/payments/regional?integration-country=CA#refund-an-interac-payment) for more details.
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/terminal/readers/{reader}/refund_payment".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def set_reader_display(
|
||||
self,
|
||||
reader: str,
|
||||
params: "ReaderSetReaderDisplayParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Sets the reader display to show [cart details](https://docs.stripe.com/docs/terminal/features/display).
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/terminal/readers/{reader}/set_reader_display".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def set_reader_display_async(
|
||||
self,
|
||||
reader: str,
|
||||
params: "ReaderSetReaderDisplayParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Reader":
|
||||
"""
|
||||
Sets the reader display to show [cart details](https://docs.stripe.com/docs/terminal/features/display).
|
||||
"""
|
||||
return cast(
|
||||
"Reader",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/terminal/readers/{reader}/set_reader_display".format(
|
||||
reader=sanitize_id(reader),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
Reference in New Issue
Block a user