teamleader 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.md +4 -0
- data/README.md +2 -0
- data/lib/teamleader/api.rb +45 -0
- data/lib/teamleader/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTRiMTIxOTIwNTY4MjQ4NjQ3Mzc3MTQwZTY5NjFmZmMyNmVjZjExNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjUyNDlmZjk5MmFjMDY0OTYzODEwNDhjODFjNzNkNTE4OWUxMjNlNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MWE3NDk2MmUyYzljZGVhOTA0YTNkOTZjZjM1MjFjYWY0NTFlY2NiODhlNzM2
|
10
|
+
YTM1YTkxNjM5Mjg5YTgyMDMwMTgzZWE2ZTVhNjQ5YWI0YTA2ZTQyNmRiZDAy
|
11
|
+
YWM3MTczNDkwMjhkM2I1MjVjZTBhNGQ5ODRhMTI5YTM3NDc4NGY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzNjZDA1ODY5NGM1ZWZhMmQ3OGQ5ZWJhZDM0MTA3ODUxNmRmOTMyNGQyMjNj
|
14
|
+
ZjJkOGFhMzhiOWJiNjE1ODRiZGIxZWIzMDk0NGVjZDlhMTFjMjUwN2ViMzg0
|
15
|
+
ZTBmYmFmYWNlZjYwM2I5NGRmY2JiYTIzMWZmYWY2YTVjN2Y2ZDA=
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
## [0.5.0] - 2017-10-16
|
5
|
+
### Added
|
6
|
+
- Add methods for manipulating Tickets
|
7
|
+
|
4
8
|
## [0.4.0] - 2017-09-28
|
5
9
|
### Added
|
6
10
|
- Add support for getting bookkeeping accounts (cfr `get_bookkeeping_accounts` method)
|
data/README.md
CHANGED
@@ -94,7 +94,9 @@ teamleader.get_product({:product_id => 123})
|
|
94
94
|
teamleader.delete_product({:product_id => 123})
|
95
95
|
teamleader.get_products({:amount => 100, :pageno => 0}) # Pagination starts at 0
|
96
96
|
```
|
97
|
+
### Tickets
|
97
98
|
|
99
|
+
Supported methods are: `add_ticket`, `update_ticket`, `add_ticket_message`, `get_tickets`, `get_ticket`, `get_ticket_messages`, `get_ticket_message`, `get_ticket_cloud_url`.
|
98
100
|
|
99
101
|
## License
|
100
102
|
The Teamleader GEM is released under the MIT License.
|
data/lib/teamleader/api.rb
CHANGED
@@ -155,6 +155,51 @@ module Teamleader
|
|
155
155
|
request "/getProducts.php", params
|
156
156
|
end
|
157
157
|
|
158
|
+
def add_ticket(params={})
|
159
|
+
raise "client_email is required" if params[:client_email].nil?
|
160
|
+
raise "client_name is required" if params[:client_name].nil?
|
161
|
+
raise "subject is required" if params[:subject].nil?
|
162
|
+
request "/addTicket.php", params
|
163
|
+
end
|
164
|
+
|
165
|
+
def update_ticket(params={})
|
166
|
+
raise "ticket_id is required" if params[:ticket_id].nil?
|
167
|
+
request "/updateTicket.php", params
|
168
|
+
end
|
169
|
+
|
170
|
+
def add_ticket_message(params={})
|
171
|
+
raise "ticket_id is required" if params[:ticket_id].nil?
|
172
|
+
raise "message is required" if params[:message].nil?
|
173
|
+
request "/addTicketMessage.php", params
|
174
|
+
end
|
175
|
+
|
176
|
+
def get_tickets(params={})
|
177
|
+
raise "type is required" if params[:type].nil?
|
178
|
+
request "/getTickets.php", params
|
179
|
+
end
|
180
|
+
|
181
|
+
def get_ticket(params={})
|
182
|
+
raise "ticket_id is required" if params[:ticket_id].nil?
|
183
|
+
request "/getTickets.php", params
|
184
|
+
end
|
185
|
+
|
186
|
+
def get_ticket_messages(params={})
|
187
|
+
raise "ticket_id is required" if params[:ticket_id].nil?
|
188
|
+
raise "include_internal_message is required" if params[:include_internal_message].nil?
|
189
|
+
raise "include_third_party_message is required" if params[:include_third_party_message].nil?
|
190
|
+
request "/getTicketMessages.php", params
|
191
|
+
end
|
192
|
+
|
193
|
+
def get_ticket_message(params={})
|
194
|
+
raise "message_id is required" if params[:message_id].nil?
|
195
|
+
request "/getTicketMessage.php", params
|
196
|
+
end
|
197
|
+
|
198
|
+
def get_ticket_cloud_url(params={})
|
199
|
+
raise "ticket_id is required" if params[:ticket_id].nil?
|
200
|
+
request "/getTicketCloudURL.php", params
|
201
|
+
end
|
202
|
+
|
158
203
|
private
|
159
204
|
def request(path, data={})
|
160
205
|
headers = {
|
data/lib/teamleader/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teamleader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pierre-Yves Orban
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|