Class: Fakturoid::Client::User

Inherits:
Api
  • Object
show all
Defined in:
lib/fakturoid/client/user.rb

Class Method Summary collapse

Methods inherited from Api

config, configure

Methods included from Api::Arguments

#permit_params, #validate_numerical_id, #validate_search_query

Methods included from Api::HttpMethods

#delete_request, #get_request, #patch_request, #post_request

Class Method Details

.allObject



13
14
15
# File 'lib/fakturoid/client/user.rb', line 13

def self.all
  get_request('users.json')
end

.currentObject



4
5
6
# File 'lib/fakturoid/client/user.rb', line 4

def self.current
  get_request('user.json', url: Fakturoid::Api.config.)
end

.find(id) ⇒ Object



8
9
10
11
# File 'lib/fakturoid/client/user.rb', line 8

def self.find(id)
  validate_numerical_id(id)
  get_request("users/#{id}.json")
end