restforce-db 1.0.4 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +38 -22
  3. data/lib/restforce/db/associations/base.rb +152 -0
  4. data/lib/restforce/db/associations/belongs_to.rb +70 -0
  5. data/lib/restforce/db/associations/foreign_key.rb +80 -0
  6. data/lib/restforce/db/associations/has_many.rb +37 -0
  7. data/lib/restforce/db/associations/has_one.rb +33 -0
  8. data/lib/restforce/db/dsl.rb +25 -13
  9. data/lib/restforce/db/mapping.rb +2 -3
  10. data/lib/restforce/db/record_types/active_record.rb +3 -8
  11. data/lib/restforce/db/record_types/salesforce.rb +23 -8
  12. data/lib/restforce/db/strategies/associated.rb +58 -0
  13. data/lib/restforce/db/version.rb +1 -1
  14. data/lib/restforce/db.rb +6 -1
  15. data/restforce-db.gemspec +0 -1
  16. data/test/cassettes/Restforce_DB_Associations_BelongsTo/with_an_inverse_mapping/_build/returns_an_associated_record_populated_with_the_Salesforce_attributes.yml +271 -0
  17. data/test/cassettes/Restforce_DB_Associations_BelongsTo/with_an_inverse_mapping/_synced_for_/when_a_matching_associated_record_has_been_synchronized/returns_true.yml +271 -0
  18. data/test/cassettes/Restforce_DB_Associations_BelongsTo/with_an_inverse_mapping/_synced_for_/when_no_matching_associated_record_has_been_synchronized/returns_false.yml +271 -0
  19. data/test/cassettes/Restforce_DB_Associations_HasMany/with_an_inverse_mapping/_build/builds_a_number_of_associated_records_from_the_data_in_Salesforce.yml +439 -0
  20. data/test/cassettes/Restforce_DB_Associations_HasMany/with_an_inverse_mapping/_synced_for_/when_a_matching_associated_record_has_been_synchronized/returns_true.yml +439 -0
  21. data/test/cassettes/Restforce_DB_Associations_HasMany/with_an_inverse_mapping/_synced_for_/when_no_matching_associated_record_has_been_synchronized/returns_false.yml +196 -0
  22. data/test/cassettes/Restforce_DB_Associations_HasOne/with_an_inverse_mapping/_build/returns_an_associated_record_populated_with_the_Salesforce_attributes.yml +271 -0
  23. data/test/cassettes/Restforce_DB_Associations_HasOne/with_an_inverse_mapping/_synced_for_/when_a_matching_associated_record_has_been_synchronized/returns_true.yml +271 -0
  24. data/test/cassettes/Restforce_DB_Associations_HasOne/with_an_inverse_mapping/_synced_for_/when_no_matching_associated_record_has_been_synchronized/returns_false.yml +271 -0
  25. data/test/cassettes/Restforce_DB_Strategies_Associated/_build_/given_an_inverse_mapping/with_a_synchronized_association_record/wants_to_build_a_new_record.yml +275 -0
  26. data/test/cassettes/Restforce_DB_Strategies_Associated/_build_/given_an_inverse_mapping/with_an_existing_database_record/does_not_want_to_build_a_new_record.yml +237 -0
  27. data/test/cassettes/Restforce_DB_Strategies_Associated/_build_/given_an_inverse_mapping/with_no_synchronized_association_record/does_not_want_to_build_a_new_record.yml +275 -0
  28. data/test/lib/restforce/db/associations/belongs_to_test.rb +82 -0
  29. data/test/lib/restforce/db/associations/has_many_test.rb +96 -0
  30. data/test/lib/restforce/db/associations/has_one_test.rb +80 -0
  31. data/test/lib/restforce/db/dsl_test.rb +22 -3
  32. data/test/lib/restforce/db/mapping_test.rb +10 -8
  33. data/test/lib/restforce/db/record_types/active_record_test.rb +12 -5
  34. data/test/lib/restforce/db/runner_test.rb +2 -3
  35. data/test/lib/restforce/db/strategies/always_test.rb +2 -2
  36. data/test/lib/restforce/db/strategies/associated_test.rb +78 -0
  37. data/test/lib/restforce/db/strategies/passive_test.rb +1 -1
  38. data/test/lib/restforce/db/tracker_test.rb +0 -2
  39. data/test/support/active_record.rb +25 -2
  40. data/test/support/salesforce.rb +1 -1
  41. data/test/support/utilities.rb +5 -7
  42. data/test/test_helper.rb +0 -1
  43. metadata +24 -18
  44. data/lib/restforce/db/associations/active_record.rb +0 -68
  45. data/test/lib/restforce/db/associations/active_record_test.rb +0 -43
