Class: Koho::Client::Projects

Inherits:
Koho::Client show all
Defined in:
lib/koho.rb

Constant Summary

Constants inherited from Koho::Client

API_BASE_URL

Instance Attribute Summary

Attributes inherited from Koho::Client

#company_id, #token

Instance Method Summary collapse

Methods inherited from Koho::Client

#contracts, #customers, #delete, #get, #inbound_invoices, #info, #initialize, #invoice_terms, #invoices, #post, #project_tasks, #projects, #put, #work_sessions

Constructor Details

This class inherits a constructor from Koho::Client

Instance Method Details

#create(params) ⇒ Object



161
162
163
# File 'lib/koho.rb', line 161

def create params
  post '/', customer: params
end

#destroy(id) ⇒ Object



169
170
171
# File 'lib/koho.rb', line 169

def destroy id
  delete "/#{id}"
end

#find(id) ⇒ Object



153
154
155
# File 'lib/koho.rb', line 153

def find id
  get "/#{id}"
end

#find_by_customer(customer_id) ⇒ Object



157
158
159
# File 'lib/koho.rb', line 157

def find_by_customer customer_id
  get "/find_by_customer/#{customer_id}"
end

#listObject



149
150
151
# File 'lib/koho.rb', line 149

def list
  get '/'
end

#permitted_projectsObject



173
174
175
# File 'lib/koho.rb', line 173

def permitted_projects
  get "/permitted_projects"
end

#update(id, params) ⇒ Object



165
166
167
# File 'lib/koho.rb', line 165

def update id, params
  put "/#{id}", customer: params
end