updates
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
# -*- 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.issuing._authorization import Authorization as Authorization
|
||||
from stripe.issuing._authorization_service import (
|
||||
AuthorizationService as AuthorizationService,
|
||||
)
|
||||
from stripe.issuing._card import Card as Card
|
||||
from stripe.issuing._card_service import CardService as CardService
|
||||
from stripe.issuing._cardholder import Cardholder as Cardholder
|
||||
from stripe.issuing._cardholder_service import (
|
||||
CardholderService as CardholderService,
|
||||
)
|
||||
from stripe.issuing._dispute import Dispute as Dispute
|
||||
from stripe.issuing._dispute_service import (
|
||||
DisputeService as DisputeService,
|
||||
)
|
||||
from stripe.issuing._personalization_design import (
|
||||
PersonalizationDesign as PersonalizationDesign,
|
||||
)
|
||||
from stripe.issuing._personalization_design_service import (
|
||||
PersonalizationDesignService as PersonalizationDesignService,
|
||||
)
|
||||
from stripe.issuing._physical_bundle import (
|
||||
PhysicalBundle as PhysicalBundle,
|
||||
)
|
||||
from stripe.issuing._physical_bundle_service import (
|
||||
PhysicalBundleService as PhysicalBundleService,
|
||||
)
|
||||
from stripe.issuing._token import Token as Token
|
||||
from stripe.issuing._token_service import TokenService as TokenService
|
||||
from stripe.issuing._transaction import Transaction as Transaction
|
||||
from stripe.issuing._transaction_service import (
|
||||
TransactionService as TransactionService,
|
||||
)
|
||||
|
||||
# name -> (import_target, is_submodule)
|
||||
_import_map = {
|
||||
"Authorization": ("stripe.issuing._authorization", False),
|
||||
"AuthorizationService": ("stripe.issuing._authorization_service", False),
|
||||
"Card": ("stripe.issuing._card", False),
|
||||
"CardService": ("stripe.issuing._card_service", False),
|
||||
"Cardholder": ("stripe.issuing._cardholder", False),
|
||||
"CardholderService": ("stripe.issuing._cardholder_service", False),
|
||||
"Dispute": ("stripe.issuing._dispute", False),
|
||||
"DisputeService": ("stripe.issuing._dispute_service", False),
|
||||
"PersonalizationDesign": ("stripe.issuing._personalization_design", False),
|
||||
"PersonalizationDesignService": (
|
||||
"stripe.issuing._personalization_design_service",
|
||||
False,
|
||||
),
|
||||
"PhysicalBundle": ("stripe.issuing._physical_bundle", False),
|
||||
"PhysicalBundleService": (
|
||||
"stripe.issuing._physical_bundle_service",
|
||||
False,
|
||||
),
|
||||
"Token": ("stripe.issuing._token", False),
|
||||
"TokenService": ("stripe.issuing._token_service", False),
|
||||
"Transaction": ("stripe.issuing._transaction", False),
|
||||
"TransactionService": ("stripe.issuing._transaction_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.
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.
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,246 @@
|
||||
# -*- 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.issuing._authorization import Authorization
|
||||
from stripe.params.issuing._authorization_approve_params import (
|
||||
AuthorizationApproveParams,
|
||||
)
|
||||
from stripe.params.issuing._authorization_decline_params import (
|
||||
AuthorizationDeclineParams,
|
||||
)
|
||||
from stripe.params.issuing._authorization_list_params import (
|
||||
AuthorizationListParams,
|
||||
)
|
||||
from stripe.params.issuing._authorization_retrieve_params import (
|
||||
AuthorizationRetrieveParams,
|
||||
)
|
||||
from stripe.params.issuing._authorization_update_params import (
|
||||
AuthorizationUpdateParams,
|
||||
)
|
||||
|
||||
|
||||
class AuthorizationService(StripeService):
|
||||
def list(
|
||||
self,
|
||||
params: Optional["AuthorizationListParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[Authorization]":
|
||||
"""
|
||||
Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[Authorization]",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/issuing/authorizations",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def list_async(
|
||||
self,
|
||||
params: Optional["AuthorizationListParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[Authorization]":
|
||||
"""
|
||||
Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[Authorization]",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/issuing/authorizations",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def retrieve(
|
||||
self,
|
||||
authorization: str,
|
||||
params: Optional["AuthorizationRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Authorization":
|
||||
"""
|
||||
Retrieves an Issuing Authorization object.
|
||||
"""
|
||||
return cast(
|
||||
"Authorization",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/issuing/authorizations/{authorization}".format(
|
||||
authorization=sanitize_id(authorization),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def retrieve_async(
|
||||
self,
|
||||
authorization: str,
|
||||
params: Optional["AuthorizationRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Authorization":
|
||||
"""
|
||||
Retrieves an Issuing Authorization object.
|
||||
"""
|
||||
return cast(
|
||||
"Authorization",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/issuing/authorizations/{authorization}".format(
|
||||
authorization=sanitize_id(authorization),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def update(
|
||||
self,
|
||||
authorization: str,
|
||||
params: Optional["AuthorizationUpdateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Authorization":
|
||||
"""
|
||||
Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
||||
"""
|
||||
return cast(
|
||||
"Authorization",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/issuing/authorizations/{authorization}".format(
|
||||
authorization=sanitize_id(authorization),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def update_async(
|
||||
self,
|
||||
authorization: str,
|
||||
params: Optional["AuthorizationUpdateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Authorization":
|
||||
"""
|
||||
Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
||||
"""
|
||||
return cast(
|
||||
"Authorization",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/issuing/authorizations/{authorization}".format(
|
||||
authorization=sanitize_id(authorization),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def approve(
|
||||
self,
|
||||
authorization: str,
|
||||
params: Optional["AuthorizationApproveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Authorization":
|
||||
"""
|
||||
[Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow.
|
||||
This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
|
||||
"""
|
||||
return cast(
|
||||
"Authorization",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/issuing/authorizations/{authorization}/approve".format(
|
||||
authorization=sanitize_id(authorization),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def approve_async(
|
||||
self,
|
||||
authorization: str,
|
||||
params: Optional["AuthorizationApproveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Authorization":
|
||||
"""
|
||||
[Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow.
|
||||
This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
|
||||
"""
|
||||
return cast(
|
||||
"Authorization",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/issuing/authorizations/{authorization}/approve".format(
|
||||
authorization=sanitize_id(authorization),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def decline(
|
||||
self,
|
||||
authorization: str,
|
||||
params: Optional["AuthorizationDeclineParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Authorization":
|
||||
"""
|
||||
[Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow.
|
||||
This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
|
||||
"""
|
||||
return cast(
|
||||
"Authorization",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/issuing/authorizations/{authorization}/decline".format(
|
||||
authorization=sanitize_id(authorization),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def decline_async(
|
||||
self,
|
||||
authorization: str,
|
||||
params: Optional["AuthorizationDeclineParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Authorization":
|
||||
"""
|
||||
[Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow.
|
||||
This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
|
||||
"""
|
||||
return cast(
|
||||
"Authorization",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/issuing/authorizations/{authorization}/decline".format(
|
||||
authorization=sanitize_id(authorization),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
1967
Backend/venv/lib/python3.12/site-packages/stripe/issuing/_card.py
Normal file
1967
Backend/venv/lib/python3.12/site-packages/stripe/issuing/_card.py
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,173 @@
|
||||
# -*- 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.issuing._card import Card
|
||||
from stripe.params.issuing._card_create_params import CardCreateParams
|
||||
from stripe.params.issuing._card_list_params import CardListParams
|
||||
from stripe.params.issuing._card_retrieve_params import CardRetrieveParams
|
||||
from stripe.params.issuing._card_update_params import CardUpdateParams
|
||||
|
||||
|
||||
class CardService(StripeService):
|
||||
def list(
|
||||
self,
|
||||
params: Optional["CardListParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[Card]":
|
||||
"""
|
||||
Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[Card]",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/issuing/cards",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def list_async(
|
||||
self,
|
||||
params: Optional["CardListParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[Card]":
|
||||
"""
|
||||
Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[Card]",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/issuing/cards",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def create(
|
||||
self,
|
||||
params: "CardCreateParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Card":
|
||||
"""
|
||||
Creates an Issuing Card object.
|
||||
"""
|
||||
return cast(
|
||||
"Card",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/issuing/cards",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def create_async(
|
||||
self,
|
||||
params: "CardCreateParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Card":
|
||||
"""
|
||||
Creates an Issuing Card object.
|
||||
"""
|
||||
return cast(
|
||||
"Card",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/issuing/cards",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def retrieve(
|
||||
self,
|
||||
card: str,
|
||||
params: Optional["CardRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Card":
|
||||
"""
|
||||
Retrieves an Issuing Card object.
|
||||
"""
|
||||
return cast(
|
||||
"Card",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/issuing/cards/{card}".format(card=sanitize_id(card)),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def retrieve_async(
|
||||
self,
|
||||
card: str,
|
||||
params: Optional["CardRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Card":
|
||||
"""
|
||||
Retrieves an Issuing Card object.
|
||||
"""
|
||||
return cast(
|
||||
"Card",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/issuing/cards/{card}".format(card=sanitize_id(card)),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def update(
|
||||
self,
|
||||
card: str,
|
||||
params: Optional["CardUpdateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Card":
|
||||
"""
|
||||
Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
||||
"""
|
||||
return cast(
|
||||
"Card",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/issuing/cards/{card}".format(card=sanitize_id(card)),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def update_async(
|
||||
self,
|
||||
card: str,
|
||||
params: Optional["CardUpdateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Card":
|
||||
"""
|
||||
Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
||||
"""
|
||||
return cast(
|
||||
"Card",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/issuing/cards/{card}".format(card=sanitize_id(card)),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,189 @@
|
||||
# -*- 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.issuing._cardholder import Cardholder
|
||||
from stripe.params.issuing._cardholder_create_params import (
|
||||
CardholderCreateParams,
|
||||
)
|
||||
from stripe.params.issuing._cardholder_list_params import (
|
||||
CardholderListParams,
|
||||
)
|
||||
from stripe.params.issuing._cardholder_retrieve_params import (
|
||||
CardholderRetrieveParams,
|
||||
)
|
||||
from stripe.params.issuing._cardholder_update_params import (
|
||||
CardholderUpdateParams,
|
||||
)
|
||||
|
||||
|
||||
class CardholderService(StripeService):
|
||||
def list(
|
||||
self,
|
||||
params: Optional["CardholderListParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[Cardholder]":
|
||||
"""
|
||||
Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[Cardholder]",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/issuing/cardholders",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def list_async(
|
||||
self,
|
||||
params: Optional["CardholderListParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[Cardholder]":
|
||||
"""
|
||||
Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[Cardholder]",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/issuing/cardholders",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def create(
|
||||
self,
|
||||
params: "CardholderCreateParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Cardholder":
|
||||
"""
|
||||
Creates a new Issuing Cardholder object that can be issued cards.
|
||||
"""
|
||||
return cast(
|
||||
"Cardholder",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/issuing/cardholders",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def create_async(
|
||||
self,
|
||||
params: "CardholderCreateParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Cardholder":
|
||||
"""
|
||||
Creates a new Issuing Cardholder object that can be issued cards.
|
||||
"""
|
||||
return cast(
|
||||
"Cardholder",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/issuing/cardholders",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def retrieve(
|
||||
self,
|
||||
cardholder: str,
|
||||
params: Optional["CardholderRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Cardholder":
|
||||
"""
|
||||
Retrieves an Issuing Cardholder object.
|
||||
"""
|
||||
return cast(
|
||||
"Cardholder",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/issuing/cardholders/{cardholder}".format(
|
||||
cardholder=sanitize_id(cardholder),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def retrieve_async(
|
||||
self,
|
||||
cardholder: str,
|
||||
params: Optional["CardholderRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Cardholder":
|
||||
"""
|
||||
Retrieves an Issuing Cardholder object.
|
||||
"""
|
||||
return cast(
|
||||
"Cardholder",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/issuing/cardholders/{cardholder}".format(
|
||||
cardholder=sanitize_id(cardholder),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def update(
|
||||
self,
|
||||
cardholder: str,
|
||||
params: Optional["CardholderUpdateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Cardholder":
|
||||
"""
|
||||
Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
||||
"""
|
||||
return cast(
|
||||
"Cardholder",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/issuing/cardholders/{cardholder}".format(
|
||||
cardholder=sanitize_id(cardholder),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def update_async(
|
||||
self,
|
||||
cardholder: str,
|
||||
params: Optional["CardholderUpdateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Cardholder":
|
||||
"""
|
||||
Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
||||
"""
|
||||
return cast(
|
||||
"Cardholder",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/issuing/cardholders/{cardholder}".format(
|
||||
cardholder=sanitize_id(cardholder),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
@@ -0,0 +1,571 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._createable_api_resource import CreateableAPIResource
|
||||
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, Dict, List, Optional, cast, overload
|
||||
from typing_extensions import Literal, Unpack, TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from stripe._balance_transaction import BalanceTransaction
|
||||
from stripe._file import File
|
||||
from stripe.issuing._transaction import Transaction
|
||||
from stripe.params.issuing._dispute_create_params import (
|
||||
DisputeCreateParams,
|
||||
)
|
||||
from stripe.params.issuing._dispute_list_params import DisputeListParams
|
||||
from stripe.params.issuing._dispute_modify_params import (
|
||||
DisputeModifyParams,
|
||||
)
|
||||
from stripe.params.issuing._dispute_retrieve_params import (
|
||||
DisputeRetrieveParams,
|
||||
)
|
||||
from stripe.params.issuing._dispute_submit_params import (
|
||||
DisputeSubmitParams,
|
||||
)
|
||||
|
||||
|
||||
class Dispute(
|
||||
CreateableAPIResource["Dispute"],
|
||||
ListableAPIResource["Dispute"],
|
||||
UpdateableAPIResource["Dispute"],
|
||||
):
|
||||
"""
|
||||
As a [card issuer](https://stripe.com/docs/issuing), you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with.
|
||||
|
||||
Related guide: [Issuing disputes](https://stripe.com/docs/issuing/purchases/disputes)
|
||||
"""
|
||||
|
||||
OBJECT_NAME: ClassVar[Literal["issuing.dispute"]] = "issuing.dispute"
|
||||
|
||||
class Evidence(StripeObject):
|
||||
class Canceled(StripeObject):
|
||||
additional_documentation: Optional[ExpandableField["File"]]
|
||||
"""
|
||||
(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
"""
|
||||
canceled_at: Optional[int]
|
||||
"""
|
||||
Date when order was canceled.
|
||||
"""
|
||||
cancellation_policy_provided: Optional[bool]
|
||||
"""
|
||||
Whether the cardholder was provided with a cancellation policy.
|
||||
"""
|
||||
cancellation_reason: Optional[str]
|
||||
"""
|
||||
Reason for canceling the order.
|
||||
"""
|
||||
expected_at: Optional[int]
|
||||
"""
|
||||
Date when the cardholder expected to receive the product.
|
||||
"""
|
||||
explanation: Optional[str]
|
||||
"""
|
||||
Explanation of why the cardholder is disputing this transaction.
|
||||
"""
|
||||
product_description: Optional[str]
|
||||
"""
|
||||
Description of the merchandise or service that was purchased.
|
||||
"""
|
||||
product_type: Optional[Literal["merchandise", "service"]]
|
||||
"""
|
||||
Whether the product was a merchandise or service.
|
||||
"""
|
||||
return_status: Optional[Literal["merchant_rejected", "successful"]]
|
||||
"""
|
||||
Result of cardholder's attempt to return the product.
|
||||
"""
|
||||
returned_at: Optional[int]
|
||||
"""
|
||||
Date when the product was returned or attempted to be returned.
|
||||
"""
|
||||
|
||||
class Duplicate(StripeObject):
|
||||
additional_documentation: Optional[ExpandableField["File"]]
|
||||
"""
|
||||
(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
"""
|
||||
card_statement: Optional[ExpandableField["File"]]
|
||||
"""
|
||||
(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for.
|
||||
"""
|
||||
cash_receipt: Optional[ExpandableField["File"]]
|
||||
"""
|
||||
(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash.
|
||||
"""
|
||||
check_image: Optional[ExpandableField["File"]]
|
||||
"""
|
||||
(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product.
|
||||
"""
|
||||
explanation: Optional[str]
|
||||
"""
|
||||
Explanation of why the cardholder is disputing this transaction.
|
||||
"""
|
||||
original_transaction: Optional[str]
|
||||
"""
|
||||
Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
|
||||
"""
|
||||
|
||||
class Fraudulent(StripeObject):
|
||||
additional_documentation: Optional[ExpandableField["File"]]
|
||||
"""
|
||||
(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
"""
|
||||
explanation: Optional[str]
|
||||
"""
|
||||
Explanation of why the cardholder is disputing this transaction.
|
||||
"""
|
||||
|
||||
class MerchandiseNotAsDescribed(StripeObject):
|
||||
additional_documentation: Optional[ExpandableField["File"]]
|
||||
"""
|
||||
(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
"""
|
||||
explanation: Optional[str]
|
||||
"""
|
||||
Explanation of why the cardholder is disputing this transaction.
|
||||
"""
|
||||
received_at: Optional[int]
|
||||
"""
|
||||
Date when the product was received.
|
||||
"""
|
||||
return_description: Optional[str]
|
||||
"""
|
||||
Description of the cardholder's attempt to return the product.
|
||||
"""
|
||||
return_status: Optional[Literal["merchant_rejected", "successful"]]
|
||||
"""
|
||||
Result of cardholder's attempt to return the product.
|
||||
"""
|
||||
returned_at: Optional[int]
|
||||
"""
|
||||
Date when the product was returned or attempted to be returned.
|
||||
"""
|
||||
|
||||
class NoValidAuthorization(StripeObject):
|
||||
additional_documentation: Optional[ExpandableField["File"]]
|
||||
"""
|
||||
(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
"""
|
||||
explanation: Optional[str]
|
||||
"""
|
||||
Explanation of why the cardholder is disputing this transaction.
|
||||
"""
|
||||
|
||||
class NotReceived(StripeObject):
|
||||
additional_documentation: Optional[ExpandableField["File"]]
|
||||
"""
|
||||
(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
"""
|
||||
expected_at: Optional[int]
|
||||
"""
|
||||
Date when the cardholder expected to receive the product.
|
||||
"""
|
||||
explanation: Optional[str]
|
||||
"""
|
||||
Explanation of why the cardholder is disputing this transaction.
|
||||
"""
|
||||
product_description: Optional[str]
|
||||
"""
|
||||
Description of the merchandise or service that was purchased.
|
||||
"""
|
||||
product_type: Optional[Literal["merchandise", "service"]]
|
||||
"""
|
||||
Whether the product was a merchandise or service.
|
||||
"""
|
||||
|
||||
class Other(StripeObject):
|
||||
additional_documentation: Optional[ExpandableField["File"]]
|
||||
"""
|
||||
(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
"""
|
||||
explanation: Optional[str]
|
||||
"""
|
||||
Explanation of why the cardholder is disputing this transaction.
|
||||
"""
|
||||
product_description: Optional[str]
|
||||
"""
|
||||
Description of the merchandise or service that was purchased.
|
||||
"""
|
||||
product_type: Optional[Literal["merchandise", "service"]]
|
||||
"""
|
||||
Whether the product was a merchandise or service.
|
||||
"""
|
||||
|
||||
class ServiceNotAsDescribed(StripeObject):
|
||||
additional_documentation: Optional[ExpandableField["File"]]
|
||||
"""
|
||||
(ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
"""
|
||||
canceled_at: Optional[int]
|
||||
"""
|
||||
Date when order was canceled.
|
||||
"""
|
||||
cancellation_reason: Optional[str]
|
||||
"""
|
||||
Reason for canceling the order.
|
||||
"""
|
||||
explanation: Optional[str]
|
||||
"""
|
||||
Explanation of why the cardholder is disputing this transaction.
|
||||
"""
|
||||
received_at: Optional[int]
|
||||
"""
|
||||
Date when the product was received.
|
||||
"""
|
||||
|
||||
canceled: Optional[Canceled]
|
||||
duplicate: Optional[Duplicate]
|
||||
fraudulent: Optional[Fraudulent]
|
||||
merchandise_not_as_described: Optional[MerchandiseNotAsDescribed]
|
||||
no_valid_authorization: Optional[NoValidAuthorization]
|
||||
not_received: Optional[NotReceived]
|
||||
other: Optional[Other]
|
||||
reason: Literal[
|
||||
"canceled",
|
||||
"duplicate",
|
||||
"fraudulent",
|
||||
"merchandise_not_as_described",
|
||||
"no_valid_authorization",
|
||||
"not_received",
|
||||
"other",
|
||||
"service_not_as_described",
|
||||
]
|
||||
"""
|
||||
The reason for filing the dispute. Its value will match the field containing the evidence.
|
||||
"""
|
||||
service_not_as_described: Optional[ServiceNotAsDescribed]
|
||||
_inner_class_types = {
|
||||
"canceled": Canceled,
|
||||
"duplicate": Duplicate,
|
||||
"fraudulent": Fraudulent,
|
||||
"merchandise_not_as_described": MerchandiseNotAsDescribed,
|
||||
"no_valid_authorization": NoValidAuthorization,
|
||||
"not_received": NotReceived,
|
||||
"other": Other,
|
||||
"service_not_as_described": ServiceNotAsDescribed,
|
||||
}
|
||||
|
||||
class Treasury(StripeObject):
|
||||
debit_reversal: Optional[str]
|
||||
"""
|
||||
The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute
|
||||
"""
|
||||
received_debit: str
|
||||
"""
|
||||
The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed.
|
||||
"""
|
||||
|
||||
amount: int
|
||||
"""
|
||||
Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation).
|
||||
"""
|
||||
balance_transactions: Optional[List["BalanceTransaction"]]
|
||||
"""
|
||||
List of balance transactions associated with the dispute.
|
||||
"""
|
||||
created: int
|
||||
"""
|
||||
Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
"""
|
||||
currency: str
|
||||
"""
|
||||
The currency the `transaction` was made in.
|
||||
"""
|
||||
evidence: Evidence
|
||||
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.
|
||||
"""
|
||||
loss_reason: Optional[
|
||||
Literal[
|
||||
"cardholder_authentication_issuer_liability",
|
||||
"eci5_token_transaction_with_tavv",
|
||||
"excess_disputes_in_timeframe",
|
||||
"has_not_met_the_minimum_dispute_amount_requirements",
|
||||
"invalid_duplicate_dispute",
|
||||
"invalid_incorrect_amount_dispute",
|
||||
"invalid_no_authorization",
|
||||
"invalid_use_of_disputes",
|
||||
"merchandise_delivered_or_shipped",
|
||||
"merchandise_or_service_as_described",
|
||||
"not_cancelled",
|
||||
"other",
|
||||
"refund_issued",
|
||||
"submitted_beyond_allowable_time_limit",
|
||||
"transaction_3ds_required",
|
||||
"transaction_approved_after_prior_fraud_dispute",
|
||||
"transaction_authorized",
|
||||
"transaction_electronically_read",
|
||||
"transaction_qualifies_for_visa_easy_payment_service",
|
||||
"transaction_unattended",
|
||||
]
|
||||
]
|
||||
"""
|
||||
The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values.
|
||||
"""
|
||||
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["issuing.dispute"]
|
||||
"""
|
||||
String representing the object's type. Objects of the same type share the same value.
|
||||
"""
|
||||
status: Literal["expired", "lost", "submitted", "unsubmitted", "won"]
|
||||
"""
|
||||
Current status of the dispute.
|
||||
"""
|
||||
transaction: ExpandableField["Transaction"]
|
||||
"""
|
||||
The transaction being disputed.
|
||||
"""
|
||||
treasury: Optional[Treasury]
|
||||
"""
|
||||
[Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def create(cls, **params: Unpack["DisputeCreateParams"]) -> "Dispute":
|
||||
"""
|
||||
Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements.
|
||||
"""
|
||||
return cast(
|
||||
"Dispute",
|
||||
cls._static_request(
|
||||
"post",
|
||||
cls.class_url(),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def create_async(
|
||||
cls, **params: Unpack["DisputeCreateParams"]
|
||||
) -> "Dispute":
|
||||
"""
|
||||
Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements.
|
||||
"""
|
||||
return cast(
|
||||
"Dispute",
|
||||
await cls._static_request_async(
|
||||
"post",
|
||||
cls.class_url(),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def list(
|
||||
cls, **params: Unpack["DisputeListParams"]
|
||||
) -> ListObject["Dispute"]:
|
||||
"""
|
||||
Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
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["DisputeListParams"]
|
||||
) -> ListObject["Dispute"]:
|
||||
"""
|
||||
Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
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["DisputeModifyParams"]
|
||||
) -> "Dispute":
|
||||
"""
|
||||
Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.
|
||||
"""
|
||||
url = "%s/%s" % (cls.class_url(), sanitize_id(id))
|
||||
return cast(
|
||||
"Dispute",
|
||||
cls._static_request(
|
||||
"post",
|
||||
url,
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def modify_async(
|
||||
cls, id: str, **params: Unpack["DisputeModifyParams"]
|
||||
) -> "Dispute":
|
||||
"""
|
||||
Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.
|
||||
"""
|
||||
url = "%s/%s" % (cls.class_url(), sanitize_id(id))
|
||||
return cast(
|
||||
"Dispute",
|
||||
await cls._static_request_async(
|
||||
"post",
|
||||
url,
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def retrieve(
|
||||
cls, id: str, **params: Unpack["DisputeRetrieveParams"]
|
||||
) -> "Dispute":
|
||||
"""
|
||||
Retrieves an Issuing Dispute object.
|
||||
"""
|
||||
instance = cls(id, **params)
|
||||
instance.refresh()
|
||||
return instance
|
||||
|
||||
@classmethod
|
||||
async def retrieve_async(
|
||||
cls, id: str, **params: Unpack["DisputeRetrieveParams"]
|
||||
) -> "Dispute":
|
||||
"""
|
||||
Retrieves an Issuing Dispute object.
|
||||
"""
|
||||
instance = cls(id, **params)
|
||||
await instance.refresh_async()
|
||||
return instance
|
||||
|
||||
@classmethod
|
||||
def _cls_submit(
|
||||
cls, dispute: str, **params: Unpack["DisputeSubmitParams"]
|
||||
) -> "Dispute":
|
||||
"""
|
||||
Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
|
||||
"""
|
||||
return cast(
|
||||
"Dispute",
|
||||
cls._static_request(
|
||||
"post",
|
||||
"/v1/issuing/disputes/{dispute}/submit".format(
|
||||
dispute=sanitize_id(dispute)
|
||||
),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@overload
|
||||
@staticmethod
|
||||
def submit(
|
||||
dispute: str, **params: Unpack["DisputeSubmitParams"]
|
||||
) -> "Dispute":
|
||||
"""
|
||||
Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
def submit(self, **params: Unpack["DisputeSubmitParams"]) -> "Dispute":
|
||||
"""
|
||||
Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
|
||||
"""
|
||||
...
|
||||
|
||||
@class_method_variant("_cls_submit")
|
||||
def submit( # pyright: ignore[reportGeneralTypeIssues]
|
||||
self, **params: Unpack["DisputeSubmitParams"]
|
||||
) -> "Dispute":
|
||||
"""
|
||||
Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
|
||||
"""
|
||||
return cast(
|
||||
"Dispute",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/issuing/disputes/{dispute}/submit".format(
|
||||
dispute=sanitize_id(self.get("id"))
|
||||
),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def _cls_submit_async(
|
||||
cls, dispute: str, **params: Unpack["DisputeSubmitParams"]
|
||||
) -> "Dispute":
|
||||
"""
|
||||
Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
|
||||
"""
|
||||
return cast(
|
||||
"Dispute",
|
||||
await cls._static_request_async(
|
||||
"post",
|
||||
"/v1/issuing/disputes/{dispute}/submit".format(
|
||||
dispute=sanitize_id(dispute)
|
||||
),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@overload
|
||||
@staticmethod
|
||||
async def submit_async(
|
||||
dispute: str, **params: Unpack["DisputeSubmitParams"]
|
||||
) -> "Dispute":
|
||||
"""
|
||||
Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
async def submit_async(
|
||||
self, **params: Unpack["DisputeSubmitParams"]
|
||||
) -> "Dispute":
|
||||
"""
|
||||
Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
|
||||
"""
|
||||
...
|
||||
|
||||
@class_method_variant("_cls_submit_async")
|
||||
async def submit_async( # pyright: ignore[reportGeneralTypeIssues]
|
||||
self, **params: Unpack["DisputeSubmitParams"]
|
||||
) -> "Dispute":
|
||||
"""
|
||||
Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
|
||||
"""
|
||||
return cast(
|
||||
"Dispute",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/issuing/disputes/{dispute}/submit".format(
|
||||
dispute=sanitize_id(self.get("id"))
|
||||
),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
_inner_class_types = {"evidence": Evidence, "treasury": Treasury}
|
||||
@@ -0,0 +1,234 @@
|
||||
# -*- 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.issuing._dispute import Dispute
|
||||
from stripe.params.issuing._dispute_create_params import (
|
||||
DisputeCreateParams,
|
||||
)
|
||||
from stripe.params.issuing._dispute_list_params import DisputeListParams
|
||||
from stripe.params.issuing._dispute_retrieve_params import (
|
||||
DisputeRetrieveParams,
|
||||
)
|
||||
from stripe.params.issuing._dispute_submit_params import (
|
||||
DisputeSubmitParams,
|
||||
)
|
||||
from stripe.params.issuing._dispute_update_params import (
|
||||
DisputeUpdateParams,
|
||||
)
|
||||
|
||||
|
||||
class DisputeService(StripeService):
|
||||
def list(
|
||||
self,
|
||||
params: Optional["DisputeListParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[Dispute]":
|
||||
"""
|
||||
Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[Dispute]",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/issuing/disputes",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def list_async(
|
||||
self,
|
||||
params: Optional["DisputeListParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[Dispute]":
|
||||
"""
|
||||
Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[Dispute]",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/issuing/disputes",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def create(
|
||||
self,
|
||||
params: Optional["DisputeCreateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Dispute":
|
||||
"""
|
||||
Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements.
|
||||
"""
|
||||
return cast(
|
||||
"Dispute",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/issuing/disputes",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def create_async(
|
||||
self,
|
||||
params: Optional["DisputeCreateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Dispute":
|
||||
"""
|
||||
Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements.
|
||||
"""
|
||||
return cast(
|
||||
"Dispute",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/issuing/disputes",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def retrieve(
|
||||
self,
|
||||
dispute: str,
|
||||
params: Optional["DisputeRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Dispute":
|
||||
"""
|
||||
Retrieves an Issuing Dispute object.
|
||||
"""
|
||||
return cast(
|
||||
"Dispute",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/issuing/disputes/{dispute}".format(
|
||||
dispute=sanitize_id(dispute),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def retrieve_async(
|
||||
self,
|
||||
dispute: str,
|
||||
params: Optional["DisputeRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Dispute":
|
||||
"""
|
||||
Retrieves an Issuing Dispute object.
|
||||
"""
|
||||
return cast(
|
||||
"Dispute",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/issuing/disputes/{dispute}".format(
|
||||
dispute=sanitize_id(dispute),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def update(
|
||||
self,
|
||||
dispute: str,
|
||||
params: Optional["DisputeUpdateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Dispute":
|
||||
"""
|
||||
Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.
|
||||
"""
|
||||
return cast(
|
||||
"Dispute",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/issuing/disputes/{dispute}".format(
|
||||
dispute=sanitize_id(dispute),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def update_async(
|
||||
self,
|
||||
dispute: str,
|
||||
params: Optional["DisputeUpdateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Dispute":
|
||||
"""
|
||||
Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.
|
||||
"""
|
||||
return cast(
|
||||
"Dispute",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/issuing/disputes/{dispute}".format(
|
||||
dispute=sanitize_id(dispute),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def submit(
|
||||
self,
|
||||
dispute: str,
|
||||
params: Optional["DisputeSubmitParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Dispute":
|
||||
"""
|
||||
Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
|
||||
"""
|
||||
return cast(
|
||||
"Dispute",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/issuing/disputes/{dispute}/submit".format(
|
||||
dispute=sanitize_id(dispute),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def submit_async(
|
||||
self,
|
||||
dispute: str,
|
||||
params: Optional["DisputeSubmitParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Dispute":
|
||||
"""
|
||||
Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
|
||||
"""
|
||||
return cast(
|
||||
"Dispute",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/issuing/disputes/{dispute}/submit".format(
|
||||
dispute=sanitize_id(dispute),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
@@ -0,0 +1,677 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._createable_api_resource import CreateableAPIResource
|
||||
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._test_helpers import APIResourceTestHelpers
|
||||
from stripe._updateable_api_resource import UpdateableAPIResource
|
||||
from stripe._util import class_method_variant, sanitize_id
|
||||
from typing import ClassVar, Dict, List, Optional, cast, overload
|
||||
from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from stripe._file import File
|
||||
from stripe.issuing._physical_bundle import PhysicalBundle
|
||||
from stripe.params.issuing._personalization_design_activate_params import (
|
||||
PersonalizationDesignActivateParams,
|
||||
)
|
||||
from stripe.params.issuing._personalization_design_create_params import (
|
||||
PersonalizationDesignCreateParams,
|
||||
)
|
||||
from stripe.params.issuing._personalization_design_deactivate_params import (
|
||||
PersonalizationDesignDeactivateParams,
|
||||
)
|
||||
from stripe.params.issuing._personalization_design_list_params import (
|
||||
PersonalizationDesignListParams,
|
||||
)
|
||||
from stripe.params.issuing._personalization_design_modify_params import (
|
||||
PersonalizationDesignModifyParams,
|
||||
)
|
||||
from stripe.params.issuing._personalization_design_reject_params import (
|
||||
PersonalizationDesignRejectParams,
|
||||
)
|
||||
from stripe.params.issuing._personalization_design_retrieve_params import (
|
||||
PersonalizationDesignRetrieveParams,
|
||||
)
|
||||
|
||||
|
||||
class PersonalizationDesign(
|
||||
CreateableAPIResource["PersonalizationDesign"],
|
||||
ListableAPIResource["PersonalizationDesign"],
|
||||
UpdateableAPIResource["PersonalizationDesign"],
|
||||
):
|
||||
"""
|
||||
A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line.
|
||||
"""
|
||||
|
||||
OBJECT_NAME: ClassVar[Literal["issuing.personalization_design"]] = (
|
||||
"issuing.personalization_design"
|
||||
)
|
||||
|
||||
class CarrierText(StripeObject):
|
||||
footer_body: Optional[str]
|
||||
"""
|
||||
The footer body text of the carrier letter.
|
||||
"""
|
||||
footer_title: Optional[str]
|
||||
"""
|
||||
The footer title text of the carrier letter.
|
||||
"""
|
||||
header_body: Optional[str]
|
||||
"""
|
||||
The header body text of the carrier letter.
|
||||
"""
|
||||
header_title: Optional[str]
|
||||
"""
|
||||
The header title text of the carrier letter.
|
||||
"""
|
||||
|
||||
class Preferences(StripeObject):
|
||||
is_default: bool
|
||||
"""
|
||||
Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design.
|
||||
"""
|
||||
is_platform_default: Optional[bool]
|
||||
"""
|
||||
Whether this personalization design is used to create cards when one is not specified and a default for this connected account does not exist.
|
||||
"""
|
||||
|
||||
class RejectionReasons(StripeObject):
|
||||
card_logo: Optional[
|
||||
List[
|
||||
Literal[
|
||||
"geographic_location",
|
||||
"inappropriate",
|
||||
"network_name",
|
||||
"non_binary_image",
|
||||
"non_fiat_currency",
|
||||
"other",
|
||||
"other_entity",
|
||||
"promotional_material",
|
||||
]
|
||||
]
|
||||
]
|
||||
"""
|
||||
The reason(s) the card logo was rejected.
|
||||
"""
|
||||
carrier_text: Optional[
|
||||
List[
|
||||
Literal[
|
||||
"geographic_location",
|
||||
"inappropriate",
|
||||
"network_name",
|
||||
"non_fiat_currency",
|
||||
"other",
|
||||
"other_entity",
|
||||
"promotional_material",
|
||||
]
|
||||
]
|
||||
]
|
||||
"""
|
||||
The reason(s) the carrier text was rejected.
|
||||
"""
|
||||
|
||||
card_logo: Optional[ExpandableField["File"]]
|
||||
"""
|
||||
The file for the card logo to use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`.
|
||||
"""
|
||||
carrier_text: Optional[CarrierText]
|
||||
"""
|
||||
Hash containing carrier text, for use with physical bundles that support carrier text.
|
||||
"""
|
||||
created: int
|
||||
"""
|
||||
Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
lookup_key: Optional[str]
|
||||
"""
|
||||
A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
name: Optional[str]
|
||||
"""
|
||||
Friendly display name.
|
||||
"""
|
||||
object: Literal["issuing.personalization_design"]
|
||||
"""
|
||||
String representing the object's type. Objects of the same type share the same value.
|
||||
"""
|
||||
physical_bundle: ExpandableField["PhysicalBundle"]
|
||||
"""
|
||||
The physical bundle object belonging to this personalization design.
|
||||
"""
|
||||
preferences: Preferences
|
||||
rejection_reasons: RejectionReasons
|
||||
status: Literal["active", "inactive", "rejected", "review"]
|
||||
"""
|
||||
Whether this personalization design can be used to create cards.
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def create(
|
||||
cls, **params: Unpack["PersonalizationDesignCreateParams"]
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Creates a personalization design object.
|
||||
"""
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
cls._static_request(
|
||||
"post",
|
||||
cls.class_url(),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def create_async(
|
||||
cls, **params: Unpack["PersonalizationDesignCreateParams"]
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Creates a personalization design object.
|
||||
"""
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
await cls._static_request_async(
|
||||
"post",
|
||||
cls.class_url(),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def list(
|
||||
cls, **params: Unpack["PersonalizationDesignListParams"]
|
||||
) -> ListObject["PersonalizationDesign"]:
|
||||
"""
|
||||
Returns a list of personalization design objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
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["PersonalizationDesignListParams"]
|
||||
) -> ListObject["PersonalizationDesign"]:
|
||||
"""
|
||||
Returns a list of personalization design objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
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["PersonalizationDesignModifyParams"]
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates a card personalization object.
|
||||
"""
|
||||
url = "%s/%s" % (cls.class_url(), sanitize_id(id))
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
cls._static_request(
|
||||
"post",
|
||||
url,
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def modify_async(
|
||||
cls, id: str, **params: Unpack["PersonalizationDesignModifyParams"]
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates a card personalization object.
|
||||
"""
|
||||
url = "%s/%s" % (cls.class_url(), sanitize_id(id))
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
await cls._static_request_async(
|
||||
"post",
|
||||
url,
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def retrieve(
|
||||
cls, id: str, **params: Unpack["PersonalizationDesignRetrieveParams"]
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Retrieves a personalization design object.
|
||||
"""
|
||||
instance = cls(id, **params)
|
||||
instance.refresh()
|
||||
return instance
|
||||
|
||||
@classmethod
|
||||
async def retrieve_async(
|
||||
cls, id: str, **params: Unpack["PersonalizationDesignRetrieveParams"]
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Retrieves a personalization design object.
|
||||
"""
|
||||
instance = cls(id, **params)
|
||||
await instance.refresh_async()
|
||||
return instance
|
||||
|
||||
class TestHelpers(APIResourceTestHelpers["PersonalizationDesign"]):
|
||||
_resource_cls: Type["PersonalizationDesign"]
|
||||
|
||||
@classmethod
|
||||
def _cls_activate(
|
||||
cls,
|
||||
personalization_design: str,
|
||||
**params: Unpack["PersonalizationDesignActivateParams"],
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to active.
|
||||
"""
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
cls._static_request(
|
||||
"post",
|
||||
"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate".format(
|
||||
personalization_design=sanitize_id(
|
||||
personalization_design
|
||||
)
|
||||
),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@overload
|
||||
@staticmethod
|
||||
def activate(
|
||||
personalization_design: str,
|
||||
**params: Unpack["PersonalizationDesignActivateParams"],
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to active.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
def activate(
|
||||
self, **params: Unpack["PersonalizationDesignActivateParams"]
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to active.
|
||||
"""
|
||||
...
|
||||
|
||||
@class_method_variant("_cls_activate")
|
||||
def activate( # pyright: ignore[reportGeneralTypeIssues]
|
||||
self, **params: Unpack["PersonalizationDesignActivateParams"]
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to active.
|
||||
"""
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
self.resource._request(
|
||||
"post",
|
||||
"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate".format(
|
||||
personalization_design=sanitize_id(
|
||||
self.resource.get("id")
|
||||
)
|
||||
),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def _cls_activate_async(
|
||||
cls,
|
||||
personalization_design: str,
|
||||
**params: Unpack["PersonalizationDesignActivateParams"],
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to active.
|
||||
"""
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
await cls._static_request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate".format(
|
||||
personalization_design=sanitize_id(
|
||||
personalization_design
|
||||
)
|
||||
),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@overload
|
||||
@staticmethod
|
||||
async def activate_async(
|
||||
personalization_design: str,
|
||||
**params: Unpack["PersonalizationDesignActivateParams"],
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to active.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
async def activate_async(
|
||||
self, **params: Unpack["PersonalizationDesignActivateParams"]
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to active.
|
||||
"""
|
||||
...
|
||||
|
||||
@class_method_variant("_cls_activate_async")
|
||||
async def activate_async( # pyright: ignore[reportGeneralTypeIssues]
|
||||
self, **params: Unpack["PersonalizationDesignActivateParams"]
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to active.
|
||||
"""
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
await self.resource._request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate".format(
|
||||
personalization_design=sanitize_id(
|
||||
self.resource.get("id")
|
||||
)
|
||||
),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def _cls_deactivate(
|
||||
cls,
|
||||
personalization_design: str,
|
||||
**params: Unpack["PersonalizationDesignDeactivateParams"],
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to inactive.
|
||||
"""
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
cls._static_request(
|
||||
"post",
|
||||
"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate".format(
|
||||
personalization_design=sanitize_id(
|
||||
personalization_design
|
||||
)
|
||||
),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@overload
|
||||
@staticmethod
|
||||
def deactivate(
|
||||
personalization_design: str,
|
||||
**params: Unpack["PersonalizationDesignDeactivateParams"],
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to inactive.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
def deactivate(
|
||||
self, **params: Unpack["PersonalizationDesignDeactivateParams"]
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to inactive.
|
||||
"""
|
||||
...
|
||||
|
||||
@class_method_variant("_cls_deactivate")
|
||||
def deactivate( # pyright: ignore[reportGeneralTypeIssues]
|
||||
self, **params: Unpack["PersonalizationDesignDeactivateParams"]
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to inactive.
|
||||
"""
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
self.resource._request(
|
||||
"post",
|
||||
"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate".format(
|
||||
personalization_design=sanitize_id(
|
||||
self.resource.get("id")
|
||||
)
|
||||
),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def _cls_deactivate_async(
|
||||
cls,
|
||||
personalization_design: str,
|
||||
**params: Unpack["PersonalizationDesignDeactivateParams"],
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to inactive.
|
||||
"""
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
await cls._static_request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate".format(
|
||||
personalization_design=sanitize_id(
|
||||
personalization_design
|
||||
)
|
||||
),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@overload
|
||||
@staticmethod
|
||||
async def deactivate_async(
|
||||
personalization_design: str,
|
||||
**params: Unpack["PersonalizationDesignDeactivateParams"],
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to inactive.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
async def deactivate_async(
|
||||
self, **params: Unpack["PersonalizationDesignDeactivateParams"]
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to inactive.
|
||||
"""
|
||||
...
|
||||
|
||||
@class_method_variant("_cls_deactivate_async")
|
||||
async def deactivate_async( # pyright: ignore[reportGeneralTypeIssues]
|
||||
self, **params: Unpack["PersonalizationDesignDeactivateParams"]
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to inactive.
|
||||
"""
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
await self.resource._request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate".format(
|
||||
personalization_design=sanitize_id(
|
||||
self.resource.get("id")
|
||||
)
|
||||
),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def _cls_reject(
|
||||
cls,
|
||||
personalization_design: str,
|
||||
**params: Unpack["PersonalizationDesignRejectParams"],
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to rejected.
|
||||
"""
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
cls._static_request(
|
||||
"post",
|
||||
"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject".format(
|
||||
personalization_design=sanitize_id(
|
||||
personalization_design
|
||||
)
|
||||
),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@overload
|
||||
@staticmethod
|
||||
def reject(
|
||||
personalization_design: str,
|
||||
**params: Unpack["PersonalizationDesignRejectParams"],
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to rejected.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
def reject(
|
||||
self, **params: Unpack["PersonalizationDesignRejectParams"]
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to rejected.
|
||||
"""
|
||||
...
|
||||
|
||||
@class_method_variant("_cls_reject")
|
||||
def reject( # pyright: ignore[reportGeneralTypeIssues]
|
||||
self, **params: Unpack["PersonalizationDesignRejectParams"]
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to rejected.
|
||||
"""
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
self.resource._request(
|
||||
"post",
|
||||
"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject".format(
|
||||
personalization_design=sanitize_id(
|
||||
self.resource.get("id")
|
||||
)
|
||||
),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def _cls_reject_async(
|
||||
cls,
|
||||
personalization_design: str,
|
||||
**params: Unpack["PersonalizationDesignRejectParams"],
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to rejected.
|
||||
"""
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
await cls._static_request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject".format(
|
||||
personalization_design=sanitize_id(
|
||||
personalization_design
|
||||
)
|
||||
),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@overload
|
||||
@staticmethod
|
||||
async def reject_async(
|
||||
personalization_design: str,
|
||||
**params: Unpack["PersonalizationDesignRejectParams"],
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to rejected.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
async def reject_async(
|
||||
self, **params: Unpack["PersonalizationDesignRejectParams"]
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to rejected.
|
||||
"""
|
||||
...
|
||||
|
||||
@class_method_variant("_cls_reject_async")
|
||||
async def reject_async( # pyright: ignore[reportGeneralTypeIssues]
|
||||
self, **params: Unpack["PersonalizationDesignRejectParams"]
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates the status of the specified testmode personalization design object to rejected.
|
||||
"""
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
await self.resource._request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject".format(
|
||||
personalization_design=sanitize_id(
|
||||
self.resource.get("id")
|
||||
)
|
||||
),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@property
|
||||
def test_helpers(self):
|
||||
return self.TestHelpers(self)
|
||||
|
||||
_inner_class_types = {
|
||||
"carrier_text": CarrierText,
|
||||
"preferences": Preferences,
|
||||
"rejection_reasons": RejectionReasons,
|
||||
}
|
||||
|
||||
|
||||
PersonalizationDesign.TestHelpers._resource_cls = PersonalizationDesign
|
||||
@@ -0,0 +1,189 @@
|
||||
# -*- 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.issuing._personalization_design import PersonalizationDesign
|
||||
from stripe.params.issuing._personalization_design_create_params import (
|
||||
PersonalizationDesignCreateParams,
|
||||
)
|
||||
from stripe.params.issuing._personalization_design_list_params import (
|
||||
PersonalizationDesignListParams,
|
||||
)
|
||||
from stripe.params.issuing._personalization_design_retrieve_params import (
|
||||
PersonalizationDesignRetrieveParams,
|
||||
)
|
||||
from stripe.params.issuing._personalization_design_update_params import (
|
||||
PersonalizationDesignUpdateParams,
|
||||
)
|
||||
|
||||
|
||||
class PersonalizationDesignService(StripeService):
|
||||
def list(
|
||||
self,
|
||||
params: Optional["PersonalizationDesignListParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[PersonalizationDesign]":
|
||||
"""
|
||||
Returns a list of personalization design objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[PersonalizationDesign]",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/issuing/personalization_designs",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def list_async(
|
||||
self,
|
||||
params: Optional["PersonalizationDesignListParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[PersonalizationDesign]":
|
||||
"""
|
||||
Returns a list of personalization design objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[PersonalizationDesign]",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/issuing/personalization_designs",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def create(
|
||||
self,
|
||||
params: "PersonalizationDesignCreateParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Creates a personalization design object.
|
||||
"""
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/issuing/personalization_designs",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def create_async(
|
||||
self,
|
||||
params: "PersonalizationDesignCreateParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Creates a personalization design object.
|
||||
"""
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/issuing/personalization_designs",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def retrieve(
|
||||
self,
|
||||
personalization_design: str,
|
||||
params: Optional["PersonalizationDesignRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Retrieves a personalization design object.
|
||||
"""
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/issuing/personalization_designs/{personalization_design}".format(
|
||||
personalization_design=sanitize_id(personalization_design),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def retrieve_async(
|
||||
self,
|
||||
personalization_design: str,
|
||||
params: Optional["PersonalizationDesignRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Retrieves a personalization design object.
|
||||
"""
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/issuing/personalization_designs/{personalization_design}".format(
|
||||
personalization_design=sanitize_id(personalization_design),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def update(
|
||||
self,
|
||||
personalization_design: str,
|
||||
params: Optional["PersonalizationDesignUpdateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates a card personalization object.
|
||||
"""
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/issuing/personalization_designs/{personalization_design}".format(
|
||||
personalization_design=sanitize_id(personalization_design),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def update_async(
|
||||
self,
|
||||
personalization_design: str,
|
||||
params: Optional["PersonalizationDesignUpdateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "PersonalizationDesign":
|
||||
"""
|
||||
Updates a card personalization object.
|
||||
"""
|
||||
return cast(
|
||||
"PersonalizationDesign",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/issuing/personalization_designs/{personalization_design}".format(
|
||||
personalization_design=sanitize_id(personalization_design),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
@@ -0,0 +1,129 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._list_object import ListObject
|
||||
from stripe._listable_api_resource import ListableAPIResource
|
||||
from stripe._stripe_object import StripeObject
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal, Unpack, TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from stripe.params.issuing._physical_bundle_list_params import (
|
||||
PhysicalBundleListParams,
|
||||
)
|
||||
from stripe.params.issuing._physical_bundle_retrieve_params import (
|
||||
PhysicalBundleRetrieveParams,
|
||||
)
|
||||
|
||||
|
||||
class PhysicalBundle(ListableAPIResource["PhysicalBundle"]):
|
||||
"""
|
||||
A Physical Bundle represents the bundle of physical items - card stock, carrier letter, and envelope - that is shipped to a cardholder when you create a physical card.
|
||||
"""
|
||||
|
||||
OBJECT_NAME: ClassVar[Literal["issuing.physical_bundle"]] = (
|
||||
"issuing.physical_bundle"
|
||||
)
|
||||
|
||||
class Features(StripeObject):
|
||||
card_logo: Literal["optional", "required", "unsupported"]
|
||||
"""
|
||||
The policy for how to use card logo images in a card design with this physical bundle.
|
||||
"""
|
||||
carrier_text: Literal["optional", "required", "unsupported"]
|
||||
"""
|
||||
The policy for how to use carrier letter text in a card design with this physical bundle.
|
||||
"""
|
||||
second_line: Literal["optional", "required", "unsupported"]
|
||||
"""
|
||||
The policy for how to use a second line on a card with this physical bundle.
|
||||
"""
|
||||
|
||||
features: Features
|
||||
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.
|
||||
"""
|
||||
name: str
|
||||
"""
|
||||
Friendly display name.
|
||||
"""
|
||||
object: Literal["issuing.physical_bundle"]
|
||||
"""
|
||||
String representing the object's type. Objects of the same type share the same value.
|
||||
"""
|
||||
status: Literal["active", "inactive", "review"]
|
||||
"""
|
||||
Whether this physical bundle can be used to create cards.
|
||||
"""
|
||||
type: Literal["custom", "standard"]
|
||||
"""
|
||||
Whether this physical bundle is a standard Stripe offering or custom-made for you.
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def list(
|
||||
cls, **params: Unpack["PhysicalBundleListParams"]
|
||||
) -> ListObject["PhysicalBundle"]:
|
||||
"""
|
||||
Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
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["PhysicalBundleListParams"]
|
||||
) -> ListObject["PhysicalBundle"]:
|
||||
"""
|
||||
Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
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 retrieve(
|
||||
cls, id: str, **params: Unpack["PhysicalBundleRetrieveParams"]
|
||||
) -> "PhysicalBundle":
|
||||
"""
|
||||
Retrieves a physical bundle object.
|
||||
"""
|
||||
instance = cls(id, **params)
|
||||
instance.refresh()
|
||||
return instance
|
||||
|
||||
@classmethod
|
||||
async def retrieve_async(
|
||||
cls, id: str, **params: Unpack["PhysicalBundleRetrieveParams"]
|
||||
) -> "PhysicalBundle":
|
||||
"""
|
||||
Retrieves a physical bundle object.
|
||||
"""
|
||||
instance = cls(id, **params)
|
||||
await instance.refresh_async()
|
||||
return instance
|
||||
|
||||
_inner_class_types = {"features": Features}
|
||||
@@ -0,0 +1,101 @@
|
||||
# -*- 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.issuing._physical_bundle import PhysicalBundle
|
||||
from stripe.params.issuing._physical_bundle_list_params import (
|
||||
PhysicalBundleListParams,
|
||||
)
|
||||
from stripe.params.issuing._physical_bundle_retrieve_params import (
|
||||
PhysicalBundleRetrieveParams,
|
||||
)
|
||||
|
||||
|
||||
class PhysicalBundleService(StripeService):
|
||||
def list(
|
||||
self,
|
||||
params: Optional["PhysicalBundleListParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[PhysicalBundle]":
|
||||
"""
|
||||
Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[PhysicalBundle]",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/issuing/physical_bundles",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def list_async(
|
||||
self,
|
||||
params: Optional["PhysicalBundleListParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[PhysicalBundle]":
|
||||
"""
|
||||
Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[PhysicalBundle]",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/issuing/physical_bundles",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def retrieve(
|
||||
self,
|
||||
physical_bundle: str,
|
||||
params: Optional["PhysicalBundleRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "PhysicalBundle":
|
||||
"""
|
||||
Retrieves a physical bundle object.
|
||||
"""
|
||||
return cast(
|
||||
"PhysicalBundle",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/issuing/physical_bundles/{physical_bundle}".format(
|
||||
physical_bundle=sanitize_id(physical_bundle),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def retrieve_async(
|
||||
self,
|
||||
physical_bundle: str,
|
||||
params: Optional["PhysicalBundleRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "PhysicalBundle":
|
||||
"""
|
||||
Retrieves a physical bundle object.
|
||||
"""
|
||||
return cast(
|
||||
"PhysicalBundle",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/issuing/physical_bundles/{physical_bundle}".format(
|
||||
physical_bundle=sanitize_id(physical_bundle),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
@@ -0,0 +1,333 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
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 sanitize_id
|
||||
from typing import ClassVar, List, Optional, cast
|
||||
from typing_extensions import Literal, Unpack, TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from stripe.issuing._card import Card
|
||||
from stripe.params.issuing._token_list_params import TokenListParams
|
||||
from stripe.params.issuing._token_modify_params import TokenModifyParams
|
||||
from stripe.params.issuing._token_retrieve_params import (
|
||||
TokenRetrieveParams,
|
||||
)
|
||||
|
||||
|
||||
class Token(ListableAPIResource["Token"], UpdateableAPIResource["Token"]):
|
||||
"""
|
||||
An issuing token object is created when an issued card is added to a digital wallet. As a [card issuer](https://stripe.com/docs/issuing), you can [view and manage these tokens](https://stripe.com/docs/issuing/controls/token-management) through Stripe.
|
||||
"""
|
||||
|
||||
OBJECT_NAME: ClassVar[Literal["issuing.token"]] = "issuing.token"
|
||||
|
||||
class NetworkData(StripeObject):
|
||||
class Device(StripeObject):
|
||||
device_fingerprint: Optional[str]
|
||||
"""
|
||||
An obfuscated ID derived from the device ID.
|
||||
"""
|
||||
ip_address: Optional[str]
|
||||
"""
|
||||
The IP address of the device at provisioning time.
|
||||
"""
|
||||
location: Optional[str]
|
||||
"""
|
||||
The geographic latitude/longitude coordinates of the device at provisioning time. The format is [+-]decimal/[+-]decimal.
|
||||
"""
|
||||
name: Optional[str]
|
||||
"""
|
||||
The name of the device used for tokenization.
|
||||
"""
|
||||
phone_number: Optional[str]
|
||||
"""
|
||||
The phone number of the device used for tokenization.
|
||||
"""
|
||||
type: Optional[Literal["other", "phone", "watch"]]
|
||||
"""
|
||||
The type of device used for tokenization.
|
||||
"""
|
||||
|
||||
class Mastercard(StripeObject):
|
||||
card_reference_id: Optional[str]
|
||||
"""
|
||||
A unique reference ID from MasterCard to represent the card account number.
|
||||
"""
|
||||
token_reference_id: str
|
||||
"""
|
||||
The network-unique identifier for the token.
|
||||
"""
|
||||
token_requestor_id: str
|
||||
"""
|
||||
The ID of the entity requesting tokenization, specific to MasterCard.
|
||||
"""
|
||||
token_requestor_name: Optional[str]
|
||||
"""
|
||||
The name of the entity requesting tokenization, if known. This is directly provided from MasterCard.
|
||||
"""
|
||||
|
||||
class Visa(StripeObject):
|
||||
card_reference_id: str
|
||||
"""
|
||||
A unique reference ID from Visa to represent the card account number.
|
||||
"""
|
||||
token_reference_id: str
|
||||
"""
|
||||
The network-unique identifier for the token.
|
||||
"""
|
||||
token_requestor_id: str
|
||||
"""
|
||||
The ID of the entity requesting tokenization, specific to Visa.
|
||||
"""
|
||||
token_risk_score: Optional[str]
|
||||
"""
|
||||
Degree of risk associated with the token between `01` and `99`, with higher number indicating higher risk. A `00` value indicates the token was not scored by Visa.
|
||||
"""
|
||||
|
||||
class WalletProvider(StripeObject):
|
||||
class CardholderAddress(StripeObject):
|
||||
line1: str
|
||||
"""
|
||||
The street address of the cardholder tokenizing the card.
|
||||
"""
|
||||
postal_code: str
|
||||
"""
|
||||
The postal code of the cardholder tokenizing the card.
|
||||
"""
|
||||
|
||||
account_id: Optional[str]
|
||||
"""
|
||||
The wallet provider-given account ID of the digital wallet the token belongs to.
|
||||
"""
|
||||
account_trust_score: Optional[int]
|
||||
"""
|
||||
An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher score indicates more trustworthy.
|
||||
"""
|
||||
card_number_source: Optional[
|
||||
Literal["app", "manual", "on_file", "other"]
|
||||
]
|
||||
"""
|
||||
The method used for tokenizing a card.
|
||||
"""
|
||||
cardholder_address: Optional[CardholderAddress]
|
||||
cardholder_name: Optional[str]
|
||||
"""
|
||||
The name of the cardholder tokenizing the card.
|
||||
"""
|
||||
device_trust_score: Optional[int]
|
||||
"""
|
||||
An evaluation on the trustworthiness of the device. A higher score indicates more trustworthy.
|
||||
"""
|
||||
hashed_account_email_address: Optional[str]
|
||||
"""
|
||||
The hashed email address of the cardholder's account with the wallet provider.
|
||||
"""
|
||||
reason_codes: Optional[
|
||||
List[
|
||||
Literal[
|
||||
"account_card_too_new",
|
||||
"account_recently_changed",
|
||||
"account_too_new",
|
||||
"account_too_new_since_launch",
|
||||
"additional_device",
|
||||
"data_expired",
|
||||
"defer_id_v_decision",
|
||||
"device_recently_lost",
|
||||
"good_activity_history",
|
||||
"has_suspended_tokens",
|
||||
"high_risk",
|
||||
"inactive_account",
|
||||
"long_account_tenure",
|
||||
"low_account_score",
|
||||
"low_device_score",
|
||||
"low_phone_number_score",
|
||||
"network_service_error",
|
||||
"outside_home_territory",
|
||||
"provisioning_cardholder_mismatch",
|
||||
"provisioning_device_and_cardholder_mismatch",
|
||||
"provisioning_device_mismatch",
|
||||
"same_device_no_prior_authentication",
|
||||
"same_device_successful_prior_authentication",
|
||||
"software_update",
|
||||
"suspicious_activity",
|
||||
"too_many_different_cardholders",
|
||||
"too_many_recent_attempts",
|
||||
"too_many_recent_tokens",
|
||||
]
|
||||
]
|
||||
]
|
||||
"""
|
||||
The reasons for suggested tokenization given by the card network.
|
||||
"""
|
||||
suggested_decision: Optional[
|
||||
Literal["approve", "decline", "require_auth"]
|
||||
]
|
||||
"""
|
||||
The recommendation on responding to the tokenization request.
|
||||
"""
|
||||
suggested_decision_version: Optional[str]
|
||||
"""
|
||||
The version of the standard for mapping reason codes followed by the wallet provider.
|
||||
"""
|
||||
_inner_class_types = {"cardholder_address": CardholderAddress}
|
||||
|
||||
device: Optional[Device]
|
||||
mastercard: Optional[Mastercard]
|
||||
type: Literal["mastercard", "visa"]
|
||||
"""
|
||||
The network that the token is associated with. An additional hash is included with a name matching this value, containing tokenization data specific to the card network.
|
||||
"""
|
||||
visa: Optional[Visa]
|
||||
wallet_provider: Optional[WalletProvider]
|
||||
_inner_class_types = {
|
||||
"device": Device,
|
||||
"mastercard": Mastercard,
|
||||
"visa": Visa,
|
||||
"wallet_provider": WalletProvider,
|
||||
}
|
||||
|
||||
card: ExpandableField["Card"]
|
||||
"""
|
||||
Card associated with this token.
|
||||
"""
|
||||
created: int
|
||||
"""
|
||||
Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
"""
|
||||
device_fingerprint: Optional[str]
|
||||
"""
|
||||
The hashed ID derived from the device ID from the card network associated with the token.
|
||||
"""
|
||||
id: str
|
||||
"""
|
||||
Unique identifier for the object.
|
||||
"""
|
||||
last4: Optional[str]
|
||||
"""
|
||||
The last four digits of the token.
|
||||
"""
|
||||
livemode: bool
|
||||
"""
|
||||
Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
"""
|
||||
network: Literal["mastercard", "visa"]
|
||||
"""
|
||||
The token service provider / card network associated with the token.
|
||||
"""
|
||||
network_data: Optional[NetworkData]
|
||||
network_updated_at: int
|
||||
"""
|
||||
Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch.
|
||||
"""
|
||||
object: Literal["issuing.token"]
|
||||
"""
|
||||
String representing the object's type. Objects of the same type share the same value.
|
||||
"""
|
||||
status: Literal["active", "deleted", "requested", "suspended"]
|
||||
"""
|
||||
The usage state of the token.
|
||||
"""
|
||||
wallet_provider: Optional[
|
||||
Literal["apple_pay", "google_pay", "samsung_pay"]
|
||||
]
|
||||
"""
|
||||
The digital wallet for this token, if one was used.
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def list(cls, **params: Unpack["TokenListParams"]) -> ListObject["Token"]:
|
||||
"""
|
||||
Lists all Issuing Token objects for a given card.
|
||||
"""
|
||||
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["TokenListParams"]
|
||||
) -> ListObject["Token"]:
|
||||
"""
|
||||
Lists all Issuing Token objects for a given card.
|
||||
"""
|
||||
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["TokenModifyParams"]) -> "Token":
|
||||
"""
|
||||
Attempts to update the specified Issuing Token object to the status specified.
|
||||
"""
|
||||
url = "%s/%s" % (cls.class_url(), sanitize_id(id))
|
||||
return cast(
|
||||
"Token",
|
||||
cls._static_request(
|
||||
"post",
|
||||
url,
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def modify_async(
|
||||
cls, id: str, **params: Unpack["TokenModifyParams"]
|
||||
) -> "Token":
|
||||
"""
|
||||
Attempts to update the specified Issuing Token object to the status specified.
|
||||
"""
|
||||
url = "%s/%s" % (cls.class_url(), sanitize_id(id))
|
||||
return cast(
|
||||
"Token",
|
||||
await cls._static_request_async(
|
||||
"post",
|
||||
url,
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def retrieve(
|
||||
cls, id: str, **params: Unpack["TokenRetrieveParams"]
|
||||
) -> "Token":
|
||||
"""
|
||||
Retrieves an Issuing Token object.
|
||||
"""
|
||||
instance = cls(id, **params)
|
||||
instance.refresh()
|
||||
return instance
|
||||
|
||||
@classmethod
|
||||
async def retrieve_async(
|
||||
cls, id: str, **params: Unpack["TokenRetrieveParams"]
|
||||
) -> "Token":
|
||||
"""
|
||||
Retrieves an Issuing Token object.
|
||||
"""
|
||||
instance = cls(id, **params)
|
||||
await instance.refresh_async()
|
||||
return instance
|
||||
|
||||
_inner_class_types = {"network_data": NetworkData}
|
||||
@@ -0,0 +1,136 @@
|
||||
# -*- 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.issuing._token import Token
|
||||
from stripe.params.issuing._token_list_params import TokenListParams
|
||||
from stripe.params.issuing._token_retrieve_params import (
|
||||
TokenRetrieveParams,
|
||||
)
|
||||
from stripe.params.issuing._token_update_params import TokenUpdateParams
|
||||
|
||||
|
||||
class TokenService(StripeService):
|
||||
def list(
|
||||
self,
|
||||
params: "TokenListParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[Token]":
|
||||
"""
|
||||
Lists all Issuing Token objects for a given card.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[Token]",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/issuing/tokens",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def list_async(
|
||||
self,
|
||||
params: "TokenListParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[Token]":
|
||||
"""
|
||||
Lists all Issuing Token objects for a given card.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[Token]",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/issuing/tokens",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def retrieve(
|
||||
self,
|
||||
token: str,
|
||||
params: Optional["TokenRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Token":
|
||||
"""
|
||||
Retrieves an Issuing Token object.
|
||||
"""
|
||||
return cast(
|
||||
"Token",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/issuing/tokens/{token}".format(token=sanitize_id(token)),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def retrieve_async(
|
||||
self,
|
||||
token: str,
|
||||
params: Optional["TokenRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Token":
|
||||
"""
|
||||
Retrieves an Issuing Token object.
|
||||
"""
|
||||
return cast(
|
||||
"Token",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/issuing/tokens/{token}".format(token=sanitize_id(token)),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def update(
|
||||
self,
|
||||
token: str,
|
||||
params: "TokenUpdateParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Token":
|
||||
"""
|
||||
Attempts to update the specified Issuing Token object to the status specified.
|
||||
"""
|
||||
return cast(
|
||||
"Token",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/issuing/tokens/{token}".format(token=sanitize_id(token)),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def update_async(
|
||||
self,
|
||||
token: str,
|
||||
params: "TokenUpdateParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Token":
|
||||
"""
|
||||
Attempts to update the specified Issuing Token object to the status specified.
|
||||
"""
|
||||
return cast(
|
||||
"Token",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/issuing/tokens/{token}".format(token=sanitize_id(token)),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
@@ -0,0 +1,725 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
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._test_helpers import APIResourceTestHelpers
|
||||
from stripe._updateable_api_resource import UpdateableAPIResource
|
||||
from stripe._util import class_method_variant, sanitize_id
|
||||
from typing import ClassVar, Dict, List, Optional, cast, overload
|
||||
from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from stripe._balance_transaction import BalanceTransaction
|
||||
from stripe.issuing._authorization import Authorization
|
||||
from stripe.issuing._card import Card
|
||||
from stripe.issuing._cardholder import Cardholder
|
||||
from stripe.issuing._dispute import Dispute
|
||||
from stripe.issuing._token import Token
|
||||
from stripe.params.issuing._transaction_create_force_capture_params import (
|
||||
TransactionCreateForceCaptureParams,
|
||||
)
|
||||
from stripe.params.issuing._transaction_create_unlinked_refund_params import (
|
||||
TransactionCreateUnlinkedRefundParams,
|
||||
)
|
||||
from stripe.params.issuing._transaction_list_params import (
|
||||
TransactionListParams,
|
||||
)
|
||||
from stripe.params.issuing._transaction_modify_params import (
|
||||
TransactionModifyParams,
|
||||
)
|
||||
from stripe.params.issuing._transaction_refund_params import (
|
||||
TransactionRefundParams,
|
||||
)
|
||||
from stripe.params.issuing._transaction_retrieve_params import (
|
||||
TransactionRetrieveParams,
|
||||
)
|
||||
|
||||
|
||||
class Transaction(
|
||||
ListableAPIResource["Transaction"],
|
||||
UpdateableAPIResource["Transaction"],
|
||||
):
|
||||
"""
|
||||
Any use of an [issued card](https://stripe.com/docs/issuing) that results in funds entering or leaving
|
||||
your Stripe account, such as a completed purchase or refund, is represented by an Issuing
|
||||
`Transaction` object.
|
||||
|
||||
Related guide: [Issued card transactions](https://stripe.com/docs/issuing/purchases/transactions)
|
||||
"""
|
||||
|
||||
OBJECT_NAME: ClassVar[Literal["issuing.transaction"]] = (
|
||||
"issuing.transaction"
|
||||
)
|
||||
|
||||
class AmountDetails(StripeObject):
|
||||
atm_fee: Optional[int]
|
||||
"""
|
||||
The fee charged by the ATM for the cash withdrawal.
|
||||
"""
|
||||
cashback_amount: Optional[int]
|
||||
"""
|
||||
The amount of cash requested by the cardholder.
|
||||
"""
|
||||
|
||||
class MerchantData(StripeObject):
|
||||
category: str
|
||||
"""
|
||||
A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
|
||||
"""
|
||||
category_code: str
|
||||
"""
|
||||
The merchant category code for the seller's business
|
||||
"""
|
||||
city: Optional[str]
|
||||
"""
|
||||
City where the seller is located
|
||||
"""
|
||||
country: Optional[str]
|
||||
"""
|
||||
Country where the seller is located
|
||||
"""
|
||||
name: Optional[str]
|
||||
"""
|
||||
Name of the seller
|
||||
"""
|
||||
network_id: str
|
||||
"""
|
||||
Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
|
||||
"""
|
||||
postal_code: Optional[str]
|
||||
"""
|
||||
Postal code where the seller is located
|
||||
"""
|
||||
state: Optional[str]
|
||||
"""
|
||||
State where the seller is located
|
||||
"""
|
||||
tax_id: Optional[str]
|
||||
"""
|
||||
The seller's tax identification number. Currently populated for French merchants only.
|
||||
"""
|
||||
terminal_id: Optional[str]
|
||||
"""
|
||||
An ID assigned by the seller to the location of the sale.
|
||||
"""
|
||||
url: Optional[str]
|
||||
"""
|
||||
URL provided by the merchant on a 3DS request
|
||||
"""
|
||||
|
||||
class NetworkData(StripeObject):
|
||||
authorization_code: Optional[str]
|
||||
"""
|
||||
A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations.
|
||||
"""
|
||||
processing_date: Optional[str]
|
||||
"""
|
||||
The date the transaction was processed by the card network. This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network.
|
||||
"""
|
||||
transaction_id: Optional[str]
|
||||
"""
|
||||
Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions.
|
||||
"""
|
||||
|
||||
class PurchaseDetails(StripeObject):
|
||||
class Fleet(StripeObject):
|
||||
class CardholderPromptData(StripeObject):
|
||||
driver_id: Optional[str]
|
||||
"""
|
||||
Driver ID.
|
||||
"""
|
||||
odometer: Optional[int]
|
||||
"""
|
||||
Odometer reading.
|
||||
"""
|
||||
unspecified_id: Optional[str]
|
||||
"""
|
||||
An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
|
||||
"""
|
||||
user_id: Optional[str]
|
||||
"""
|
||||
User ID.
|
||||
"""
|
||||
vehicle_number: Optional[str]
|
||||
"""
|
||||
Vehicle number.
|
||||
"""
|
||||
|
||||
class ReportedBreakdown(StripeObject):
|
||||
class Fuel(StripeObject):
|
||||
gross_amount_decimal: Optional[str]
|
||||
"""
|
||||
Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
|
||||
"""
|
||||
|
||||
class NonFuel(StripeObject):
|
||||
gross_amount_decimal: Optional[str]
|
||||
"""
|
||||
Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
|
||||
"""
|
||||
|
||||
class Tax(StripeObject):
|
||||
local_amount_decimal: Optional[str]
|
||||
"""
|
||||
Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
|
||||
"""
|
||||
national_amount_decimal: Optional[str]
|
||||
"""
|
||||
Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
|
||||
"""
|
||||
|
||||
fuel: Optional[Fuel]
|
||||
"""
|
||||
Breakdown of fuel portion of the purchase.
|
||||
"""
|
||||
non_fuel: Optional[NonFuel]
|
||||
"""
|
||||
Breakdown of non-fuel portion of the purchase.
|
||||
"""
|
||||
tax: Optional[Tax]
|
||||
"""
|
||||
Information about tax included in this transaction.
|
||||
"""
|
||||
_inner_class_types = {
|
||||
"fuel": Fuel,
|
||||
"non_fuel": NonFuel,
|
||||
"tax": Tax,
|
||||
}
|
||||
|
||||
cardholder_prompt_data: Optional[CardholderPromptData]
|
||||
"""
|
||||
Answers to prompts presented to cardholder at point of sale.
|
||||
"""
|
||||
purchase_type: Optional[str]
|
||||
"""
|
||||
The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
|
||||
"""
|
||||
reported_breakdown: Optional[ReportedBreakdown]
|
||||
"""
|
||||
More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
|
||||
"""
|
||||
service_type: Optional[str]
|
||||
"""
|
||||
The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
|
||||
"""
|
||||
_inner_class_types = {
|
||||
"cardholder_prompt_data": CardholderPromptData,
|
||||
"reported_breakdown": ReportedBreakdown,
|
||||
}
|
||||
|
||||
class Flight(StripeObject):
|
||||
class Segment(StripeObject):
|
||||
arrival_airport_code: Optional[str]
|
||||
"""
|
||||
The three-letter IATA airport code of the flight's destination.
|
||||
"""
|
||||
carrier: Optional[str]
|
||||
"""
|
||||
The airline carrier code.
|
||||
"""
|
||||
departure_airport_code: Optional[str]
|
||||
"""
|
||||
The three-letter IATA airport code that the flight departed from.
|
||||
"""
|
||||
flight_number: Optional[str]
|
||||
"""
|
||||
The flight number.
|
||||
"""
|
||||
service_class: Optional[str]
|
||||
"""
|
||||
The flight's service class.
|
||||
"""
|
||||
stopover_allowed: Optional[bool]
|
||||
"""
|
||||
Whether a stopover is allowed on this flight.
|
||||
"""
|
||||
|
||||
departure_at: Optional[int]
|
||||
"""
|
||||
The time that the flight departed.
|
||||
"""
|
||||
passenger_name: Optional[str]
|
||||
"""
|
||||
The name of the passenger.
|
||||
"""
|
||||
refundable: Optional[bool]
|
||||
"""
|
||||
Whether the ticket is refundable.
|
||||
"""
|
||||
segments: Optional[List[Segment]]
|
||||
"""
|
||||
The legs of the trip.
|
||||
"""
|
||||
travel_agency: Optional[str]
|
||||
"""
|
||||
The travel agency that issued the ticket.
|
||||
"""
|
||||
_inner_class_types = {"segments": Segment}
|
||||
|
||||
class Fuel(StripeObject):
|
||||
industry_product_code: Optional[str]
|
||||
"""
|
||||
[Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
|
||||
"""
|
||||
quantity_decimal: Optional[str]
|
||||
"""
|
||||
The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
|
||||
"""
|
||||
type: str
|
||||
"""
|
||||
The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
|
||||
"""
|
||||
unit: str
|
||||
"""
|
||||
The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
|
||||
"""
|
||||
unit_cost_decimal: str
|
||||
"""
|
||||
The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
|
||||
"""
|
||||
|
||||
class Lodging(StripeObject):
|
||||
check_in_at: Optional[int]
|
||||
"""
|
||||
The time of checking into the lodging.
|
||||
"""
|
||||
nights: Optional[int]
|
||||
"""
|
||||
The number of nights stayed at the lodging.
|
||||
"""
|
||||
|
||||
class Receipt(StripeObject):
|
||||
description: Optional[str]
|
||||
"""
|
||||
The description of the item. The maximum length of this field is 26 characters.
|
||||
"""
|
||||
quantity: Optional[float]
|
||||
"""
|
||||
The quantity of the item.
|
||||
"""
|
||||
total: Optional[int]
|
||||
"""
|
||||
The total for this line item in cents.
|
||||
"""
|
||||
unit_cost: Optional[int]
|
||||
"""
|
||||
The unit cost of the item in cents.
|
||||
"""
|
||||
|
||||
fleet: Optional[Fleet]
|
||||
"""
|
||||
Fleet-specific information for transactions using Fleet cards.
|
||||
"""
|
||||
flight: Optional[Flight]
|
||||
"""
|
||||
Information about the flight that was purchased with this transaction.
|
||||
"""
|
||||
fuel: Optional[Fuel]
|
||||
"""
|
||||
Information about fuel that was purchased with this transaction.
|
||||
"""
|
||||
lodging: Optional[Lodging]
|
||||
"""
|
||||
Information about lodging that was purchased with this transaction.
|
||||
"""
|
||||
receipt: Optional[List[Receipt]]
|
||||
"""
|
||||
The line items in the purchase.
|
||||
"""
|
||||
reference: Optional[str]
|
||||
"""
|
||||
A merchant-specific order number.
|
||||
"""
|
||||
_inner_class_types = {
|
||||
"fleet": Fleet,
|
||||
"flight": Flight,
|
||||
"fuel": Fuel,
|
||||
"lodging": Lodging,
|
||||
"receipt": Receipt,
|
||||
}
|
||||
|
||||
class Treasury(StripeObject):
|
||||
received_credit: Optional[str]
|
||||
"""
|
||||
The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund
|
||||
"""
|
||||
received_debit: Optional[str]
|
||||
"""
|
||||
The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture
|
||||
"""
|
||||
|
||||
amount: int
|
||||
"""
|
||||
The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
|
||||
"""
|
||||
amount_details: Optional[AmountDetails]
|
||||
"""
|
||||
Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
|
||||
"""
|
||||
authorization: Optional[ExpandableField["Authorization"]]
|
||||
"""
|
||||
The `Authorization` object that led to this transaction.
|
||||
"""
|
||||
balance_transaction: Optional[ExpandableField["BalanceTransaction"]]
|
||||
"""
|
||||
ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction.
|
||||
"""
|
||||
card: ExpandableField["Card"]
|
||||
"""
|
||||
The card used to make this transaction.
|
||||
"""
|
||||
cardholder: Optional[ExpandableField["Cardholder"]]
|
||||
"""
|
||||
The cardholder to whom this transaction belongs.
|
||||
"""
|
||||
created: int
|
||||
"""
|
||||
Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
"""
|
||||
currency: str
|
||||
"""
|
||||
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
"""
|
||||
dispute: Optional[ExpandableField["Dispute"]]
|
||||
"""
|
||||
If you've disputed the transaction, the ID of the dispute.
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
merchant_amount: int
|
||||
"""
|
||||
The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency.
|
||||
"""
|
||||
merchant_currency: str
|
||||
"""
|
||||
The currency with which the merchant is taking payment.
|
||||
"""
|
||||
merchant_data: MerchantData
|
||||
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.
|
||||
"""
|
||||
network_data: Optional[NetworkData]
|
||||
"""
|
||||
Details about the transaction, such as processing dates, set by the card network.
|
||||
"""
|
||||
object: Literal["issuing.transaction"]
|
||||
"""
|
||||
String representing the object's type. Objects of the same type share the same value.
|
||||
"""
|
||||
purchase_details: Optional[PurchaseDetails]
|
||||
"""
|
||||
Additional purchase information that is optionally provided by the merchant.
|
||||
"""
|
||||
token: Optional[ExpandableField["Token"]]
|
||||
"""
|
||||
[Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null.
|
||||
"""
|
||||
treasury: Optional[Treasury]
|
||||
"""
|
||||
[Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
|
||||
"""
|
||||
type: Literal["capture", "refund"]
|
||||
"""
|
||||
The nature of the transaction.
|
||||
"""
|
||||
wallet: Optional[Literal["apple_pay", "google_pay", "samsung_pay"]]
|
||||
"""
|
||||
The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`.
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def list(
|
||||
cls, **params: Unpack["TransactionListParams"]
|
||||
) -> ListObject["Transaction"]:
|
||||
"""
|
||||
Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
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["TransactionListParams"]
|
||||
) -> ListObject["Transaction"]:
|
||||
"""
|
||||
Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
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["TransactionModifyParams"]
|
||||
) -> "Transaction":
|
||||
"""
|
||||
Updates the specified Issuing Transaction 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(
|
||||
"Transaction",
|
||||
cls._static_request(
|
||||
"post",
|
||||
url,
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def modify_async(
|
||||
cls, id: str, **params: Unpack["TransactionModifyParams"]
|
||||
) -> "Transaction":
|
||||
"""
|
||||
Updates the specified Issuing Transaction 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(
|
||||
"Transaction",
|
||||
await cls._static_request_async(
|
||||
"post",
|
||||
url,
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def retrieve(
|
||||
cls, id: str, **params: Unpack["TransactionRetrieveParams"]
|
||||
) -> "Transaction":
|
||||
"""
|
||||
Retrieves an Issuing Transaction object.
|
||||
"""
|
||||
instance = cls(id, **params)
|
||||
instance.refresh()
|
||||
return instance
|
||||
|
||||
@classmethod
|
||||
async def retrieve_async(
|
||||
cls, id: str, **params: Unpack["TransactionRetrieveParams"]
|
||||
) -> "Transaction":
|
||||
"""
|
||||
Retrieves an Issuing Transaction object.
|
||||
"""
|
||||
instance = cls(id, **params)
|
||||
await instance.refresh_async()
|
||||
return instance
|
||||
|
||||
class TestHelpers(APIResourceTestHelpers["Transaction"]):
|
||||
_resource_cls: Type["Transaction"]
|
||||
|
||||
@classmethod
|
||||
def create_force_capture(
|
||||
cls, **params: Unpack["TransactionCreateForceCaptureParams"]
|
||||
) -> "Transaction":
|
||||
"""
|
||||
Allows the user to capture an arbitrary amount, also known as a forced capture.
|
||||
"""
|
||||
return cast(
|
||||
"Transaction",
|
||||
cls._static_request(
|
||||
"post",
|
||||
"/v1/test_helpers/issuing/transactions/create_force_capture",
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def create_force_capture_async(
|
||||
cls, **params: Unpack["TransactionCreateForceCaptureParams"]
|
||||
) -> "Transaction":
|
||||
"""
|
||||
Allows the user to capture an arbitrary amount, also known as a forced capture.
|
||||
"""
|
||||
return cast(
|
||||
"Transaction",
|
||||
await cls._static_request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/issuing/transactions/create_force_capture",
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def create_unlinked_refund(
|
||||
cls, **params: Unpack["TransactionCreateUnlinkedRefundParams"]
|
||||
) -> "Transaction":
|
||||
"""
|
||||
Allows the user to refund an arbitrary amount, also known as a unlinked refund.
|
||||
"""
|
||||
return cast(
|
||||
"Transaction",
|
||||
cls._static_request(
|
||||
"post",
|
||||
"/v1/test_helpers/issuing/transactions/create_unlinked_refund",
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def create_unlinked_refund_async(
|
||||
cls, **params: Unpack["TransactionCreateUnlinkedRefundParams"]
|
||||
) -> "Transaction":
|
||||
"""
|
||||
Allows the user to refund an arbitrary amount, also known as a unlinked refund.
|
||||
"""
|
||||
return cast(
|
||||
"Transaction",
|
||||
await cls._static_request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/issuing/transactions/create_unlinked_refund",
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def _cls_refund(
|
||||
cls, transaction: str, **params: Unpack["TransactionRefundParams"]
|
||||
) -> "Transaction":
|
||||
"""
|
||||
Refund a test-mode Transaction.
|
||||
"""
|
||||
return cast(
|
||||
"Transaction",
|
||||
cls._static_request(
|
||||
"post",
|
||||
"/v1/test_helpers/issuing/transactions/{transaction}/refund".format(
|
||||
transaction=sanitize_id(transaction)
|
||||
),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@overload
|
||||
@staticmethod
|
||||
def refund(
|
||||
transaction: str, **params: Unpack["TransactionRefundParams"]
|
||||
) -> "Transaction":
|
||||
"""
|
||||
Refund a test-mode Transaction.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
def refund(
|
||||
self, **params: Unpack["TransactionRefundParams"]
|
||||
) -> "Transaction":
|
||||
"""
|
||||
Refund a test-mode Transaction.
|
||||
"""
|
||||
...
|
||||
|
||||
@class_method_variant("_cls_refund")
|
||||
def refund( # pyright: ignore[reportGeneralTypeIssues]
|
||||
self, **params: Unpack["TransactionRefundParams"]
|
||||
) -> "Transaction":
|
||||
"""
|
||||
Refund a test-mode Transaction.
|
||||
"""
|
||||
return cast(
|
||||
"Transaction",
|
||||
self.resource._request(
|
||||
"post",
|
||||
"/v1/test_helpers/issuing/transactions/{transaction}/refund".format(
|
||||
transaction=sanitize_id(self.resource.get("id"))
|
||||
),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def _cls_refund_async(
|
||||
cls, transaction: str, **params: Unpack["TransactionRefundParams"]
|
||||
) -> "Transaction":
|
||||
"""
|
||||
Refund a test-mode Transaction.
|
||||
"""
|
||||
return cast(
|
||||
"Transaction",
|
||||
await cls._static_request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/issuing/transactions/{transaction}/refund".format(
|
||||
transaction=sanitize_id(transaction)
|
||||
),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@overload
|
||||
@staticmethod
|
||||
async def refund_async(
|
||||
transaction: str, **params: Unpack["TransactionRefundParams"]
|
||||
) -> "Transaction":
|
||||
"""
|
||||
Refund a test-mode Transaction.
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
async def refund_async(
|
||||
self, **params: Unpack["TransactionRefundParams"]
|
||||
) -> "Transaction":
|
||||
"""
|
||||
Refund a test-mode Transaction.
|
||||
"""
|
||||
...
|
||||
|
||||
@class_method_variant("_cls_refund_async")
|
||||
async def refund_async( # pyright: ignore[reportGeneralTypeIssues]
|
||||
self, **params: Unpack["TransactionRefundParams"]
|
||||
) -> "Transaction":
|
||||
"""
|
||||
Refund a test-mode Transaction.
|
||||
"""
|
||||
return cast(
|
||||
"Transaction",
|
||||
await self.resource._request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/issuing/transactions/{transaction}/refund".format(
|
||||
transaction=sanitize_id(self.resource.get("id"))
|
||||
),
|
||||
params=params,
|
||||
),
|
||||
)
|
||||
|
||||
@property
|
||||
def test_helpers(self):
|
||||
return self.TestHelpers(self)
|
||||
|
||||
_inner_class_types = {
|
||||
"amount_details": AmountDetails,
|
||||
"merchant_data": MerchantData,
|
||||
"network_data": NetworkData,
|
||||
"purchase_details": PurchaseDetails,
|
||||
"treasury": Treasury,
|
||||
}
|
||||
|
||||
|
||||
Transaction.TestHelpers._resource_cls = Transaction
|
||||
@@ -0,0 +1,148 @@
|
||||
# -*- 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.issuing._transaction import Transaction
|
||||
from stripe.params.issuing._transaction_list_params import (
|
||||
TransactionListParams,
|
||||
)
|
||||
from stripe.params.issuing._transaction_retrieve_params import (
|
||||
TransactionRetrieveParams,
|
||||
)
|
||||
from stripe.params.issuing._transaction_update_params import (
|
||||
TransactionUpdateParams,
|
||||
)
|
||||
|
||||
|
||||
class TransactionService(StripeService):
|
||||
def list(
|
||||
self,
|
||||
params: Optional["TransactionListParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[Transaction]":
|
||||
"""
|
||||
Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[Transaction]",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/issuing/transactions",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def list_async(
|
||||
self,
|
||||
params: Optional["TransactionListParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ListObject[Transaction]":
|
||||
"""
|
||||
Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
"""
|
||||
return cast(
|
||||
"ListObject[Transaction]",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/issuing/transactions",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def retrieve(
|
||||
self,
|
||||
transaction: str,
|
||||
params: Optional["TransactionRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Transaction":
|
||||
"""
|
||||
Retrieves an Issuing Transaction object.
|
||||
"""
|
||||
return cast(
|
||||
"Transaction",
|
||||
self._request(
|
||||
"get",
|
||||
"/v1/issuing/transactions/{transaction}".format(
|
||||
transaction=sanitize_id(transaction),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def retrieve_async(
|
||||
self,
|
||||
transaction: str,
|
||||
params: Optional["TransactionRetrieveParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Transaction":
|
||||
"""
|
||||
Retrieves an Issuing Transaction object.
|
||||
"""
|
||||
return cast(
|
||||
"Transaction",
|
||||
await self._request_async(
|
||||
"get",
|
||||
"/v1/issuing/transactions/{transaction}".format(
|
||||
transaction=sanitize_id(transaction),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def update(
|
||||
self,
|
||||
transaction: str,
|
||||
params: Optional["TransactionUpdateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Transaction":
|
||||
"""
|
||||
Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
||||
"""
|
||||
return cast(
|
||||
"Transaction",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/issuing/transactions/{transaction}".format(
|
||||
transaction=sanitize_id(transaction),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def update_async(
|
||||
self,
|
||||
transaction: str,
|
||||
params: Optional["TransactionUpdateParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "Transaction":
|
||||
"""
|
||||
Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
||||
"""
|
||||
return cast(
|
||||
"Transaction",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/issuing/transactions/{transaction}".format(
|
||||
transaction=sanitize_id(transaction),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
Reference in New Issue
Block a user