@@ -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, 10 Apr 2015 19:36:53 GMT
25
+ Set-Cookie:
26
+ - BrowserId=4dj_QA9WRg6K4WdMIIr2gQ;Path=/;Domain=.salesforce.com;Expires=Tue,
27
+ 09-Jun-2015 19:36:53 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":"1428694613574","token_type":"Bearer","instance_url":"https://<host>","signature":"kgBP47lDsnoj+9xAXQq93nEJXbBT/5IPiHiIdQBA9W4=","access_token":"00D1a000000H3O9!AQ4AQO48p7VCPJTqs85KtBx3kEBjPhP.lCvkGK3ayiFCcg2H2nbFwdKZaBetwWzVAndOSywkSvoT7_YZEmwLnhtbJ1A3E5NZ"}'
41
+ http_version:
42
+ recorded_at: Fri, 10 Apr 2015 19:36:53 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!AQ4AQO48p7VCPJTqs85KtBx3kEBjPhP.lCvkGK3ayiFCcg2H2nbFwdKZaBetwWzVAndOSywkSvoT7_YZEmwLnhtbJ1A3E5NZ
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, 10 Apr 2015 19:36:53 GMT
67
+ Set-Cookie:
68
+ - BrowserId=8co6OassRYmyO0-CTwBwWw;Path=/;Domain=.salesforce.com;Expires=Tue,
69
+ 09-Jun-2015 19:36:53 GMT
70
+ Expires:
71
+ - Thu, 01 Jan 1970 00:00:00 GMT
72
+ Sforce-Limit-Info:
73
+ - api-usage=63/15000
74
+ Location:
75
+ - "/services/data/v26.0/sobjects/Contact/0031a000001yUpDAAU"
76
+ Content-Type:
77
+ - application/json;charset=UTF-8
78
+ Transfer-Encoding:
79
+ - chunked
80
+ body:
81
+ encoding: ASCII-8BIT
82
+ string: '{"id":"0031a000001yUpDAAU","success":true,"errors":[]}'
83
+ http_version:
84
+ recorded_at: Fri, 10 Apr 2015 19:36:54 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":"0031a000001yUpDAAU"}'
91
+ headers:
92
+ User-Agent:
93
+ - Faraday v0.9.1
94
+ Content-Type:
95
+ - application/json
96
+ Authorization:
97
+ - OAuth 00D1a000000H3O9!AQ4AQO48p7VCPJTqs85KtBx3kEBjPhP.lCvkGK3ayiFCcg2H2nbFwdKZaBetwWzVAndOSywkSvoT7_YZEmwLnhtbJ1A3E5NZ
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, 10 Apr 2015 19:36:53 GMT
109
+ Set-Cookie:
110
+ - BrowserId=aIcTxYj6Td2WAcdkRtcHLQ;Path=/;Domain=.salesforce.com;Expires=Tue,
111
+ 09-Jun-2015 19:36:53 GMT
112
+ Expires:
113
+ - Thu, 01 Jan 1970 00:00:00 GMT
114
+ Sforce-Limit-Info:
115
+ - api-usage=63/15000
116
+ Location:
117
+ - "/services/data/v26.0/sobjects/CustomObject__c/a001a000001LXL8AAO"
118
+ Content-Type:
119
+ - application/json;charset=UTF-8
120
+ Transfer-Encoding:
121
+ - chunked
122
+ body:
123
+ encoding: ASCII-8BIT
124
+ string: '{"id":"a001a000001LXL8AAO","success":true,"errors":[]}'
125
+ http_version:
126
+ recorded_at: Fri, 10 Apr 2015 19:36:54 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%270031a000001yUpDAAU%27
130
+ body:
131
+ encoding: US-ASCII
132
+ string: ''
133
+ headers:
134
+ User-Agent:
135
+ - Faraday v0.9.1
136
+ Authorization:
137
+ - OAuth 00D1a000000H3O9!AQ4AQO48p7VCPJTqs85KtBx3kEBjPhP.lCvkGK3ayiFCcg2H2nbFwdKZaBetwWzVAndOSywkSvoT7_YZEmwLnhtbJ1A3E5NZ
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, 10 Apr 2015 19:36:54 GMT
149
+ Set-Cookie:
150
+ - BrowserId=UNYNMvZfTdmmnAn9IVi_Kw;Path=/;Domain=.salesforce.com;Expires=Tue,
151
+ 09-Jun-2015 19:36:54 GMT
152
+ Expires:
153
+ - Thu, 01 Jan 1970 00:00:00 GMT
154
+ Sforce-Limit-Info:
155
+ - api-usage=64/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/0031a000001yUpDAAU"},"Id":"0031a000001yUpDAAU","SystemModstamp":"2015-04-10T19:36:53.000+0000","Email":"somebody@example.com"}]}'
163
+ http_version:
164
+ recorded_at: Fri, 10 Apr 2015 19:36:54 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%270031a000001yUpDAAU%27
168
+ body:
169
+ encoding: US-ASCII
170
+ string: ''
171
+ headers:
172
+ User-Agent:
173
+ - Faraday v0.9.1
174
+ Authorization:
175
+ - OAuth 00D1a000000H3O9!AQ4AQO48p7VCPJTqs85KtBx3kEBjPhP.lCvkGK3ayiFCcg2H2nbFwdKZaBetwWzVAndOSywkSvoT7_YZEmwLnhtbJ1A3E5NZ
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, 10 Apr 2015 19:36:54 GMT
187
+ Set-Cookie:
188
+ - BrowserId=mQRACVKhQ5Ca96qGwNOM_g;Path=/;Domain=.salesforce.com;Expires=Tue,
189
+ 09-Jun-2015 19:36:54 GMT
190
+ Expires:
191
+ - Thu, 01 Jan 1970 00:00:00 GMT
192
+ Sforce-Limit-Info:
193
+ - api-usage=63/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/a001a000001LXL8AAO"},"Id":"a001a000001LXL8AAO","SystemModstamp":"2015-04-10T19:36:54.000+0000","Name":"a001a000001LXL8","Example_Field__c":null,"Friend__c":"0031a000001yUpDAAU"}]}'
201
+ http_version:
202
+ recorded_at: Fri, 10 Apr 2015 19:36:54 GMT
203
+ - request:
204
+ method: delete
205
+ uri: https://<host>/services/data/v26.0/sobjects/Contact/0031a000001yUpDAAU
206
+ body:
207
+ encoding: US-ASCII
208
+ string: ''
209
+ headers:
210
+ User-Agent:
211
+ - Faraday v0.9.1
212
+ Authorization:
213
+ - OAuth 00D1a000000H3O9!AQ4AQO48p7VCPJTqs85KtBx3kEBjPhP.lCvkGK3ayiFCcg2H2nbFwdKZaBetwWzVAndOSywkSvoT7_YZEmwLnhtbJ1A3E5NZ
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, 10 Apr 2015 19:36:54 GMT
225
+ Set-Cookie:
226
+ - BrowserId=BL-dqAy3TlKOqauzRtoqeQ;Path=/;Domain=.salesforce.com;Expires=Tue,
227
+ 09-Jun-2015 19:36:54 GMT
228
+ Expires:
229
+ - Thu, 01 Jan 1970 00:00:00 GMT
230
+ Sforce-Limit-Info:
231
+ - api-usage=64/15000
232
+ body:
233
+ encoding: UTF-8
234
+ string: ''
235
+ http_version:
236
+ recorded_at: Fri, 10 Apr 2015 19:36:55 GMT
237
+ - request:
238
+ method: delete
239
+ uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001LXL8AAO
240
+ body:
241
+ encoding: US-ASCII
242
+ string: ''
243
+ headers:
244
+ User-Agent:
245
+ - Faraday v0.9.1
246
+ Authorization:
247
+ - OAuth 00D1a000000H3O9!AQ4AQO48p7VCPJTqs85KtBx3kEBjPhP.lCvkGK3ayiFCcg2H2nbFwdKZaBetwWzVAndOSywkSvoT7_YZEmwLnhtbJ1A3E5NZ
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, 10 Apr 2015 19:36:54 GMT
259
+ Set-Cookie:
260
+ - BrowserId=ZmuPFZI4ReCEeB4LocND4Q;Path=/;Domain=.salesforce.com;Expires=Tue,
261
+ 09-Jun-2015 19:36:54 GMT
262
+ Expires:
263
+ - Thu, 01 Jan 1970 00:00:00 GMT
264
+ Sforce-Limit-Info:
265
+ - api-usage=63/15000
266
+ body:
267
+ encoding: UTF-8
268
+ string: ''
269
+ http_version:
270
+ recorded_at: Fri, 10 Apr 2015 19:36:55 GMT
271
+ 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
+ - Sat, 11 Apr 2015 01:25:40 GMT
25
+ Set-Cookie:
26
+ - BrowserId=KpR5i_fuTy2ajIP-kBJHxA;Path=/;Domain=.salesforce.com;Expires=Wed,
27
+ 10-Jun-2015 01:25:40 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":"1428715540708","token_type":"Bearer","instance_url":"https://<host>","signature":"br3UtG9nUBftzMR/OwfVXhT7UyMZMSzwe1iMucUTqME=","access_token":"00D1a000000H3O9!AQ4AQKzh13pKuR2SlS.Cq04BnD.sliu.0jLuP2qUQvVfZBc5RaiRknImPjcZu5w_dvIzyN831OnqnR.o9XKdgX14n3l6dNnj"}'
41
+ http_version:
42
+ recorded_at: Sat, 11 Apr 2015 01:25:41 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!AQ4AQKzh13pKuR2SlS.Cq04BnD.sliu.0jLuP2qUQvVfZBc5RaiRknImPjcZu5w_dvIzyN831OnqnR.o9XKdgX14n3l6dNnj
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
+ - Sat, 11 Apr 2015 01:25:41 GMT
67
+ Set-Cookie:
68
+ - BrowserId=kTp0iqb3ScWx6mQBcy9I5A;Path=/;Domain=.salesforce.com;Expires=Wed,
69
+ 10-Jun-2015 01:25:41 GMT
70
+ Expires:
71
+ - Thu, 01 Jan 1970 00:00:00 GMT
72
+ Sforce-Limit-Info:
73
+ - api-usage=138/15000
74
+ Location:
75
+ - "/services/data/v26.0/sobjects/Contact/0031a000001yZNRAA2"
76
+ Content-Type:
77
+ - application/json;charset=UTF-8
78
+ Transfer-Encoding:
79
+ - chunked
80
+ body:
81
+ encoding: ASCII-8BIT
82
+ string: '{"id":"0031a000001yZNRAA2","success":true,"errors":[]}'
83
+ http_version:
84
+ recorded_at: Sat, 11 Apr 2015 01:25:43 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":"0031a000001yZNRAA2"}'
91
+ headers:
92
+ User-Agent:
93
+ - Faraday v0.9.1
94
+ Content-Type:
95
+ - application/json
96
+ Authorization:
97
+ - OAuth 00D1a000000H3O9!AQ4AQKzh13pKuR2SlS.Cq04BnD.sliu.0jLuP2qUQvVfZBc5RaiRknImPjcZu5w_dvIzyN831OnqnR.o9XKdgX14n3l6dNnj
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
+ - Sat, 11 Apr 2015 01:25:43 GMT
109
+ Set-Cookie:
110
+ - BrowserId=SXz0a58GSoC1KP_RCEIrtw;Path=/;Domain=.salesforce.com;Expires=Wed,
111
+ 10-Jun-2015 01:25:43 GMT
112
+ Expires:
113
+ - Thu, 01 Jan 1970 00:00:00 GMT
114
+ Sforce-Limit-Info:
115
+ - api-usage=138/15000
116
+ Location:
117
+ - "/services/data/v26.0/sobjects/CustomObject__c/a001a000001LXgjAAG"
118
+ Content-Type:
119
+ - application/json;charset=UTF-8
120
+ Transfer-Encoding:
121
+ - chunked
122
+ body:
123
+ encoding: ASCII-8BIT
124
+ string: '{"id":"a001a000001LXgjAAG","success":true,"errors":[]}'
125
+ http_version:
126
+ recorded_at: Sat, 11 Apr 2015 01:25:44 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%270031a000001yZNRAA2%27
130
+ body:
131
+ encoding: US-ASCII
132
+ string: ''
133
+ headers:
134
+ User-Agent:
135
+ - Faraday v0.9.1
136
+ Authorization:
137
+ - OAuth 00D1a000000H3O9!AQ4AQKzh13pKuR2SlS.Cq04BnD.sliu.0jLuP2qUQvVfZBc5RaiRknImPjcZu5w_dvIzyN831OnqnR.o9XKdgX14n3l6dNnj
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
+ - Sat, 11 Apr 2015 01:25:44 GMT
149
+ Set-Cookie:
150
+ - BrowserId=VPHQiaLWRr-iUOlWaHeRYQ;Path=/;Domain=.salesforce.com;Expires=Wed,
151
+ 10-Jun-2015 01:25:44 GMT
152
+ Expires:
153
+ - Thu, 01 Jan 1970 00:00:00 GMT
154
+ Sforce-Limit-Info:
155
+ - api-usage=139/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/0031a000001yZNRAA2"},"Id":"0031a000001yZNRAA2","SystemModstamp":"2015-04-11T01:25:41.000+0000","Email":"somebody@example.com"}]}'
163
+ http_version:
164
+ recorded_at: Sat, 11 Apr 2015 01:25:45 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%270031a000001yZNRAA2%27
168
+ body:
169
+ encoding: US-ASCII
170
+ string: ''
171
+ headers:
172
+ User-Agent:
173
+ - Faraday v0.9.1
174
+ Authorization:
175
+ - OAuth 00D1a000000H3O9!AQ4AQKzh13pKuR2SlS.Cq04BnD.sliu.0jLuP2qUQvVfZBc5RaiRknImPjcZu5w_dvIzyN831OnqnR.o9XKdgX14n3l6dNnj
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
+ - Sat, 11 Apr 2015 01:25:45 GMT
187
+ Set-Cookie:
188
+ - BrowserId=0zCCVQQwSUWrTEViLONC7A;Path=/;Domain=.salesforce.com;Expires=Wed,
189
+ 10-Jun-2015 01:25:45 GMT
190
+ Expires:
191
+ - Thu, 01 Jan 1970 00:00:00 GMT
192
+ Sforce-Limit-Info:
193
+ - api-usage=138/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/a001a000001LXgjAAG"},"Id":"a001a000001LXgjAAG","SystemModstamp":"2015-04-11T01:25:44.000+0000","Name":"a001a000001LXgj","Example_Field__c":null,"Friend__c":"0031a000001yZNRAA2"}]}'
201
+ http_version:
202
+ recorded_at: Sat, 11 Apr 2015 01:25:46 GMT
203
+ - request:
204
+ method: delete
205
+ uri: https://<host>/services/data/v26.0/sobjects/Contact/0031a000001yZNRAA2
206
+ body:
207
+ encoding: US-ASCII
208
+ string: ''
209
+ headers:
210
+ User-Agent:
211
+ - Faraday v0.9.1
212
+ Authorization:
213
+ - OAuth 00D1a000000H3O9!AQ4AQKzh13pKuR2SlS.Cq04BnD.sliu.0jLuP2qUQvVfZBc5RaiRknImPjcZu5w_dvIzyN831OnqnR.o9XKdgX14n3l6dNnj
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
+ - Sat, 11 Apr 2015 01:25:46 GMT
225
+ Set-Cookie:
226
+ - BrowserId=2oCHkFrzR0KwQGJBfghAlQ;Path=/;Domain=.salesforce.com;Expires=Wed,
227
+ 10-Jun-2015 01:25:46 GMT
228
+ Expires:
229
+ - Thu, 01 Jan 1970 00:00:00 GMT
230
+ Sforce-Limit-Info:
231
+ - api-usage=139/15000
232
+ body:
233
+ encoding: UTF-8
234
+ string: ''
235
+ http_version:
236
+ recorded_at: Sat, 11 Apr 2015 01:25:47 GMT
237
+ - request:
238
+ method: delete
239
+ uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001LXgjAAG
240
+ body:
241
+ encoding: US-ASCII
242
+ string: ''
243
+ headers:
244
+ User-Agent:
245
+ - Faraday v0.9.1
246
+ Authorization:
247
+ - OAuth 00D1a000000H3O9!AQ4AQKzh13pKuR2SlS.Cq04BnD.sliu.0jLuP2qUQvVfZBc5RaiRknImPjcZu5w_dvIzyN831OnqnR.o9XKdgX14n3l6dNnj
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
+ - Sat, 11 Apr 2015 01:25:47 GMT
259
+ Set-Cookie:
260
+ - BrowserId=ct3CybiVTomsYPwhQF6T9A;Path=/;Domain=.salesforce.com;Expires=Wed,
261
+ 10-Jun-2015 01:25:47 GMT
262
+ Expires:
263
+ - Thu, 01 Jan 1970 00:00:00 GMT
264
+ Sforce-Limit-Info:
265
+ - api-usage=138/15000
266
+ body:
267
+ encoding: UTF-8
268
+ string: ''
269
+ http_version:
270
+ recorded_at: Sat, 11 Apr 2015 01:25:48 GMT
271
+ recorded_with: VCR 2.9.3