class Dotloop::Profile

Attributes

client[RW]

Public Class Methods

new(client:) click to toggle source
# File lib/dotloop/profile.rb, line 7
def initialize(client:)
  @client = client
end

Public Instance Methods

all() click to toggle source
# File lib/dotloop/profile.rb, line 11
def all
  @client.get('/profile')[:data].map do |profile_attrs|
    profile = Dotloop::Models::Profile.new(profile_attrs)
    profile.client = client
    profile
  end
end
find(profile_id:) click to toggle source
# File lib/dotloop/profile.rb, line 19
def find(profile_id:)
  profile_attrs = @client.get("/profile/#{profile_id.to_i}")[:data]
  profile = Dotloop::Models::Profile.new(profile_attrs)
  profile.client = client
  profile
end