onfido 3.3.1 → 4.0.0

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