rxfoundry.clients.swifty-oauth-api 0.0.620__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.620.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.620.dist-info/RECORD +0 -130
  115. {rxfoundry_clients_swifty_oauth_api-0.0.620.dist-info → rxfoundry_clients_swifty_oauth_api-1.0.0.dist-info}/WHEEL +0 -0
  116. {rxfoundry_clients_swifty_oauth_api-0.0.620.dist-info → rxfoundry_clients_swifty_oauth_api-1.0.0.dist-info}/top_level.txt +0 -0
@@ -1,666 +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 pydantic import Field, StrictBool, StrictInt, StrictStr
21
- from typing import List, Optional
22
- from typing_extensions import Annotated
23
- from rxfoundry.clients.swifty_api.models.medication import Medication
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 MedicationApi:
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 get_medication(
45
- self,
46
- medication_uuid: StrictStr,
47
- pricing_program: Optional[StrictStr] = None,
48
- deep: Optional[StrictBool] = None,
49
- _request_timeout: Union[
50
- None,
51
- Annotated[StrictFloat, Field(gt=0)],
52
- Tuple[
53
- Annotated[StrictFloat, Field(gt=0)],
54
- Annotated[StrictFloat, Field(gt=0)]
55
- ]
56
- ] = None,
57
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
58
- _content_type: Optional[StrictStr] = None,
59
- _headers: Optional[Dict[StrictStr, Any]] = None,
60
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
61
- ) -> Medication:
62
- """Get a medication by UUID
63
-
64
-
65
- :param medication_uuid: (required)
66
- :type medication_uuid: str
67
- :param pricing_program:
68
- :type pricing_program: str
69
- :param deep:
70
- :type deep: bool
71
- :param _request_timeout: timeout setting for this request. If one
72
- number provided, it will be total request
73
- timeout. It can also be a pair (tuple) of
74
- (connection, read) timeouts.
75
- :type _request_timeout: int, tuple(int, int), optional
76
- :param _request_auth: set to override the auth_settings for an a single
77
- request; this effectively ignores the
78
- authentication in the spec for a single request.
79
- :type _request_auth: dict, optional
80
- :param _content_type: force content-type for the request.
81
- :type _content_type: str, Optional
82
- :param _headers: set to override the headers for a single
83
- request; this effectively ignores the headers
84
- in the spec for a single request.
85
- :type _headers: dict, optional
86
- :param _host_index: set to override the host_index for a single
87
- request; this effectively ignores the host_index
88
- in the spec for a single request.
89
- :type _host_index: int, optional
90
- :return: Returns the result object.
91
- """ # noqa: E501
92
-
93
- _param = self._get_medication_serialize(
94
- medication_uuid=medication_uuid,
95
- pricing_program=pricing_program,
96
- deep=deep,
97
- _request_auth=_request_auth,
98
- _content_type=_content_type,
99
- _headers=_headers,
100
- _host_index=_host_index
101
- )
102
-
103
- _response_types_map: Dict[str, Optional[str]] = {
104
- '200': "Medication",
105
- '404': None,
106
- }
107
- response_data = self.api_client.call_api(
108
- *_param,
109
- _request_timeout=_request_timeout
110
- )
111
- response_data.read()
112
- return self.api_client.response_deserialize(
113
- response_data=response_data,
114
- response_types_map=_response_types_map,
115
- ).data
116
-
117
-
118
- @validate_call
119
- def get_medication_with_http_info(
120
- self,
121
- medication_uuid: StrictStr,
122
- pricing_program: Optional[StrictStr] = None,
123
- deep: Optional[StrictBool] = None,
124
- _request_timeout: Union[
125
- None,
126
- Annotated[StrictFloat, Field(gt=0)],
127
- Tuple[
128
- Annotated[StrictFloat, Field(gt=0)],
129
- Annotated[StrictFloat, Field(gt=0)]
130
- ]
131
- ] = None,
132
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
133
- _content_type: Optional[StrictStr] = None,
134
- _headers: Optional[Dict[StrictStr, Any]] = None,
135
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
136
- ) -> ApiResponse[Medication]:
137
- """Get a medication by UUID
138
-
139
-
140
- :param medication_uuid: (required)
141
- :type medication_uuid: str
142
- :param pricing_program:
143
- :type pricing_program: str
144
- :param deep:
145
- :type deep: bool
146
- :param _request_timeout: timeout setting for this request. If one
147
- number provided, it will be total request
148
- timeout. It can also be a pair (tuple) of
149
- (connection, read) timeouts.
150
- :type _request_timeout: int, tuple(int, int), optional
151
- :param _request_auth: set to override the auth_settings for an a single
152
- request; this effectively ignores the
153
- authentication in the spec for a single request.
154
- :type _request_auth: dict, optional
155
- :param _content_type: force content-type for the request.
156
- :type _content_type: str, Optional
157
- :param _headers: set to override the headers for a single
158
- request; this effectively ignores the headers
159
- in the spec for a single request.
160
- :type _headers: dict, optional
161
- :param _host_index: set to override the host_index for a single
162
- request; this effectively ignores the host_index
163
- in the spec for a single request.
164
- :type _host_index: int, optional
165
- :return: Returns the result object.
166
- """ # noqa: E501
167
-
168
- _param = self._get_medication_serialize(
169
- medication_uuid=medication_uuid,
170
- pricing_program=pricing_program,
171
- deep=deep,
172
- _request_auth=_request_auth,
173
- _content_type=_content_type,
174
- _headers=_headers,
175
- _host_index=_host_index
176
- )
177
-
178
- _response_types_map: Dict[str, Optional[str]] = {
179
- '200': "Medication",
180
- '404': None,
181
- }
182
- response_data = self.api_client.call_api(
183
- *_param,
184
- _request_timeout=_request_timeout
185
- )
186
- response_data.read()
187
- return self.api_client.response_deserialize(
188
- response_data=response_data,
189
- response_types_map=_response_types_map,
190
- )
191
-
192
-
193
- @validate_call
194
- def get_medication_without_preload_content(
195
- self,
196
- medication_uuid: StrictStr,
197
- pricing_program: Optional[StrictStr] = None,
198
- deep: Optional[StrictBool] = None,
199
- _request_timeout: Union[
200
- None,
201
- Annotated[StrictFloat, Field(gt=0)],
202
- Tuple[
203
- Annotated[StrictFloat, Field(gt=0)],
204
- Annotated[StrictFloat, Field(gt=0)]
205
- ]
206
- ] = None,
207
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
208
- _content_type: Optional[StrictStr] = None,
209
- _headers: Optional[Dict[StrictStr, Any]] = None,
210
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
211
- ) -> RESTResponseType:
212
- """Get a medication by UUID
213
-
214
-
215
- :param medication_uuid: (required)
216
- :type medication_uuid: str
217
- :param pricing_program:
218
- :type pricing_program: str
219
- :param deep:
220
- :type deep: bool
221
- :param _request_timeout: timeout setting for this request. If one
222
- number provided, it will be total request
223
- timeout. It can also be a pair (tuple) of
224
- (connection, read) timeouts.
225
- :type _request_timeout: int, tuple(int, int), optional
226
- :param _request_auth: set to override the auth_settings for an a single
227
- request; this effectively ignores the
228
- authentication in the spec for a single request.
229
- :type _request_auth: dict, optional
230
- :param _content_type: force content-type for the request.
231
- :type _content_type: str, Optional
232
- :param _headers: set to override the headers for a single
233
- request; this effectively ignores the headers
234
- in the spec for a single request.
235
- :type _headers: dict, optional
236
- :param _host_index: set to override the host_index for a single
237
- request; this effectively ignores the host_index
238
- in the spec for a single request.
239
- :type _host_index: int, optional
240
- :return: Returns the result object.
241
- """ # noqa: E501
242
-
243
- _param = self._get_medication_serialize(
244
- medication_uuid=medication_uuid,
245
- pricing_program=pricing_program,
246
- deep=deep,
247
- _request_auth=_request_auth,
248
- _content_type=_content_type,
249
- _headers=_headers,
250
- _host_index=_host_index
251
- )
252
-
253
- _response_types_map: Dict[str, Optional[str]] = {
254
- '200': "Medication",
255
- '404': None,
256
- }
257
- response_data = self.api_client.call_api(
258
- *_param,
259
- _request_timeout=_request_timeout
260
- )
261
- return response_data.response
262
-
263
-
264
- def _get_medication_serialize(
265
- self,
266
- medication_uuid,
267
- pricing_program,
268
- deep,
269
- _request_auth,
270
- _content_type,
271
- _headers,
272
- _host_index,
273
- ) -> RequestSerialized:
274
-
275
- _host = None
276
-
277
- _collection_formats: Dict[str, str] = {
278
- }
279
-
280
- _path_params: Dict[str, str] = {}
281
- _query_params: List[Tuple[str, str]] = []
282
- _header_params: Dict[str, Optional[str]] = _headers or {}
283
- _form_params: List[Tuple[str, str]] = []
284
- _files: Dict[
285
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
286
- ] = {}
287
- _body_params: Optional[bytes] = None
288
-
289
- # process the path parameters
290
- if medication_uuid is not None:
291
- _path_params['medication_uuid'] = medication_uuid
292
- # process the query parameters
293
- if pricing_program is not None:
294
-
295
- _query_params.append(('pricing_program', pricing_program))
296
-
297
- if deep is not None:
298
-
299
- _query_params.append(('deep', deep))
300
-
301
- # process the header parameters
302
- # process the form parameters
303
- # process the body parameter
304
-
305
-
306
- # set the HTTP header `Accept`
307
- if 'Accept' not in _header_params:
308
- _header_params['Accept'] = self.api_client.select_header_accept(
309
- [
310
- 'application/json'
311
- ]
312
- )
313
-
314
-
315
- # authentication setting
316
- _auth_settings: List[str] = [
317
- 'opaque_token'
318
- ]
319
-
320
- return self.api_client.param_serialize(
321
- method='GET',
322
- resource_path='/p2rx/1/medications/{medication_uuid}',
323
- path_params=_path_params,
324
- query_params=_query_params,
325
- header_params=_header_params,
326
- body=_body_params,
327
- post_params=_form_params,
328
- files=_files,
329
- auth_settings=_auth_settings,
330
- collection_formats=_collection_formats,
331
- _host=_host,
332
- _request_auth=_request_auth
333
- )
334
-
335
-
336
-
337
-
338
- @validate_call
339
- def get_medications(
340
- self,
341
- q: Annotated[Optional[StrictStr], Field(description="Filter medications by query")] = None,
342
- pricing_program: Optional[StrictStr] = None,
343
- page: Optional[StrictInt] = None,
344
- results_per_page: Optional[StrictInt] = None,
345
- deep: Optional[StrictBool] = None,
346
- _request_timeout: Union[
347
- None,
348
- Annotated[StrictFloat, Field(gt=0)],
349
- Tuple[
350
- Annotated[StrictFloat, Field(gt=0)],
351
- Annotated[StrictFloat, Field(gt=0)]
352
- ]
353
- ] = None,
354
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
355
- _content_type: Optional[StrictStr] = None,
356
- _headers: Optional[Dict[StrictStr, Any]] = None,
357
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
358
- ) -> List[Medication]:
359
- """Get all medications
360
-
361
-
362
- :param q: Filter medications by query
363
- :type q: str
364
- :param pricing_program:
365
- :type pricing_program: str
366
- :param page:
367
- :type page: int
368
- :param results_per_page:
369
- :type results_per_page: int
370
- :param deep:
371
- :type deep: bool
372
- :param _request_timeout: timeout setting for this request. If one
373
- number provided, it will be total request
374
- timeout. It can also be a pair (tuple) of
375
- (connection, read) timeouts.
376
- :type _request_timeout: int, tuple(int, int), optional
377
- :param _request_auth: set to override the auth_settings for an a single
378
- request; this effectively ignores the
379
- authentication in the spec for a single request.
380
- :type _request_auth: dict, optional
381
- :param _content_type: force content-type for the request.
382
- :type _content_type: str, Optional
383
- :param _headers: set to override the headers for a single
384
- request; this effectively ignores the headers
385
- in the spec for a single request.
386
- :type _headers: dict, optional
387
- :param _host_index: set to override the host_index for a single
388
- request; this effectively ignores the host_index
389
- in the spec for a single request.
390
- :type _host_index: int, optional
391
- :return: Returns the result object.
392
- """ # noqa: E501
393
-
394
- _param = self._get_medications_serialize(
395
- q=q,
396
- pricing_program=pricing_program,
397
- page=page,
398
- results_per_page=results_per_page,
399
- deep=deep,
400
- _request_auth=_request_auth,
401
- _content_type=_content_type,
402
- _headers=_headers,
403
- _host_index=_host_index
404
- )
405
-
406
- _response_types_map: Dict[str, Optional[str]] = {
407
- '200': "List[Medication]",
408
- '404': None,
409
- }
410
- response_data = self.api_client.call_api(
411
- *_param,
412
- _request_timeout=_request_timeout
413
- )
414
- response_data.read()
415
- return self.api_client.response_deserialize(
416
- response_data=response_data,
417
- response_types_map=_response_types_map,
418
- ).data
419
-
420
-
421
- @validate_call
422
- def get_medications_with_http_info(
423
- self,
424
- q: Annotated[Optional[StrictStr], Field(description="Filter medications by query")] = None,
425
- pricing_program: Optional[StrictStr] = None,
426
- page: Optional[StrictInt] = None,
427
- results_per_page: Optional[StrictInt] = None,
428
- deep: Optional[StrictBool] = None,
429
- _request_timeout: Union[
430
- None,
431
- Annotated[StrictFloat, Field(gt=0)],
432
- Tuple[
433
- Annotated[StrictFloat, Field(gt=0)],
434
- Annotated[StrictFloat, Field(gt=0)]
435
- ]
436
- ] = None,
437
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
438
- _content_type: Optional[StrictStr] = None,
439
- _headers: Optional[Dict[StrictStr, Any]] = None,
440
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
441
- ) -> ApiResponse[List[Medication]]:
442
- """Get all medications
443
-
444
-
445
- :param q: Filter medications by query
446
- :type q: str
447
- :param pricing_program:
448
- :type pricing_program: str
449
- :param page:
450
- :type page: int
451
- :param results_per_page:
452
- :type results_per_page: int
453
- :param deep:
454
- :type deep: bool
455
- :param _request_timeout: timeout setting for this request. If one
456
- number provided, it will be total request
457
- timeout. It can also be a pair (tuple) of
458
- (connection, read) timeouts.
459
- :type _request_timeout: int, tuple(int, int), optional
460
- :param _request_auth: set to override the auth_settings for an a single
461
- request; this effectively ignores the
462
- authentication in the spec for a single request.
463
- :type _request_auth: dict, optional
464
- :param _content_type: force content-type for the request.
465
- :type _content_type: str, Optional
466
- :param _headers: set to override the headers for a single
467
- request; this effectively ignores the headers
468
- in the spec for a single request.
469
- :type _headers: dict, optional
470
- :param _host_index: set to override the host_index for a single
471
- request; this effectively ignores the host_index
472
- in the spec for a single request.
473
- :type _host_index: int, optional
474
- :return: Returns the result object.
475
- """ # noqa: E501
476
-
477
- _param = self._get_medications_serialize(
478
- q=q,
479
- pricing_program=pricing_program,
480
- page=page,
481
- results_per_page=results_per_page,
482
- deep=deep,
483
- _request_auth=_request_auth,
484
- _content_type=_content_type,
485
- _headers=_headers,
486
- _host_index=_host_index
487
- )
488
-
489
- _response_types_map: Dict[str, Optional[str]] = {
490
- '200': "List[Medication]",
491
- '404': None,
492
- }
493
- response_data = self.api_client.call_api(
494
- *_param,
495
- _request_timeout=_request_timeout
496
- )
497
- response_data.read()
498
- return self.api_client.response_deserialize(
499
- response_data=response_data,
500
- response_types_map=_response_types_map,
501
- )
502
-
503
-
504
- @validate_call
505
- def get_medications_without_preload_content(
506
- self,
507
- q: Annotated[Optional[StrictStr], Field(description="Filter medications by query")] = None,
508
- pricing_program: Optional[StrictStr] = None,
509
- page: Optional[StrictInt] = None,
510
- results_per_page: Optional[StrictInt] = None,
511
- deep: Optional[StrictBool] = None,
512
- _request_timeout: Union[
513
- None,
514
- Annotated[StrictFloat, Field(gt=0)],
515
- Tuple[
516
- Annotated[StrictFloat, Field(gt=0)],
517
- Annotated[StrictFloat, Field(gt=0)]
518
- ]
519
- ] = None,
520
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
521
- _content_type: Optional[StrictStr] = None,
522
- _headers: Optional[Dict[StrictStr, Any]] = None,
523
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
524
- ) -> RESTResponseType:
525
- """Get all medications
526
-
527
-
528
- :param q: Filter medications by query
529
- :type q: str
530
- :param pricing_program:
531
- :type pricing_program: str
532
- :param page:
533
- :type page: int
534
- :param results_per_page:
535
- :type results_per_page: int
536
- :param deep:
537
- :type deep: bool
538
- :param _request_timeout: timeout setting for this request. If one
539
- number provided, it will be total request
540
- timeout. It can also be a pair (tuple) of
541
- (connection, read) timeouts.
542
- :type _request_timeout: int, tuple(int, int), optional
543
- :param _request_auth: set to override the auth_settings for an a single
544
- request; this effectively ignores the
545
- authentication in the spec for a single request.
546
- :type _request_auth: dict, optional
547
- :param _content_type: force content-type for the request.
548
- :type _content_type: str, Optional
549
- :param _headers: set to override the headers for a single
550
- request; this effectively ignores the headers
551
- in the spec for a single request.
552
- :type _headers: dict, optional
553
- :param _host_index: set to override the host_index for a single
554
- request; this effectively ignores the host_index
555
- in the spec for a single request.
556
- :type _host_index: int, optional
557
- :return: Returns the result object.
558
- """ # noqa: E501
559
-
560
- _param = self._get_medications_serialize(
561
- q=q,
562
- pricing_program=pricing_program,
563
- page=page,
564
- results_per_page=results_per_page,
565
- deep=deep,
566
- _request_auth=_request_auth,
567
- _content_type=_content_type,
568
- _headers=_headers,
569
- _host_index=_host_index
570
- )
571
-
572
- _response_types_map: Dict[str, Optional[str]] = {
573
- '200': "List[Medication]",
574
- '404': None,
575
- }
576
- response_data = self.api_client.call_api(
577
- *_param,
578
- _request_timeout=_request_timeout
579
- )
580
- return response_data.response
581
-
582
-
583
- def _get_medications_serialize(
584
- self,
585
- q,
586
- pricing_program,
587
- page,
588
- results_per_page,
589
- deep,
590
- _request_auth,
591
- _content_type,
592
- _headers,
593
- _host_index,
594
- ) -> RequestSerialized:
595
-
596
- _host = None
597
-
598
- _collection_formats: Dict[str, str] = {
599
- }
600
-
601
- _path_params: Dict[str, str] = {}
602
- _query_params: List[Tuple[str, str]] = []
603
- _header_params: Dict[str, Optional[str]] = _headers or {}
604
- _form_params: List[Tuple[str, str]] = []
605
- _files: Dict[
606
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
607
- ] = {}
608
- _body_params: Optional[bytes] = None
609
-
610
- # process the path parameters
611
- # process the query parameters
612
- if q is not None:
613
-
614
- _query_params.append(('q', q))
615
-
616
- if pricing_program is not None:
617
-
618
- _query_params.append(('pricing_program', pricing_program))
619
-
620
- if page is not None:
621
-
622
- _query_params.append(('page', page))
623
-
624
- if results_per_page is not None:
625
-
626
- _query_params.append(('results_per_page', results_per_page))
627
-
628
- if deep is not None:
629
-
630
- _query_params.append(('deep', deep))
631
-
632
- # process the header parameters
633
- # process the form parameters
634
- # process the body parameter
635
-
636
-
637
- # set the HTTP header `Accept`
638
- if 'Accept' not in _header_params:
639
- _header_params['Accept'] = self.api_client.select_header_accept(
640
- [
641
- 'application/json'
642
- ]
643
- )
644
-
645
-
646
- # authentication setting
647
- _auth_settings: List[str] = [
648
- 'opaque_token'
649
- ]
650
-
651
- return self.api_client.param_serialize(
652
- method='GET',
653
- resource_path='/p2rx/1/medications',
654
- path_params=_path_params,
655
- query_params=_query_params,
656
- header_params=_header_params,
657
- body=_body_params,
658
- post_params=_form_params,
659
- files=_files,
660
- auth_settings=_auth_settings,
661
- collection_formats=_collection_formats,
662
- _host=_host,
663
- _request_auth=_request_auth
664
- )
665
-
666
-