Sha256: 50f578cad756c9e437d644aa79933a06d61829e1bb8446efd553fb09b2c62914

Contents?: true

Size: 566 Bytes

Versions: 11

Compression:

Stored size: 566 Bytes

Contents

module Yoti
  # Manage the API's AML check requests
  class AmlCheckRequest
    def initialize(aml_profile)
      @aml_profile = aml_profile
      @payload = aml_profile.payload
      @request = request
    end

    # @return [String] a JSON representation of the AML check response
    def response
      JSON.parse(@request.body)
    end

    private

    def request
      yoti_request = Yoti::Request.new
      yoti_request.http_method = 'POST'
      yoti_request.endpoint = 'aml-check'
      yoti_request.payload = @payload
      yoti_request
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
yoti-1.6.4 lib/yoti/http/aml_check_request.rb
yoti-1.6.3 lib/yoti/http/aml_check_request.rb
yoti-1.6.2 lib/yoti/http/aml_check_request.rb
yoti-1.6.1 lib/yoti/http/aml_check_request.rb
yoti-1.6.0 lib/yoti/http/aml_check_request.rb
yoti-1.5.0 lib/yoti/http/aml_check_request.rb
yoti-1.4.0 lib/yoti/http/aml_check_request.rb
yoti-1.3.1 lib/yoti/http/aml_check_request.rb
yoti-1.3.0 lib/yoti/http/aml_check_request.rb
yoti-1.2.1 lib/yoti/http/aml_check_request.rb
yoti-1.2.0 lib/yoti/http/aml_check_request.rb