moovio_sdk 0.17.4__py3-none-any.whl → 0.18.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of moovio_sdk might be problematic. Click here for more details.

@@ -12,6 +12,6 @@ class GeneratedByBankAccountIDTypedDict(TypedDict):
12
12
 
13
13
 
14
14
  class GeneratedByBankAccountID(BaseModel):
15
- bank_account_id: Annotated[Optional[str], pydantic.Field(alias="BankAccountID")] = (
15
+ bank_account_id: Annotated[Optional[str], pydantic.Field(alias="bankAccountID")] = (
16
16
  None
17
17
  )
@@ -12,4 +12,4 @@ class GeneratedByCardIDTypedDict(TypedDict):
12
12
 
13
13
 
14
14
  class GeneratedByCardID(BaseModel):
15
- card_id: Annotated[Optional[str], pydantic.Field(alias="CardID")] = None
15
+ card_id: Annotated[Optional[str], pydantic.Field(alias="cardID")] = None
@@ -12,4 +12,4 @@ class GeneratedByDisputeIDTypedDict(TypedDict):
12
12
 
13
13
 
14
14
  class GeneratedByDisputeID(BaseModel):
15
- dispute_id: Annotated[Optional[str], pydantic.Field(alias="DisputeID")] = None
15
+ dispute_id: Annotated[Optional[str], pydantic.Field(alias="disputeID")] = None
@@ -0,0 +1,21 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from moovio_sdk.types import BaseModel
5
+ import pydantic
6
+ from typing import Optional
7
+ from typing_extensions import Annotated, NotRequired, TypedDict
8
+
9
+
10
+ class ImageMetadataRequestTypedDict(TypedDict):
11
+ r"""Request body for creating or updating image metadata."""
12
+
13
+ alt_text: NotRequired[str]
14
+ r"""Alternative text for the image."""
15
+
16
+
17
+ class ImageMetadataRequest(BaseModel):
18
+ r"""Request body for creating or updating image metadata."""
19
+
20
+ alt_text: Annotated[Optional[str], pydantic.Field(alias="altText")] = None
21
+ r"""Alternative text for the image."""
@@ -0,0 +1,15 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from moovio_sdk.types import BaseModel
5
+ import pydantic
6
+ from typing import Optional
7
+ from typing_extensions import Annotated, NotRequired, TypedDict
8
+
9
+
10
+ class ImageMetadataValidationErrorTypedDict(TypedDict):
11
+ alt_text: NotRequired[str]
12
+
13
+
14
+ class ImageMetadataValidationError(BaseModel):
15
+ alt_text: Annotated[Optional[str], pydantic.Field(alias="altText")] = None
@@ -0,0 +1,119 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ import io
5
+ from moovio_sdk.types import (
6
+ BaseModel,
7
+ Nullable,
8
+ OptionalNullable,
9
+ UNSET,
10
+ UNSET_SENTINEL,
11
+ )
12
+ from moovio_sdk.utils import FieldMetadata, MultipartFormMetadata
13
+ import pydantic
14
+ from pydantic import model_serializer
15
+ from typing import IO, Optional, Union
16
+ from typing_extensions import Annotated, NotRequired, TypedDict
17
+
18
+
19
+ class ImageUpdateRequestMultiPartImageTypedDict(TypedDict):
20
+ file_name: str
21
+ content: Union[bytes, IO[bytes], io.BufferedReader]
22
+ content_type: NotRequired[str]
23
+
24
+
25
+ class ImageUpdateRequestMultiPartImage(BaseModel):
26
+ file_name: Annotated[
27
+ str, pydantic.Field(alias="fileName"), FieldMetadata(multipart=True)
28
+ ]
29
+
30
+ content: Annotated[
31
+ Union[bytes, IO[bytes], io.BufferedReader],
32
+ pydantic.Field(alias=""),
33
+ FieldMetadata(multipart=MultipartFormMetadata(content=True)),
34
+ ]
35
+
36
+ content_type: Annotated[
37
+ Optional[str],
38
+ pydantic.Field(alias="Content-Type"),
39
+ FieldMetadata(multipart=True),
40
+ ] = None
41
+
42
+
43
+ class MetadataTypedDict(TypedDict):
44
+ r"""JSON-encoded metadata to update for the image.
45
+
46
+ Omit this field if not updating metadata, or send `null` to clear existing metadata.
47
+ """
48
+
49
+ alt_text: NotRequired[str]
50
+ r"""Alternative text for the image."""
51
+
52
+
53
+ class Metadata(BaseModel):
54
+ r"""JSON-encoded metadata to update for the image.
55
+
56
+ Omit this field if not updating metadata, or send `null` to clear existing metadata.
57
+ """
58
+
59
+ alt_text: Annotated[Optional[str], pydantic.Field(alias="altText")] = None
60
+ r"""Alternative text for the image."""
61
+
62
+
63
+ class ImageUpdateRequestMultiPartTypedDict(TypedDict):
64
+ r"""Multipart request body for updating an image and/or its metadata."""
65
+
66
+ image: NotRequired[ImageUpdateRequestMultiPartImageTypedDict]
67
+ metadata: NotRequired[Nullable[MetadataTypedDict]]
68
+ r"""JSON-encoded metadata to update for the image.
69
+
70
+ Omit this field if not updating metadata, or send `null` to clear existing metadata.
71
+ """
72
+
73
+
74
+ class ImageUpdateRequestMultiPart(BaseModel):
75
+ r"""Multipart request body for updating an image and/or its metadata."""
76
+
77
+ image: Annotated[
78
+ Optional[ImageUpdateRequestMultiPartImage],
79
+ FieldMetadata(multipart=MultipartFormMetadata(file=True)),
80
+ ] = None
81
+
82
+ metadata: Annotated[
83
+ OptionalNullable[Metadata],
84
+ FieldMetadata(multipart=MultipartFormMetadata(json=True)),
85
+ ] = UNSET
86
+ r"""JSON-encoded metadata to update for the image.
87
+
88
+ Omit this field if not updating metadata, or send `null` to clear existing metadata.
89
+ """
90
+
91
+ @model_serializer(mode="wrap")
92
+ def serialize_model(self, handler):
93
+ optional_fields = ["image", "metadata"]
94
+ nullable_fields = ["metadata"]
95
+ null_default_fields = []
96
+
97
+ serialized = handler(self)
98
+
99
+ m = {}
100
+
101
+ for n, f in type(self).model_fields.items():
102
+ k = f.alias or n
103
+ val = serialized.get(k)
104
+ serialized.pop(k, None)
105
+
106
+ optional_nullable = k in optional_fields and k in nullable_fields
107
+ is_set = (
108
+ self.__pydantic_fields_set__.intersection({n})
109
+ or k in null_default_fields
110
+ ) # pylint: disable=no-member
111
+
112
+ if val is not None and val != UNSET_SENTINEL:
113
+ m[k] = val
114
+ elif val != UNSET_SENTINEL and (
115
+ not k in optional_fields or (optional_nullable and is_set)
116
+ ):
117
+ m[k] = val
118
+
119
+ return m
@@ -0,0 +1,54 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .imagemetadatarequest import ImageMetadataRequest, ImageMetadataRequestTypedDict
5
+ import io
6
+ from moovio_sdk.types import BaseModel
7
+ from moovio_sdk.utils import FieldMetadata, MultipartFormMetadata
8
+ import pydantic
9
+ from typing import IO, Optional, Union
10
+ from typing_extensions import Annotated, NotRequired, TypedDict
11
+
12
+
13
+ class ImageTypedDict(TypedDict):
14
+ file_name: str
15
+ content: Union[bytes, IO[bytes], io.BufferedReader]
16
+ content_type: NotRequired[str]
17
+
18
+
19
+ class Image(BaseModel):
20
+ file_name: Annotated[
21
+ str, pydantic.Field(alias="fileName"), FieldMetadata(multipart=True)
22
+ ]
23
+
24
+ content: Annotated[
25
+ Union[bytes, IO[bytes], io.BufferedReader],
26
+ pydantic.Field(alias=""),
27
+ FieldMetadata(multipart=MultipartFormMetadata(content=True)),
28
+ ]
29
+
30
+ content_type: Annotated[
31
+ Optional[str],
32
+ pydantic.Field(alias="Content-Type"),
33
+ FieldMetadata(multipart=True),
34
+ ] = None
35
+
36
+
37
+ class ImageUploadRequestMultiPartTypedDict(TypedDict):
38
+ r"""Multipart request body for uploading an image with optional metadata."""
39
+
40
+ image: ImageTypedDict
41
+ metadata: NotRequired[ImageMetadataRequestTypedDict]
42
+ r"""Optional, json-encoded metadata to associate with the uploaded image."""
43
+
44
+
45
+ class ImageUploadRequestMultiPart(BaseModel):
46
+ r"""Multipart request body for uploading an image with optional metadata."""
47
+
48
+ image: Annotated[Image, FieldMetadata(multipart=MultipartFormMetadata(file=True))]
49
+
50
+ metadata: Annotated[
51
+ Optional[ImageMetadataRequest],
52
+ FieldMetadata(multipart=MultipartFormMetadata(json=True)),
53
+ ] = None
54
+ r"""Optional, json-encoded metadata to associate with the uploaded image."""
@@ -44,6 +44,10 @@ if TYPE_CHECKING:
44
44
  )
