restforce-db 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rubocop/custom/method_documentation.rb +65 -0
- data/.rubocop.yml +39 -0
- data/.travis.yml +3 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +68 -0
- data/Rakefile +13 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/generators/restforce_generator.rb +19 -0
- data/lib/generators/templates/config.yml +8 -0
- data/lib/generators/templates/script +6 -0
- data/lib/restforce/db/command.rb +98 -0
- data/lib/restforce/db/configuration.rb +50 -0
- data/lib/restforce/db/instances/active_record.rb +48 -0
- data/lib/restforce/db/instances/base.rb +66 -0
- data/lib/restforce/db/instances/salesforce.rb +46 -0
- data/lib/restforce/db/mapping.rb +106 -0
- data/lib/restforce/db/model.rb +50 -0
- data/lib/restforce/db/record_type.rb +77 -0
- data/lib/restforce/db/record_types/active_record.rb +80 -0
- data/lib/restforce/db/record_types/base.rb +44 -0
- data/lib/restforce/db/record_types/salesforce.rb +94 -0
- data/lib/restforce/db/synchronizer.rb +57 -0
- data/lib/restforce/db/version.rb +10 -0
- data/lib/restforce/db/worker.rb +156 -0
- data/lib/restforce/db.rb +77 -0
- data/lib/restforce/extensions.rb +19 -0
- data/restforce-db.gemspec +41 -0
- data/test/cassettes/Restforce_DB/accessing_Salesforce/uses_the_configured_credentials.yml +43 -0
- data/test/cassettes/Restforce_DB_Instances_Salesforce/_copy_/updates_the_record_with_the_attributes_from_the_copied_object.yml +193 -0
- data/test/cassettes/Restforce_DB_Instances_Salesforce/_update_/updates_the_local_record_with_the_passed_attributes.yml +193 -0
- data/test/cassettes/Restforce_DB_Instances_Salesforce/_update_/updates_the_record_in_Salesforce_with_the_passed_attributes.yml +232 -0
- data/test/cassettes/Restforce_DB_RecordTypes_Salesforce/_create_/creates_a_record_in_Salesforce_from_the_passed_database_record_s_attributes.yml +158 -0
- data/test/cassettes/Restforce_DB_RecordTypes_Salesforce/_create_/updates_the_database_record_with_the_Salesforce_record_s_ID.yml +158 -0
- data/test/cassettes/Restforce_DB_RecordTypes_Salesforce/_find/finds_existing_records_in_Salesforce.yml +157 -0
- data/test/cassettes/Restforce_DB_RecordTypes_Salesforce/_find/returns_nil_when_no_matching_record_exists.yml +81 -0
- data/test/cassettes/Restforce_DB_Synchronizer/_run/given_a_Salesforce_record_with_an_existing_record_in_the_database/updates_the_database_record.yml +158 -0
- data/test/cassettes/Restforce_DB_Synchronizer/_run/given_an_existing_Salesforce_record/populates_the_database_with_the_new_record.yml +158 -0
- data/test/cassettes/Restforce_DB_Synchronizer/_run/given_an_existing_database_record/populates_Salesforce_with_the_new_record.yml +235 -0
- data/test/lib/restforce/db/configuration_test.rb +38 -0
- data/test/lib/restforce/db/instances/active_record_test.rb +39 -0
- data/test/lib/restforce/db/instances/salesforce_test.rb +51 -0
- data/test/lib/restforce/db/mapping_test.rb +70 -0
- data/test/lib/restforce/db/model_test.rb +48 -0
- data/test/lib/restforce/db/record_type_test.rb +26 -0
- data/test/lib/restforce/db/record_types/active_record_test.rb +85 -0
- data/test/lib/restforce/db/record_types/salesforce_test.rb +46 -0
- data/test/lib/restforce/db/synchronizer_test.rb +84 -0
- data/test/lib/restforce/db_test.rb +24 -0
- data/test/support/active_record.rb +20 -0
- data/test/support/database_cleaner.rb +3 -0
- data/test/support/salesforce.rb +48 -0
- data/test/support/vcr.rb +23 -0
- data/test/test_helper.rb +25 -0
- metadata +287 -0
@@ -0,0 +1,232 @@
|
|
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
|
+
- Wed, 18 Mar 2015 20:28:26 GMT
|
25
|
+
Set-Cookie:
|
26
|
+
- BrowserId=pqbVw0_IR3yRqUlwi-74fA;Path=/;Domain=.salesforce.com;Expires=Sun,
|
27
|
+
17-May-2015 20:28: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":"1426710506416","token_type":"Bearer","instance_url":"https://<host>","signature":"9gh13Vtbjm7LXq/WlvBfiCPFAxd+3RqprVfSoi5XdY8=","access_token":"00D1a000000H3O9!AQ4AQBPYB1dtKrLqKFY0OHPXkpY2WSuWV3emXMOLv6.4pyhpMQ0liAbd0z2To0vRk4VoArPod87jkJCAza2a_.92y4ZpZ_4m"}'
|
41
|
+
http_version:
|
42
|
+
recorded_at: Wed, 18 Mar 2015 20:28:25 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!AQ4AQBPYB1dtKrLqKFY0OHPXkpY2WSuWV3emXMOLv6.4pyhpMQ0liAbd0z2To0vRk4VoArPod87jkJCAza2a_.92y4ZpZ_4m
|
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
|
+
- Wed, 18 Mar 2015 20:28:26 GMT
|
67
|
+
Set-Cookie:
|
68
|
+
- BrowserId=qm94oeIeQt2pYEVMiqiJAQ;Path=/;Domain=.salesforce.com;Expires=Sun,
|
69
|
+
17-May-2015 20:28:26 GMT
|
70
|
+
Expires:
|
71
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
72
|
+
Sforce-Limit-Info:
|
73
|
+
- api-usage=5/15000
|
74
|
+
Location:
|
75
|
+
- "/services/data/v26.0/sobjects/CustomObject__c/a001a000001E5htAAC"
|
76
|
+
Content-Type:
|
77
|
+
- application/json;charset=UTF-8
|
78
|
+
Transfer-Encoding:
|
79
|
+
- chunked
|
80
|
+
body:
|
81
|
+
encoding: ASCII-8BIT
|
82
|
+
string: '{"id":"a001a000001E5htAAC","success":true,"errors":[]}'
|
83
|
+
http_version:
|
84
|
+
recorded_at: Wed, 18 Mar 2015 20:28:25 GMT
|
85
|
+
- request:
|
86
|
+
method: get
|
87
|
+
uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Example_Field__c%20from%20CustomObject__c%20where%20Id%20=%20%27a001a000001E5htAAC%27
|
88
|
+
body:
|
89
|
+
encoding: US-ASCII
|
90
|
+
string: ''
|
91
|
+
headers:
|
92
|
+
User-Agent:
|
93
|
+
- Faraday v0.9.1
|
94
|
+
Authorization:
|
95
|
+
- OAuth 00D1a000000H3O9!AQ4AQBPYB1dtKrLqKFY0OHPXkpY2WSuWV3emXMOLv6.4pyhpMQ0liAbd0z2To0vRk4VoArPod87jkJCAza2a_.92y4ZpZ_4m
|
96
|
+
Accept-Encoding:
|
97
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
98
|
+
Accept:
|
99
|
+
- "*/*"
|
100
|
+
response:
|
101
|
+
status:
|
102
|
+
code: 200
|
103
|
+
message: OK
|
104
|
+
headers:
|
105
|
+
Date:
|
106
|
+
- Wed, 18 Mar 2015 20:28:26 GMT
|
107
|
+
Set-Cookie:
|
108
|
+
- BrowserId=T-Hbdb-rRz6Fqzue5ruwLQ;Path=/;Domain=.salesforce.com;Expires=Sun,
|
109
|
+
17-May-2015 20:28:26 GMT
|
110
|
+
Expires:
|
111
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
112
|
+
Sforce-Limit-Info:
|
113
|
+
- api-usage=5/15000
|
114
|
+
Content-Type:
|
115
|
+
- application/json;charset=UTF-8
|
116
|
+
Transfer-Encoding:
|
117
|
+
- chunked
|
118
|
+
body:
|
119
|
+
encoding: ASCII-8BIT
|
120
|
+
string: '{"totalSize":1,"done":true,"records":[{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/a001a000001E5htAAC"},"Id":"a001a000001E5htAAC","SystemModstamp":"2015-03-18T20:28:26.000+0000","Example_Field__c":null}]}'
|
121
|
+
http_version:
|
122
|
+
recorded_at: Wed, 18 Mar 2015 20:28:26 GMT
|
123
|
+
- request:
|
124
|
+
method: patch
|
125
|
+
uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001E5htAAC
|
126
|
+
body:
|
127
|
+
encoding: UTF-8
|
128
|
+
string: '{"Example_Field__c":"Some new text"}'
|
129
|
+
headers:
|
130
|
+
User-Agent:
|
131
|
+
- Faraday v0.9.1
|
132
|
+
Content-Type:
|
133
|
+
- application/json
|
134
|
+
Authorization:
|
135
|
+
- OAuth 00D1a000000H3O9!AQ4AQBPYB1dtKrLqKFY0OHPXkpY2WSuWV3emXMOLv6.4pyhpMQ0liAbd0z2To0vRk4VoArPod87jkJCAza2a_.92y4ZpZ_4m
|
136
|
+
Accept-Encoding:
|
137
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
138
|
+
Accept:
|
139
|
+
- "*/*"
|
140
|
+
response:
|
141
|
+
status:
|
142
|
+
code: 204
|
143
|
+
message: No Content
|
144
|
+
headers:
|
145
|
+
Date:
|
146
|
+
- Wed, 18 Mar 2015 20:28:27 GMT
|
147
|
+
Set-Cookie:
|
148
|
+
- BrowserId=9xDX3D4gSU2wrXunbFOAuw;Path=/;Domain=.salesforce.com;Expires=Sun,
|
149
|
+
17-May-2015 20:28:27 GMT
|
150
|
+
Expires:
|
151
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
152
|
+
Sforce-Limit-Info:
|
153
|
+
- api-usage=5/15000
|
154
|
+
body:
|
155
|
+
encoding: UTF-8
|
156
|
+
string: ''
|
157
|
+
http_version:
|
158
|
+
recorded_at: Wed, 18 Mar 2015 20:28:26 GMT
|
159
|
+
- request:
|
160
|
+
method: get
|
161
|
+
uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Example_Field__c%20from%20CustomObject__c%20where%20Id%20=%20%27a001a000001E5htAAC%27
|
162
|
+
body:
|
163
|
+
encoding: US-ASCII
|
164
|
+
string: ''
|
165
|
+
headers:
|
166
|
+
User-Agent:
|
167
|
+
- Faraday v0.9.1
|
168
|
+
Authorization:
|
169
|
+
- OAuth 00D1a000000H3O9!AQ4AQBPYB1dtKrLqKFY0OHPXkpY2WSuWV3emXMOLv6.4pyhpMQ0liAbd0z2To0vRk4VoArPod87jkJCAza2a_.92y4ZpZ_4m
|
170
|
+
Accept-Encoding:
|
171
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
172
|
+
Accept:
|
173
|
+
- "*/*"
|
174
|
+
response:
|
175
|
+
status:
|
176
|
+
code: 200
|
177
|
+
message: OK
|
178
|
+
headers:
|
179
|
+
Date:
|
180
|
+
- Wed, 18 Mar 2015 20:28:27 GMT
|
181
|
+
Set-Cookie:
|
182
|
+
- BrowserId=qTrtNtWvRQWf81Hyv2Mf2A;Path=/;Domain=.salesforce.com;Expires=Sun,
|
183
|
+
17-May-2015 20:28:27 GMT
|
184
|
+
Expires:
|
185
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
186
|
+
Sforce-Limit-Info:
|
187
|
+
- api-usage=5/15000
|
188
|
+
Content-Type:
|
189
|
+
- application/json;charset=UTF-8
|
190
|
+
Transfer-Encoding:
|
191
|
+
- chunked
|
192
|
+
body:
|
193
|
+
encoding: ASCII-8BIT
|
194
|
+
string: '{"totalSize":1,"done":true,"records":[{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/a001a000001E5htAAC"},"Id":"a001a000001E5htAAC","SystemModstamp":"2015-03-18T20:28:27.000+0000","Example_Field__c":"Some
|
195
|
+
new text"}]}'
|
196
|
+
http_version:
|
197
|
+
recorded_at: Wed, 18 Mar 2015 20:28:26 GMT
|
198
|
+
- request:
|
199
|
+
method: delete
|
200
|
+
uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001E5htAAC
|
201
|
+
body:
|
202
|
+
encoding: US-ASCII
|
203
|
+
string: ''
|
204
|
+
headers:
|
205
|
+
User-Agent:
|
206
|
+
- Faraday v0.9.1
|
207
|
+
Authorization:
|
208
|
+
- OAuth 00D1a000000H3O9!AQ4AQBPYB1dtKrLqKFY0OHPXkpY2WSuWV3emXMOLv6.4pyhpMQ0liAbd0z2To0vRk4VoArPod87jkJCAza2a_.92y4ZpZ_4m
|
209
|
+
Accept-Encoding:
|
210
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
211
|
+
Accept:
|
212
|
+
- "*/*"
|
213
|
+
response:
|
214
|
+
status:
|
215
|
+
code: 204
|
216
|
+
message: No Content
|
217
|
+
headers:
|
218
|
+
Date:
|
219
|
+
- Wed, 18 Mar 2015 20:28:27 GMT
|
220
|
+
Set-Cookie:
|
221
|
+
- BrowserId=MXhDmFW8R5yrM5CX6e17TA;Path=/;Domain=.salesforce.com;Expires=Sun,
|
222
|
+
17-May-2015 20:28:27 GMT
|
223
|
+
Expires:
|
224
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
225
|
+
Sforce-Limit-Info:
|
226
|
+
- api-usage=5/15000
|
227
|
+
body:
|
228
|
+
encoding: UTF-8
|
229
|
+
string: ''
|
230
|
+
http_version:
|
231
|
+
recorded_at: Wed, 18 Mar 2015 20:28:26 GMT
|
232
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,158 @@
|
|
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, 20 Mar 2015 17:53:02 GMT
|
25
|
+
Set-Cookie:
|
26
|
+
- BrowserId=PnYmaYeNQ46RZk5ijVdzwA;Path=/;Domain=.salesforce.com;Expires=Tue,
|
27
|
+
19-May-2015 17:53:02 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":"1426873982946","token_type":"Bearer","instance_url":"https://<host>","signature":"I4jvFCnmtmB1AB7nypzLSPDXqCK8vapnrIuN8MMQaoY=","access_token":"00D1a000000H3O9!AQ4AQGLw7kXVL1YKNwYo.72MhTH_JsNiQrcufxWTIkqwVDyMWC2KTKnZXSai5sESPjpz2IjAY1BrBSrja5_PVh3nTEA_uXnP"}'
|
41
|
+
http_version:
|
42
|
+
recorded_at: Fri, 20 Mar 2015 17:53:03 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":"Something","Example_Field__c":"Something else"}'
|
49
|
+
headers:
|
50
|
+
User-Agent:
|
51
|
+
- Faraday v0.9.1
|
52
|
+
Content-Type:
|
53
|
+
- application/json
|
54
|
+
Authorization:
|
55
|
+
- OAuth 00D1a000000H3O9!AQ4AQGLw7kXVL1YKNwYo.72MhTH_JsNiQrcufxWTIkqwVDyMWC2KTKnZXSai5sESPjpz2IjAY1BrBSrja5_PVh3nTEA_uXnP
|
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, 20 Mar 2015 17:53:04 GMT
|
67
|
+
Set-Cookie:
|
68
|
+
- BrowserId=vPpZb4ejQeSHrWlo1T5vAA;Path=/;Domain=.salesforce.com;Expires=Tue,
|
69
|
+
19-May-2015 17:53:04 GMT
|
70
|
+
Expires:
|
71
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
72
|
+
Sforce-Limit-Info:
|
73
|
+
- api-usage=26/15000
|
74
|
+
Location:
|
75
|
+
- "/services/data/v26.0/sobjects/CustomObject__c/a001a000001EC0FAAW"
|
76
|
+
Content-Type:
|
77
|
+
- application/json;charset=UTF-8
|
78
|
+
Transfer-Encoding:
|
79
|
+
- chunked
|
80
|
+
body:
|
81
|
+
encoding: ASCII-8BIT
|
82
|
+
string: '{"id":"a001a000001EC0FAAW","success":true,"errors":[]}'
|
83
|
+
http_version:
|
84
|
+
recorded_at: Fri, 20 Mar 2015 17:53:04 GMT
|
85
|
+
- request:
|
86
|
+
method: get
|
87
|
+
uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Name,%20Example_Field__c%20from%20CustomObject__c%20where%20Id%20=%20%27a001a000001EC0FAAW%27
|
88
|
+
body:
|
89
|
+
encoding: US-ASCII
|
90
|
+
string: ''
|
91
|
+
headers:
|
92
|
+
User-Agent:
|
93
|
+
- Faraday v0.9.1
|
94
|
+
Authorization:
|
95
|
+
- OAuth 00D1a000000H3O9!AQ4AQGLw7kXVL1YKNwYo.72MhTH_JsNiQrcufxWTIkqwVDyMWC2KTKnZXSai5sESPjpz2IjAY1BrBSrja5_PVh3nTEA_uXnP
|
96
|
+
Accept-Encoding:
|
97
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
98
|
+
Accept:
|
99
|
+
- "*/*"
|
100
|
+
response:
|
101
|
+
status:
|
102
|
+
code: 200
|
103
|
+
message: OK
|
104
|
+
headers:
|
105
|
+
Date:
|
106
|
+
- Fri, 20 Mar 2015 17:53:05 GMT
|
107
|
+
Set-Cookie:
|
108
|
+
- BrowserId=-hL1RHIzSL-Xxxk2ymSnNw;Path=/;Domain=.salesforce.com;Expires=Tue,
|
109
|
+
19-May-2015 17:53:05 GMT
|
110
|
+
Expires:
|
111
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
112
|
+
Sforce-Limit-Info:
|
113
|
+
- api-usage=26/15000
|
114
|
+
Content-Type:
|
115
|
+
- application/json;charset=UTF-8
|
116
|
+
Transfer-Encoding:
|
117
|
+
- chunked
|
118
|
+
body:
|
119
|
+
encoding: ASCII-8BIT
|
120
|
+
string: '{"totalSize":1,"done":true,"records":[{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/a001a000001EC0FAAW"},"Id":"a001a000001EC0FAAW","SystemModstamp":"2015-03-20T17:53:04.000+0000","Name":"Something","Example_Field__c":"Something
|
121
|
+
else"}]}'
|
122
|
+
http_version:
|
123
|
+
recorded_at: Fri, 20 Mar 2015 17:53:05 GMT
|
124
|
+
- request:
|
125
|
+
method: delete
|
126
|
+
uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001EC0FAAW
|
127
|
+
body:
|
128
|
+
encoding: US-ASCII
|
129
|
+
string: ''
|
130
|
+
headers:
|
131
|
+
User-Agent:
|
132
|
+
- Faraday v0.9.1
|
133
|
+
Authorization:
|
134
|
+
- OAuth 00D1a000000H3O9!AQ4AQGLw7kXVL1YKNwYo.72MhTH_JsNiQrcufxWTIkqwVDyMWC2KTKnZXSai5sESPjpz2IjAY1BrBSrja5_PVh3nTEA_uXnP
|
135
|
+
Accept-Encoding:
|
136
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
137
|
+
Accept:
|
138
|
+
- "*/*"
|
139
|
+
response:
|
140
|
+
status:
|
141
|
+
code: 204
|
142
|
+
message: No Content
|
143
|
+
headers:
|
144
|
+
Date:
|
145
|
+
- Fri, 20 Mar 2015 17:53:06 GMT
|
146
|
+
Set-Cookie:
|
147
|
+
- BrowserId=Ydt07iW9TXSkahJMF-NTwQ;Path=/;Domain=.salesforce.com;Expires=Tue,
|
148
|
+
19-May-2015 17:53:06 GMT
|
149
|
+
Expires:
|
150
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
151
|
+
Sforce-Limit-Info:
|
152
|
+
- api-usage=26/15000
|
153
|
+
body:
|
154
|
+
encoding: UTF-8
|
155
|
+
string: ''
|
156
|
+
http_version:
|
157
|
+
recorded_at: Fri, 20 Mar 2015 17:53:06 GMT
|
158
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,158 @@
|
|
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, 20 Mar 2015 17:52:58 GMT
|
25
|
+
Set-Cookie:
|
26
|
+
- BrowserId=iJ6LbFHuTwa0lU1c9lVXpg;Path=/;Domain=.salesforce.com;Expires=Tue,
|
27
|
+
19-May-2015 17:52:58 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":"1426873978198","token_type":"Bearer","instance_url":"https://<host>","signature":"JdDCEZmCP0h9uDmKYCZeyh/xreoSQJCv/1XDG0cUg+U=","access_token":"00D1a000000H3O9!AQ4AQGLw7kXVL1YKNwYo.72MhTH_JsNiQrcufxWTIkqwVDyMWC2KTKnZXSai5sESPjpz2IjAY1BrBSrja5_PVh3nTEA_uXnP"}'
|
41
|
+
http_version:
|
42
|
+
recorded_at: Fri, 20 Mar 2015 17:52:58 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":"Something","Example_Field__c":"Something else"}'
|
49
|
+
headers:
|
50
|
+
User-Agent:
|
51
|
+
- Faraday v0.9.1
|
52
|
+
Content-Type:
|
53
|
+
- application/json
|
54
|
+
Authorization:
|
55
|
+
- OAuth 00D1a000000H3O9!AQ4AQGLw7kXVL1YKNwYo.72MhTH_JsNiQrcufxWTIkqwVDyMWC2KTKnZXSai5sESPjpz2IjAY1BrBSrja5_PVh3nTEA_uXnP
|
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, 20 Mar 2015 17:52:59 GMT
|
67
|
+
Set-Cookie:
|
68
|
+
- BrowserId=14nhhRZNRNG83AooIeemfQ;Path=/;Domain=.salesforce.com;Expires=Tue,
|
69
|
+
19-May-2015 17:52:59 GMT
|
70
|
+
Expires:
|
71
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
72
|
+
Sforce-Limit-Info:
|
73
|
+
- api-usage=25/15000
|
74
|
+
Location:
|
75
|
+
- "/services/data/v26.0/sobjects/CustomObject__c/a001a000001EC0AAAW"
|
76
|
+
Content-Type:
|
77
|
+
- application/json;charset=UTF-8
|
78
|
+
Transfer-Encoding:
|
79
|
+
- chunked
|
80
|
+
body:
|
81
|
+
encoding: ASCII-8BIT
|
82
|
+
string: '{"id":"a001a000001EC0AAAW","success":true,"errors":[]}'
|
83
|
+
http_version:
|
84
|
+
recorded_at: Fri, 20 Mar 2015 17:52:59 GMT
|
85
|
+
- request:
|
86
|
+
method: get
|
87
|
+
uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Name,%20Example_Field__c%20from%20CustomObject__c%20where%20Id%20=%20%27a001a000001EC0AAAW%27
|
88
|
+
body:
|
89
|
+
encoding: US-ASCII
|
90
|
+
string: ''
|
91
|
+
headers:
|
92
|
+
User-Agent:
|
93
|
+
- Faraday v0.9.1
|
94
|
+
Authorization:
|
95
|
+
- OAuth 00D1a000000H3O9!AQ4AQGLw7kXVL1YKNwYo.72MhTH_JsNiQrcufxWTIkqwVDyMWC2KTKnZXSai5sESPjpz2IjAY1BrBSrja5_PVh3nTEA_uXnP
|
96
|
+
Accept-Encoding:
|
97
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
98
|
+
Accept:
|
99
|
+
- "*/*"
|
100
|
+
response:
|
101
|
+
status:
|
102
|
+
code: 200
|
103
|
+
message: OK
|
104
|
+
headers:
|
105
|
+
Date:
|
106
|
+
- Fri, 20 Mar 2015 17:53:00 GMT
|
107
|
+
Set-Cookie:
|
108
|
+
- BrowserId=1QSTCkzETZOWkmOR3_EsvQ;Path=/;Domain=.salesforce.com;Expires=Tue,
|
109
|
+
19-May-2015 17:53:00 GMT
|
110
|
+
Expires:
|
111
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
112
|
+
Sforce-Limit-Info:
|
113
|
+
- api-usage=25/15000
|
114
|
+
Content-Type:
|
115
|
+
- application/json;charset=UTF-8
|
116
|
+
Transfer-Encoding:
|
117
|
+
- chunked
|
118
|
+
body:
|
119
|
+
encoding: ASCII-8BIT
|
120
|
+
string: '{"totalSize":1,"done":true,"records":[{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/a001a000001EC0AAAW"},"Id":"a001a000001EC0AAAW","SystemModstamp":"2015-03-20T17:52:59.000+0000","Name":"Something","Example_Field__c":"Something
|
121
|
+
else"}]}'
|
122
|
+
http_version:
|
123
|
+
recorded_at: Fri, 20 Mar 2015 17:53:00 GMT
|
124
|
+
- request:
|
125
|
+
method: delete
|
126
|
+
uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001EC0AAAW
|
127
|
+
body:
|
128
|
+
encoding: US-ASCII
|
129
|
+
string: ''
|
130
|
+
headers:
|
131
|
+
User-Agent:
|
132
|
+
- Faraday v0.9.1
|
133
|
+
Authorization:
|
134
|
+
- OAuth 00D1a000000H3O9!AQ4AQGLw7kXVL1YKNwYo.72MhTH_JsNiQrcufxWTIkqwVDyMWC2KTKnZXSai5sESPjpz2IjAY1BrBSrja5_PVh3nTEA_uXnP
|
135
|
+
Accept-Encoding:
|
136
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
137
|
+
Accept:
|
138
|
+
- "*/*"
|
139
|
+
response:
|
140
|
+
status:
|
141
|
+
code: 204
|
142
|
+
message: No Content
|
143
|
+
headers:
|
144
|
+
Date:
|
145
|
+
- Fri, 20 Mar 2015 17:53:01 GMT
|
146
|
+
Set-Cookie:
|
147
|
+
- BrowserId=hwUelWMbR8yV-yT2nZEamQ;Path=/;Domain=.salesforce.com;Expires=Tue,
|
148
|
+
19-May-2015 17:53:01 GMT
|
149
|
+
Expires:
|
150
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
151
|
+
Sforce-Limit-Info:
|
152
|
+
- api-usage=26/15000
|
153
|
+
body:
|
154
|
+
encoding: UTF-8
|
155
|
+
string: ''
|
156
|
+
http_version:
|
157
|
+
recorded_at: Fri, 20 Mar 2015 17:53:01 GMT
|
158
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,157 @@
|
|
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
|
+
- Wed, 18 Mar 2015 20:28:29 GMT
|
25
|
+
Set-Cookie:
|
26
|
+
- BrowserId=ghnvSGGBQt2WuZ-09W27QA;Path=/;Domain=.salesforce.com;Expires=Sun,
|
27
|
+
17-May-2015 20:28:29 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":"1426710509282","token_type":"Bearer","instance_url":"https://<host>","signature":"jC1rdWNoU6LGEGAYIfSbILAUOdhW1+JCOLOXKrH2r/A=","access_token":"00D1a000000H3O9!AQ4AQBPYB1dtKrLqKFY0OHPXkpY2WSuWV3emXMOLv6.4pyhpMQ0liAbd0z2To0vRk4VoArPod87jkJCAza2a_.92y4ZpZ_4m"}'
|
41
|
+
http_version:
|
42
|
+
recorded_at: Wed, 18 Mar 2015 20:28:28 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!AQ4AQBPYB1dtKrLqKFY0OHPXkpY2WSuWV3emXMOLv6.4pyhpMQ0liAbd0z2To0vRk4VoArPod87jkJCAza2a_.92y4ZpZ_4m
|
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
|
+
- Wed, 18 Mar 2015 20:28:29 GMT
|
67
|
+
Set-Cookie:
|
68
|
+
- BrowserId=55yEquE4SRyJIKxSvuJD1Q;Path=/;Domain=.salesforce.com;Expires=Sun,
|
69
|
+
17-May-2015 20:28:29 GMT
|
70
|
+
Expires:
|
71
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
72
|
+
Sforce-Limit-Info:
|
73
|
+
- api-usage=5/15000
|
74
|
+
Location:
|
75
|
+
- "/services/data/v26.0/sobjects/CustomObject__c/a001a000001E5i3AAC"
|
76
|
+
Content-Type:
|
77
|
+
- application/json;charset=UTF-8
|
78
|
+
Transfer-Encoding:
|
79
|
+
- chunked
|
80
|
+
body:
|
81
|
+
encoding: ASCII-8BIT
|
82
|
+
string: '{"id":"a001a000001E5i3AAC","success":true,"errors":[]}'
|
83
|
+
http_version:
|
84
|
+
recorded_at: Wed, 18 Mar 2015 20:28:28 GMT
|
85
|
+
- request:
|
86
|
+
method: get
|
87
|
+
uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp%20from%20CustomObject__c%20where%20Id%20=%20%27a001a000001E5i3AAC%27
|
88
|
+
body:
|
89
|
+
encoding: US-ASCII
|
90
|
+
string: ''
|
91
|
+
headers:
|
92
|
+
User-Agent:
|
93
|
+
- Faraday v0.9.1
|
94
|
+
Authorization:
|
95
|
+
- OAuth 00D1a000000H3O9!AQ4AQBPYB1dtKrLqKFY0OHPXkpY2WSuWV3emXMOLv6.4pyhpMQ0liAbd0z2To0vRk4VoArPod87jkJCAza2a_.92y4ZpZ_4m
|
96
|
+
Accept-Encoding:
|
97
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
98
|
+
Accept:
|
99
|
+
- "*/*"
|
100
|
+
response:
|
101
|
+
status:
|
102
|
+
code: 200
|
103
|
+
message: OK
|
104
|
+
headers:
|
105
|
+
Date:
|
106
|
+
- Wed, 18 Mar 2015 20:28:29 GMT
|
107
|
+
Set-Cookie:
|
108
|
+
- BrowserId=HZ-pJvS5RE6r-mJCqPU-6Q;Path=/;Domain=.salesforce.com;Expires=Sun,
|
109
|
+
17-May-2015 20:28:29 GMT
|
110
|
+
Expires:
|
111
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
112
|
+
Sforce-Limit-Info:
|
113
|
+
- api-usage=6/15000
|
114
|
+
Content-Type:
|
115
|
+
- application/json;charset=UTF-8
|
116
|
+
Transfer-Encoding:
|
117
|
+
- chunked
|
118
|
+
body:
|
119
|
+
encoding: ASCII-8BIT
|
120
|
+
string: '{"totalSize":1,"done":true,"records":[{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/a001a000001E5i3AAC"},"Id":"a001a000001E5i3AAC","SystemModstamp":"2015-03-18T20:28:29.000+0000"}]}'
|
121
|
+
http_version:
|
122
|
+
recorded_at: Wed, 18 Mar 2015 20:28:28 GMT
|
123
|
+
- request:
|
124
|
+
method: delete
|
125
|
+
uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001E5i3AAC
|
126
|
+
body:
|
127
|
+
encoding: US-ASCII
|
128
|
+
string: ''
|
129
|
+
headers:
|
130
|
+
User-Agent:
|
131
|
+
- Faraday v0.9.1
|
132
|
+
Authorization:
|
133
|
+
- OAuth 00D1a000000H3O9!AQ4AQBPYB1dtKrLqKFY0OHPXkpY2WSuWV3emXMOLv6.4pyhpMQ0liAbd0z2To0vRk4VoArPod87jkJCAza2a_.92y4ZpZ_4m
|
134
|
+
Accept-Encoding:
|
135
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
136
|
+
Accept:
|
137
|
+
- "*/*"
|
138
|
+
response:
|
139
|
+
status:
|
140
|
+
code: 204
|
141
|
+
message: No Content
|
142
|
+
headers:
|
143
|
+
Date:
|
144
|
+
- Wed, 18 Mar 2015 20:28:29 GMT
|
145
|
+
Set-Cookie:
|
146
|
+
- BrowserId=2KhkS00RSnGh6GWRJNpoTA;Path=/;Domain=.salesforce.com;Expires=Sun,
|
147
|
+
17-May-2015 20:28:29 GMT
|
148
|
+
Expires:
|
149
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
150
|
+
Sforce-Limit-Info:
|
151
|
+
- api-usage=6/15000
|
152
|
+
body:
|
153
|
+
encoding: UTF-8
|
154
|
+
string: ''
|
155
|
+
http_version:
|
156
|
+
recorded_at: Wed, 18 Mar 2015 20:28:29 GMT
|
157
|
+
recorded_with: VCR 2.9.3
|