Class: Yoti::AmlProfile
- Inherits:
-
Object
- Object
- Yoti::AmlProfile
- Defined in:
- lib/yoti/http/payloads/aml_profile.rb
Overview
Manages the AML check Profile object
Instance Method Summary collapse
-
#initialize(given_names, family_name, aml_address, ssn = nil) ⇒ AmlProfile
constructor
A new instance of AmlProfile.
-
#payload ⇒ Object
The AML check request body.
Constructor Details
#initialize(given_names, family_name, aml_address, ssn = nil) ⇒ AmlProfile
Returns a new instance of AmlProfile.
4 5 6 7 8 9 10 11 12 |
# File 'lib/yoti/http/payloads/aml_profile.rb', line 4 def initialize(given_names, family_name, aml_address, ssn = nil) @given_names = given_names @family_name = family_name @ssn = ssn @address = aml_address raise AmlError, 'The AML request requires given names, family name and an ISO 3166 3-letter code.' if profile_invalid raise AmlError, 'Request for USA require a valid SSN and postcode.' if usa_invalid end |
Instance Method Details
#payload ⇒ Object
Returns the AML check request body.
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/yoti/http/payloads/aml_profile.rb', line 15 def payload { given_names: @given_names, family_name: @family_name, ssn: @ssn, address: { country: @address.country, post_code: @address.post_code } } end |