zendesk_api 1.6.1 → 1.6.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 722d4108718895ed377f2352e9514afdb5c7fd00
|
4
|
+
data.tar.gz: 3bbec7caf67410aca7d71921a7215ca407f66a43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fc680e5aeeb1374c7ee3315f9620c1e0111d6d60a86569a301f717e2c3da99b8672a525d8e5b3d7d2ee2d27ba92297f2a2843f85a37fb3b49b8b8fde5ac7d84
|
7
|
+
data.tar.gz: f9d1e2572529b70e81e3cd79c52c3acb848ca72fed41d670d4180aa59e553ab7fd9c6f5c5aa762be3886d9f9996fca8514bd1aff371a53c0259440ef5537fdff
|
@@ -119,6 +119,14 @@ module ZendeskAPI
|
|
119
119
|
has_many Ticket
|
120
120
|
has_many User
|
121
121
|
has_many Tag, :extend => Tag::Update, :inline => :create
|
122
|
+
|
123
|
+
# Gets a incremental export of organizations from the start_time until now.
|
124
|
+
# @param [Client] client The {Client} object to be used
|
125
|
+
# @param [Integer] start_time The start_time parameter
|
126
|
+
# @return [Collection] Collection of {Ticket}
|
127
|
+
def self.incremental_export(client, start_time)
|
128
|
+
ZendeskAPI::Collection.new(client, self, :path => "incremental/organizations?start_time=#{start_time.to_i}")
|
129
|
+
end
|
122
130
|
end
|
123
131
|
|
124
132
|
class Brand < Resource
|
@@ -336,6 +344,22 @@ module ZendeskAPI
|
|
336
344
|
|
337
345
|
class TicketRelated < DataResource; end
|
338
346
|
|
347
|
+
class TicketEvent < DataResource
|
348
|
+
class Event < Data; end
|
349
|
+
|
350
|
+
has_many :child_events, :class => Event
|
351
|
+
has Ticket
|
352
|
+
has :updater, :class => User
|
353
|
+
|
354
|
+
# Gets a incremental export of ticket events from the start_time until now.
|
355
|
+
# @param [Client] client The {Client} object to be used
|
356
|
+
# @param [Integer] start_time The start_time parameter
|
357
|
+
# @return [Collection] Collection of {Ticket}
|
358
|
+
def self.incremental_export(client, start_time)
|
359
|
+
ZendeskAPI::Collection.new(client, self, :path => "incremental/ticket_events?start_time=#{start_time.to_i}")
|
360
|
+
end
|
361
|
+
end
|
362
|
+
|
339
363
|
class Ticket < Resource
|
340
364
|
class Audit < DataResource
|
341
365
|
class Event < Data
|
@@ -623,6 +647,14 @@ module ZendeskAPI
|
|
623
647
|
password!(opts.merge(:verb => :put))
|
624
648
|
end
|
625
649
|
|
650
|
+
# Gets a incremental export of users from the start_time until now.
|
651
|
+
# @param [Client] client The {Client} object to be used
|
652
|
+
# @param [Integer] start_time The start_time parameter
|
653
|
+
# @return [Collection] Collection of {Ticket}
|
654
|
+
def self.incremental_export(client, start_time)
|
655
|
+
ZendeskAPI::Collection.new(client, self, :path => "incremental/users?start_time=#{start_time.to_i}")
|
656
|
+
end
|
657
|
+
|
626
658
|
has Organization
|
627
659
|
|
628
660
|
class Session < Resource
|
data/lib/zendesk_api/version.rb
CHANGED
@@ -70,6 +70,29 @@ describe ZendeskAPI::Middleware::Response::RaiseError do
|
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
|
+
context "with status = 413" do
|
74
|
+
let(:status) { 413 }
|
75
|
+
|
76
|
+
it "should raise RecordInvalid" do
|
77
|
+
expect { client.connection.get "/non_existent" }.to raise_error(ZendeskAPI::Error::RecordInvalid)
|
78
|
+
end
|
79
|
+
|
80
|
+
context "with a body" do
|
81
|
+
let(:body) { MultiJson.dump(:details => "big file is big") }
|
82
|
+
|
83
|
+
it "should return RecordInvalid with proper message" do
|
84
|
+
begin
|
85
|
+
client.connection.get "/non_existent"
|
86
|
+
rescue ZendeskAPI::Error::RecordInvalid => e
|
87
|
+
expect(e.errors).to eq("big file is big")
|
88
|
+
expect(e.to_s).to eq("ZendeskAPI::Error::RecordInvalid: big file is big")
|
89
|
+
else
|
90
|
+
fail # didn't raise an error
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
73
96
|
context "with status = 200" do
|
74
97
|
let(:status) { 200 }
|
75
98
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zendesk_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Davidovitz
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-03
|
12
|
+
date: 2015-04-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bump
|