Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh onfido-python after onfido-openapi-spec update (8c793a1) #76

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .release.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"source": {
"repo_url": "https://github.com/onfido/onfido-openapi-spec",
"short_sha": "c72181c",
"long_sha": "c72181cc5e450bf727fc5eae2639c58ba45831ac",
"version": "v4.2.0"
"short_sha": "8c793a1",
"long_sha": "8c793a1c8307dcd92fa657edb2a1e9b184c15278",
"version": "v4.3.0"
},
"release": "v4.2.0"
"release": "v4.3.0"
}
4 changes: 2 additions & 2 deletions onfido/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
""" # noqa: E501


__version__ = "4.2.0"
__version__ = "4.3.0"

# import apis into sdk package
from onfido.api.default_api import DefaultApi
Expand Down Expand Up @@ -106,7 +106,7 @@
from onfido.models.document_odp_reasons import DocumentODPReasons
from onfido.models.document_properties import DocumentProperties
from onfido.models.document_properties_address_lines import DocumentPropertiesAddressLines
from onfido.models.document_properties_barcode import DocumentPropertiesBarcode
from onfido.models.document_properties_barcode_inner import DocumentPropertiesBarcodeInner
from onfido.models.document_properties_document_classification import DocumentPropertiesDocumentClassification
from onfido.models.document_properties_document_numbers_inner import DocumentPropertiesDocumentNumbersInner
from onfido.models.document_properties_driving_licence_information import DocumentPropertiesDrivingLicenceInformation
Expand Down
2 changes: 1 addition & 1 deletion onfido/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __init__(
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'onfido-python/4.2.0'
self.user_agent = 'onfido-python/4.3.0'
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
2 changes: 1 addition & 1 deletion onfido/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: v3.6\n"\
"SDK Package Version: 4.2.0".\
"SDK Package Version: 4.3.0".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
2 changes: 1 addition & 1 deletion onfido/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
from onfido.models.document_odp_reasons import DocumentODPReasons
from onfido.models.document_properties import DocumentProperties
from onfido.models.document_properties_address_lines import DocumentPropertiesAddressLines
from onfido.models.document_properties_barcode import DocumentPropertiesBarcode
from onfido.models.document_properties_barcode_inner import DocumentPropertiesBarcodeInner
from onfido.models.document_properties_document_classification import DocumentPropertiesDocumentClassification
from onfido.models.document_properties_document_numbers_inner import DocumentPropertiesDocumentNumbersInner
from onfido.models.document_properties_driving_licence_information import DocumentPropertiesDrivingLicenceInformation
Expand Down
14 changes: 9 additions & 5 deletions onfido/models/document_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from onfido.models.document_properties_address_lines import DocumentPropertiesAddressLines
from onfido.models.document_properties_barcode import DocumentPropertiesBarcode
from onfido.models.document_properties_barcode_inner import DocumentPropertiesBarcodeInner
from onfido.models.document_properties_document_classification import DocumentPropertiesDocumentClassification
from onfido.models.document_properties_document_numbers_inner import DocumentPropertiesDocumentNumbersInner
from onfido.models.document_properties_driving_licence_information import DocumentPropertiesDrivingLicenceInformation
Expand Down Expand Up @@ -74,7 +74,7 @@ class DocumentProperties(BaseModel):
real_id_compliance: Optional[StrictBool] = None
security_tier: Optional[StrictStr] = None
address_lines: Optional[DocumentPropertiesAddressLines] = None
barcode: Optional[DocumentPropertiesBarcode] = None
barcode: Optional[List[DocumentPropertiesBarcodeInner]] = None
nfc: Optional[DocumentPropertiesNfc] = None
driving_licence_information: Optional[DocumentPropertiesDrivingLicenceInformation] = None
document_classification: Optional[DocumentPropertiesDocumentClassification] = None
Expand Down Expand Up @@ -163,9 +163,13 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of address_lines
if self.address_lines:
_dict['address_lines'] = self.address_lines.to_dict()
# override the default output from pydantic by calling `to_dict()` of barcode
# override the default output from pydantic by calling `to_dict()` of each item in barcode (list)
_items = []
if self.barcode:
_dict['barcode'] = self.barcode.to_dict()
for _item_barcode in self.barcode:
if _item_barcode:
_items.append(_item_barcode.to_dict())
_dict['barcode'] = _items
# override the default output from pydantic by calling `to_dict()` of nfc
if self.nfc:
_dict['nfc'] = self.nfc.to_dict()
Expand Down Expand Up @@ -235,7 +239,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"real_id_compliance": obj.get("real_id_compliance"),
"security_tier": obj.get("security_tier"),
"address_lines": DocumentPropertiesAddressLines.from_dict(obj["address_lines"]) if obj.get("address_lines") is not None else None,
"barcode": DocumentPropertiesBarcode.from_dict(obj["barcode"]) if obj.get("barcode") is not None else None,
"barcode": [DocumentPropertiesBarcodeInner.from_dict(_item) for _item in obj["barcode"]] if obj.get("barcode") is not None else None,
"nfc": DocumentPropertiesNfc.from_dict(obj["nfc"]) if obj.get("nfc") is not None else None,
"driving_licence_information": DocumentPropertiesDrivingLicenceInformation.from_dict(obj["driving_licence_information"]) if obj.get("driving_licence_information") is not None else None,
"document_classification": DocumentPropertiesDocumentClassification.from_dict(obj["document_classification"]) if obj.get("document_classification") is not None else None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
from typing import Optional, Set
from typing_extensions import Self

class DocumentPropertiesBarcode(BaseModel):
class DocumentPropertiesBarcodeInner(BaseModel):
"""
DocumentPropertiesBarcode
DocumentPropertiesBarcodeInner
""" # noqa: E501
first_name: Optional[StrictStr] = None
middle_name: Optional[StrictStr] = None
Expand Down Expand Up @@ -66,7 +66,7 @@ def to_json(self) -> str:

@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of DocumentPropertiesBarcode from a JSON string"""
"""Create an instance of DocumentPropertiesBarcodeInner from a JSON string"""
return cls.from_dict(json.loads(json_str))

