subvisual/uphold-sdk-ruby

View on GitHub
lib/uphold/api/user.rb

Summary

Maintainability
A
25 mins
Test Coverage
# frozen_string_literal: true

module Uphold
  module API
    module User
      def me
        request_data = RequestData.new(
          Endpoints::USER,
          Entities::User,
          authorization_header
        )
        Request.perform_with_object(:get, request_data)
      end

      def phones
        request_data = RequestData.new(
          Endpoints::USER_PHONES,
          Entities::Phone,
          authorization_header
        )
        Request.perform_with_objects(:get, request_data)
      end
    end
  end
end