onfido 5.6.0 → 6.3.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.
Files changed (357) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -0
  3. data/MIGRATION.md +28 -0
  4. data/README.md +18 -2
  5. data/lib/onfido/api/default_api.rb +1191 -94
  6. data/lib/onfido/api_client.rb +7 -3
  7. data/lib/onfido/api_error.rb +1 -1
  8. data/lib/onfido/configuration.rb +89 -2
  9. data/lib/onfido/models/address.rb +30 -4
  10. data/lib/onfido/models/address_builder.rb +30 -4
  11. data/lib/onfido/models/address_shared.rb +30 -4
  12. data/lib/onfido/models/addresses_list.rb +10 -4
  13. data/lib/onfido/models/applicant.rb +20 -4
  14. data/lib/onfido/models/applicant_builder.rb +10 -4
  15. data/lib/onfido/models/applicant_consent.rb +30 -4
  16. data/lib/onfido/models/applicant_consent_builder.rb +30 -4
  17. data/lib/onfido/models/applicant_consent_name.rb +1 -1
  18. data/lib/onfido/models/applicant_create.rb +10 -4
  19. data/lib/onfido/models/applicant_request.rb +10 -4
  20. data/lib/onfido/models/applicant_response.rb +20 -4
  21. data/lib/onfido/models/applicant_shared.rb +10 -4
  22. data/lib/onfido/models/applicant_update.rb +10 -4
  23. data/lib/onfido/models/applicant_updater.rb +10 -4
  24. data/lib/onfido/models/applicants_list.rb +20 -4
  25. data/lib/onfido/models/biometric_token.rb +265 -0
  26. data/lib/onfido/models/biometric_token_data.rb +317 -0
  27. data/lib/onfido/models/biometric_token_response.rb +237 -0
  28. data/lib/onfido/models/biometric_token_updater.rb +262 -0
  29. data/lib/onfido/models/biometric_tokens_response.rb +239 -0
  30. data/lib/onfido/models/check.rb +30 -4
  31. data/lib/onfido/models/check_builder.rb +30 -4
  32. data/lib/onfido/models/check_request.rb +20 -4
  33. data/lib/onfido/models/check_response.rb +20 -4
  34. data/lib/onfido/models/check_shared.rb +20 -4
  35. data/lib/onfido/models/check_status.rb +1 -1
  36. data/lib/onfido/models/checks_list.rb +20 -4
  37. data/lib/onfido/models/complete_task_builder.rb +20 -4
  38. data/lib/onfido/models/complete_task_data_builder.rb +3 -4
  39. data/lib/onfido/models/country_codes.rb +1 -1
  40. data/lib/onfido/models/device_intelligence_breakdown.rb +14 -26
  41. data/lib/onfido/models/device_intelligence_breakdown_device.rb +10 -4
  42. data/lib/onfido/models/device_intelligence_breakdown_device_breakdown.rb +10 -4
  43. data/lib/onfido/models/device_intelligence_properties.rb +13 -7
  44. data/lib/onfido/models/{device_intelligence_breakdown_properties_device.rb → device_intelligence_properties_device.rb} +33 -7
  45. data/lib/onfido/models/{device_intelligence_breakdown_properties_geolocation.rb → device_intelligence_properties_geolocation.rb} +12 -6
  46. data/lib/onfido/models/{device_intelligence_breakdown_properties_ip.rb → device_intelligence_properties_ip.rb} +12 -6
  47. data/lib/onfido/models/device_intelligence_report.rb +30 -4
  48. data/lib/onfido/models/document.rb +20 -4
  49. data/lib/onfido/models/document_breakdown.rb +10 -4
  50. data/lib/onfido/models/document_breakdown_age_validation.rb +10 -4
  51. data/lib/onfido/models/document_breakdown_age_validation_breakdown.rb +10 -4
  52. data/lib/onfido/models/document_breakdown_compromised_document.rb +10 -4
  53. data/lib/onfido/models/document_breakdown_compromised_document_breakdown.rb +10 -4
  54. data/lib/onfido/models/document_breakdown_data_comparison.rb +10 -4
  55. data/lib/onfido/models/document_breakdown_data_comparison_breakdown.rb +10 -4
  56. data/lib/onfido/models/document_breakdown_data_comparison_breakdown_issuing_country.rb +10 -4
  57. data/lib/onfido/models/document_breakdown_data_consistency.rb +10 -4
  58. data/lib/onfido/models/document_breakdown_data_consistency_breakdown.rb +10 -4
  59. data/lib/onfido/models/document_breakdown_data_validation.rb +10 -4
  60. data/lib/onfido/models/document_breakdown_data_validation_breakdown.rb +10 -4
  61. data/lib/onfido/models/document_breakdown_data_validation_breakdown_document_expiration.rb +10 -4
  62. data/lib/onfido/models/document_breakdown_data_validation_breakdown_expiry_date.rb +10 -4
  63. data/lib/onfido/models/document_breakdown_image_integrity.rb +10 -4
  64. data/lib/onfido/models/document_breakdown_image_integrity_breakdown.rb +10 -4
  65. data/lib/onfido/models/document_breakdown_image_integrity_breakdown_colour_picture.rb +10 -4
  66. data/lib/onfido/models/document_breakdown_image_integrity_breakdown_conclusive_document_quality.rb +10 -4
  67. data/lib/onfido/models/document_breakdown_image_integrity_breakdown_image_quality.rb +10 -4
  68. data/lib/onfido/models/document_breakdown_image_integrity_breakdown_supported_document.rb +10 -4
  69. data/lib/onfido/models/document_breakdown_issuing_authority.rb +10 -4
  70. data/lib/onfido/models/document_breakdown_issuing_authority_breakdown.rb +10 -4
  71. data/lib/onfido/models/document_breakdown_issuing_authority_breakdown_nfc_active_authentication.rb +10 -4
  72. data/lib/onfido/models/document_breakdown_issuing_authority_breakdown_nfc_passive_authentication.rb +10 -4
  73. data/lib/onfido/models/document_breakdown_police_record.rb +10 -4
  74. data/lib/onfido/models/document_breakdown_visual_authenticity.rb +10 -4
  75. data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown.rb +10 -4
  76. data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_digital_tampering.rb +10 -4
  77. data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_face_detection.rb +10 -4
  78. data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_fonts.rb +10 -4
  79. data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_original_document_present.rb +10 -4
  80. data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_other.rb +10 -4
  81. data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_picture_face_integrity.rb +10 -4
  82. data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_security_features.rb +10 -4
  83. data/lib/onfido/models/document_breakdown_visual_authenticity_breakdown_template.rb +10 -4
  84. data/lib/onfido/models/document_cdq_reasons.rb +10 -4
  85. data/lib/onfido/models/document_iq_reasons.rb +10 -4
  86. data/lib/onfido/models/document_odp_reasons.rb +10 -4
  87. data/lib/onfido/models/document_properties.rb +20 -16
  88. data/lib/onfido/models/document_properties_address_lines.rb +10 -4
  89. data/lib/onfido/models/document_properties_barcode_inner.rb +10 -4
  90. data/lib/onfido/models/document_properties_document_classification.rb +10 -4
  91. data/lib/onfido/models/document_properties_document_numbers_inner.rb +10 -4
  92. data/lib/onfido/models/document_properties_driving_licence_information_item.rb +10 -4
  93. data/lib/onfido/models/document_properties_extracted_data.rb +10 -4
  94. data/lib/onfido/models/document_properties_nfc.rb +10 -4
  95. data/lib/onfido/models/document_properties_with_driving_licence_information.rb +697 -0
  96. data/lib/onfido/models/document_report.rb +30 -4
  97. data/lib/onfido/models/document_report_shared.rb +10 -4
  98. data/lib/onfido/models/document_response.rb +20 -4
  99. data/lib/onfido/models/document_shared.rb +10 -4
  100. data/lib/onfido/models/document_types.rb +4 -2
  101. data/lib/onfido/models/document_video_report.rb +30 -4
  102. data/lib/onfido/models/document_video_with_address_information_report.rb +30 -4
  103. data/lib/onfido/models/document_with_address_information_report.rb +30 -4
  104. data/lib/onfido/models/document_with_driver_verification_report.rb +30 -4
  105. data/lib/onfido/models/document_with_driver_verification_report_all_of_properties.rb +20 -16
  106. data/lib/onfido/models/document_with_driver_verification_report_all_of_properties_all_of_passenger_vehicle.rb +10 -4
  107. data/lib/onfido/models/document_with_driver_verification_report_all_of_properties_all_of_vehicle_class_details_inner.rb +10 -4
  108. data/lib/onfido/models/document_with_driving_licence_information_report.rb +31 -5
  109. data/lib/onfido/models/documents_list.rb +20 -4
  110. data/lib/onfido/models/error.rb +10 -4
  111. data/lib/onfido/models/error1.rb +10 -4
  112. data/lib/onfido/models/error_properties.rb +10 -4
  113. data/lib/onfido/models/error_properties1.rb +10 -4
  114. data/lib/onfido/models/extract_request.rb +20 -4
  115. data/lib/onfido/models/extraction.rb +10 -4
  116. data/lib/onfido/models/extraction_document_classification.rb +10 -4
  117. data/lib/onfido/models/extraction_extracted_data.rb +10 -4
  118. data/lib/onfido/models/facial_similarity_motion_breakdown.rb +10 -4
  119. data/lib/onfido/models/facial_similarity_motion_breakdown_face_comparison.rb +10 -4
  120. data/lib/onfido/models/facial_similarity_motion_breakdown_image_integrity.rb +10 -4
  121. data/lib/onfido/models/facial_similarity_motion_breakdown_image_integrity_breakdown.rb +10 -4
  122. data/lib/onfido/models/facial_similarity_motion_breakdown_image_integrity_breakdown_face_detected.rb +10 -4
  123. data/lib/onfido/models/facial_similarity_motion_breakdown_image_integrity_breakdown_source_integrity.rb +10 -4
  124. data/lib/onfido/models/facial_similarity_motion_breakdown_visual_authenticity.rb +10 -4
  125. data/lib/onfido/models/facial_similarity_motion_breakdown_visual_authenticity_breakdown.rb +10 -4
  126. data/lib/onfido/models/facial_similarity_motion_breakdown_visual_authenticity_breakdown_spoofing_detection.rb +10 -4
  127. data/lib/onfido/models/facial_similarity_motion_properties.rb +10 -4
  128. data/lib/onfido/models/facial_similarity_motion_report.rb +30 -4
  129. data/lib/onfido/models/facial_similarity_photo_breakdown.rb +10 -4
  130. data/lib/onfido/models/facial_similarity_photo_breakdown_face_comparison.rb +10 -4
  131. data/lib/onfido/models/facial_similarity_photo_breakdown_face_comparison_breakdown.rb +10 -4
  132. data/lib/onfido/models/facial_similarity_photo_breakdown_face_comparison_breakdown_face_match.rb +10 -4
  133. data/lib/onfido/models/facial_similarity_photo_breakdown_face_comparison_breakdown_face_match_properties.rb +10 -4
  134. data/lib/onfido/models/facial_similarity_photo_breakdown_image_integrity.rb +10 -4
  135. data/lib/onfido/models/facial_similarity_photo_breakdown_image_integrity_breakdown.rb +10 -4
  136. data/lib/onfido/models/facial_similarity_photo_breakdown_image_integrity_breakdown_face_detected.rb +10 -4
  137. data/lib/onfido/models/facial_similarity_photo_breakdown_image_integrity_breakdown_source_integrity.rb +10 -4
  138. data/lib/onfido/models/facial_similarity_photo_breakdown_visual_authenticity.rb +10 -4
  139. data/lib/onfido/models/facial_similarity_photo_breakdown_visual_authenticity_breakdown.rb +10 -4
  140. data/lib/onfido/models/facial_similarity_photo_breakdown_visual_authenticity_breakdown_spoofing_detection.rb +10 -4
  141. data/lib/onfido/models/facial_similarity_photo_breakdown_visual_authenticity_breakdown_spoofing_detection_properties.rb +10 -4
  142. data/lib/onfido/models/facial_similarity_photo_fully_auto_breakdown.rb +10 -4
  143. data/lib/onfido/models/facial_similarity_photo_fully_auto_breakdown_image_integrity.rb +10 -4
  144. data/lib/onfido/models/facial_similarity_photo_fully_auto_breakdown_image_integrity_breakdown.rb +10 -4
  145. data/lib/onfido/models/facial_similarity_photo_fully_auto_breakdown_image_integrity_breakdown_source_integrity.rb +10 -4
  146. data/lib/onfido/models/facial_similarity_photo_fully_auto_properties.rb +10 -4
  147. data/lib/onfido/models/facial_similarity_photo_fully_auto_report.rb +30 -4
  148. data/lib/onfido/models/facial_similarity_photo_properties.rb +10 -4
  149. data/lib/onfido/models/facial_similarity_photo_report.rb +30 -4
  150. data/lib/onfido/models/facial_similarity_report_media.rb +20 -4
  151. data/lib/onfido/models/facial_similarity_report_shared.rb +10 -4
  152. data/lib/onfido/models/facial_similarity_video_breakdown.rb +10 -4
  153. data/lib/onfido/models/facial_similarity_video_breakdown_face_comparison.rb +10 -4
  154. data/lib/onfido/models/facial_similarity_video_breakdown_image_integrity.rb +10 -4
  155. data/lib/onfido/models/facial_similarity_video_breakdown_image_integrity_breakdown.rb +10 -4
  156. data/lib/onfido/models/facial_similarity_video_breakdown_image_integrity_breakdown_face_detected.rb +10 -4
  157. data/lib/onfido/models/facial_similarity_video_breakdown_image_integrity_breakdown_source_integrity.rb +10 -4
  158. data/lib/onfido/models/facial_similarity_video_breakdown_visual_authenticity.rb +10 -4
  159. data/lib/onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown.rb +10 -4
  160. data/lib/onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown_liveness_detected.rb +10 -4
  161. data/lib/onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown_spoofing_detection.rb +10 -4
  162. data/lib/onfido/models/facial_similarity_video_properties.rb +10 -4
  163. data/lib/onfido/models/facial_similarity_video_report.rb +30 -4
  164. data/lib/onfido/models/id_number.rb +10 -4
  165. data/lib/onfido/models/id_photo.rb +20 -4
  166. data/lib/onfido/models/id_photo_response.rb +20 -4
  167. data/lib/onfido/models/id_photos_list.rb +20 -4
  168. data/lib/onfido/models/identity_enhanced_breakdown.rb +10 -4
  169. data/lib/onfido/models/identity_enhanced_breakdown_address.rb +10 -4
  170. data/lib/onfido/models/identity_enhanced_breakdown_address_breakdown.rb +10 -4
  171. data/lib/onfido/models/identity_enhanced_breakdown_address_breakdown_credit_agencies.rb +10 -4
  172. data/lib/onfido/models/identity_enhanced_breakdown_address_breakdown_credit_agencies_properties.rb +11 -5
  173. data/lib/onfido/models/identity_enhanced_breakdown_address_breakdown_telephone_database.rb +10 -4
  174. data/lib/onfido/models/identity_enhanced_breakdown_address_breakdown_voting_register.rb +10 -4
  175. data/lib/onfido/models/identity_enhanced_breakdown_date_of_birth.rb +10 -4
  176. data/lib/onfido/models/identity_enhanced_breakdown_date_of_birth_breakdown.rb +10 -4
  177. data/lib/onfido/models/identity_enhanced_breakdown_date_of_birth_breakdown_credit_agencies.rb +10 -4
  178. data/lib/onfido/models/identity_enhanced_breakdown_date_of_birth_breakdown_voting_register.rb +10 -4
  179. data/lib/onfido/models/identity_enhanced_breakdown_mortality.rb +10 -4
  180. data/lib/onfido/models/identity_enhanced_breakdown_sources.rb +10 -4
  181. data/lib/onfido/models/identity_enhanced_breakdown_sources_breakdown.rb +10 -4
  182. data/lib/onfido/models/identity_enhanced_breakdown_sources_breakdown_total_sources.rb +10 -4
  183. data/lib/onfido/models/identity_enhanced_breakdown_sources_breakdown_total_sources_properties.rb +11 -5
  184. data/lib/onfido/models/identity_enhanced_properties.rb +10 -4
  185. data/lib/onfido/models/identity_enhanced_properties_matched_addresses_inner.rb +10 -4
  186. data/lib/onfido/models/identity_enhanced_report.rb +30 -4
  187. data/lib/onfido/models/idr_ssn_breakdown.rb +10 -4
  188. data/lib/onfido/models/idr_ssn_breakdown_breakdown.rb +10 -4
  189. data/lib/onfido/models/idr_ssn_breakdown_breakdown_full_match.rb +10 -4
  190. data/lib/onfido/models/idr_ssn_breakdown_breakdown_last4_digits_match.rb +10 -4
  191. data/lib/onfido/models/india_pan_report.rb +30 -4
  192. data/lib/onfido/models/india_pan_report_all_of_breakdown.rb +10 -4
  193. data/lib/onfido/models/india_pan_report_all_of_breakdown_device.rb +10 -4
  194. data/lib/onfido/models/india_pan_report_all_of_breakdown_device_breakdown.rb +10 -4
  195. data/lib/onfido/models/india_pan_report_all_of_breakdown_device_breakdown_pan_valid.rb +10 -4
  196. data/lib/onfido/models/india_pan_report_all_of_properties.rb +10 -4
  197. data/lib/onfido/models/india_pan_report_all_of_properties_device.rb +10 -4
  198. data/lib/onfido/models/invalidated_biometric_token_response.rb +237 -0
  199. data/lib/onfido/models/invalidated_biometric_token_summary.rb +238 -0
  200. data/lib/onfido/models/invalidated_biometric_token_summary_deleted_items.rb +239 -0
  201. data/lib/onfido/models/invalidated_biometric_tokens_response.rb +237 -0
  202. data/lib/onfido/models/known_faces_breakdown.rb +10 -4
  203. data/lib/onfido/models/known_faces_breakdown_image_integrity.rb +10 -4
  204. data/lib/onfido/models/known_faces_breakdown_previously_seen_faces.rb +10 -4
  205. data/lib/onfido/models/known_faces_properties.rb +10 -4
  206. data/lib/onfido/models/known_faces_properties_matches_inner.rb +10 -4
  207. data/lib/onfido/models/known_faces_report.rb +30 -4
  208. data/lib/onfido/models/live_photo.rb +20 -4
  209. data/lib/onfido/models/live_photo_response.rb +20 -4
  210. data/lib/onfido/models/live_photos_list.rb +20 -4
  211. data/lib/onfido/models/live_video.rb +10 -4
  212. data/lib/onfido/models/live_videos_list.rb +20 -4
  213. data/lib/onfido/models/location.rb +10 -4
  214. data/lib/onfido/models/location_builder.rb +10 -4
  215. data/lib/onfido/models/location_shared.rb +10 -4
  216. data/lib/onfido/models/motion_capture.rb +10 -4
  217. data/lib/onfido/models/motion_captures_list.rb +20 -4
  218. data/lib/onfido/models/passkey.rb +353 -0
  219. data/lib/onfido/models/passkey_updater.rb +262 -0
  220. data/lib/onfido/models/passkeys_list.rb +239 -0
  221. data/lib/onfido/models/photo_auto_reasons.rb +10 -4
  222. data/lib/onfido/models/photo_reasons.rb +10 -4
  223. data/lib/onfido/models/proof_of_address_breakdown.rb +10 -4
  224. data/lib/onfido/models/proof_of_address_breakdown_data_comparison.rb +10 -4
  225. data/lib/onfido/models/proof_of_address_breakdown_data_comparison_breakdown.rb +10 -4
  226. data/lib/onfido/models/proof_of_address_breakdown_document_classification.rb +10 -4
  227. data/lib/onfido/models/proof_of_address_breakdown_document_classification_breakdown.rb +10 -4
  228. data/lib/onfido/models/proof_of_address_breakdown_image_integrity.rb +10 -4
  229. data/lib/onfido/models/proof_of_address_breakdown_image_integrity_breakdown.rb +10 -4
  230. data/lib/onfido/models/proof_of_address_properties.rb +10 -4
  231. data/lib/onfido/models/proof_of_address_report.rb +30 -4
  232. data/lib/onfido/models/repeat_attempts_list.rb +20 -4
  233. data/lib/onfido/models/repeat_attempts_list_repeat_attempts_inner.rb +10 -4
  234. data/lib/onfido/models/report.rb +1 -1
  235. data/lib/onfido/models/report_configuration.rb +10 -4
  236. data/lib/onfido/models/report_configuration_facial_similarity.rb +10 -4
  237. data/lib/onfido/models/report_document.rb +20 -4
  238. data/lib/onfido/models/report_name.rb +1 -1
  239. data/lib/onfido/models/report_result.rb +1 -1
  240. data/lib/onfido/models/report_shared.rb +30 -4
  241. data/lib/onfido/models/report_status.rb +1 -1
  242. data/lib/onfido/models/report_sub_result.rb +1 -1
  243. data/lib/onfido/models/reports_list.rb +20 -4
  244. data/lib/onfido/models/results_feedback.rb +10 -4
  245. data/lib/onfido/models/sdk_token.rb +20 -4
  246. data/lib/onfido/models/sdk_token_builder.rb +20 -4
  247. data/lib/onfido/models/sdk_token_request.rb +20 -4
  248. data/lib/onfido/models/sdk_token_response.rb +20 -4
  249. data/lib/onfido/models/signing_document.rb +316 -0
  250. data/lib/onfido/models/signing_document_response.rb +298 -0
  251. data/lib/onfido/models/{device_intelligence_breakdown_breakdown.rb → signing_document_shared.rb} +20 -13
  252. data/lib/onfido/models/signing_documents_list.rb +239 -0
  253. data/lib/onfido/models/task.rb +10 -4
  254. data/lib/onfido/models/task_item.rb +10 -4
  255. data/lib/onfido/models/timeline_file_reference.rb +30 -4
  256. data/lib/onfido/models/updated_biometric_token_response.rb +237 -0
  257. data/lib/onfido/models/us_driving_licence_breakdown.rb +10 -4
  258. data/lib/onfido/models/us_driving_licence_breakdown_address.rb +10 -4
  259. data/lib/onfido/models/us_driving_licence_breakdown_address_breakdown.rb +10 -4
  260. data/lib/onfido/models/us_driving_licence_breakdown_document.rb +10 -4
  261. data/lib/onfido/models/us_driving_licence_breakdown_document_breakdown.rb +10 -4
  262. data/lib/onfido/models/us_driving_licence_breakdown_personal.rb +10 -4
  263. data/lib/onfido/models/us_driving_licence_breakdown_personal_breakdown.rb +10 -4
  264. data/lib/onfido/models/us_driving_licence_builder.rb +20 -4
  265. data/lib/onfido/models/us_driving_licence_report.rb +30 -4
  266. data/lib/onfido/models/us_driving_licence_shared.rb +20 -4
  267. data/lib/onfido/models/video_reasons.rb +10 -4
  268. data/lib/onfido/models/watchlist_aml_breakdown.rb +10 -4
  269. data/lib/onfido/models/watchlist_aml_breakdown_adverse_media.rb +10 -4
  270. data/lib/onfido/models/watchlist_aml_breakdown_legal_and_regulatory_warnings.rb +10 -4
  271. data/lib/onfido/models/watchlist_aml_breakdown_politically_exposed_person.rb +10 -4
  272. data/lib/onfido/models/watchlist_aml_breakdown_sanction.rb +10 -4
  273. data/lib/onfido/models/watchlist_aml_properties.rb +10 -4
  274. data/lib/onfido/models/watchlist_aml_report.rb +30 -4
  275. data/lib/onfido/models/watchlist_enhanced_breakdown.rb +10 -4
  276. data/lib/onfido/models/watchlist_enhanced_properties.rb +10 -4
  277. data/lib/onfido/models/watchlist_enhanced_properties_records_inner.rb +10 -4
  278. data/lib/onfido/models/watchlist_enhanced_properties_records_inner_address_inner.rb +10 -4
  279. data/lib/onfido/models/watchlist_enhanced_properties_records_inner_alias_inner.rb +10 -4
  280. data/lib/onfido/models/watchlist_enhanced_properties_records_inner_associate_inner.rb +10 -4
  281. data/lib/onfido/models/watchlist_enhanced_properties_records_inner_attribute_inner.rb +10 -4
  282. data/lib/onfido/models/watchlist_enhanced_properties_records_inner_event_inner.rb +10 -4
  283. data/lib/onfido/models/watchlist_enhanced_properties_records_inner_event_inner_source.rb +10 -4
  284. data/lib/onfido/models/watchlist_enhanced_properties_records_inner_source_inner.rb +10 -4
  285. data/lib/onfido/models/watchlist_enhanced_report.rb +30 -4
  286. data/lib/onfido/models/watchlist_mesh_added_mentions.rb +247 -0
  287. data/lib/onfido/models/watchlist_mesh_alert_risk.rb +323 -0
  288. data/lib/onfido/models/watchlist_mesh_alert_risk1.rb +316 -0
  289. data/lib/onfido/models/watchlist_mesh_associate.rb +231 -0
  290. data/lib/onfido/models/watchlist_mesh_date_value.rb +231 -0
  291. data/lib/onfido/models/{device_intelligence_breakdown_properties.rb → watchlist_mesh_field.rb} +34 -25
  292. data/lib/onfido/models/watchlist_mesh_image.rb +231 -0
  293. data/lib/onfido/models/watchlist_mesh_lists.rb +309 -0
  294. data/lib/onfido/models/watchlist_mesh_media.rb +261 -0
  295. data/lib/onfido/models/watchlist_mesh_name.rb +231 -0
  296. data/lib/onfido/models/watchlist_mesh_pep.rb +369 -0
  297. data/lib/onfido/models/watchlist_mesh_person.rb +283 -0
  298. data/lib/onfido/models/watchlist_mesh_profile.rb +273 -0
  299. data/lib/onfido/models/watchlist_mesh_risk_decision.rb +43 -0
  300. data/lib/onfido/models/watchlist_mesh_risk_detail.rb +255 -0
  301. data/lib/onfido/models/watchlist_mesh_risk_indicators.rb +271 -0
  302. data/lib/onfido/models/watchlist_mesh_sanctions.rb +309 -0
  303. data/lib/onfido/models/watchlist_monitor.rb +30 -4
  304. data/lib/onfido/models/watchlist_monitor_builder.rb +20 -4
  305. data/lib/onfido/models/watchlist_monitor_match.rb +10 -4
  306. data/lib/onfido/models/watchlist_monitor_matches_list.rb +20 -4
  307. data/lib/onfido/models/watchlist_monitor_matches_updater.rb +10 -4
  308. data/lib/onfido/models/watchlist_monitor_response.rb +20 -4
  309. data/lib/onfido/models/watchlist_monitor_shared.rb +20 -4
  310. data/lib/onfido/models/watchlist_monitors_list.rb +20 -4
  311. data/lib/onfido/models/watchlist_peps_only_report.rb +30 -4
  312. data/lib/onfido/models/watchlist_sanctions_only_report.rb +30 -4
  313. data/lib/onfido/models/watchlist_standard_breakdown.rb +10 -4
  314. data/lib/onfido/models/watchlist_standard_properties.rb +10 -4
  315. data/lib/onfido/models/watchlist_standard_report.rb +30 -4
  316. data/lib/onfido/models/webhook.rb +31 -5
  317. data/lib/onfido/models/webhook_builder.rb +31 -5
  318. data/lib/onfido/models/webhook_create.rb +31 -5
  319. data/lib/onfido/models/webhook_event.rb +10 -4
  320. data/lib/onfido/models/webhook_event_object_status.rb +1 -1
  321. data/lib/onfido/models/webhook_event_payload.rb +20 -4
  322. data/lib/onfido/models/webhook_event_payload_object.rb +20 -4
  323. data/lib/onfido/models/webhook_event_payload_resource.rb +54 -5
  324. data/lib/onfido/models/webhook_event_resource_status.rb +50 -0
  325. data/lib/onfido/models/webhook_event_resource_type.rb +1 -1
  326. data/lib/onfido/models/webhook_event_type.rb +1 -1
  327. data/lib/onfido/models/webhook_resend.rb +10 -4
  328. data/lib/onfido/models/webhook_response.rb +31 -5
  329. data/lib/onfido/models/webhook_shared.rb +10 -4
  330. data/lib/onfido/models/webhook_update.rb +21 -5
  331. data/lib/onfido/models/webhook_updater.rb +21 -5
  332. data/lib/onfido/models/webhooks_list.rb +20 -4
  333. data/lib/onfido/models/webhooks_resend_item.rb +30 -4
  334. data/lib/onfido/models/workflow_run.rb +40 -4
  335. data/lib/onfido/models/workflow_run_builder.rb +30 -4
  336. data/lib/onfido/models/workflow_run_error.rb +10 -4
  337. data/lib/onfido/models/workflow_run_link.rb +10 -4
  338. data/lib/onfido/models/workflow_run_request.rb +10 -4
  339. data/lib/onfido/models/workflow_run_response.rb +20 -4
  340. data/lib/onfido/models/workflow_run_shared.rb +30 -4
  341. data/lib/onfido/models/workflow_run_status.rb +1 -1
  342. data/lib/onfido/version.rb +2 -2
  343. data/lib/onfido.rb +40 -6
  344. data/onfido.gemspec +1 -1
  345. data/spec/integrations/biometric_token_spec.rb +122 -0
  346. data/spec/integrations/document_spec.rb +8 -1
  347. data/spec/integrations/media/nfc_data.json +11768 -0
  348. data/spec/integrations/media/sample_signing_document.pdf +33 -0
  349. data/spec/integrations/passkey_spec.rb +63 -0
  350. data/spec/integrations/signing_document_spec.rb +61 -0
  351. data/spec/integrations/watchlist_alert_risk_spec.rb +66 -0
  352. data/spec/integrations/workflow_run_spec.rb +8 -4
  353. data/spec/shared_contexts/with_document.rb +0 -1
  354. data/spec/shared_contexts/with_onfido.rb +14 -2
  355. data/spec/shared_contexts/with_signing_document.rb +15 -0
  356. data/spec/spec_helper.rb +7 -8
  357. metadata +71 -23
