ticket_sharing 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -8,6 +8,8 @@ module TicketSharing
|
|
8
8
|
fields :receiver_url, :sender_url, :status, :uuid, :access_key, :name,
|
9
9
|
:current_actor, :sync_tags, :sync_custom_fields, :allows_public_comments
|
10
10
|
|
11
|
+
attr_reader :response
|
12
|
+
|
11
13
|
def self.parse(json)
|
12
14
|
attributes = JsonSupport.decode(json)
|
13
15
|
agreement = new(attributes)
|
@@ -19,16 +21,16 @@ module TicketSharing
|
|
19
21
|
|
20
22
|
def send_to(url)
|
21
23
|
client = Client.new(url)
|
22
|
-
response = client.post(relative_url, self.to_json)
|
24
|
+
@response = client.post(relative_url, self.to_json)
|
23
25
|
|
24
|
-
response.code.to_i
|
26
|
+
@response.code.to_i
|
25
27
|
end
|
26
28
|
|
27
29
|
def update_partner(url)
|
28
30
|
client = Client.new(url, authentication_token)
|
29
|
-
response = client.put(relative_url, self.to_json)
|
31
|
+
@response = client.put(relative_url, self.to_json)
|
30
32
|
|
31
|
-
response.code.to_i
|
33
|
+
@response.code.to_i
|
32
34
|
end
|
33
35
|
|
34
36
|
def relative_url
|
@@ -12,6 +12,7 @@ module TicketSharing
|
|
12
12
|
:current_actor, :tags, :original_id, :custom_fields
|
13
13
|
|
14
14
|
attr_accessor :agreement
|
15
|
+
attr_reader :response
|
15
16
|
|
16
17
|
def self.parse(json)
|
17
18
|
attributes = JsonSupport.decode(json)
|
@@ -45,23 +46,23 @@ module TicketSharing
|
|
45
46
|
raise "Agreement not present" unless agreement
|
46
47
|
|
47
48
|
client = Client.new(url, agreement.authentication_token)
|
48
|
-
response = client.post(relative_url, self.to_json)
|
49
|
+
@response = client.post(relative_url, self.to_json)
|
49
50
|
|
50
|
-
response.code.to_i
|
51
|
+
@response.code.to_i
|
51
52
|
end
|
52
53
|
|
53
54
|
def update_partner(url)
|
54
55
|
client = Client.new(url, agreement.authentication_token)
|
55
|
-
response = client.put(relative_url, self.to_json)
|
56
|
+
@response = client.put(relative_url, self.to_json)
|
56
57
|
|
57
|
-
response.code.to_i
|
58
|
+
@response.code.to_i
|
58
59
|
end
|
59
60
|
|
60
61
|
def unshare(base_url)
|
61
62
|
client = Client.new(base_url, agreement.authentication_token)
|
62
|
-
response = client.delete(relative_url)
|
63
|
+
@response = client.delete(relative_url)
|
63
64
|
|
64
|
-
response.code.to_i
|
65
|
+
@response.code.to_i
|
65
66
|
end
|
66
67
|
|
67
68
|
def relative_url
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ticket_sharing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
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-06-
|
12
|
+
date: 2013-06-04 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A ruby implementation of the Networked Help Desk API
|
15
15
|
email: josh@zendesk.com
|
@@ -45,9 +45,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
45
45
|
- - ! '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
|
-
segments:
|
49
|
-
- 0
|
50
|
-
hash: 3138541096207578650
|
51
48
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
52
49
|
none: false
|
53
50
|
requirements:
|