onfido 3.3.1 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/MIGRATION.md +30 -0
- data/README.md +2 -2
- data/lib/onfido/api/default_api.rb +68 -68
- data/lib/onfido/api_client.rb +31 -25
- data/lib/onfido/api_error.rb +1 -1
- data/lib/onfido/configuration.rb +11 -1
- data/lib/onfido/models/address.rb +1 -1
- data/lib/onfido/models/address_builder.rb +1 -1
- data/lib/onfido/models/address_shared.rb +1 -1
- data/lib/onfido/models/addresses_list.rb +1 -1
- data/lib/onfido/models/applicant.rb +1 -1
- data/lib/onfido/models/applicant_builder.rb +6 -3
- data/lib/onfido/models/{consent_item.rb → applicant_consent_builder.rb} +5 -18
- data/lib/onfido/models/applicant_consent_name.rb +42 -0
- data/lib/onfido/models/applicant_create.rb +1 -1
- data/lib/onfido/models/applicant_request.rb +6 -3
- data/lib/onfido/models/applicant_response.rb +1 -1
- data/lib/onfido/models/applicant_shared.rb +1 -1
- data/lib/onfido/models/applicant_update.rb +1 -1
- data/lib/onfido/models/applicant_updater.rb +6 -3
- data/lib/onfido/models/applicants_list.rb +1 -1
- data/lib/onfido/models/check.rb +33 -19
- data/lib/onfido/models/check_builder.rb +11 -2
- data/lib/onfido/models/check_request.rb +1 -1
- data/lib/onfido/models/check_response.rb +24 -19
- data/lib/onfido/models/check_shared.rb +14 -5
- data/lib/onfido/models/check_status.rb +45 -0
- data/lib/onfido/models/checks_list.rb +1 -1
- data/lib/onfido/models/complete_task_builder.rb +1 -1
- data/lib/onfido/models/complete_task_data_builder.rb +1 -1
- data/lib/onfido/models/country_codes.rb +1 -1
- data/lib/onfido/models/device_intelligence_breakdown.rb +1 -1
- data/lib/onfido/models/device_intelligence_breakdown_breakdown.rb +1 -1
- data/lib/onfido/models/device_intelligence_breakdown_breakdown_device.rb +1 -1
- data/lib/onfido/models/device_intelligence_breakdown_breakdown_device_breakdown.rb +1 -1
- data/lib/onfido/models/device_intelligence_breakdown_properties.rb +1 -1
- data/lib/onfido/models/device_intelligence_breakdown_properties_device.rb +2 -42
- data/lib/onfido/models/device_intelligence_breakdown_properties_geolocation.rb +1 -1
- data/lib/onfido/models/device_intelligence_breakdown_properties_ip.rb +5 -35
- data/lib/onfido/models/device_intelligence_report.rb +1 -1
- data/lib/onfido/models/document.rb +2 -2
- data/lib/onfido/models/document_breakdown.rb +1 -1
- data/lib/onfido/models/document_breakdown_age_validation.rb +1 -1
- data/lib/onfido/models/document_breakdown_age_validation_breakdown.rb +1 -1
- data/lib/onfido/models/document_breakdown_compromised_document.rb +1 -1
- data/lib/onfido/models/document_breakdown_compromised_document_breakdown.rb +1 -1
- data/lib/onfido/models/document_breakdown_data_comparison.rb +1 -1
- data/lib/onfido/models/document_breakdown_data_comparison_breakdown.rb +1 -1
- data/lib/onfido/models/document_breakdown_data_comparison_breakdown_issuing_country.rb +1 -1
- data/lib/onfido/models/document_breakdown_data_consistency.rb +1 -1
- data/lib/onfido/models/document_breakdown_data_consistency_breakdown.rb +1 -1
- data/lib/onfido/models/document_breakdown_data_validation.rb +1 -1
- data/lib/onfido/models/document_breakdown_data_validation_breakdown.rb +1 -1
- data/lib/onfido/models/document_breakdown_data_validation_breakdown_document_expiration.rb +1 -1
- data/lib/onfido/models/document_breakdown_data_validation_breakdown_expiry_date.rb +1 -1
- data/lib/onfido/models/document_breakdown_image_integrity.rb +1 -1
- data/lib/onfido/models/document_breakdown_image_integrity_breakdown.rb +1 -1
- data/lib/onfido/models/document_breakdown_image_integrity_breakdown_colour_picture.rb +1 -1
- data/lib/onfido/models/document_breakdown_image_integrity_breakdown_conclusive_document_quality.rb +1 -1
- data/lib/onfido/models/document_breakdown_image_integrity_breakdown_image_quality.rb +1 -1
- data/lib/onfido/models/document_breakdown_image_integrity_breakdown_supported_document.rb +1 -1
- data/lib/onfido/models/document_breakdown_issuing_authority.rb +1 -1
- data/lib/onfido/models/document_breakdown_issuing_authority_breakdown.rb +1 -1
- data/lib/onfido/models/document_breakdown_issuing_authority_breakdown_nfc_active_authentication.rb +1 -1
- data/lib/onfido/models/document_breakdown_issuing_authority_breakdown_nfc_passive_authentication.rb +1 -1
- data/lib/onfido/models/document_breakdown_police_record.rb +1 -1
- data/lib/onfido/models/document_breakdown_visual_authenticity.rb +1 -1
- data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown.rb +1 -1
- data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_digital_tampering.rb +1 -1
- data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_face_detection.rb +1 -1
- data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_fonts.rb +1 -1
- data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_original_document_present.rb +1 -1
- data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_other.rb +1 -1
- data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_picture_face_integrity.rb +1 -1
- data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_security_features.rb +1 -1
- data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_template.rb +1 -1
- data/lib/onfido/models/document_cdq_reasons.rb +1 -1
- data/lib/onfido/models/document_iq_reasons.rb +1 -1
- data/lib/onfido/models/document_odp_reasons.rb +1 -1
- data/lib/onfido/models/document_properties.rb +1 -1
- data/lib/onfido/models/document_properties_address_lines.rb +1 -1
- data/lib/onfido/models/document_properties_barcode_inner.rb +1 -1
- data/lib/onfido/models/document_properties_document_classification.rb +1 -1
- data/lib/onfido/models/document_properties_document_numbers_inner.rb +1 -1
- data/lib/onfido/models/document_properties_driving_licence_information.rb +1 -1
- data/lib/onfido/models/document_properties_extracted_data.rb +1 -1
- data/lib/onfido/models/document_properties_nfc.rb +1 -1
- data/lib/onfido/models/document_report.rb +1 -1
- data/lib/onfido/models/document_response.rb +1 -1
- data/lib/onfido/models/document_shared.rb +2 -2
- data/lib/onfido/models/document_types.rb +7 -2
- data/lib/onfido/models/document_video_report.rb +1 -1
- data/lib/onfido/models/document_video_with_address_information_report.rb +1 -1
- data/lib/onfido/models/document_with_address_information_report.rb +1 -1
- data/lib/onfido/models/document_with_driver_verification_report.rb +1 -1
- data/lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb +1 -1
- data/lib/onfido/models/document_with_driver_verification_report_all_of_properties_all_of_passenger_vehicle.rb +1 -1
- data/lib/onfido/models/document_with_driver_verification_report_all_of_properties_all_of_vehicle_class_details_inner.rb +1 -1
- data/lib/onfido/models/document_with_driving_licence_information_report.rb +1 -1
- data/lib/onfido/models/documents_list.rb +1 -1
- data/lib/onfido/models/error.rb +1 -1
- data/lib/onfido/models/error1.rb +1 -1
- data/lib/onfido/models/error_properties.rb +1 -1
- data/lib/onfido/models/error_properties1.rb +1 -1
- data/lib/onfido/models/extract_request.rb +1 -1
- data/lib/onfido/models/extraction.rb +1 -1
- data/lib/onfido/models/extraction_document_classification.rb +1 -1
- data/lib/onfido/models/extraction_extracted_data.rb +1 -1
- data/lib/onfido/models/facial_similarity_motion_breakdown.rb +1 -1
- data/lib/onfido/models/facial_similarity_motion_breakdown_face_comparison.rb +1 -1
- data/lib/onfido/models/facial_similarity_motion_breakdown_image_integrity.rb +1 -1
- data/lib/onfido/models/facial_similarity_motion_breakdown_image_integrity_breakdown.rb +1 -1
- data/lib/onfido/models/facial_similarity_motion_breakdown_image_integrity_breakdown_face_detected.rb +1 -1
- data/lib/onfido/models/facial_similarity_motion_breakdown_image_integrity_breakdown_source_integrity.rb +1 -1
- data/lib/onfido/models/facial_similarity_motion_breakdown_visual_authenticity.rb +1 -1
- data/lib/onfido/models/facial_similarity_motion_breakdown_visual_authenticity_breakdown.rb +1 -1
- data/lib/onfido/models/facial_similarity_motion_breakdown_visual_authenticity_breakdown_spoofing_detection.rb +1 -1
- data/lib/onfido/models/facial_similarity_motion_properties.rb +1 -1
- data/lib/onfido/models/facial_similarity_motion_report.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_breakdown.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_breakdown_face_comparison.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_breakdown_face_comparison_breakdown.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_breakdown_face_comparison_breakdown_face_match.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_breakdown_face_comparison_breakdown_face_match_properties.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_breakdown_image_integrity.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_breakdown_image_integrity_breakdown.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_breakdown_image_integrity_breakdown_face_detected.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_breakdown_image_integrity_breakdown_source_integrity.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_breakdown_visual_authenticity.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_breakdown_visual_authenticity_breakdown.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_breakdown_visual_authenticity_breakdown_spoofing_detection.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_breakdown_visual_authenticity_breakdown_spoofing_detection_properties.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_fully_auto_breakdown.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_fully_auto_breakdown_image_integrity.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_fully_auto_breakdown_image_integrity_breakdown.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_fully_auto_breakdown_image_integrity_breakdown_source_integrity.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_fully_auto_properties.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_fully_auto_report.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_properties.rb +1 -1
- data/lib/onfido/models/facial_similarity_photo_report.rb +1 -1
- data/lib/onfido/models/facial_similarity_video_breakdown.rb +1 -1
- data/lib/onfido/models/facial_similarity_video_breakdown_face_comparison.rb +1 -1
- data/lib/onfido/models/facial_similarity_video_breakdown_image_integrity.rb +1 -1
- data/lib/onfido/models/facial_similarity_video_breakdown_image_integrity_breakdown.rb +1 -1
- data/lib/onfido/models/facial_similarity_video_breakdown_image_integrity_breakdown_face_detected.rb +1 -1
- data/lib/onfido/models/facial_similarity_video_breakdown_image_integrity_breakdown_source_integrity.rb +1 -1
- data/lib/onfido/models/facial_similarity_video_breakdown_visual_authenticity.rb +1 -1
- data/lib/onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown.rb +1 -1
- data/lib/onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown_liveness_detected.rb +1 -1
- data/lib/onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown_spoofing_detection.rb +1 -1
- data/lib/onfido/models/facial_similarity_video_properties.rb +1 -1
- data/lib/onfido/models/facial_similarity_video_report.rb +1 -1
- data/lib/onfido/models/id_number.rb +1 -1
- data/lib/onfido/models/id_photo.rb +1 -1
- data/lib/onfido/models/id_photo_response.rb +1 -1
- data/lib/onfido/models/id_photos_list.rb +1 -1
- data/lib/onfido/models/identity_enhanced_breakdown.rb +1 -1
- data/lib/onfido/models/identity_enhanced_breakdown_address.rb +1 -1
- data/lib/onfido/models/identity_enhanced_breakdown_address_breakdown.rb +1 -1
- data/lib/onfido/models/identity_enhanced_breakdown_address_breakdown_credit_agencies.rb +1 -1
- data/lib/onfido/models/identity_enhanced_breakdown_address_breakdown_credit_agencies_properties.rb +1 -1
- data/lib/onfido/models/identity_enhanced_breakdown_address_breakdown_telephone_database.rb +1 -1
- data/lib/onfido/models/identity_enhanced_breakdown_address_breakdown_voting_register.rb +1 -1
- data/lib/onfido/models/identity_enhanced_breakdown_date_of_birth.rb +1 -1
- data/lib/onfido/models/identity_enhanced_breakdown_date_of_birth_breakdown.rb +1 -1
- data/lib/onfido/models/identity_enhanced_breakdown_date_of_birth_breakdown_credit_agencies.rb +1 -1
- data/lib/onfido/models/identity_enhanced_breakdown_date_of_birth_breakdown_voting_register.rb +1 -1
- data/lib/onfido/models/identity_enhanced_breakdown_mortality.rb +1 -1
- data/lib/onfido/models/identity_enhanced_breakdown_sources.rb +1 -1
- data/lib/onfido/models/identity_enhanced_breakdown_sources_breakdown.rb +1 -1
- data/lib/onfido/models/identity_enhanced_breakdown_sources_breakdown_total_sources.rb +1 -1
- data/lib/onfido/models/identity_enhanced_breakdown_sources_breakdown_total_sources_properties.rb +1 -1
- data/lib/onfido/models/identity_enhanced_properties.rb +1 -1
- data/lib/onfido/models/identity_enhanced_properties_matched_addresses_inner.rb +1 -1
- data/lib/onfido/models/identity_enhanced_report.rb +1 -1
- data/lib/onfido/models/india_pan_report.rb +1 -1
- data/lib/onfido/models/india_pan_report_all_of_breakdown.rb +1 -1
- data/lib/onfido/models/india_pan_report_all_of_breakdown_device.rb +1 -1
- data/lib/onfido/models/india_pan_report_all_of_breakdown_device_breakdown.rb +1 -1
- data/lib/onfido/models/india_pan_report_all_of_breakdown_device_breakdown_pan_valid.rb +1 -1
- data/lib/onfido/models/india_pan_report_all_of_properties.rb +1 -1
- data/lib/onfido/models/india_pan_report_all_of_properties_device.rb +1 -1
- data/lib/onfido/models/known_faces_breakdown.rb +1 -1
- data/lib/onfido/models/known_faces_breakdown_image_integrity.rb +1 -1
- data/lib/onfido/models/known_faces_breakdown_previously_seen_faces.rb +1 -1
- data/lib/onfido/models/known_faces_properties.rb +1 -1
- data/lib/onfido/models/known_faces_properties_matches_inner.rb +1 -1
- data/lib/onfido/models/known_faces_report.rb +1 -1
- data/lib/onfido/models/live_photo.rb +1 -1
- data/lib/onfido/models/live_photo_response.rb +1 -1
- data/lib/onfido/models/live_photos_list.rb +1 -1
- data/lib/onfido/models/live_video.rb +1 -1
- data/lib/onfido/models/live_videos_list.rb +1 -1
- data/lib/onfido/models/location.rb +1 -1
- data/lib/onfido/models/location_builder.rb +1 -1
- data/lib/onfido/models/location_shared.rb +1 -1
- data/lib/onfido/models/motion_capture.rb +1 -1
- data/lib/onfido/models/motion_captures_list.rb +1 -1
- data/lib/onfido/models/photo_auto_reasons.rb +1 -1
- data/lib/onfido/models/photo_reasons.rb +1 -1
- data/lib/onfido/models/proof_of_address_breakdown.rb +1 -1
- data/lib/onfido/models/proof_of_address_breakdown_data_comparison.rb +1 -1
- data/lib/onfido/models/proof_of_address_breakdown_data_comparison_breakdown.rb +1 -1
- data/lib/onfido/models/proof_of_address_breakdown_document_classification.rb +1 -1
- data/lib/onfido/models/proof_of_address_breakdown_document_classification_breakdown.rb +1 -1
- data/lib/onfido/models/proof_of_address_breakdown_image_integrity.rb +1 -1
- data/lib/onfido/models/proof_of_address_breakdown_image_integrity_breakdown.rb +1 -1
- data/lib/onfido/models/proof_of_address_properties.rb +1 -1
- data/lib/onfido/models/proof_of_address_report.rb +1 -1
- data/lib/onfido/models/repeat_attempts_list.rb +1 -1
- data/lib/onfido/models/repeat_attempts_list_repeat_attempts_inner.rb +1 -1
- data/lib/onfido/models/report.rb +1 -1
- data/lib/onfido/models/report_document.rb +1 -1
- 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 +1 -1
- 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 +1 -1
- data/lib/onfido/models/results_feedback.rb +1 -1
- data/lib/onfido/models/sdk_token.rb +1 -1
- data/lib/onfido/models/sdk_token_builder.rb +1 -1
- data/lib/onfido/models/sdk_token_request.rb +1 -1
- data/lib/onfido/models/sdk_token_response.rb +1 -1
- data/lib/onfido/models/task.rb +1 -1
- data/lib/onfido/models/task_item.rb +23 -2
- data/lib/onfido/models/timeline_file_reference.rb +1 -1
- data/lib/onfido/models/us_driving_licence_breakdown.rb +1 -1
- data/lib/onfido/models/us_driving_licence_breakdown_address.rb +1 -1
- data/lib/onfido/models/us_driving_licence_breakdown_address_breakdown.rb +1 -1
- data/lib/onfido/models/us_driving_licence_breakdown_document.rb +1 -1
- data/lib/onfido/models/us_driving_licence_breakdown_document_breakdown.rb +1 -1
- data/lib/onfido/models/us_driving_licence_breakdown_personal.rb +1 -1
- data/lib/onfido/models/us_driving_licence_breakdown_personal_breakdown.rb +1 -1
- data/lib/onfido/models/us_driving_licence_builder.rb +1 -1
- data/lib/onfido/models/us_driving_licence_report.rb +1 -1
- data/lib/onfido/models/us_driving_licence_shared.rb +1 -1
- data/lib/onfido/models/video_reasons.rb +1 -1
- data/lib/onfido/models/watchlist_aml_breakdown.rb +1 -1
- data/lib/onfido/models/watchlist_aml_breakdown_adverse_media.rb +1 -1
- data/lib/onfido/models/watchlist_aml_breakdown_legal_and_regulatory_warnings.rb +1 -1
- data/lib/onfido/models/watchlist_aml_breakdown_politically_exposed_person.rb +1 -1
- data/lib/onfido/models/watchlist_aml_breakdown_sanction.rb +1 -1
- data/lib/onfido/models/watchlist_aml_properties.rb +1 -1
- data/lib/onfido/models/watchlist_aml_report.rb +1 -1
- data/lib/onfido/models/watchlist_enhanced_breakdown.rb +1 -1
- data/lib/onfido/models/watchlist_enhanced_properties.rb +2 -2
- data/lib/onfido/models/watchlist_enhanced_properties_records_inner.rb +311 -0
- data/lib/onfido/models/watchlist_enhanced_properties_records_inner_address_inner.rb +281 -0
- data/lib/onfido/models/{consents_builder.rb → watchlist_enhanced_properties_records_inner_alias_inner.rb} +24 -6
- data/lib/onfido/models/watchlist_enhanced_properties_records_inner_associate_inner.rb +232 -0
- data/lib/onfido/models/watchlist_enhanced_properties_records_inner_attribute_inner.rb +223 -0
- data/lib/onfido/models/watchlist_enhanced_properties_records_inner_event_inner.rb +250 -0
- data/lib/onfido/models/watchlist_enhanced_properties_records_inner_event_inner_source.rb +241 -0
- data/lib/onfido/models/watchlist_enhanced_properties_records_inner_source_inner.rb +241 -0
- data/lib/onfido/models/watchlist_enhanced_report.rb +1 -1
- data/lib/onfido/models/watchlist_monitor.rb +1 -1
- data/lib/onfido/models/watchlist_monitor_builder.rb +1 -1
- data/lib/onfido/models/watchlist_monitor_match.rb +1 -1
- data/lib/onfido/models/watchlist_monitor_matches_list.rb +1 -1
- data/lib/onfido/models/watchlist_monitor_matches_updater.rb +1 -1
- data/lib/onfido/models/watchlist_monitor_response.rb +1 -1
- data/lib/onfido/models/watchlist_monitor_shared.rb +1 -1
- data/lib/onfido/models/watchlist_monitors_list.rb +1 -1
- data/lib/onfido/models/watchlist_peps_only_report.rb +1 -1
- data/lib/onfido/models/watchlist_sanctions_only_report.rb +1 -1
- data/lib/onfido/models/watchlist_standard_breakdown.rb +1 -1
- data/lib/onfido/models/watchlist_standard_properties.rb +1 -1
- data/lib/onfido/models/watchlist_standard_report.rb +1 -1
- data/lib/onfido/models/webhook.rb +1 -1
- data/lib/onfido/models/webhook_builder.rb +1 -1
- data/lib/onfido/models/webhook_create.rb +1 -1
- data/lib/onfido/models/webhook_event.rb +1 -1
- data/lib/onfido/models/webhook_event_object_status.rb +58 -0
- data/lib/onfido/models/webhook_event_payload.rb +3 -4
- data/lib/onfido/models/webhook_event_payload_object.rb +24 -3
- data/lib/onfido/models/webhook_event_payload_resource.rb +380 -0
- data/lib/onfido/models/webhook_event_resource_type.rb +45 -0
- data/lib/onfido/models/webhook_event_type.rb +1 -1
- data/lib/onfido/models/webhook_resend.rb +1 -1
- data/lib/onfido/models/webhook_response.rb +1 -1
- data/lib/onfido/models/webhook_shared.rb +1 -1
- data/lib/onfido/models/webhook_update.rb +1 -1
- data/lib/onfido/models/webhook_updater.rb +1 -1
- data/lib/onfido/models/webhooks_list.rb +1 -1
- data/lib/onfido/models/webhooks_resend_item.rb +1 -1
- data/lib/onfido/models/workflow_run.rb +6 -16
- data/lib/onfido/models/workflow_run_builder.rb +3 -2
- data/lib/onfido/models/{workflow_run_response_error.rb → workflow_run_error.rb} +4 -5
- data/lib/onfido/models/{workflow_run_shared_link.rb → workflow_run_link.rb} +8 -5
- data/lib/onfido/models/workflow_run_request.rb +1 -1
- data/lib/onfido/models/workflow_run_response.rb +4 -15
- data/lib/onfido/models/workflow_run_shared.rb +3 -2
- data/lib/onfido/models/workflow_run_status.rb +47 -0
- data/lib/onfido/version.rb +2 -2
- data/lib/onfido.rb +18 -5
- data/onfido.gemspec +1 -1
- data/spec/{webhook_event_verifier_spec.rb → classic_webhook_event_verifier_spec.rb} +4 -4
- data/spec/integrations/applicant_spec.rb +5 -1
- data/spec/integrations/check_spec.rb +4 -4
- data/spec/integrations/document_spec.rb +1 -1
- data/spec/integrations/qualified_electronic_signature_spec.rb +1 -1
- data/spec/integrations/workflow_run_spec.rb +3 -3
- data/spec/shared_contexts/with_check.rb +1 -0
- data/spec/shared_contexts/with_document.rb +1 -1
- data/spec/studio_webhook_event_verifier_spec.rb +39 -0
- metadata +39 -23
@@ -0,0 +1,241 @@
|
|
1
|
+
=begin
|
2
|
+
#Onfido API v3.6
|
3
|
+
|
4
|
+
#The Onfido 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.9.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Onfido
|
17
|
+
class WatchlistEnhancedPropertiesRecordsInnerSourceInner
|
18
|
+
attr_accessor :source_headline
|
19
|
+
|
20
|
+
attr_accessor :source_name
|
21
|
+
|
22
|
+
attr_accessor :source_url
|
23
|
+
|
24
|
+
attr_accessor :source_format
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'source_headline' => :'source_headline',
|
30
|
+
:'source_name' => :'source_name',
|
31
|
+
:'source_url' => :'source_url',
|
32
|
+
:'source_format' => :'source_format'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
def self.openapi_types
|
43
|
+
{
|
44
|
+
:'source_headline' => :'String',
|
45
|
+
:'source_name' => :'String',
|
46
|
+
:'source_url' => :'String',
|
47
|
+
:'source_format' => :'String'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# List of attributes with nullable: true
|
52
|
+
def self.openapi_nullable
|
53
|
+
Set.new([
|
54
|
+
])
|
55
|
+
end
|
56
|
+
|
57
|
+
# Initializes the object
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
59
|
+
def initialize(attributes = {})
|
60
|
+
if (!attributes.is_a?(Hash))
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Onfido::WatchlistEnhancedPropertiesRecordsInnerSourceInner` initialize method"
|
62
|
+
end
|
63
|
+
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Onfido::WatchlistEnhancedPropertiesRecordsInnerSourceInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
68
|
+
end
|
69
|
+
h[k.to_sym] = v
|
70
|
+
}
|
71
|
+
|
72
|
+
if attributes.key?(:'source_headline')
|
73
|
+
self.source_headline = attributes[:'source_headline']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'source_name')
|
77
|
+
self.source_name = attributes[:'source_name']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'source_url')
|
81
|
+
self.source_url = attributes[:'source_url']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'source_format')
|
85
|
+
self.source_format = attributes[:'source_format']
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
90
|
+
# @return Array for valid properties with the reasons
|
91
|
+
def list_invalid_properties
|
92
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
93
|
+
invalid_properties = Array.new
|
94
|
+
invalid_properties
|
95
|
+
end
|
96
|
+
|
97
|
+
# Check to see if the all the properties in the model are valid
|
98
|
+
# @return true if the model is valid
|
99
|
+
def valid?
|
100
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
101
|
+
true
|
102
|
+
end
|
103
|
+
|
104
|
+
# Checks equality by comparing each attribute.
|
105
|
+
# @param [Object] Object to be compared
|
106
|
+
def ==(o)
|
107
|
+
return true if self.equal?(o)
|
108
|
+
self.class == o.class &&
|
109
|
+
source_headline == o.source_headline &&
|
110
|
+
source_name == o.source_name &&
|
111
|
+
source_url == o.source_url &&
|
112
|
+
source_format == o.source_format
|
113
|
+
end
|
114
|
+
|
115
|
+
# @see the `==` method
|
116
|
+
# @param [Object] Object to be compared
|
117
|
+
def eql?(o)
|
118
|
+
self == o
|
119
|
+
end
|
120
|
+
|
121
|
+
# Calculates hash code according to all attributes.
|
122
|
+
# @return [Integer] Hash code
|
123
|
+
def hash
|
124
|
+
[source_headline, source_name, source_url, source_format].hash
|
125
|
+
end
|
126
|
+
|
127
|
+
# Builds the object from hash
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
129
|
+
# @return [Object] Returns the model itself
|
130
|
+
def self.build_from_hash(attributes)
|
131
|
+
return nil unless attributes.is_a?(Hash)
|
132
|
+
attributes = attributes.transform_keys(&:to_sym)
|
133
|
+
transformed_hash = {}
|
134
|
+
openapi_types.each_pair do |key, type|
|
135
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
136
|
+
transformed_hash["#{key}"] = nil
|
137
|
+
elsif type =~ /\AArray<(.*)>/i
|
138
|
+
# check to ensure the input is an array given that the attribute
|
139
|
+
# is documented as an array but the input is not
|
140
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
141
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
142
|
+
end
|
143
|
+
elsif !attributes[attribute_map[key]].nil?
|
144
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
145
|
+
end
|
146
|
+
end
|
147
|
+
new(transformed_hash)
|
148
|
+
end
|
149
|
+
|
150
|
+
# Deserializes the data based on type
|
151
|
+
# @param string type Data type
|
152
|
+
# @param string value Value to be deserialized
|
153
|
+
# @return [Object] Deserialized data
|
154
|
+
def self._deserialize(type, value)
|
155
|
+
case type.to_sym
|
156
|
+
when :Time
|
157
|
+
Time.parse(value)
|
158
|
+
when :Date
|
159
|
+
Date.parse(value)
|
160
|
+
when :String
|
161
|
+
value.to_s
|
162
|
+
when :Integer
|
163
|
+
value.to_i
|
164
|
+
when :Float
|
165
|
+
value.to_f
|
166
|
+
when :Boolean
|
167
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
168
|
+
true
|
169
|
+
else
|
170
|
+
false
|
171
|
+
end
|
172
|
+
when :Object
|
173
|
+
# generic object (usually a Hash), return directly
|
174
|
+
value
|
175
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
176
|
+
inner_type = Regexp.last_match[:inner_type]
|
177
|
+
value.map { |v| _deserialize(inner_type, v) }
|
178
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
179
|
+
k_type = Regexp.last_match[:k_type]
|
180
|
+
v_type = Regexp.last_match[:v_type]
|
181
|
+
{}.tap do |hash|
|
182
|
+
value.each do |k, v|
|
183
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
184
|
+
end
|
185
|
+
end
|
186
|
+
else # model
|
187
|
+
# models (e.g. Pet) or oneOf
|
188
|
+
klass = Onfido.const_get(type)
|
189
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
# Returns the string representation of the object
|
194
|
+
# @return [String] String presentation of the object
|
195
|
+
def to_s
|
196
|
+
to_hash.to_s
|
197
|
+
end
|
198
|
+
|
199
|
+
# to_body is an alias to to_hash (backward compatibility)
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
201
|
+
def to_body
|
202
|
+
to_hash
|
203
|
+
end
|
204
|
+
|
205
|
+
# Returns the object in the form of hash
|
206
|
+
# @return [Hash] Returns the object in the form of hash
|
207
|
+
def to_hash
|
208
|
+
hash = {}
|
209
|
+
self.class.attribute_map.each_pair do |attr, param|
|
210
|
+
value = self.send(attr)
|
211
|
+
if value.nil?
|
212
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
213
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
214
|
+
end
|
215
|
+
|
216
|
+
hash[param] = _to_hash(value)
|
217
|
+
end
|
218
|
+
hash
|
219
|
+
end
|
220
|
+
|
221
|
+
# Outputs non-array value in the form of hash
|
222
|
+
# For object, use to_hash. Otherwise, just return the value
|
223
|
+
# @param [Object] value Any valid value
|
224
|
+
# @return [Hash] Returns the value in the form of hash
|
225
|
+
def _to_hash(value)
|
226
|
+
if value.is_a?(Array)
|
227
|
+
value.compact.map { |v| _to_hash(v) }
|
228
|
+
elsif value.is_a?(Hash)
|
229
|
+
{}.tap do |hash|
|
230
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
231
|
+
end
|
232
|
+
elsif value.respond_to? :to_hash
|
233
|
+
value.to_hash
|
234
|
+
else
|
235
|
+
value
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
end
|
240
|
+
|
241
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
=begin
|
2
|
+
#Onfido API v3.6
|
3
|
+
|
4
|
+
#The Onfido 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.9.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Onfido
|
17
|
+
class WebhookEventObjectStatus
|
18
|
+
PROCESSING = "processing".freeze
|
19
|
+
AWAITING_INPUT = "awaiting_input".freeze
|
20
|
+
AWAITING_CLIENT_INPUT = "awaiting_client_input".freeze
|
21
|
+
APPROVED = "approved".freeze
|
22
|
+
DECLINED = "declined".freeze
|
23
|
+
REVIEW = "review".freeze
|
24
|
+
ABANDONED = "abandoned".freeze
|
25
|
+
ERROR = "error".freeze
|
26
|
+
STARTED = "started".freeze
|
27
|
+
CANCELLED = "cancelled".freeze
|
28
|
+
COMPLETED = "completed".freeze
|
29
|
+
AWAITING_DATA = "awaiting_data".freeze
|
30
|
+
AWAITING_APPROVAL = "awaiting_approval".freeze
|
31
|
+
COMPLETE = "complete".freeze
|
32
|
+
WITHDRAWN = "withdrawn".freeze
|
33
|
+
IN_PROGRESS = "in_progress".freeze
|
34
|
+
AWAITING_APPLICANT = "awaiting_applicant".freeze
|
35
|
+
PAUSED = "paused".freeze
|
36
|
+
REOPENED = "reopened".freeze
|
37
|
+
UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
|
38
|
+
|
39
|
+
def self.all_vars
|
40
|
+
@all_vars ||= [PROCESSING, AWAITING_INPUT, AWAITING_CLIENT_INPUT, APPROVED, DECLINED, REVIEW, ABANDONED, ERROR, STARTED, CANCELLED, COMPLETED, AWAITING_DATA, AWAITING_APPROVAL, COMPLETE, WITHDRAWN, IN_PROGRESS, AWAITING_APPLICANT, PAUSED, REOPENED, UNKNOWN_DEFAULT_OPEN_API].freeze
|
41
|
+
end
|
42
|
+
|
43
|
+
# Builds the enum from string
|
44
|
+
# @param [String] The enum value in the form of the string
|
45
|
+
# @return [String] The enum value
|
46
|
+
def self.build_from_hash(value)
|
47
|
+
new.build_from_hash(value)
|
48
|
+
end
|
49
|
+
|
50
|
+
# Builds the enum from string
|
51
|
+
# @param [String] The enum value in the form of the string
|
52
|
+
# @return [String] The enum value
|
53
|
+
def build_from_hash(value)
|
54
|
+
return value if WebhookEventObjectStatus.all_vars.include?(value)
|
55
|
+
raise "Invalid ENUM value #{value} for class #WebhookEventObjectStatus"
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v3.6
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
Generator version: 7.9.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -23,7 +23,6 @@ module Onfido
|
|
23
23
|
|
24
24
|
attr_accessor :object
|
25
25
|
|
26
|
-
# The resource affected by this event.
|
27
26
|
attr_accessor :resource
|
28
27
|
|
29
28
|
class EnumAttributeValidator
|
@@ -66,10 +65,10 @@ module Onfido
|
|
66
65
|
# Attribute type mapping.
|
67
66
|
def self.openapi_types
|
68
67
|
{
|
69
|
-
:'resource_type' => :'
|
68
|
+
:'resource_type' => :'WebhookEventResourceType',
|
70
69
|
:'action' => :'WebhookEventType',
|
71
70
|
:'object' => :'WebhookEventPayloadObject',
|
72
|
-
:'resource' => :'
|
71
|
+
:'resource' => :'WebhookEventPayloadResource'
|
73
72
|
}
|
74
73
|
end
|
75
74
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v3.6
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.
|
9
|
+
Generator version: 7.9.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -19,7 +19,6 @@ module Onfido
|
|
19
19
|
# The unique identifier of the resource.
|
20
20
|
attr_accessor :id
|
21
21
|
|
22
|
-
# The current state of the object, if available.
|
23
22
|
attr_accessor :status
|
24
23
|
|
25
24
|
# The date and time when the operation was started, if available.
|
@@ -31,6 +30,28 @@ module Onfido
|
|
31
30
|
# The uri of the resource.
|
32
31
|
attr_accessor :href
|
33
32
|
|
33
|
+
class EnumAttributeValidator
|
34
|
+
attr_reader :datatype
|
35
|
+
attr_reader :allowable_values
|
36
|
+
|
37
|
+
def initialize(datatype, allowable_values)
|
38
|
+
@allowable_values = allowable_values.map do |value|
|
39
|
+
case datatype.to_s
|
40
|
+
when /Integer/i
|
41
|
+
value.to_i
|
42
|
+
when /Float/i
|
43
|
+
value.to_f
|
44
|
+
else
|
45
|
+
value
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def valid?(value)
|
51
|
+
!value || allowable_values.include?(value)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
34
55
|
# Attribute mapping from ruby-style variable name to JSON key.
|
35
56
|
def self.attribute_map
|
36
57
|
{
|
@@ -51,7 +72,7 @@ module Onfido
|
|
51
72
|
def self.openapi_types
|
52
73
|
{
|
53
74
|
:'id' => :'String',
|
54
|
-
:'status' => :'
|
75
|
+
:'status' => :'WebhookEventObjectStatus',
|
55
76
|
:'started_at_iso8601' => :'Time',
|
56
77
|
:'completed_at_iso8601' => :'Time',
|
57
78
|
:'href' => :'String'
|