pluggy-sdk 1.0.0.post10__py3-none-any.whl → 1.0.0.post12__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.
- pluggy_sdk/__init__.py +17 -1
- pluggy_sdk/api/__init__.py +1 -0
- pluggy_sdk/api/payment_request_api.py +259 -0
- pluggy_sdk/api/payroll_loan_api.py +561 -0
- pluggy_sdk/api/smart_account_api.py +570 -0
- pluggy_sdk/api_client.py +20 -9
- pluggy_sdk/configuration.py +1 -1
- pluggy_sdk/models/__init__.py +15 -0
- pluggy_sdk/models/consent.py +120 -0
- pluggy_sdk/models/create_boleto_payment_request.py +3 -3
- pluggy_sdk/models/create_payment_request.py +8 -2
- pluggy_sdk/models/create_smart_account_transfer_request.py +92 -0
- pluggy_sdk/models/page_response_consents.py +102 -0
- pluggy_sdk/models/payment_recipient_account.py +2 -9
- pluggy_sdk/models/payment_request.py +8 -2
- pluggy_sdk/models/payment_request_schedule.py +183 -0
- pluggy_sdk/models/payment_schedules_list200_response.py +102 -0
- pluggy_sdk/models/payroll_loan_response.py +125 -0
- pluggy_sdk/models/payroll_loan_response_client.py +102 -0
- pluggy_sdk/models/payroll_loans_list200_response.py +102 -0
- pluggy_sdk/models/schedule_payment.py +102 -0
- pluggy_sdk/models/schedule_type_custom.py +100 -0
- pluggy_sdk/models/schedule_type_daily.py +101 -0
- pluggy_sdk/models/schedule_type_monthly.py +103 -0
- pluggy_sdk/models/schedule_type_single.py +98 -0
- pluggy_sdk/models/schedule_type_weekly.py +110 -0
- pluggy_sdk/models/smart_account_transfer.py +123 -0
- {pluggy_sdk-1.0.0.post10.dist-info → pluggy_sdk-1.0.0.post12.dist-info}/METADATA +22 -2
- {pluggy_sdk-1.0.0.post10.dist-info → pluggy_sdk-1.0.0.post12.dist-info}/RECORD +31 -15
- {pluggy_sdk-1.0.0.post10.dist-info → pluggy_sdk-1.0.0.post12.dist-info}/WHEEL +0 -0
- {pluggy_sdk-1.0.0.post10.dist-info → pluggy_sdk-1.0.0.post12.dist-info}/top_level.txt +0 -0
@@ -21,8 +21,10 @@ from pydantic import Field, StrictFloat, StrictInt, StrictStr
|
|
21
21
|
from typing import Optional, Union
|
22
22
|
from typing_extensions import Annotated
|
23
23
|
from pluggy_sdk.models.create_smart_account_request import CreateSmartAccountRequest
|
24
|
+
from pluggy_sdk.models.create_smart_account_transfer_request import CreateSmartAccountTransferRequest
|
24
25
|
from pluggy_sdk.models.smart_account import SmartAccount
|
25
26
|
from pluggy_sdk.models.smart_account_balance import SmartAccountBalance
|
27
|
+
from pluggy_sdk.models.smart_account_transfer import SmartAccountTransfer
|
26
28
|
from pluggy_sdk.models.smart_accounts_list200_response import SmartAccountsList200Response
|
27
29
|
|
28
30
|
from pluggy_sdk.api_client import ApiClient, RequestSerialized
|
@@ -839,6 +841,574 @@ class SmartAccountApi:
|
|
839
841
|
|
840
842
|
|
841
843
|
|
844
|
+
@validate_call
|
845
|
+
def smart_account_transfer(
|
846
|
+
self,
|
847
|
+
id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
|
848
|
+
transfer_id: Annotated[StrictStr, Field(description="Transfer primary identifier")],
|
849
|
+
_request_timeout: Union[
|
850
|
+
None,
|
851
|
+
Annotated[StrictFloat, Field(gt=0)],
|
852
|
+
Tuple[
|
853
|
+
Annotated[StrictFloat, Field(gt=0)],
|
854
|
+
Annotated[StrictFloat, Field(gt=0)]
|
855
|
+
]
|
856
|
+
] = None,
|
857
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
858
|
+
_content_type: Optional[StrictStr] = None,
|
859
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
860
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
861
|
+
) -> SmartAccountTransfer:
|
862
|
+
"""Retrieve Transfer
|
863
|
+
|
864
|
+
Get a transfer from the smart account
|
865
|
+
|
866
|
+
:param id: Smart account primary identifier (required)
|
867
|
+
:type id: str
|
868
|
+
:param transfer_id: Transfer primary identifier (required)
|
869
|
+
:type transfer_id: str
|
870
|
+
:param _request_timeout: timeout setting for this request. If one
|
871
|
+
number provided, it will be total request
|
872
|
+
timeout. It can also be a pair (tuple) of
|
873
|
+
(connection, read) timeouts.
|
874
|
+
:type _request_timeout: int, tuple(int, int), optional
|
875
|
+
:param _request_auth: set to override the auth_settings for an a single
|
876
|
+
request; this effectively ignores the
|
877
|
+
authentication in the spec for a single request.
|
878
|
+
:type _request_auth: dict, optional
|
879
|
+
:param _content_type: force content-type for the request.
|
880
|
+
:type _content_type: str, Optional
|
881
|
+
:param _headers: set to override the headers for a single
|
882
|
+
request; this effectively ignores the headers
|
883
|
+
in the spec for a single request.
|
884
|
+
:type _headers: dict, optional
|
885
|
+
:param _host_index: set to override the host_index for a single
|
886
|
+
request; this effectively ignores the host_index
|
887
|
+
in the spec for a single request.
|
888
|
+
:type _host_index: int, optional
|
889
|
+
:return: Returns the result object.
|
890
|
+
""" # noqa: E501
|
891
|
+
|
892
|
+
_param = self._smart_account_transfer_serialize(
|
893
|
+
id=id,
|
894
|
+
transfer_id=transfer_id,
|
895
|
+
_request_auth=_request_auth,
|
896
|
+
_content_type=_content_type,
|
897
|
+
_headers=_headers,
|
898
|
+
_host_index=_host_index
|
899
|
+
)
|
900
|
+
|
901
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
902
|
+
'200': "SmartAccountTransfer",
|
903
|
+
'404': "GlobalErrorResponse",
|
904
|
+
'400': "GlobalErrorResponse",
|
905
|
+
}
|
906
|
+
response_data = self.api_client.call_api(
|
907
|
+
*_param,
|
908
|
+
_request_timeout=_request_timeout
|
909
|
+
)
|
910
|
+
response_data.read()
|
911
|
+
return self.api_client.response_deserialize(
|
912
|
+
response_data=response_data,
|
913
|
+
response_types_map=_response_types_map,
|
914
|
+
).data
|
915
|
+
|
916
|
+
|
917
|
+
@validate_call
|
918
|
+
def smart_account_transfer_with_http_info(
|
919
|
+
self,
|
920
|
+
id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
|
921
|
+
transfer_id: Annotated[StrictStr, Field(description="Transfer primary identifier")],
|
922
|
+
_request_timeout: Union[
|
923
|
+
None,
|
924
|
+
Annotated[StrictFloat, Field(gt=0)],
|
925
|
+
Tuple[
|
926
|
+
Annotated[StrictFloat, Field(gt=0)],
|
927
|
+
Annotated[StrictFloat, Field(gt=0)]
|
928
|
+
]
|
929
|
+
] = None,
|
930
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
931
|
+
_content_type: Optional[StrictStr] = None,
|
932
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
933
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
934
|
+
) -> ApiResponse[SmartAccountTransfer]:
|
935
|
+
"""Retrieve Transfer
|
936
|
+
|
937
|
+
Get a transfer from the smart account
|
938
|
+
|
939
|
+
:param id: Smart account primary identifier (required)
|
940
|
+
:type id: str
|
941
|
+
:param transfer_id: Transfer primary identifier (required)
|
942
|
+
:type transfer_id: str
|
943
|
+
:param _request_timeout: timeout setting for this request. If one
|
944
|
+
number provided, it will be total request
|
945
|
+
timeout. It can also be a pair (tuple) of
|
946
|
+
(connection, read) timeouts.
|
947
|
+
:type _request_timeout: int, tuple(int, int), optional
|
948
|
+
:param _request_auth: set to override the auth_settings for an a single
|
949
|
+
request; this effectively ignores the
|
950
|
+
authentication in the spec for a single request.
|
951
|
+
:type _request_auth: dict, optional
|
952
|
+
:param _content_type: force content-type for the request.
|
953
|
+
:type _content_type: str, Optional
|
954
|
+
:param _headers: set to override the headers for a single
|
955
|
+
request; this effectively ignores the headers
|
956
|
+
in the spec for a single request.
|
957
|
+
:type _headers: dict, optional
|
958
|
+
:param _host_index: set to override the host_index for a single
|
959
|
+
request; this effectively ignores the host_index
|
960
|
+
in the spec for a single request.
|
961
|
+
:type _host_index: int, optional
|
962
|
+
:return: Returns the result object.
|
963
|
+
""" # noqa: E501
|
964
|
+
|
965
|
+
_param = self._smart_account_transfer_serialize(
|
966
|
+
id=id,
|
967
|
+
transfer_id=transfer_id,
|
968
|
+
_request_auth=_request_auth,
|
969
|
+
_content_type=_content_type,
|
970
|
+
_headers=_headers,
|
971
|
+
_host_index=_host_index
|
972
|
+
)
|
973
|
+
|
974
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
975
|
+
'200': "SmartAccountTransfer",
|
976
|
+
'404': "GlobalErrorResponse",
|
977
|
+
'400': "GlobalErrorResponse",
|
978
|
+
}
|
979
|
+
response_data = self.api_client.call_api(
|
980
|
+
*_param,
|
981
|
+
_request_timeout=_request_timeout
|
982
|
+
)
|
983
|
+
response_data.read()
|
984
|
+
return self.api_client.response_deserialize(
|
985
|
+
response_data=response_data,
|
986
|
+
response_types_map=_response_types_map,
|
987
|
+
)
|
988
|
+
|
989
|
+
|
990
|
+
@validate_call
|
991
|
+
def smart_account_transfer_without_preload_content(
|
992
|
+
self,
|
993
|
+
id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
|
994
|
+
transfer_id: Annotated[StrictStr, Field(description="Transfer primary identifier")],
|
995
|
+
_request_timeout: Union[
|
996
|
+
None,
|
997
|
+
Annotated[StrictFloat, Field(gt=0)],
|
998
|
+
Tuple[
|
999
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1000
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1001
|
+
]
|
1002
|
+
] = None,
|
1003
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1004
|
+
_content_type: Optional[StrictStr] = None,
|
1005
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1006
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1007
|
+
) -> RESTResponseType:
|
1008
|
+
"""Retrieve Transfer
|
1009
|
+
|
1010
|
+
Get a transfer from the smart account
|
1011
|
+
|
1012
|
+
:param id: Smart account primary identifier (required)
|
1013
|
+
:type id: str
|
1014
|
+
:param transfer_id: Transfer primary identifier (required)
|
1015
|
+
:type transfer_id: str
|
1016
|
+
:param _request_timeout: timeout setting for this request. If one
|
1017
|
+
number provided, it will be total request
|
1018
|
+
timeout. It can also be a pair (tuple) of
|
1019
|
+
(connection, read) timeouts.
|
1020
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1021
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1022
|
+
request; this effectively ignores the
|
1023
|
+
authentication in the spec for a single request.
|
1024
|
+
:type _request_auth: dict, optional
|
1025
|
+
:param _content_type: force content-type for the request.
|
1026
|
+
:type _content_type: str, Optional
|
1027
|
+
:param _headers: set to override the headers for a single
|
1028
|
+
request; this effectively ignores the headers
|
1029
|
+
in the spec for a single request.
|
1030
|
+
:type _headers: dict, optional
|
1031
|
+
:param _host_index: set to override the host_index for a single
|
1032
|
+
request; this effectively ignores the host_index
|
1033
|
+
in the spec for a single request.
|
1034
|
+
:type _host_index: int, optional
|
1035
|
+
:return: Returns the result object.
|
1036
|
+
""" # noqa: E501
|
1037
|
+
|
1038
|
+
_param = self._smart_account_transfer_serialize(
|
1039
|
+
id=id,
|
1040
|
+
transfer_id=transfer_id,
|
1041
|
+
_request_auth=_request_auth,
|
1042
|
+
_content_type=_content_type,
|
1043
|
+
_headers=_headers,
|
1044
|
+
_host_index=_host_index
|
1045
|
+
)
|
1046
|
+
|
1047
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1048
|
+
'200': "SmartAccountTransfer",
|
1049
|
+
'404': "GlobalErrorResponse",
|
1050
|
+
'400': "GlobalErrorResponse",
|
1051
|
+
}
|
1052
|
+
response_data = self.api_client.call_api(
|
1053
|
+
*_param,
|
1054
|
+
_request_timeout=_request_timeout
|
1055
|
+
)
|
1056
|
+
return response_data.response
|
1057
|
+
|
1058
|
+
|
1059
|
+
def _smart_account_transfer_serialize(
|
1060
|
+
self,
|
1061
|
+
id,
|
1062
|
+
transfer_id,
|
1063
|
+
_request_auth,
|
1064
|
+
_content_type,
|
1065
|
+
_headers,
|
1066
|
+
_host_index,
|
1067
|
+
) -> RequestSerialized:
|
1068
|
+
|
1069
|
+
_host = None
|
1070
|
+
|
1071
|
+
_collection_formats: Dict[str, str] = {
|
1072
|
+
}
|
1073
|
+
|
1074
|
+
_path_params: Dict[str, str] = {}
|
1075
|
+
_query_params: List[Tuple[str, str]] = []
|
1076
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1077
|
+
_form_params: List[Tuple[str, str]] = []
|
1078
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
1079
|
+
_body_params: Optional[bytes] = None
|
1080
|
+
|
1081
|
+
# process the path parameters
|
1082
|
+
if id is not None:
|
1083
|
+
_path_params['id'] = id
|
1084
|
+
if transfer_id is not None:
|
1085
|
+
_path_params['transfer_id'] = transfer_id
|
1086
|
+
# process the query parameters
|
1087
|
+
# process the header parameters
|
1088
|
+
# process the form parameters
|
1089
|
+
# process the body parameter
|
1090
|
+
|
1091
|
+
|
1092
|
+
# set the HTTP header `Accept`
|
1093
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1094
|
+
[
|
1095
|
+
'application/json'
|
1096
|
+
]
|
1097
|
+
)
|
1098
|
+
|
1099
|
+
|
1100
|
+
# authentication setting
|
1101
|
+
_auth_settings: List[str] = [
|
1102
|
+
'default'
|
1103
|
+
]
|
1104
|
+
|
1105
|
+
return self.api_client.param_serialize(
|
1106
|
+
method='GET',
|
1107
|
+
resource_path='/payments/smart-accounts/{id}/transfers/{transfer_id}',
|
1108
|
+
path_params=_path_params,
|
1109
|
+
query_params=_query_params,
|
1110
|
+
header_params=_header_params,
|
1111
|
+
body=_body_params,
|
1112
|
+
post_params=_form_params,
|
1113
|
+
files=_files,
|
1114
|
+
auth_settings=_auth_settings,
|
1115
|
+
collection_formats=_collection_formats,
|
1116
|
+
_host=_host,
|
1117
|
+
_request_auth=_request_auth
|
1118
|
+
)
|
1119
|
+
|
1120
|
+
|
1121
|
+
|
1122
|
+
|
1123
|
+
@validate_call
|
1124
|
+
def smart_account_transfer_create(
|
1125
|
+
self,
|
1126
|
+
id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
|
1127
|
+
create_smart_account_transfer_request: CreateSmartAccountTransferRequest,
|
1128
|
+
_request_timeout: Union[
|
1129
|
+
None,
|
1130
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1131
|
+
Tuple[
|
1132
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1133
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1134
|
+
]
|
1135
|
+
] = None,
|
1136
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1137
|
+
_content_type: Optional[StrictStr] = None,
|
1138
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1139
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1140
|
+
) -> SmartAccountTransfer:
|
1141
|
+
"""Create Transfer
|
1142
|
+
|
1143
|
+
Creates the smart account transfer resource
|
1144
|
+
|
1145
|
+
:param id: Smart account primary identifier (required)
|
1146
|
+
:type id: str
|
1147
|
+
:param create_smart_account_transfer_request: (required)
|
1148
|
+
:type create_smart_account_transfer_request: CreateSmartAccountTransferRequest
|
1149
|
+
:param _request_timeout: timeout setting for this request. If one
|
1150
|
+
number provided, it will be total request
|
1151
|
+
timeout. It can also be a pair (tuple) of
|
1152
|
+
(connection, read) timeouts.
|
1153
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1154
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1155
|
+
request; this effectively ignores the
|
1156
|
+
authentication in the spec for a single request.
|
1157
|
+
:type _request_auth: dict, optional
|
1158
|
+
:param _content_type: force content-type for the request.
|
1159
|
+
:type _content_type: str, Optional
|
1160
|
+
:param _headers: set to override the headers for a single
|
1161
|
+
request; this effectively ignores the headers
|
1162
|
+
in the spec for a single request.
|
1163
|
+
:type _headers: dict, optional
|
1164
|
+
:param _host_index: set to override the host_index for a single
|
1165
|
+
request; this effectively ignores the host_index
|
1166
|
+
in the spec for a single request.
|
1167
|
+
:type _host_index: int, optional
|
1168
|
+
:return: Returns the result object.
|
1169
|
+
""" # noqa: E501
|
1170
|
+
|
1171
|
+
_param = self._smart_account_transfer_create_serialize(
|
1172
|
+
id=id,
|
1173
|
+
create_smart_account_transfer_request=create_smart_account_transfer_request,
|
1174
|
+
_request_auth=_request_auth,
|
1175
|
+
_content_type=_content_type,
|
1176
|
+
_headers=_headers,
|
1177
|
+
_host_index=_host_index
|
1178
|
+
)
|
1179
|
+
|
1180
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1181
|
+
'200': "SmartAccountTransfer",
|
1182
|
+
'400': "GlobalErrorResponse",
|
1183
|
+
}
|
1184
|
+
response_data = self.api_client.call_api(
|
1185
|
+
*_param,
|
1186
|
+
_request_timeout=_request_timeout
|
1187
|
+
)
|
1188
|
+
response_data.read()
|
1189
|
+
return self.api_client.response_deserialize(
|
1190
|
+
response_data=response_data,
|
1191
|
+
response_types_map=_response_types_map,
|
1192
|
+
).data
|
1193
|
+
|
1194
|
+
|
1195
|
+
@validate_call
|
1196
|
+
def smart_account_transfer_create_with_http_info(
|
1197
|
+
self,
|
1198
|
+
id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
|
1199
|
+
create_smart_account_transfer_request: CreateSmartAccountTransferRequest,
|
1200
|
+
_request_timeout: Union[
|
1201
|
+
None,
|
1202
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1203
|
+
Tuple[
|
1204
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1205
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1206
|
+
]
|
1207
|
+
] = None,
|
1208
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1209
|
+
_content_type: Optional[StrictStr] = None,
|
1210
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1211
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1212
|
+
) -> ApiResponse[SmartAccountTransfer]:
|
1213
|
+
"""Create Transfer
|
1214
|
+
|
1215
|
+
Creates the smart account transfer resource
|
1216
|
+
|
1217
|
+
:param id: Smart account primary identifier (required)
|
1218
|
+
:type id: str
|
1219
|
+
:param create_smart_account_transfer_request: (required)
|
1220
|
+
:type create_smart_account_transfer_request: CreateSmartAccountTransferRequest
|
1221
|
+
:param _request_timeout: timeout setting for this request. If one
|
1222
|
+
number provided, it will be total request
|
1223
|
+
timeout. It can also be a pair (tuple) of
|
1224
|
+
(connection, read) timeouts.
|
1225
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1226
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1227
|
+
request; this effectively ignores the
|
1228
|
+
authentication in the spec for a single request.
|
1229
|
+
:type _request_auth: dict, optional
|
1230
|
+
:param _content_type: force content-type for the request.
|
1231
|
+
:type _content_type: str, Optional
|
1232
|
+
:param _headers: set to override the headers for a single
|
1233
|
+
request; this effectively ignores the headers
|
1234
|
+
in the spec for a single request.
|
1235
|
+
:type _headers: dict, optional
|
1236
|
+
:param _host_index: set to override the host_index for a single
|
1237
|
+
request; this effectively ignores the host_index
|
1238
|
+
in the spec for a single request.
|
1239
|
+
:type _host_index: int, optional
|
1240
|
+
:return: Returns the result object.
|
1241
|
+
""" # noqa: E501
|
1242
|
+
|
1243
|
+
_param = self._smart_account_transfer_create_serialize(
|
1244
|
+
id=id,
|
1245
|
+
create_smart_account_transfer_request=create_smart_account_transfer_request,
|
1246
|
+
_request_auth=_request_auth,
|
1247
|
+
_content_type=_content_type,
|
1248
|
+
_headers=_headers,
|
1249
|
+
_host_index=_host_index
|
1250
|
+
)
|
1251
|
+
|
1252
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1253
|
+
'200': "SmartAccountTransfer",
|
1254
|
+
'400': "GlobalErrorResponse",
|
1255
|
+
}
|
1256
|
+
response_data = self.api_client.call_api(
|
1257
|
+
*_param,
|
1258
|
+
_request_timeout=_request_timeout
|
1259
|
+
)
|
1260
|
+
response_data.read()
|
1261
|
+
return self.api_client.response_deserialize(
|
1262
|
+
response_data=response_data,
|
1263
|
+
response_types_map=_response_types_map,
|
1264
|
+
)
|
1265
|
+
|
1266
|
+
|
1267
|
+
@validate_call
|
1268
|
+
def smart_account_transfer_create_without_preload_content(
|
1269
|
+
self,
|
1270
|
+
id: Annotated[StrictStr, Field(description="Smart account primary identifier")],
|
1271
|
+
create_smart_account_transfer_request: CreateSmartAccountTransferRequest,
|
1272
|
+
_request_timeout: Union[
|
1273
|
+
None,
|
1274
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1275
|
+
Tuple[
|
1276
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1277
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1278
|
+
]
|
1279
|
+
] = None,
|
1280
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1281
|
+
_content_type: Optional[StrictStr] = None,
|
1282
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1283
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1284
|
+
) -> RESTResponseType:
|
1285
|
+
"""Create Transfer
|
1286
|
+
|
1287
|
+
Creates the smart account transfer resource
|
1288
|
+
|
1289
|
+
:param id: Smart account primary identifier (required)
|
1290
|
+
:type id: str
|
1291
|
+
:param create_smart_account_transfer_request: (required)
|
1292
|
+
:type create_smart_account_transfer_request: CreateSmartAccountTransferRequest
|
1293
|
+
:param _request_timeout: timeout setting for this request. If one
|
1294
|
+
number provided, it will be total request
|
1295
|
+
timeout. It can also be a pair (tuple) of
|
1296
|
+
(connection, read) timeouts.
|
1297
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1298
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1299
|
+
request; this effectively ignores the
|
1300
|
+
authentication in the spec for a single request.
|
1301
|
+
:type _request_auth: dict, optional
|
1302
|
+
:param _content_type: force content-type for the request.
|
1303
|
+
:type _content_type: str, Optional
|
1304
|
+
:param _headers: set to override the headers for a single
|
1305
|
+
request; this effectively ignores the headers
|
1306
|
+
in the spec for a single request.
|
1307
|
+
:type _headers: dict, optional
|
1308
|
+
:param _host_index: set to override the host_index for a single
|
1309
|
+
request; this effectively ignores the host_index
|
1310
|
+
in the spec for a single request.
|
1311
|
+
:type _host_index: int, optional
|
1312
|
+
:return: Returns the result object.
|
1313
|
+
""" # noqa: E501
|
1314
|
+
|
1315
|
+
_param = self._smart_account_transfer_create_serialize(
|
1316
|
+
id=id,
|
1317
|
+
create_smart_account_transfer_request=create_smart_account_transfer_request,
|
1318
|
+
_request_auth=_request_auth,
|
1319
|
+
_content_type=_content_type,
|
1320
|
+
_headers=_headers,
|
1321
|
+
_host_index=_host_index
|
1322
|
+
)
|
1323
|
+
|
1324
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1325
|
+
'200': "SmartAccountTransfer",
|
1326
|
+
'400': "GlobalErrorResponse",
|
1327
|
+
}
|
1328
|
+
response_data = self.api_client.call_api(
|
1329
|
+
*_param,
|
1330
|
+
_request_timeout=_request_timeout
|
1331
|
+
)
|
1332
|
+
return response_data.response
|
1333
|
+
|
1334
|
+
|
1335
|
+
def _smart_account_transfer_create_serialize(
|
1336
|
+
self,
|
1337
|
+
id,
|
1338
|
+
create_smart_account_transfer_request,
|
1339
|
+
_request_auth,
|
1340
|
+
_content_type,
|
1341
|
+
_headers,
|
1342
|
+
_host_index,
|
1343
|
+
) -> RequestSerialized:
|
1344
|
+
|
1345
|
+
_host = None
|
1346
|
+
|
1347
|
+
_collection_formats: Dict[str, str] = {
|
1348
|
+
}
|
1349
|
+
|
1350
|
+
_path_params: Dict[str, str] = {}
|
1351
|
+
_query_params: List[Tuple[str, str]] = []
|
1352
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1353
|
+
_form_params: List[Tuple[str, str]] = []
|
1354
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
1355
|
+
_body_params: Optional[bytes] = None
|
1356
|
+
|
1357
|
+
# process the path parameters
|
1358
|
+
if id is not None:
|
1359
|
+
_path_params['id'] = id
|
1360
|
+
# process the query parameters
|
1361
|
+
# process the header parameters
|
1362
|
+
# process the form parameters
|
1363
|
+
# process the body parameter
|
1364
|
+
if create_smart_account_transfer_request is not None:
|
1365
|
+
_body_params = create_smart_account_transfer_request
|
1366
|
+
|
1367
|
+
|
1368
|
+
# set the HTTP header `Accept`
|
1369
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1370
|
+
[
|
1371
|
+
'application/json'
|
1372
|
+
]
|
1373
|
+
)
|
1374
|
+
|
1375
|
+
# set the HTTP header `Content-Type`
|
1376
|
+
if _content_type:
|
1377
|
+
_header_params['Content-Type'] = _content_type
|
1378
|
+
else:
|
1379
|
+
_default_content_type = (
|
1380
|
+
self.api_client.select_header_content_type(
|
1381
|
+
[
|
1382
|
+
'application/json'
|
1383
|
+
]
|
1384
|
+
)
|
1385
|
+
)
|
1386
|
+
if _default_content_type is not None:
|
1387
|
+
_header_params['Content-Type'] = _default_content_type
|
1388
|
+
|
1389
|
+
# authentication setting
|
1390
|
+
_auth_settings: List[str] = [
|
1391
|
+
'default'
|
1392
|
+
]
|
1393
|
+
|
1394
|
+
return self.api_client.param_serialize(
|
1395
|
+
method='POST',
|
1396
|
+
resource_path='/payments/smart-accounts/{id}/transfers',
|
1397
|
+
path_params=_path_params,
|
1398
|
+
query_params=_query_params,
|
1399
|
+
header_params=_header_params,
|
1400
|
+
body=_body_params,
|
1401
|
+
post_params=_form_params,
|
1402
|
+
files=_files,
|
1403
|
+
auth_settings=_auth_settings,
|
1404
|
+
collection_formats=_collection_formats,
|
1405
|
+
_host=_host,
|
1406
|
+
_request_auth=_request_auth
|
1407
|
+
)
|
1408
|
+
|
1409
|
+
|
1410
|
+
|
1411
|
+
|
842
1412
|
@validate_call
|
843
1413
|
def smart_accounts_list(
|
844
1414
|
self,
|
pluggy_sdk/api_client.py
CHANGED
@@ -89,7 +89,7 @@ class ApiClient:
|
|
89
89
|
self.default_headers[header_name] = header_value
|
90
90
|
self.cookie = cookie
|
91
91
|
# Set default User-Agent.
|
92
|
-
self.user_agent = 'OpenAPI-Generator/1.0.0.
|
92
|
+
self.user_agent = 'OpenAPI-Generator/1.0.0.post12/python'
|
93
93
|
self.client_side_validation = configuration.client_side_validation
|
94
94
|
|
95
95
|
def __enter__(self):
|
@@ -315,10 +315,7 @@ class ApiClient:
|
|
315
315
|
match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type)
|
316
316
|
encoding = match.group(1) if match else "utf-8"
|
317
317
|
response_text = response_data.data.decode(encoding)
|
318
|
-
|
319
|
-
return_data = self.__deserialize_primitive(response_text, response_type)
|
320
|
-
else:
|
321
|
-
return_data = self.deserialize(response_text, response_type)
|
318
|
+
return_data = self.deserialize(response_text, response_type, content_type)
|
322
319
|
finally:
|
323
320
|
if not 200 <= response_data.status <= 299:
|
324
321
|
raise ApiException.from_response(
|
@@ -386,21 +383,35 @@ class ApiClient:
|
|
386
383
|
for key, val in obj_dict.items()
|
387
384
|
}
|
388
385
|
|
389
|
-
def deserialize(self, response_text, response_type):
|
386
|
+
def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]):
|
390
387
|
"""Deserializes response into an object.
|
391
388
|
|
392
389
|
:param response: RESTResponse object to be deserialized.
|
393
390
|
:param response_type: class literal for
|
394
391
|
deserialized object, or string of class name.
|
392
|
+
:param content_type: content type of response.
|
395
393
|
|
396
394
|
:return: deserialized object.
|
397
395
|
"""
|
398
396
|
|
399
397
|
# fetch data from response object
|
400
|
-
|
401
|
-
|
402
|
-
|
398
|
+
if content_type is None:
|
399
|
+
try:
|
400
|
+
data = json.loads(response_text)
|
401
|
+
except ValueError:
|
402
|
+
data = response_text
|
403
|
+
elif content_type.startswith("application/json"):
|
404
|
+
if response_text == "":
|
405
|
+
data = ""
|
406
|
+
else:
|
407
|
+
data = json.loads(response_text)
|
408
|
+
elif content_type.startswith("text/plain"):
|
403
409
|
data = response_text
|
410
|
+
else:
|
411
|
+
raise ApiException(
|
412
|
+
status=0,
|
413
|
+
reason="Unsupported content type: {0}".format(content_type)
|
414
|
+
)
|
404
415
|
|
405
416
|
return self.__deserialize(data, response_type)
|
406
417
|
|
pluggy_sdk/configuration.py
CHANGED
@@ -400,7 +400,7 @@ conf = pluggy_sdk.Configuration(
|
|
400
400
|
"OS: {env}\n"\
|
401
401
|
"Python Version: {pyversion}\n"\
|
402
402
|
"Version of the API: 1.0.0\n"\
|
403
|
-
"SDK Package Version: 1.0.0.
|
403
|
+
"SDK Package Version: 1.0.0.post12".\
|
404
404
|
format(env=sys.platform, pyversion=sys.version)
|
405
405
|
|
406
406
|
def get_host_settings(self):
|