zendesk2 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34ebab53477c20ee6c21506a5997b9c3ee42f3bf
4
- data.tar.gz: a8ecb162208217ad57b67e1264105228cc48d210
3
+ metadata.gz: 653a7348d948620718a5489d6960515b51dd8b4a
4
+ data.tar.gz: b0cad51c0518ca4e199c39f6b78bf32e11063cb9
5
5
  SHA512:
6
- metadata.gz: 9b4afc752900f25a9fc7de4d150882b959cc291ec6ff4035ea075632082fe2108d5a8555177eb6eaa4e55e7036b16cabf64a20be2ba812e8098a58ce2a9183f1
7
- data.tar.gz: 56993610a6ce3779a6f5fd7e3eca9f5621621021db9a7eb49a4339a95b989fb95d62ca5fd6400beb6b0f92c305117ee301f3dd3c54a6b0d6b8b628421f337104
6
+ metadata.gz: 11be3138edd97d75cbffc5fdb813a39b5c74310072d8f1e7b417f443cacc6ceaaaba8336864dab12bde2d9baa36b8eae66fdfb50db199d664d94764f6344ef41
7
+ data.tar.gz: e4950ba8d0dc76130acf8483d1cb897d8ab1a453d7631e554d00df9cee47591558796c4efea571cd08484ef64e06b5782ad124881db25c2db2c514fb69da73ea
@@ -1,7 +1,7 @@
1
1
  class Zendesk2::Client::Ticket < Zendesk2::Model
2
2
  extend Zendesk2::Attributes
3
3
 
4
- PARAMS = %w[external_id via requester_id submitter_id assignee_id organization_id subject description custom_fields recipient status collaborator_ids tags]
4
+ PARAMS = %w[external_id via priority requester_id submitter_id assignee_id organization_id subject description custom_fields recipient status collaborator_ids tags]
5
5
 
6
6
  # @return [Integer] Automatically assigned when creating tickets
7
7
  identity :id, type: :integer
@@ -65,6 +65,7 @@ class Zendesk2::Client
65
65
  "url" => url_for("/tickets/#{identity}.json"),
66
66
  "created_at" => Time.now.iso8601,
67
67
  "updated_at" => Time.now.iso8601,
68
+ "priority" => nil,
68
69
  "collaborator_ids" => [],
69
70
  "custom_fields" => custom_fields,
70
71
  }.merge(params)
@@ -1,3 +1,3 @@
1
1
  module Zendesk2
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
data/spec/tickets_spec.rb CHANGED
@@ -47,10 +47,20 @@ describe "Zendesk2::Client" do
47
47
  client.tickets.create!(subject: Zendesk2.uuid, description: "")
48
48
  }.to raise_exception(ArgumentError, /description is required/)
49
49
  end
50
+
51
+ it "should set priority" do
52
+ priority = "urgent"
53
+
54
+ ticket = client.tickets.create!(subject: Zendesk2.uuid, description: Zendesk2.uuid, priority: priority)
55
+
56
+ expect(ticket.priority).to eq("urgent")
57
+ expect(client.tickets.get!(ticket.id).priority).to eq(priority)
58
+ end
50
59
  end
51
60
 
52
61
  describe "with a created ticket" do
53
62
  let(:ticket) { client.tickets.create!(subject: Zendesk2.uuid, description: Zendesk2.uuid) }
63
+
54
64
  it "should get requester" do
55
65
  expect(ticket.requester).to eq(client.users.current)
56
66
  end
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: 0.5.2
4
+ version: 0.5.3
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-08-15 00:00:00.000000000 Z
11
+ date: 2014-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable