rxfoundry.clients.swifty-api 0.0.593__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 (61) hide show
  1. rxfoundry/clients/swifty_api/models/virtual_pharmacy.py +3 -1
  2. {rxfoundry_clients_swifty_api-0.0.593.dist-info → rxfoundry_clients_swifty_api-1.0.0.dist-info}/METADATA +1 -1
  3. rxfoundry_clients_swifty_api-1.0.0.dist-info/RECORD +61 -0
  4. rxfoundry/clients/p2rx_api/__init__.py +0 -79
  5. rxfoundry/clients/p2rx_api/api/__init__.py +0 -17
  6. rxfoundry/clients/p2rx_api/api/async_api.py +0 -862
  7. rxfoundry/clients/p2rx_api/api/code_api.py +0 -337
  8. rxfoundry/clients/p2rx_api/api/fax_api.py +0 -632
  9. rxfoundry/clients/p2rx_api/api/medication_api.py +0 -666
  10. rxfoundry/clients/p2rx_api/api/patient_api.py +0 -981
  11. rxfoundry/clients/p2rx_api/api/pharmacist_api.py +0 -615
  12. rxfoundry/clients/p2rx_api/api/pharmacy_api.py +0 -684
  13. rxfoundry/clients/p2rx_api/api/prescriber_api.py +0 -615
  14. rxfoundry/clients/p2rx_api/api/prescription_api.py +0 -1864
  15. rxfoundry/clients/p2rx_api/api/token_api.py +0 -314
  16. rxfoundry/clients/p2rx_api/api/user_api.py +0 -306
  17. rxfoundry/clients/p2rx_api/api/version_api.py +0 -282
  18. rxfoundry/clients/p2rx_api/api/virtual_pharmacy_api.py +0 -284
  19. rxfoundry/clients/p2rx_api/api_client.py +0 -798
  20. rxfoundry/clients/p2rx_api/api_response.py +0 -21
  21. rxfoundry/clients/p2rx_api/configuration.py +0 -583
  22. rxfoundry/clients/p2rx_api/exceptions.py +0 -217
  23. rxfoundry/clients/p2rx_api/models/__init__.py +0 -50
  24. rxfoundry/clients/p2rx_api/models/address.py +0 -106
  25. rxfoundry/clients/p2rx_api/models/asynchronous_response.py +0 -90
  26. rxfoundry/clients/p2rx_api/models/code.py +0 -92
  27. rxfoundry/clients/p2rx_api/models/code_qualifier_code.py +0 -96
  28. rxfoundry/clients/p2rx_api/models/error_message.py +0 -90
  29. rxfoundry/clients/p2rx_api/models/fax.py +0 -141
  30. rxfoundry/clients/p2rx_api/models/medication.py +0 -137
  31. rxfoundry/clients/p2rx_api/models/medication_program_pricing.py +0 -99
  32. rxfoundry/clients/p2rx_api/models/medication_variant.py +0 -96
  33. rxfoundry/clients/p2rx_api/models/patient.py +0 -128
  34. rxfoundry/clients/p2rx_api/models/patient_activity_notification.py +0 -114
  35. rxfoundry/clients/p2rx_api/models/patient_external_identifier.py +0 -94
  36. rxfoundry/clients/p2rx_api/models/pharmacist.py +0 -104
  37. rxfoundry/clients/p2rx_api/models/pharmacy.py +0 -156
  38. rxfoundry/clients/p2rx_api/models/pharmacy_chain.py +0 -100
  39. rxfoundry/clients/p2rx_api/models/pharmacy_other_identifier.py +0 -98
  40. rxfoundry/clients/p2rx_api/models/pharmacy_program_pricing.py +0 -103
  41. rxfoundry/clients/p2rx_api/models/prescriber.py +0 -106
  42. rxfoundry/clients/p2rx_api/models/prescription.py +0 -278
  43. rxfoundry/clients/p2rx_api/models/prescription_change_request.py +0 -123
  44. rxfoundry/clients/p2rx_api/models/prescription_issue.py +0 -120
  45. rxfoundry/clients/p2rx_api/models/prescription_patch.py +0 -113
  46. rxfoundry/clients/p2rx_api/models/prescription_task.py +0 -130
  47. rxfoundry/clients/p2rx_api/models/prescription_task_status.py +0 -95
  48. rxfoundry/clients/p2rx_api/models/prescription_transfer_request.py +0 -93
  49. rxfoundry/clients/p2rx_api/models/prescription_verification.py +0 -107
  50. rxfoundry/clients/p2rx_api/models/pricing_program.py +0 -90
  51. rxfoundry/clients/p2rx_api/models/surescripts_message.py +0 -111
  52. rxfoundry/clients/p2rx_api/models/token.py +0 -92
  53. rxfoundry/clients/p2rx_api/models/user.py +0 -98
  54. rxfoundry/clients/p2rx_api/models/version.py +0 -88
  55. rxfoundry/clients/p2rx_api/models/virtual_pharmacy.py +0 -96
  56. rxfoundry/clients/p2rx_api/models/workflow_request.py +0 -90
  57. rxfoundry/clients/p2rx_api/py.typed +0 -0
  58. rxfoundry/clients/p2rx_api/rest.py +0 -259
  59. rxfoundry_clients_swifty_api-0.0.593.dist-info/RECORD +0 -116
  60. {rxfoundry_clients_swifty_api-0.0.593.dist-info → rxfoundry_clients_swifty_api-1.0.0.dist-info}/WHEEL +0 -0
  61. {rxfoundry_clients_swifty_api-0.0.593.dist-info → rxfoundry_clients_swifty_api-1.0.0.dist-info}/top_level.txt +0 -0
@@ -1,114 +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
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
22
- from typing import Any, ClassVar, Dict, List, Optional
23
- from typing import Optional, Set
24
- from typing_extensions import Self
25
-
26
- class PatientActivityNotification(BaseModel):
27
- """
28
- PatientActivityNotification
29
- """ # noqa: E501
30
- external_system_uuid: Optional[StrictStr] = None
31
- external_system_slug: Optional[StrictStr] = None
32
- object_type: Optional[StrictStr] = None
33
- action: Optional[StrictStr] = None
34
- __properties: ClassVar[List[str]] = ["external_system_uuid", "external_system_slug", "object_type", "action"]
35
-
36
- @field_validator('object_type')
37
- def object_type_validate_enum(cls, value):
38
- """Validates the enum"""
39
- if value is None:
40
- return value
41
-
42
- if value not in set(['patient', 'insurance', 'allergies', 'conditions', 'medications']):
43
- raise ValueError("must be one of enum values ('patient', 'insurance', 'allergies', 'conditions', 'medications')")
44
- return value
45
-
46
- @field_validator('action')
47
- def action_validate_enum(cls, value):
48
- """Validates the enum"""
49
- if value is None:
50
- return value
51
-
52
- if value not in set(['created', 'updated', 'deleted']):
53
- raise ValueError("must be one of enum values ('created', 'updated', 'deleted')")
54
- return value
55
-
56
- model_config = ConfigDict(
57
- populate_by_name=True,
58
- validate_assignment=True,
59
- protected_namespaces=(),
60
- )
61
-
62
-
63
- def to_str(self) -> str:
64
- """Returns the string representation of the model using alias"""
65
- return pprint.pformat(self.model_dump(by_alias=True))
66
-
67
- def to_json(self) -> str:
68
- """Returns the JSON representation of the model using alias"""
69
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
70
- return json.dumps(self.to_dict())
71
-
72
- @classmethod
73
- def from_json(cls, json_str: str) -> Optional[Self]:
74
- """Create an instance of PatientActivityNotification from a JSON string"""
75
- return cls.from_dict(json.loads(json_str))
76
-
77
- def to_dict(self) -> Dict[str, Any]:
78
- """Return the dictionary representation of the model using alias.
79
-
80
- This has the following differences from calling pydantic's
81
- `self.model_dump(by_alias=True)`:
82
-
83
- * `None` is only added to the output dict for nullable fields that
84
- were set at model initialization. Other fields with value `None`
85
- are ignored.
86
- """
87
- excluded_fields: Set[str] = set([
88
- ])
89
-
90
- _dict = self.model_dump(
91
- by_alias=True,
92
- exclude=excluded_fields,
93
- exclude_none=True,
94
- )
95
- return _dict
96
-
97
- @classmethod
98
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
99
- """Create an instance of PatientActivityNotification from a dict"""
100
- if obj is None:
101
- return None
102
-
103
- if not isinstance(obj, dict):
104
- return cls.model_validate(obj)
105
-
106
- _obj = cls.model_validate({
107
- "external_system_uuid": obj.get("external_system_uuid"),
108
- "external_system_slug": obj.get("external_system_slug"),
109
- "object_type": obj.get("object_type"),
110
- "action": obj.get("action")
111
- })
112
- return _obj
113
-
114
-
@@ -1,94 +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
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from pydantic import BaseModel, ConfigDict, StrictStr
22
- from typing import Any, ClassVar, Dict, List, Optional
23
- from typing import Optional, Set
24
- from typing_extensions import Self
25
-
26
- class PatientExternalIdentifier(BaseModel):
27
- """
28
- PatientExternalIdentifier
29
- """ # noqa: E501
30
- external_id: Optional[StrictStr] = None
31
- external_system_slug: Optional[StrictStr] = None
32
- external_email: Optional[StrictStr] = None
33
- external_mobile_phone: Optional[StrictStr] = None
34
- __properties: ClassVar[List[str]] = ["external_id", "external_system_slug", "external_email", "external_mobile_phone"]
35
-
36
- model_config = ConfigDict(
37
- populate_by_name=True,
38
- validate_assignment=True,
39
- protected_namespaces=(),
40
- )
41
-
42
-
43
- def to_str(self) -> str:
44
- """Returns the string representation of the model using alias"""
45
- return pprint.pformat(self.model_dump(by_alias=True))
46
-
47
- def to_json(self) -> str:
48
- """Returns the JSON representation of the model using alias"""
49
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
- return json.dumps(self.to_dict())
51
-
52
- @classmethod
53
- def from_json(cls, json_str: str) -> Optional[Self]:
54
- """Create an instance of PatientExternalIdentifier from a JSON string"""
55
- return cls.from_dict(json.loads(json_str))
56
-
57
- def to_dict(self) -> Dict[str, Any]:
58
- """Return the dictionary representation of the model using alias.
59
-
60
- This has the following differences from calling pydantic's
61
- `self.model_dump(by_alias=True)`:
62
-
63
- * `None` is only added to the output dict for nullable fields that
64
- were set at model initialization. Other fields with value `None`
65
- are ignored.
66
- """
67
- excluded_fields: Set[str] = set([
68
- ])
69
-
70
- _dict = self.model_dump(
71
- by_alias=True,
72
- exclude=excluded_fields,
73
- exclude_none=True,
74
- )
75
- return _dict
76
-
77
- @classmethod
78
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
- """Create an instance of PatientExternalIdentifier from a dict"""
80
- if obj is None:
81
- return None
82
-
83
- if not isinstance(obj, dict):
84
- return cls.model_validate(obj)
85
-
86
- _obj = cls.model_validate({
87
- "external_id": obj.get("external_id"),
88
- "external_system_slug": obj.get("external_system_slug"),
89
- "external_email": obj.get("external_email"),
90
- "external_mobile_phone": obj.get("external_mobile_phone")
91
- })
92
- return _obj
93
-
94
-
@@ -1,104 +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
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from pydantic import BaseModel, ConfigDict, StrictStr
22
- from typing import Any, ClassVar, Dict, List, Optional
23
- from rxfoundry.clients.swifty_api.models.address import Address
24
- from typing import Optional, Set
25
- from typing_extensions import Self
26
-
27
- class Pharmacist(BaseModel):
28
- """
29
- Pharmacist
30
- """ # noqa: E501
31
- uuid: Optional[StrictStr] = None
32
- last_name: Optional[StrictStr] = None
33
- first_name: Optional[StrictStr] = None
34
- middle_name: Optional[StrictStr] = None
35
- credentials_text: Optional[StrictStr] = None
36
- npi: Optional[StrictStr] = None
37
- practice_address: Optional[Address] = None
38
- __properties: ClassVar[List[str]] = ["uuid", "last_name", "first_name", "middle_name", "credentials_text", "npi", "practice_address"]
39
-
40
- model_config = ConfigDict(
41
- populate_by_name=True,
42
- validate_assignment=True,
43
- protected_namespaces=(),
44
- )
45
-
46
-
47
- def to_str(self) -> str:
48
- """Returns the string representation of the model using alias"""
49
- return pprint.pformat(self.model_dump(by_alias=True))
50
-
51
- def to_json(self) -> str:
52
- """Returns the JSON representation of the model using alias"""
53
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
54
- return json.dumps(self.to_dict())
55
-
56
- @classmethod
57
- def from_json(cls, json_str: str) -> Optional[Self]:
58
- """Create an instance of Pharmacist from a JSON string"""
59
- return cls.from_dict(json.loads(json_str))
60
-
61
- def to_dict(self) -> Dict[str, Any]:
62
- """Return the dictionary representation of the model using alias.
63
-
64
- This has the following differences from calling pydantic's
65
- `self.model_dump(by_alias=True)`:
66
-
67
- * `None` is only added to the output dict for nullable fields that
68
- were set at model initialization. Other fields with value `None`
69
- are ignored.
70
- """
71
- excluded_fields: Set[str] = set([
72
- ])
73
-
74
- _dict = self.model_dump(
75
- by_alias=True,
76
- exclude=excluded_fields,
77
- exclude_none=True,
78
- )
79
- # override the default output from pydantic by calling `to_dict()` of practice_address
80
- if self.practice_address:
81
- _dict['practice_address'] = self.practice_address.to_dict()
82
- return _dict
83
-
84
- @classmethod
85
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
- """Create an instance of Pharmacist from a dict"""
87
- if obj is None:
88
- return None
89
-
90
- if not isinstance(obj, dict):
91
- return cls.model_validate(obj)
92
-
93
- _obj = cls.model_validate({
94
- "uuid": obj.get("uuid"),
95
- "last_name": obj.get("last_name"),
96
- "first_name": obj.get("first_name"),
97
- "middle_name": obj.get("middle_name"),
98
- "credentials_text": obj.get("credentials_text"),
99
- "npi": obj.get("npi"),
100
- "practice_address": Address.from_dict(obj["practice_address"]) if obj.get("practice_address") is not None else None
101
- })
102
- return _obj
103
-
104
-
@@ -1,156 +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
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from pydantic import BaseModel, ConfigDict, StrictStr
22
- from typing import Any, ClassVar, Dict, List, Optional
23
- from rxfoundry.clients.swifty_api.models.address import Address
24
- from rxfoundry.clients.swifty_api.models.code import Code
25
- from rxfoundry.clients.swifty_api.models.pharmacy_chain import PharmacyChain
26
- from rxfoundry.clients.swifty_api.models.pharmacy_other_identifier import PharmacyOtherIdentifier
27
- from rxfoundry.clients.swifty_api.models.pharmacy_program_pricing import PharmacyProgramPricing
28
- from typing import Optional, Set
29
- from typing_extensions import Self
30
-
31
- class Pharmacy(BaseModel):
32
- """
33
- Pharmacy
34
- """ # noqa: E501
35
- uuid: Optional[StrictStr] = None
36
- name: Optional[StrictStr] = None
37
- npi: Optional[StrictStr] = None
38
- ncpdp_id: Optional[StrictStr] = None
39
- other_organization_name: Optional[StrictStr] = None
40
- other_organization_name_type: Optional[Code] = None
41
- practice_address: Optional[Address] = None
42
- taxonomies: Optional[List[Code]] = None
43
- networks: Optional[List[Code]] = None
44
- other_identifiers: Optional[List[PharmacyOtherIdentifier]] = None
45
- google_place_id: Optional[StrictStr] = None
46
- google_place_data: Optional[Dict[str, Any]] = None
47
- pharmacy_chain: Optional[PharmacyChain] = None
48
- program_pricing: Optional[List[PharmacyProgramPricing]] = None
49
- __properties: ClassVar[List[str]] = ["uuid", "name", "npi", "ncpdp_id", "other_organization_name", "other_organization_name_type", "practice_address", "taxonomies", "networks", "other_identifiers", "google_place_id", "google_place_data", "pharmacy_chain", "program_pricing"]
50
-
51
- model_config = ConfigDict(
52
- populate_by_name=True,
53
- validate_assignment=True,
54
- protected_namespaces=(),
55
- )
56
-
57
-
58
- def to_str(self) -> str:
59
- """Returns the string representation of the model using alias"""
60
- return pprint.pformat(self.model_dump(by_alias=True))
61
-
62
- def to_json(self) -> str:
63
- """Returns the JSON representation of the model using alias"""
64
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
65
- return json.dumps(self.to_dict())
66
-
67
- @classmethod
68
- def from_json(cls, json_str: str) -> Optional[Self]:
69
- """Create an instance of Pharmacy from a JSON string"""
70
- return cls.from_dict(json.loads(json_str))
71
-
72
- def to_dict(self) -> Dict[str, Any]:
73
- """Return the dictionary representation of the model using alias.
74
-
75
- This has the following differences from calling pydantic's
76
- `self.model_dump(by_alias=True)`:
77
-
78
- * `None` is only added to the output dict for nullable fields that
79
- were set at model initialization. Other fields with value `None`
80
- are ignored.
81
- """
82
- excluded_fields: Set[str] = set([
83
- ])
84
-
85
- _dict = self.model_dump(
86
- by_alias=True,
87
- exclude=excluded_fields,
88
- exclude_none=True,
89
- )
90
- # override the default output from pydantic by calling `to_dict()` of other_organization_name_type
91
- if self.other_organization_name_type:
92
- _dict['other_organization_name_type'] = self.other_organization_name_type.to_dict()
93
- # override the default output from pydantic by calling `to_dict()` of practice_address
94
- if self.practice_address:
95
- _dict['practice_address'] = self.practice_address.to_dict()
96
- # override the default output from pydantic by calling `to_dict()` of each item in taxonomies (list)
97
- _items = []
98
- if self.taxonomies:
99
- for _item_taxonomies in self.taxonomies:
100
- if _item_taxonomies:
101
- _items.append(_item_taxonomies.to_dict())
102
- _dict['taxonomies'] = _items
103
- # override the default output from pydantic by calling `to_dict()` of each item in networks (list)
104
- _items = []
105
- if self.networks:
106
- for _item_networks in self.networks:
107
- if _item_networks:
108
- _items.append(_item_networks.to_dict())
109
- _dict['networks'] = _items
110
- # override the default output from pydantic by calling `to_dict()` of each item in other_identifiers (list)
111
- _items = []
112
- if self.other_identifiers:
113
- for _item_other_identifiers in self.other_identifiers:
114
- if _item_other_identifiers:
115
- _items.append(_item_other_identifiers.to_dict())
116
- _dict['other_identifiers'] = _items
117
- # override the default output from pydantic by calling `to_dict()` of pharmacy_chain
118
- if self.pharmacy_chain:
119
- _dict['pharmacy_chain'] = self.pharmacy_chain.to_dict()
120
- # override the default output from pydantic by calling `to_dict()` of each item in program_pricing (list)
121
- _items = []
122
- if self.program_pricing:
123
- for _item_program_pricing in self.program_pricing:
124
- if _item_program_pricing:
125
- _items.append(_item_program_pricing.to_dict())
126
- _dict['program_pricing'] = _items
127
- return _dict
128
-
129
- @classmethod
130
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
131
- """Create an instance of Pharmacy from a dict"""
132
- if obj is None:
133
- return None
134
-
135
- if not isinstance(obj, dict):
136
- return cls.model_validate(obj)
137
-
138
- _obj = cls.model_validate({
139
- "uuid": obj.get("uuid"),
140
- "name": obj.get("name"),
141
- "npi": obj.get("npi"),
142
- "ncpdp_id": obj.get("ncpdp_id"),
143
- "other_organization_name": obj.get("other_organization_name"),
144
- "other_organization_name_type": Code.from_dict(obj["other_organization_name_type"]) if obj.get("other_organization_name_type") is not None else None,
145
- "practice_address": Address.from_dict(obj["practice_address"]) if obj.get("practice_address") is not None else None,
146
- "taxonomies": [Code.from_dict(_item) for _item in obj["taxonomies"]] if obj.get("taxonomies") is not None else None,
147
- "networks": [Code.from_dict(_item) for _item in obj["networks"]] if obj.get("networks") is not None else None,
148
- "other_identifiers": [PharmacyOtherIdentifier.from_dict(_item) for _item in obj["other_identifiers"]] if obj.get("other_identifiers") is not None else None,
149
- "google_place_id": obj.get("google_place_id"),
150
- "google_place_data": obj.get("google_place_data"),
151
- "pharmacy_chain": PharmacyChain.from_dict(obj["pharmacy_chain"]) if obj.get("pharmacy_chain") is not None else None,
152
- "program_pricing": [PharmacyProgramPricing.from_dict(_item) for _item in obj["program_pricing"]] if obj.get("program_pricing") is not None else None
153
- })
154
- return _obj
155
-
156
-
@@ -1,100 +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
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from pydantic import BaseModel, ConfigDict, StrictStr
22
- from typing import Any, ClassVar, Dict, List, Optional
23
- from rxfoundry.clients.swifty_api.models.pharmacy_program_pricing import PharmacyProgramPricing
24
- from typing import Optional, Set
25
- from typing_extensions import Self
26
-
27
- class PharmacyChain(BaseModel):
28
- """
29
- PharmacyChain
30
- """ # noqa: E501
31
- uuid: Optional[StrictStr] = None
32
- name: Optional[StrictStr] = None
33
- program_pricing: Optional[List[PharmacyProgramPricing]] = None
34
- __properties: ClassVar[List[str]] = ["uuid", "name", "program_pricing"]
35
-
36
- model_config = ConfigDict(
37
- populate_by_name=True,
38
- validate_assignment=True,
39
- protected_namespaces=(),
40
- )
41
-
42
-
43
- def to_str(self) -> str:
44
- """Returns the string representation of the model using alias"""
45
- return pprint.pformat(self.model_dump(by_alias=True))
46
-
47
- def to_json(self) -> str:
48
- """Returns the JSON representation of the model using alias"""
49
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
- return json.dumps(self.to_dict())
51
-
52
- @classmethod
53
- def from_json(cls, json_str: str) -> Optional[Self]:
54
- """Create an instance of PharmacyChain from a JSON string"""
55
- return cls.from_dict(json.loads(json_str))
56
-
57
- def to_dict(self) -> Dict[str, Any]:
58
- """Return the dictionary representation of the model using alias.
59
-
60
- This has the following differences from calling pydantic's
61
- `self.model_dump(by_alias=True)`:
62
-
63
- * `None` is only added to the output dict for nullable fields that
64
- were set at model initialization. Other fields with value `None`
65
- are ignored.
66
- """
67
- excluded_fields: Set[str] = set([
68
- ])
69
-
70
- _dict = self.model_dump(
71
- by_alias=True,
72
- exclude=excluded_fields,
73
- exclude_none=True,
74
- )
75
- # override the default output from pydantic by calling `to_dict()` of each item in program_pricing (list)
76
- _items = []
77
- if self.program_pricing:
78
- for _item_program_pricing in self.program_pricing:
79
- if _item_program_pricing:
80
- _items.append(_item_program_pricing.to_dict())
81
- _dict['program_pricing'] = _items
82
- return _dict
83
-
84
- @classmethod
85
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
- """Create an instance of PharmacyChain from a dict"""
87
- if obj is None:
88
- return None
89
-
90
- if not isinstance(obj, dict):
91
- return cls.model_validate(obj)
92
-
93
- _obj = cls.model_validate({
94
- "uuid": obj.get("uuid"),
95
- "name": obj.get("name"),
96
- "program_pricing": [PharmacyProgramPricing.from_dict(_item) for _item in obj["program_pricing"]] if obj.get("program_pricing") is not None else None
97
- })
98
- return _obj
99
-
100
-
@@ -1,98 +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
-
16
- from __future__ import annotations
17
- import pprint
18
- import re # noqa: F401
19
- import json
20
-
21
- from pydantic import BaseModel, ConfigDict, StrictStr
22
- from typing import Any, ClassVar, Dict, List, Optional
23
- from rxfoundry.clients.swifty_api.models.code import Code
24
- from typing import Optional, Set
25
- from typing_extensions import Self
26
-
27
- class PharmacyOtherIdentifier(BaseModel):
28
- """
29
- PharmacyOtherIdentifier
30
- """ # noqa: E501
31
- identifier: Optional[StrictStr] = None
32
- identifier_type: Optional[Code] = None
33
- issuer: Optional[StrictStr] = None
34
- state: Optional[StrictStr] = None
35
- __properties: ClassVar[List[str]] = ["identifier", "identifier_type", "issuer", "state"]
36
-
37
- model_config = ConfigDict(
38
- populate_by_name=True,
39
- validate_assignment=True,
40
- protected_namespaces=(),
41
- )
42
-
43
-
44
- def to_str(self) -> str:
45
- """Returns the string representation of the model using alias"""
46
- return pprint.pformat(self.model_dump(by_alias=True))
47
-
48
- def to_json(self) -> str:
49
- """Returns the JSON representation of the model using alias"""
50
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51
- return json.dumps(self.to_dict())
52
-
53
- @classmethod
54
- def from_json(cls, json_str: str) -> Optional[Self]:
55
- """Create an instance of PharmacyOtherIdentifier from a JSON string"""
56
- return cls.from_dict(json.loads(json_str))
57
-
58
- def to_dict(self) -> Dict[str, Any]:
59
- """Return the dictionary representation of the model using alias.
60
-
61
- This has the following differences from calling pydantic's
62
- `self.model_dump(by_alias=True)`:
63
-
64
- * `None` is only added to the output dict for nullable fields that
65
- were set at model initialization. Other fields with value `None`
66
- are ignored.
67
- """
68
- excluded_fields: Set[str] = set([
69
- ])
70
-
71
- _dict = self.model_dump(
72
- by_alias=True,
73
- exclude=excluded_fields,
74
- exclude_none=True,
75
- )
76
- # override the default output from pydantic by calling `to_dict()` of identifier_type
77
- if self.identifier_type:
78
- _dict['identifier_type'] = self.identifier_type.to_dict()
79
- return _dict
80
-
81
- @classmethod
82
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
- """Create an instance of PharmacyOtherIdentifier from a dict"""
84
- if obj is None:
85
- return None
86
-
87
- if not isinstance(obj, dict):
88
- return cls.model_validate(obj)
89
-
90
- _obj = cls.model_validate({
91
- "identifier": obj.get("identifier"),
92
- "identifier_type": Code.from_dict(obj["identifier_type"]) if obj.get("identifier_type") is not None else None,
93
- "issuer": obj.get("issuer"),
94
- "state": obj.get("state")
95
- })
96
- return _obj
97
-
98
-