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

Constructor Details

This class inherits a constructor from Koho::Client

Instance Method Details

#create(params) ⇒ Object



159
160
161
# File 'lib/koho.rb', line 159

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

#destroy(id) ⇒ Object



167
168
169
# File 'lib/koho.rb', line 167

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

#find(id) ⇒ Object



151
152
153
# File 'lib/koho.rb', line 151

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

#find_by_customer(customer_id) ⇒ Object



155
156
157
# File 'lib/koho.rb', line 155

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

#listObject



147
148
149
# File 'lib/koho.rb', line 147

def list
  get '/'
end

#permitted_projectsObject



171
172
173
# File 'lib/koho.rb', line 171

def permitted_projects
  get "/permitted_projects"
end

#update(id, params) ⇒ Object



163
164
165
# File 'lib/koho.rb', line 163

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