restforce-db 1.2.7 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (19) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -6
  3. data/lib/restforce/db/association_cache.rb +49 -0
  4. data/lib/restforce/db/associations/base.rb +7 -5
  5. data/lib/restforce/db/associations/belongs_to.rb +6 -1
  6. data/lib/restforce/db/associations/has_many.rb +6 -1
  7. data/lib/restforce/db/associations/has_one.rb +6 -1
  8. data/lib/restforce/db/version.rb +1 -1
  9. data/lib/restforce/db.rb +1 -0
  10. data/test/cassettes/Restforce_DB_Associations_BelongsTo/with_an_inverse_mapping/_build/{when_the_associated_record_has_alrady_been_persisted → when_the_associated_record_has_already_been_persisted}/assigns_the_existing_record.yml +0 -0
  11. data/test/cassettes/Restforce_DB_Associations_BelongsTo/with_an_inverse_mapping/_build/when_the_associated_record_has_been_cached/uses_the_cached_record.yml +271 -0
  12. data/test/cassettes/Restforce_DB_Associations_HasMany/with_an_inverse_mapping/_build/when_the_associated_records_have_been_cached/uses_the_cached_records.yml +439 -0
  13. data/test/cassettes/Restforce_DB_Associations_HasOne/with_an_inverse_mapping/_build/when_the_associated_record_has_already_been_persisted/assigns_the_existing_record.yml +271 -0
  14. data/test/cassettes/Restforce_DB_Associations_HasOne/with_an_inverse_mapping/_build/when_the_associated_record_has_been_cached/uses_the_cached_record.yml +271 -0
  15. data/test/lib/restforce/db/association_cache_test.rb +63 -0
  16. data/test/lib/restforce/db/associations/belongs_to_test.rb +14 -2
  17. data/test/lib/restforce/db/associations/has_many_test.rb +17 -1
  18. data/test/lib/restforce/db/associations/has_one_test.rb +24 -0
  19. metadata +9 -3
