help_scout 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/help_scout.rb +31 -2
- data/lib/help_scout/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4c87308b26d2c7bc0d303723c079f9e35f3c2ea
|
4
|
+
data.tar.gz: 7b8c1072749cf893cd1341784a93e61bcaf6ec2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0947044ccd69d6848052cfccc595740d9593902f8b92762a1a94921622142325b094e2f22f1204a5c4a6375b13b9291750ccd810e247b04fb9fac34395c21a00'
|
7
|
+
data.tar.gz: eff3ffe4edb758ee29d00f92bf47c26069482b4abefd83e979998334497a5a0ff67c31a63519485fff5457dd662c101538b6b29706f6a4176e5c84ad60a3d0ec
|
data/lib/help_scout.rb
CHANGED
@@ -128,7 +128,8 @@ class HelpScout
|
|
128
128
|
#
|
129
129
|
# More info: http://developer.helpscout.net/help-desk-api/conversations/create-thread/
|
130
130
|
#
|
131
|
-
# Returns true if created, false otherwise
|
131
|
+
# Returns true if created, false otherwise. When used with reload: true it
|
132
|
+
# will return the entire conversation
|
132
133
|
def create_thread(conversation_id:, thread:, imported: nil, reload: nil)
|
133
134
|
query = {}
|
134
135
|
{ reload: reload, imported: imported }.each do |key, value|
|
@@ -137,7 +138,35 @@ class HelpScout
|
|
137
138
|
|
138
139
|
post("conversations/#{conversation_id}", body: thread, query: query)
|
139
140
|
|
140
|
-
|
141
|
+
if reload
|
142
|
+
last_response.parsed_response
|
143
|
+
else
|
144
|
+
last_response.code == HTTP_CREATED
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
# Public: Updates conversation thread
|
149
|
+
#
|
150
|
+
# conversion_id - conversation id
|
151
|
+
# thread - thread content to be updated (only the body can be updated)
|
152
|
+
# reload - Set to true to get the entire conversation in the result
|
153
|
+
#
|
154
|
+
# More info: http://developer.helpscout.net/help-desk-api/conversations/update-thread/
|
155
|
+
#
|
156
|
+
# Returns true if updated, false otherwise. When used with reload: true it
|
157
|
+
# will return the entire conversation
|
158
|
+
def update_thread(conversation_id:, thread:, reload: nil)
|
159
|
+
query = {}
|
160
|
+
query[:reload] = reload if reload
|
161
|
+
body = { body: thread[:body] }
|
162
|
+
|
163
|
+
put("conversations/#{conversation_id}/threads/#{thread[:id]}", body: body, query: query)
|
164
|
+
|
165
|
+
if reload
|
166
|
+
last_response.parsed_response
|
167
|
+
else
|
168
|
+
last_response.code == HTTP_OK
|
169
|
+
end
|
141
170
|
end
|
142
171
|
|
143
172
|
# Public: Update Customer
|
data/lib/help_scout/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: help_scout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dennis Paagman
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-11-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
version: '0'
|
138
138
|
requirements: []
|
139
139
|
rubyforge_project:
|
140
|
-
rubygems_version: 2.
|
140
|
+
rubygems_version: 2.6.11
|
141
141
|
signing_key:
|
142
142
|
specification_version: 4
|
143
143
|
summary: HelpScout is an API client for Help Scout
|