@@ -0,0 +1,283 @@
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.16.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Onfido
17
+ class WatchlistMeshPerson
18
+ attr_accessor :associates
19
+
20
+ attr_accessor :dates_of_birth
21
+
22
+ attr_accessor :dates_of_death
23
+
24
+ attr_accessor :images
25
+
26
+ attr_accessor :names
27
+
28
+ attr_accessor :places_of_birth
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'associates' => :'associates',
34
+ :'dates_of_birth' => :'dates_of_birth',
35
+ :'dates_of_death' => :'dates_of_death',
36
+ :'images' => :'images',
37
+ :'names' => :'names',
38
+ :'places_of_birth' => :'places_of_birth'
39
+ }
40
+ end
41
+
42
+ # Returns attribute mapping this model knows about
43
+ def self.acceptable_attribute_map
44
+ attribute_map
45
+ end
46
+
47
+ # Returns all the JSON keys this model knows about
48
+ def self.acceptable_attributes
49
+ acceptable_attribute_map.values
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.openapi_types
54
+ {
55
+ :'associates' => :'Array<WatchlistMeshAssociate>',
56
+ :'dates_of_birth' => :'Array<WatchlistMeshDateValue>',
57
+ :'dates_of_death' => :'Array<WatchlistMeshDateValue>',
58
+ :'images' => :'Array<WatchlistMeshImage>',
59
+ :'names' => :'Array<WatchlistMeshName>',
60
+ :'places_of_birth' => :'Array<String>'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ :'associates',
68
+ :'dates_of_birth',
69
+ :'dates_of_death',
70
+ :'images',
71
+ :'names',
72
+ :'places_of_birth'
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Onfido::WatchlistMeshPerson` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ acceptable_attribute_map = self.class.acceptable_attribute_map
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!acceptable_attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Onfido::WatchlistMeshPerson`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'associates')
93
+ if (value = attributes[:'associates']).is_a?(Array)
94
+ self.associates = value
95
+ end
96
+ end
97
+
98
+ if attributes.key?(:'dates_of_birth')
99
+ if (value = attributes[:'dates_of_birth']).is_a?(Array)
100
+ self.dates_of_birth = value
101
+ end
102
+ end
103
+
104
+ if attributes.key?(:'dates_of_death')
105
+ if (value = attributes[:'dates_of_death']).is_a?(Array)
106
+ self.dates_of_death = value
107
+ end
108
+ end
109
+
110
+ if attributes.key?(:'images')
111
+ if (value = attributes[:'images']).is_a?(Array)
112
+ self.images = value
113
+ end
114
+ end
115
+
116
+ if attributes.key?(:'names')
117
+ if (value = attributes[:'names']).is_a?(Array)
118
+ self.names = value
119
+ end
120
+ end
121
+
122
+ if attributes.key?(:'places_of_birth')
123
+ if (value = attributes[:'places_of_birth']).is_a?(Array)
124
+ self.places_of_birth = value
125
+ end
126
+ end
127
+ end
128
+
129
+ # Show invalid properties with the reasons. Usually used together with valid?
130
+ # @return Array for valid properties with the reasons
131
+ def list_invalid_properties
132
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
133
+ invalid_properties = Array.new
134
+ invalid_properties
135
+ end
136
+
137
+ # Check to see if the all the properties in the model are valid
138
+ # @return true if the model is valid
139
+ def valid?
140
+ warn '[DEPRECATED] the `valid?` method is obsolete'
141
+ true
142
+ end
143
+
144
+ # Checks equality by comparing each attribute.
145
+ # @param [Object] Object to be compared
146
+ def ==(o)
147
+ return true if self.equal?(o)
148
+ self.class == o.class &&
149
+ associates == o.associates &&
150
+ dates_of_birth == o.dates_of_birth &&
151
+ dates_of_death == o.dates_of_death &&
152
+ images == o.images &&
153
+ names == o.names &&
154
+ places_of_birth == o.places_of_birth
155
+ end
156
+
157
+ # @see the `==` method
158
+ # @param [Object] Object to be compared
159
+ def eql?(o)
160
+ self == o
161
+ end
162
+
163
+ # Calculates hash code according to all attributes.
164
+ # @return [Integer] Hash code
165
+ def hash
166
+ [associates, dates_of_birth, dates_of_death, images, names, places_of_birth].hash
167
+ end
168
+
169
+ # Builds the object from hash
170
+ # @param [Hash] attributes Model attributes in the form of hash
171
+ # @return [Object] Returns the model itself
172
+ def self.build_from_hash(attributes)
173
+ return nil unless attributes.is_a?(Hash)
174
+ attributes = attributes.transform_keys(&:to_sym)
175
+ transformed_hash = {}
176
+ openapi_types.each_pair do |key, type|
177
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
178
+ transformed_hash["#{key}"] = nil
179
+ elsif type =~ /\AArray<(.*)>/i
180
+ # check to ensure the input is an array given that the attribute
181
+ # is documented as an array but the input is not
182
+ if attributes[attribute_map[key]].is_a?(Array)
183
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
184
+ end
185
+ elsif !attributes[attribute_map[key]].nil?
186
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
187
+ end
188
+ end
189
+ new(transformed_hash)
190
+ end
191
+
192
+ # Deserializes the data based on type
193
+ # @param string type Data type
194
+ # @param string value Value to be deserialized
195
+ # @return [Object] Deserialized data
196
+ def self._deserialize(type, value)
197
+ case type.to_sym
198
+ when :Time
199
+ Time.parse(value)
200
+ when :Date
201
+ Date.parse(value)
202
+ when :String
203
+ value.to_s
204
+ when :Integer
205
+ value.to_i
206
+ when :Float
207
+ value.to_f
208
+ when :Boolean
209
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
210
+ true
211
+ else
212
+ false
213
+ end
214
+ when :Object
215
+ # generic object (usually a Hash), return directly
216
+ value
217
+ when /\AArray<(?<inner_type>.+)>\z/
218
+ inner_type = Regexp.last_match[:inner_type]
219
+ value.map { |v| _deserialize(inner_type, v) }
220
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
221
+ k_type = Regexp.last_match[:k_type]
222
+ v_type = Regexp.last_match[:v_type]
223
+ {}.tap do |hash|
224
+ value.each do |k, v|
225
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
226
+ end
227
+ end
228
+ else # model
229
+ # models (e.g. Pet) or oneOf
230
+ klass = Onfido.const_get(type)
231
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
232
+ end
233
+ end
234
+
235
+ # Returns the string representation of the object
236
+ # @return [String] String presentation of the object
237
+ def to_s
238
+ to_hash.to_s
239
+ end
240
+
241
+ # to_body is an alias to to_hash (backward compatibility)
242
+ # @return [Hash] Returns the object in the form of hash
243
+ def to_body
244
+ to_hash
245
+ end
246
+
247
+ # Returns the object in the form of hash
248
+ # @return [Hash] Returns the object in the form of hash
249
+ def to_hash
250
+ hash = {}
251
+ self.class.attribute_map.each_pair do |attr, param|
252
+ value = self.send(attr)
253
+ if value.nil?
254
+ is_nullable = self.class.openapi_nullable.include?(attr)
255
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
256
+ end
257
+
258
+ hash[param] = _to_hash(value)
259
+ end
260
+ hash
261
+ end
262
+
263
+ # Outputs non-array value in the form of hash
264
+ # For object, use to_hash. Otherwise, just return the value
265
+ # @param [Object] value Any valid value
266
+ # @return [Hash] Returns the value in the form of hash
267
+ def _to_hash(value)
268
+ if value.is_a?(Array)
269
+ value.compact.map { |v| _to_hash(v) }
270
+ elsif value.is_a?(Hash)
271
+ {}.tap do |hash|
272
+ value.each { |k, v| hash[k] = _to_hash(v) }
273
+ end
274
+ elsif value.respond_to? :to_hash
275
+ value.to_hash
276
+ else
277
+ value
278
+ end
279
+ end
280
+
281
+ end
282
+
283
+ end
@@ -0,0 +1,273 @@
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.16.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Onfido
17
+ class WatchlistMeshProfile
18
+ attr_accessor :identifier
19
+
20
+ attr_accessor :match_types
21
+
22
+ # The match score assigned to the profile.
23
+ attr_accessor :match_score
24
+
25
+ attr_accessor :matching_name
26
+
27
+ attr_accessor :person
28
+
29
+ attr_accessor :risk_indicators
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'identifier' => :'identifier',
35
+ :'match_types' => :'match_types',
36
+ :'match_score' => :'match_score',
37
+ :'matching_name' => :'matching_name',
38
+ :'person' => :'person',
39
+ :'risk_indicators' => :'risk_indicators'
40
+ }
41
+ end
42
+
43
+ # Returns attribute mapping this model knows about
44
+ def self.acceptable_attribute_map
45
+ attribute_map
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ acceptable_attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'identifier' => :'String',
57
+ :'match_types' => :'Array<String>',
58
+ :'match_score' => :'Float',
59
+ :'matching_name' => :'String',
60
+ :'person' => :'WatchlistMeshPerson',
61
+ :'risk_indicators' => :'WatchlistMeshRiskIndicators'
62
+ }
63
+ end
64
+
65
+ # List of attributes with nullable: true
66
+ def self.openapi_nullable
67
+ Set.new([
68
+ :'identifier',
69
+ :'match_types',
70
+ :'matching_name',
71
+ :'person',
72
+ :'risk_indicators'
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Onfido::WatchlistMeshProfile` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ acceptable_attribute_map = self.class.acceptable_attribute_map
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!acceptable_attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Onfido::WatchlistMeshProfile`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'identifier')
93
+ self.identifier = attributes[:'identifier']
94
+ end
95
+
96
+ if attributes.key?(:'match_types')
97
+ if (value = attributes[:'match_types']).is_a?(Array)
98
+ self.match_types = value
99
+ end
100
+ end
101
+
102
+ if attributes.key?(:'match_score')
103
+ self.match_score = attributes[:'match_score']
104
+ end
105
+
106
+ if attributes.key?(:'matching_name')
107
+ self.matching_name = attributes[:'matching_name']
108
+ end
109
+
110
+ if attributes.key?(:'person')
111
+ self.person = attributes[:'person']
112
+ end
113
+
114
+ if attributes.key?(:'risk_indicators')
115
+ self.risk_indicators = attributes[:'risk_indicators']
116
+ end
117
+ end
118
+
119
+ # Show invalid properties with the reasons. Usually used together with valid?
120
+ # @return Array for valid properties with the reasons
121
+ def list_invalid_properties
122
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
123
+ invalid_properties = Array.new
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ warn '[DEPRECATED] the `valid?` method is obsolete'
131
+ true
132
+ end
133
+
134
+ # Checks equality by comparing each attribute.
135
+ # @param [Object] Object to be compared
136
+ def ==(o)
137
+ return true if self.equal?(o)
138
+ self.class == o.class &&
139
+ identifier == o.identifier &&
140
+ match_types == o.match_types &&
141
+ match_score == o.match_score &&
142
+ matching_name == o.matching_name &&
143
+ person == o.person &&
144
+ risk_indicators == o.risk_indicators
145
+ end
146
+
147
+ # @see the `==` method
148
+ # @param [Object] Object to be compared
149
+ def eql?(o)
150
+ self == o
151
+ end
152
+
153
+ # Calculates hash code according to all attributes.
154
+ # @return [Integer] Hash code
155
+ def hash
156
+ [identifier, match_types, match_score, matching_name, person, risk_indicators].hash
157
+ end
158
+
159
+ # Builds the object from hash
160
+ # @param [Hash] attributes Model attributes in the form of hash
161
+ # @return [Object] Returns the model itself
162
+ def self.build_from_hash(attributes)
163
+ return nil unless attributes.is_a?(Hash)
164
+ attributes = attributes.transform_keys(&:to_sym)
165
+ transformed_hash = {}
166
+ openapi_types.each_pair do |key, type|
167
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = nil
169
+ elsif type =~ /\AArray<(.*)>/i
170
+ # check to ensure the input is an array given that the attribute
171
+ # is documented as an array but the input is not
172
+ if attributes[attribute_map[key]].is_a?(Array)
173
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
174
+ end
175
+ elsif !attributes[attribute_map[key]].nil?
176
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
177
+ end
178
+ end
179
+ new(transformed_hash)
180
+ end
181
+
182
+ # Deserializes the data based on type
183
+ # @param string type Data type
184
+ # @param string value Value to be deserialized
185
+ # @return [Object] Deserialized data
186
+ def self._deserialize(type, value)
187
+ case type.to_sym
188
+ when :Time
189
+ Time.parse(value)
190
+ when :Date
191
+ Date.parse(value)
192
+ when :String
193
+ value.to_s
194
+ when :Integer
195
+ value.to_i
196
+ when :Float
197
+ value.to_f
198
+ when :Boolean
199
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
200
+ true
201
+ else
202
+ false
203
+ end
204
+ when :Object
205
+ # generic object (usually a Hash), return directly
206
+ value
207
+ when /\AArray<(?<inner_type>.+)>\z/
208
+ inner_type = Regexp.last_match[:inner_type]
209
+ value.map { |v| _deserialize(inner_type, v) }
210
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
211
+ k_type = Regexp.last_match[:k_type]
212
+ v_type = Regexp.last_match[:v_type]
213
+ {}.tap do |hash|
214
+ value.each do |k, v|
215
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
216
+ end
217
+ end
218
+ else # model
219
+ # models (e.g. Pet) or oneOf
220
+ klass = Onfido.const_get(type)
221
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
222
+ end
223
+ end
224
+
225
+ # Returns the string representation of the object
226
+ # @return [String] String presentation of the object
227
+ def to_s
228
+ to_hash.to_s
229
+ end
230
+
231
+ # to_body is an alias to to_hash (backward compatibility)
232
+ # @return [Hash] Returns the object in the form of hash
233
+ def to_body
234
+ to_hash
235
+ end
236
+
237
+ # Returns the object in the form of hash
238
+ # @return [Hash] Returns the object in the form of hash
239
+ def to_hash
240
+ hash = {}
241
+ self.class.attribute_map.each_pair do |attr, param|
242
+ value = self.send(attr)
243
+ if value.nil?
244
+ is_nullable = self.class.openapi_nullable.include?(attr)
245
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
246
+ end
247
+
248
+ hash[param] = _to_hash(value)
249
+ end
250
+ hash
251
+ end
252
+
253
+ # Outputs non-array value in the form of hash
254
+ # For object, use to_hash. Otherwise, just return the value
255
+ # @param [Object] value Any valid value
256
+ # @return [Hash] Returns the value in the form of hash
257
+ def _to_hash(value)
258
+ if value.is_a?(Array)
259
+ value.compact.map { |v| _to_hash(v) }
260
+ elsif value.is_a?(Hash)
261
+ {}.tap do |hash|
262
+ value.each { |k, v| hash[k] = _to_hash(v) }
263
+ end
264
+ elsif value.respond_to? :to_hash
265
+ value.to_hash
266
+ else
267
+ value
268
+ end
269
+ end
270
+
271
+ end
272
+
273
+ end
@@ -0,0 +1,43 @@
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.16.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Onfido
17
+ class WatchlistMeshRiskDecision
18
+ NOT_REVIEWED = "NOT_REVIEWED".freeze
19
+ IN_REVIEW = "IN_REVIEW".freeze
20
+ FALSE_POSITIVE = "FALSE_POSITIVE".freeze
21
+ TRUE_POSITIVE = "TRUE_POSITIVE".freeze
22
+ UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
23
+
24
+ def self.all_vars
25
+ @all_vars ||= [NOT_REVIEWED, IN_REVIEW, FALSE_POSITIVE, TRUE_POSITIVE, UNKNOWN_DEFAULT_OPEN_API].freeze
26
+ end
27
+
28
+ # Builds the enum from string
29
+ # @param [String] The enum value in the form of the string
30
+ # @return [String] The enum value
31
+ def self.build_from_hash(value)
32
+ new.build_from_hash(value)
33
+ end
34
+
35
+ # Builds the enum from string
36
+ # @param [String] The enum value in the form of the string
37
+ # @return [String] The enum value
38
+ def build_from_hash(value)
39
+ return value if WatchlistMeshRiskDecision.all_vars.include?(value)
40
+ raise "Invalid ENUM value #{value} for class #WatchlistMeshRiskDecision"
41
+ end
42
+ end
43
+ end