45
45
  from .filevalidationerror import FileValidationError, FileValidationErrorData
46
46
  from .genericerror import GenericError, GenericErrorData
47
+ from .imagerequestvalidationerror import (
48
+ ImageRequestValidationError,
49
+ ImageRequestValidationErrorData,
50
+ )
47
51
  from .linkapplepayerror import LinkApplePayError, LinkApplePayErrorData
48
52
  from .linkcarderror import LinkCardError, LinkCardErrorData
49
53
  from .listtransfersvalidationerror import (
@@ -168,6 +172,8 @@ __all__ = [
168
172
  "FileValidationErrorData",
169
173
  "GenericError",
170
174
  "GenericErrorData",
175
+ "ImageRequestValidationError",
176
+ "ImageRequestValidationErrorData",
171
177
  "LinkApplePayError",
172
178
  "LinkApplePayErrorData",
173
179
  "LinkCardError",
@@ -267,6 +273,8 @@ _dynamic_imports: dict[str, str] = {
267
273
  "FileValidationErrorData": ".filevalidationerror",
268
274
  "GenericError": ".genericerror",
269
275
  "GenericErrorData": ".genericerror",
276
+ "ImageRequestValidationError": ".imagerequestvalidationerror",
277
+ "ImageRequestValidationErrorData": ".imagerequestvalidationerror",
270
278
  "LinkApplePayError": ".linkapplepayerror",
271
279
  "LinkApplePayErrorData": ".linkapplepayerror",
272
280
  "LinkCardError": ".linkcarderror",
@@ -0,0 +1,34 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from dataclasses import dataclass, field
5
+ import httpx
6
+ from moovio_sdk.models.components import (
7
+ imagemetadatavalidationerror as components_imagemetadatavalidationerror,
8
+ )
9
+ from moovio_sdk.models.errors import MoovError
10
+ from moovio_sdk.types import BaseModel
11
+ from typing import Optional
12
+
13
+
14
+ class ImageRequestValidationErrorData(BaseModel):
15
+ image: Optional[str] = None
16
+
17
+ metadata: Optional[
18
+ components_imagemetadatavalidationerror.ImageMetadataValidationError
19
+ ] = None
20
+
21
+
22
+ @dataclass(unsafe_hash=True)
23
+ class ImageRequestValidationError(MoovError):
24
+ data: ImageRequestValidationErrorData = field(hash=False)
25
+
26
+ def __init__(
27
+ self,
28
+ data: ImageRequestValidationErrorData,
29
+ raw_response: httpx.Response,
30
+ body: Optional[str] = None,
31
+ ):
32
+ message = body or raw_response.text
33
+ super().__init__(message, raw_response, body)
34
+ object.__setattr__(self, "data", data)
@@ -1141,6 +1141,14 @@ if TYPE_CHECKING:
1141
1141
  UpdateDisputeEvidenceResponse,
1142
1142
  UpdateDisputeEvidenceResponseTypedDict,
1143
1143
  )
1144
+ from .updateimage import (
1145
+ UpdateImageGlobals,
1146
+ UpdateImageGlobalsTypedDict,
1147
+ UpdateImageRequest,
1148
+ UpdateImageRequestTypedDict,
1149
+ UpdateImageResponse,
1150
+ UpdateImageResponseTypedDict,
1151
+ )
1144
1152
  from .updateissuedcard import (
1145
1153
  UpdateIssuedCardGlobals,
1146
1154
  UpdateIssuedCardGlobalsTypedDict,
@@ -1237,6 +1245,14 @@ if TYPE_CHECKING:
1237
1245
  UploadFileResponse,
1238
1246
  UploadFileResponseTypedDict,
1239
1247
  )
1248
+ from .uploadimage import (
1249
+ UploadImageGlobals,
1250
+ UploadImageGlobalsTypedDict,
1251
+ UploadImageRequest,
1252
+ UploadImageRequestTypedDict,
1253
+ UploadImageResponse,
1254
+ UploadImageResponseTypedDict,
1255
+ )
1240
1256
  from .upsertbrand import (
1241
1257
  UpsertBrandGlobals,
1242
1258
  UpsertBrandGlobalsTypedDict,
@@ -2106,6 +2122,12 @@ __all__ = [
2106
2122
  "UpdateDisputeEvidenceRequestTypedDict",
2107
2123
  "UpdateDisputeEvidenceResponse",
2108
2124
  "UpdateDisputeEvidenceResponseTypedDict",
2125
+ "UpdateImageGlobals",
2126
+ "UpdateImageGlobalsTypedDict",
2127
+ "UpdateImageRequest",
2128
+ "UpdateImageRequestTypedDict",
2129
+ "UpdateImageResponse",
2130
+ "UpdateImageResponseTypedDict",
2109
2131
  "UpdateIssuedCardGlobals",
2110
2132
  "UpdateIssuedCardGlobalsTypedDict",
2111
2133
  "UpdateIssuedCardRequest",
@@ -2178,6 +2200,12 @@ __all__ = [
2178
2200
  "UploadFileRequestTypedDict",
2179
2201
  "UploadFileResponse",
2180
2202
  "UploadFileResponseTypedDict",
2203
+ "UploadImageGlobals",
2204
+ "UploadImageGlobalsTypedDict",
2205
+ "UploadImageRequest",
2206
+ "UploadImageRequestTypedDict",
2207
+ "UploadImageResponse",
2208
+ "UploadImageResponseTypedDict",
2181
2209
  "UpsertBrandGlobals",
2182
2210
  "UpsertBrandGlobalsTypedDict",
2183
2211
  "UpsertBrandRequest",
@@ -3044,6 +3072,12 @@ _dynamic_imports: dict[str, str] = {
3044
3072
  "UpdateDisputeEvidenceRequestTypedDict": ".updatedisputeevidence",
3045
3073
  "UpdateDisputeEvidenceResponse": ".updatedisputeevidence",
3046
3074
  "UpdateDisputeEvidenceResponseTypedDict": ".updatedisputeevidence",
3075
+ "UpdateImageGlobals": ".updateimage",
3076
+ "UpdateImageGlobalsTypedDict": ".updateimage",
3077
+ "UpdateImageRequest": ".updateimage",
3078
+ "UpdateImageRequestTypedDict": ".updateimage",
3079
+ "UpdateImageResponse": ".updateimage",
3080
+ "UpdateImageResponseTypedDict": ".updateimage",
3047
3081
  "UpdateIssuedCardGlobals": ".updateissuedcard",
3048
3082
  "UpdateIssuedCardGlobalsTypedDict": ".updateissuedcard",
3049
3083
  "UpdateIssuedCardRequest": ".updateissuedcard",
@@ -3116,6 +3150,12 @@ _dynamic_imports: dict[str, str] = {
3116
3150
  "UploadFileRequestTypedDict": ".uploadfile",
3117
3151
  "UploadFileResponse": ".uploadfile",
3118
3152
  "UploadFileResponseTypedDict": ".uploadfile",
3153
+ "UploadImageGlobals": ".uploadimage",
3154
+ "UploadImageGlobalsTypedDict": ".uploadimage",
3155
+ "UploadImageRequest": ".uploadimage",
3156
+ "UploadImageRequestTypedDict": ".uploadimage",
3157
+ "UploadImageResponse": ".uploadimage",
3158
+ "UploadImageResponseTypedDict": ".uploadimage",
3119
3159
  "UpsertBrandGlobals": ".upsertbrand",
3120
3160
  "UpsertBrandGlobalsTypedDict": ".upsertbrand",
3121
3161
  "UpsertBrandRequest": ".upsertbrand",
@@ -0,0 +1,87 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from moovio_sdk.models.components import (
5
+ imagemetadata as components_imagemetadata,
6
+ imageupdaterequestmultipart as components_imageupdaterequestmultipart,
7
+ )
8
+ from moovio_sdk.types import BaseModel
9
+ from moovio_sdk.utils import (
10
+ FieldMetadata,
11
+ HeaderMetadata,
12
+ PathParamMetadata,
13
+ RequestMetadata,
14
+ )
15
+ import pydantic
16
+ from typing import Dict, List, Optional
17
+ from typing_extensions import Annotated, NotRequired, TypedDict
18
+
19
+
20
+ class UpdateImageGlobalsTypedDict(TypedDict):
21
+ x_moov_version: NotRequired[str]
22
+ r"""Specify an API version.
23
+
24
+ API versioning follows the format `vYYYY.QQ.BB`, where
25
+ - `YYYY` is the year
26
+ - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
27
+ - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
28
+ - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
29
+
30
+ The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
31
+ """
32
+
33
+
34
+ class UpdateImageGlobals(BaseModel):
35
+ x_moov_version: Annotated[
36
+ Optional[str],
37
+ pydantic.Field(alias="x-moov-version"),
38
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
39
+ ] = "v2024.01.00"
40
+ r"""Specify an API version.
41
+
42
+ API versioning follows the format `vYYYY.QQ.BB`, where
43
+ - `YYYY` is the year
44
+ - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
45
+ - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
46
+ - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
47
+
48
+ The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
49
+ """
50
+
51
+
52
+ class UpdateImageRequestTypedDict(TypedDict):
53
+ account_id: str
54
+ image_id: str
55
+ image_update_request_multi_part: (
56
+ components_imageupdaterequestmultipart.ImageUpdateRequestMultiPartTypedDict
57
+ )
58
+
59
+
60
+ class UpdateImageRequest(BaseModel):
61
+ account_id: Annotated[
62
+ str,
63
+ pydantic.Field(alias="accountID"),
64
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
65
+ ]
66
+
67
+ image_id: Annotated[
68
+ str,
69
+ pydantic.Field(alias="imageID"),
70
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
71
+ ]
72
+
73
+ image_update_request_multi_part: Annotated[
74
+ components_imageupdaterequestmultipart.ImageUpdateRequestMultiPart,
75
+ FieldMetadata(request=RequestMetadata(media_type="multipart/form-data")),
76
+ ]
77
+
78
+
79
+ class UpdateImageResponseTypedDict(TypedDict):
80
+ headers: Dict[str, List[str]]
81
+ result: components_imagemetadata.ImageMetadataTypedDict
82
+
83
+
84
+ class UpdateImageResponse(BaseModel):
85
+ headers: Dict[str, List[str]]
86
+
87
+ result: components_imagemetadata.ImageMetadata
@@ -0,0 +1,80 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from moovio_sdk.models.components import (
5
+ imagemetadata as components_imagemetadata,
6
+ imageuploadrequestmultipart as components_imageuploadrequestmultipart,
7
+ )
8
+ from moovio_sdk.types import BaseModel
9
+ from moovio_sdk.utils import (
10
+ FieldMetadata,
11
+ HeaderMetadata,
12
+ PathParamMetadata,
13
+ RequestMetadata,
14
+ )
15
+ import pydantic
16
+ from typing import Dict, List, Optional
17
+ from typing_extensions import Annotated, NotRequired, TypedDict
18
+
19
+
20
+ class UploadImageGlobalsTypedDict(TypedDict):
21
+ x_moov_version: NotRequired[str]
22
+ r"""Specify an API version.
23
+
24
+ API versioning follows the format `vYYYY.QQ.BB`, where
25
+ - `YYYY` is the year
26
+ - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
27
+ - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
28
+ - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
29
+
30
+ The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
31
+ """
32
+
33
+
34
+ class UploadImageGlobals(BaseModel):
35
+ x_moov_version: Annotated[
36
+ Optional[str],
37
+ pydantic.Field(alias="x-moov-version"),
38
+ FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
39
+ ] = "v2024.01.00"
40
+ r"""Specify an API version.
41
+
42
+ API versioning follows the format `vYYYY.QQ.BB`, where
43
+ - `YYYY` is the year
44
+ - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
45
+ - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
46
+ - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
47
+
48
+ The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
49
+ """
50
+
51
+
52
+ class UploadImageRequestTypedDict(TypedDict):
53
+ account_id: str
54
+ image_upload_request_multi_part: (
55
+ components_imageuploadrequestmultipart.ImageUploadRequestMultiPartTypedDict
56
+ )
57
+
58
+
59
+ class UploadImageRequest(BaseModel):
60
+ account_id: Annotated[
61
+ str,
62
+ pydantic.Field(alias="accountID"),
63
+ FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
64
+ ]
65
+
66
+ image_upload_request_multi_part: Annotated[
67
+ components_imageuploadrequestmultipart.ImageUploadRequestMultiPart,
68
+ FieldMetadata(request=RequestMetadata(media_type="multipart/form-data")),
69
+ ]
70
+
71
+
72
+ class UploadImageResponseTypedDict(TypedDict):
73
+ headers: Dict[str, List[str]]
74
+ result: components_imagemetadata.ImageMetadataTypedDict
75
+
76
+
77
+ class UploadImageResponse(BaseModel):
78
+ headers: Dict[str, List[str]]
79
+
80
+ result: components_imagemetadata.ImageMetadata