restforce-db 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/file_daemon.rb +42 -0
- data/lib/restforce/db/accumulator.rb +41 -0
- data/lib/restforce/db/attribute_map.rb +132 -0
- data/lib/restforce/db/collector.rb +79 -0
- data/lib/restforce/db/initializer.rb +62 -0
- data/lib/restforce/db/instances/base.rb +1 -14
- data/lib/restforce/db/instances/salesforce.rb +7 -0
- data/lib/restforce/db/mapping.rb +33 -79
- data/lib/restforce/db/record_types/base.rb +0 -30
- data/lib/restforce/db/runner.rb +80 -0
- data/lib/restforce/db/synchronizer.rb +29 -37
- data/lib/restforce/db/version.rb +1 -1
- data/lib/restforce/db/worker.rb +53 -40
- data/lib/restforce/db.rb +6 -0
- data/test/cassettes/{Restforce_DB_Synchronizer/_run/given_a_Salesforce_record_with_an_associated_database_record/when_synchronization_is_stale/updates_the_database_record.yml → Restforce_DB_Collector/_run/given_a_Salesforce_record_with_an_associated_database_record/returns_the_attributes_from_both_records.yml} +36 -36
- data/test/cassettes/Restforce_DB_Collector/_run/given_an_existing_Salesforce_record/returns_the_attributes_from_the_Salesforce_record.yml +197 -0
- data/test/cassettes/Restforce_DB_Collector/_run/given_an_existing_database_record/returns_the_attributes_from_the_database_record.yml +81 -0
- data/test/cassettes/Restforce_DB_Initializer/_run/given_an_existing_Salesforce_record/for_a_non-root_mapping/does_not_create_a_database_record.yml +119 -0
- data/test/cassettes/{Restforce_DB_Synchronizer/_run/given_a_Salesforce_record_with_an_associated_database_record/when_synchronization_is_up-to-date/does_not_update_the_database_record.yml → Restforce_DB_Initializer/_run/given_an_existing_Salesforce_record/for_a_root_mapping/creates_a_matching_database_record.yml} +28 -28
- data/test/cassettes/{Restforce_DB_Synchronizer/_run/given_an_existing_database_record → Restforce_DB_Initializer/_run/given_an_existing_database_record/for_a_root_mapping}/populates_Salesforce_with_the_new_record.yml +44 -44
- data/test/cassettes/{Restforce_DB_Synchronizer/_run/given_an_existing_Salesforce_record/for_a_non-root_mapping/does_not_create_a_database_record.yml → Restforce_DB_Instances_Salesforce/_synced_/when_a_matching_database_record_exists/returns_true.yml} +30 -30
- data/test/cassettes/{Restforce_DB_Synchronizer/_run/given_an_existing_Salesforce_record/for_a_root_mapping/creates_a_matching_database_record.yml → Restforce_DB_Instances_Salesforce/_synced_/when_no_matching_database_record_exists/returns_false.yml} +30 -30
- data/test/cassettes/Restforce_DB_Synchronizer/_run/given_a_Salesforce_record_with_an_associated_database_record/updates_the_database_record.yml +194 -0
- data/test/cassettes/Restforce_DB_Synchronizer/_run/given_a_Salesforce_record_with_an_associated_database_record/updates_the_salesforce_record.yml +233 -0
- data/test/lib/restforce/db/accumulator_test.rb +71 -0
- data/test/lib/restforce/db/attribute_map_test.rb +70 -0
- data/test/lib/restforce/db/collector_test.rb +91 -0
- data/test/lib/restforce/db/initializer_test.rb +92 -0
- data/test/lib/restforce/db/instances/active_record_test.rb +0 -13
- data/test/lib/restforce/db/instances/salesforce_test.rb +20 -13
- data/test/lib/restforce/db/mapping_test.rb +1 -37
- data/test/lib/restforce/db/record_types/active_record_test.rb +0 -40
- data/test/lib/restforce/db/runner_test.rb +40 -0
- data/test/lib/restforce/db/synchronizer_test.rb +26 -86
- metadata +23 -7
@@ -21,10 +21,10 @@ http_interactions:
|
|
21
21
|
message: OK
|
22
22
|
headers:
|
23
23
|
Date:
|
24
|
-
-
|
24
|
+
- Mon, 06 Apr 2015 15:01:25 GMT
|
25
25
|
Set-Cookie:
|
26
|
-
- BrowserId=
|
27
|
-
|
26
|
+
- BrowserId=fERSgZ4JTeuiJriZGh5z5g;Path=/;Domain=.salesforce.com;Expires=Fri,
|
27
|
+
05-Jun-2015 15:01:25 GMT
|
28
28
|
Expires:
|
29
29
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
30
30
|
Pragma:
|
@@ -37,22 +37,22 @@ http_interactions:
|
|
37
37
|
- chunked
|
38
38
|
body:
|
39
39
|
encoding: ASCII-8BIT
|
40
|
-
string: '{"id":"https://login.salesforce.com/id/00D1a000000H3O9EAK/0051a000000UGT8AAO","issued_at":"
|
40
|
+
string: '{"id":"https://login.salesforce.com/id/00D1a000000H3O9EAK/0051a000000UGT8AAO","issued_at":"1428332485560","token_type":"Bearer","instance_url":"https://<host>","signature":"GBS/8ndYpWxyywchO4vevnh1DcQqCs1JQ+G8a/Ju8T4=","access_token":"00D1a000000H3O9!AQ4AQFhXX0t0My8qCHdrUMfRwg3B5FPFTjOwddPzvTaHu0t9H1xiDVKOSpDxKItHiqnvYyMKqZVwaC5AIJvYk_bzVt8m7Vil"}'
|
41
41
|
http_version:
|
42
|
-
recorded_at:
|
42
|
+
recorded_at: Mon, 06 Apr 2015 15:01:25 GMT
|
43
43
|
- request:
|
44
44
|
method: post
|
45
45
|
uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c
|
46
46
|
body:
|
47
47
|
encoding: UTF-8
|
48
|
-
string: '{"Name":"
|
48
|
+
string: '{"Name":"Sample object"}'
|
49
49
|
headers:
|
50
50
|
User-Agent:
|
51
51
|
- Faraday v0.9.1
|
52
52
|
Content-Type:
|
53
53
|
- application/json
|
54
54
|
Authorization:
|
55
|
-
- OAuth 00D1a000000H3O9!
|
55
|
+
- OAuth 00D1a000000H3O9!AQ4AQFhXX0t0My8qCHdrUMfRwg3B5FPFTjOwddPzvTaHu0t9H1xiDVKOSpDxKItHiqnvYyMKqZVwaC5AIJvYk_bzVt8m7Vil
|
56
56
|
Accept-Encoding:
|
57
57
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
58
58
|
Accept:
|
@@ -63,28 +63,28 @@ http_interactions:
|
|
63
63
|
message: Created
|
64
64
|
headers:
|
65
65
|
Date:
|
66
|
-
-
|
66
|
+
- Mon, 06 Apr 2015 15:01:27 GMT
|
67
67
|
Set-Cookie:
|
68
|
-
- BrowserId=
|
69
|
-
|
68
|
+
- BrowserId=35nO5t0KR8ukyZaToZMtpw;Path=/;Domain=.salesforce.com;Expires=Fri,
|
69
|
+
05-Jun-2015 15:01:27 GMT
|
70
70
|
Expires:
|
71
71
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
72
72
|
Sforce-Limit-Info:
|
73
|
-
- api-usage=
|
73
|
+
- api-usage=25/15000
|
74
74
|
Location:
|
75
|
-
- "/services/data/v26.0/sobjects/CustomObject__c/
|
75
|
+
- "/services/data/v26.0/sobjects/CustomObject__c/a001a000001LGpnAAG"
|
76
76
|
Content-Type:
|
77
77
|
- application/json;charset=UTF-8
|
78
78
|
Transfer-Encoding:
|
79
79
|
- chunked
|
80
80
|
body:
|
81
81
|
encoding: ASCII-8BIT
|
82
|
-
string: '{"id":"
|
82
|
+
string: '{"id":"a001a000001LGpnAAG","success":true,"errors":[]}'
|
83
83
|
http_version:
|
84
|
-
recorded_at:
|
84
|
+
recorded_at: Mon, 06 Apr 2015 15:01:27 GMT
|
85
85
|
- request:
|
86
86
|
method: get
|
87
|
-
uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Name,%20Example_Field__c%20from%20CustomObject__c%20where%
|
87
|
+
uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Name,%20Example_Field__c%20from%20CustomObject__c%20where%20Id%20=%20%27a001a000001LGpnAAG%27
|
88
88
|
body:
|
89
89
|
encoding: US-ASCII
|
90
90
|
string: ''
|
@@ -92,7 +92,7 @@ http_interactions:
|
|
92
92
|
User-Agent:
|
93
93
|
- Faraday v0.9.1
|
94
94
|
Authorization:
|
95
|
-
- OAuth 00D1a000000H3O9!
|
95
|
+
- OAuth 00D1a000000H3O9!AQ4AQFhXX0t0My8qCHdrUMfRwg3B5FPFTjOwddPzvTaHu0t9H1xiDVKOSpDxKItHiqnvYyMKqZVwaC5AIJvYk_bzVt8m7Vil
|
96
96
|
Accept-Encoding:
|
97
97
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
98
98
|
Accept:
|
@@ -103,27 +103,27 @@ http_interactions:
|
|
103
103
|
message: OK
|
104
104
|
headers:
|
105
105
|
Date:
|
106
|
-
-
|
106
|
+
- Mon, 06 Apr 2015 15:01:28 GMT
|
107
107
|
Set-Cookie:
|
108
|
-
- BrowserId=
|
109
|
-
|
108
|
+
- BrowserId=oAxfzYGTTZSrw3A6NzKQ9g;Path=/;Domain=.salesforce.com;Expires=Fri,
|
109
|
+
05-Jun-2015 15:01:28 GMT
|
110
110
|
Expires:
|
111
111
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
112
112
|
Sforce-Limit-Info:
|
113
|
-
- api-usage=
|
113
|
+
- api-usage=24/15000
|
114
114
|
Content-Type:
|
115
115
|
- application/json;charset=UTF-8
|
116
116
|
Transfer-Encoding:
|
117
117
|
- chunked
|
118
118
|
body:
|
119
119
|
encoding: ASCII-8BIT
|
120
|
-
string: '{"totalSize":
|
121
|
-
object","Example_Field__c":
|
120
|
+
string: '{"totalSize":1,"done":true,"records":[{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/a001a000001LGpnAAG"},"Id":"a001a000001LGpnAAG","SystemModstamp":"2015-04-06T15:01:27.000+0000","Name":"Sample
|
121
|
+
object","Example_Field__c":null}]}'
|
122
122
|
http_version:
|
123
|
-
recorded_at:
|
123
|
+
recorded_at: Mon, 06 Apr 2015 15:01:28 GMT
|
124
124
|
- request:
|
125
125
|
method: delete
|
126
|
-
uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/
|
126
|
+
uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001LGpnAAG
|
127
127
|
body:
|
128
128
|
encoding: US-ASCII
|
129
129
|
string: ''
|
@@ -131,7 +131,7 @@ http_interactions:
|
|
131
131
|
User-Agent:
|
132
132
|
- Faraday v0.9.1
|
133
133
|
Authorization:
|
134
|
-
- OAuth 00D1a000000H3O9!
|
134
|
+
- OAuth 00D1a000000H3O9!AQ4AQFhXX0t0My8qCHdrUMfRwg3B5FPFTjOwddPzvTaHu0t9H1xiDVKOSpDxKItHiqnvYyMKqZVwaC5AIJvYk_bzVt8m7Vil
|
135
135
|
Accept-Encoding:
|
136
136
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
137
137
|
Accept:
|
@@ -142,17 +142,17 @@ http_interactions:
|
|
142
142
|
message: No Content
|
143
143
|
headers:
|
144
144
|
Date:
|
145
|
-
-
|
145
|
+
- Mon, 06 Apr 2015 15:01:31 GMT
|
146
146
|
Set-Cookie:
|
147
|
-
- BrowserId=
|
148
|
-
|
147
|
+
- BrowserId=x--P6F6eRS2VDmm5GzlWnw;Path=/;Domain=.salesforce.com;Expires=Fri,
|
148
|
+
05-Jun-2015 15:01:31 GMT
|
149
149
|
Expires:
|
150
150
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
151
151
|
Sforce-Limit-Info:
|
152
|
-
- api-usage=
|
152
|
+
- api-usage=24/15000
|
153
153
|
body:
|
154
154
|
encoding: UTF-8
|
155
155
|
string: ''
|
156
156
|
http_version:
|
157
|
-
recorded_at:
|
157
|
+
recorded_at: Mon, 06 Apr 2015 15:01:31 GMT
|
158
158
|
recorded_with: VCR 2.9.3
|
@@ -21,10 +21,10 @@ http_interactions:
|
|
21
21
|
message: OK
|
22
22
|
headers:
|
23
23
|
Date:
|
24
|
-
-
|
24
|
+
- Mon, 06 Apr 2015 15:01:20 GMT
|
25
25
|
Set-Cookie:
|
26
|
-
- BrowserId=
|
27
|
-
|
26
|
+
- BrowserId=9UkDltOYSSu1vP54zLx4QQ;Path=/;Domain=.salesforce.com;Expires=Fri,
|
27
|
+
05-Jun-2015 15:01:20 GMT
|
28
28
|
Expires:
|
29
29
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
30
30
|
Pragma:
|
@@ -37,22 +37,22 @@ http_interactions:
|
|
37
37
|
- chunked
|
38
38
|
body:
|
39
39
|
encoding: ASCII-8BIT
|
40
|
-
string: '{"id":"https://login.salesforce.com/id/00D1a000000H3O9EAK/0051a000000UGT8AAO","issued_at":"
|
40
|
+
string: '{"id":"https://login.salesforce.com/id/00D1a000000H3O9EAK/0051a000000UGT8AAO","issued_at":"1428332480120","token_type":"Bearer","instance_url":"https://<host>","signature":"EUwqb7x31VJ+yJ0lgsC7JwgnXdSItzgBAL8Kos1gDnQ=","access_token":"00D1a000000H3O9!AQ4AQFhXX0t0My8qCHdrUMfRwg3B5FPFTjOwddPzvTaHu0t9H1xiDVKOSpDxKItHiqnvYyMKqZVwaC5AIJvYk_bzVt8m7Vil"}'
|
41
41
|
http_version:
|
42
|
-
recorded_at:
|
42
|
+
recorded_at: Mon, 06 Apr 2015 15:01:20 GMT
|
43
43
|
- request:
|
44
44
|
method: post
|
45
45
|
uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c
|
46
46
|
body:
|
47
47
|
encoding: UTF-8
|
48
|
-
string: '{"Name":"
|
48
|
+
string: '{"Name":"Sample object"}'
|
49
49
|
headers:
|
50
50
|
User-Agent:
|
51
51
|
- Faraday v0.9.1
|
52
52
|
Content-Type:
|
53
53
|
- application/json
|
54
54
|
Authorization:
|
55
|
-
- OAuth 00D1a000000H3O9!
|
55
|
+
- OAuth 00D1a000000H3O9!AQ4AQFhXX0t0My8qCHdrUMfRwg3B5FPFTjOwddPzvTaHu0t9H1xiDVKOSpDxKItHiqnvYyMKqZVwaC5AIJvYk_bzVt8m7Vil
|
56
56
|
Accept-Encoding:
|
57
57
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
58
58
|
Accept:
|
@@ -63,28 +63,28 @@ http_interactions:
|
|
63
63
|
message: Created
|
64
64
|
headers:
|
65
65
|
Date:
|
66
|
-
-
|
66
|
+
- Mon, 06 Apr 2015 15:01:21 GMT
|
67
67
|
Set-Cookie:
|
68
|
-
- BrowserId=
|
69
|
-
|
68
|
+
- BrowserId=o6ko1pC1SeiZoZdFI8DKQw;Path=/;Domain=.salesforce.com;Expires=Fri,
|
69
|
+
05-Jun-2015 15:01:21 GMT
|
70
70
|
Expires:
|
71
71
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
72
72
|
Sforce-Limit-Info:
|
73
|
-
- api-usage=
|
73
|
+
- api-usage=24/15000
|
74
74
|
Location:
|
75
|
-
- "/services/data/v26.0/sobjects/CustomObject__c/
|
75
|
+
- "/services/data/v26.0/sobjects/CustomObject__c/a001a000001LGpiAAG"
|
76
76
|
Content-Type:
|
77
77
|
- application/json;charset=UTF-8
|
78
78
|
Transfer-Encoding:
|
79
79
|
- chunked
|
80
80
|
body:
|
81
81
|
encoding: ASCII-8BIT
|
82
|
-
string: '{"id":"
|
82
|
+
string: '{"id":"a001a000001LGpiAAG","success":true,"errors":[]}'
|
83
83
|
http_version:
|
84
|
-
recorded_at:
|
84
|
+
recorded_at: Mon, 06 Apr 2015 15:01:21 GMT
|
85
85
|
- request:
|
86
86
|
method: get
|
87
|
-
uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Name,%20Example_Field__c%20from%20CustomObject__c%20where%
|
87
|
+
uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Name,%20Example_Field__c%20from%20CustomObject__c%20where%20Id%20=%20%27a001a000001LGpiAAG%27
|
88
88
|
body:
|
89
89
|
encoding: US-ASCII
|
90
90
|
string: ''
|
@@ -92,7 +92,7 @@ http_interactions:
|
|
92
92
|
User-Agent:
|
93
93
|
- Faraday v0.9.1
|
94
94
|
Authorization:
|
95
|
-
- OAuth 00D1a000000H3O9!
|
95
|
+
- OAuth 00D1a000000H3O9!AQ4AQFhXX0t0My8qCHdrUMfRwg3B5FPFTjOwddPzvTaHu0t9H1xiDVKOSpDxKItHiqnvYyMKqZVwaC5AIJvYk_bzVt8m7Vil
|
96
96
|
Accept-Encoding:
|
97
97
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
98
98
|
Accept:
|
@@ -103,27 +103,27 @@ http_interactions:
|
|
103
103
|
message: OK
|
104
104
|
headers:
|
105
105
|
Date:
|
106
|
-
-
|
106
|
+
- Mon, 06 Apr 2015 15:01:23 GMT
|
107
107
|
Set-Cookie:
|
108
|
-
- BrowserId=
|
109
|
-
|
108
|
+
- BrowserId=_eUCOgR0Q0qTFj6plVjkFA;Path=/;Domain=.salesforce.com;Expires=Fri,
|
109
|
+
05-Jun-2015 15:01:23 GMT
|
110
110
|
Expires:
|
111
111
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
112
112
|
Sforce-Limit-Info:
|
113
|
-
- api-usage=
|
113
|
+
- api-usage=24/15000
|
114
114
|
Content-Type:
|
115
115
|
- application/json;charset=UTF-8
|
116
116
|
Transfer-Encoding:
|
117
117
|
- chunked
|
118
118
|
body:
|
119
119
|
encoding: ASCII-8BIT
|
120
|
-
string: '{"totalSize":
|
121
|
-
object","Example_Field__c":
|
120
|
+
string: '{"totalSize":1,"done":true,"records":[{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/a001a000001LGpiAAG"},"Id":"a001a000001LGpiAAG","SystemModstamp":"2015-04-06T15:01:21.000+0000","Name":"Sample
|
121
|
+
object","Example_Field__c":null}]}'
|
122
122
|
http_version:
|
123
|
-
recorded_at:
|
123
|
+
recorded_at: Mon, 06 Apr 2015 15:01:23 GMT
|
124
124
|
- request:
|
125
125
|
method: delete
|
126
|
-
uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/
|
126
|
+
uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001LGpiAAG
|
127
127
|
body:
|
128
128
|
encoding: US-ASCII
|
129
129
|
string: ''
|
@@ -131,7 +131,7 @@ http_interactions:
|
|
131
131
|
User-Agent:
|
132
132
|
- Faraday v0.9.1
|
133
133
|
Authorization:
|
134
|
-
- OAuth 00D1a000000H3O9!
|
134
|
+
- OAuth 00D1a000000H3O9!AQ4AQFhXX0t0My8qCHdrUMfRwg3B5FPFTjOwddPzvTaHu0t9H1xiDVKOSpDxKItHiqnvYyMKqZVwaC5AIJvYk_bzVt8m7Vil
|
135
135
|
Accept-Encoding:
|
136
136
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
137
137
|
Accept:
|
@@ -142,17 +142,17 @@ http_interactions:
|
|
142
142
|
message: No Content
|
143
143
|
headers:
|
144
144
|
Date:
|
145
|
-
-
|
145
|
+
- Mon, 06 Apr 2015 15:01:24 GMT
|
146
146
|
Set-Cookie:
|
147
|
-
- BrowserId=
|
148
|
-
|
147
|
+
- BrowserId=vXRooNVARU21TzA74Xl5eg;Path=/;Domain=.salesforce.com;Expires=Fri,
|
148
|
+
05-Jun-2015 15:01:24 GMT
|
149
149
|
Expires:
|
150
150
|
- Thu, 01 Jan 1970 00:00:00 GMT
|
151
151
|
Sforce-Limit-Info:
|
152
|
-
- api-usage=
|
152
|
+
- api-usage=24/15000
|
153
153
|
body:
|
154
154
|
encoding: UTF-8
|
155
155
|
string: ''
|
156
156
|
http_version:
|
157
|
-
recorded_at:
|
157
|
+
recorded_at: Mon, 06 Apr 2015 15:01:24 GMT
|
158
158
|
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,194 @@
|
|
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
|
+
- Mon, 06 Apr 2015 19:27:38 GMT
|
25
|
+
Set-Cookie:
|
26
|
+
- BrowserId=LUqjfcxfRJyZBEi4RpKjng;Path=/;Domain=.salesforce.com;Expires=Fri,
|
27
|
+
05-Jun-2015 19:27:38 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":"1428348459031","token_type":"Bearer","instance_url":"https://<host>","signature":"epbxVf//yuoyezzkg/9e3hPpBbMrlVw7bI+oMbfRIdw=","access_token":"00D1a000000H3O9!AQ4AQEol4wrcAcAfVF3HH0vTJXCmqHaqBZX0.AfMcJFa2P3Ssl68tDLqC_BJKakn3tKiFCy4SzendJ0gWnbHWkqrzvFuNH6B"}'
|
41
|
+
http_version:
|
42
|
+
recorded_at: Mon, 06 Apr 2015 19:27:38 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":"Custom object","Example_Field__c":"Some sample text"}'
|
49
|
+
headers:
|
50
|
+
User-Agent:
|
51
|
+
- Faraday v0.9.1
|
52
|
+
Content-Type:
|
53
|
+
- application/json
|
54
|
+
Authorization:
|
55
|
+
- OAuth 00D1a000000H3O9!AQ4AQEol4wrcAcAfVF3HH0vTJXCmqHaqBZX0.AfMcJFa2P3Ssl68tDLqC_BJKakn3tKiFCy4SzendJ0gWnbHWkqrzvFuNH6B
|
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
|
+
- Mon, 06 Apr 2015 19:27:39 GMT
|
67
|
+
Set-Cookie:
|
68
|
+
- BrowserId=-62NedQVTxaHHEhk1U4w4w;Path=/;Domain=.salesforce.com;Expires=Fri,
|
69
|
+
05-Jun-2015 19:27:39 GMT
|
70
|
+
Expires:
|
71
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
72
|
+
Sforce-Limit-Info:
|
73
|
+
- api-usage=53/15000
|
74
|
+
Location:
|
75
|
+
- "/services/data/v26.0/sobjects/CustomObject__c/a001a000001LHpfAAG"
|
76
|
+
Content-Type:
|
77
|
+
- application/json;charset=UTF-8
|
78
|
+
Transfer-Encoding:
|
79
|
+
- chunked
|
80
|
+
body:
|
81
|
+
encoding: ASCII-8BIT
|
82
|
+
string: '{"id":"a001a000001LHpfAAG","success":true,"errors":[]}'
|
83
|
+
http_version:
|
84
|
+
recorded_at: Mon, 06 Apr 2015 19:27:39 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%27a001a000001LHpfAAG%27
|
88
|
+
body:
|
89
|
+
encoding: US-ASCII
|
90
|
+
string: ''
|
91
|
+
headers:
|
92
|
+
User-Agent:
|
93
|
+
- Faraday v0.9.1
|
94
|
+
Authorization:
|
95
|
+
- OAuth 00D1a000000H3O9!AQ4AQEol4wrcAcAfVF3HH0vTJXCmqHaqBZX0.AfMcJFa2P3Ssl68tDLqC_BJKakn3tKiFCy4SzendJ0gWnbHWkqrzvFuNH6B
|
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
|
+
- Mon, 06 Apr 2015 19:27:40 GMT
|
107
|
+
Set-Cookie:
|
108
|
+
- BrowserId=KQ1mh36fQrC7w44C7ULJow;Path=/;Domain=.salesforce.com;Expires=Fri,
|
109
|
+
05-Jun-2015 19:27:40 GMT
|
110
|
+
Expires:
|
111
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
112
|
+
Sforce-Limit-Info:
|
113
|
+
- api-usage=54/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/a001a000001LHpfAAG"},"Id":"a001a000001LHpfAAG","SystemModstamp":"2015-04-06T19:27:40.000+0000","Name":"Custom
|
121
|
+
object","Example_Field__c":"Some sample text"}]}'
|
122
|
+
http_version:
|
123
|
+
recorded_at: Mon, 06 Apr 2015 19:27:41 GMT
|
124
|
+
- request:
|
125
|
+
method: patch
|
126
|
+
uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001LHpfAAG
|
127
|
+
body:
|
128
|
+
encoding: UTF-8
|
129
|
+
string: '{"Name":"Some new name","Example_Field__c":"New sample text"}'
|
130
|
+
headers:
|
131
|
+
User-Agent:
|
132
|
+
- Faraday v0.9.1
|
133
|
+
Content-Type:
|
134
|
+
- application/json
|
135
|
+
Authorization:
|
136
|
+
- OAuth 00D1a000000H3O9!AQ4AQEol4wrcAcAfVF3HH0vTJXCmqHaqBZX0.AfMcJFa2P3Ssl68tDLqC_BJKakn3tKiFCy4SzendJ0gWnbHWkqrzvFuNH6B
|
137
|
+
Accept-Encoding:
|
138
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
139
|
+
Accept:
|
140
|
+
- "*/*"
|
141
|
+
response:
|
142
|
+
status:
|
143
|
+
code: 204
|
144
|
+
message: No Content
|
145
|
+
headers:
|
146
|
+
Date:
|
147
|
+
- Mon, 06 Apr 2015 19:27:42 GMT
|
148
|
+
Set-Cookie:
|
149
|
+
- BrowserId=k7CV_an-TPaQLzPu5_GIkQ;Path=/;Domain=.salesforce.com;Expires=Fri,
|
150
|
+
05-Jun-2015 19:27:42 GMT
|
151
|
+
Expires:
|
152
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
153
|
+
Sforce-Limit-Info:
|
154
|
+
- api-usage=54/15000
|
155
|
+
body:
|
156
|
+
encoding: UTF-8
|
157
|
+
string: ''
|
158
|
+
http_version:
|
159
|
+
recorded_at: Mon, 06 Apr 2015 19:27:42 GMT
|
160
|
+
- request:
|
161
|
+
method: delete
|
162
|
+
uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001LHpfAAG
|
163
|
+
body:
|
164
|
+
encoding: US-ASCII
|
165
|
+
string: ''
|
166
|
+
headers:
|
167
|
+
User-Agent:
|
168
|
+
- Faraday v0.9.1
|
169
|
+
Authorization:
|
170
|
+
- OAuth 00D1a000000H3O9!AQ4AQEol4wrcAcAfVF3HH0vTJXCmqHaqBZX0.AfMcJFa2P3Ssl68tDLqC_BJKakn3tKiFCy4SzendJ0gWnbHWkqrzvFuNH6B
|
171
|
+
Accept-Encoding:
|
172
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
173
|
+
Accept:
|
174
|
+
- "*/*"
|
175
|
+
response:
|
176
|
+
status:
|
177
|
+
code: 204
|
178
|
+
message: No Content
|
179
|
+
headers:
|
180
|
+
Date:
|
181
|
+
- Mon, 06 Apr 2015 19:27:43 GMT
|
182
|
+
Set-Cookie:
|
183
|
+
- BrowserId=HeEi4Ul7SQ2h2IQOyYeSyA;Path=/;Domain=.salesforce.com;Expires=Fri,
|
184
|
+
05-Jun-2015 19:27:43 GMT
|
185
|
+
Expires:
|
186
|
+
- Thu, 01 Jan 1970 00:00:00 GMT
|
187
|
+
Sforce-Limit-Info:
|
188
|
+
- api-usage=55/15000
|
189
|
+
body:
|
190
|
+
encoding: UTF-8
|
191
|
+
string: ''
|
192
|
+
http_version:
|
193
|
+
recorded_at: Mon, 06 Apr 2015 19:27:43 GMT
|
194
|
+
recorded_with: VCR 2.9.3
|