| 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 ReaderCollectInputsParams(RequestOptions): |
| 9 |
expand: NotRequired[List[str]] |
| 10 |
""" |
| 11 |
Specifies which fields in the response should be expanded. |
| 12 |
""" |
| 13 |
inputs: List["ReaderCollectInputsParamsInput"] |
| 14 |
""" |
| 15 |
List of inputs to be collected from the customer using the Reader. Maximum 5 inputs. |
| 16 |
""" |
| 17 |
metadata: NotRequired[Dict[str, str]] |
| 18 |
""" |
| 19 |
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`. |
| 20 |
""" |
| 21 |
|
| 22 |
|
| 23 |
class ReaderCollectInputsParamsInput(TypedDict): |
| 24 |
custom_text: "ReaderCollectInputsParamsInputCustomText" |
| 25 |
""" |
| 26 |
Customize the text which will be displayed while collecting this input |
| 27 |
""" |
| 28 |
required: NotRequired[bool] |
| 29 |
""" |
| 30 |
Indicate that this input is required, disabling the skip button |
| 31 |
""" |
| 32 |
selection: NotRequired["ReaderCollectInputsParamsInputSelection"] |
| 33 |
""" |
| 34 |
Options for the `selection` input |
| 35 |
""" |
| 36 |
toggles: NotRequired[List["ReaderCollectInputsParamsInputToggle"]] |
| 37 |
""" |
| 38 |
List of toggles to be displayed and customization for the toggles |
| 39 |
""" |
| 40 |
type: Literal[ |
| 41 |
"email", "numeric", "phone", "selection", "signature", "text" |
| 42 |
] |
| 43 |
""" |
| 44 |
The type of input to collect |
| 45 |
""" |
| 46 |
|
| 47 |
|
| 48 |
class ReaderCollectInputsParamsInputCustomText(TypedDict): |
| 49 |
description: NotRequired[str] |
| 50 |
""" |
| 51 |
The description which will be displayed when collecting this input |
| 52 |
""" |
| 53 |
skip_button: NotRequired[str] |
| 54 |
""" |
| 55 |
Custom text for the skip button. Maximum 14 characters. |
| 56 |
""" |
| 57 |
submit_button: NotRequired[str] |
| 58 |
""" |
| 59 |
Custom text for the submit button. Maximum 30 characters. |
| 60 |
""" |
| 61 |
title: str |
| 62 |
""" |
| 63 |
The title which will be displayed when collecting this input |
| 64 |
""" |
| 65 |
|
| 66 |
|
| 67 |
class ReaderCollectInputsParamsInputSelection(TypedDict): |
| 68 |
choices: List["ReaderCollectInputsParamsInputSelectionChoice"] |
| 69 |
""" |
| 70 |
List of choices for the `selection` input |
| 71 |
""" |
| 72 |
|
| 73 |
|
| 74 |
class ReaderCollectInputsParamsInputSelectionChoice(TypedDict): |
| 75 |
id: str |
| 76 |
""" |
| 77 |
The unique identifier for this choice |
| 78 |
""" |
| 79 |
style: NotRequired[Literal["primary", "secondary"]] |
| 80 |
""" |
| 81 |
The style of the button which will be shown for this choice. Can be `primary` or `secondary`. |
| 82 |
""" |
| 83 |
text: str |
| 84 |
""" |
| 85 |
The text which will be shown on the button for this choice |
| 86 |
""" |
| 87 |
|
| 88 |
|
| 89 |
class ReaderCollectInputsParamsInputToggle(TypedDict): |
| 90 |
default_value: NotRequired[Literal["disabled", "enabled"]] |
| 91 |
""" |
| 92 |
The default value of the toggle. Can be `enabled` or `disabled`. |
| 93 |
""" |
| 94 |
description: NotRequired[str] |
| 95 |
""" |
| 96 |
The description which will be displayed for the toggle. Maximum 50 characters. At least one of title or description must be provided. |
| 97 |
""" |
| 98 |
title: NotRequired[str] |
| 99 |
""" |
| 100 |
The title which will be displayed for the toggle. Maximum 50 characters. At least one of title or description must be provided. |
| 101 |
""" |