updates
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
# -*- 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.test_helpers.treasury._inbound_transfer_service import (
|
||||
InboundTransferService as InboundTransferService,
|
||||
)
|
||||
from stripe.test_helpers.treasury._outbound_payment_service import (
|
||||
OutboundPaymentService as OutboundPaymentService,
|
||||
)
|
||||
from stripe.test_helpers.treasury._outbound_transfer_service import (
|
||||
OutboundTransferService as OutboundTransferService,
|
||||
)
|
||||
from stripe.test_helpers.treasury._received_credit_service import (
|
||||
ReceivedCreditService as ReceivedCreditService,
|
||||
)
|
||||
from stripe.test_helpers.treasury._received_debit_service import (
|
||||
ReceivedDebitService as ReceivedDebitService,
|
||||
)
|
||||
|
||||
# name -> (import_target, is_submodule)
|
||||
_import_map = {
|
||||
"InboundTransferService": (
|
||||
"stripe.test_helpers.treasury._inbound_transfer_service",
|
||||
False,
|
||||
),
|
||||
"OutboundPaymentService": (
|
||||
"stripe.test_helpers.treasury._outbound_payment_service",
|
||||
False,
|
||||
),
|
||||
"OutboundTransferService": (
|
||||
"stripe.test_helpers.treasury._outbound_transfer_service",
|
||||
False,
|
||||
),
|
||||
"ReceivedCreditService": (
|
||||
"stripe.test_helpers.treasury._received_credit_service",
|
||||
False,
|
||||
),
|
||||
"ReceivedDebitService": (
|
||||
"stripe.test_helpers.treasury._received_debit_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.
@@ -0,0 +1,153 @@
|
||||
# -*- 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._request_options import RequestOptions
|
||||
from stripe.params.test_helpers.treasury._inbound_transfer_fail_params import (
|
||||
InboundTransferFailParams,
|
||||
)
|
||||
from stripe.params.test_helpers.treasury._inbound_transfer_return_inbound_transfer_params import (
|
||||
InboundTransferReturnInboundTransferParams,
|
||||
)
|
||||
from stripe.params.test_helpers.treasury._inbound_transfer_succeed_params import (
|
||||
InboundTransferSucceedParams,
|
||||
)
|
||||
from stripe.treasury._inbound_transfer import InboundTransfer
|
||||
|
||||
|
||||
class InboundTransferService(StripeService):
|
||||
def fail(
|
||||
self,
|
||||
id: str,
|
||||
params: Optional["InboundTransferFailParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "InboundTransfer":
|
||||
"""
|
||||
Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
|
||||
"""
|
||||
return cast(
|
||||
"InboundTransfer",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/inbound_transfers/{id}/fail".format(
|
||||
id=sanitize_id(id),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def fail_async(
|
||||
self,
|
||||
id: str,
|
||||
params: Optional["InboundTransferFailParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "InboundTransfer":
|
||||
"""
|
||||
Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
|
||||
"""
|
||||
return cast(
|
||||
"InboundTransfer",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/inbound_transfers/{id}/fail".format(
|
||||
id=sanitize_id(id),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def return_inbound_transfer(
|
||||
self,
|
||||
id: str,
|
||||
params: Optional["InboundTransferReturnInboundTransferParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "InboundTransfer":
|
||||
"""
|
||||
Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
|
||||
"""
|
||||
return cast(
|
||||
"InboundTransfer",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/inbound_transfers/{id}/return".format(
|
||||
id=sanitize_id(id),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def return_inbound_transfer_async(
|
||||
self,
|
||||
id: str,
|
||||
params: Optional["InboundTransferReturnInboundTransferParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "InboundTransfer":
|
||||
"""
|
||||
Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
|
||||
"""
|
||||
return cast(
|
||||
"InboundTransfer",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/inbound_transfers/{id}/return".format(
|
||||
id=sanitize_id(id),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def succeed(
|
||||
self,
|
||||
id: str,
|
||||
params: Optional["InboundTransferSucceedParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "InboundTransfer":
|
||||
"""
|
||||
Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
|
||||
"""
|
||||
return cast(
|
||||
"InboundTransfer",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/inbound_transfers/{id}/succeed".format(
|
||||
id=sanitize_id(id),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def succeed_async(
|
||||
self,
|
||||
id: str,
|
||||
params: Optional["InboundTransferSucceedParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "InboundTransfer":
|
||||
"""
|
||||
Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
|
||||
"""
|
||||
return cast(
|
||||
"InboundTransfer",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/inbound_transfers/{id}/succeed".format(
|
||||
id=sanitize_id(id),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
@@ -0,0 +1,200 @@
|
||||
# -*- 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._request_options import RequestOptions
|
||||
from stripe.params.test_helpers.treasury._outbound_payment_fail_params import (
|
||||
OutboundPaymentFailParams,
|
||||
)
|
||||
from stripe.params.test_helpers.treasury._outbound_payment_post_params import (
|
||||
OutboundPaymentPostParams,
|
||||
)
|
||||
from stripe.params.test_helpers.treasury._outbound_payment_return_outbound_payment_params import (
|
||||
OutboundPaymentReturnOutboundPaymentParams,
|
||||
)
|
||||
from stripe.params.test_helpers.treasury._outbound_payment_update_params import (
|
||||
OutboundPaymentUpdateParams,
|
||||
)
|
||||
from stripe.treasury._outbound_payment import OutboundPayment
|
||||
|
||||
|
||||
class OutboundPaymentService(StripeService):
|
||||
def update(
|
||||
self,
|
||||
id: str,
|
||||
params: "OutboundPaymentUpdateParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "OutboundPayment":
|
||||
"""
|
||||
Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.
|
||||
"""
|
||||
return cast(
|
||||
"OutboundPayment",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/outbound_payments/{id}".format(
|
||||
id=sanitize_id(id),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def update_async(
|
||||
self,
|
||||
id: str,
|
||||
params: "OutboundPaymentUpdateParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "OutboundPayment":
|
||||
"""
|
||||
Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.
|
||||
"""
|
||||
return cast(
|
||||
"OutboundPayment",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/outbound_payments/{id}".format(
|
||||
id=sanitize_id(id),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def fail(
|
||||
self,
|
||||
id: str,
|
||||
params: Optional["OutboundPaymentFailParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "OutboundPayment":
|
||||
"""
|
||||
Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
|
||||
"""
|
||||
return cast(
|
||||
"OutboundPayment",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/outbound_payments/{id}/fail".format(
|
||||
id=sanitize_id(id),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def fail_async(
|
||||
self,
|
||||
id: str,
|
||||
params: Optional["OutboundPaymentFailParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "OutboundPayment":
|
||||
"""
|
||||
Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
|
||||
"""
|
||||
return cast(
|
||||
"OutboundPayment",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/outbound_payments/{id}/fail".format(
|
||||
id=sanitize_id(id),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def post(
|
||||
self,
|
||||
id: str,
|
||||
params: Optional["OutboundPaymentPostParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "OutboundPayment":
|
||||
"""
|
||||
Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
|
||||
"""
|
||||
return cast(
|
||||
"OutboundPayment",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/outbound_payments/{id}/post".format(
|
||||
id=sanitize_id(id),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def post_async(
|
||||
self,
|
||||
id: str,
|
||||
params: Optional["OutboundPaymentPostParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "OutboundPayment":
|
||||
"""
|
||||
Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
|
||||
"""
|
||||
return cast(
|
||||
"OutboundPayment",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/outbound_payments/{id}/post".format(
|
||||
id=sanitize_id(id),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def return_outbound_payment(
|
||||
self,
|
||||
id: str,
|
||||
params: Optional["OutboundPaymentReturnOutboundPaymentParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "OutboundPayment":
|
||||
"""
|
||||
Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
|
||||
"""
|
||||
return cast(
|
||||
"OutboundPayment",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/outbound_payments/{id}/return".format(
|
||||
id=sanitize_id(id),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def return_outbound_payment_async(
|
||||
self,
|
||||
id: str,
|
||||
params: Optional["OutboundPaymentReturnOutboundPaymentParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "OutboundPayment":
|
||||
"""
|
||||
Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
|
||||
"""
|
||||
return cast(
|
||||
"OutboundPayment",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/outbound_payments/{id}/return".format(
|
||||
id=sanitize_id(id),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
@@ -0,0 +1,204 @@
|
||||
# -*- 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._request_options import RequestOptions
|
||||
from stripe.params.test_helpers.treasury._outbound_transfer_fail_params import (
|
||||
OutboundTransferFailParams,
|
||||
)
|
||||
from stripe.params.test_helpers.treasury._outbound_transfer_post_params import (
|
||||
OutboundTransferPostParams,
|
||||
)
|
||||
from stripe.params.test_helpers.treasury._outbound_transfer_return_outbound_transfer_params import (
|
||||
OutboundTransferReturnOutboundTransferParams,
|
||||
)
|
||||
from stripe.params.test_helpers.treasury._outbound_transfer_update_params import (
|
||||
OutboundTransferUpdateParams,
|
||||
)
|
||||
from stripe.treasury._outbound_transfer import OutboundTransfer
|
||||
|
||||
|
||||
class OutboundTransferService(StripeService):
|
||||
def update(
|
||||
self,
|
||||
outbound_transfer: str,
|
||||
params: "OutboundTransferUpdateParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "OutboundTransfer":
|
||||
"""
|
||||
Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
|
||||
"""
|
||||
return cast(
|
||||
"OutboundTransfer",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}".format(
|
||||
outbound_transfer=sanitize_id(outbound_transfer),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def update_async(
|
||||
self,
|
||||
outbound_transfer: str,
|
||||
params: "OutboundTransferUpdateParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "OutboundTransfer":
|
||||
"""
|
||||
Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
|
||||
"""
|
||||
return cast(
|
||||
"OutboundTransfer",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}".format(
|
||||
outbound_transfer=sanitize_id(outbound_transfer),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def fail(
|
||||
self,
|
||||
outbound_transfer: str,
|
||||
params: Optional["OutboundTransferFailParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "OutboundTransfer":
|
||||
"""
|
||||
Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
|
||||
"""
|
||||
return cast(
|
||||
"OutboundTransfer",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail".format(
|
||||
outbound_transfer=sanitize_id(outbound_transfer),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def fail_async(
|
||||
self,
|
||||
outbound_transfer: str,
|
||||
params: Optional["OutboundTransferFailParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "OutboundTransfer":
|
||||
"""
|
||||
Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
|
||||
"""
|
||||
return cast(
|
||||
"OutboundTransfer",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail".format(
|
||||
outbound_transfer=sanitize_id(outbound_transfer),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def post(
|
||||
self,
|
||||
outbound_transfer: str,
|
||||
params: Optional["OutboundTransferPostParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "OutboundTransfer":
|
||||
"""
|
||||
Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
|
||||
"""
|
||||
return cast(
|
||||
"OutboundTransfer",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post".format(
|
||||
outbound_transfer=sanitize_id(outbound_transfer),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def post_async(
|
||||
self,
|
||||
outbound_transfer: str,
|
||||
params: Optional["OutboundTransferPostParams"] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "OutboundTransfer":
|
||||
"""
|
||||
Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
|
||||
"""
|
||||
return cast(
|
||||
"OutboundTransfer",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post".format(
|
||||
outbound_transfer=sanitize_id(outbound_transfer),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
def return_outbound_transfer(
|
||||
self,
|
||||
outbound_transfer: str,
|
||||
params: Optional[
|
||||
"OutboundTransferReturnOutboundTransferParams"
|
||||
] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "OutboundTransfer":
|
||||
"""
|
||||
Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
|
||||
"""
|
||||
return cast(
|
||||
"OutboundTransfer",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return".format(
|
||||
outbound_transfer=sanitize_id(outbound_transfer),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def return_outbound_transfer_async(
|
||||
self,
|
||||
outbound_transfer: str,
|
||||
params: Optional[
|
||||
"OutboundTransferReturnOutboundTransferParams"
|
||||
] = None,
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "OutboundTransfer":
|
||||
"""
|
||||
Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
|
||||
"""
|
||||
return cast(
|
||||
"OutboundTransfer",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return".format(
|
||||
outbound_transfer=sanitize_id(outbound_transfer),
|
||||
),
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
@@ -0,0 +1,52 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._stripe_service import StripeService
|
||||
from typing import Optional, cast
|
||||
from typing_extensions import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from stripe._request_options import RequestOptions
|
||||
from stripe.params.test_helpers.treasury._received_credit_create_params import (
|
||||
ReceivedCreditCreateParams,
|
||||
)
|
||||
from stripe.treasury._received_credit import ReceivedCredit
|
||||
|
||||
|
||||
class ReceivedCreditService(StripeService):
|
||||
def create(
|
||||
self,
|
||||
params: "ReceivedCreditCreateParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ReceivedCredit":
|
||||
"""
|
||||
Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties.
|
||||
"""
|
||||
return cast(
|
||||
"ReceivedCredit",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/received_credits",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def create_async(
|
||||
self,
|
||||
params: "ReceivedCreditCreateParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ReceivedCredit":
|
||||
"""
|
||||
Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties.
|
||||
"""
|
||||
return cast(
|
||||
"ReceivedCredit",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/received_credits",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
@@ -0,0 +1,52 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# File generated from our OpenAPI spec
|
||||
from stripe._stripe_service import StripeService
|
||||
from typing import Optional, cast
|
||||
from typing_extensions import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from stripe._request_options import RequestOptions
|
||||
from stripe.params.test_helpers.treasury._received_debit_create_params import (
|
||||
ReceivedDebitCreateParams,
|
||||
)
|
||||
from stripe.treasury._received_debit import ReceivedDebit
|
||||
|
||||
|
||||
class ReceivedDebitService(StripeService):
|
||||
def create(
|
||||
self,
|
||||
params: "ReceivedDebitCreateParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ReceivedDebit":
|
||||
"""
|
||||
Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties.
|
||||
"""
|
||||
return cast(
|
||||
"ReceivedDebit",
|
||||
self._request(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/received_debits",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
|
||||
async def create_async(
|
||||
self,
|
||||
params: "ReceivedDebitCreateParams",
|
||||
options: Optional["RequestOptions"] = None,
|
||||
) -> "ReceivedDebit":
|
||||
"""
|
||||
Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties.
|
||||
"""
|
||||
return cast(
|
||||
"ReceivedDebit",
|
||||
await self._request_async(
|
||||
"post",
|
||||
"/v1/test_helpers/treasury/received_debits",
|
||||
base_address="api",
|
||||
params=params,
|
||||
options=options,
|
||||
),
|
||||
)
|
||||
Reference in New Issue
Block a user