desk_api 0.5.7 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +7 -2
- data/lib/desk_api/resource.rb +23 -17
- data/lib/desk_api/version.rb +1 -1
- data/spec/cassettes/DeskApi_Resource/_update/can_handle_update_action_params.yml +303 -0
- data/spec/cassettes/DeskApi_Resource/_update/can_replace_instead_of_append.yml +315 -0
- data/spec/desk_api/resource_spec.rb +39 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 377a97983e2ace11f11987c8613ff3fedadcac9d
|
4
|
+
data.tar.gz: 1abd58b7426e200881ed64f4442bac2d3e3596c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5b702677936f9850abd90eadee90b2610ce7e4115425eb0d9f48a40f40724a0b3d842b98de3a2438160d9421ab7328d720b7ca22d12fbb328ec2a9910285239
|
7
|
+
data.tar.gz: 013ca94e41377209aab11cb2c5e8a08149a42e140794d9530a25cb0806a5d68a5cf393fd8e48c6f5f83326ee5d597886bb7b0e691a338cac59b0fb8a8ccc0f76
|
data/Rakefile
CHANGED
@@ -10,9 +10,14 @@ end
|
|
10
10
|
desc 'starts a console with the spec helpers preloaded'
|
11
11
|
task :console do
|
12
12
|
begin
|
13
|
-
require 'pry'
|
14
13
|
require_relative './spec/spec_helper'
|
14
|
+
DeskApi.configure do |config|
|
15
|
+
DeskApi::CONFIG.each do |key, value|
|
16
|
+
config.send "#{key}=", value
|
17
|
+
end
|
18
|
+
end
|
15
19
|
VCR.turn_off!
|
20
|
+
require 'pry'
|
16
21
|
Pry.start binding, quiet: true
|
17
22
|
rescue LoadError
|
18
23
|
puts "Looks like pry is not installed or loaded."
|
@@ -24,4 +29,4 @@ task default: :spec
|
|
24
29
|
require 'rspec/core/rake_task'
|
25
30
|
RSpec::Core::RakeTask.new do |t|
|
26
31
|
t.rspec_opts = ["--color", '--format doc']
|
27
|
-
end
|
32
|
+
end
|
data/lib/desk_api/resource.rb
CHANGED
@@ -15,8 +15,9 @@ class DeskApi::Resource
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def update(params = {})
|
18
|
-
|
19
|
-
|
18
|
+
changes = filter_update_actions params
|
19
|
+
params.each_pair{ |key, value| send("#{key}=", value) if respond_to?("#{key}=") }
|
20
|
+
changes.merge!(@_changed.clone)
|
20
21
|
@_changed = {}
|
21
22
|
@_definition = @_client.patch(href, changes).body
|
22
23
|
end
|
@@ -98,6 +99,22 @@ class DeskApi::Resource
|
|
98
99
|
self.href = uri.to_s
|
99
100
|
end
|
100
101
|
|
102
|
+
def respond_to?(method, include_private = false)
|
103
|
+
self.exec! unless @_loaded
|
104
|
+
meth = method.to_s
|
105
|
+
|
106
|
+
return true if is_embedded?(meth)
|
107
|
+
return true if is_link?(meth)
|
108
|
+
return true if meth.end_with?('=') and is_field?(meth[0...-1])
|
109
|
+
return true if is_field?(meth)
|
110
|
+
|
111
|
+
super
|
112
|
+
end
|
113
|
+
|
114
|
+
def reload!
|
115
|
+
self.exec! true
|
116
|
+
end
|
117
|
+
|
101
118
|
protected
|
102
119
|
|
103
120
|
def clean_base_url
|
@@ -113,6 +130,10 @@ protected
|
|
113
130
|
private
|
114
131
|
attr_accessor :_client, :_loaded, :_changed, :_definition
|
115
132
|
|
133
|
+
def filter_update_actions(params = {})
|
134
|
+
params.select{ |key, _| key.to_s.include?('update_action') }
|
135
|
+
end
|
136
|
+
|
116
137
|
def is_field?(method)
|
117
138
|
@_definition.key?(method)
|
118
139
|
end
|
@@ -162,19 +183,4 @@ private
|
|
162
183
|
|
163
184
|
super(method, *args, &block)
|
164
185
|
end
|
165
|
-
|
166
|
-
public
|
167
|
-
def respond_to?(method, include_private = false)
|
168
|
-
self.exec! unless @_loaded
|
169
|
-
|
170
|
-
meth = method.to_s
|
171
|
-
|
172
|
-
return true if is_embedded?(meth)
|
173
|
-
return true if is_link?(meth)
|
174
|
-
return true if meth.end_with?('=') and is_field?(meth[0...-1])
|
175
|
-
return true if is_field?(meth)
|
176
|
-
|
177
|
-
super
|
178
|
-
end
|
179
|
-
|
180
186
|
end
|
data/lib/desk_api/version.rb
CHANGED
@@ -0,0 +1,303 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://devel.desk.com/api/v2/customers
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- desk.com Ruby Gem v0.5.7
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message:
|
18
|
+
headers:
|
19
|
+
accept-ranges:
|
20
|
+
- bytes
|
21
|
+
cache-control:
|
22
|
+
- must-revalidate, private, max-age=0
|
23
|
+
content-type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
date:
|
26
|
+
- Tue, 08 Apr 2014 19:06:35 GMT
|
27
|
+
etag:
|
28
|
+
- '"ccbd2e483bd8e68c537cf8906bf9e834"'
|
29
|
+
status:
|
30
|
+
- 200 OK
|
31
|
+
vary:
|
32
|
+
- X-AppVersion
|
33
|
+
x-appversion:
|
34
|
+
- '15.99'
|
35
|
+
x-frame-options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
x-rate-limit-limit:
|
38
|
+
- '120'
|
39
|
+
x-rate-limit-remaining:
|
40
|
+
- '118'
|
41
|
+
x-rate-limit-reset:
|
42
|
+
- '25'
|
43
|
+
x-request-id:
|
44
|
+
- 35f49b0cca6e76164ff7bb96d8a360e5
|
45
|
+
content-length:
|
46
|
+
- '35908'
|
47
|
+
connection:
|
48
|
+
- Close
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"total_entries":226,"page":1,"_links":{"self":{"href":"/api/v2/customers?page=1&per_page=50","class":"page"},"first":{"href":"/api/v2/customers?page=1&per_page=50","class":"page"},"last":{"href":"/api/v2/customers?page=5&per_page=50","class":"page"},"previous":null,"next":{"href":"/api/v2/customers?page=2&per_page=50","class":"page"}},"_embedded":{"entries":[{"id":34290812,"first_name":"Alex","last_name":"Bard","company":"Desk.com","title":"CEO","external_id":null,"background":"Wowing
|
52
|
+
customer","language":null,"locked_until":null,"created_at":"2012-06-06T14:51:30Z","updated_at":"2014-03-24T02:47:01Z","custom_fields":{"my_custom_field":null,"my_number_field":"0","my_boolean_field":false,"my_date_field":null,"my_list_field":"Option
|
53
|
+
1","magento_id":null},"emails":[{"type":"work","value":"support@desk.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/34290812","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138963","class":"company"},"facebook_user":null,"twitter_user":{"href":"/api/v2/twitter_users/2887203","class":"twitter_user"},"cases":{"href":"/api/v2/customers/34290812/cases","class":"case","count":147}}},{"id":34292086,"first_name":"Stella","last_name":"Pavlova","company":"Morpon
|
54
|
+
Brothers","title":"SVP Production","external_id":null,"background":"","language":null,"locked_until":null,"created_at":"2012-06-06T15:01:44Z","updated_at":"2012-12-07T23:56:00Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/34292086","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138965","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/34292086/cases","class":"case","count":0}}},{"id":34406867,"first_name":"Mike","last_name":"Malmin","company":"Mike
|
55
|
+
Malmin","title":"","external_id":null,"background":"","language":null,"locked_until":null,"created_at":"2012-06-07T13:50:04Z","updated_at":"2012-12-07T23:56:00Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/34406867","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138578","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/34406867/cases","class":"case","count":0}}},{"id":34408491,"first_name":"Janice","last_name":"Bergman","company":"Data
|
56
|
+
Mart","title":"VP Purchasing","external_id":null,"background":"","language":null,"locked_until":null,"created_at":"2012-06-07T14:07:13Z","updated_at":"2012-12-07T23:56:00Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/34408491","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138446","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/34408491/cases","class":"case","count":0}}},{"id":36328589,"first_name":"Bob","last_name":"Hodges","company":"United
|
57
|
+
Partners*","title":"President and CEO","external_id":null,"background":"","language":null,"locked_until":null,"created_at":"2012-06-22T21:56:31Z","updated_at":"2012-12-07T23:56:01Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/36328589","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/113131","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/36328589/cases","class":"case","count":0}}},{"id":36652658,"first_name":"Ron","last_name":"Adkins","company":"Valley
|
58
|
+
Supply Inc.","title":"President Sales Exec Finance Exec","external_id":null,"background":"","language":null,"locked_until":null,"created_at":"2012-06-25T21:12:05Z","updated_at":"2012-12-07T23:56:01Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/36652658","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/114536","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/36652658/cases","class":"case","count":0}}},{"id":37823480,"first_name":"Thomas","last_name":"Stachl","company":"stachl.me","title":"Master
|
59
|
+
of Script Artistry","external_id":null,"background":"Some Background information.","language":null,"locked_until":null,"created_at":"2012-07-04T14:33:39Z","updated_at":"2014-03-16T10:00:24Z","custom_fields":{"my_custom_field":null,"my_number_field":"0","my_boolean_field":false,"my_date_field":null,"my_list_field":"Option
|
60
|
+
1","magento_id":null},"emails":[{"type":"home","value":"thomas@stachl.me"},{"type":"home","value":"tstachl@salesforce.com"}],"phone_numbers":[{"type":"mobile","value":"4156060761"}],"addresses":[{"type":"home","value":"600
|
61
|
+
William Street #526\r\nOakland, CA 94612"}],"_links":{"self":{"href":"/api/v2/customers/37823480","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/373760","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/37823480/cases","class":"case","count":34}}},{"id":58278628,"first_name":"Lauren","last_name":"Boyle*","company":"mailinator.com","title":"","external_id":"0033000001JLAZrAAP","background":"","language":null,"locked_until":null,"created_at":"2012-12-07T23:36:46Z","updated_at":"2013-04-13T03:47:03Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"work","value":"lauren.boyle@mailinator.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/58278628","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/2278303","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/58278628/cases","class":"case","count":0}}},{"id":71433005,"first_name":"Sandy","last_name":"Knudson","company":"mailinator.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-02-28T19:28:28Z","updated_at":"2013-02-28T19:45:43Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"work","value":"sandyknudson@mailinator.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/71433005","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/2278303","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/71433005/cases","class":"case","count":0}}},{"id":71579966,"first_name":"Brad","last_name":"Anastasio","company":"fakeemail.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-01T13:51:56Z","updated_at":"2013-03-01T13:51:56Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"work","value":"brad.anastasio@fakeemail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/71579966","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4036540","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/71579966/cases","class":"case","count":0}}},{"id":75923712,"first_name":"Leena","last_name":"Cianflone","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-22T23:49:45Z","updated_at":"2013-03-22T23:49:45Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"leenacianflone@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/75923712","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/75923712/cases","class":"case","count":0}}},{"id":75923713,"first_name":"Quinton","last_name":"Swanda","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-22T23:49:45Z","updated_at":"2013-03-22T23:49:45Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"quintonswanda@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/75923713","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/75923713/cases","class":"case","count":0}}},{"id":75923714,"first_name":"Jennifer","last_name":"Hansen","company":"zendesk.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-22T23:49:46Z","updated_at":"2013-03-22T23:49:46Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"jennifer@zendesk.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/75923714","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4451253","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/75923714/cases","class":"case","count":0}}},{"id":75923715,"first_name":"Hue","last_name":"Gottesman","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-22T23:49:46Z","updated_at":"2013-03-22T23:49:46Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"huegottesman@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/75923715","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/75923715/cases","class":"case","count":0}}},{"id":75923716,"first_name":"Hal","last_name":"Raxter","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-22T23:49:47Z","updated_at":"2013-03-22T23:49:47Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"raxterhal@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/75923716","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/75923716/cases","class":"case","count":0}}},{"id":75923717,"first_name":"Colmo","last_name":"","company":"zendesk.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-22T23:49:47Z","updated_at":"2013-03-22T23:49:47Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"colmo@zendesk.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/75923717","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4451253","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/75923717/cases","class":"case","count":0}}},{"id":75923718,"first_name":"Brice","last_name":"Baggenstoss","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-22T23:49:47Z","updated_at":"2013-03-22T23:49:47Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"bricebaggenstoss@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/75923718","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/75923718/cases","class":"case","count":1}}},{"id":75923719,"first_name":"Support","last_name":"","company":"zendesk.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-22T23:49:47Z","updated_at":"2013-03-22T23:49:47Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"support@zendesk.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/75923719","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4451253","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/75923719/cases","class":"case","count":0}}},{"id":75923720,"first_name":"Noreply","last_name":"","company":"postmaster.twitter.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-22T23:49:48Z","updated_at":"2013-03-22T23:49:48Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"noreply@postmaster.twitter.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/75923720","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4451254","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/75923720/cases","class":"case","count":0}}},{"id":75923721,"first_name":"Hal","last_name":"Schellhase","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-22T23:49:48Z","updated_at":"2013-03-22T23:49:48Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"halschellhase@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/75923721","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/75923721/cases","class":"case","count":0}}},{"id":76863359,"first_name":"Test","last_name":"Tester","company":"example.com","title":"CEO","external_id":null,"background":"","language":"en","locked_until":null,"created_at":"2013-03-27T17:35:51Z","updated_at":"2013-03-27T18:04:48Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"work","value":"tester@example.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/76863359","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4543697","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/76863359/cases","class":"case","count":0}}},{"id":77160792,"first_name":"barr_tim","last_name":"","company":"grandhotels.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-29T00:04:09Z","updated_at":"2013-04-15T23:59:05Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"barr_tim@grandhotels.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/77160792","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4574466","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/77160792/cases","class":"case","count":0}}},{"id":78914102,"first_name":"John","last_name":"","company":"example.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-06T22:12:56Z","updated_at":"2013-04-15T16:42:57Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"john@example.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/78914102","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4543697","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/78914102/cases","class":"case","count":0}}},{"id":79246639,"first_name":"Stachl","last_name":"Testing
|
62
|
+
Page","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-08T20:06:40Z","updated_at":"2013-04-08T20:06:40Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/79246639","class":"customer"},"locked_by":null,"facebook_user":{"href":"/api/v2/facebook_users/1885425","class":"facebook_user"},"twitter_user":null,"cases":{"href":"/api/v2/customers/79246639/cases","class":"case","count":0}}},{"id":79249149,"first_name":"Thomas","last_name":"Stachl","company":null,"title":null,"external_id":null,"background":null,"language":"en_us","locked_until":null,"created_at":"2013-04-08T20:18:56Z","updated_at":"2014-03-16T09:21:39Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/79249149","class":"customer"},"locked_by":null,"facebook_user":{"href":"/api/v2/facebook_users/1885471","class":"facebook_user"},"twitter_user":null,"cases":{"href":"/api/v2/customers/79249149/cases","class":"case","count":0}}},{"id":79858779,"first_name":"Andrew","last_name":"Frauen","company":null,"title":null,"external_id":null,"background":null,"language":"en","locked_until":null,"created_at":"2013-04-11T17:39:26Z","updated_at":"2013-04-11T17:39:26Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"frauen.a@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/79858779","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/79858779/cases","class":"case","count":0}}},{"id":80192856,"first_name":null,"last_name":null,"company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-12T23:46:33Z","updated_at":"2013-04-12T23:46:33Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/80192856","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/80192856/cases","class":"case","count":0}}},{"id":80193061,"first_name":null,"last_name":null,"company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-12T23:48:05Z","updated_at":"2013-04-12T23:48:05Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/80193061","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/80193061/cases","class":"case","count":0}}},{"id":80212952,"first_name":null,"last_name":null,"company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-13T02:37:48Z","updated_at":"2013-04-13T02:37:48Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/80212952","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/80212952/cases","class":"case","count":0}}},{"id":80213083,"first_name":null,"last_name":null,"company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-13T02:39:12Z","updated_at":"2013-04-13T02:39:12Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/80213083","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/80213083/cases","class":"case","count":0}}},{"id":80213160,"first_name":null,"last_name":null,"company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-13T02:40:10Z","updated_at":"2013-04-13T02:40:10Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/80213160","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/80213160/cases","class":"case","count":0}}},{"id":80213349,"first_name":null,"last_name":null,"company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-13T02:41:53Z","updated_at":"2013-04-13T02:41:53Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/80213349","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/80213349/cases","class":"case","count":0}}},{"id":80213634,"first_name":null,"last_name":null,"company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-13T02:43:59Z","updated_at":"2013-04-13T02:43:59Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/80213634","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/80213634/cases","class":"case","count":0}}},{"id":80213888,"first_name":null,"last_name":null,"company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-13T02:45:57Z","updated_at":"2013-04-13T02:45:57Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/80213888","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/80213888/cases","class":"case","count":0}}},{"id":80214018,"first_name":null,"last_name":null,"company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-13T02:46:52Z","updated_at":"2013-04-13T02:46:52Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/80214018","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/80214018/cases","class":"case","count":0}}},{"id":80640812,"first_name":"John","last_name":"Smith","company":"Glorious
|
63
|
+
D","title":"Senior Vice President of Awesome","external_id":null,"background":"Some
|
64
|
+
description.","language":null,"locked_until":null,"created_at":"2013-04-15T16:58:30Z","updated_at":"2013-04-15T16:58:31Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"john@gd.com"}],"phone_numbers":[{"type":"home","value":"4155551235"}],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/80640812","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4912151","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/80640812/cases","class":"case","count":0}}},{"id":82113673,"first_name":"Larita","last_name":"Villas","company":null,"title":null,"external_id":null,"background":"","language":null,"locked_until":null,"created_at":"2013-04-22T22:37:00Z","updated_at":"2013-04-22T22:37:00Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"laritavillas@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113673","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113673/cases","class":"case","count":0}}},{"id":82113675,"first_name":"Nolan","last_name":"Gett","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:37:01Z","updated_at":"2013-04-22T22:37:01Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"nolangett@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113675","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113675/cases","class":"case","count":0}}},{"id":82113682,"first_name":"Moises","last_name":"Sabio","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:37:02Z","updated_at":"2013-04-22T22:37:02Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"sabiomoises@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113682","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113682/cases","class":"case","count":0}}},{"id":82113684,"first_name":"Twitter","last_name":"","company":"postmaster.twitter.com","title":null,"external_id":null,"background":"","language":null,"locked_until":null,"created_at":"2013-04-22T22:37:02Z","updated_at":"2013-04-22T22:37:02Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"n-tybonyfhespb=tznvy.pbz-9b29b@postmaster.twitter.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113684","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4451254","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113684/cases","class":"case","count":0}}},{"id":82113685,"first_name":"Zendesk","last_name":"","company":"zendesk.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:37:03Z","updated_at":"2013-04-22T22:37:03Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"noreply@zendesk.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113685","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4451253","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113685/cases","class":"case","count":0}}},{"id":82113689,"first_name":"Richie","last_name":"Kalter","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:37:03Z","updated_at":"2013-04-22T22:37:03Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"richiekalter11@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113689","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113689/cases","class":"case","count":0}}},{"id":82113693,"first_name":"The","last_name":"Desk.com
|
65
|
+
Team","company":"Desk.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:37:04Z","updated_at":"2013-04-22T22:37:04Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"welcome@desk.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113693","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138963","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113693/cases","class":"case","count":0}}},{"id":82113694,"first_name":"Rupert","last_name":"Warstler","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:37:04Z","updated_at":"2013-04-22T22:37:04Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"rupertwarstler@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113694","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113694/cases","class":"case","count":0}}},{"id":82113926,"first_name":"Suzy","last_name":"Galicinao","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:38:00Z","updated_at":"2013-04-22T22:38:00Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"suzygalicinao@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113926","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113926/cases","class":"case","count":0}}},{"id":82113930,"first_name":"ashley","last_name":"lawrence","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:38:01Z","updated_at":"2013-04-22T22:38:01Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113930","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113930/cases","class":"case","count":0}}},{"id":82113931,"first_name":"Keshia","last_name":"Hohenstein","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:38:01Z","updated_at":"2013-04-22T22:38:01Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113931","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113931/cases","class":"case","count":0}}},{"id":82113933,"first_name":"Alex","last_name":"Hisaka","company":"Desk.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:38:01Z","updated_at":"2013-04-22T22:38:02Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"alex.hisaka@desk.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113933","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138963","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113933/cases","class":"case","count":0}}},{"id":82113936,"first_name":"seethaji","last_name":"","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:38:02Z","updated_at":"2013-04-22T22:38:02Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"seethaji@yahoo.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113936","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113936/cases","class":"case","count":0}}},{"id":82113939,"first_name":"Sukhjit","last_name":"","company":"Desk.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:38:02Z","updated_at":"2014-01-16T16:53:17Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"sukhjit@desk.com"}],"phone_numbers":[],"addresses":[{"type":"home","value":"Some
|
66
|
+
Address"}],"_links":{"self":{"href":"/api/v2/customers/82113939","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138963","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113939/cases","class":"case","count":2}}}]}}'
|
67
|
+
http_version:
|
68
|
+
recorded_at: Tue, 08 Apr 2014 19:06:35 GMT
|
69
|
+
- request:
|
70
|
+
method: patch
|
71
|
+
uri: https://devel.desk.com/api/v2/customers/34290812
|
72
|
+
body:
|
73
|
+
encoding: UTF-8
|
74
|
+
string: '{"phone_numbers_update_action":"append","phone_numbers":[{"type":"home","value":"(415)
|
75
|
+
555-1234"}]}'
|
76
|
+
headers:
|
77
|
+
Accept:
|
78
|
+
- application/json
|
79
|
+
User-Agent:
|
80
|
+
- desk.com Ruby Gem v0.5.7
|
81
|
+
Content-Type:
|
82
|
+
- application/json
|
83
|
+
response:
|
84
|
+
status:
|
85
|
+
code: 200
|
86
|
+
message:
|
87
|
+
headers:
|
88
|
+
cache-control:
|
89
|
+
- max-age=0, private, must-revalidate
|
90
|
+
content-type:
|
91
|
+
- application/json; charset=utf-8
|
92
|
+
date:
|
93
|
+
- Tue, 08 Apr 2014 19:06:36 GMT
|
94
|
+
etag:
|
95
|
+
- '"db3913ce36d05fac369ae70f5581a794"'
|
96
|
+
server:
|
97
|
+
- nginx
|
98
|
+
status:
|
99
|
+
- 200 OK
|
100
|
+
vary:
|
101
|
+
- X-AppVersion
|
102
|
+
x-appversion:
|
103
|
+
- '15.99'
|
104
|
+
x-frame-options:
|
105
|
+
- SAMEORIGIN
|
106
|
+
x-rack-cache:
|
107
|
+
- invalidate, pass
|
108
|
+
x-rate-limit-limit:
|
109
|
+
- '120'
|
110
|
+
x-rate-limit-remaining:
|
111
|
+
- '117'
|
112
|
+
x-rate-limit-reset:
|
113
|
+
- '24'
|
114
|
+
x-request-id:
|
115
|
+
- 324e64b0135b0b6c4c94d1444cbd3779
|
116
|
+
x-runtime:
|
117
|
+
- '0.756723'
|
118
|
+
x-ua-compatible:
|
119
|
+
- IE=Edge,chrome=1
|
120
|
+
content-length:
|
121
|
+
- '864'
|
122
|
+
connection:
|
123
|
+
- Close
|
124
|
+
body:
|
125
|
+
encoding: UTF-8
|
126
|
+
string: '{"id":34290812,"first_name":"Alex","last_name":"Bard","company":"Desk.com","title":"CEO","external_id":null,"background":"Wowing
|
127
|
+
customer","language":null,"locked_until":null,"created_at":"2012-06-06T14:51:30Z","updated_at":"2014-04-08T19:06:35Z","custom_fields":{"my_custom_field":null,"my_number_field":"0","my_boolean_field":false,"my_date_field":null,"my_list_field":"Option
|
128
|
+
1","magento_id":null},"emails":[{"type":"work","value":"support@desk.com"}],"phone_numbers":[{"type":"home","value":"(415)
|
129
|
+
555-1234"}],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/34290812","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138963","class":"company"},"facebook_user":null,"twitter_user":{"href":"/api/v2/twitter_users/2887203","class":"twitter_user"},"cases":{"href":"/api/v2/customers/34290812/cases","class":"case","count":147}}}'
|
130
|
+
http_version:
|
131
|
+
recorded_at: Tue, 08 Apr 2014 19:06:36 GMT
|
132
|
+
- request:
|
133
|
+
method: get
|
134
|
+
uri: https://devel.desk.com/api/v2/customers/34290812
|
135
|
+
body:
|
136
|
+
encoding: US-ASCII
|
137
|
+
string: ''
|
138
|
+
headers:
|
139
|
+
Accept:
|
140
|
+
- application/json
|
141
|
+
User-Agent:
|
142
|
+
- desk.com Ruby Gem v0.5.7
|
143
|
+
response:
|
144
|
+
status:
|
145
|
+
code: 200
|
146
|
+
message:
|
147
|
+
headers:
|
148
|
+
accept-ranges:
|
149
|
+
- bytes
|
150
|
+
cache-control:
|
151
|
+
- must-revalidate, private, max-age=0
|
152
|
+
content-type:
|
153
|
+
- application/json; charset=utf-8
|
154
|
+
date:
|
155
|
+
- Tue, 08 Apr 2014 19:06:36 GMT
|
156
|
+
etag:
|
157
|
+
- '"db3913ce36d05fac369ae70f5581a794"'
|
158
|
+
status:
|
159
|
+
- 200 OK
|
160
|
+
vary:
|
161
|
+
- X-AppVersion
|
162
|
+
x-appversion:
|
163
|
+
- '15.99'
|
164
|
+
x-frame-options:
|
165
|
+
- SAMEORIGIN
|
166
|
+
x-rate-limit-limit:
|
167
|
+
- '120'
|
168
|
+
x-rate-limit-remaining:
|
169
|
+
- '116'
|
170
|
+
x-rate-limit-reset:
|
171
|
+
- '24'
|
172
|
+
x-request-id:
|
173
|
+
- 78dbbacab8a84281e3bad42341094079
|
174
|
+
content-length:
|
175
|
+
- '864'
|
176
|
+
connection:
|
177
|
+
- Close
|
178
|
+
body:
|
179
|
+
encoding: UTF-8
|
180
|
+
string: '{"id":34290812,"first_name":"Alex","last_name":"Bard","company":"Desk.com","title":"CEO","external_id":null,"background":"Wowing
|
181
|
+
customer","language":null,"locked_until":null,"created_at":"2012-06-06T14:51:30Z","updated_at":"2014-04-08T19:06:35Z","custom_fields":{"my_custom_field":null,"my_number_field":"0","my_boolean_field":false,"my_date_field":null,"my_list_field":"Option
|
182
|
+
1","magento_id":null},"emails":[{"type":"work","value":"support@desk.com"}],"phone_numbers":[{"type":"home","value":"(415)
|
183
|
+
555-1234"}],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/34290812","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138963","class":"company"},"facebook_user":null,"twitter_user":{"href":"/api/v2/twitter_users/2887203","class":"twitter_user"},"cases":{"href":"/api/v2/customers/34290812/cases","class":"case","count":147}}}'
|
184
|
+
http_version:
|
185
|
+
recorded_at: Tue, 08 Apr 2014 19:06:36 GMT
|
186
|
+
- request:
|
187
|
+
method: patch
|
188
|
+
uri: https://devel.desk.com/api/v2/customers/34290812
|
189
|
+
body:
|
190
|
+
encoding: UTF-8
|
191
|
+
string: '{"phone_numbers_update_action":"append","phone_numbers":[{"type":"home","value":"(415)
|
192
|
+
555-1234"}]}'
|
193
|
+
headers:
|
194
|
+
Accept:
|
195
|
+
- application/json
|
196
|
+
User-Agent:
|
197
|
+
- desk.com Ruby Gem v0.5.7
|
198
|
+
Content-Type:
|
199
|
+
- application/json
|
200
|
+
response:
|
201
|
+
status:
|
202
|
+
code: 200
|
203
|
+
message:
|
204
|
+
headers:
|
205
|
+
cache-control:
|
206
|
+
- max-age=0, private, must-revalidate
|
207
|
+
content-type:
|
208
|
+
- application/json; charset=utf-8
|
209
|
+
date:
|
210
|
+
- Tue, 08 Apr 2014 19:06:37 GMT
|
211
|
+
etag:
|
212
|
+
- '"a7c99207b857c9dde07e138acc46dee4"'
|
213
|
+
server:
|
214
|
+
- nginx
|
215
|
+
status:
|
216
|
+
- 200 OK
|
217
|
+
vary:
|
218
|
+
- X-AppVersion
|
219
|
+
x-appversion:
|
220
|
+
- '15.99'
|
221
|
+
x-frame-options:
|
222
|
+
- SAMEORIGIN
|
223
|
+
x-rack-cache:
|
224
|
+
- invalidate, pass
|
225
|
+
x-rate-limit-limit:
|
226
|
+
- '120'
|
227
|
+
x-rate-limit-remaining:
|
228
|
+
- '115'
|
229
|
+
x-rate-limit-reset:
|
230
|
+
- '23'
|
231
|
+
x-request-id:
|
232
|
+
- 8dc2c55213514ee097f91a89acd68eb3
|
233
|
+
x-runtime:
|
234
|
+
- '0.591474'
|
235
|
+
x-ua-compatible:
|
236
|
+
- IE=Edge,chrome=1
|
237
|
+
transfer-encoding:
|
238
|
+
- chunked
|
239
|
+
connection:
|
240
|
+
- Close
|
241
|
+
body:
|
242
|
+
encoding: UTF-8
|
243
|
+
string: '{"id":34290812,"first_name":"Alex","last_name":"Bard","company":"Desk.com","title":"CEO","external_id":null,"background":"Wowing
|
244
|
+
customer","language":null,"locked_until":null,"created_at":"2012-06-06T14:51:30Z","updated_at":"2014-04-08T19:06:36Z","custom_fields":{"my_custom_field":null,"my_number_field":"0","my_boolean_field":false,"my_date_field":null,"my_list_field":"Option
|
245
|
+
1","magento_id":null},"emails":[{"type":"work","value":"support@desk.com"}],"phone_numbers":[{"type":"home","value":"(415)
|
246
|
+
555-1234"},{"type":"home","value":"(415) 555-1234"}],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/34290812","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138963","class":"company"},"facebook_user":null,"twitter_user":{"href":"/api/v2/twitter_users/2887203","class":"twitter_user"},"cases":{"href":"/api/v2/customers/34290812/cases","class":"case","count":147}}}'
|
247
|
+
http_version:
|
248
|
+
recorded_at: Tue, 08 Apr 2014 19:06:37 GMT
|
249
|
+
- request:
|
250
|
+
method: get
|
251
|
+
uri: https://devel.desk.com/api/v2/customers/34290812
|
252
|
+
body:
|
253
|
+
encoding: US-ASCII
|
254
|
+
string: ''
|
255
|
+
headers:
|
256
|
+
Accept:
|
257
|
+
- application/json
|
258
|
+
User-Agent:
|
259
|
+
- desk.com Ruby Gem v0.5.7
|
260
|
+
response:
|
261
|
+
status:
|
262
|
+
code: 200
|
263
|
+
message:
|
264
|
+
headers:
|
265
|
+
accept-ranges:
|
266
|
+
- bytes
|
267
|
+
cache-control:
|
268
|
+
- must-revalidate, private, max-age=0
|
269
|
+
content-type:
|
270
|
+
- application/json; charset=utf-8
|
271
|
+
date:
|
272
|
+
- Tue, 08 Apr 2014 19:06:37 GMT
|
273
|
+
etag:
|
274
|
+
- '"a7c99207b857c9dde07e138acc46dee4"'
|
275
|
+
status:
|
276
|
+
- 200 OK
|
277
|
+
vary:
|
278
|
+
- X-AppVersion
|
279
|
+
x-appversion:
|
280
|
+
- '15.99'
|
281
|
+
x-frame-options:
|
282
|
+
- SAMEORIGIN
|
283
|
+
x-rate-limit-limit:
|
284
|
+
- '120'
|
285
|
+
x-rate-limit-remaining:
|
286
|
+
- '114'
|
287
|
+
x-rate-limit-reset:
|
288
|
+
- '23'
|
289
|
+
x-request-id:
|
290
|
+
- db2b499263414eabb171b5183d3f7e98
|
291
|
+
content-length:
|
292
|
+
- '905'
|
293
|
+
connection:
|
294
|
+
- Close
|
295
|
+
body:
|
296
|
+
encoding: UTF-8
|
297
|
+
string: '{"id":34290812,"first_name":"Alex","last_name":"Bard","company":"Desk.com","title":"CEO","external_id":null,"background":"Wowing
|
298
|
+
customer","language":null,"locked_until":null,"created_at":"2012-06-06T14:51:30Z","updated_at":"2014-04-08T19:06:36Z","custom_fields":{"my_custom_field":null,"my_number_field":"0","my_boolean_field":false,"my_date_field":null,"my_list_field":"Option
|
299
|
+
1","magento_id":null},"emails":[{"type":"work","value":"support@desk.com"}],"phone_numbers":[{"type":"home","value":"(415)
|
300
|
+
555-1234"},{"type":"home","value":"(415) 555-1234"}],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/34290812","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138963","class":"company"},"facebook_user":null,"twitter_user":{"href":"/api/v2/twitter_users/2887203","class":"twitter_user"},"cases":{"href":"/api/v2/customers/34290812/cases","class":"case","count":147}}}'
|
301
|
+
http_version:
|
302
|
+
recorded_at: Tue, 08 Apr 2014 19:06:37 GMT
|
303
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,315 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://devel.desk.com/api/v2/customers
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- desk.com Ruby Gem v0.5.7
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message:
|
18
|
+
headers:
|
19
|
+
accept-ranges:
|
20
|
+
- bytes
|
21
|
+
cache-control:
|
22
|
+
- must-revalidate, private, max-age=0
|
23
|
+
content-type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
date:
|
26
|
+
- Tue, 08 Apr 2014 19:08:33 GMT
|
27
|
+
etag:
|
28
|
+
- '"95556562da23122030c6b905b91b2038"'
|
29
|
+
status:
|
30
|
+
- 200 OK
|
31
|
+
vary:
|
32
|
+
- X-AppVersion
|
33
|
+
x-appversion:
|
34
|
+
- '15.99'
|
35
|
+
x-frame-options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
x-rate-limit-limit:
|
38
|
+
- '120'
|
39
|
+
x-rate-limit-remaining:
|
40
|
+
- '119'
|
41
|
+
x-rate-limit-reset:
|
42
|
+
- '27'
|
43
|
+
x-request-id:
|
44
|
+
- 53037f558dca9838f040791157164152
|
45
|
+
content-length:
|
46
|
+
- '36153'
|
47
|
+
connection:
|
48
|
+
- Close
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"total_entries":226,"page":1,"_links":{"self":{"href":"/api/v2/customers?page=1&per_page=50","class":"page"},"first":{"href":"/api/v2/customers?page=1&per_page=50","class":"page"},"last":{"href":"/api/v2/customers?page=5&per_page=50","class":"page"},"previous":null,"next":{"href":"/api/v2/customers?page=2&per_page=50","class":"page"}},"_embedded":{"entries":[{"id":34290812,"first_name":"Alex","last_name":"Bard","company":"Desk.com","title":"CEO","external_id":null,"background":"Wowing
|
52
|
+
customer","language":null,"locked_until":null,"created_at":"2012-06-06T14:51:30Z","updated_at":"2014-04-08T19:07:13Z","custom_fields":{"my_custom_field":null,"my_number_field":"0","my_boolean_field":false,"my_date_field":null,"my_list_field":"Option
|
53
|
+
1","magento_id":null},"emails":[{"type":"work","value":"support@desk.com"}],"phone_numbers":[{"type":"home","value":"(415)
|
54
|
+
555-1234"},{"type":"home","value":"(415) 555-1234"},{"type":"home","value":"(415)
|
55
|
+
555-1234"},{"type":"home","value":"(415) 555-1234"},{"type":"home","value":"(415)
|
56
|
+
555-1234"},{"type":"home","value":"(415) 555-1234"}],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/34290812","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138963","class":"company"},"facebook_user":null,"twitter_user":{"href":"/api/v2/twitter_users/2887203","class":"twitter_user"},"cases":{"href":"/api/v2/customers/34290812/cases","class":"case","count":147}}},{"id":34292086,"first_name":"Stella","last_name":"Pavlova","company":"Morpon
|
57
|
+
Brothers","title":"SVP Production","external_id":null,"background":"","language":null,"locked_until":null,"created_at":"2012-06-06T15:01:44Z","updated_at":"2012-12-07T23:56:00Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/34292086","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138965","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/34292086/cases","class":"case","count":0}}},{"id":34406867,"first_name":"Mike","last_name":"Malmin","company":"Mike
|
58
|
+
Malmin","title":"","external_id":null,"background":"","language":null,"locked_until":null,"created_at":"2012-06-07T13:50:04Z","updated_at":"2012-12-07T23:56:00Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/34406867","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138578","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/34406867/cases","class":"case","count":0}}},{"id":34408491,"first_name":"Janice","last_name":"Bergman","company":"Data
|
59
|
+
Mart","title":"VP Purchasing","external_id":null,"background":"","language":null,"locked_until":null,"created_at":"2012-06-07T14:07:13Z","updated_at":"2012-12-07T23:56:00Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/34408491","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138446","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/34408491/cases","class":"case","count":0}}},{"id":36328589,"first_name":"Bob","last_name":"Hodges","company":"United
|
60
|
+
Partners*","title":"President and CEO","external_id":null,"background":"","language":null,"locked_until":null,"created_at":"2012-06-22T21:56:31Z","updated_at":"2012-12-07T23:56:01Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/36328589","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/113131","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/36328589/cases","class":"case","count":0}}},{"id":36652658,"first_name":"Ron","last_name":"Adkins","company":"Valley
|
61
|
+
Supply Inc.","title":"President Sales Exec Finance Exec","external_id":null,"background":"","language":null,"locked_until":null,"created_at":"2012-06-25T21:12:05Z","updated_at":"2012-12-07T23:56:01Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/36652658","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/114536","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/36652658/cases","class":"case","count":0}}},{"id":37823480,"first_name":"Thomas","last_name":"Stachl","company":"stachl.me","title":"Master
|
62
|
+
of Script Artistry","external_id":null,"background":"Some Background information.","language":null,"locked_until":null,"created_at":"2012-07-04T14:33:39Z","updated_at":"2014-03-16T10:00:24Z","custom_fields":{"my_custom_field":null,"my_number_field":"0","my_boolean_field":false,"my_date_field":null,"my_list_field":"Option
|
63
|
+
1","magento_id":null},"emails":[{"type":"home","value":"thomas@stachl.me"},{"type":"home","value":"tstachl@salesforce.com"}],"phone_numbers":[{"type":"mobile","value":"4156060761"}],"addresses":[{"type":"home","value":"600
|
64
|
+
William Street #526\r\nOakland, CA 94612"}],"_links":{"self":{"href":"/api/v2/customers/37823480","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/373760","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/37823480/cases","class":"case","count":34}}},{"id":58278628,"first_name":"Lauren","last_name":"Boyle*","company":"mailinator.com","title":"","external_id":"0033000001JLAZrAAP","background":"","language":null,"locked_until":null,"created_at":"2012-12-07T23:36:46Z","updated_at":"2013-04-13T03:47:03Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"work","value":"lauren.boyle@mailinator.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/58278628","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/2278303","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/58278628/cases","class":"case","count":0}}},{"id":71433005,"first_name":"Sandy","last_name":"Knudson","company":"mailinator.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-02-28T19:28:28Z","updated_at":"2013-02-28T19:45:43Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"work","value":"sandyknudson@mailinator.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/71433005","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/2278303","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/71433005/cases","class":"case","count":0}}},{"id":71579966,"first_name":"Brad","last_name":"Anastasio","company":"fakeemail.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-01T13:51:56Z","updated_at":"2013-03-01T13:51:56Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"work","value":"brad.anastasio@fakeemail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/71579966","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4036540","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/71579966/cases","class":"case","count":0}}},{"id":75923712,"first_name":"Leena","last_name":"Cianflone","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-22T23:49:45Z","updated_at":"2013-03-22T23:49:45Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"leenacianflone@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/75923712","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/75923712/cases","class":"case","count":0}}},{"id":75923713,"first_name":"Quinton","last_name":"Swanda","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-22T23:49:45Z","updated_at":"2013-03-22T23:49:45Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"quintonswanda@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/75923713","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/75923713/cases","class":"case","count":0}}},{"id":75923714,"first_name":"Jennifer","last_name":"Hansen","company":"zendesk.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-22T23:49:46Z","updated_at":"2013-03-22T23:49:46Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"jennifer@zendesk.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/75923714","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4451253","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/75923714/cases","class":"case","count":0}}},{"id":75923715,"first_name":"Hue","last_name":"Gottesman","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-22T23:49:46Z","updated_at":"2013-03-22T23:49:46Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"huegottesman@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/75923715","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/75923715/cases","class":"case","count":0}}},{"id":75923716,"first_name":"Hal","last_name":"Raxter","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-22T23:49:47Z","updated_at":"2013-03-22T23:49:47Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"raxterhal@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/75923716","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/75923716/cases","class":"case","count":0}}},{"id":75923717,"first_name":"Colmo","last_name":"","company":"zendesk.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-22T23:49:47Z","updated_at":"2013-03-22T23:49:47Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"colmo@zendesk.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/75923717","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4451253","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/75923717/cases","class":"case","count":0}}},{"id":75923718,"first_name":"Brice","last_name":"Baggenstoss","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-22T23:49:47Z","updated_at":"2013-03-22T23:49:47Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"bricebaggenstoss@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/75923718","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/75923718/cases","class":"case","count":1}}},{"id":75923719,"first_name":"Support","last_name":"","company":"zendesk.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-22T23:49:47Z","updated_at":"2013-03-22T23:49:47Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"support@zendesk.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/75923719","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4451253","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/75923719/cases","class":"case","count":0}}},{"id":75923720,"first_name":"Noreply","last_name":"","company":"postmaster.twitter.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-22T23:49:48Z","updated_at":"2013-03-22T23:49:48Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"noreply@postmaster.twitter.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/75923720","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4451254","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/75923720/cases","class":"case","count":0}}},{"id":75923721,"first_name":"Hal","last_name":"Schellhase","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-22T23:49:48Z","updated_at":"2013-03-22T23:49:48Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"halschellhase@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/75923721","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/75923721/cases","class":"case","count":0}}},{"id":76863359,"first_name":"Test","last_name":"Tester","company":"example.com","title":"CEO","external_id":null,"background":"","language":"en","locked_until":null,"created_at":"2013-03-27T17:35:51Z","updated_at":"2013-03-27T18:04:48Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"work","value":"tester@example.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/76863359","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4543697","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/76863359/cases","class":"case","count":0}}},{"id":77160792,"first_name":"barr_tim","last_name":"","company":"grandhotels.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-03-29T00:04:09Z","updated_at":"2013-04-15T23:59:05Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"barr_tim@grandhotels.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/77160792","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4574466","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/77160792/cases","class":"case","count":0}}},{"id":78914102,"first_name":"John","last_name":"","company":"example.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-06T22:12:56Z","updated_at":"2013-04-15T16:42:57Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"john@example.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/78914102","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4543697","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/78914102/cases","class":"case","count":0}}},{"id":79246639,"first_name":"Stachl","last_name":"Testing
|
65
|
+
Page","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-08T20:06:40Z","updated_at":"2013-04-08T20:06:40Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/79246639","class":"customer"},"locked_by":null,"facebook_user":{"href":"/api/v2/facebook_users/1885425","class":"facebook_user"},"twitter_user":null,"cases":{"href":"/api/v2/customers/79246639/cases","class":"case","count":0}}},{"id":79249149,"first_name":"Thomas","last_name":"Stachl","company":null,"title":null,"external_id":null,"background":null,"language":"en_us","locked_until":null,"created_at":"2013-04-08T20:18:56Z","updated_at":"2014-03-16T09:21:39Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/79249149","class":"customer"},"locked_by":null,"facebook_user":{"href":"/api/v2/facebook_users/1885471","class":"facebook_user"},"twitter_user":null,"cases":{"href":"/api/v2/customers/79249149/cases","class":"case","count":0}}},{"id":79858779,"first_name":"Andrew","last_name":"Frauen","company":null,"title":null,"external_id":null,"background":null,"language":"en","locked_until":null,"created_at":"2013-04-11T17:39:26Z","updated_at":"2013-04-11T17:39:26Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"frauen.a@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/79858779","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/79858779/cases","class":"case","count":0}}},{"id":80192856,"first_name":null,"last_name":null,"company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-12T23:46:33Z","updated_at":"2013-04-12T23:46:33Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/80192856","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/80192856/cases","class":"case","count":0}}},{"id":80193061,"first_name":null,"last_name":null,"company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-12T23:48:05Z","updated_at":"2013-04-12T23:48:05Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/80193061","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/80193061/cases","class":"case","count":0}}},{"id":80212952,"first_name":null,"last_name":null,"company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-13T02:37:48Z","updated_at":"2013-04-13T02:37:48Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/80212952","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/80212952/cases","class":"case","count":0}}},{"id":80213083,"first_name":null,"last_name":null,"company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-13T02:39:12Z","updated_at":"2013-04-13T02:39:12Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/80213083","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/80213083/cases","class":"case","count":0}}},{"id":80213160,"first_name":null,"last_name":null,"company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-13T02:40:10Z","updated_at":"2013-04-13T02:40:10Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/80213160","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/80213160/cases","class":"case","count":0}}},{"id":80213349,"first_name":null,"last_name":null,"company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-13T02:41:53Z","updated_at":"2013-04-13T02:41:53Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/80213349","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/80213349/cases","class":"case","count":0}}},{"id":80213634,"first_name":null,"last_name":null,"company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-13T02:43:59Z","updated_at":"2013-04-13T02:43:59Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/80213634","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/80213634/cases","class":"case","count":0}}},{"id":80213888,"first_name":null,"last_name":null,"company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-13T02:45:57Z","updated_at":"2013-04-13T02:45:57Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/80213888","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/80213888/cases","class":"case","count":0}}},{"id":80214018,"first_name":null,"last_name":null,"company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-13T02:46:52Z","updated_at":"2013-04-13T02:46:52Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/80214018","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/80214018/cases","class":"case","count":0}}},{"id":80640812,"first_name":"John","last_name":"Smith","company":"Glorious
|
66
|
+
D","title":"Senior Vice President of Awesome","external_id":null,"background":"Some
|
67
|
+
description.","language":null,"locked_until":null,"created_at":"2013-04-15T16:58:30Z","updated_at":"2013-04-15T16:58:31Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"john@gd.com"}],"phone_numbers":[{"type":"home","value":"4155551235"}],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/80640812","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4912151","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/80640812/cases","class":"case","count":0}}},{"id":82113673,"first_name":"Larita","last_name":"Villas","company":null,"title":null,"external_id":null,"background":"","language":null,"locked_until":null,"created_at":"2013-04-22T22:37:00Z","updated_at":"2013-04-22T22:37:00Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"laritavillas@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113673","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113673/cases","class":"case","count":0}}},{"id":82113675,"first_name":"Nolan","last_name":"Gett","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:37:01Z","updated_at":"2013-04-22T22:37:01Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"nolangett@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113675","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113675/cases","class":"case","count":0}}},{"id":82113682,"first_name":"Moises","last_name":"Sabio","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:37:02Z","updated_at":"2013-04-22T22:37:02Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"sabiomoises@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113682","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113682/cases","class":"case","count":0}}},{"id":82113684,"first_name":"Twitter","last_name":"","company":"postmaster.twitter.com","title":null,"external_id":null,"background":"","language":null,"locked_until":null,"created_at":"2013-04-22T22:37:02Z","updated_at":"2013-04-22T22:37:02Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"n-tybonyfhespb=tznvy.pbz-9b29b@postmaster.twitter.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113684","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4451254","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113684/cases","class":"case","count":0}}},{"id":82113685,"first_name":"Zendesk","last_name":"","company":"zendesk.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:37:03Z","updated_at":"2013-04-22T22:37:03Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"noreply@zendesk.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113685","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/4451253","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113685/cases","class":"case","count":0}}},{"id":82113689,"first_name":"Richie","last_name":"Kalter","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:37:03Z","updated_at":"2013-04-22T22:37:03Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"richiekalter11@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113689","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113689/cases","class":"case","count":0}}},{"id":82113693,"first_name":"The","last_name":"Desk.com
|
68
|
+
Team","company":"Desk.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:37:04Z","updated_at":"2013-04-22T22:37:04Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"welcome@desk.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113693","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138963","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113693/cases","class":"case","count":0}}},{"id":82113694,"first_name":"Rupert","last_name":"Warstler","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:37:04Z","updated_at":"2013-04-22T22:37:04Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"rupertwarstler@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113694","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113694/cases","class":"case","count":0}}},{"id":82113926,"first_name":"Suzy","last_name":"Galicinao","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:38:00Z","updated_at":"2013-04-22T22:38:00Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"suzygalicinao@gmail.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113926","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113926/cases","class":"case","count":0}}},{"id":82113930,"first_name":"ashley","last_name":"lawrence","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:38:01Z","updated_at":"2013-04-22T22:38:01Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113930","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113930/cases","class":"case","count":0}}},{"id":82113931,"first_name":"Keshia","last_name":"Hohenstein","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:38:01Z","updated_at":"2013-04-22T22:38:01Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113931","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113931/cases","class":"case","count":0}}},{"id":82113933,"first_name":"Alex","last_name":"Hisaka","company":"Desk.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:38:01Z","updated_at":"2013-04-22T22:38:02Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"alex.hisaka@desk.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113933","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138963","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113933/cases","class":"case","count":0}}},{"id":82113936,"first_name":"seethaji","last_name":"","company":null,"title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:38:02Z","updated_at":"2013-04-22T22:38:02Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"seethaji@yahoo.com"}],"phone_numbers":[],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/82113936","class":"customer"},"locked_by":null,"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113936/cases","class":"case","count":0}}},{"id":82113939,"first_name":"Sukhjit","last_name":"","company":"Desk.com","title":null,"external_id":null,"background":null,"language":null,"locked_until":null,"created_at":"2013-04-22T22:38:02Z","updated_at":"2014-01-16T16:53:17Z","custom_fields":{"my_custom_field":null,"my_number_field":null,"my_boolean_field":null,"my_date_field":null,"my_list_field":null,"magento_id":null},"emails":[{"type":"home","value":"sukhjit@desk.com"}],"phone_numbers":[],"addresses":[{"type":"home","value":"Some
|
69
|
+
Address"}],"_links":{"self":{"href":"/api/v2/customers/82113939","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138963","class":"company"},"facebook_user":null,"twitter_user":null,"cases":{"href":"/api/v2/customers/82113939/cases","class":"case","count":2}}}]}}'
|
70
|
+
http_version:
|
71
|
+
recorded_at: Tue, 08 Apr 2014 19:08:33 GMT
|
72
|
+
- request:
|
73
|
+
method: patch
|
74
|
+
uri: https://devel.desk.com/api/v2/customers/34290812
|
75
|
+
body:
|
76
|
+
encoding: UTF-8
|
77
|
+
string: '{"phone_numbers_update_action":"append","phone_numbers":[{"type":"home","value":"(415)
|
78
|
+
555-1234"},{"type":"home","value":"(415) 555-1234"},{"type":"home","value":"(415)
|
79
|
+
555-1234"}]}'
|
80
|
+
headers:
|
81
|
+
Accept:
|
82
|
+
- application/json
|
83
|
+
User-Agent:
|
84
|
+
- desk.com Ruby Gem v0.5.7
|
85
|
+
Content-Type:
|
86
|
+
- application/json
|
87
|
+
response:
|
88
|
+
status:
|
89
|
+
code: 200
|
90
|
+
message:
|
91
|
+
headers:
|
92
|
+
cache-control:
|
93
|
+
- max-age=0, private, must-revalidate
|
94
|
+
content-type:
|
95
|
+
- application/json; charset=utf-8
|
96
|
+
date:
|
97
|
+
- Tue, 08 Apr 2014 19:08:34 GMT
|
98
|
+
etag:
|
99
|
+
- '"de8a1963d32081771e53ccab644ecc96"'
|
100
|
+
server:
|
101
|
+
- nginx
|
102
|
+
status:
|
103
|
+
- 200 OK
|
104
|
+
vary:
|
105
|
+
- X-AppVersion
|
106
|
+
x-appversion:
|
107
|
+
- '15.99'
|
108
|
+
x-frame-options:
|
109
|
+
- SAMEORIGIN
|
110
|
+
x-rack-cache:
|
111
|
+
- invalidate, pass
|
112
|
+
x-rate-limit-limit:
|
113
|
+
- '120'
|
114
|
+
x-rate-limit-remaining:
|
115
|
+
- '118'
|
116
|
+
x-rate-limit-reset:
|
117
|
+
- '26'
|
118
|
+
x-request-id:
|
119
|
+
- ea0b53f6b7cf94584c15867279c14b14
|
120
|
+
x-runtime:
|
121
|
+
- '1.196427'
|
122
|
+
x-ua-compatible:
|
123
|
+
- IE=Edge,chrome=1
|
124
|
+
content-length:
|
125
|
+
- '1192'
|
126
|
+
connection:
|
127
|
+
- Close
|
128
|
+
body:
|
129
|
+
encoding: UTF-8
|
130
|
+
string: '{"id":34290812,"first_name":"Alex","last_name":"Bard","company":"Desk.com","title":"CEO","external_id":null,"background":"Wowing
|
131
|
+
customer","language":null,"locked_until":null,"created_at":"2012-06-06T14:51:30Z","updated_at":"2014-04-08T19:08:33Z","custom_fields":{"my_custom_field":null,"my_number_field":"0","my_boolean_field":false,"my_date_field":null,"my_list_field":"Option
|
132
|
+
1","magento_id":null},"emails":[{"type":"work","value":"support@desk.com"}],"phone_numbers":[{"type":"home","value":"(415)
|
133
|
+
555-1234"},{"type":"home","value":"(415) 555-1234"},{"type":"home","value":"(415)
|
134
|
+
555-1234"},{"type":"home","value":"(415) 555-1234"},{"type":"home","value":"(415)
|
135
|
+
555-1234"},{"type":"home","value":"(415) 555-1234"},{"type":"home","value":"(415)
|
136
|
+
555-1234"},{"type":"home","value":"(415) 555-1234"},{"type":"home","value":"(415)
|
137
|
+
555-1234"}],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/34290812","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138963","class":"company"},"facebook_user":null,"twitter_user":{"href":"/api/v2/twitter_users/2887203","class":"twitter_user"},"cases":{"href":"/api/v2/customers/34290812/cases","class":"case","count":147}}}'
|
138
|
+
http_version:
|
139
|
+
recorded_at: Tue, 08 Apr 2014 19:08:34 GMT
|
140
|
+
- request:
|
141
|
+
method: get
|
142
|
+
uri: https://devel.desk.com/api/v2/customers/34290812
|
143
|
+
body:
|
144
|
+
encoding: US-ASCII
|
145
|
+
string: ''
|
146
|
+
headers:
|
147
|
+
Accept:
|
148
|
+
- application/json
|
149
|
+
User-Agent:
|
150
|
+
- desk.com Ruby Gem v0.5.7
|
151
|
+
response:
|
152
|
+
status:
|
153
|
+
code: 200
|
154
|
+
message:
|
155
|
+
headers:
|
156
|
+
accept-ranges:
|
157
|
+
- bytes
|
158
|
+
cache-control:
|
159
|
+
- must-revalidate, private, max-age=0
|
160
|
+
content-type:
|
161
|
+
- application/json; charset=utf-8
|
162
|
+
date:
|
163
|
+
- Tue, 08 Apr 2014 19:08:34 GMT
|
164
|
+
etag:
|
165
|
+
- '"de8a1963d32081771e53ccab644ecc96"'
|
166
|
+
status:
|
167
|
+
- 200 OK
|
168
|
+
vary:
|
169
|
+
- X-AppVersion
|
170
|
+
x-appversion:
|
171
|
+
- '15.99'
|
172
|
+
x-frame-options:
|
173
|
+
- SAMEORIGIN
|
174
|
+
x-rate-limit-limit:
|
175
|
+
- '120'
|
176
|
+
x-rate-limit-remaining:
|
177
|
+
- '117'
|
178
|
+
x-rate-limit-reset:
|
179
|
+
- '26'
|
180
|
+
x-request-id:
|
181
|
+
- 36b79a45c91862c1e0af2f5f2ac3175d
|
182
|
+
content-length:
|
183
|
+
- '1192'
|
184
|
+
connection:
|
185
|
+
- Close
|
186
|
+
body:
|
187
|
+
encoding: UTF-8
|
188
|
+
string: '{"id":34290812,"first_name":"Alex","last_name":"Bard","company":"Desk.com","title":"CEO","external_id":null,"background":"Wowing
|
189
|
+
customer","language":null,"locked_until":null,"created_at":"2012-06-06T14:51:30Z","updated_at":"2014-04-08T19:08:33Z","custom_fields":{"my_custom_field":null,"my_number_field":"0","my_boolean_field":false,"my_date_field":null,"my_list_field":"Option
|
190
|
+
1","magento_id":null},"emails":[{"type":"work","value":"support@desk.com"}],"phone_numbers":[{"type":"home","value":"(415)
|
191
|
+
555-1234"},{"type":"home","value":"(415) 555-1234"},{"type":"home","value":"(415)
|
192
|
+
555-1234"},{"type":"home","value":"(415) 555-1234"},{"type":"home","value":"(415)
|
193
|
+
555-1234"},{"type":"home","value":"(415) 555-1234"},{"type":"home","value":"(415)
|
194
|
+
555-1234"},{"type":"home","value":"(415) 555-1234"},{"type":"home","value":"(415)
|
195
|
+
555-1234"}],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/34290812","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138963","class":"company"},"facebook_user":null,"twitter_user":{"href":"/api/v2/twitter_users/2887203","class":"twitter_user"},"cases":{"href":"/api/v2/customers/34290812/cases","class":"case","count":147}}}'
|
196
|
+
http_version:
|
197
|
+
recorded_at: Tue, 08 Apr 2014 19:08:34 GMT
|
198
|
+
- request:
|
199
|
+
method: patch
|
200
|
+
uri: https://devel.desk.com/api/v2/customers/34290812
|
201
|
+
body:
|
202
|
+
encoding: UTF-8
|
203
|
+
string: '{"phone_numbers_update_action":"replace","phone_numbers":[{"type":"other","value":"(415)
|
204
|
+
555-4321"}]}'
|
205
|
+
headers:
|
206
|
+
Accept:
|
207
|
+
- application/json
|
208
|
+
User-Agent:
|
209
|
+
- desk.com Ruby Gem v0.5.7
|
210
|
+
Content-Type:
|
211
|
+
- application/json
|
212
|
+
response:
|
213
|
+
status:
|
214
|
+
code: 200
|
215
|
+
message:
|
216
|
+
headers:
|
217
|
+
cache-control:
|
218
|
+
- max-age=0, private, must-revalidate
|
219
|
+
content-type:
|
220
|
+
- application/json; charset=utf-8
|
221
|
+
date:
|
222
|
+
- Tue, 08 Apr 2014 19:08:39 GMT
|
223
|
+
etag:
|
224
|
+
- '"a7b4f3dbfab52918b6e30979f2d9c1de"'
|
225
|
+
server:
|
226
|
+
- nginx
|
227
|
+
status:
|
228
|
+
- 200 OK
|
229
|
+
vary:
|
230
|
+
- X-AppVersion
|
231
|
+
x-appversion:
|
232
|
+
- '15.99'
|
233
|
+
x-frame-options:
|
234
|
+
- SAMEORIGIN
|
235
|
+
x-rack-cache:
|
236
|
+
- invalidate, pass
|
237
|
+
x-rate-limit-limit:
|
238
|
+
- '120'
|
239
|
+
x-rate-limit-remaining:
|
240
|
+
- '116'
|
241
|
+
x-rate-limit-reset:
|
242
|
+
- '21'
|
243
|
+
x-request-id:
|
244
|
+
- a6837b264381dccdbec3e731be02522c
|
245
|
+
x-runtime:
|
246
|
+
- '4.011402'
|
247
|
+
x-ua-compatible:
|
248
|
+
- IE=Edge,chrome=1
|
249
|
+
content-length:
|
250
|
+
- '865'
|
251
|
+
connection:
|
252
|
+
- Close
|
253
|
+
body:
|
254
|
+
encoding: UTF-8
|
255
|
+
string: '{"id":34290812,"first_name":"Alex","last_name":"Bard","company":"Desk.com","title":"CEO","external_id":null,"background":"Wowing
|
256
|
+
customer","language":null,"locked_until":null,"created_at":"2012-06-06T14:51:30Z","updated_at":"2014-04-08T19:08:35Z","custom_fields":{"my_custom_field":null,"my_number_field":"0","my_boolean_field":false,"my_date_field":null,"my_list_field":"Option
|
257
|
+
1","magento_id":null},"emails":[{"type":"work","value":"support@desk.com"}],"phone_numbers":[{"type":"other","value":"(415)
|
258
|
+
555-4321"}],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/34290812","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138963","class":"company"},"facebook_user":null,"twitter_user":{"href":"/api/v2/twitter_users/2887203","class":"twitter_user"},"cases":{"href":"/api/v2/customers/34290812/cases","class":"case","count":147}}}'
|
259
|
+
http_version:
|
260
|
+
recorded_at: Tue, 08 Apr 2014 19:08:39 GMT
|
261
|
+
- request:
|
262
|
+
method: get
|
263
|
+
uri: https://devel.desk.com/api/v2/customers/34290812
|
264
|
+
body:
|
265
|
+
encoding: US-ASCII
|
266
|
+
string: ''
|
267
|
+
headers:
|
268
|
+
Accept:
|
269
|
+
- application/json
|
270
|
+
User-Agent:
|
271
|
+
- desk.com Ruby Gem v0.5.7
|
272
|
+
response:
|
273
|
+
status:
|
274
|
+
code: 200
|
275
|
+
message:
|
276
|
+
headers:
|
277
|
+
accept-ranges:
|
278
|
+
- bytes
|
279
|
+
cache-control:
|
280
|
+
- must-revalidate, private, max-age=0
|
281
|
+
content-type:
|
282
|
+
- application/json; charset=utf-8
|
283
|
+
date:
|
284
|
+
- Tue, 08 Apr 2014 19:08:39 GMT
|
285
|
+
etag:
|
286
|
+
- '"a7b4f3dbfab52918b6e30979f2d9c1de"'
|
287
|
+
status:
|
288
|
+
- 200 OK
|
289
|
+
vary:
|
290
|
+
- X-AppVersion
|
291
|
+
x-appversion:
|
292
|
+
- '15.99'
|
293
|
+
x-frame-options:
|
294
|
+
- SAMEORIGIN
|
295
|
+
x-rate-limit-limit:
|
296
|
+
- '120'
|
297
|
+
x-rate-limit-remaining:
|
298
|
+
- '115'
|
299
|
+
x-rate-limit-reset:
|
300
|
+
- '21'
|
301
|
+
x-request-id:
|
302
|
+
- 271d6c5a37e5fb0e97a36d39df78ba4f
|
303
|
+
content-length:
|
304
|
+
- '865'
|
305
|
+
connection:
|
306
|
+
- Close
|
307
|
+
body:
|
308
|
+
encoding: UTF-8
|
309
|
+
string: '{"id":34290812,"first_name":"Alex","last_name":"Bard","company":"Desk.com","title":"CEO","external_id":null,"background":"Wowing
|
310
|
+
customer","language":null,"locked_until":null,"created_at":"2012-06-06T14:51:30Z","updated_at":"2014-04-08T19:08:35Z","custom_fields":{"my_custom_field":null,"my_number_field":"0","my_boolean_field":false,"my_date_field":null,"my_list_field":"Option
|
311
|
+
1","magento_id":null},"emails":[{"type":"work","value":"support@desk.com"}],"phone_numbers":[{"type":"other","value":"(415)
|
312
|
+
555-4321"}],"addresses":[],"_links":{"self":{"href":"/api/v2/customers/34290812","class":"customer"},"locked_by":null,"company":{"href":"/api/v2/companies/138963","class":"company"},"facebook_user":null,"twitter_user":{"href":"/api/v2/twitter_users/2887203","class":"twitter_user"},"cases":{"href":"/api/v2/customers/34290812/cases","class":"case","count":147}}}'
|
313
|
+
http_version:
|
314
|
+
recorded_at: Tue, 08 Apr 2014 19:08:39 GMT
|
315
|
+
recorded_with: VCR 2.8.0
|
@@ -170,6 +170,45 @@ describe DeskApi::Resource do
|
|
170
170
|
topic.update
|
171
171
|
subject.topics.entries.first.description.should eq('Another description update.')
|
172
172
|
end
|
173
|
+
|
174
|
+
it 'can handle update action params', :vcr do
|
175
|
+
customer = subject.customers.entries.first
|
176
|
+
num_count = customer.phone_numbers.count
|
177
|
+
phone = { type: 'home', value: '(415) 555-1234' }
|
178
|
+
|
179
|
+
customer.update({
|
180
|
+
phone_numbers: [phone],
|
181
|
+
phone_numbers_update_action: 'append'
|
182
|
+
})
|
183
|
+
|
184
|
+
customer.reload!.phone_numbers.size.should eq(num_count + 1)
|
185
|
+
|
186
|
+
customer.update({
|
187
|
+
phone_numbers: [phone],
|
188
|
+
phone_numbers_update_action: 'append'
|
189
|
+
})
|
190
|
+
|
191
|
+
customer.reload!.phone_numbers.size.should eq(num_count + 2)
|
192
|
+
end
|
193
|
+
|
194
|
+
it 'can replace instead of append', :vcr do
|
195
|
+
customer = subject.customers.entries.first
|
196
|
+
phone = { type: 'home', value: '(415) 555-1234' }
|
197
|
+
|
198
|
+
customer.update({
|
199
|
+
phone_numbers: [phone, phone, phone],
|
200
|
+
phone_numbers_update_action: 'append'
|
201
|
+
})
|
202
|
+
|
203
|
+
num_count = customer.reload!.phone_numbers.size
|
204
|
+
customer.update({
|
205
|
+
phone_numbers: [{ type: 'other', value: '(415) 555-4321' }],
|
206
|
+
phone_numbers_update_action: 'replace'
|
207
|
+
})
|
208
|
+
|
209
|
+
customer.reload!.phone_numbers.size.should eq(1)
|
210
|
+
num_count.should_not eq(customer.phone_numbers.size)
|
211
|
+
end
|
173
212
|
end
|
174
213
|
|
175
214
|
context '#delete' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: desk_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Stachl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday_middleware
|
@@ -201,6 +201,8 @@ files:
|
|
201
201
|
- spec/cassettes/DeskApi_Resource/_page/sets_the_resource_to_not_loaded.yml
|
202
202
|
- spec/cassettes/DeskApi_Resource/_search/allows_searching_on_search_enabled_resources.yml
|
203
203
|
- spec/cassettes/DeskApi_Resource/_search/throws_an_error_if_search_is_not_enabled.yml
|
204
|
+
- spec/cassettes/DeskApi_Resource/_update/can_handle_update_action_params.yml
|
205
|
+
- spec/cassettes/DeskApi_Resource/_update/can_replace_instead_of_append.yml
|
204
206
|
- spec/cassettes/DeskApi_Resource/_update/can_update_without_a_hash.yml
|
205
207
|
- spec/cassettes/DeskApi_Resource/_update/throws_an_error_updating_a_user.yml
|
206
208
|
- spec/cassettes/DeskApi_Resource/_update/updates_a_topic.yml
|
@@ -275,6 +277,8 @@ test_files:
|
|
275
277
|
- spec/cassettes/DeskApi_Resource/_page/sets_the_resource_to_not_loaded.yml
|
276
278
|
- spec/cassettes/DeskApi_Resource/_search/allows_searching_on_search_enabled_resources.yml
|
277
279
|
- spec/cassettes/DeskApi_Resource/_search/throws_an_error_if_search_is_not_enabled.yml
|
280
|
+
- spec/cassettes/DeskApi_Resource/_update/can_handle_update_action_params.yml
|
281
|
+
- spec/cassettes/DeskApi_Resource/_update/can_replace_instead_of_append.yml
|
278
282
|
- spec/cassettes/DeskApi_Resource/_update/can_update_without_a_hash.yml
|
279
283
|
- spec/cassettes/DeskApi_Resource/_update/throws_an_error_updating_a_user.yml
|
280
284
|
- spec/cassettes/DeskApi_Resource/_update/updates_a_topic.yml
|