Sha256: 3753f7e68f4e712befcf95c2b739155193b88e292e62f39df68c9dacd3897f8d

Contents?: true

Size: 607 Bytes

Versions: 6

Compression:

Stored size: 607 Bytes

Contents

module Yoti
  # Manage the API's profile requests
  class ProfileRequest
    def initialize(encrypted_connect_token)
      @encrypted_connect_token = encrypted_connect_token
      @request = request
    end

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

    private

    def request
      yoti_request = Yoti::Request.new
      yoti_request.encrypted_connect_token = @encrypted_connect_token
      yoti_request.http_method = 'GET'
      yoti_request.endpoint = 'profile'
      yoti_request
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
yoti-1.5.0 lib/yoti/http/profile_request.rb
yoti-1.4.0 lib/yoti/http/profile_request.rb
yoti-1.3.1 lib/yoti/http/profile_request.rb
yoti-1.3.0 lib/yoti/http/profile_request.rb
yoti-1.2.1 lib/yoti/http/profile_request.rb
yoti-1.2.0 lib/yoti/http/profile_request.rb