class Freshmaker::UserProxy
Public Class Methods
new(client)
click to toggle source
# File lib/freshmaker/user_proxy.rb, line 3 def initialize(client) @client = client end
Public Instance Methods
all()
click to toggle source
# File lib/freshmaker/user_proxy.rb, line 7 def all all = [] page = 1 begin users = get(page: page) all += users page += 1 end while users.present? all end
get(params={})
click to toggle source
# File lib/freshmaker/user_proxy.rb, line 20 def get(params={}) response = @client.get('/contacts', query: params) response['users'] || [] end