Class: V2Intuity::Endpoints::User

Inherits:
Endpoint
  • Object
show all
Defined in:
lib/v2_intuity/endpoints/user.rb

Constant Summary

Constants inherited from Endpoint

Endpoint::ENDPOINTS

Instance Attribute Summary

Attributes inherited from Endpoint

#base_uri, #endpoint, #id, #org_id, #path, #token

Instance Method Summary collapse

Methods inherited from Endpoint

#sign_with, #uri_options

Constructor Details

#initialize(options = {}) ⇒ User

Returns a new instance of User.



4
5
6
7
8
# File 'lib/v2_intuity/endpoints/user.rb', line 4

def initialize(options = {})
  super

  @endpoint = Endpoint::ENDPOINTS[:users]
end

Instance Method Details

#uri(options = {}) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/v2_intuity/endpoints/user.rb', line 10

def uri(options = {})
  uri_options(options)

  return "#{@base_uri}/#{@path}/#{@org_id}/#{@endpoint}/#{@id}/" if @id

  "#{@base_uri}/#{@path}/#{@org_id}/users" # used with creating users
end