help_scout 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1f7f7e1be3ab8b3986f219299d5b8fc293c02251
4
- data.tar.gz: f3e0f5f1ef5af966cff8f9fd4fdbea6b3ee8d795
3
+ metadata.gz: bec266119ae742cb4e172ba3b9ccff44aab916f7
4
+ data.tar.gz: c490d9de2f85e1f64a4cc2917b817738ed11d902
5
5
  SHA512:
6
- metadata.gz: 7a68abd65cc306ef7cb1d45b269747bbebb908ae711a40839e61a112f8e15334bf76954ab7ad921474a51495e0b3df3c99784afaab6a4bbf889bb6e9d314ea77
7
- data.tar.gz: cd284607eb85a2edccf92df2ce9ecaaa89f67844c1394fb80a6b96e647d5ad022c860b7377a39a2cd4bb90984c69e4b8b85f8aa9359517e896712ea9b5888949
6
+ metadata.gz: 1a9626cef734ba39cb52af2bdf3bb167d05474ae88c8aac4bd8d613a87666d3d89106dad3b3e30fb21b596c66ae5f2a248849c7dc8c605b8425cacf11b3e57be
7
+ data.tar.gz: 781f7347931da64f8a725b94b41db87e8c2d3208938137ca6a356b779611dd4c86b7cca46afa0d49d9390ed25d51c7a204882166a85757c3c11c5b5c4df65122
@@ -1,3 +1,3 @@
1
1
  class HelpScout
2
- VERSION = "0.3.2"
2
+ VERSION = "0.4.0"
3
3
  end
data/lib/help_scout.rb CHANGED
@@ -115,6 +115,29 @@ class HelpScout
115
115
  get("reports/user/ratings", options)
116
116
  end
117
117
 
118
+
119
+ # Public: Creates conversation thread
120
+ #
121
+ # conversion_id - conversation id
122
+ # thread - thread content to be created
123
+ # imported - When set to true no outgoing emails or notifications will be
124
+ # generated
125
+ # reload - Set to true to get the entire conversation in the result
126
+ #
127
+ # More info: http://developer.helpscout.net/help-desk-api/conversations/create-thread/
128
+ #
129
+ # Returns true if created, false otherwise
130
+ def create_thread(conversation_id:, thread:, imported: nil, reload: nil)
131
+ query = {}
132
+ { reload: reload, imported: imported }.each do |key, value|
133
+ query[key] = value unless value.nil?
134
+ end
135
+
136
+ post("conversations/#{conversation_id}", body: thread, query: query)
137
+
138
+ last_response.code == HTTP_CREATED
139
+ end
140
+
118
141
  protected
119
142
 
120
143
  def post(path, options = {})
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.3.2
4
+ version: 0.4.0
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-02-01 00:00:00.000000000 Z
13
+ date: 2017-03-22 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.5.1
140
+ rubygems_version: 2.6.8
141
141
  signing_key:
142
142
  specification_version: 4
143
143
  summary: HelpScout is an API client for Help Scout