| 1 |
# -*- coding: utf-8 -*- |
| 2 |
# File generated from our OpenAPI spec |
| 3 |
from stripe._request_options import RequestOptions |
| 4 |
from typing import Dict, List |
| 5 |
from typing_extensions import Literal, NotRequired, TypedDict |
| 6 |
|
| 7 |
|
| 8 |
class RequestCreateParams(RequestOptions): |
| 9 |
expand: NotRequired[List[str]] |
| 10 |
""" |
| 11 |
Specifies which fields in the response should be expanded. |
| 12 |
""" |
| 13 |
metadata: NotRequired[Dict[str, str]] |
| 14 |
""" |
| 15 |
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. |
| 16 |
""" |
| 17 |
payment_method: str |
| 18 |
""" |
| 19 |
The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. |
| 20 |
""" |
| 21 |
replacements: List[ |
| 22 |
Literal[ |
| 23 |
"card_cvc", |
| 24 |
"card_expiry", |
| 25 |
"card_number", |
| 26 |
"cardholder_name", |
| 27 |
"request_signature", |
| 28 |
] |
| 29 |
] |
| 30 |
""" |
| 31 |
The field kinds to be replaced in the forwarded request. |
| 32 |
""" |
| 33 |
request: "RequestCreateParamsRequest" |
| 34 |
""" |
| 35 |
The request body and headers to be sent to the destination endpoint. |
| 36 |
""" |
| 37 |
url: str |
| 38 |
""" |
| 39 |
The destination URL for the forwarded request. Must be supported by the config. |
| 40 |
""" |
| 41 |
|
| 42 |
|
| 43 |
class RequestCreateParamsRequest(TypedDict): |
| 44 |
body: NotRequired[str] |
| 45 |
""" |
| 46 |
The body payload to send to the destination endpoint. |
| 47 |
""" |
| 48 |
headers: NotRequired[List["RequestCreateParamsRequestHeader"]] |
| 49 |
""" |
| 50 |
The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. |
| 51 |
""" |
| 52 |
|
| 53 |
|
| 54 |
class RequestCreateParamsRequestHeader(TypedDict): |
| 55 |
name: str |
| 56 |
""" |
| 57 |
The header name. |
| 58 |
""" |
| 59 |
value: str |
| 60 |
""" |
| 61 |
The header value. |
| 62 |
""" |