koho 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/koho/version.rb +1 -1
- data/lib/koho.rb +62 -1
- metadata +2 -2
data/lib/koho/version.rb
CHANGED
data/lib/koho.rb
CHANGED
@@ -7,7 +7,7 @@ module Koho
|
|
7
7
|
class Client
|
8
8
|
include HTTParty
|
9
9
|
|
10
|
-
API_BASE_URL = 'https://
|
10
|
+
API_BASE_URL = 'https://stg.koho-online.com/api'
|
11
11
|
base_uri API_BASE_URL
|
12
12
|
|
13
13
|
attr_accessor :company_id,
|
@@ -39,6 +39,8 @@ module Koho
|
|
39
39
|
def inbound_invoices; InboundInvoices.new company_id, token; end
|
40
40
|
def invoice_terms; InvoiceTerms.new company_id, token; end
|
41
41
|
def contracts; Contracts.new company_id, token; end
|
42
|
+
def projects; Projects.new company_id, token; end
|
43
|
+
def project_tasks; ProjectTasks.new company_id, token; end
|
42
44
|
|
43
45
|
##########################3
|
44
46
|
|
@@ -111,6 +113,61 @@ module Koho
|
|
111
113
|
|
112
114
|
end
|
113
115
|
|
116
|
+
class ProjectTasks < Koho::Client
|
117
|
+
|
118
|
+
base_uri API_BASE_URL+'/project_tasks'
|
119
|
+
|
120
|
+
|
121
|
+
def list
|
122
|
+
get '/'
|
123
|
+
end
|
124
|
+
|
125
|
+
def find id
|
126
|
+
get "/#{id}"
|
127
|
+
end
|
128
|
+
|
129
|
+
def find_by_project project_id
|
130
|
+
get "/find_by_project/#{project_id}"
|
131
|
+
end
|
132
|
+
|
133
|
+
end
|
134
|
+
|
135
|
+
class Projects < Koho::Client
|
136
|
+
|
137
|
+
base_uri API_BASE_URL+'/projects'
|
138
|
+
|
139
|
+
|
140
|
+
def list
|
141
|
+
get '/'
|
142
|
+
end
|
143
|
+
|
144
|
+
def find id
|
145
|
+
get "/#{id}"
|
146
|
+
end
|
147
|
+
|
148
|
+
def find_by_customer customer_id
|
149
|
+
get "/find_by_customer/#{customer_id}"
|
150
|
+
end
|
151
|
+
|
152
|
+
def create params
|
153
|
+
post '/', customer: params
|
154
|
+
end
|
155
|
+
|
156
|
+
def update id, params
|
157
|
+
put "/#{id}", customer: params
|
158
|
+
end
|
159
|
+
|
160
|
+
def destroy id
|
161
|
+
delete "/#{id}"
|
162
|
+
end
|
163
|
+
|
164
|
+
def permitted_projects
|
165
|
+
get "/permitted_projects"
|
166
|
+
end
|
167
|
+
|
168
|
+
end
|
169
|
+
|
170
|
+
|
114
171
|
class Customers < Koho::Client
|
115
172
|
|
116
173
|
base_uri API_BASE_URL+'/customers'
|
@@ -135,6 +192,10 @@ module Koho
|
|
135
192
|
def destroy id
|
136
193
|
delete "/#{id}"
|
137
194
|
end
|
195
|
+
|
196
|
+
def list_with_permissions
|
197
|
+
get '/permitted'
|
198
|
+
end
|
138
199
|
|
139
200
|
|
140
201
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: koho
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-10-
|
12
|
+
date: 2013-10-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
type: :development
|