zendesk2 1.2.10 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zendesk2/client/models/forum.rb +2 -2
- data/lib/zendesk2/client/models/help_center/section.rb +2 -2
- data/lib/zendesk2/client/models/organization.rb +2 -2
- data/lib/zendesk2/client/models/ticket.rb +4 -1
- data/lib/zendesk2/client/models/ticket_field.rb +2 -2
- data/lib/zendesk2/client/models/topic.rb +1 -1
- data/lib/zendesk2/client/requests/update_ticket.rb +5 -2
- data/lib/zendesk2/version.rb +1 -1
- data/spec/tickets_spec.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd8bc936ca004518ab57bb6652a66b093ef1b7a9
|
4
|
+
data.tar.gz: e575e9c1bef14349397362e5f520e1aed2272403
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8b7bb9465cffe59e177e56d3ade011c1e328b2143dacb14b7feb85d3ddd0768193d7435a165bccd58156cf8c2e5aa7fb32529661a1b3f42418678ac0b100e08
|
7
|
+
data.tar.gz: 938dae3498f0937b0884e1e26532e9205e09a8792cbb4bff29d78318573d09f91b3a951ecc1e8d1ddc68c812651c98d142b7aeb4727878812c71ae80a365b69f
|
@@ -15,8 +15,8 @@ class Zendesk2::Client::Forum < Zendesk2::Model
|
|
15
15
|
attribute :position, type: :integer # ro no mandatory no The position of this forum relative to other forums in the same category
|
16
16
|
attribute :forum_type, type: :string # ro no mandatory no The type of the topics in this forum, valid values: "articles", "ideas" or "questions"
|
17
17
|
attribute :access, type: :string # ro no mandatory no Who has access to this forum, valid values: "everybody", "logged-in users" or "agents only"
|
18
|
-
attribute :created_at, type: :
|
19
|
-
attribute :updated_at, type: :
|
18
|
+
attribute :created_at, type: :time # ro yes mandatory no The time the forum was created
|
19
|
+
attribute :updated_at, type: :time # ro yes mandatory no The time of the last update of the forum
|
20
20
|
|
21
21
|
assoc_accessor :organization
|
22
22
|
assoc_accessor :category
|
@@ -7,7 +7,7 @@ class Zendesk2::Client::HelpCenter::Section < Zendesk2::Model
|
|
7
7
|
# @return [Integer] The id of the category to which this section belongs
|
8
8
|
attribute :category_id, type: :integer # ro:no required:no
|
9
9
|
# @return [Time] The time at which the section was created
|
10
|
-
attribute :created_at, type: :
|
10
|
+
attribute :created_at, type: :time # ro:yes required:no
|
11
11
|
# @return [String] The description of the section
|
12
12
|
attribute :description, type: :string # ro:no required:no
|
13
13
|
# @return [String] The url of this section in HC
|
@@ -27,7 +27,7 @@ class Zendesk2::Client::HelpCenter::Section < Zendesk2::Model
|
|
27
27
|
# @return [Array] The ids of all translations of this section
|
28
28
|
attribute :translation_ids, type: :array # ro:yes required:no
|
29
29
|
# @return [Time] The time at which the section was last updated
|
30
|
-
attribute :updated_at, type: :
|
30
|
+
attribute :updated_at, type: :time # ro:yes required:no
|
31
31
|
# @return [string] The API url of this section
|
32
32
|
attribute :url, type: :string # ro:yes required:no
|
33
33
|
|
@@ -5,7 +5,7 @@ class Zendesk2::Client::Organization < Zendesk2::Model
|
|
5
5
|
identity :id, type: :integer # ro[yes] required[no]
|
6
6
|
|
7
7
|
# @return [Date] The time the organization was created
|
8
|
-
attribute :created_at, type: :
|
8
|
+
attribute :created_at, type: :time # ro[yes] required[no]
|
9
9
|
# @return [String] In this field you can store any details obout the organization. e.g. the address
|
10
10
|
attribute :details, type: :string # ro[no] required[no]
|
11
11
|
# @return [Array] An array of domain names associated with this organization
|
@@ -27,7 +27,7 @@ class Zendesk2::Client::Organization < Zendesk2::Model
|
|
27
27
|
# @return [Array] The tags of the organization
|
28
28
|
attribute :tags, type: :array # ro[no] required[no]
|
29
29
|
# @return [Date] The time of the last update of the organization
|
30
|
-
attribute :updated_at, type: :
|
30
|
+
attribute :updated_at, type: :time # ro[yes] required[no]
|
31
31
|
# @return [String] The API url of this organization
|
32
32
|
attribute :url, type: :string # ro[yes] required[no]
|
33
33
|
|
@@ -91,13 +91,16 @@ class Zendesk2::Client::Ticket < Zendesk2::Model
|
|
91
91
|
# @param [Hash] options comment options
|
92
92
|
# @option options [Array] :attachments Attachment to upload with comment
|
93
93
|
# @option options [Boolean] :public (true)
|
94
|
+
# @return [Zendesk2::Client::TicketComment]
|
94
95
|
def comment(text, options={})
|
95
96
|
requires :identity
|
96
97
|
|
97
98
|
options[:public] = true if options[:public].nil?
|
98
99
|
comment = Zendesk2.stringify_keys(options).merge("body" => text)
|
99
100
|
|
100
|
-
connection.
|
101
|
+
connection.ticket_comments.new(
|
102
|
+
connection.update_ticket("id" => self.identity, "comment" => comment).body["audit"]["events"].first
|
103
|
+
)
|
101
104
|
end
|
102
105
|
|
103
106
|
# @return [Array<Zendesk2::Client::User>] All users CCD on this ticket
|
@@ -11,7 +11,7 @@ class Zendesk2::Client::TicketField < Zendesk2::Model
|
|
11
11
|
# @return [String] If this field should be shown to agents by default or be hidden alongside infrequently used fields
|
12
12
|
attribute :collapsed_for_agents, type: :string
|
13
13
|
# @return [Date] The time the ticket field was created
|
14
|
-
attribute :created_at, type: :
|
14
|
+
attribute :created_at, type: :time
|
15
15
|
# @return [Array] Required and presented for a ticket field of type "tagger"
|
16
16
|
attribute :custom_field_options, type: :array
|
17
17
|
# @return [String] The description of the purpose of this ticket field, shown to users
|
@@ -39,7 +39,7 @@ class Zendesk2::Client::TicketField < Zendesk2::Model
|
|
39
39
|
# @return [String] The type of the ticket field
|
40
40
|
attribute :type, type: :string
|
41
41
|
# @return [Date] The time of the last update of the ticket field
|
42
|
-
attribute :updated_at, type: :
|
42
|
+
attribute :updated_at, type: :time
|
43
43
|
# @return [String] The URL for this resource
|
44
44
|
attribute :url, type: :string
|
45
45
|
# @return [Boolean] Whether this field is available to end users
|
@@ -17,7 +17,7 @@ class Zendesk2::Client::Topic < Zendesk2::Model
|
|
17
17
|
attribute :answered, type: :boolean # ro[yes] mandatory[no] Set to true if the topic is a question and it has been marked as answered.
|
18
18
|
attribute :position, type: :integer # ro[no] mandatory[no] The position of this topic relative to other topics in the same forum
|
19
19
|
attribute :tags, type: :array # ro[no] mandatory[no] The tags set on the topic
|
20
|
-
attribute :created_at, type: :
|
20
|
+
attribute :created_at, type: :time # ro[yes] mandatory[no] The time the topic was created
|
21
21
|
|
22
22
|
assoc_accessor :submitter, collection: :users
|
23
23
|
assoc_accessor :updater, collection: :users
|
@@ -12,6 +12,7 @@ class Zendesk2::Client
|
|
12
12
|
)
|
13
13
|
end
|
14
14
|
end
|
15
|
+
|
15
16
|
class Mock
|
16
17
|
def update_ticket(params={})
|
17
18
|
ticket_id = params.delete("id")
|
@@ -31,7 +32,8 @@ class Zendesk2::Client
|
|
31
32
|
}
|
32
33
|
|
33
34
|
audit_id = self.class.new_id
|
34
|
-
|
35
|
+
|
36
|
+
self.data[:ticket_audits][audit_id] = audit = {
|
35
37
|
"id" => audit_id,
|
36
38
|
"ticket_id" => ticket_id,
|
37
39
|
"created_at" => Time.now,
|
@@ -62,7 +64,8 @@ class Zendesk2::Client
|
|
62
64
|
:method => :put,
|
63
65
|
:path => "/tickets/#{ticket_id}.json",
|
64
66
|
:body => {
|
65
|
-
"ticket" => body
|
67
|
+
"ticket" => body,
|
68
|
+
"audit" => audit,
|
66
69
|
},
|
67
70
|
)
|
68
71
|
end
|
data/lib/zendesk2/version.rb
CHANGED
data/spec/tickets_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zendesk2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Lane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|