onfido 5.7.0 → 6.1.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/MIGRATION.md +28 -0
- data/README.md +2 -2
- data/lib/onfido/api/default_api.rb +8 -5
- data/lib/onfido/api_client.rb +2 -2
- data/lib/onfido/api_error.rb +1 -1
- data/lib/onfido/configuration.rb +1 -2
- data/lib/onfido/models/address.rb +30 -4
- data/lib/onfido/models/address_builder.rb +30 -4
- data/lib/onfido/models/address_shared.rb +30 -4
- data/lib/onfido/models/addresses_list.rb +10 -4
- data/lib/onfido/models/applicant.rb +20 -4
- data/lib/onfido/models/applicant_builder.rb +10 -4
- data/lib/onfido/models/applicant_consent.rb +30 -4
- data/lib/onfido/models/applicant_consent_builder.rb +30 -4
- data/lib/onfido/models/applicant_consent_name.rb +1 -1
- data/lib/onfido/models/applicant_create.rb +10 -4
- data/lib/onfido/models/applicant_request.rb +10 -4
- data/lib/onfido/models/applicant_response.rb +20 -4
- data/lib/onfido/models/applicant_shared.rb +10 -4
- data/lib/onfido/models/applicant_update.rb +10 -4
- data/lib/onfido/models/applicant_updater.rb +10 -4
- data/lib/onfido/models/applicants_list.rb +20 -4
- data/lib/onfido/models/check.rb +30 -4
- data/lib/onfido/models/check_builder.rb +30 -4
- data/lib/onfido/models/check_request.rb +20 -4
- data/lib/onfido/models/check_response.rb +20 -4
- data/lib/onfido/models/check_shared.rb +20 -4
- data/lib/onfido/models/check_status.rb +1 -1
- data/lib/onfido/models/checks_list.rb +20 -4
- data/lib/onfido/models/complete_task_builder.rb +20 -4
- data/lib/onfido/models/complete_task_data_builder.rb +3 -4
- data/lib/onfido/models/country_codes.rb +1 -1
- data/lib/onfido/models/device_intelligence_breakdown.rb +14 -26
- data/lib/onfido/models/device_intelligence_breakdown_device.rb +10 -4
- data/lib/onfido/models/device_intelligence_breakdown_device_breakdown.rb +10 -4
- data/lib/onfido/models/device_intelligence_properties.rb +13 -7
- data/lib/onfido/models/{device_intelligence_breakdown_properties_device.rb → device_intelligence_properties_device.rb} +33 -7
- data/lib/onfido/models/{device_intelligence_breakdown_properties_geolocation.rb → device_intelligence_properties_geolocation.rb} +12 -6
- data/lib/onfido/models/{device_intelligence_breakdown_properties_ip.rb → device_intelligence_properties_ip.rb} +12 -6
- data/lib/onfido/models/device_intelligence_report.rb +30 -4
- data/lib/onfido/models/document.rb +20 -4
- data/lib/onfido/models/document_breakdown.rb +10 -4
- data/lib/onfido/models/document_breakdown_age_validation.rb +10 -4
- data/lib/onfido/models/document_breakdown_age_validation_breakdown.rb +10 -4
- data/lib/onfido/models/document_breakdown_compromised_document.rb +10 -4
- data/lib/onfido/models/document_breakdown_compromised_document_breakdown.rb +10 -4
- data/lib/onfido/models/document_breakdown_data_comparison.rb +10 -4
- data/lib/onfido/models/document_breakdown_data_comparison_breakdown.rb +10 -4
- data/lib/onfido/models/document_breakdown_data_comparison_breakdown_issuing_country.rb +10 -4
- data/lib/onfido/models/document_breakdown_data_consistency.rb +10 -4
- data/lib/onfido/models/document_breakdown_data_consistency_breakdown.rb +10 -4
- data/lib/onfido/models/document_breakdown_data_validation.rb +10 -4
- data/lib/onfido/models/document_breakdown_data_validation_breakdown.rb +10 -4
- data/lib/onfido/models/document_breakdown_data_validation_breakdown_document_expiration.rb +10 -4
- data/lib/onfido/models/document_breakdown_data_validation_breakdown_expiry_date.rb +10 -4
- data/lib/onfido/models/document_breakdown_image_integrity.rb +10 -4
- data/lib/onfido/models/document_breakdown_image_integrity_breakdown.rb +10 -4
- data/lib/onfido/models/document_breakdown_image_integrity_breakdown_colour_picture.rb +10 -4
- data/lib/onfido/models/document_breakdown_image_integrity_breakdown_conclusive_document_quality.rb +10 -4
- data/lib/onfido/models/document_breakdown_image_integrity_breakdown_image_quality.rb +10 -4
- data/lib/onfido/models/document_breakdown_image_integrity_breakdown_supported_document.rb +10 -4
- data/lib/onfido/models/document_breakdown_issuing_authority.rb +10 -4
- data/lib/onfido/models/document_breakdown_issuing_authority_breakdown.rb +10 -4
- data/lib/onfido/models/document_breakdown_issuing_authority_breakdown_nfc_active_authentication.rb +10 -4
- data/lib/onfido/models/document_breakdown_issuing_authority_breakdown_nfc_passive_authentication.rb +10 -4
- data/lib/onfido/models/document_breakdown_police_record.rb +10 -4
- data/lib/onfido/models/document_breakdown_visual_authenticity.rb +10 -4
- data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown.rb +10 -4
- data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_digital_tampering.rb +10 -4
- data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_face_detection.rb +10 -4
- data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_fonts.rb +10 -4
- data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_original_document_present.rb +10 -4
- data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_other.rb +10 -4
- data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_picture_face_integrity.rb +10 -4
- data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_security_features.rb +10 -4
- data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_template.rb +10 -4
- data/lib/onfido/models/document_cdq_reasons.rb +10 -4
- data/lib/onfido/models/document_iq_reasons.rb +10 -4
- data/lib/onfido/models/document_odp_reasons.rb +10 -4
- data/lib/onfido/models/document_properties.rb +11 -16
- data/lib/onfido/models/document_properties_address_lines.rb +10 -4
- data/lib/onfido/models/document_properties_barcode_inner.rb +10 -4
- data/lib/onfido/models/document_properties_document_classification.rb +10 -4
- data/lib/onfido/models/document_properties_document_numbers_inner.rb +10 -4
- data/lib/onfido/models/document_properties_driving_licence_information_item.rb +10 -4
- data/lib/onfido/models/document_properties_extracted_data.rb +10 -4
- data/lib/onfido/models/document_properties_nfc.rb +10 -4
- data/lib/onfido/models/document_properties_with_driving_licence_information.rb +697 -0
- data/lib/onfido/models/document_report.rb +30 -4
- data/lib/onfido/models/document_report_shared.rb +10 -4
- data/lib/onfido/models/document_response.rb +20 -4
- data/lib/onfido/models/document_shared.rb +10 -4
- data/lib/onfido/models/document_types.rb +1 -1
- data/lib/onfido/models/document_video_report.rb +30 -4
- data/lib/onfido/models/document_video_with_address_information_report.rb +30 -4
- data/lib/onfido/models/document_with_address_information_report.rb +30 -4
- data/lib/onfido/models/document_with_driver_verification_report.rb +30 -4
- data/lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb +11 -16
- data/lib/onfido/models/document_with_driver_verification_report_all_of_properties_all_of_passenger_vehicle.rb +10 -4
- data/lib/onfido/models/document_with_driver_verification_report_all_of_properties_all_of_vehicle_class_details_inner.rb +10 -4
- data/lib/onfido/models/document_with_driving_licence_information_report.rb +31 -5
- data/lib/onfido/models/documents_list.rb +20 -4
- data/lib/onfido/models/error.rb +10 -4
- data/lib/onfido/models/error1.rb +10 -4
- data/lib/onfido/models/error_properties.rb +10 -4
- data/lib/onfido/models/error_properties1.rb +10 -4
- data/lib/onfido/models/extract_request.rb +20 -4
- data/lib/onfido/models/extraction.rb +10 -4
- data/lib/onfido/models/extraction_document_classification.rb +10 -4
- data/lib/onfido/models/extraction_extracted_data.rb +10 -4
- data/lib/onfido/models/facial_similarity_motion_breakdown.rb +10 -4
- data/lib/onfido/models/facial_similarity_motion_breakdown_face_comparison.rb +10 -4
- data/lib/onfido/models/facial_similarity_motion_breakdown_image_integrity.rb +10 -4
- data/lib/onfido/models/facial_similarity_motion_breakdown_image_integrity_breakdown.rb +10 -4
- data/lib/onfido/models/facial_similarity_motion_breakdown_image_integrity_breakdown_face_detected.rb +10 -4
- data/lib/onfido/models/facial_similarity_motion_breakdown_image_integrity_breakdown_source_integrity.rb +10 -4
- data/lib/onfido/models/facial_similarity_motion_breakdown_visual_authenticity.rb +10 -4
- data/lib/onfido/models/facial_similarity_motion_breakdown_visual_authenticity_breakdown.rb +10 -4
- data/lib/onfido/models/facial_similarity_motion_breakdown_visual_authenticity_breakdown_spoofing_detection.rb +10 -4
- data/lib/onfido/models/facial_similarity_motion_properties.rb +10 -4
- data/lib/onfido/models/facial_similarity_motion_report.rb +30 -4
- data/lib/onfido/models/facial_similarity_photo_breakdown.rb +10 -4
- data/lib/onfido/models/facial_similarity_photo_breakdown_face_comparison.rb +10 -4
- data/lib/onfido/models/facial_similarity_photo_breakdown_face_comparison_breakdown.rb +10 -4
- data/lib/onfido/models/facial_similarity_photo_breakdown_face_comparison_breakdown_face_match.rb +10 -4
- data/lib/onfido/models/facial_similarity_photo_breakdown_face_comparison_breakdown_face_match_properties.rb +10 -4
- data/lib/onfido/models/facial_similarity_photo_breakdown_image_integrity.rb +10 -4
- data/lib/onfido/models/facial_similarity_photo_breakdown_image_integrity_breakdown.rb +10 -4
- data/lib/onfido/models/facial_similarity_photo_breakdown_image_integrity_breakdown_face_detected.rb +10 -4
- data/lib/onfido/models/facial_similarity_photo_breakdown_image_integrity_breakdown_source_integrity.rb +10 -4
- data/lib/onfido/models/facial_similarity_photo_breakdown_visual_authenticity.rb +10 -4
- data/lib/onfido/models/facial_similarity_photo_breakdown_visual_authenticity_breakdown.rb +10 -4
- data/lib/onfido/models/facial_similarity_photo_breakdown_visual_authenticity_breakdown_spoofing_detection.rb +10 -4
- data/lib/onfido/models/facial_similarity_photo_breakdown_visual_authenticity_breakdown_spoofing_detection_properties.rb +10 -4
- data/lib/onfido/models/facial_similarity_photo_fully_auto_breakdown.rb +10 -4
- data/lib/onfido/models/facial_similarity_photo_fully_auto_breakdown_image_integrity.rb +10 -4
- data/lib/onfido/models/facial_similarity_photo_fully_auto_breakdown_image_integrity_breakdown.rb +10 -4
- data/lib/onfido/models/facial_similarity_photo_fully_auto_breakdown_image_integrity_breakdown_source_integrity.rb +10 -4
- data/lib/onfido/models/facial_similarity_photo_fully_auto_properties.rb +10 -4
- data/lib/onfido/models/facial_similarity_photo_fully_auto_report.rb +30 -4
- data/lib/onfido/models/facial_similarity_photo_properties.rb +10 -4
- data/lib/onfido/models/facial_similarity_photo_report.rb +30 -4
- data/lib/onfido/models/facial_similarity_report_media.rb +20 -4
- data/lib/onfido/models/facial_similarity_report_shared.rb +10 -4
- data/lib/onfido/models/facial_similarity_video_breakdown.rb +10 -4
- data/lib/onfido/models/facial_similarity_video_breakdown_face_comparison.rb +10 -4
- data/lib/onfido/models/facial_similarity_video_breakdown_image_integrity.rb +10 -4
- data/lib/onfido/models/facial_similarity_video_breakdown_image_integrity_breakdown.rb +10 -4
- data/lib/onfido/models/facial_similarity_video_breakdown_image_integrity_breakdown_face_detected.rb +10 -4
- data/lib/onfido/models/facial_similarity_video_breakdown_image_integrity_breakdown_source_integrity.rb +10 -4
- data/lib/onfido/models/facial_similarity_video_breakdown_visual_authenticity.rb +10 -4
- data/lib/onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown.rb +10 -4
- data/lib/onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown_liveness_detected.rb +10 -4
- data/lib/onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown_spoofing_detection.rb +10 -4
- data/lib/onfido/models/facial_similarity_video_properties.rb +10 -4
- data/lib/onfido/models/facial_similarity_video_report.rb +30 -4
- data/lib/onfido/models/id_number.rb +10 -4
- data/lib/onfido/models/id_photo.rb +20 -4
- data/lib/onfido/models/id_photo_response.rb +20 -4
- data/lib/onfido/models/id_photos_list.rb +20 -4
- data/lib/onfido/models/identity_enhanced_breakdown.rb +10 -4
- data/lib/onfido/models/identity_enhanced_breakdown_address.rb +10 -4
- data/lib/onfido/models/identity_enhanced_breakdown_address_breakdown.rb +10 -4
- data/lib/onfido/models/identity_enhanced_breakdown_address_breakdown_credit_agencies.rb +10 -4
- data/lib/onfido/models/identity_enhanced_breakdown_address_breakdown_credit_agencies_properties.rb +11 -5
- data/lib/onfido/models/identity_enhanced_breakdown_address_breakdown_telephone_database.rb +10 -4
- data/lib/onfido/models/identity_enhanced_breakdown_address_breakdown_voting_register.rb +10 -4
- data/lib/onfido/models/identity_enhanced_breakdown_date_of_birth.rb +10 -4
- data/lib/onfido/models/identity_enhanced_breakdown_date_of_birth_breakdown.rb +10 -4
- data/lib/onfido/models/identity_enhanced_breakdown_date_of_birth_breakdown_credit_agencies.rb +10 -4
- data/lib/onfido/models/identity_enhanced_breakdown_date_of_birth_breakdown_voting_register.rb +10 -4
- data/lib/onfido/models/identity_enhanced_breakdown_mortality.rb +10 -4
- data/lib/onfido/models/identity_enhanced_breakdown_sources.rb +10 -4
- data/lib/onfido/models/identity_enhanced_breakdown_sources_breakdown.rb +10 -4
- data/lib/onfido/models/identity_enhanced_breakdown_sources_breakdown_total_sources.rb +10 -4
- data/lib/onfido/models/identity_enhanced_breakdown_sources_breakdown_total_sources_properties.rb +11 -5
- data/lib/onfido/models/identity_enhanced_properties.rb +10 -4
- data/lib/onfido/models/identity_enhanced_properties_matched_addresses_inner.rb +10 -4
- data/lib/onfido/models/identity_enhanced_report.rb +30 -4
- data/lib/onfido/models/idr_ssn_breakdown.rb +10 -4
- data/lib/onfido/models/idr_ssn_breakdown_breakdown.rb +10 -4
- data/lib/onfido/models/idr_ssn_breakdown_breakdown_full_match.rb +10 -4
- data/lib/onfido/models/idr_ssn_breakdown_breakdown_last4_digits_match.rb +10 -4
- data/lib/onfido/models/india_pan_report.rb +30 -4
- data/lib/onfido/models/india_pan_report_all_of_breakdown.rb +10 -4
- data/lib/onfido/models/india_pan_report_all_of_breakdown_device.rb +10 -4
- data/lib/onfido/models/india_pan_report_all_of_breakdown_device_breakdown.rb +10 -4
- data/lib/onfido/models/india_pan_report_all_of_breakdown_device_breakdown_pan_valid.rb +10 -4
- data/lib/onfido/models/india_pan_report_all_of_properties.rb +10 -4
- data/lib/onfido/models/india_pan_report_all_of_properties_device.rb +10 -4
- data/lib/onfido/models/known_faces_breakdown.rb +10 -4
- data/lib/onfido/models/known_faces_breakdown_image_integrity.rb +10 -4
- data/lib/onfido/models/known_faces_breakdown_previously_seen_faces.rb +10 -4
- data/lib/onfido/models/known_faces_properties.rb +10 -4
- data/lib/onfido/models/known_faces_properties_matches_inner.rb +10 -4
- data/lib/onfido/models/known_faces_report.rb +30 -4
- data/lib/onfido/models/live_photo.rb +20 -4
- data/lib/onfido/models/live_photo_response.rb +20 -4
- data/lib/onfido/models/live_photos_list.rb +20 -4
- data/lib/onfido/models/live_video.rb +10 -4
- data/lib/onfido/models/live_videos_list.rb +20 -4
- data/lib/onfido/models/location.rb +10 -4
- data/lib/onfido/models/location_builder.rb +10 -4
- data/lib/onfido/models/location_shared.rb +10 -4
- data/lib/onfido/models/motion_capture.rb +10 -4
- data/lib/onfido/models/motion_captures_list.rb +20 -4
- data/lib/onfido/models/passkey.rb +40 -4
- data/lib/onfido/models/passkey_updater.rb +10 -4
- data/lib/onfido/models/passkeys_list.rb +20 -4
- data/lib/onfido/models/photo_auto_reasons.rb +10 -4
- data/lib/onfido/models/photo_reasons.rb +10 -4
- data/lib/onfido/models/proof_of_address_breakdown.rb +10 -4
- data/lib/onfido/models/proof_of_address_breakdown_data_comparison.rb +10 -4
- data/lib/onfido/models/proof_of_address_breakdown_data_comparison_breakdown.rb +10 -4
- data/lib/onfido/models/proof_of_address_breakdown_document_classification.rb +10 -4
- data/lib/onfido/models/proof_of_address_breakdown_document_classification_breakdown.rb +10 -4
- data/lib/onfido/models/proof_of_address_breakdown_image_integrity.rb +10 -4
- data/lib/onfido/models/proof_of_address_breakdown_image_integrity_breakdown.rb +10 -4
- data/lib/onfido/models/proof_of_address_properties.rb +10 -4
- data/lib/onfido/models/proof_of_address_report.rb +30 -4
- data/lib/onfido/models/repeat_attempts_list.rb +20 -4
- data/lib/onfido/models/repeat_attempts_list_repeat_attempts_inner.rb +10 -4
- data/lib/onfido/models/report.rb +1 -1
- data/lib/onfido/models/report_configuration.rb +10 -4
- data/lib/onfido/models/report_configuration_facial_similarity.rb +10 -4
- data/lib/onfido/models/report_document.rb +20 -4
- data/lib/onfido/models/report_name.rb +1 -1
- data/lib/onfido/models/report_result.rb +1 -1
- data/lib/onfido/models/report_shared.rb +30 -4
- data/lib/onfido/models/report_status.rb +1 -1
- data/lib/onfido/models/report_sub_result.rb +1 -1
- data/lib/onfido/models/reports_list.rb +20 -4
- data/lib/onfido/models/results_feedback.rb +10 -4
- data/lib/onfido/models/sdk_token.rb +20 -4
- data/lib/onfido/models/sdk_token_builder.rb +20 -4
- data/lib/onfido/models/sdk_token_request.rb +20 -4
- data/lib/onfido/models/sdk_token_response.rb +20 -4
- data/lib/onfido/models/signing_document.rb +20 -4
- data/lib/onfido/models/signing_document_response.rb +20 -4
- data/lib/onfido/models/signing_document_shared.rb +10 -4
- data/lib/onfido/models/signing_documents_list.rb +20 -4
- data/lib/onfido/models/task.rb +10 -4
- data/lib/onfido/models/task_item.rb +10 -4
- data/lib/onfido/models/timeline_file_reference.rb +30 -4
- data/lib/onfido/models/us_driving_licence_breakdown.rb +10 -4
- data/lib/onfido/models/us_driving_licence_breakdown_address.rb +10 -4
- data/lib/onfido/models/us_driving_licence_breakdown_address_breakdown.rb +10 -4
- data/lib/onfido/models/us_driving_licence_breakdown_document.rb +10 -4
- data/lib/onfido/models/us_driving_licence_breakdown_document_breakdown.rb +10 -4
- data/lib/onfido/models/us_driving_licence_breakdown_personal.rb +10 -4
- data/lib/onfido/models/us_driving_licence_breakdown_personal_breakdown.rb +10 -4
- data/lib/onfido/models/us_driving_licence_builder.rb +20 -4
- data/lib/onfido/models/us_driving_licence_report.rb +30 -4
- data/lib/onfido/models/us_driving_licence_shared.rb +20 -4
- data/lib/onfido/models/video_reasons.rb +10 -4
- data/lib/onfido/models/watchlist_aml_breakdown.rb +10 -4
- data/lib/onfido/models/watchlist_aml_breakdown_adverse_media.rb +10 -4
- data/lib/onfido/models/watchlist_aml_breakdown_legal_and_regulatory_warnings.rb +10 -4
- data/lib/onfido/models/watchlist_aml_breakdown_politically_exposed_person.rb +10 -4
- data/lib/onfido/models/watchlist_aml_breakdown_sanction.rb +10 -4
- data/lib/onfido/models/watchlist_aml_properties.rb +10 -4
- data/lib/onfido/models/watchlist_aml_report.rb +30 -4
- data/lib/onfido/models/watchlist_enhanced_breakdown.rb +10 -4
- data/lib/onfido/models/watchlist_enhanced_properties.rb +10 -4
- data/lib/onfido/models/watchlist_enhanced_properties_records_inner.rb +10 -4
- data/lib/onfido/models/watchlist_enhanced_properties_records_inner_address_inner.rb +10 -4
- data/lib/onfido/models/watchlist_enhanced_properties_records_inner_alias_inner.rb +10 -4
- data/lib/onfido/models/watchlist_enhanced_properties_records_inner_associate_inner.rb +10 -4
- data/lib/onfido/models/watchlist_enhanced_properties_records_inner_attribute_inner.rb +10 -4
- data/lib/onfido/models/watchlist_enhanced_properties_records_inner_event_inner.rb +10 -4
- data/lib/onfido/models/watchlist_enhanced_properties_records_inner_event_inner_source.rb +10 -4
- data/lib/onfido/models/watchlist_enhanced_properties_records_inner_source_inner.rb +10 -4
- data/lib/onfido/models/watchlist_enhanced_report.rb +30 -4
- data/lib/onfido/models/watchlist_monitor.rb +30 -4
- data/lib/onfido/models/watchlist_monitor_builder.rb +20 -4
- data/lib/onfido/models/watchlist_monitor_match.rb +10 -4
- data/lib/onfido/models/watchlist_monitor_matches_list.rb +20 -4
- data/lib/onfido/models/watchlist_monitor_matches_updater.rb +10 -4
- data/lib/onfido/models/watchlist_monitor_response.rb +20 -4
- data/lib/onfido/models/watchlist_monitor_shared.rb +20 -4
- data/lib/onfido/models/watchlist_monitors_list.rb +20 -4
- data/lib/onfido/models/watchlist_peps_only_report.rb +30 -4
- data/lib/onfido/models/watchlist_sanctions_only_report.rb +30 -4
- data/lib/onfido/models/watchlist_standard_breakdown.rb +10 -4
- data/lib/onfido/models/watchlist_standard_properties.rb +10 -4
- data/lib/onfido/models/watchlist_standard_report.rb +30 -4
- data/lib/onfido/models/webhook.rb +20 -4
- data/lib/onfido/models/webhook_builder.rb +20 -4
- data/lib/onfido/models/webhook_create.rb +20 -4
- data/lib/onfido/models/webhook_event.rb +10 -4
- data/lib/onfido/models/webhook_event_object_status.rb +1 -1
- data/lib/onfido/models/webhook_event_payload.rb +20 -4
- data/lib/onfido/models/webhook_event_payload_object.rb +20 -4
- data/lib/onfido/models/webhook_event_payload_resource.rb +54 -5
- data/lib/onfido/models/webhook_event_resource_status.rb +50 -0
- data/lib/onfido/models/webhook_event_resource_type.rb +1 -1
- data/lib/onfido/models/webhook_event_type.rb +1 -1
- data/lib/onfido/models/webhook_resend.rb +10 -4
- data/lib/onfido/models/webhook_response.rb +20 -4
- data/lib/onfido/models/webhook_shared.rb +10 -4
- data/lib/onfido/models/webhook_update.rb +10 -4
- data/lib/onfido/models/webhook_updater.rb +10 -4
- data/lib/onfido/models/webhooks_list.rb +20 -4
- data/lib/onfido/models/webhooks_resend_item.rb +30 -4
- data/lib/onfido/models/workflow_run.rb +40 -4
- data/lib/onfido/models/workflow_run_builder.rb +30 -4
- data/lib/onfido/models/workflow_run_error.rb +10 -4
- data/lib/onfido/models/workflow_run_link.rb +10 -4
- data/lib/onfido/models/workflow_run_request.rb +10 -4
- data/lib/onfido/models/workflow_run_response.rb +20 -4
- data/lib/onfido/models/workflow_run_shared.rb +30 -4
- data/lib/onfido/models/workflow_run_status.rb +1 -1
- data/lib/onfido/version.rb +2 -2
- data/lib/onfido.rb +6 -6
- data/onfido.gemspec +1 -1
- data/spec/integrations/workflow_run_spec.rb +8 -4
- data/spec/spec_helper.rb +1 -1
- metadata +26 -26
- data/lib/onfido/models/device_intelligence_breakdown_breakdown.rb +0 -214
- data/lib/onfido/models/device_intelligence_breakdown_properties.rb +0 -232
data/spec/spec_helper.rb
CHANGED
|
@@ -106,7 +106,7 @@ def repeat_request_until_task_output_changes(max_retries = 15,
|
|
|
106
106
|
instance
|
|
107
107
|
end
|
|
108
108
|
|
|
109
|
-
def
|
|
109
|
+
def repeat_request_until_http_code_changes(max_retries = 15,
|
|
110
110
|
interval = 1, &proc)
|
|
111
111
|
# max_retries --> how many times to retry the request
|
|
112
112
|
# interval --> how many seconds to wait until the next retry
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: onfido
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 6.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-05-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -165,14 +165,12 @@ files:
|
|
|
165
165
|
- lib/onfido/models/complete_task_data_builder.rb
|
|
166
166
|
- lib/onfido/models/country_codes.rb
|
|
167
167
|
- lib/onfido/models/device_intelligence_breakdown.rb
|
|
168
|
-
- lib/onfido/models/device_intelligence_breakdown_breakdown.rb
|
|
169
168
|
- lib/onfido/models/device_intelligence_breakdown_device.rb
|
|
170
169
|
- lib/onfido/models/device_intelligence_breakdown_device_breakdown.rb
|
|
171
|
-
- lib/onfido/models/device_intelligence_breakdown_properties.rb
|
|
172
|
-
- lib/onfido/models/device_intelligence_breakdown_properties_device.rb
|
|
173
|
-
- lib/onfido/models/device_intelligence_breakdown_properties_geolocation.rb
|
|
174
|
-
- lib/onfido/models/device_intelligence_breakdown_properties_ip.rb
|
|
175
170
|
- lib/onfido/models/device_intelligence_properties.rb
|
|
171
|
+
- lib/onfido/models/device_intelligence_properties_device.rb
|
|
172
|
+
- lib/onfido/models/device_intelligence_properties_geolocation.rb
|
|
173
|
+
- lib/onfido/models/device_intelligence_properties_ip.rb
|
|
176
174
|
- lib/onfido/models/device_intelligence_report.rb
|
|
177
175
|
- lib/onfido/models/document.rb
|
|
178
176
|
- lib/onfido/models/document_breakdown.rb
|
|
@@ -221,6 +219,7 @@ files:
|
|
|
221
219
|
- lib/onfido/models/document_properties_driving_licence_information_item.rb
|
|
222
220
|
- lib/onfido/models/document_properties_extracted_data.rb
|
|
223
221
|
- lib/onfido/models/document_properties_nfc.rb
|
|
222
|
+
- lib/onfido/models/document_properties_with_driving_licence_information.rb
|
|
224
223
|
- lib/onfido/models/document_report.rb
|
|
225
224
|
- lib/onfido/models/document_report_shared.rb
|
|
226
225
|
- lib/onfido/models/document_response.rb
|
|
@@ -427,6 +426,7 @@ files:
|
|
|
427
426
|
- lib/onfido/models/webhook_event_payload.rb
|
|
428
427
|
- lib/onfido/models/webhook_event_payload_object.rb
|
|
429
428
|
- lib/onfido/models/webhook_event_payload_resource.rb
|
|
429
|
+
- lib/onfido/models/webhook_event_resource_status.rb
|
|
430
430
|
- lib/onfido/models/webhook_event_resource_type.rb
|
|
431
431
|
- lib/onfido/models/webhook_event_type.rb
|
|
432
432
|
- lib/onfido/models/webhook_resend.rb
|
|
@@ -509,38 +509,38 @@ specification_version: 4
|
|
|
509
509
|
summary: The official Ruby library for integrating with the Onfido API.
|
|
510
510
|
test_files:
|
|
511
511
|
- spec/classic_webhook_event_verifier_spec.rb
|
|
512
|
-
- spec/integrations/tasks_spec.rb
|
|
513
512
|
- spec/integrations/workflow_run_output_spec.rb
|
|
514
|
-
- spec/integrations/watchlist_monitor_spec.rb
|
|
515
|
-
- spec/integrations/media/sample_photo.png
|
|
516
|
-
- spec/integrations/media/sample_driving_licence.png
|
|
517
|
-
- spec/integrations/media/sample_signing_document.pdf
|
|
518
|
-
- spec/integrations/id_photo_spec.rb
|
|
519
513
|
- spec/integrations/advanced_electronic_signature_spec.rb
|
|
520
514
|
- spec/integrations/applicant_spec.rb
|
|
521
|
-
- spec/integrations/
|
|
522
|
-
- spec/integrations/motion_capture_spec.rb
|
|
523
|
-
- spec/integrations/document_spec.rb
|
|
524
|
-
- spec/integrations/sdk_token_spec.rb
|
|
515
|
+
- spec/integrations/tasks_spec.rb
|
|
525
516
|
- spec/integrations/workflow_run_spec.rb
|
|
526
|
-
- spec/integrations/
|
|
527
|
-
- spec/integrations/
|
|
528
|
-
- spec/integrations/
|
|
517
|
+
- spec/integrations/document_spec.rb
|
|
518
|
+
- spec/integrations/watchlist_monitor_spec.rb
|
|
519
|
+
- spec/integrations/passkey_spec.rb
|
|
529
520
|
- spec/integrations/live_photo_spec.rb
|
|
521
|
+
- spec/integrations/qualified_electronic_signature_spec.rb
|
|
522
|
+
- spec/integrations/report_spec.rb
|
|
530
523
|
- spec/integrations/address_picker_spec.rb
|
|
531
|
-
- spec/integrations/
|
|
532
|
-
- spec/integrations/
|
|
524
|
+
- spec/integrations/sdk_token_spec.rb
|
|
525
|
+
- spec/integrations/webhook_spec.rb
|
|
533
526
|
- spec/integrations/check_spec.rb
|
|
534
527
|
- spec/integrations/extraction_spec.rb
|
|
528
|
+
- spec/integrations/motion_capture_spec.rb
|
|
529
|
+
- spec/integrations/media/sample_driving_licence.png
|
|
530
|
+
- spec/integrations/media/sample_signing_document.pdf
|
|
531
|
+
- spec/integrations/media/sample_photo.png
|
|
532
|
+
- spec/integrations/report_schema_spec.rb
|
|
533
|
+
- spec/integrations/signing_document_spec.rb
|
|
535
534
|
- spec/integrations/live_video_spec.rb
|
|
536
|
-
- spec/
|
|
535
|
+
- spec/integrations/id_photo_spec.rb
|
|
537
536
|
- spec/media/studio_webhook_event_with_object_in_output.json
|
|
537
|
+
- spec/media/studio_webhook_event_with_list_in_output.json
|
|
538
538
|
- spec/shared_contexts/with_onfido.rb
|
|
539
|
-
- spec/shared_contexts/with_workflow_run.rb
|
|
540
|
-
- spec/shared_contexts/with_applicant.rb
|
|
541
|
-
- spec/shared_contexts/with_live_photo.rb
|
|
542
539
|
- spec/shared_contexts/with_signing_document.rb
|
|
540
|
+
- spec/shared_contexts/with_live_photo.rb
|
|
541
|
+
- spec/shared_contexts/with_applicant.rb
|
|
543
542
|
- spec/shared_contexts/with_document.rb
|
|
543
|
+
- spec/shared_contexts/with_workflow_run.rb
|
|
544
544
|
- spec/shared_contexts/with_check.rb
|
|
545
545
|
- spec/shared_examples/file_examples.rb
|
|
546
546
|
- spec/spec_helper.rb
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#Onfido Public API v3.6
|
|
3
|
-
|
|
4
|
-
#The Onfido Public API (v3.6)
|
|
5
|
-
|
|
6
|
-
The version of the OpenAPI document: v3.6
|
|
7
|
-
|
|
8
|
-
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.11.0
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
require 'date'
|
|
14
|
-
require 'time'
|
|
15
|
-
|
|
16
|
-
module Onfido
|
|
17
|
-
class DeviceIntelligenceBreakdownBreakdown
|
|
18
|
-
attr_accessor :device
|
|
19
|
-
|
|
20
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
-
def self.attribute_map
|
|
22
|
-
{
|
|
23
|
-
:'device' => :'device'
|
|
24
|
-
}
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
# Returns all the JSON keys this model knows about
|
|
28
|
-
def self.acceptable_attributes
|
|
29
|
-
attribute_map.values
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
# Attribute type mapping.
|
|
33
|
-
def self.openapi_types
|
|
34
|
-
{
|
|
35
|
-
:'device' => :'DeviceIntelligenceBreakdownDevice'
|
|
36
|
-
}
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
# List of attributes with nullable: true
|
|
40
|
-
def self.openapi_nullable
|
|
41
|
-
Set.new([
|
|
42
|
-
])
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
# Initializes the object
|
|
46
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
47
|
-
def initialize(attributes = {})
|
|
48
|
-
if (!attributes.is_a?(Hash))
|
|
49
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Onfido::DeviceIntelligenceBreakdownBreakdown` initialize method"
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
53
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
54
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Onfido::DeviceIntelligenceBreakdownBreakdown`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
56
|
-
end
|
|
57
|
-
h[k.to_sym] = v
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if attributes.key?(:'device')
|
|
61
|
-
self.device = attributes[:'device']
|
|
62
|
-
end
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
66
|
-
# @return Array for valid properties with the reasons
|
|
67
|
-
def list_invalid_properties
|
|
68
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
69
|
-
invalid_properties = Array.new
|
|
70
|
-
invalid_properties
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
# Check to see if the all the properties in the model are valid
|
|
74
|
-
# @return true if the model is valid
|
|
75
|
-
def valid?
|
|
76
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
77
|
-
true
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
# Checks equality by comparing each attribute.
|
|
81
|
-
# @param [Object] Object to be compared
|
|
82
|
-
def ==(o)
|
|
83
|
-
return true if self.equal?(o)
|
|
84
|
-
self.class == o.class &&
|
|
85
|
-
device == o.device
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
# @see the `==` method
|
|
89
|
-
# @param [Object] Object to be compared
|
|
90
|
-
def eql?(o)
|
|
91
|
-
self == o
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
# Calculates hash code according to all attributes.
|
|
95
|
-
# @return [Integer] Hash code
|
|
96
|
-
def hash
|
|
97
|
-
[device].hash
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
# Builds the object from hash
|
|
101
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
102
|
-
# @return [Object] Returns the model itself
|
|
103
|
-
def self.build_from_hash(attributes)
|
|
104
|
-
return nil unless attributes.is_a?(Hash)
|
|
105
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
106
|
-
transformed_hash = {}
|
|
107
|
-
openapi_types.each_pair do |key, type|
|
|
108
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
109
|
-
transformed_hash["#{key}"] = nil
|
|
110
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
111
|
-
# check to ensure the input is an array given that the attribute
|
|
112
|
-
# is documented as an array but the input is not
|
|
113
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
114
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
115
|
-
end
|
|
116
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
117
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
118
|
-
end
|
|
119
|
-
end
|
|
120
|
-
new(transformed_hash)
|
|
121
|
-
end
|
|
122
|
-
|
|
123
|
-
# Deserializes the data based on type
|
|
124
|
-
# @param string type Data type
|
|
125
|
-
# @param string value Value to be deserialized
|
|
126
|
-
# @return [Object] Deserialized data
|
|
127
|
-
def self._deserialize(type, value)
|
|
128
|
-
case type.to_sym
|
|
129
|
-
when :Time
|
|
130
|
-
Time.parse(value)
|
|
131
|
-
when :Date
|
|
132
|
-
Date.parse(value)
|
|
133
|
-
when :String
|
|
134
|
-
value.to_s
|
|
135
|
-
when :Integer
|
|
136
|
-
value.to_i
|
|
137
|
-
when :Float
|
|
138
|
-
value.to_f
|
|
139
|
-
when :Boolean
|
|
140
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
141
|
-
true
|
|
142
|
-
else
|
|
143
|
-
false
|
|
144
|
-
end
|
|
145
|
-
when :Object
|
|
146
|
-
# generic object (usually a Hash), return directly
|
|
147
|
-
value
|
|
148
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
149
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
150
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
151
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
152
|
-
k_type = Regexp.last_match[:k_type]
|
|
153
|
-
v_type = Regexp.last_match[:v_type]
|
|
154
|
-
{}.tap do |hash|
|
|
155
|
-
value.each do |k, v|
|
|
156
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
157
|
-
end
|
|
158
|
-
end
|
|
159
|
-
else # model
|
|
160
|
-
# models (e.g. Pet) or oneOf
|
|
161
|
-
klass = Onfido.const_get(type)
|
|
162
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
163
|
-
end
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
# Returns the string representation of the object
|
|
167
|
-
# @return [String] String presentation of the object
|
|
168
|
-
def to_s
|
|
169
|
-
to_hash.to_s
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
173
|
-
# @return [Hash] Returns the object in the form of hash
|
|
174
|
-
def to_body
|
|
175
|
-
to_hash
|
|
176
|
-
end
|
|
177
|
-
|
|
178
|
-
# Returns the object in the form of hash
|
|
179
|
-
# @return [Hash] Returns the object in the form of hash
|
|
180
|
-
def to_hash
|
|
181
|
-
hash = {}
|
|
182
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
183
|
-
value = self.send(attr)
|
|
184
|
-
if value.nil?
|
|
185
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
186
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
187
|
-
end
|
|
188
|
-
|
|
189
|
-
hash[param] = _to_hash(value)
|
|
190
|
-
end
|
|
191
|
-
hash
|
|
192
|
-
end
|
|
193
|
-
|
|
194
|
-
# Outputs non-array value in the form of hash
|
|
195
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
196
|
-
# @param [Object] value Any valid value
|
|
197
|
-
# @return [Hash] Returns the value in the form of hash
|
|
198
|
-
def _to_hash(value)
|
|
199
|
-
if value.is_a?(Array)
|
|
200
|
-
value.compact.map { |v| _to_hash(v) }
|
|
201
|
-
elsif value.is_a?(Hash)
|
|
202
|
-
{}.tap do |hash|
|
|
203
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
204
|
-
end
|
|
205
|
-
elsif value.respond_to? :to_hash
|
|
206
|
-
value.to_hash
|
|
207
|
-
else
|
|
208
|
-
value
|
|
209
|
-
end
|
|
210
|
-
end
|
|
211
|
-
|
|
212
|
-
end
|
|
213
|
-
|
|
214
|
-
end
|
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#Onfido Public API v3.6
|
|
3
|
-
|
|
4
|
-
#The Onfido Public API (v3.6)
|
|
5
|
-
|
|
6
|
-
The version of the OpenAPI document: v3.6
|
|
7
|
-
|
|
8
|
-
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.11.0
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
require 'date'
|
|
14
|
-
require 'time'
|
|
15
|
-
|
|
16
|
-
module Onfido
|
|
17
|
-
class DeviceIntelligenceBreakdownProperties
|
|
18
|
-
attr_accessor :device
|
|
19
|
-
|
|
20
|
-
attr_accessor :ip
|
|
21
|
-
|
|
22
|
-
attr_accessor :geolocation
|
|
23
|
-
|
|
24
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
-
def self.attribute_map
|
|
26
|
-
{
|
|
27
|
-
:'device' => :'device',
|
|
28
|
-
:'ip' => :'ip',
|
|
29
|
-
:'geolocation' => :'geolocation'
|
|
30
|
-
}
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
# Returns all the JSON keys this model knows about
|
|
34
|
-
def self.acceptable_attributes
|
|
35
|
-
attribute_map.values
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
# Attribute type mapping.
|
|
39
|
-
def self.openapi_types
|
|
40
|
-
{
|
|
41
|
-
:'device' => :'DeviceIntelligenceBreakdownPropertiesDevice',
|
|
42
|
-
:'ip' => :'DeviceIntelligenceBreakdownPropertiesIp',
|
|
43
|
-
:'geolocation' => :'DeviceIntelligenceBreakdownPropertiesGeolocation'
|
|
44
|
-
}
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
# List of attributes with nullable: true
|
|
48
|
-
def self.openapi_nullable
|
|
49
|
-
Set.new([
|
|
50
|
-
])
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
# Initializes the object
|
|
54
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
55
|
-
def initialize(attributes = {})
|
|
56
|
-
if (!attributes.is_a?(Hash))
|
|
57
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Onfido::DeviceIntelligenceBreakdownProperties` initialize method"
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
61
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
|
63
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Onfido::DeviceIntelligenceBreakdownProperties`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
64
|
-
end
|
|
65
|
-
h[k.to_sym] = v
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
if attributes.key?(:'device')
|
|
69
|
-
self.device = attributes[:'device']
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
if attributes.key?(:'ip')
|
|
73
|
-
self.ip = attributes[:'ip']
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
if attributes.key?(:'geolocation')
|
|
77
|
-
self.geolocation = attributes[:'geolocation']
|
|
78
|
-
end
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
82
|
-
# @return Array for valid properties with the reasons
|
|
83
|
-
def list_invalid_properties
|
|
84
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
85
|
-
invalid_properties = Array.new
|
|
86
|
-
invalid_properties
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
# Check to see if the all the properties in the model are valid
|
|
90
|
-
# @return true if the model is valid
|
|
91
|
-
def valid?
|
|
92
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
93
|
-
true
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
# Checks equality by comparing each attribute.
|
|
97
|
-
# @param [Object] Object to be compared
|
|
98
|
-
def ==(o)
|
|
99
|
-
return true if self.equal?(o)
|
|
100
|
-
self.class == o.class &&
|
|
101
|
-
device == o.device &&
|
|
102
|
-
ip == o.ip &&
|
|
103
|
-
geolocation == o.geolocation
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
# @see the `==` method
|
|
107
|
-
# @param [Object] Object to be compared
|
|
108
|
-
def eql?(o)
|
|
109
|
-
self == o
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
# Calculates hash code according to all attributes.
|
|
113
|
-
# @return [Integer] Hash code
|
|
114
|
-
def hash
|
|
115
|
-
[device, ip, geolocation].hash
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
# Builds the object from hash
|
|
119
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
120
|
-
# @return [Object] Returns the model itself
|
|
121
|
-
def self.build_from_hash(attributes)
|
|
122
|
-
return nil unless attributes.is_a?(Hash)
|
|
123
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
124
|
-
transformed_hash = {}
|
|
125
|
-
openapi_types.each_pair do |key, type|
|
|
126
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
127
|
-
transformed_hash["#{key}"] = nil
|
|
128
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
129
|
-
# check to ensure the input is an array given that the attribute
|
|
130
|
-
# is documented as an array but the input is not
|
|
131
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
132
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
133
|
-
end
|
|
134
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
135
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
136
|
-
end
|
|
137
|
-
end
|
|
138
|
-
new(transformed_hash)
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
# Deserializes the data based on type
|
|
142
|
-
# @param string type Data type
|
|
143
|
-
# @param string value Value to be deserialized
|
|
144
|
-
# @return [Object] Deserialized data
|
|
145
|
-
def self._deserialize(type, value)
|
|
146
|
-
case type.to_sym
|
|
147
|
-
when :Time
|
|
148
|
-
Time.parse(value)
|
|
149
|
-
when :Date
|
|
150
|
-
Date.parse(value)
|
|
151
|
-
when :String
|
|
152
|
-
value.to_s
|
|
153
|
-
when :Integer
|
|
154
|
-
value.to_i
|
|
155
|
-
when :Float
|
|
156
|
-
value.to_f
|
|
157
|
-
when :Boolean
|
|
158
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
159
|
-
true
|
|
160
|
-
else
|
|
161
|
-
false
|
|
162
|
-
end
|
|
163
|
-
when :Object
|
|
164
|
-
# generic object (usually a Hash), return directly
|
|
165
|
-
value
|
|
166
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
167
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
168
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
169
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
170
|
-
k_type = Regexp.last_match[:k_type]
|
|
171
|
-
v_type = Regexp.last_match[:v_type]
|
|
172
|
-
{}.tap do |hash|
|
|
173
|
-
value.each do |k, v|
|
|
174
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
175
|
-
end
|
|
176
|
-
end
|
|
177
|
-
else # model
|
|
178
|
-
# models (e.g. Pet) or oneOf
|
|
179
|
-
klass = Onfido.const_get(type)
|
|
180
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
181
|
-
end
|
|
182
|
-
end
|
|
183
|
-
|
|
184
|
-
# Returns the string representation of the object
|
|
185
|
-
# @return [String] String presentation of the object
|
|
186
|
-
def to_s
|
|
187
|
-
to_hash.to_s
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
191
|
-
# @return [Hash] Returns the object in the form of hash
|
|
192
|
-
def to_body
|
|
193
|
-
to_hash
|
|
194
|
-
end
|
|
195
|
-
|
|
196
|
-
# Returns the object in the form of hash
|
|
197
|
-
# @return [Hash] Returns the object in the form of hash
|
|
198
|
-
def to_hash
|
|
199
|
-
hash = {}
|
|
200
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
201
|
-
value = self.send(attr)
|
|
202
|
-
if value.nil?
|
|
203
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
204
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
205
|
-
end
|
|
206
|
-
|
|
207
|
-
hash[param] = _to_hash(value)
|
|
208
|
-
end
|
|
209
|
-
hash
|
|
210
|
-
end
|
|
211
|
-
|
|
212
|
-
# Outputs non-array value in the form of hash
|
|
213
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
214
|
-
# @param [Object] value Any valid value
|
|
215
|
-
# @return [Hash] Returns the value in the form of hash
|
|
216
|
-
def _to_hash(value)
|
|
217
|
-
if value.is_a?(Array)
|
|
218
|
-
value.compact.map { |v| _to_hash(v) }
|
|
219
|
-
elsif value.is_a?(Hash)
|
|
220
|
-
{}.tap do |hash|
|
|
221
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
222
|
-
end
|
|
223
|
-
elsif value.respond_to? :to_hash
|
|
224
|
-
value.to_hash
|
|
225
|
-
else
|
|
226
|
-
value
|
|
227
|
-
end
|
|
228
|
-
end
|
|
229
|
-
|
|
230
|
-
end
|
|
231
|
-
|
|
232
|
-
end
|