dockflow-sdk 0.3.0__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.
- dockflow_sdk/__init__.py +124 -0
- dockflow_sdk/api/__init__.py +8 -0
- dockflow_sdk/api/documents_api.py +1382 -0
- dockflow_sdk/api/tradeflows_api.py +615 -0
- dockflow_sdk/api/upstream_api.py +471 -0
- dockflow_sdk/api/widget_api.py +303 -0
- dockflow_sdk/api_client.py +865 -0
- dockflow_sdk/api_response.py +21 -0
- dockflow_sdk/configuration.py +658 -0
- dockflow_sdk/exceptions.py +218 -0
- dockflow_sdk/models/__init__.py +51 -0
- dockflow_sdk/models/container_reference.py +90 -0
- dockflow_sdk/models/create_tradeflows202_response.py +104 -0
- dockflow_sdk/models/create_tradeflows202_response_tradeflows_inner.py +90 -0
- dockflow_sdk/models/document_update.py +92 -0
- dockflow_sdk/models/document_upload.py +105 -0
- dockflow_sdk/models/downstream_tradeflow.py +189 -0
- dockflow_sdk/models/downstream_tradeflow_bill_of_lading_reference.py +138 -0
- dockflow_sdk/models/downstream_tradeflow_booking_reference.py +138 -0
- dockflow_sdk/models/downstream_tradeflow_events_inner.py +97 -0
- dockflow_sdk/models/downstream_tradeflow_free_time_overrides_inner.py +101 -0
- dockflow_sdk/models/downstream_tradeflow_mock_tracking.py +88 -0
- dockflow_sdk/models/downstream_tradeflow_partners_inner.py +94 -0
- dockflow_sdk/models/downstream_tradeflow_references.py +92 -0
- dockflow_sdk/models/get_document200_response.py +100 -0
- dockflow_sdk/models/get_document200_response_data_inner.py +133 -0
- dockflow_sdk/models/get_document200_response_data_inner_document_type.py +90 -0
- dockflow_sdk/models/get_upstream200_response.py +102 -0
- dockflow_sdk/models/get_upstream400_response.py +172 -0
- dockflow_sdk/models/inline_object.py +90 -0
- dockflow_sdk/models/list_document_types200_response_inner.py +90 -0
- dockflow_sdk/models/upload_document202_response.py +120 -0
- dockflow_sdk/models/upload_document400_response.py +155 -0
- dockflow_sdk/models/upstream_record.py +132 -0
- dockflow_sdk/models/upstream_record_additional_references.py +90 -0
- dockflow_sdk/models/upstream_record_data_quality.py +96 -0
- dockflow_sdk/models/upstream_record_metadata.py +105 -0
- dockflow_sdk/models/widget_container.py +120 -0
- dockflow_sdk/models/widget_country.py +100 -0
- dockflow_sdk/models/widget_leg.py +113 -0
- dockflow_sdk/models/widget_location.py +129 -0
- dockflow_sdk/models/widget_milestone.py +118 -0
- dockflow_sdk/models/widget_point.py +90 -0
- dockflow_sdk/models/widget_search_result.py +155 -0
- dockflow_sdk/models/widget_track.py +102 -0
- dockflow_sdk/models/widget_track_reading.py +92 -0
- dockflow_sdk/py.typed +0 -0
- dockflow_sdk/rest.py +334 -0
- dockflow_sdk-0.3.0.dist-info/METADATA +212 -0
- dockflow_sdk-0.3.0.dist-info/RECORD +52 -0
- dockflow_sdk-0.3.0.dist-info/WHEEL +5 -0
- dockflow_sdk-0.3.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,615 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Dockflow v3 API
|
|
3
|
+
|
|
4
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 3.0.0
|
|
7
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
8
|
+
|
|
9
|
+
Do not edit the class manually.
|
|
10
|
+
""" # noqa: E501
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
import warnings
|
|
14
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
15
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
16
|
+
from typing_extensions import Annotated
|
|
17
|
+
|
|
18
|
+
from pydantic import Field, StrictBool, StrictStr, field_validator
|
|
19
|
+
from typing import List, Optional
|
|
20
|
+
from typing_extensions import Annotated
|
|
21
|
+
from dockflow_sdk.models.create_tradeflows202_response import CreateTradeflows202Response
|
|
22
|
+
from dockflow_sdk.models.downstream_tradeflow import DownstreamTradeflow
|
|
23
|
+
|
|
24
|
+
from dockflow_sdk.api_client import ApiClient, RequestSerialized
|
|
25
|
+
from dockflow_sdk.api_response import ApiResponse
|
|
26
|
+
from dockflow_sdk.rest import RESTResponseType
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class TradeflowsApi:
|
|
30
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
31
|
+
Ref: https://openapi-generator.tech
|
|
32
|
+
|
|
33
|
+
Do not edit the class manually.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(self, api_client=None) -> None:
|
|
37
|
+
if api_client is None:
|
|
38
|
+
api_client = ApiClient.get_default()
|
|
39
|
+
self.api_client = api_client
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@validate_call
|
|
43
|
+
def create_tradeflows(
|
|
44
|
+
self,
|
|
45
|
+
downstream_tradeflow: List[DownstreamTradeflow],
|
|
46
|
+
_request_timeout: Union[
|
|
47
|
+
None,
|
|
48
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
49
|
+
Tuple[
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
52
|
+
]
|
|
53
|
+
] = None,
|
|
54
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
55
|
+
_content_type: Optional[StrictStr] = None,
|
|
56
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
58
|
+
) -> CreateTradeflows202Response:
|
|
59
|
+
"""Upsert tradeflows
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
:param downstream_tradeflow: (required)
|
|
63
|
+
:type downstream_tradeflow: List[DownstreamTradeflow]
|
|
64
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
65
|
+
number provided, it will be total request
|
|
66
|
+
timeout. It can also be a pair (tuple) of
|
|
67
|
+
(connection, read) timeouts.
|
|
68
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
69
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
70
|
+
request; this effectively ignores the
|
|
71
|
+
authentication in the spec for a single request.
|
|
72
|
+
:type _request_auth: dict, optional
|
|
73
|
+
:param _content_type: force content-type for the request.
|
|
74
|
+
:type _content_type: str, Optional
|
|
75
|
+
:param _headers: set to override the headers for a single
|
|
76
|
+
request; this effectively ignores the headers
|
|
77
|
+
in the spec for a single request.
|
|
78
|
+
:type _headers: dict, optional
|
|
79
|
+
:param _host_index: set to override the host_index for a single
|
|
80
|
+
request; this effectively ignores the host_index
|
|
81
|
+
in the spec for a single request.
|
|
82
|
+
:type _host_index: int, optional
|
|
83
|
+
:return: Returns the result object.
|
|
84
|
+
""" # noqa: E501
|
|
85
|
+
|
|
86
|
+
_param = self._create_tradeflows_serialize(
|
|
87
|
+
downstream_tradeflow=downstream_tradeflow,
|
|
88
|
+
_request_auth=_request_auth,
|
|
89
|
+
_content_type=_content_type,
|
|
90
|
+
_headers=_headers,
|
|
91
|
+
_host_index=_host_index
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
95
|
+
'202': "CreateTradeflows202Response",
|
|
96
|
+
'400': "str",
|
|
97
|
+
}
|
|
98
|
+
response_data = self.api_client.call_api(
|
|
99
|
+
*_param,
|
|
100
|
+
_request_timeout=_request_timeout
|
|
101
|
+
)
|
|
102
|
+
response_data.read()
|
|
103
|
+
return self.api_client.response_deserialize(
|
|
104
|
+
response_data=response_data,
|
|
105
|
+
response_types_map=_response_types_map,
|
|
106
|
+
).data
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
@validate_call
|
|
110
|
+
def create_tradeflows_with_http_info(
|
|
111
|
+
self,
|
|
112
|
+
downstream_tradeflow: List[DownstreamTradeflow],
|
|
113
|
+
_request_timeout: Union[
|
|
114
|
+
None,
|
|
115
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
116
|
+
Tuple[
|
|
117
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
118
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
119
|
+
]
|
|
120
|
+
] = None,
|
|
121
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
122
|
+
_content_type: Optional[StrictStr] = None,
|
|
123
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
124
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
125
|
+
) -> ApiResponse[CreateTradeflows202Response]:
|
|
126
|
+
"""Upsert tradeflows
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
:param downstream_tradeflow: (required)
|
|
130
|
+
:type downstream_tradeflow: List[DownstreamTradeflow]
|
|
131
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
132
|
+
number provided, it will be total request
|
|
133
|
+
timeout. It can also be a pair (tuple) of
|
|
134
|
+
(connection, read) timeouts.
|
|
135
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
136
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
137
|
+
request; this effectively ignores the
|
|
138
|
+
authentication in the spec for a single request.
|
|
139
|
+
:type _request_auth: dict, optional
|
|
140
|
+
:param _content_type: force content-type for the request.
|
|
141
|
+
:type _content_type: str, Optional
|
|
142
|
+
:param _headers: set to override the headers for a single
|
|
143
|
+
request; this effectively ignores the headers
|
|
144
|
+
in the spec for a single request.
|
|
145
|
+
:type _headers: dict, optional
|
|
146
|
+
:param _host_index: set to override the host_index for a single
|
|
147
|
+
request; this effectively ignores the host_index
|
|
148
|
+
in the spec for a single request.
|
|
149
|
+
:type _host_index: int, optional
|
|
150
|
+
:return: Returns the result object.
|
|
151
|
+
""" # noqa: E501
|
|
152
|
+
|
|
153
|
+
_param = self._create_tradeflows_serialize(
|
|
154
|
+
downstream_tradeflow=downstream_tradeflow,
|
|
155
|
+
_request_auth=_request_auth,
|
|
156
|
+
_content_type=_content_type,
|
|
157
|
+
_headers=_headers,
|
|
158
|
+
_host_index=_host_index
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
162
|
+
'202': "CreateTradeflows202Response",
|
|
163
|
+
'400': "str",
|
|
164
|
+
}
|
|
165
|
+
response_data = self.api_client.call_api(
|
|
166
|
+
*_param,
|
|
167
|
+
_request_timeout=_request_timeout
|
|
168
|
+
)
|
|
169
|
+
response_data.read()
|
|
170
|
+
return self.api_client.response_deserialize(
|
|
171
|
+
response_data=response_data,
|
|
172
|
+
response_types_map=_response_types_map,
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
@validate_call
|
|
177
|
+
def create_tradeflows_without_preload_content(
|
|
178
|
+
self,
|
|
179
|
+
downstream_tradeflow: List[DownstreamTradeflow],
|
|
180
|
+
_request_timeout: Union[
|
|
181
|
+
None,
|
|
182
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
183
|
+
Tuple[
|
|
184
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
185
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
186
|
+
]
|
|
187
|
+
] = None,
|
|
188
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
189
|
+
_content_type: Optional[StrictStr] = None,
|
|
190
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
191
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
192
|
+
) -> RESTResponseType:
|
|
193
|
+
"""Upsert tradeflows
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
:param downstream_tradeflow: (required)
|
|
197
|
+
:type downstream_tradeflow: List[DownstreamTradeflow]
|
|
198
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
199
|
+
number provided, it will be total request
|
|
200
|
+
timeout. It can also be a pair (tuple) of
|
|
201
|
+
(connection, read) timeouts.
|
|
202
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
203
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
204
|
+
request; this effectively ignores the
|
|
205
|
+
authentication in the spec for a single request.
|
|
206
|
+
:type _request_auth: dict, optional
|
|
207
|
+
:param _content_type: force content-type for the request.
|
|
208
|
+
:type _content_type: str, Optional
|
|
209
|
+
:param _headers: set to override the headers for a single
|
|
210
|
+
request; this effectively ignores the headers
|
|
211
|
+
in the spec for a single request.
|
|
212
|
+
:type _headers: dict, optional
|
|
213
|
+
:param _host_index: set to override the host_index for a single
|
|
214
|
+
request; this effectively ignores the host_index
|
|
215
|
+
in the spec for a single request.
|
|
216
|
+
:type _host_index: int, optional
|
|
217
|
+
:return: Returns the result object.
|
|
218
|
+
""" # noqa: E501
|
|
219
|
+
|
|
220
|
+
_param = self._create_tradeflows_serialize(
|
|
221
|
+
downstream_tradeflow=downstream_tradeflow,
|
|
222
|
+
_request_auth=_request_auth,
|
|
223
|
+
_content_type=_content_type,
|
|
224
|
+
_headers=_headers,
|
|
225
|
+
_host_index=_host_index
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
229
|
+
'202': "CreateTradeflows202Response",
|
|
230
|
+
'400': "str",
|
|
231
|
+
}
|
|
232
|
+
response_data = self.api_client.call_api(
|
|
233
|
+
*_param,
|
|
234
|
+
_request_timeout=_request_timeout
|
|
235
|
+
)
|
|
236
|
+
return response_data.response
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
def _create_tradeflows_serialize(
|
|
240
|
+
self,
|
|
241
|
+
downstream_tradeflow,
|
|
242
|
+
_request_auth,
|
|
243
|
+
_content_type,
|
|
244
|
+
_headers,
|
|
245
|
+
_host_index,
|
|
246
|
+
) -> RequestSerialized:
|
|
247
|
+
|
|
248
|
+
_host = None
|
|
249
|
+
|
|
250
|
+
_collection_formats: Dict[str, str] = {
|
|
251
|
+
'DownstreamTradeflow': '',
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
_path_params: Dict[str, str] = {}
|
|
255
|
+
_query_params: List[Tuple[str, str]] = []
|
|
256
|
+
_header_params: Dict[str, Any] = self.api_client._merge_headers(_headers)
|
|
257
|
+
_form_params: List[Tuple[str, str]] = []
|
|
258
|
+
_files: Dict[
|
|
259
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
260
|
+
] = {}
|
|
261
|
+
_body_params: Optional[bytes] = None
|
|
262
|
+
|
|
263
|
+
# process the path parameters
|
|
264
|
+
# process the query parameters
|
|
265
|
+
# process the header parameters
|
|
266
|
+
# process the form parameters
|
|
267
|
+
# process the body parameter
|
|
268
|
+
if downstream_tradeflow is not None:
|
|
269
|
+
_body_params = downstream_tradeflow
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
# set the HTTP header `Accept`
|
|
273
|
+
if not any(key.lower() == 'accept' for key in _header_params):
|
|
274
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
275
|
+
[
|
|
276
|
+
'application/json'
|
|
277
|
+
]
|
|
278
|
+
)
|
|
279
|
+
|
|
280
|
+
# set the HTTP header `Content-Type`
|
|
281
|
+
if _content_type:
|
|
282
|
+
self.api_client._set_header(_header_params, 'Content-Type', _content_type)
|
|
283
|
+
else:
|
|
284
|
+
_default_content_type = (
|
|
285
|
+
self.api_client.select_header_content_type(
|
|
286
|
+
[
|
|
287
|
+
'application/json'
|
|
288
|
+
]
|
|
289
|
+
)
|
|
290
|
+
)
|
|
291
|
+
if _default_content_type is not None:
|
|
292
|
+
self.api_client._set_header(_header_params, 'Content-Type', _default_content_type)
|
|
293
|
+
|
|
294
|
+
# authentication setting
|
|
295
|
+
_auth_settings: List[str] = [
|
|
296
|
+
'ApiKey'
|
|
297
|
+
]
|
|
298
|
+
|
|
299
|
+
return self.api_client.param_serialize(
|
|
300
|
+
method='POST',
|
|
301
|
+
resource_path='/v3/downstream/tradeflows',
|
|
302
|
+
path_params=_path_params,
|
|
303
|
+
query_params=_query_params,
|
|
304
|
+
header_params=_header_params,
|
|
305
|
+
body=_body_params,
|
|
306
|
+
post_params=_form_params,
|
|
307
|
+
files=_files,
|
|
308
|
+
auth_settings=_auth_settings,
|
|
309
|
+
collection_formats=_collection_formats,
|
|
310
|
+
_host=_host,
|
|
311
|
+
_request_auth=_request_auth
|
|
312
|
+
)
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
@validate_call
|
|
318
|
+
def delete_tradeflow(
|
|
319
|
+
self,
|
|
320
|
+
tradeflow_reference: StrictStr,
|
|
321
|
+
confirm: Optional[StrictStr] = None,
|
|
322
|
+
hard: Annotated[Optional[StrictBool], Field(description="true deletes the tradeflow permanently. Default: it is deactivated.")] = None,
|
|
323
|
+
_request_timeout: Union[
|
|
324
|
+
None,
|
|
325
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
326
|
+
Tuple[
|
|
327
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
328
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
329
|
+
]
|
|
330
|
+
] = None,
|
|
331
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
332
|
+
_content_type: Optional[StrictStr] = None,
|
|
333
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
334
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
335
|
+
) -> str:
|
|
336
|
+
"""Delete a tradeflow
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
:param tradeflow_reference: (required)
|
|
340
|
+
:type tradeflow_reference: str
|
|
341
|
+
:param confirm:
|
|
342
|
+
:type confirm: str
|
|
343
|
+
:param hard: true deletes the tradeflow permanently. Default: it is deactivated.
|
|
344
|
+
:type hard: bool
|
|
345
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
346
|
+
number provided, it will be total request
|
|
347
|
+
timeout. It can also be a pair (tuple) of
|
|
348
|
+
(connection, read) timeouts.
|
|
349
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
350
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
351
|
+
request; this effectively ignores the
|
|
352
|
+
authentication in the spec for a single request.
|
|
353
|
+
:type _request_auth: dict, optional
|
|
354
|
+
:param _content_type: force content-type for the request.
|
|
355
|
+
:type _content_type: str, Optional
|
|
356
|
+
:param _headers: set to override the headers for a single
|
|
357
|
+
request; this effectively ignores the headers
|
|
358
|
+
in the spec for a single request.
|
|
359
|
+
:type _headers: dict, optional
|
|
360
|
+
:param _host_index: set to override the host_index for a single
|
|
361
|
+
request; this effectively ignores the host_index
|
|
362
|
+
in the spec for a single request.
|
|
363
|
+
:type _host_index: int, optional
|
|
364
|
+
:return: Returns the result object.
|
|
365
|
+
""" # noqa: E501
|
|
366
|
+
|
|
367
|
+
_param = self._delete_tradeflow_serialize(
|
|
368
|
+
tradeflow_reference=tradeflow_reference,
|
|
369
|
+
confirm=confirm,
|
|
370
|
+
hard=hard,
|
|
371
|
+
_request_auth=_request_auth,
|
|
372
|
+
_content_type=_content_type,
|
|
373
|
+
_headers=_headers,
|
|
374
|
+
_host_index=_host_index
|
|
375
|
+
)
|
|
376
|
+
|
|
377
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
378
|
+
'500': "str",
|
|
379
|
+
'204': "str",
|
|
380
|
+
'404': "str",
|
|
381
|
+
'400': "str",
|
|
382
|
+
}
|
|
383
|
+
response_data = self.api_client.call_api(
|
|
384
|
+
*_param,
|
|
385
|
+
_request_timeout=_request_timeout
|
|
386
|
+
)
|
|
387
|
+
response_data.read()
|
|
388
|
+
return self.api_client.response_deserialize(
|
|
389
|
+
response_data=response_data,
|
|
390
|
+
response_types_map=_response_types_map,
|
|
391
|
+
).data
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
@validate_call
|
|
395
|
+
def delete_tradeflow_with_http_info(
|
|
396
|
+
self,
|
|
397
|
+
tradeflow_reference: StrictStr,
|
|
398
|
+
confirm: Optional[StrictStr] = None,
|
|
399
|
+
hard: Annotated[Optional[StrictBool], Field(description="true deletes the tradeflow permanently. Default: it is deactivated.")] = None,
|
|
400
|
+
_request_timeout: Union[
|
|
401
|
+
None,
|
|
402
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
403
|
+
Tuple[
|
|
404
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
405
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
406
|
+
]
|
|
407
|
+
] = None,
|
|
408
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
409
|
+
_content_type: Optional[StrictStr] = None,
|
|
410
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
411
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
412
|
+
) -> ApiResponse[str]:
|
|
413
|
+
"""Delete a tradeflow
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
:param tradeflow_reference: (required)
|
|
417
|
+
:type tradeflow_reference: str
|
|
418
|
+
:param confirm:
|
|
419
|
+
:type confirm: str
|
|
420
|
+
:param hard: true deletes the tradeflow permanently. Default: it is deactivated.
|
|
421
|
+
:type hard: bool
|
|
422
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
423
|
+
number provided, it will be total request
|
|
424
|
+
timeout. It can also be a pair (tuple) of
|
|
425
|
+
(connection, read) timeouts.
|
|
426
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
427
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
428
|
+
request; this effectively ignores the
|
|
429
|
+
authentication in the spec for a single request.
|
|
430
|
+
:type _request_auth: dict, optional
|
|
431
|
+
:param _content_type: force content-type for the request.
|
|
432
|
+
:type _content_type: str, Optional
|
|
433
|
+
:param _headers: set to override the headers for a single
|
|
434
|
+
request; this effectively ignores the headers
|
|
435
|
+
in the spec for a single request.
|
|
436
|
+
:type _headers: dict, optional
|
|
437
|
+
:param _host_index: set to override the host_index for a single
|
|
438
|
+
request; this effectively ignores the host_index
|
|
439
|
+
in the spec for a single request.
|
|
440
|
+
:type _host_index: int, optional
|
|
441
|
+
:return: Returns the result object.
|
|
442
|
+
""" # noqa: E501
|
|
443
|
+
|
|
444
|
+
_param = self._delete_tradeflow_serialize(
|
|
445
|
+
tradeflow_reference=tradeflow_reference,
|
|
446
|
+
confirm=confirm,
|
|
447
|
+
hard=hard,
|
|
448
|
+
_request_auth=_request_auth,
|
|
449
|
+
_content_type=_content_type,
|
|
450
|
+
_headers=_headers,
|
|
451
|
+
_host_index=_host_index
|
|
452
|
+
)
|
|
453
|
+
|
|
454
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
455
|
+
'500': "str",
|
|
456
|
+
'204': "str",
|
|
457
|
+
'404': "str",
|
|
458
|
+
'400': "str",
|
|
459
|
+
}
|
|
460
|
+
response_data = self.api_client.call_api(
|
|
461
|
+
*_param,
|
|
462
|
+
_request_timeout=_request_timeout
|
|
463
|
+
)
|
|
464
|
+
response_data.read()
|
|
465
|
+
return self.api_client.response_deserialize(
|
|
466
|
+
response_data=response_data,
|
|
467
|
+
response_types_map=_response_types_map,
|
|
468
|
+
)
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
@validate_call
|
|
472
|
+
def delete_tradeflow_without_preload_content(
|
|
473
|
+
self,
|
|
474
|
+
tradeflow_reference: StrictStr,
|
|
475
|
+
confirm: Optional[StrictStr] = None,
|
|
476
|
+
hard: Annotated[Optional[StrictBool], Field(description="true deletes the tradeflow permanently. Default: it is deactivated.")] = None,
|
|
477
|
+
_request_timeout: Union[
|
|
478
|
+
None,
|
|
479
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
480
|
+
Tuple[
|
|
481
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
482
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
483
|
+
]
|
|
484
|
+
] = None,
|
|
485
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
486
|
+
_content_type: Optional[StrictStr] = None,
|
|
487
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
488
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
489
|
+
) -> RESTResponseType:
|
|
490
|
+
"""Delete a tradeflow
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
:param tradeflow_reference: (required)
|
|
494
|
+
:type tradeflow_reference: str
|
|
495
|
+
:param confirm:
|
|
496
|
+
:type confirm: str
|
|
497
|
+
:param hard: true deletes the tradeflow permanently. Default: it is deactivated.
|
|
498
|
+
:type hard: bool
|
|
499
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
500
|
+
number provided, it will be total request
|
|
501
|
+
timeout. It can also be a pair (tuple) of
|
|
502
|
+
(connection, read) timeouts.
|
|
503
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
504
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
505
|
+
request; this effectively ignores the
|
|
506
|
+
authentication in the spec for a single request.
|
|
507
|
+
:type _request_auth: dict, optional
|
|
508
|
+
:param _content_type: force content-type for the request.
|
|
509
|
+
:type _content_type: str, Optional
|
|
510
|
+
:param _headers: set to override the headers for a single
|
|
511
|
+
request; this effectively ignores the headers
|
|
512
|
+
in the spec for a single request.
|
|
513
|
+
:type _headers: dict, optional
|
|
514
|
+
:param _host_index: set to override the host_index for a single
|
|
515
|
+
request; this effectively ignores the host_index
|
|
516
|
+
in the spec for a single request.
|
|
517
|
+
:type _host_index: int, optional
|
|
518
|
+
:return: Returns the result object.
|
|
519
|
+
""" # noqa: E501
|
|
520
|
+
|
|
521
|
+
_param = self._delete_tradeflow_serialize(
|
|
522
|
+
tradeflow_reference=tradeflow_reference,
|
|
523
|
+
confirm=confirm,
|
|
524
|
+
hard=hard,
|
|
525
|
+
_request_auth=_request_auth,
|
|
526
|
+
_content_type=_content_type,
|
|
527
|
+
_headers=_headers,
|
|
528
|
+
_host_index=_host_index
|
|
529
|
+
)
|
|
530
|
+
|
|
531
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
532
|
+
'500': "str",
|
|
533
|
+
'204': "str",
|
|
534
|
+
'404': "str",
|
|
535
|
+
'400': "str",
|
|
536
|
+
}
|
|
537
|
+
response_data = self.api_client.call_api(
|
|
538
|
+
*_param,
|
|
539
|
+
_request_timeout=_request_timeout
|
|
540
|
+
)
|
|
541
|
+
return response_data.response
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
def _delete_tradeflow_serialize(
|
|
545
|
+
self,
|
|
546
|
+
tradeflow_reference,
|
|
547
|
+
confirm,
|
|
548
|
+
hard,
|
|
549
|
+
_request_auth,
|
|
550
|
+
_content_type,
|
|
551
|
+
_headers,
|
|
552
|
+
_host_index,
|
|
553
|
+
) -> RequestSerialized:
|
|
554
|
+
|
|
555
|
+
_host = None
|
|
556
|
+
|
|
557
|
+
_collection_formats: Dict[str, str] = {
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
_path_params: Dict[str, str] = {}
|
|
561
|
+
_query_params: List[Tuple[str, str]] = []
|
|
562
|
+
_header_params: Dict[str, Any] = self.api_client._merge_headers(_headers)
|
|
563
|
+
_form_params: List[Tuple[str, str]] = []
|
|
564
|
+
_files: Dict[
|
|
565
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
566
|
+
] = {}
|
|
567
|
+
_body_params: Optional[bytes] = None
|
|
568
|
+
|
|
569
|
+
# process the path parameters
|
|
570
|
+
if tradeflow_reference is not None:
|
|
571
|
+
_path_params['tradeflow_reference'] = tradeflow_reference
|
|
572
|
+
# process the query parameters
|
|
573
|
+
if confirm is not None:
|
|
574
|
+
|
|
575
|
+
_query_params.append(('confirm', confirm))
|
|
576
|
+
|
|
577
|
+
if hard is not None:
|
|
578
|
+
|
|
579
|
+
_query_params.append(('hard', hard))
|
|
580
|
+
|
|
581
|
+
# process the header parameters
|
|
582
|
+
# process the form parameters
|
|
583
|
+
# process the body parameter
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
# set the HTTP header `Accept`
|
|
587
|
+
if not any(key.lower() == 'accept' for key in _header_params):
|
|
588
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
589
|
+
[
|
|
590
|
+
'application/json'
|
|
591
|
+
]
|
|
592
|
+
)
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
# authentication setting
|
|
596
|
+
_auth_settings: List[str] = [
|
|
597
|
+
'ApiKey'
|
|
598
|
+
]
|
|
599
|
+
|
|
600
|
+
return self.api_client.param_serialize(
|
|
601
|
+
method='DELETE',
|
|
602
|
+
resource_path='/v3/downstream/tradeflows/{tradeflow_reference}',
|
|
603
|
+
path_params=_path_params,
|
|
604
|
+
query_params=_query_params,
|
|
605
|
+
header_params=_header_params,
|
|
606
|
+
body=_body_params,
|
|
607
|
+
post_params=_form_params,
|
|
608
|
+
files=_files,
|
|
609
|
+
auth_settings=_auth_settings,
|
|
610
|
+
collection_formats=_collection_formats,
|
|
611
|
+
_host=_host,
|
|
612
|
+
_request_auth=_request_auth
|
|
613
|
+
)
|
|
614
|
+
|
|
615
|
+
|