rxfoundry.clients.swifty-oauth-api 0.0.621__py3-none-any.whl → 1.0.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.
Files changed (116) hide show
  1. {rxfoundry_clients_swifty_oauth_api-0.0.621.dist-info → rxfoundry_clients_swifty_oauth_api-1.0.0.dist-info}/METADATA +1 -1
  2. rxfoundry_clients_swifty_oauth_api-1.0.0.dist-info/RECORD +19 -0
  3. rxfoundry/clients/p2rx_api/__init__.py +0 -79
  4. rxfoundry/clients/p2rx_api/api/__init__.py +0 -17
  5. rxfoundry/clients/p2rx_api/api/async_api.py +0 -862
  6. rxfoundry/clients/p2rx_api/api/code_api.py +0 -337
  7. rxfoundry/clients/p2rx_api/api/fax_api.py +0 -632
  8. rxfoundry/clients/p2rx_api/api/medication_api.py +0 -666
  9. rxfoundry/clients/p2rx_api/api/patient_api.py +0 -981
  10. rxfoundry/clients/p2rx_api/api/pharmacist_api.py +0 -615
  11. rxfoundry/clients/p2rx_api/api/pharmacy_api.py +0 -684
  12. rxfoundry/clients/p2rx_api/api/prescriber_api.py +0 -615
  13. rxfoundry/clients/p2rx_api/api/prescription_api.py +0 -1864
  14. rxfoundry/clients/p2rx_api/api/token_api.py +0 -314
  15. rxfoundry/clients/p2rx_api/api/user_api.py +0 -306
  16. rxfoundry/clients/p2rx_api/api/version_api.py +0 -282
  17. rxfoundry/clients/p2rx_api/api/virtual_pharmacy_api.py +0 -284
  18. rxfoundry/clients/p2rx_api/api_client.py +0 -798
  19. rxfoundry/clients/p2rx_api/api_response.py +0 -21
  20. rxfoundry/clients/p2rx_api/configuration.py +0 -583
  21. rxfoundry/clients/p2rx_api/exceptions.py +0 -217
  22. rxfoundry/clients/p2rx_api/models/__init__.py +0 -50
  23. rxfoundry/clients/p2rx_api/models/address.py +0 -106
  24. rxfoundry/clients/p2rx_api/models/asynchronous_response.py +0 -90
  25. rxfoundry/clients/p2rx_api/models/code.py +0 -92
  26. rxfoundry/clients/p2rx_api/models/code_qualifier_code.py +0 -96
  27. rxfoundry/clients/p2rx_api/models/error_message.py +0 -90
  28. rxfoundry/clients/p2rx_api/models/fax.py +0 -141
  29. rxfoundry/clients/p2rx_api/models/medication.py +0 -137
  30. rxfoundry/clients/p2rx_api/models/medication_program_pricing.py +0 -99
  31. rxfoundry/clients/p2rx_api/models/medication_variant.py +0 -96
  32. rxfoundry/clients/p2rx_api/models/patient.py +0 -128
  33. rxfoundry/clients/p2rx_api/models/patient_activity_notification.py +0 -114
  34. rxfoundry/clients/p2rx_api/models/patient_external_identifier.py +0 -94
  35. rxfoundry/clients/p2rx_api/models/pharmacist.py +0 -104
  36. rxfoundry/clients/p2rx_api/models/pharmacy.py +0 -156
  37. rxfoundry/clients/p2rx_api/models/pharmacy_chain.py +0 -100
  38. rxfoundry/clients/p2rx_api/models/pharmacy_other_identifier.py +0 -98
  39. rxfoundry/clients/p2rx_api/models/pharmacy_program_pricing.py +0 -103
  40. rxfoundry/clients/p2rx_api/models/prescriber.py +0 -106
  41. rxfoundry/clients/p2rx_api/models/prescription.py +0 -278
  42. rxfoundry/clients/p2rx_api/models/prescription_change_request.py +0 -123
  43. rxfoundry/clients/p2rx_api/models/prescription_issue.py +0 -120
  44. rxfoundry/clients/p2rx_api/models/prescription_patch.py +0 -113
  45. rxfoundry/clients/p2rx_api/models/prescription_task.py +0 -130
  46. rxfoundry/clients/p2rx_api/models/prescription_task_status.py +0 -95
  47. rxfoundry/clients/p2rx_api/models/prescription_transfer_request.py +0 -93
  48. rxfoundry/clients/p2rx_api/models/prescription_verification.py +0 -107
  49. rxfoundry/clients/p2rx_api/models/pricing_program.py +0 -90
  50. rxfoundry/clients/p2rx_api/models/surescripts_message.py +0 -111
  51. rxfoundry/clients/p2rx_api/models/token.py +0 -92
  52. rxfoundry/clients/p2rx_api/models/user.py +0 -98
  53. rxfoundry/clients/p2rx_api/models/version.py +0 -88
  54. rxfoundry/clients/p2rx_api/models/virtual_pharmacy.py +0 -96
  55. rxfoundry/clients/p2rx_api/models/workflow_request.py +0 -90
  56. rxfoundry/clients/p2rx_api/py.typed +0 -0
  57. rxfoundry/clients/p2rx_api/rest.py +0 -259
  58. rxfoundry/clients/swifty_api/__init__.py +0 -79
  59. rxfoundry/clients/swifty_api/api/__init__.py +0 -17
  60. rxfoundry/clients/swifty_api/api/async_api.py +0 -862
  61. rxfoundry/clients/swifty_api/api/code_api.py +0 -337
  62. rxfoundry/clients/swifty_api/api/fax_api.py +0 -632
  63. rxfoundry/clients/swifty_api/api/medication_api.py +0 -666
  64. rxfoundry/clients/swifty_api/api/patient_api.py +0 -981
  65. rxfoundry/clients/swifty_api/api/pharmacist_api.py +0 -615
  66. rxfoundry/clients/swifty_api/api/pharmacy_api.py +0 -684
  67. rxfoundry/clients/swifty_api/api/prescriber_api.py +0 -615
  68. rxfoundry/clients/swifty_api/api/prescription_api.py +0 -1864
  69. rxfoundry/clients/swifty_api/api/token_api.py +0 -314
  70. rxfoundry/clients/swifty_api/api/user_api.py +0 -306
  71. rxfoundry/clients/swifty_api/api/version_api.py +0 -282
  72. rxfoundry/clients/swifty_api/api/virtual_pharmacy_api.py +0 -284
  73. rxfoundry/clients/swifty_api/api_client.py +0 -798
  74. rxfoundry/clients/swifty_api/api_response.py +0 -21
  75. rxfoundry/clients/swifty_api/configuration.py +0 -583
  76. rxfoundry/clients/swifty_api/exceptions.py +0 -217
  77. rxfoundry/clients/swifty_api/models/__init__.py +0 -50
  78. rxfoundry/clients/swifty_api/models/address.py +0 -106
  79. rxfoundry/clients/swifty_api/models/asynchronous_response.py +0 -90
  80. rxfoundry/clients/swifty_api/models/code.py +0 -92
  81. rxfoundry/clients/swifty_api/models/code_qualifier_code.py +0 -96
  82. rxfoundry/clients/swifty_api/models/error_message.py +0 -90
  83. rxfoundry/clients/swifty_api/models/fax.py +0 -141
  84. rxfoundry/clients/swifty_api/models/medication.py +0 -137
  85. rxfoundry/clients/swifty_api/models/medication_program_pricing.py +0 -99
  86. rxfoundry/clients/swifty_api/models/medication_variant.py +0 -96
  87. rxfoundry/clients/swifty_api/models/patient.py +0 -128
  88. rxfoundry/clients/swifty_api/models/patient_activity_notification.py +0 -114
  89. rxfoundry/clients/swifty_api/models/patient_external_identifier.py +0 -94
  90. rxfoundry/clients/swifty_api/models/pharmacist.py +0 -104
  91. rxfoundry/clients/swifty_api/models/pharmacy.py +0 -156
  92. rxfoundry/clients/swifty_api/models/pharmacy_chain.py +0 -100
  93. rxfoundry/clients/swifty_api/models/pharmacy_other_identifier.py +0 -98
  94. rxfoundry/clients/swifty_api/models/pharmacy_program_pricing.py +0 -103
  95. rxfoundry/clients/swifty_api/models/prescriber.py +0 -106
  96. rxfoundry/clients/swifty_api/models/prescription.py +0 -278
  97. rxfoundry/clients/swifty_api/models/prescription_change_request.py +0 -123
  98. rxfoundry/clients/swifty_api/models/prescription_issue.py +0 -120
  99. rxfoundry/clients/swifty_api/models/prescription_patch.py +0 -113
  100. rxfoundry/clients/swifty_api/models/prescription_task.py +0 -130
  101. rxfoundry/clients/swifty_api/models/prescription_task_status.py +0 -95
  102. rxfoundry/clients/swifty_api/models/prescription_transfer_request.py +0 -93
  103. rxfoundry/clients/swifty_api/models/prescription_verification.py +0 -107
  104. rxfoundry/clients/swifty_api/models/pricing_program.py +0 -90
  105. rxfoundry/clients/swifty_api/models/surescripts_message.py +0 -111
  106. rxfoundry/clients/swifty_api/models/token.py +0 -92
  107. rxfoundry/clients/swifty_api/models/user.py +0 -98
  108. rxfoundry/clients/swifty_api/models/version.py +0 -88
  109. rxfoundry/clients/swifty_api/models/virtual_pharmacy.py +0 -98
  110. rxfoundry/clients/swifty_api/models/workflow_request.py +0 -90
  111. rxfoundry/clients/swifty_api/py.typed +0 -0
  112. rxfoundry/clients/swifty_api/rest.py +0 -259
  113. rxfoundry/clients/swifty_oauth_api/models/token_post_request.py +0 -94
  114. rxfoundry_clients_swifty_oauth_api-0.0.621.dist-info/RECORD +0 -130
  115. {rxfoundry_clients_swifty_oauth_api-0.0.621.dist-info → rxfoundry_clients_swifty_oauth_api-1.0.0.dist-info}/WHEEL +0 -0
  116. {rxfoundry_clients_swifty_oauth_api-0.0.621.dist-info → rxfoundry_clients_swifty_oauth_api-1.0.0.dist-info}/top_level.txt +0 -0
