onfido-python 2.10.1__py3-none-any.whl → 3.2.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.
- onfido/__init__.py +311 -2
- onfido/api/__init__.py +5 -0
- onfido/api/default_api.py +17207 -0
- onfido/api_client.py +770 -0
- onfido/api_response.py +21 -0
- onfido/configuration.py +460 -0
- onfido/exceptions.py +184 -77
- onfido/models/__init__.py +291 -0
- onfido/models/address.py +169 -0
- onfido/models/address_builder.py +169 -0
- onfido/models/address_shared.py +169 -0
- onfido/models/addresses_list.py +108 -0
- onfido/models/applicant.py +162 -0
- onfido/models/applicant_builder.py +152 -0
- onfido/models/applicant_create.py +117 -0
- onfido/models/applicant_request.py +116 -0
- onfido/models/applicant_response.py +146 -0
- onfido/models/applicant_shared.py +115 -0
- onfido/models/applicant_update.py +123 -0
- onfido/models/applicant_updater.py +158 -0
- onfido/models/applicants_list.py +108 -0
- onfido/models/check.py +147 -0
- onfido/models/check_builder.py +127 -0
- onfido/models/check_request.py +119 -0
- onfido/models/check_response.py +137 -0
- onfido/models/check_shared.py +108 -0
- onfido/models/checks_list.py +108 -0
- onfido/models/complete_task_builder.py +104 -0
- onfido/models/complete_task_data_builder.py +143 -0
- onfido/models/consent_item.py +109 -0
- onfido/models/consents_builder.py +98 -0
- onfido/models/country_codes.py +285 -0
- onfido/models/device_intelligence_breakdown.py +110 -0
- onfido/models/device_intelligence_breakdown_breakdown.py +104 -0
- onfido/models/device_intelligence_breakdown_breakdown_device.py +104 -0
- onfido/models/device_intelligence_breakdown_breakdown_device_breakdown.py +114 -0
- onfido/models/device_intelligence_breakdown_properties.py +116 -0
- onfido/models/device_intelligence_breakdown_properties_device.py +189 -0
- onfido/models/device_intelligence_breakdown_properties_geolocation.py +105 -0
- onfido/models/device_intelligence_breakdown_properties_ip.py +106 -0
- onfido/models/device_intelligence_report.py +135 -0
- onfido/models/document.py +142 -0
- onfido/models/document_breakdown.py +152 -0
- onfido/models/document_breakdown_age_validation.py +106 -0
- onfido/models/document_breakdown_age_validation_breakdown.py +104 -0
- onfido/models/document_breakdown_compromised_document.py +106 -0
- onfido/models/document_breakdown_compromised_document_breakdown.py +109 -0
- onfido/models/document_breakdown_data_comparison.py +106 -0
- onfido/models/document_breakdown_data_comparison_breakdown.py +139 -0
- onfido/models/document_breakdown_data_comparison_breakdown_issuing_country.py +102 -0
- onfido/models/document_breakdown_data_consistency.py +106 -0
- onfido/models/document_breakdown_data_consistency_breakdown.py +149 -0
- onfido/models/document_breakdown_data_validation.py +106 -0
- onfido/models/document_breakdown_data_validation_breakdown.py +136 -0
- onfido/models/document_breakdown_data_validation_breakdown_document_expiration.py +102 -0
- onfido/models/document_breakdown_data_validation_breakdown_expiry_date.py +102 -0
- onfido/models/document_breakdown_image_integrity.py +106 -0
- onfido/models/document_breakdown_image_integrity_breakdown.py +122 -0
- onfido/models/document_breakdown_image_integrity_breakdown_colour_picture.py +102 -0
- onfido/models/document_breakdown_image_integrity_breakdown_conclusive_document_quality.py +106 -0
- onfido/models/document_breakdown_image_integrity_breakdown_image_quality.py +106 -0
- onfido/models/document_breakdown_image_integrity_breakdown_supported_document.py +102 -0
- onfido/models/document_breakdown_issuing_authority.py +106 -0
- onfido/models/document_breakdown_issuing_authority_breakdown.py +110 -0
- onfido/models/document_breakdown_issuing_authority_breakdown_nfc_active_authentication.py +102 -0
- onfido/models/document_breakdown_issuing_authority_breakdown_nfc_passive_authentication.py +102 -0
- onfido/models/document_breakdown_police_record.py +100 -0
- onfido/models/document_breakdown_visual_authenticity.py +106 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown.py +146 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_digital_tampering.py +102 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_face_detection.py +102 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_fonts.py +102 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_original_document_present.py +106 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_other.py +102 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_picture_face_integrity.py +102 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_security_features.py +102 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_template.py +102 -0
- onfido/models/document_cdq_reasons.py +114 -0
- onfido/models/document_iq_reasons.py +118 -0
- onfido/models/document_odp_reasons.py +106 -0
- onfido/models/document_properties.py +253 -0
- onfido/models/document_properties_address_lines.py +110 -0
- onfido/models/document_properties_barcode_inner.py +135 -0
- onfido/models/document_properties_document_classification.py +104 -0
- onfido/models/document_properties_document_numbers_inner.py +102 -0
- onfido/models/document_properties_driving_licence_information.py +107 -0
- onfido/models/document_properties_extracted_data.py +141 -0
- onfido/models/document_properties_nfc.py +125 -0
- onfido/models/document_report.py +141 -0
- onfido/models/document_response.py +111 -0
- onfido/models/document_shared.py +129 -0
- onfido/models/document_types.py +60 -0
- onfido/models/document_video_report.py +141 -0
- onfido/models/document_video_with_address_information_report.py +141 -0
- onfido/models/document_with_address_information_report.py +141 -0
- onfido/models/document_with_driver_verification_report.py +141 -0
- onfido/models/document_with_driver_verification_report_all_of_properties.py +277 -0
- onfido/models/document_with_driver_verification_report_all_of_properties_all_of_passenger_vehicle.py +105 -0
- onfido/models/document_with_driver_verification_report_all_of_properties_all_of_vehicle_class_details_inner.py +107 -0
- onfido/models/document_with_driving_licence_information_report.py +141 -0
- onfido/models/documents_list.py +108 -0
- onfido/models/error.py +104 -0
- onfido/models/error1.py +106 -0
- onfido/models/error_properties.py +104 -0
- onfido/models/error_properties1.py +102 -0
- onfido/models/extract_request.py +100 -0
- onfido/models/extraction.py +112 -0
- onfido/models/extraction_document_classification.py +120 -0
- onfido/models/extraction_extracted_data.py +176 -0
- onfido/models/facial_similarity_motion_breakdown.py +116 -0
- onfido/models/facial_similarity_motion_breakdown_face_comparison.py +106 -0
- onfido/models/facial_similarity_motion_breakdown_image_integrity.py +106 -0
- onfido/models/facial_similarity_motion_breakdown_image_integrity_breakdown.py +110 -0
- onfido/models/facial_similarity_motion_breakdown_image_integrity_breakdown_face_detected.py +102 -0
- onfido/models/facial_similarity_motion_breakdown_image_integrity_breakdown_source_integrity.py +106 -0
- onfido/models/facial_similarity_motion_breakdown_visual_authenticity.py +106 -0
- onfido/models/facial_similarity_motion_breakdown_visual_authenticity_breakdown.py +110 -0
- onfido/models/facial_similarity_motion_breakdown_visual_authenticity_breakdown_spoofing_detection.py +106 -0
- onfido/models/facial_similarity_motion_properties.py +100 -0
- onfido/models/facial_similarity_motion_report.py +141 -0
- onfido/models/facial_similarity_photo_breakdown.py +116 -0
- onfido/models/facial_similarity_photo_breakdown_face_comparison.py +106 -0
- onfido/models/facial_similarity_photo_breakdown_face_comparison_breakdown.py +104 -0
- onfido/models/facial_similarity_photo_breakdown_face_comparison_breakdown_face_match.py +106 -0
- onfido/models/facial_similarity_photo_breakdown_face_comparison_breakdown_face_match_properties.py +102 -0
- onfido/models/facial_similarity_photo_breakdown_image_integrity.py +106 -0
- onfido/models/facial_similarity_photo_breakdown_image_integrity_breakdown.py +110 -0
- onfido/models/facial_similarity_photo_breakdown_image_integrity_breakdown_face_detected.py +102 -0
- onfido/models/facial_similarity_photo_breakdown_image_integrity_breakdown_source_integrity.py +106 -0
- onfido/models/facial_similarity_photo_breakdown_visual_authenticity.py +106 -0
- onfido/models/facial_similarity_photo_breakdown_visual_authenticity_breakdown.py +104 -0
- onfido/models/facial_similarity_photo_breakdown_visual_authenticity_breakdown_spoofing_detection.py +106 -0
- onfido/models/facial_similarity_photo_breakdown_visual_authenticity_breakdown_spoofing_detection_properties.py +100 -0
- onfido/models/facial_similarity_photo_fully_auto_breakdown.py +116 -0
- onfido/models/facial_similarity_photo_fully_auto_breakdown_image_integrity.py +106 -0
- onfido/models/facial_similarity_photo_fully_auto_breakdown_image_integrity_breakdown.py +110 -0
- onfido/models/facial_similarity_photo_fully_auto_breakdown_image_integrity_breakdown_source_integrity.py +106 -0
- onfido/models/facial_similarity_photo_fully_auto_properties.py +100 -0
- onfido/models/facial_similarity_photo_fully_auto_report.py +141 -0
- onfido/models/facial_similarity_photo_properties.py +100 -0
- onfido/models/facial_similarity_photo_report.py +141 -0
- onfido/models/facial_similarity_video_breakdown.py +116 -0
- onfido/models/facial_similarity_video_breakdown_face_comparison.py +106 -0
- onfido/models/facial_similarity_video_breakdown_image_integrity.py +106 -0
- onfido/models/facial_similarity_video_breakdown_image_integrity_breakdown.py +110 -0
- onfido/models/facial_similarity_video_breakdown_image_integrity_breakdown_face_detected.py +102 -0
- onfido/models/facial_similarity_video_breakdown_image_integrity_breakdown_source_integrity.py +106 -0
- onfido/models/facial_similarity_video_breakdown_visual_authenticity.py +106 -0
- onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown.py +110 -0
- onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown_liveness_detected.py +102 -0
- onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown_spoofing_detection.py +106 -0
- onfido/models/facial_similarity_video_properties.py +100 -0
- onfido/models/facial_similarity_video_report.py +141 -0
- onfido/models/id_number.py +114 -0
- onfido/models/id_photo.py +113 -0
- onfido/models/id_photo_response.py +113 -0
- onfido/models/id_photos_list.py +108 -0
- onfido/models/identity_enhanced_breakdown.py +122 -0
- onfido/models/identity_enhanced_breakdown_address.py +106 -0
- onfido/models/identity_enhanced_breakdown_address_breakdown.py +116 -0
- onfido/models/identity_enhanced_breakdown_address_breakdown_credit_agencies.py +106 -0
- onfido/models/identity_enhanced_breakdown_address_breakdown_credit_agencies_properties.py +100 -0
- onfido/models/identity_enhanced_breakdown_address_breakdown_telephone_database.py +102 -0
- onfido/models/identity_enhanced_breakdown_address_breakdown_voting_register.py +102 -0
- onfido/models/identity_enhanced_breakdown_date_of_birth.py +106 -0
- onfido/models/identity_enhanced_breakdown_date_of_birth_breakdown.py +110 -0
- onfido/models/identity_enhanced_breakdown_date_of_birth_breakdown_credit_agencies.py +102 -0
- onfido/models/identity_enhanced_breakdown_date_of_birth_breakdown_voting_register.py +102 -0
- onfido/models/identity_enhanced_breakdown_mortality.py +100 -0
- onfido/models/identity_enhanced_breakdown_sources.py +106 -0
- onfido/models/identity_enhanced_breakdown_sources_breakdown.py +104 -0
- onfido/models/identity_enhanced_breakdown_sources_breakdown_total_sources.py +106 -0
- onfido/models/identity_enhanced_breakdown_sources_breakdown_total_sources_properties.py +100 -0
- onfido/models/identity_enhanced_properties.py +110 -0
- onfido/models/identity_enhanced_properties_matched_addresses_inner.py +102 -0
- onfido/models/identity_enhanced_report.py +141 -0
- onfido/models/india_pan_report.py +141 -0
- onfido/models/india_pan_report_all_of_breakdown.py +104 -0
- onfido/models/india_pan_report_all_of_breakdown_device.py +104 -0
- onfido/models/india_pan_report_all_of_breakdown_device_breakdown.py +109 -0
- onfido/models/india_pan_report_all_of_breakdown_device_breakdown_pan_valid.py +100 -0
- onfido/models/india_pan_report_all_of_properties.py +104 -0
- onfido/models/india_pan_report_all_of_properties_device.py +102 -0
- onfido/models/known_faces_breakdown.py +110 -0
- onfido/models/known_faces_breakdown_image_integrity.py +100 -0
- onfido/models/known_faces_breakdown_previously_seen_faces.py +100 -0
- onfido/models/known_faces_properties.py +108 -0
- onfido/models/known_faces_properties_matches_inner.py +108 -0
- onfido/models/known_faces_report.py +141 -0
- onfido/models/live_photo.py +113 -0
- onfido/models/live_photo_response.py +113 -0
- onfido/models/live_photos_list.py +108 -0
- onfido/models/live_video.py +115 -0
- onfido/models/live_videos_list.py +108 -0
- onfido/models/location.py +103 -0
- onfido/models/location_builder.py +103 -0
- onfido/models/location_shared.py +103 -0
- onfido/models/motion_capture.py +113 -0
- onfido/models/motion_captures_list.py +108 -0
- onfido/models/photo_auto_reasons.py +108 -0
- onfido/models/photo_reasons.py +108 -0
- onfido/models/proof_of_address_breakdown.py +116 -0
- onfido/models/proof_of_address_breakdown_data_comparison.py +106 -0
- onfido/models/proof_of_address_breakdown_data_comparison_breakdown.py +114 -0
- onfido/models/proof_of_address_breakdown_document_classification.py +106 -0
- onfido/models/proof_of_address_breakdown_document_classification_breakdown.py +104 -0
- onfido/models/proof_of_address_breakdown_image_integrity.py +106 -0
- onfido/models/proof_of_address_breakdown_image_integrity_breakdown.py +104 -0
- onfido/models/proof_of_address_properties.py +125 -0
- onfido/models/proof_of_address_report.py +141 -0
- onfido/models/repeat_attempts_list.py +117 -0
- onfido/models/repeat_attempts_list_repeat_attempts_inner.py +143 -0
- onfido/models/report.py +621 -0
- onfido/models/report_document.py +100 -0
- onfido/models/report_name.py +56 -0
- onfido/models/report_result.py +38 -0
- onfido/models/report_shared.py +129 -0
- onfido/models/report_status.py +40 -0
- onfido/models/report_sub_result.py +39 -0
- onfido/models/reports_list.py +108 -0
- onfido/models/results_feedback.py +116 -0
- onfido/models/sdk_token.py +100 -0
- onfido/models/sdk_token_builder.py +106 -0
- onfido/models/sdk_token_request.py +106 -0
- onfido/models/sdk_token_response.py +100 -0
- onfido/models/task.py +146 -0
- onfido/models/task_item.py +128 -0
- onfido/models/timeline_file_reference.py +102 -0
- onfido/models/us_driving_licence_breakdown.py +116 -0
- onfido/models/us_driving_licence_breakdown_address.py +106 -0
- onfido/models/us_driving_licence_breakdown_address_breakdown.py +129 -0
- onfido/models/us_driving_licence_breakdown_document.py +106 -0
- onfido/models/us_driving_licence_breakdown_document_breakdown.py +119 -0
- onfido/models/us_driving_licence_breakdown_personal.py +106 -0
- onfido/models/us_driving_licence_breakdown_personal_breakdown.py +164 -0
- onfido/models/us_driving_licence_builder.py +185 -0
- onfido/models/us_driving_licence_report.py +141 -0
- onfido/models/us_driving_licence_shared.py +185 -0
- onfido/models/video_reasons.py +106 -0
- onfido/models/watchlist_aml_breakdown.py +122 -0
- onfido/models/watchlist_aml_breakdown_adverse_media.py +100 -0
- onfido/models/watchlist_aml_breakdown_legal_and_regulatory_warnings.py +100 -0
- onfido/models/watchlist_aml_breakdown_politically_exposed_person.py +100 -0
- onfido/models/watchlist_aml_breakdown_sanction.py +100 -0
- onfido/models/watchlist_aml_properties.py +100 -0
- onfido/models/watchlist_aml_report.py +141 -0
- onfido/models/watchlist_enhanced_breakdown.py +122 -0
- onfido/models/watchlist_enhanced_properties.py +100 -0
- onfido/models/watchlist_enhanced_report.py +141 -0
- onfido/models/watchlist_monitor.py +120 -0
- onfido/models/watchlist_monitor_builder.py +111 -0
- onfido/models/watchlist_monitor_match.py +102 -0
- onfido/models/watchlist_monitor_matches_list.py +108 -0
- onfido/models/watchlist_monitor_matches_updater.py +102 -0
- onfido/models/watchlist_monitor_response.py +107 -0
- onfido/models/watchlist_monitor_shared.py +111 -0
- onfido/models/watchlist_monitors_list.py +108 -0
- onfido/models/watchlist_peps_only_report.py +141 -0
- onfido/models/watchlist_sanctions_only_report.py +141 -0
- onfido/models/watchlist_standard_breakdown.py +116 -0
- onfido/models/watchlist_standard_properties.py +100 -0
- onfido/models/watchlist_standard_report.py +141 -0
- onfido/models/webhook.py +115 -0
- onfido/models/webhook_builder.py +109 -0
- onfido/models/webhook_create.py +100 -0
- onfido/models/webhook_event.py +104 -0
- onfido/models/webhook_event_payload.py +111 -0
- onfido/models/webhook_event_payload_object.py +107 -0
- onfido/models/webhook_event_type.py +52 -0
- onfido/models/webhook_resend.py +108 -0
- onfido/models/webhook_response.py +106 -0
- onfido/models/webhook_shared.py +107 -0
- onfido/models/webhook_update.py +100 -0
- onfido/models/webhook_updater.py +109 -0
- onfido/models/webhooks_list.py +108 -0
- onfido/models/webhooks_resend_item.py +103 -0
- onfido/models/workflow_run.py +149 -0
- onfido/models/workflow_run_builder.py +123 -0
- onfido/models/workflow_run_request.py +100 -0
- onfido/models/workflow_run_response.py +126 -0
- onfido/models/workflow_run_response_error.py +102 -0
- onfido/models/workflow_run_shared.py +121 -0
- onfido/models/workflow_run_shared_link.py +119 -0
- onfido/py.typed +0 -0
- onfido/rest.py +258 -0
- onfido/webhook_event_verifier.py +14 -7
- {onfido_python-2.10.1.dist-info → onfido_python-3.2.0.dist-info}/LICENSE +1 -1
- onfido_python-3.2.0.dist-info/METADATA +18 -0
- onfido_python-3.2.0.dist-info/RECORD +291 -0
- {onfido_python-2.10.1.dist-info → onfido_python-3.2.0.dist-info}/WHEEL +2 -1
- onfido_python-3.2.0.dist-info/top_level.txt +1 -0
- onfido/aio_resource.py +0 -131
- onfido/mimetype.py +0 -5
- onfido/onfido.py +0 -71
- onfido/onfido_download.py +0 -11
- onfido/regions.py +0 -11
- onfido/resource.py +0 -88
- onfido/resources/address_picker.py +0 -6
- onfido/resources/applicants.py +0 -23
- onfido/resources/checks.py +0 -19
- onfido/resources/documents.py +0 -16
- onfido/resources/extraction.py +0 -6
- onfido/resources/live_photos.py +0 -17
- onfido/resources/live_videos.py +0 -16
- onfido/resources/motion_captures.py +0 -16
- onfido/resources/reports.py +0 -16
- onfido/resources/sdk_tokens.py +0 -5
- onfido/resources/watchlist_monitors.py +0 -16
- onfido/resources/webhooks.py +0 -18
- onfido/resources/workflow_runs.py +0 -17
- onfido/resources_aio/address_picker.py +0 -6
- onfido/resources_aio/applicants.py +0 -23
- onfido/resources_aio/checks.py +0 -19
- onfido/resources_aio/documents.py +0 -16
- onfido/resources_aio/extraction.py +0 -6
- onfido/resources_aio/live_photos.py +0 -17
- onfido/resources_aio/live_videos.py +0 -16
- onfido/resources_aio/motion_captures.py +0 -16
- onfido/resources_aio/reports.py +0 -16
- onfido/resources_aio/sdk_tokens.py +0 -6
- onfido/resources_aio/watchlist_monitors.py +0 -16
- onfido/resources_aio/webhooks.py +0 -18
- onfido/resources_aio/workflow_runs.py +0 -17
- onfido/utils.py +0 -22
- onfido_python-2.10.1.dist-info/METADATA +0 -181
- onfido_python-2.10.1.dist-info/RECORD +0 -40
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Onfido API v3.6
|
|
5
|
+
|
|
6
|
+
The Onfido API (v3.6)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v3.6
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from onfido.models.watchlist_aml_breakdown_legal_and_regulatory_warnings import WatchlistAmlBreakdownLegalAndRegulatoryWarnings
|
|
23
|
+
from onfido.models.watchlist_aml_breakdown_politically_exposed_person import WatchlistAmlBreakdownPoliticallyExposedPerson
|
|
24
|
+
from onfido.models.watchlist_aml_breakdown_sanction import WatchlistAmlBreakdownSanction
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class WatchlistStandardBreakdown(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
WatchlistStandardBreakdown
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
sanction: Optional[WatchlistAmlBreakdownSanction] = None
|
|
33
|
+
politically_exposed_person: Optional[WatchlistAmlBreakdownPoliticallyExposedPerson] = None
|
|
34
|
+
legal_and_regulatory_warnings: Optional[WatchlistAmlBreakdownLegalAndRegulatoryWarnings] = None
|
|
35
|
+
additional_properties: Dict[str, Any] = {}
|
|
36
|
+
__properties: ClassVar[List[str]] = ["sanction", "politically_exposed_person", "legal_and_regulatory_warnings"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of WatchlistStandardBreakdown from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
69
|
+
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
"additional_properties",
|
|
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 sanction
|
|
80
|
+
if self.sanction:
|
|
81
|
+
_dict['sanction'] = self.sanction.to_dict()
|
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of politically_exposed_person
|
|
83
|
+
if self.politically_exposed_person:
|
|
84
|
+
_dict['politically_exposed_person'] = self.politically_exposed_person.to_dict()
|
|
85
|
+
# override the default output from pydantic by calling `to_dict()` of legal_and_regulatory_warnings
|
|
86
|
+
if self.legal_and_regulatory_warnings:
|
|
87
|
+
_dict['legal_and_regulatory_warnings'] = self.legal_and_regulatory_warnings.to_dict()
|
|
88
|
+
# puts key-value pairs in additional_properties in the top level
|
|
89
|
+
if self.additional_properties is not None:
|
|
90
|
+
for _key, _value in self.additional_properties.items():
|
|
91
|
+
_dict[_key] = _value
|
|
92
|
+
|
|
93
|
+
return _dict
|
|
94
|
+
|
|
95
|
+
@classmethod
|
|
96
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
97
|
+
"""Create an instance of WatchlistStandardBreakdown from a dict"""
|
|
98
|
+
if obj is None:
|
|
99
|
+
return None
|
|
100
|
+
|
|
101
|
+
if not isinstance(obj, dict):
|
|
102
|
+
return cls.model_validate(obj)
|
|
103
|
+
|
|
104
|
+
_obj = cls.model_validate({
|
|
105
|
+
"sanction": WatchlistAmlBreakdownSanction.from_dict(obj["sanction"]) if obj.get("sanction") is not None else None,
|
|
106
|
+
"politically_exposed_person": WatchlistAmlBreakdownPoliticallyExposedPerson.from_dict(obj["politically_exposed_person"]) if obj.get("politically_exposed_person") is not None else None,
|
|
107
|
+
"legal_and_regulatory_warnings": WatchlistAmlBreakdownLegalAndRegulatoryWarnings.from_dict(obj["legal_and_regulatory_warnings"]) if obj.get("legal_and_regulatory_warnings") is not None else None
|
|
108
|
+
})
|
|
109
|
+
# store additional fields in additional_properties
|
|
110
|
+
for _key in obj.keys():
|
|
111
|
+
if _key not in cls.__properties:
|
|
112
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
113
|
+
|
|
114
|
+
return _obj
|
|
115
|
+
|
|
116
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Onfido API v3.6
|
|
5
|
+
|
|
6
|
+
The Onfido API (v3.6)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v3.6
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class WatchlistStandardProperties(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
WatchlistStandardProperties
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
records: Optional[List[StrictStr]] = Field(default=None, description="Returns any matches including, but not limited to, name and date of birth of match, aliases and associates, and relevant events and sources.")
|
|
30
|
+
additional_properties: Dict[str, Any] = {}
|
|
31
|
+
__properties: ClassVar[List[str]] = ["records"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of WatchlistStandardProperties from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
"additional_properties",
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# puts key-value pairs in additional_properties in the top level
|
|
75
|
+
if self.additional_properties is not None:
|
|
76
|
+
for _key, _value in self.additional_properties.items():
|
|
77
|
+
_dict[_key] = _value
|
|
78
|
+
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of WatchlistStandardProperties 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
|
+
"records": obj.get("records")
|
|
92
|
+
})
|
|
93
|
+
# store additional fields in additional_properties
|
|
94
|
+
for _key in obj.keys():
|
|
95
|
+
if _key not in cls.__properties:
|
|
96
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
97
|
+
|
|
98
|
+
return _obj
|
|
99
|
+
|
|
100
|
+
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Onfido API v3.6
|
|
5
|
+
|
|
6
|
+
The Onfido API (v3.6)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v3.6
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from onfido.models.report_document import ReportDocument
|
|
24
|
+
from onfido.models.report_name import ReportName
|
|
25
|
+
from onfido.models.report_result import ReportResult
|
|
26
|
+
from onfido.models.report_status import ReportStatus
|
|
27
|
+
from onfido.models.report_sub_result import ReportSubResult
|
|
28
|
+
from onfido.models.watchlist_standard_breakdown import WatchlistStandardBreakdown
|
|
29
|
+
from onfido.models.watchlist_standard_properties import WatchlistStandardProperties
|
|
30
|
+
from typing import Optional, Set
|
|
31
|
+
from typing_extensions import Self
|
|
32
|
+
|
|
33
|
+
class WatchlistStandardReport(BaseModel):
|
|
34
|
+
"""
|
|
35
|
+
WatchlistStandardReport
|
|
36
|
+
""" # noqa: E501
|
|
37
|
+
id: StrictStr = Field(description="The unique identifier for the report. Read-only.")
|
|
38
|
+
created_at: Optional[datetime] = Field(default=None, description="The date and time at which the report was first initiated. Read-only.")
|
|
39
|
+
href: Optional[StrictStr] = Field(default=None, description="The API endpoint to retrieve the report. Read-only.")
|
|
40
|
+
status: Optional[ReportStatus] = None
|
|
41
|
+
result: Optional[ReportResult] = None
|
|
42
|
+
sub_result: Optional[ReportSubResult] = None
|
|
43
|
+
check_id: Optional[StrictStr] = Field(default=None, description="The ID of the check to which the report belongs. Read-only.")
|
|
44
|
+
documents: Optional[List[ReportDocument]] = Field(default=None, description="Array of objects with document ids that were used in the Onfido engine. [ONLY POPULATED FOR DOCUMENT AND FACIAL SIMILARITY REPORTS]")
|
|
45
|
+
name: ReportName
|
|
46
|
+
breakdown: Optional[WatchlistStandardBreakdown] = None
|
|
47
|
+
properties: Optional[WatchlistStandardProperties] = None
|
|
48
|
+
additional_properties: Dict[str, Any] = {}
|
|
49
|
+
__properties: ClassVar[List[str]] = ["id", "created_at", "href", "status", "result", "sub_result", "check_id", "documents", "name", "breakdown", "properties"]
|
|
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 WatchlistStandardReport 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
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
82
|
+
"""
|
|
83
|
+
excluded_fields: Set[str] = set([
|
|
84
|
+
"additional_properties",
|
|
85
|
+
])
|
|
86
|
+
|
|
87
|
+
_dict = self.model_dump(
|
|
88
|
+
by_alias=True,
|
|
89
|
+
exclude=excluded_fields,
|
|
90
|
+
exclude_none=True,
|
|
91
|
+
)
|
|
92
|
+
# override the default output from pydantic by calling `to_dict()` of each item in documents (list)
|
|
93
|
+
_items = []
|
|
94
|
+
if self.documents:
|
|
95
|
+
for _item in self.documents:
|
|
96
|
+
if _item:
|
|
97
|
+
_items.append(_item.to_dict())
|
|
98
|
+
_dict['documents'] = _items
|
|
99
|
+
# override the default output from pydantic by calling `to_dict()` of breakdown
|
|
100
|
+
if self.breakdown:
|
|
101
|
+
_dict['breakdown'] = self.breakdown.to_dict()
|
|
102
|
+
# override the default output from pydantic by calling `to_dict()` of properties
|
|
103
|
+
if self.properties:
|
|
104
|
+
_dict['properties'] = self.properties.to_dict()
|
|
105
|
+
# puts key-value pairs in additional_properties in the top level
|
|
106
|
+
if self.additional_properties is not None:
|
|
107
|
+
for _key, _value in self.additional_properties.items():
|
|
108
|
+
_dict[_key] = _value
|
|
109
|
+
|
|
110
|
+
return _dict
|
|
111
|
+
|
|
112
|
+
@classmethod
|
|
113
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
114
|
+
"""Create an instance of WatchlistStandardReport from a dict"""
|
|
115
|
+
if obj is None:
|
|
116
|
+
return None
|
|
117
|
+
|
|
118
|
+
if not isinstance(obj, dict):
|
|
119
|
+
return cls.model_validate(obj)
|
|
120
|
+
|
|
121
|
+
_obj = cls.model_validate({
|
|
122
|
+
"id": obj.get("id"),
|
|
123
|
+
"created_at": obj.get("created_at"),
|
|
124
|
+
"href": obj.get("href"),
|
|
125
|
+
"status": obj.get("status"),
|
|
126
|
+
"result": obj.get("result"),
|
|
127
|
+
"sub_result": obj.get("sub_result"),
|
|
128
|
+
"check_id": obj.get("check_id"),
|
|
129
|
+
"documents": [ReportDocument.from_dict(_item) for _item in obj["documents"]] if obj.get("documents") is not None else None,
|
|
130
|
+
"name": obj.get("name"),
|
|
131
|
+
"breakdown": WatchlistStandardBreakdown.from_dict(obj["breakdown"]) if obj.get("breakdown") is not None else None,
|
|
132
|
+
"properties": WatchlistStandardProperties.from_dict(obj["properties"]) if obj.get("properties") is not None else None
|
|
133
|
+
})
|
|
134
|
+
# store additional fields in additional_properties
|
|
135
|
+
for _key in obj.keys():
|
|
136
|
+
if _key not in cls.__properties:
|
|
137
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
138
|
+
|
|
139
|
+
return _obj
|
|
140
|
+
|
|
141
|
+
|
onfido/models/webhook.py
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Onfido API v3.6
|
|
5
|
+
|
|
6
|
+
The Onfido API (v3.6)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v3.6
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from onfido.models.webhook_event_type import WebhookEventType
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class Webhook(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
Webhook
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
enabled: Optional[StrictBool] = Field(default=None, description="Determine if the webhook is active.")
|
|
31
|
+
events: Optional[List[WebhookEventType]] = Field(default=None, description="The events that will be published to the webhook. If the events parameter is omitted all the events will be subscribed. ")
|
|
32
|
+
environments: Optional[List[StrictStr]] = Field(default=None, description="The environments from which the webhook will receive events. Allowed values are “sandbox” and “live”. If the environments parameter is omitted the webhook will receive events from both environments. ")
|
|
33
|
+
payload_version: Optional[StrictInt] = Field(default=None, description="Webhook version used to control the payload object when sending webhooks.")
|
|
34
|
+
id: StrictStr = Field(description="The unique identifier of the webhook.")
|
|
35
|
+
url: Optional[StrictStr] = Field(default=None, description="The url that will listen to notifications (must be https).")
|
|
36
|
+
token: Optional[StrictStr] = Field(default=None, description="Webhook secret token used to sign the webhook's payload.")
|
|
37
|
+
href: Optional[StrictStr] = Field(default=None, description="The API endpoint to retrieve the webhook.")
|
|
38
|
+
additional_properties: Dict[str, Any] = {}
|
|
39
|
+
__properties: ClassVar[List[str]] = ["enabled", "events", "environments", "payload_version", "id", "url", "token", "href"]
|
|
40
|
+
|
|
41
|
+
model_config = ConfigDict(
|
|
42
|
+
populate_by_name=True,
|
|
43
|
+
validate_assignment=True,
|
|
44
|
+
protected_namespaces=(),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def to_str(self) -> str:
|
|
49
|
+
"""Returns the string representation of the model using alias"""
|
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
51
|
+
|
|
52
|
+
def to_json(self) -> str:
|
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
|
54
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
55
|
+
return json.dumps(self.to_dict())
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
|
+
"""Create an instance of Webhook from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
61
|
+
|
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
|
64
|
+
|
|
65
|
+
This has the following differences from calling pydantic's
|
|
66
|
+
`self.model_dump(by_alias=True)`:
|
|
67
|
+
|
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
|
69
|
+
were set at model initialization. Other fields with value `None`
|
|
70
|
+
are ignored.
|
|
71
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
72
|
+
"""
|
|
73
|
+
excluded_fields: Set[str] = set([
|
|
74
|
+
"additional_properties",
|
|
75
|
+
])
|
|
76
|
+
|
|
77
|
+
_dict = self.model_dump(
|
|
78
|
+
by_alias=True,
|
|
79
|
+
exclude=excluded_fields,
|
|
80
|
+
exclude_none=True,
|
|
81
|
+
)
|
|
82
|
+
# puts key-value pairs in additional_properties in the top level
|
|
83
|
+
if self.additional_properties is not None:
|
|
84
|
+
for _key, _value in self.additional_properties.items():
|
|
85
|
+
_dict[_key] = _value
|
|
86
|
+
|
|
87
|
+
return _dict
|
|
88
|
+
|
|
89
|
+
@classmethod
|
|
90
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
91
|
+
"""Create an instance of Webhook from a dict"""
|
|
92
|
+
if obj is None:
|
|
93
|
+
return None
|
|
94
|
+
|
|
95
|
+
if not isinstance(obj, dict):
|
|
96
|
+
return cls.model_validate(obj)
|
|
97
|
+
|
|
98
|
+
_obj = cls.model_validate({
|
|
99
|
+
"enabled": obj.get("enabled"),
|
|
100
|
+
"events": obj.get("events"),
|
|
101
|
+
"environments": obj.get("environments"),
|
|
102
|
+
"payload_version": obj.get("payload_version"),
|
|
103
|
+
"id": obj.get("id"),
|
|
104
|
+
"url": obj.get("url"),
|
|
105
|
+
"token": obj.get("token"),
|
|
106
|
+
"href": obj.get("href")
|
|
107
|
+
})
|
|
108
|
+
# store additional fields in additional_properties
|
|
109
|
+
for _key in obj.keys():
|
|
110
|
+
if _key not in cls.__properties:
|
|
111
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
112
|
+
|
|
113
|
+
return _obj
|
|
114
|
+
|
|
115
|
+
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Onfido API v3.6
|
|
5
|
+
|
|
6
|
+
The Onfido API (v3.6)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v3.6
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from onfido.models.webhook_event_type import WebhookEventType
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class WebhookBuilder(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
WebhookBuilder
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
enabled: Optional[StrictBool] = Field(default=None, description="Determine if the webhook is active.")
|
|
31
|
+
events: Optional[List[WebhookEventType]] = Field(default=None, description="The events that will be published to the webhook. If the events parameter is omitted all the events will be subscribed. ")
|
|
32
|
+
environments: Optional[List[StrictStr]] = Field(default=None, description="The environments from which the webhook will receive events. Allowed values are “sandbox” and “live”. If the environments parameter is omitted the webhook will receive events from both environments. ")
|
|
33
|
+
payload_version: Optional[StrictInt] = Field(default=None, description="Webhook version used to control the payload object when sending webhooks.")
|
|
34
|
+
url: StrictStr = Field(description="The url that will listen to notifications (must be https).")
|
|
35
|
+
additional_properties: Dict[str, Any] = {}
|
|
36
|
+
__properties: ClassVar[List[str]] = ["enabled", "events", "environments", "payload_version", "url"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of WebhookBuilder from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
69
|
+
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
"additional_properties",
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
# puts key-value pairs in additional_properties in the top level
|
|
80
|
+
if self.additional_properties is not None:
|
|
81
|
+
for _key, _value in self.additional_properties.items():
|
|
82
|
+
_dict[_key] = _value
|
|
83
|
+
|
|
84
|
+
return _dict
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
+
"""Create an instance of WebhookBuilder from a dict"""
|
|
89
|
+
if obj is None:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
if not isinstance(obj, dict):
|
|
93
|
+
return cls.model_validate(obj)
|
|
94
|
+
|
|
95
|
+
_obj = cls.model_validate({
|
|
96
|
+
"enabled": obj.get("enabled"),
|
|
97
|
+
"events": obj.get("events"),
|
|
98
|
+
"environments": obj.get("environments"),
|
|
99
|
+
"payload_version": obj.get("payload_version"),
|
|
100
|
+
"url": obj.get("url")
|
|
101
|
+
})
|
|
102
|
+
# store additional fields in additional_properties
|
|
103
|
+
for _key in obj.keys():
|
|
104
|
+
if _key not in cls.__properties:
|
|
105
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
106
|
+
|
|
107
|
+
return _obj
|
|
108
|
+
|
|
109
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Onfido API v3.6
|
|
5
|
+
|
|
6
|
+
The Onfido API (v3.6)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v3.6
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class WebhookCreate(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
WebhookCreate
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
url: StrictStr = Field(description="The url that will listen to notifications (must be https).")
|
|
30
|
+
additional_properties: Dict[str, Any] = {}
|
|
31
|
+
__properties: ClassVar[List[str]] = ["url"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of WebhookCreate from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
"additional_properties",
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# puts key-value pairs in additional_properties in the top level
|
|
75
|
+
if self.additional_properties is not None:
|
|
76
|
+
for _key, _value in self.additional_properties.items():
|
|
77
|
+
_dict[_key] = _value
|
|
78
|
+
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of WebhookCreate 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
|
+
"url": obj.get("url")
|
|
92
|
+
})
|
|
93
|
+
# store additional fields in additional_properties
|
|
94
|
+
for _key in obj.keys():
|
|
95
|
+
if _key not in cls.__properties:
|
|
96
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
97
|
+
|
|
98
|
+
return _obj
|
|
99
|
+
|
|
100
|
+
|