Sha256: aa0b1ca5efa76bdaac371bc79c7775882df79444a8ce9fb87f776679541415ba

Contents?: true

Size: 443 Bytes

Versions: 1

Compression:

Stored size: 443 Bytes

Contents

module Outreach
  module Service
    class User
      def initialize(client)
        @request = client.request
      end

      def find(id)
        response = @request.get("#{api_url}/#{id}")
        collection_class.build_from_attributes_hash(response['data'])
      end

      private

      def api_url
        'https://api.outreach.io/api/v2/users'
      end

      def collection_class
        Outreach::User
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
outreach-ruby-0.0.2 lib/outreach-ruby/service/user.rb