@@ -0,0 +1,439 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://<host>/services/oauth2/token
6
+ body:
7
+ encoding: US-ASCII
8
+ string: grant_type=password&client_id=<client_id>&client_secret=<client_secret>&username=<username>&password=<password><security_token>
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.1
12
+ Content-Type:
13
+ - application/x-www-form-urlencoded
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Date:
24
+ - Fri, 01 May 2015 16:27:26 GMT
25
+ Set-Cookie:
26
+ - BrowserId=ib4ON7VzRoqYgNaKp0nkDQ;Path=/;Domain=.salesforce.com;Expires=Tue,
27
+ 30-Jun-2015 16:27:26 GMT
28
+ Expires:
29
+ - Thu, 01 Jan 1970 00:00:00 GMT
30
+ Pragma:
31
+ - no-cache
32
+ Cache-Control:
33
+ - no-cache, no-store
34
+ Content-Type:
35
+ - application/json;charset=UTF-8
36
+ Transfer-Encoding:
37
+ - chunked
38
+ body:
39
+ encoding: ASCII-8BIT
40
+ string: '{"id":"https://login.salesforce.com/id/00D1a000000H3O9EAK/0051a000000UGT8AAO","issued_at":"1430497646270","token_type":"Bearer","instance_url":"https://<host>","signature":"fJPCXmLPScmZ35fJC8zeUl/q4GP4NMEjirHl+vGtLcs=","access_token":"00D1a000000H3O9!AQ4AQDv3Hk9TRSKHVK.6TQHDjiXPpFDEH7AxoxdK.ytZcKr4gkBGokBh2ZhUcaf0_eFqhFa6YVCzmfP.bUKsz9xIJOy41iQD"}'
41
+ http_version:
42
+ recorded_at: Fri, 01 May 2015 16:27:26 GMT
43
+ - request:
44
+ method: post
45
+ uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c
46
+ body:
47
+ encoding: UTF-8
48
+ string: '{"Name":"Sample object"}'
49
+ headers:
50
+ User-Agent:
51
+ - Faraday v0.9.1
52
+ Content-Type:
53
+ - application/json
54
+ Authorization:
55
+ - OAuth 00D1a000000H3O9!AQ4AQDv3Hk9TRSKHVK.6TQHDjiXPpFDEH7AxoxdK.ytZcKr4gkBGokBh2ZhUcaf0_eFqhFa6YVCzmfP.bUKsz9xIJOy41iQD
56
+ Accept-Encoding:
57
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
58
+ Accept:
59
+ - "*/*"
60
+ response:
61
+ status:
62
+ code: 201
63
+ message: Created
64
+ headers:
65
+ Date:
66
+ - Fri, 01 May 2015 16:27:26 GMT
67
+ Set-Cookie:
68
+ - BrowserId=K6OcPnUIRReOx5pwcCgBYw;Path=/;Domain=.salesforce.com;Expires=Tue,
69
+ 30-Jun-2015 16:27:26 GMT
70
+ Expires:
71
+ - Thu, 01 Jan 1970 00:00:00 GMT
72
+ Sforce-Limit-Info:
73
+ - api-usage=1/15000
74
+ Location:
75
+ - "/services/data/v26.0/sobjects/CustomObject__c/a001a000001TuOxAAK"
76
+ Content-Type:
77
+ - application/json;charset=UTF-8
78
+ Transfer-Encoding:
79
+ - chunked
80
+ body:
81
+ encoding: ASCII-8BIT
82
+ string: '{"id":"a001a000001TuOxAAK","success":true,"errors":[]}'
83
+ http_version:
84
+ recorded_at: Fri, 01 May 2015 16:27:27 GMT
85
+ - request:
86
+ method: post
87
+ uri: https://<host>/services/data/v26.0/sobjects/CustomObjectDetail__c
88
+ body:
89
+ encoding: UTF-8
90
+ string: '{"Name":"First Detail","CustomObject__c":"a001a000001TuOxAAK"}'
91
+ headers:
92
+ User-Agent:
93
+ - Faraday v0.9.1
94
+ Content-Type:
95
+ - application/json
96
+ Authorization:
97
+ - OAuth 00D1a000000H3O9!AQ4AQDv3Hk9TRSKHVK.6TQHDjiXPpFDEH7AxoxdK.ytZcKr4gkBGokBh2ZhUcaf0_eFqhFa6YVCzmfP.bUKsz9xIJOy41iQD
98
+ Accept-Encoding:
99
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
100
+ Accept:
101
+ - "*/*"
102
+ response:
103
+ status:
104
+ code: 201
105
+ message: Created
106
+ headers:
107
+ Date:
108
+ - Fri, 01 May 2015 16:27:27 GMT
109
+ Set-Cookie:
110
+ - BrowserId=gpF3gRK9TV2R-D1SseMfTQ;Path=/;Domain=.salesforce.com;Expires=Tue,
111
+ 30-Jun-2015 16:27:27 GMT
112
+ Expires:
113
+ - Thu, 01 Jan 1970 00:00:00 GMT
114
+ Sforce-Limit-Info:
115
+ - api-usage=1/15000
116
+ Location:
117
+ - "/services/data/v26.0/sobjects/CustomObjectDetail__c/a011a000000ikfZAAQ"
118
+ Content-Type:
119
+ - application/json;charset=UTF-8
120
+ Transfer-Encoding:
121
+ - chunked
122
+ body:
123
+ encoding: ASCII-8BIT
124
+ string: '{"id":"a011a000000ikfZAAQ","success":true,"errors":[]}'
125
+ http_version:
126
+ recorded_at: Fri, 01 May 2015 16:27:27 GMT
127
+ - request:
128
+ method: post
129
+ uri: https://<host>/services/data/v26.0/sobjects/CustomObjectDetail__c
130
+ body:
131
+ encoding: UTF-8
132
+ string: '{"Name":"Second Detail","CustomObject__c":"a001a000001TuOxAAK"}'
133
+ headers:
134
+ User-Agent:
135
+ - Faraday v0.9.1
136
+ Content-Type:
137
+ - application/json
138
+ Authorization:
139
+ - OAuth 00D1a000000H3O9!AQ4AQDv3Hk9TRSKHVK.6TQHDjiXPpFDEH7AxoxdK.ytZcKr4gkBGokBh2ZhUcaf0_eFqhFa6YVCzmfP.bUKsz9xIJOy41iQD
140
+ Accept-Encoding:
141
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
142
+ Accept:
143
+ - "*/*"
144
+ response:
145
+ status:
146
+ code: 201
147
+ message: Created
148
+ headers:
149
+ Date:
150
+ - Fri, 01 May 2015 16:27:27 GMT
151
+ Set-Cookie:
152
+ - BrowserId=QMTsOUBZS_K8SISTgD5b2A;Path=/;Domain=.salesforce.com;Expires=Tue,
153
+ 30-Jun-2015 16:27:27 GMT
154
+ Expires:
155
+ - Thu, 01 Jan 1970 00:00:00 GMT
156
+ Sforce-Limit-Info:
157
+ - api-usage=1/15000
158
+ Location:
159
+ - "/services/data/v26.0/sobjects/CustomObjectDetail__c/a011a000000ikfeAAA"
160
+ Content-Type:
161
+ - application/json;charset=UTF-8
162
+ Transfer-Encoding:
163
+ - chunked
164
+ body:
165
+ encoding: ASCII-8BIT
166
+ string: '{"id":"a011a000000ikfeAAA","success":true,"errors":[]}'
167
+ http_version:
168
+ recorded_at: Fri, 01 May 2015 16:27:27 GMT
169
+ - request:
170
+ method: post
171
+ uri: https://<host>/services/data/v26.0/sobjects/CustomObjectDetail__c
172
+ body:
173
+ encoding: UTF-8
174
+ string: '{"Name":"Third Detail","CustomObject__c":"a001a000001TuOxAAK"}'
175
+ headers:
176
+ User-Agent:
177
+ - Faraday v0.9.1
178
+ Content-Type:
179
+ - application/json
180
+ Authorization:
181
+ - OAuth 00D1a000000H3O9!AQ4AQDv3Hk9TRSKHVK.6TQHDjiXPpFDEH7AxoxdK.ytZcKr4gkBGokBh2ZhUcaf0_eFqhFa6YVCzmfP.bUKsz9xIJOy41iQD
182
+ Accept-Encoding:
183
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
184
+ Accept:
185
+ - "*/*"
186
+ response:
187
+ status:
188
+ code: 201
189
+ message: Created
190
+ headers:
191
+ Date:
192
+ - Fri, 01 May 2015 16:27:27 GMT
193
+ Set-Cookie:
194
+ - BrowserId=ALmi5ZflT0OzU7ADg50byw;Path=/;Domain=.salesforce.com;Expires=Tue,
195
+ 30-Jun-2015 16:27:27 GMT
196
+ Expires:
197
+ - Thu, 01 Jan 1970 00:00:00 GMT
198
+ Sforce-Limit-Info:
199
+ - api-usage=1/15000
200
+ Location:
201
+ - "/services/data/v26.0/sobjects/CustomObjectDetail__c/a011a000000ikfjAAA"
202
+ Content-Type:
203
+ - application/json;charset=UTF-8
204
+ Transfer-Encoding:
205
+ - chunked
206
+ body:
207
+ encoding: ASCII-8BIT
208
+ string: '{"id":"a011a000000ikfjAAA","success":true,"errors":[]}'
209
+ http_version:
210
+ recorded_at: Fri, 01 May 2015 16:27:28 GMT
211
+ - request:
212
+ method: get
213
+ uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Name,%20Example_Field__c%20from%20CustomObject__c%20where%20Id%20=%20%27a001a000001TuOxAAK%27
214
+ body:
215
+ encoding: US-ASCII
216
+ string: ''
217
+ headers:
218
+ User-Agent:
219
+ - Faraday v0.9.1
220
+ Authorization:
221
+ - OAuth 00D1a000000H3O9!AQ4AQDv3Hk9TRSKHVK.6TQHDjiXPpFDEH7AxoxdK.ytZcKr4gkBGokBh2ZhUcaf0_eFqhFa6YVCzmfP.bUKsz9xIJOy41iQD
222
+ Accept-Encoding:
223
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
224
+ Accept:
225
+ - "*/*"
226
+ response:
227
+ status:
228
+ code: 200
229
+ message: OK
230
+ headers:
231
+ Date:
232
+ - Fri, 01 May 2015 16:27:27 GMT
233
+ Set-Cookie:
234
+ - BrowserId=jc3wCYrbQxapLeo0TDaP5g;Path=/;Domain=.salesforce.com;Expires=Tue,
235
+ 30-Jun-2015 16:27:27 GMT
236
+ Expires:
237
+ - Thu, 01 Jan 1970 00:00:00 GMT
238
+ Sforce-Limit-Info:
239
+ - api-usage=1/15000
240
+ Content-Type:
241
+ - application/json;charset=UTF-8
242
+ Transfer-Encoding:
243
+ - chunked
244
+ body:
245
+ encoding: ASCII-8BIT
246
+ string: '{"totalSize":1,"done":true,"records":[{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/a001a000001TuOxAAK"},"Id":"a001a000001TuOxAAK","SystemModstamp":"2015-05-01T16:27:26.000+0000","Name":"Sample
247
+ object","Example_Field__c":null}]}'
248
+ http_version:
249
+ recorded_at: Fri, 01 May 2015 16:27:28 GMT
250
+ - request:
251
+ method: get
252
+ uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Name,%20CustomObject__c%20from%20CustomObjectDetail__c%20where%20CustomObject__c%20=%20%27a001a000001TuOxAAK%27
253
+ body:
254
+ encoding: US-ASCII
255
+ string: ''
256
+ headers:
257
+ User-Agent:
258
+ - Faraday v0.9.1
259
+ Authorization:
260
+ - OAuth 00D1a000000H3O9!AQ4AQDv3Hk9TRSKHVK.6TQHDjiXPpFDEH7AxoxdK.ytZcKr4gkBGokBh2ZhUcaf0_eFqhFa6YVCzmfP.bUKsz9xIJOy41iQD
261
+ Accept-Encoding:
262
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
263
+ Accept:
264
+ - "*/*"
265
+ response:
266
+ status:
267
+ code: 200
268
+ message: OK
269
+ headers:
270
+ Date:
271
+ - Fri, 01 May 2015 16:27:28 GMT
272
+ Set-Cookie:
273
+ - BrowserId=2fxroKOLSO-Iaj7oU9I5-g;Path=/;Domain=.salesforce.com;Expires=Tue,
274
+ 30-Jun-2015 16:27:28 GMT
275
+ Expires:
276
+ - Thu, 01 Jan 1970 00:00:00 GMT
277
+ Sforce-Limit-Info:
278
+ - api-usage=1/15000
279
+ Content-Type:
280
+ - application/json;charset=UTF-8
281
+ Transfer-Encoding:
282
+ - chunked
283
+ body:
284
+ encoding: ASCII-8BIT
285
+ string: '{"totalSize":3,"done":true,"records":[{"attributes":{"type":"CustomObjectDetail__c","url":"/services/data/v26.0/sobjects/CustomObjectDetail__c/a011a000000ikfjAAA"},"Id":"a011a000000ikfjAAA","SystemModstamp":"2015-05-01T16:27:27.000+0000","Name":"Third
286
+ Detail","CustomObject__c":"a001a000001TuOxAAK"},{"attributes":{"type":"CustomObjectDetail__c","url":"/services/data/v26.0/sobjects/CustomObjectDetail__c/a011a000000ikfZAAQ"},"Id":"a011a000000ikfZAAQ","SystemModstamp":"2015-05-01T16:27:27.000+0000","Name":"First
287
+ Detail","CustomObject__c":"a001a000001TuOxAAK"},{"attributes":{"type":"CustomObjectDetail__c","url":"/services/data/v26.0/sobjects/CustomObjectDetail__c/a011a000000ikfeAAA"},"Id":"a011a000000ikfeAAA","SystemModstamp":"2015-05-01T16:27:27.000+0000","Name":"Second
288
+ Detail","CustomObject__c":"a001a000001TuOxAAK"}]}'
289
+ http_version:
290
+ recorded_at: Fri, 01 May 2015 16:27:28 GMT
291
+ - request:
292
+ method: delete
293
+ uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001TuOxAAK
294
+ body:
295
+ encoding: US-ASCII
296
+ string: ''
297
+ headers:
298
+ User-Agent:
299
+ - Faraday v0.9.1
300
+ Authorization:
301
+ - OAuth 00D1a000000H3O9!AQ4AQDv3Hk9TRSKHVK.6TQHDjiXPpFDEH7AxoxdK.ytZcKr4gkBGokBh2ZhUcaf0_eFqhFa6YVCzmfP.bUKsz9xIJOy41iQD
302
+ Accept-Encoding:
303
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
304
+ Accept:
305
+ - "*/*"
306
+ response:
307
+ status:
308
+ code: 204
309
+ message: No Content
310
+ headers:
311
+ Date:
312
+ - Fri, 01 May 2015 16:27:28 GMT
313
+ Set-Cookie:
314
+ - BrowserId=dKopFlNeTMCogPnX1C0JYg;Path=/;Domain=.salesforce.com;Expires=Tue,
315
+ 30-Jun-2015 16:27:28 GMT
316
+ Expires:
317
+ - Thu, 01 Jan 1970 00:00:00 GMT
318
+ Sforce-Limit-Info:
319
+ - api-usage=1/15000
320
+ body:
321
+ encoding: UTF-8
322
+ string: ''
323
+ http_version:
324
+ recorded_at: Fri, 01 May 2015 16:27:29 GMT
325
+ - request:
326
+ method: delete
327
+ uri: https://<host>/services/data/v26.0/sobjects/CustomObjectDetail__c/a011a000000ikfZAAQ
328
+ body:
329
+ encoding: US-ASCII
330
+ string: ''
331
+ headers:
332
+ User-Agent:
333
+ - Faraday v0.9.1
334
+ Authorization:
335
+ - OAuth 00D1a000000H3O9!AQ4AQDv3Hk9TRSKHVK.6TQHDjiXPpFDEH7AxoxdK.ytZcKr4gkBGokBh2ZhUcaf0_eFqhFa6YVCzmfP.bUKsz9xIJOy41iQD
336
+ Accept-Encoding:
337
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
338
+ Accept:
339
+ - "*/*"
340
+ response:
341
+ status:
342
+ code: 404
343
+ message: Not Found
344
+ headers:
345
+ Date:
346
+ - Fri, 01 May 2015 16:27:29 GMT
347
+ Set-Cookie:
348
+ - BrowserId=MAQYa6aKSFqS00iE6W2JoQ;Path=/;Domain=.salesforce.com;Expires=Tue,
349
+ 30-Jun-2015 16:27:29 GMT
350
+ Expires:
351
+ - Thu, 01 Jan 1970 00:00:00 GMT
352
+ Sforce-Limit-Info:
353
+ - api-usage=1/15000
354
+ Content-Type:
355
+ - application/json;charset=UTF-8
356
+ Transfer-Encoding:
357
+ - chunked
358
+ body:
359
+ encoding: UTF-8
360
+ string: '[{"message":"entity is deleted","errorCode":"ENTITY_IS_DELETED","fields":[]}]'
361
+ http_version:
362
+ recorded_at: Fri, 01 May 2015 16:27:29 GMT
363
+ - request:
364
+ method: delete
365
+ uri: https://<host>/services/data/v26.0/sobjects/CustomObjectDetail__c/a011a000000ikfeAAA
366
+ body:
367
+ encoding: US-ASCII
368
+ string: ''
369
+ headers:
370
+ User-Agent:
371
+ - Faraday v0.9.1
372
+ Authorization:
373
+ - OAuth 00D1a000000H3O9!AQ4AQDv3Hk9TRSKHVK.6TQHDjiXPpFDEH7AxoxdK.ytZcKr4gkBGokBh2ZhUcaf0_eFqhFa6YVCzmfP.bUKsz9xIJOy41iQD
374
+ Accept-Encoding:
375
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
376
+ Accept:
377
+ - "*/*"
378
+ response:
379
+ status:
380
+ code: 404
381
+ message: Not Found
382
+ headers:
383
+ Date:
384
+ - Fri, 01 May 2015 16:27:29 GMT
385
+ Set-Cookie:
386
+ - BrowserId=1nbJRhPrR36jKWIobb0Zxw;Path=/;Domain=.salesforce.com;Expires=Tue,
387
+ 30-Jun-2015 16:27:29 GMT
388
+ Expires:
389
+ - Thu, 01 Jan 1970 00:00:00 GMT
390
+ Sforce-Limit-Info:
391
+ - api-usage=1/15000
392
+ Content-Type:
393
+ - application/json;charset=UTF-8
394
+ Transfer-Encoding:
395
+ - chunked
396
+ body:
397
+ encoding: UTF-8
398
+ string: '[{"message":"entity is deleted","errorCode":"ENTITY_IS_DELETED","fields":[]}]'
399
+ http_version:
400
+ recorded_at: Fri, 01 May 2015 16:27:29 GMT
401
+ - request:
402
+ method: delete
403
+ uri: https://<host>/services/data/v26.0/sobjects/CustomObjectDetail__c/a011a000000ikfjAAA
404
+ body:
405
+ encoding: US-ASCII
406
+ string: ''
407
+ headers:
408
+ User-Agent:
409
+ - Faraday v0.9.1
410
+ Authorization:
411
+ - OAuth 00D1a000000H3O9!AQ4AQDv3Hk9TRSKHVK.6TQHDjiXPpFDEH7AxoxdK.ytZcKr4gkBGokBh2ZhUcaf0_eFqhFa6YVCzmfP.bUKsz9xIJOy41iQD
412
+ Accept-Encoding:
413
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
414
+ Accept:
415
+ - "*/*"
416
+ response:
417
+ status:
418
+ code: 404
419
+ message: Not Found
420
+ headers:
421
+ Date:
422
+ - Fri, 01 May 2015 16:27:29 GMT
423
+ Set-Cookie:
424
+ - BrowserId=6NzebkrwTee870YTkR0yuw;Path=/;Domain=.salesforce.com;Expires=Tue,
425
+ 30-Jun-2015 16:27:29 GMT
426
+ Expires:
427
+ - Thu, 01 Jan 1970 00:00:00 GMT
428
+ Sforce-Limit-Info:
429
+ - api-usage=1/15000
430
+ Content-Type:
431
+ - application/json;charset=UTF-8
432
+ Transfer-Encoding:
433
+ - chunked
434
+ body:
435
+ encoding: UTF-8
436
+ string: '[{"message":"entity is deleted","errorCode":"ENTITY_IS_DELETED","fields":[]}]'
437
+ http_version:
438
+ recorded_at: Fri, 01 May 2015 16:27:29 GMT
439
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,271 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://<host>/services/oauth2/token
6
+ body:
7
+ encoding: US-ASCII
8
+ string: grant_type=password&client_id=<client_id>&client_secret=<client_secret>&username=<username>&password=<password><security_token>
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.1
12
+ Content-Type:
13
+ - application/x-www-form-urlencoded
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Date:
24
+ - Fri, 01 May 2015 16:33:22 GMT
25
+ Set-Cookie:
26
+ - BrowserId=JNG-tWgPS5qVjZfsga584g;Path=/;Domain=.salesforce.com;Expires=Tue,
27
+ 30-Jun-2015 16:33:22 GMT
28
+ Expires:
29
+ - Thu, 01 Jan 1970 00:00:00 GMT
30
+ Pragma:
31
+ - no-cache
32
+ Cache-Control:
33
+ - no-cache, no-store
34
+ Content-Type:
35
+ - application/json;charset=UTF-8
36
+ Transfer-Encoding:
37
+ - chunked
38
+ body:
39
+ encoding: ASCII-8BIT
40
+ string: '{"id":"https://login.salesforce.com/id/00D1a000000H3O9EAK/0051a000000UGT8AAO","issued_at":"1430498002630","token_type":"Bearer","instance_url":"https://<host>","signature":"Z6A0wnihwjoySQ2kx85fiWIU125nofxKEitXsJVPx+I=","access_token":"00D1a000000H3O9!AQ4AQDv3Hk9TRSKHVK.6TQHDjiXPpFDEH7AxoxdK.ytZcKr4gkBGokBh2ZhUcaf0_eFqhFa6YVCzmfP.bUKsz9xIJOy41iQD"}'
41
+ http_version:
42
+ recorded_at: Fri, 01 May 2015 16:33:22 GMT
43
+ - request:
44
+ method: post
45
+ uri: https://<host>/services/data/v26.0/sobjects/Contact
46
+ body:
47
+ encoding: UTF-8
48
+ string: '{"Email":"somebody@example.com","LastName":"Somebody"}'
49
+ headers:
50
+ User-Agent:
51
+ - Faraday v0.9.1
52
+ Content-Type:
53
+ - application/json
54
+ Authorization:
55
+ - OAuth 00D1a000000H3O9!AQ4AQDv3Hk9TRSKHVK.6TQHDjiXPpFDEH7AxoxdK.ytZcKr4gkBGokBh2ZhUcaf0_eFqhFa6YVCzmfP.bUKsz9xIJOy41iQD
56
+ Accept-Encoding:
57
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
58
+ Accept:
59
+ - "*/*"
60
+ response:
61
+ status:
62
+ code: 201
63
+ message: Created
64
+ headers:
65
+ Date:
66
+ - Fri, 01 May 2015 16:33:22 GMT
67
+ Set-Cookie:
68
+ - BrowserId=BJaSxvYtRg6BHP3eRK6dNg;Path=/;Domain=.salesforce.com;Expires=Tue,
69
+ 30-Jun-2015 16:33:22 GMT
70
+ Expires:
71
+ - Thu, 01 Jan 1970 00:00:00 GMT
72
+ Sforce-Limit-Info:
73
+ - api-usage=13/15000
74
+ Location:
75
+ - "/services/data/v26.0/sobjects/Contact/0031a000002jr5tAAA"
76
+ Content-Type:
77
+ - application/json;charset=UTF-8
78
+ Transfer-Encoding:
79
+ - chunked
80
+ body:
81
+ encoding: ASCII-8BIT
82
+ string: '{"id":"0031a000002jr5tAAA","success":true,"errors":[]}'
83
+ http_version:
84
+ recorded_at: Fri, 01 May 2015 16:33:23 GMT
85
+ - request:
86
+ method: post
87
+ uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c
88
+ body:
89
+ encoding: UTF-8
90
+ string: '{"Friend__c":"0031a000002jr5tAAA"}'
91
+ headers:
92
+ User-Agent:
93
+ - Faraday v0.9.1
94
+ Content-Type:
95
+ - application/json
96
+ Authorization:
97
+ - OAuth 00D1a000000H3O9!AQ4AQDv3Hk9TRSKHVK.6TQHDjiXPpFDEH7AxoxdK.ytZcKr4gkBGokBh2ZhUcaf0_eFqhFa6YVCzmfP.bUKsz9xIJOy41iQD
98
+ Accept-Encoding:
99
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
100
+ Accept:
101
+ - "*/*"
102
+ response:
103
+ status:
104
+ code: 201
105
+ message: Created
106
+ headers:
107
+ Date:
108
+ - Fri, 01 May 2015 16:33:23 GMT
109
+ Set-Cookie:
110
+ - BrowserId=XsRYirjeTRifK6p5q4ATsw;Path=/;Domain=.salesforce.com;Expires=Tue,
111
+ 30-Jun-2015 16:33:23 GMT
112
+ Expires:
113
+ - Thu, 01 Jan 1970 00:00:00 GMT
114
+ Sforce-Limit-Info:
115
+ - api-usage=12/15000
116
+ Location:
117
+ - "/services/data/v26.0/sobjects/CustomObject__c/a001a000001TuP7AAK"
118
+ Content-Type:
119
+ - application/json;charset=UTF-8
120
+ Transfer-Encoding:
121
+ - chunked
122
+ body:
123
+ encoding: ASCII-8BIT
124
+ string: '{"id":"a001a000001TuP7AAK","success":true,"errors":[]}'
125
+ http_version:
126
+ recorded_at: Fri, 01 May 2015 16:33:23 GMT
127
+ - request:
128
+ method: get
129
+ uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Email%20from%20Contact%20where%20Id%20=%20%270031a000002jr5tAAA%27
130
+ body:
131
+ encoding: US-ASCII
132
+ string: ''
133
+ headers:
134
+ User-Agent:
135
+ - Faraday v0.9.1
136
+ Authorization:
137
+ - OAuth 00D1a000000H3O9!AQ4AQDv3Hk9TRSKHVK.6TQHDjiXPpFDEH7AxoxdK.ytZcKr4gkBGokBh2ZhUcaf0_eFqhFa6YVCzmfP.bUKsz9xIJOy41iQD
138
+ Accept-Encoding:
139
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
140
+ Accept:
141
+ - "*/*"
142
+ response:
143
+ status:
144
+ code: 200
145
+ message: OK
146
+ headers:
147
+ Date:
148
+ - Fri, 01 May 2015 16:33:23 GMT
149
+ Set-Cookie:
150
+ - BrowserId=ZETXx2dvQK28gwOuQmmgRA;Path=/;Domain=.salesforce.com;Expires=Tue,
151
+ 30-Jun-2015 16:33:23 GMT
152
+ Expires:
153
+ - Thu, 01 Jan 1970 00:00:00 GMT
154
+ Sforce-Limit-Info:
155
+ - api-usage=13/15000
156
+ Content-Type:
157
+ - application/json;charset=UTF-8
158
+ Transfer-Encoding:
159
+ - chunked
160
+ body:
161
+ encoding: ASCII-8BIT
162
+ string: '{"totalSize":1,"done":true,"records":[{"attributes":{"type":"Contact","url":"/services/data/v26.0/sobjects/Contact/0031a000002jr5tAAA"},"Id":"0031a000002jr5tAAA","SystemModstamp":"2015-05-01T16:33:22.000+0000","Email":"somebody@example.com"}]}'
163
+ http_version:
164
+ recorded_at: Fri, 01 May 2015 16:33:23 GMT
165
+ - request:
166
+ method: get
167
+ uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Name,%20Example_Field__c,%20Friend__c%20from%20CustomObject__c%20where%20Friend__c%20=%20%270031a000002jr5tAAA%27
168
+ body:
169
+ encoding: US-ASCII
170
+ string: ''
171
+ headers:
172
+ User-Agent:
173
+ - Faraday v0.9.1
174
+ Authorization:
175
+ - OAuth 00D1a000000H3O9!AQ4AQDv3Hk9TRSKHVK.6TQHDjiXPpFDEH7AxoxdK.ytZcKr4gkBGokBh2ZhUcaf0_eFqhFa6YVCzmfP.bUKsz9xIJOy41iQD
176
+ Accept-Encoding:
177
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
178
+ Accept:
179
+ - "*/*"
180
+ response:
181
+ status:
182
+ code: 200
183
+ message: OK
184
+ headers:
185
+ Date:
186
+ - Fri, 01 May 2015 16:33:23 GMT
187
+ Set-Cookie:
188
+ - BrowserId=C8mvISe9QEiNO2UrJ583iA;Path=/;Domain=.salesforce.com;Expires=Tue,
189
+ 30-Jun-2015 16:33:23 GMT
190
+ Expires:
191
+ - Thu, 01 Jan 1970 00:00:00 GMT
192
+ Sforce-Limit-Info:
193
+ - api-usage=12/15000
194
+ Content-Type:
195
+ - application/json;charset=UTF-8
196
+ Transfer-Encoding:
197
+ - chunked
198
+ body:
199
+ encoding: ASCII-8BIT
200
+ string: '{"totalSize":1,"done":true,"records":[{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/a001a000001TuP7AAK"},"Id":"a001a000001TuP7AAK","SystemModstamp":"2015-05-01T16:33:23.000+0000","Name":"a001a000001TuP7","Example_Field__c":null,"Friend__c":"0031a000002jr5tAAA"}]}'
201
+ http_version:
202
+ recorded_at: Fri, 01 May 2015 16:33:23 GMT
203
+ - request:
204
+ method: delete
205
+ uri: https://<host>/services/data/v26.0/sobjects/Contact/0031a000002jr5tAAA
206
+ body:
207
+ encoding: US-ASCII
208
+ string: ''
209
+ headers:
210
+ User-Agent:
211
+ - Faraday v0.9.1
212
+ Authorization:
213
+ - OAuth 00D1a000000H3O9!AQ4AQDv3Hk9TRSKHVK.6TQHDjiXPpFDEH7AxoxdK.ytZcKr4gkBGokBh2ZhUcaf0_eFqhFa6YVCzmfP.bUKsz9xIJOy41iQD
214
+ Accept-Encoding:
215
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
216
+ Accept:
217
+ - "*/*"
218
+ response:
219
+ status:
220
+ code: 204
221
+ message: No Content
222
+ headers:
223
+ Date:
224
+ - Fri, 01 May 2015 16:33:23 GMT
225
+ Set-Cookie:
226
+ - BrowserId=hLed1XV4Ri-HpawFhu6dDA;Path=/;Domain=.salesforce.com;Expires=Tue,
227
+ 30-Jun-2015 16:33:23 GMT
228
+ Expires:
229
+ - Thu, 01 Jan 1970 00:00:00 GMT
230
+ Sforce-Limit-Info:
231
+ - api-usage=12/15000
232
+ body:
233
+ encoding: UTF-8
234
+ string: ''
235
+ http_version:
236
+ recorded_at: Fri, 01 May 2015 16:33:24 GMT
237
+ - request:
238
+ method: delete
239
+ uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001TuP7AAK
240
+ body:
241
+ encoding: US-ASCII
242
+ string: ''
243
+ headers:
244
+ User-Agent:
245
+ - Faraday v0.9.1
246
+ Authorization:
247
+ - OAuth 00D1a000000H3O9!AQ4AQDv3Hk9TRSKHVK.6TQHDjiXPpFDEH7AxoxdK.ytZcKr4gkBGokBh2ZhUcaf0_eFqhFa6YVCzmfP.bUKsz9xIJOy41iQD
248
+ Accept-Encoding:
249
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
250
+ Accept:
251
+ - "*/*"
252
+ response:
253
+ status:
254
+ code: 204
255
+ message: No Content
256
+ headers:
257
+ Date:
258
+ - Fri, 01 May 2015 16:33:23 GMT
259
+ Set-Cookie:
260
+ - BrowserId=RN1NGcJlRqOhiwGe2jwQ6Q;Path=/;Domain=.salesforce.com;Expires=Tue,
261
+ 30-Jun-2015 16:33:23 GMT
262
+ Expires:
263
+ - Thu, 01 Jan 1970 00:00:00 GMT
264
+ Sforce-Limit-Info:
265
+ - api-usage=12/15000
266
+ body:
267
+ encoding: UTF-8
268
+ string: ''
269
+ http_version:
270
+ recorded_at: Fri, 01 May 2015 16:33:24 GMT
271
+ recorded_with: VCR 2.9.3