@@ -1,862 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- P2RX API
5
-
6
- API for the P2RX Backend
7
-
8
- The version of the OpenAPI document: 0.1.DEV-0
9
- Contact: paul.tindall@rxfoundry.com
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
11
-
12
- Do not edit the class manually.
13
- """ # noqa: E501
14
-
15
- import warnings
16
- from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
- from typing import Any, Dict, List, Optional, Tuple, Union
18
- from typing_extensions import Annotated
19
-
20
- from rxfoundry.clients.swifty_api.models.asynchronous_response import AsynchronousResponse
21
- from rxfoundry.clients.swifty_api.models.patient_activity_notification import PatientActivityNotification
22
- from rxfoundry.clients.swifty_api.models.prescription_transfer_request import PrescriptionTransferRequest
23
- from rxfoundry.clients.swifty_api.models.workflow_request import WorkflowRequest
24
-
25
- from rxfoundry.clients.swifty_api.api_client import ApiClient, RequestSerialized
26
- from rxfoundry.clients.swifty_api.api_response import ApiResponse
27
- from rxfoundry.clients.swifty_api.rest import RESTResponseType
28
-
29
-
30
- class AsyncApi:
31
- """NOTE: This class is auto generated by OpenAPI Generator
32
- Ref: https://openapi-generator.tech
33
-
34
- Do not edit the class manually.
35
- """
36
-
37
- def __init__(self, api_client=None) -> None:
38
- if api_client is None:
39
- api_client = ApiClient.get_default()
40
- self.api_client = api_client
41
-
42
-
43
- @validate_call
44
- def create_patient_activity(
45
- self,
46
- patient_activity_notification: PatientActivityNotification,
47
- _request_timeout: Union[
48
- None,
49
- Annotated[StrictFloat, Field(gt=0)],
50
- Tuple[
51
- Annotated[StrictFloat, Field(gt=0)],
52
- Annotated[StrictFloat, Field(gt=0)]
53
- ]
54
- ] = None,
55
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
56
- _content_type: Optional[StrictStr] = None,
57
- _headers: Optional[Dict[StrictStr, Any]] = None,
58
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
59
- ) -> AsynchronousResponse:
60
- """Notify of an external patient activity
61
-
62
-
63
- :param patient_activity_notification: (required)
64
- :type patient_activity_notification: PatientActivityNotification
65
- :param _request_timeout: timeout setting for this request. If one
66
- number provided, it will be total request
67
- timeout. It can also be a pair (tuple) of
68
- (connection, read) timeouts.
69
- :type _request_timeout: int, tuple(int, int), optional
70
- :param _request_auth: set to override the auth_settings for an a single
71
- request; this effectively ignores the
72
- authentication in the spec for a single request.
73
- :type _request_auth: dict, optional
74
- :param _content_type: force content-type for the request.
75
- :type _content_type: str, Optional
76
- :param _headers: set to override the headers for a single
77
- request; this effectively ignores the headers
78
- in the spec for a single request.
79
- :type _headers: dict, optional
80
- :param _host_index: set to override the host_index for a single
81
- request; this effectively ignores the host_index
82
- in the spec for a single request.
83
- :type _host_index: int, optional
84
- :return: Returns the result object.
85
- """ # noqa: E501
86
-
87
- _param = self._create_patient_activity_serialize(
88
- patient_activity_notification=patient_activity_notification,
89
- _request_auth=_request_auth,
90
- _content_type=_content_type,
91
- _headers=_headers,
92
- _host_index=_host_index
93
- )
94
-
95
- _response_types_map: Dict[str, Optional[str]] = {
96
- '201': "AsynchronousResponse",
97
- '400': None,
98
- }
99
- response_data = self.api_client.call_api(
100
- *_param,
101
- _request_timeout=_request_timeout
102
- )
103
- response_data.read()
104
- return self.api_client.response_deserialize(
105
- response_data=response_data,
106
- response_types_map=_response_types_map,
107
- ).data
108
-
109
-
110
- @validate_call
111
- def create_patient_activity_with_http_info(
112
- self,
113
- patient_activity_notification: PatientActivityNotification,
114
- _request_timeout: Union[
115
- None,
116
- Annotated[StrictFloat, Field(gt=0)],
117
- Tuple[
118
- Annotated[StrictFloat, Field(gt=0)],
119
- Annotated[StrictFloat, Field(gt=0)]
120
- ]
121
- ] = None,
122
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
123
- _content_type: Optional[StrictStr] = None,
124
- _headers: Optional[Dict[StrictStr, Any]] = None,
125
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
126
- ) -> ApiResponse[AsynchronousResponse]:
127
- """Notify of an external patient activity
128
-
129
-
130
- :param patient_activity_notification: (required)
131
- :type patient_activity_notification: PatientActivityNotification
132
- :param _request_timeout: timeout setting for this request. If one
133
- number provided, it will be total request
134
- timeout. It can also be a pair (tuple) of
135
- (connection, read) timeouts.
136
- :type _request_timeout: int, tuple(int, int), optional
137
- :param _request_auth: set to override the auth_settings for an a single
138
- request; this effectively ignores the
139
- authentication in the spec for a single request.
140
- :type _request_auth: dict, optional
141
- :param _content_type: force content-type for the request.
142
- :type _content_type: str, Optional
143
- :param _headers: set to override the headers for a single
144
- request; this effectively ignores the headers
145
- in the spec for a single request.
146
- :type _headers: dict, optional
147
- :param _host_index: set to override the host_index for a single
148
- request; this effectively ignores the host_index
149
- in the spec for a single request.
150
- :type _host_index: int, optional
151
- :return: Returns the result object.
152
- """ # noqa: E501
153
-
154
- _param = self._create_patient_activity_serialize(
155
- patient_activity_notification=patient_activity_notification,
156
- _request_auth=_request_auth,
157
- _content_type=_content_type,
158
- _headers=_headers,
159
- _host_index=_host_index
160
- )
161
-
162
- _response_types_map: Dict[str, Optional[str]] = {
163
- '201': "AsynchronousResponse",
164
- '400': None,
165
- }
166
- response_data = self.api_client.call_api(
167
- *_param,
168
- _request_timeout=_request_timeout
169
- )
170
- response_data.read()
171
- return self.api_client.response_deserialize(
172
- response_data=response_data,
173
- response_types_map=_response_types_map,
174
- )
175
-
176
-
177
- @validate_call
178
- def create_patient_activity_without_preload_content(
179
- self,
180
- patient_activity_notification: PatientActivityNotification,
181
- _request_timeout: Union[
182
- None,
183
- Annotated[StrictFloat, Field(gt=0)],
184
- Tuple[
185
- Annotated[StrictFloat, Field(gt=0)],
186
- Annotated[StrictFloat, Field(gt=0)]
187
- ]
188
- ] = None,
189
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
190
- _content_type: Optional[StrictStr] = None,
191
- _headers: Optional[Dict[StrictStr, Any]] = None,
192
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
193
- ) -> RESTResponseType:
194
- """Notify of an external patient activity
195
-
196
-
197
- :param patient_activity_notification: (required)
198
- :type patient_activity_notification: PatientActivityNotification
199
- :param _request_timeout: timeout setting for this request. If one
200
- number provided, it will be total request
201
- timeout. It can also be a pair (tuple) of
202
- (connection, read) timeouts.
203
- :type _request_timeout: int, tuple(int, int), optional
204
- :param _request_auth: set to override the auth_settings for an a single
205
- request; this effectively ignores the
206
- authentication in the spec for a single request.
207
- :type _request_auth: dict, optional
208
- :param _content_type: force content-type for the request.
209
- :type _content_type: str, Optional
210
- :param _headers: set to override the headers for a single
211
- request; this effectively ignores the headers
212
- in the spec for a single request.
213
- :type _headers: dict, optional
214
- :param _host_index: set to override the host_index for a single
215
- request; this effectively ignores the host_index
216
- in the spec for a single request.
217
- :type _host_index: int, optional
218
- :return: Returns the result object.
219
- """ # noqa: E501
220
-
221
- _param = self._create_patient_activity_serialize(
222
- patient_activity_notification=patient_activity_notification,
223
- _request_auth=_request_auth,
224
- _content_type=_content_type,
225
- _headers=_headers,
226
- _host_index=_host_index
227
- )
228
-
229
- _response_types_map: Dict[str, Optional[str]] = {
230
- '201': "AsynchronousResponse",
231
- '400': None,
232
- }
233
- response_data = self.api_client.call_api(
234
- *_param,
235
- _request_timeout=_request_timeout
236
- )
237
- return response_data.response
238
-
239
-
240
- def _create_patient_activity_serialize(
241
- self,
242
- patient_activity_notification,
243
- _request_auth,
244
- _content_type,
245
- _headers,
246
- _host_index,
247
- ) -> RequestSerialized:
248
-
249
- _host = None
250
-
251
- _collection_formats: Dict[str, str] = {
252
- }
253
-
254
- _path_params: Dict[str, str] = {}
255
- _query_params: List[Tuple[str, str]] = []
256
- _header_params: Dict[str, Optional[str]] = _headers or {}
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 patient_activity_notification is not None:
269
- _body_params = patient_activity_notification
270
-
271
-
272
- # set the HTTP header `Accept`
273
- if 'Accept' not 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
- _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
- _header_params['Content-Type'] = _default_content_type
293
-
294
- # authentication setting
295
- _auth_settings: List[str] = [
296
- 'opaque_token'
297
- ]
298
-
299
- return self.api_client.param_serialize(
300
- method='POST',
301
- resource_path='/p2rx/1/async/patient_activity',
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 create_prescription_transfer_request(
319
- self,
320
- prescription_transfer_request: PrescriptionTransferRequest,
321
- _request_timeout: Union[
322
- None,
323
- Annotated[StrictFloat, Field(gt=0)],
324
- Tuple[
325
- Annotated[StrictFloat, Field(gt=0)],
326
- Annotated[StrictFloat, Field(gt=0)]
327
- ]
328
- ] = None,
329
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
330
- _content_type: Optional[StrictStr] = None,
331
- _headers: Optional[Dict[StrictStr, Any]] = None,
332
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
333
- ) -> AsynchronousResponse:
334
- """Create a new prescription transfer request asynchronously
335
-
336
-
337
- :param prescription_transfer_request: (required)
338
- :type prescription_transfer_request: PrescriptionTransferRequest
339
- :param _request_timeout: timeout setting for this request. If one
340
- number provided, it will be total request
341
- timeout. It can also be a pair (tuple) of
342
- (connection, read) timeouts.
343
- :type _request_timeout: int, tuple(int, int), optional
344
- :param _request_auth: set to override the auth_settings for an a single
345
- request; this effectively ignores the
346
- authentication in the spec for a single request.
347
- :type _request_auth: dict, optional
348
- :param _content_type: force content-type for the request.
349
- :type _content_type: str, Optional
350
- :param _headers: set to override the headers for a single
351
- request; this effectively ignores the headers
352
- in the spec for a single request.
353
- :type _headers: dict, optional
354
- :param _host_index: set to override the host_index for a single
355
- request; this effectively ignores the host_index
356
- in the spec for a single request.
357
- :type _host_index: int, optional
358
- :return: Returns the result object.
359
- """ # noqa: E501
360
-
361
- _param = self._create_prescription_transfer_request_serialize(
362
- prescription_transfer_request=prescription_transfer_request,
363
- _request_auth=_request_auth,
364
- _content_type=_content_type,
365
- _headers=_headers,
366
- _host_index=_host_index
367
- )
368
-
369
- _response_types_map: Dict[str, Optional[str]] = {
370
- '201': "AsynchronousResponse",
371
- '400': None,
372
- }
373
- response_data = self.api_client.call_api(
374
- *_param,
375
- _request_timeout=_request_timeout
376
- )
377
- response_data.read()
378
- return self.api_client.response_deserialize(
379
- response_data=response_data,
380
- response_types_map=_response_types_map,
381
- ).data
382
-
383
-
384
- @validate_call
385
- def create_prescription_transfer_request_with_http_info(
386
- self,
387
- prescription_transfer_request: PrescriptionTransferRequest,
388
- _request_timeout: Union[
389
- None,
390
- Annotated[StrictFloat, Field(gt=0)],
391
- Tuple[
392
- Annotated[StrictFloat, Field(gt=0)],
393
- Annotated[StrictFloat, Field(gt=0)]
394
- ]
395
- ] = None,
396
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
397
- _content_type: Optional[StrictStr] = None,
398
- _headers: Optional[Dict[StrictStr, Any]] = None,
399
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
400
- ) -> ApiResponse[AsynchronousResponse]:
401
- """Create a new prescription transfer request asynchronously
402
-
403
-
404
- :param prescription_transfer_request: (required)
405
- :type prescription_transfer_request: PrescriptionTransferRequest
406
- :param _request_timeout: timeout setting for this request. If one
407
- number provided, it will be total request
408
- timeout. It can also be a pair (tuple) of
409
- (connection, read) timeouts.
410
- :type _request_timeout: int, tuple(int, int), optional
411
- :param _request_auth: set to override the auth_settings for an a single
412
- request; this effectively ignores the
413
- authentication in the spec for a single request.
414
- :type _request_auth: dict, optional
415
- :param _content_type: force content-type for the request.
416
- :type _content_type: str, Optional
417
- :param _headers: set to override the headers for a single
418
- request; this effectively ignores the headers
419
- in the spec for a single request.
420
- :type _headers: dict, optional
421
- :param _host_index: set to override the host_index for a single
422
- request; this effectively ignores the host_index
423
- in the spec for a single request.
424
- :type _host_index: int, optional
425
- :return: Returns the result object.
426
- """ # noqa: E501
427
-
428
- _param = self._create_prescription_transfer_request_serialize(
429
- prescription_transfer_request=prescription_transfer_request,
430
- _request_auth=_request_auth,
431
- _content_type=_content_type,
432
- _headers=_headers,
433
- _host_index=_host_index
434
- )
435
-
436
- _response_types_map: Dict[str, Optional[str]] = {
437
- '201': "AsynchronousResponse",
438
- '400': None,
439
- }
440
- response_data = self.api_client.call_api(
441
- *_param,
442
- _request_timeout=_request_timeout
443
- )
444
- response_data.read()
445
- return self.api_client.response_deserialize(
446
- response_data=response_data,
447
- response_types_map=_response_types_map,
448
- )
449
-
450
-
451
- @validate_call
452
- def create_prescription_transfer_request_without_preload_content(
453
- self,
454
- prescription_transfer_request: PrescriptionTransferRequest,
455
- _request_timeout: Union[
456
- None,
457
- Annotated[StrictFloat, Field(gt=0)],
458
- Tuple[
459
- Annotated[StrictFloat, Field(gt=0)],
460
- Annotated[StrictFloat, Field(gt=0)]
461
- ]
462
- ] = None,
463
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
464
- _content_type: Optional[StrictStr] = None,
465
- _headers: Optional[Dict[StrictStr, Any]] = None,
466
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
467
- ) -> RESTResponseType:
468
- """Create a new prescription transfer request asynchronously
469
-
470
-
471
- :param prescription_transfer_request: (required)
472
- :type prescription_transfer_request: PrescriptionTransferRequest
473
- :param _request_timeout: timeout setting for this request. If one
474
- number provided, it will be total request
475
- timeout. It can also be a pair (tuple) of
476
- (connection, read) timeouts.
477
- :type _request_timeout: int, tuple(int, int), optional
478
- :param _request_auth: set to override the auth_settings for an a single
479
- request; this effectively ignores the
480
- authentication in the spec for a single request.
481
- :type _request_auth: dict, optional
482
- :param _content_type: force content-type for the request.
483
- :type _content_type: str, Optional
484
- :param _headers: set to override the headers for a single
485
- request; this effectively ignores the headers
486
- in the spec for a single request.
487
- :type _headers: dict, optional
488
- :param _host_index: set to override the host_index for a single
489
- request; this effectively ignores the host_index
490
- in the spec for a single request.
491
- :type _host_index: int, optional
492
- :return: Returns the result object.
493
- """ # noqa: E501
494
-
495
- _param = self._create_prescription_transfer_request_serialize(
496
- prescription_transfer_request=prescription_transfer_request,
497
- _request_auth=_request_auth,
498
- _content_type=_content_type,
499
- _headers=_headers,
500
- _host_index=_host_index
501
- )
502
-
503
- _response_types_map: Dict[str, Optional[str]] = {
504
- '201': "AsynchronousResponse",
505
- '400': None,
506
- }
507
- response_data = self.api_client.call_api(
508
- *_param,
509
- _request_timeout=_request_timeout
510
- )
511
- return response_data.response
512
-
513
-
514
- def _create_prescription_transfer_request_serialize(
515
- self,
516
- prescription_transfer_request,
517
- _request_auth,
518
- _content_type,
519
- _headers,
520
- _host_index,
521
- ) -> RequestSerialized:
522
-
523
- _host = None
524
-
525
- _collection_formats: Dict[str, str] = {
526
- }
527
-
528
- _path_params: Dict[str, str] = {}
529
- _query_params: List[Tuple[str, str]] = []
530
- _header_params: Dict[str, Optional[str]] = _headers or {}
531
- _form_params: List[Tuple[str, str]] = []
532
- _files: Dict[
533
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
534
- ] = {}
535
- _body_params: Optional[bytes] = None
536
-
537
- # process the path parameters
538
- # process the query parameters
539
- # process the header parameters
540
- # process the form parameters
541
- # process the body parameter
542
- if prescription_transfer_request is not None:
543
- _body_params = prescription_transfer_request
544
-
545
-
546
- # set the HTTP header `Accept`
547
- if 'Accept' not in _header_params:
548
- _header_params['Accept'] = self.api_client.select_header_accept(
549
- [
550
- 'application/json'
551
- ]
552
- )
553
-
554
- # set the HTTP header `Content-Type`
555
- if _content_type:
556
- _header_params['Content-Type'] = _content_type
557
- else:
558
- _default_content_type = (
559
- self.api_client.select_header_content_type(
560
- [
561
- 'application/json'
562
- ]
563
- )
564
- )
565
- if _default_content_type is not None:
566
- _header_params['Content-Type'] = _default_content_type
567
-
568
- # authentication setting
569
- _auth_settings: List[str] = [
570
- 'opaque_token'
571
- ]
572
-
573
- return self.api_client.param_serialize(
574
- method='POST',
575
- resource_path='/p2rx/1/async/prescription/request_transfer',
576
- path_params=_path_params,
577
- query_params=_query_params,
578
- header_params=_header_params,
579
- body=_body_params,
580
- post_params=_form_params,
581
- files=_files,
582
- auth_settings=_auth_settings,
583
- collection_formats=_collection_formats,
584
- _host=_host,
585
- _request_auth=_request_auth
586
- )
587
-
588
-
589
-
590
-
591
- @validate_call
592
- def create_workflow_request(
593
- self,
594
- workflow_request: WorkflowRequest,
595
- _request_timeout: Union[
596
- None,
597
- Annotated[StrictFloat, Field(gt=0)],
598
- Tuple[
599
- Annotated[StrictFloat, Field(gt=0)],
600
- Annotated[StrictFloat, Field(gt=0)]
601
- ]
602
- ] = None,
603
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
604
- _content_type: Optional[StrictStr] = None,
605
- _headers: Optional[Dict[StrictStr, Any]] = None,
606
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
607
- ) -> AsynchronousResponse:
608
- """Create a new workflow request asynchronously
609
-
610
-
611
- :param workflow_request: (required)
612
- :type workflow_request: WorkflowRequest
613
- :param _request_timeout: timeout setting for this request. If one
614
- number provided, it will be total request
615
- timeout. It can also be a pair (tuple) of
616
- (connection, read) timeouts.
617
- :type _request_timeout: int, tuple(int, int), optional
618
- :param _request_auth: set to override the auth_settings for an a single
619
- request; this effectively ignores the
620
- authentication in the spec for a single request.
621
- :type _request_auth: dict, optional
622
- :param _content_type: force content-type for the request.
623
- :type _content_type: str, Optional
624
- :param _headers: set to override the headers for a single
625
- request; this effectively ignores the headers
626
- in the spec for a single request.
627
- :type _headers: dict, optional
628
- :param _host_index: set to override the host_index for a single
629
- request; this effectively ignores the host_index
630
- in the spec for a single request.
631
- :type _host_index: int, optional
632
- :return: Returns the result object.
633
- """ # noqa: E501
634
-
635
- _param = self._create_workflow_request_serialize(
636
- workflow_request=workflow_request,
637
- _request_auth=_request_auth,
638
- _content_type=_content_type,
639
- _headers=_headers,
640
- _host_index=_host_index
641
- )
642
-
643
- _response_types_map: Dict[str, Optional[str]] = {
644
- '201': "AsynchronousResponse",
645
- '400': None,
646
- }
647
- response_data = self.api_client.call_api(
648
- *_param,
649
- _request_timeout=_request_timeout
650
- )
651
- response_data.read()
652
- return self.api_client.response_deserialize(
653
- response_data=response_data,
654
- response_types_map=_response_types_map,
655
- ).data
656
-
657
-
658
- @validate_call
659
- def create_workflow_request_with_http_info(
660
- self,
661
- workflow_request: WorkflowRequest,
662
- _request_timeout: Union[
663
- None,
664
- Annotated[StrictFloat, Field(gt=0)],
665
- Tuple[
666
- Annotated[StrictFloat, Field(gt=0)],
667
- Annotated[StrictFloat, Field(gt=0)]
668
- ]
669
- ] = None,
670
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
671
- _content_type: Optional[StrictStr] = None,
672
- _headers: Optional[Dict[StrictStr, Any]] = None,
673
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
674
- ) -> ApiResponse[AsynchronousResponse]:
675
- """Create a new workflow request asynchronously
676
-
677
-
678
- :param workflow_request: (required)
679
- :type workflow_request: WorkflowRequest
680
- :param _request_timeout: timeout setting for this request. If one
681
- number provided, it will be total request
682
- timeout. It can also be a pair (tuple) of
683
- (connection, read) timeouts.
684
- :type _request_timeout: int, tuple(int, int), optional
685
- :param _request_auth: set to override the auth_settings for an a single
686
- request; this effectively ignores the
687
- authentication in the spec for a single request.
688
- :type _request_auth: dict, optional
689
- :param _content_type: force content-type for the request.
690
- :type _content_type: str, Optional
691
- :param _headers: set to override the headers for a single
692
- request; this effectively ignores the headers
693
- in the spec for a single request.
694
- :type _headers: dict, optional
695
- :param _host_index: set to override the host_index for a single
696
- request; this effectively ignores the host_index
697
- in the spec for a single request.
698
- :type _host_index: int, optional
699
- :return: Returns the result object.
700
- """ # noqa: E501
701
-
702
- _param = self._create_workflow_request_serialize(
703
- workflow_request=workflow_request,
704
- _request_auth=_request_auth,
705
- _content_type=_content_type,
706
- _headers=_headers,
707
- _host_index=_host_index
708
- )
709
-
710
- _response_types_map: Dict[str, Optional[str]] = {
711
- '201': "AsynchronousResponse",
712
- '400': None,
713
- }
714
- response_data = self.api_client.call_api(
715
- *_param,
716
- _request_timeout=_request_timeout
717
- )
718
- response_data.read()
719
- return self.api_client.response_deserialize(
720
- response_data=response_data,
721
- response_types_map=_response_types_map,
722
- )
723
-
724
-
725
- @validate_call
726
- def create_workflow_request_without_preload_content(
727
- self,
728
- workflow_request: WorkflowRequest,
729
- _request_timeout: Union[
730
- None,
731
- Annotated[StrictFloat, Field(gt=0)],
732
- Tuple[
733
- Annotated[StrictFloat, Field(gt=0)],
734
- Annotated[StrictFloat, Field(gt=0)]
735
- ]
736
- ] = None,
737
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
738
- _content_type: Optional[StrictStr] = None,
739
- _headers: Optional[Dict[StrictStr, Any]] = None,
740
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
741
- ) -> RESTResponseType:
742
- """Create a new workflow request asynchronously
743
-
744
-
745
- :param workflow_request: (required)
746
- :type workflow_request: WorkflowRequest
747
- :param _request_timeout: timeout setting for this request. If one
748
- number provided, it will be total request
749
- timeout. It can also be a pair (tuple) of
750
- (connection, read) timeouts.
751
- :type _request_timeout: int, tuple(int, int), optional
752
- :param _request_auth: set to override the auth_settings for an a single
753
- request; this effectively ignores the
754
- authentication in the spec for a single request.
755
- :type _request_auth: dict, optional
756
- :param _content_type: force content-type for the request.
757
- :type _content_type: str, Optional
758
- :param _headers: set to override the headers for a single
759
- request; this effectively ignores the headers
760
- in the spec for a single request.
761
- :type _headers: dict, optional
762
- :param _host_index: set to override the host_index for a single
763
- request; this effectively ignores the host_index
764
- in the spec for a single request.
765
- :type _host_index: int, optional
766
- :return: Returns the result object.
767
- """ # noqa: E501
768
-
769
- _param = self._create_workflow_request_serialize(
770
- workflow_request=workflow_request,
771
- _request_auth=_request_auth,
772
- _content_type=_content_type,
773
- _headers=_headers,
774
- _host_index=_host_index
775
- )
776
-
777
- _response_types_map: Dict[str, Optional[str]] = {
778
- '201': "AsynchronousResponse",
779
- '400': None,
780
- }
781
- response_data = self.api_client.call_api(
782
- *_param,
783
- _request_timeout=_request_timeout
784
- )
785
- return response_data.response
786
-
787
-
788
- def _create_workflow_request_serialize(
789
- self,
790
- workflow_request,
791
- _request_auth,
792
- _content_type,
793
- _headers,
794
- _host_index,
795
- ) -> RequestSerialized:
796
-
797
- _host = None
798
-
799
- _collection_formats: Dict[str, str] = {
800
- }
801
-
802
- _path_params: Dict[str, str] = {}
803
- _query_params: List[Tuple[str, str]] = []
804
- _header_params: Dict[str, Optional[str]] = _headers or {}
805
- _form_params: List[Tuple[str, str]] = []
806
- _files: Dict[
807
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
808
- ] = {}
809
- _body_params: Optional[bytes] = None
810
-
811
- # process the path parameters
812
- # process the query parameters
813
- # process the header parameters
814
- # process the form parameters
815
- # process the body parameter
816
- if workflow_request is not None:
817
- _body_params = workflow_request
818
-
819
-
820
- # set the HTTP header `Accept`
821
- if 'Accept' not in _header_params:
822
- _header_params['Accept'] = self.api_client.select_header_accept(
823
- [
824
- 'application/json'
825
- ]
826
- )
827
-
828
- # set the HTTP header `Content-Type`
829
- if _content_type:
830
- _header_params['Content-Type'] = _content_type
831
- else:
832
- _default_content_type = (
833
- self.api_client.select_header_content_type(
834
- [
835
- 'application/json'
836
- ]
837
- )
838
- )
839
- if _default_content_type is not None:
840
- _header_params['Content-Type'] = _default_content_type
841
-
842
- # authentication setting
843
- _auth_settings: List[str] = [
844
- 'opaque_token'
845
- ]
846
-
847
- return self.api_client.param_serialize(
848
- method='POST',
849
- resource_path='/p2rx/1/async/workflow/request',
850
- path_params=_path_params,
851
- query_params=_query_params,
852
- header_params=_header_params,
853
- body=_body_params,
854
- post_params=_form_params,
855
- files=_files,
856
- auth_settings=_auth_settings,
857
- collection_formats=_collection_formats,
858
- _host=_host,
859
- _request_auth=_request_auth
860
- )
861
-
862
-