Module: Onfido::Report
- Defined in:
- lib/onfido/models/report.rb
Class Method Summary collapse
-
.build(data) ⇒ Object
Builds the object.
-
.openapi_discriminator_mapping ⇒ Object
Discriminator’s mapping (OpenAPI v3).
-
.openapi_discriminator_name ⇒ Object
Discriminator’s property name (OpenAPI v3).
-
.openapi_one_of ⇒ Object
List of class defined in oneOf (OpenAPI v3).
Class Method Details
.build(data) ⇒ Object
Builds the object
81 82 83 84 85 86 87 88 89 |
# File 'lib/onfido/models/report.rb', line 81 def build(data) discriminator_value = data[openapi_discriminator_name] return nil if discriminator_value.nil? klass = openapi_discriminator_mapping[discriminator_value.to_s.to_sym] return nil unless klass Onfido.const_get(klass).build_from_hash(data) end |
.openapi_discriminator_mapping ⇒ Object
Discriminator’s mapping (OpenAPI v3)
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/onfido/models/report.rb', line 52 def openapi_discriminator_mapping { :'device_intelligence' => :'DeviceIntelligenceReport', :'document' => :'DocumentReport', :'document_video' => :'DocumentVideoReport', :'document_video_with_address_information' => :'DocumentVideoWithAddressInformationReport', :'document_with_address_information' => :'DocumentWithAddressInformationReport', :'document_with_driver_verification' => :'DocumentWithDriverVerificationReport', :'document_with_driving_licence_information' => :'DocumentWithDrivingLicenceInformationReport', :'facial_similarity_motion' => :'FacialSimilarityMotionReport', :'facial_similarity_photo' => :'FacialSimilarityPhotoReport', :'facial_similarity_photo_fully_auto' => :'FacialSimilarityPhotoFullyAutoReport', :'facial_similarity_video' => :'FacialSimilarityVideoReport', :'identity_enhanced' => :'IdentityEnhancedReport', :'india_pan' => :'IndiaPanReport', :'known_faces' => :'KnownFacesReport', :'proof_of_address' => :'ProofOfAddressReport', :'us_driving_licence' => :'UsDrivingLicenceReport', :'watchlist_aml' => :'WatchlistAmlReport', :'watchlist_enhanced' => :'WatchlistEnhancedReport', :'watchlist_peps_only' => :'WatchlistPepsOnlyReport', :'watchlist_sanctions_only' => :'WatchlistSanctionsOnlyReport', :'watchlist_standard' => :'WatchlistStandardReport' } end |
.openapi_discriminator_name ⇒ Object
Discriminator’s property name (OpenAPI v3)
47 48 49 |
# File 'lib/onfido/models/report.rb', line 47 def openapi_discriminator_name :'name' end |
.openapi_one_of ⇒ Object
List of class defined in oneOf (OpenAPI v3)
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/onfido/models/report.rb', line 20 def openapi_one_of [ :'DeviceIntelligenceReport', :'DocumentReport', :'DocumentVideoReport', :'DocumentVideoWithAddressInformationReport', :'DocumentWithAddressInformationReport', :'DocumentWithDriverVerificationReport', :'DocumentWithDrivingLicenceInformationReport', :'FacialSimilarityMotionReport', :'FacialSimilarityPhotoFullyAutoReport', :'FacialSimilarityPhotoReport', :'FacialSimilarityVideoReport', :'IdentityEnhancedReport', :'IndiaPanReport', :'KnownFacesReport', :'ProofOfAddressReport', :'UsDrivingLicenceReport', :'WatchlistAmlReport', :'WatchlistEnhancedReport', :'WatchlistPepsOnlyReport', :'WatchlistSanctionsOnlyReport', :'WatchlistStandardReport' ] end |