def to_dict(self) -> Dict[str, Any]:
Expand Down Expand Up @@ -98,7 +98,7 @@ def to_dict(self) -> Dict[str, Any]:

@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of DocumentPropertiesBarcode from a dict"""
"""Create an instance of DocumentPropertiesBarcodeInner from a dict"""
if obj is None:
return None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from onfido.models.document_properties_address_lines import DocumentPropertiesAddressLines
from onfido.models.document_properties_barcode import DocumentPropertiesBarcode
from onfido.models.document_properties_barcode_inner import DocumentPropertiesBarcodeInner
from onfido.models.document_properties_document_classification import DocumentPropertiesDocumentClassification
from onfido.models.document_properties_document_numbers_inner import DocumentPropertiesDocumentNumbersInner
from onfido.models.document_properties_driving_licence_information import DocumentPropertiesDrivingLicenceInformation
Expand Down Expand Up @@ -76,7 +76,7 @@ class DocumentWithDriverVerificationReportAllOfProperties(BaseModel):
real_id_compliance: Optional[StrictBool] = None
security_tier: Optional[StrictStr] = None
address_lines: Optional[DocumentPropertiesAddressLines] = None
barcode: Optional[DocumentPropertiesBarcode] = None
barcode: Optional[List[DocumentPropertiesBarcodeInner]] = None
nfc: Optional[DocumentPropertiesNfc] = None
driving_licence_information: Optional[DocumentPropertiesDrivingLicenceInformation] = None
document_classification: Optional[DocumentPropertiesDocumentClassification] = None
Expand Down Expand Up @@ -171,9 +171,13 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of address_lines
if self.address_lines:
_dict['address_lines'] = self.address_lines.to_dict()
# override the default output from pydantic by calling `to_dict()` of barcode
# override the default output from pydantic by calling `to_dict()` of each item in barcode (list)
_items = []
if self.barcode:
_dict['barcode'] = self.barcode.to_dict()
for _item_barcode in self.barcode:
if _item_barcode:
_items.append(_item_barcode.to_dict())
_dict['barcode'] = _items
# override the default output from pydantic by calling `to_dict()` of nfc
if self.nfc:
_dict['nfc'] = self.nfc.to_dict()
Expand Down Expand Up @@ -253,7 +257,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"real_id_compliance": obj.get("real_id_compliance"),
"security_tier": obj.get("security_tier"),
"address_lines": DocumentPropertiesAddressLines.from_dict(obj["address_lines"]) if obj.get("address_lines") is not None else None,
"barcode": DocumentPropertiesBarcode.from_dict(obj["barcode"]) if obj.get("barcode") is not None else None,
"barcode": [DocumentPropertiesBarcodeInner.from_dict(_item) for _item in obj["barcode"]] if obj.get("barcode") is not None else None,
"nfc": DocumentPropertiesNfc.from_dict(obj["nfc"]) if obj.get("nfc") is not None else None,
"driving_licence_information": DocumentPropertiesDrivingLicenceInformation.from_dict(obj["driving_licence_information"]) if obj.get("driving_licence_information") is not None else None,
"document_classification": DocumentPropertiesDocumentClassification.from_dict(obj["document_classification"]) if obj.get("document_classification") is not None else None,
Expand Down
Loading