salesforce_bulk2 0.5.0

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 (47) hide show
  1. data/.gitignore +4 -0
  2. data/Gemfile +2 -0
  3. data/README.md +143 -0
  4. data/Rakefile +22 -0
  5. data/lib/salesforce_bulk/batch.rb +86 -0
  6. data/lib/salesforce_bulk/batch_result.rb +39 -0
  7. data/lib/salesforce_bulk/batch_result_collection.rb +29 -0
  8. data/lib/salesforce_bulk/client.rb +209 -0
  9. data/lib/salesforce_bulk/connection.rb +155 -0
  10. data/lib/salesforce_bulk/core_extensions/string.rb +14 -0
  11. data/lib/salesforce_bulk/job.rb +126 -0
  12. data/lib/salesforce_bulk/query_result_collection.rb +48 -0
  13. data/lib/salesforce_bulk/salesforce_error.rb +30 -0
  14. data/lib/salesforce_bulk/version.rb +3 -0
  15. data/lib/salesforce_bulk.rb +17 -0
  16. data/salesforce_bulk.gemspec +27 -0
  17. data/test/fixtures/batch_create_request.csv +3 -0
  18. data/test/fixtures/batch_create_response.xml +13 -0
  19. data/test/fixtures/batch_info_list_response.xml +27 -0
  20. data/test/fixtures/batch_info_response.xml +13 -0
  21. data/test/fixtures/batch_result_list_response.csv +3 -0
  22. data/test/fixtures/config.yml +7 -0
  23. data/test/fixtures/invalid_batch_error.xml +5 -0
  24. data/test/fixtures/invalid_error.xml +5 -0
  25. data/test/fixtures/invalid_job_error.xml +5 -0
  26. data/test/fixtures/invalid_session_error.xml +5 -0
  27. data/test/fixtures/job_abort_request.xml +1 -0
  28. data/test/fixtures/job_abort_response.xml +25 -0
  29. data/test/fixtures/job_close_request.xml +1 -0
  30. data/test/fixtures/job_close_response.xml +25 -0
  31. data/test/fixtures/job_create_request.xml +1 -0
  32. data/test/fixtures/job_create_response.xml +25 -0
  33. data/test/fixtures/job_info_response.xml +25 -0
  34. data/test/fixtures/login_error.xml +1 -0
  35. data/test/fixtures/login_request.xml +1 -0
  36. data/test/fixtures/login_response.xml +39 -0
  37. data/test/fixtures/query_result_list_response.xml +1 -0
  38. data/test/fixtures/query_result_response.csv +5 -0
  39. data/test/lib/test_batch.rb +258 -0
  40. data/test/lib/test_batch_result.rb +40 -0
  41. data/test/lib/test_core_extensions.rb +15 -0
  42. data/test/lib/test_initialization.rb +86 -0
  43. data/test/lib/test_job.rb +256 -0
  44. data/test/lib/test_query_result_collection.rb +87 -0
  45. data/test/lib/test_simple_api.rb +79 -0
  46. data/test/test_helper.rb +32 -0
  47. metadata +222 -0
@@ -0,0 +1,14 @@
1
+ class String
2
+ # For converting "true" and "false" string values returned
3
+ # by Salesforce Bulk API in batch results to real booleans.
4
+ def to_b
5
+ if present?
6
+ if lstrip.rstrip.casecmp("true") == 0
7
+ return true
8
+ elsif lstrip.rstrip.casecmp("false") == 0
9
+ return false
10
+ end
11
+ end
12
+ self
13
+ end
14
+ end
@@ -0,0 +1,126 @@
1
+ module SalesforceBulk
2
+ class Job
3
+ attr_accessor :client
4
+
5
+ attr_reader :concurrency_mode
6
+ attr_reader :external_id_field_name
7
+ attr_reader :data
8
+
9
+ @@fields = [:id, :operation, :object, :createdById, :state, :createdDate,
10
+ :systemModstamp, :externalIdFieldName, :concurrencyMode, :contentType, :numberBatchesQueued,
11
+ :numberBatchesInProgress, :numberBatchesCompleted, :numberBatchesFailed, :totalBatches,
12
+ :retries, :numberRecordsProcessed, :numberRecordsFailed, :totalProcessingTime,
13
+ :apiActiveProcessingTime, :apexProcessingTime, :apiVersion]
14
+
15
+ @@valid_operations = [:delete, :insert, :update, :upsert, :query]
16
+ @@valid_concurrency_modes = ['Parallel', 'Serial']
17
+
18
+
19
+ @@fields.each do |field|
20
+ attr_reader field.to_s.underscore.to_sym
21
+ end
22
+
23
+ def self.valid_operation? operation
24
+ @@valid_operations.include?(operation)
25
+ end
26
+
27
+ def self.valid_concurrency_mode? mode
28
+ @@valid_concurrency_modes.include?(concurrency_mode)
29
+ end
30
+
31
+ def initialize xml_data, client
32
+ update(xml_data)
33
+ @client = client
34
+ end
35
+
36
+ def update xml_data
37
+ #Check fields
38
+ xml_data.assert_valid_keys(@@fields)
39
+
40
+ #Assign object
41
+ @xml_data = xml_data
42
+
43
+ #Mass assign the defaults
44
+ @@fields.each do |field|
45
+ instance_variable_set(field, xml_data[field])
46
+ end
47
+
48
+ #Special cases/formats
49
+ @created_date = DateTime.parse(xml_data['createdDate'])
50
+ @system_modstamp = DateTime.parse(xml_data['systemModstamp'])
51
+
52
+ @retries = xml_data['retries'].to_i
53
+ @api_version = xml_data['apiVersion'].to_i
54
+ @number_batches_queued = xml_data['numberBatchesQueued'].to_i
55
+ @number_batches_in_progress = xml_data['numberBatchesInProgress'].to_i
56
+ @number_batches_completed = xml_data['numberBatchesCompleted'].to_i
57
+ @number_batches_failed = xml_data['numberBatchesFailed'].to_i
58
+ @total_batches = xml_data['totalBatches'].to_i
59
+ @number_records_processed = xml_data['numberRecordsProcessed'].to_i
60
+ @number_records_failed = xml_data['numberRecordsFailed'].to_i
61
+ @total_processing_time = xml_data['totalProcessingTime'].to_i
62
+ @api_active_processing_time = xml_data['apiActiveProcessingTime'].to_i
63
+ @apex_processing_time = xml_data['apexProcessingTime'].to_i
64
+ end
65
+
66
+ def batch_list
67
+ @client.get_batch_list(@id)
68
+ end
69
+
70
+ def create_batch data
71
+ @client.create_batch(data)
72
+ end
73
+
74
+ def add_batch data
75
+ @client.add_batch(data)
76
+ end
77
+
78
+ def close
79
+ update(@client.close(@id))
80
+ end
81
+
82
+ def abort
83
+ update(@client.abort(@id))
84
+ end
85
+
86
+ def refresh
87
+ update(@client.get_job(@id))
88
+ end
89
+
90
+ #Statuses
91
+ def batches_finished?
92
+ @number_batches_queued == 0 and
93
+ @number_batches_in_progress == 0
94
+ end
95
+
96
+ def get_results
97
+ batch_list.map(&:result).flatten
98
+ end
99
+
100
+ def finished?
101
+ failed? or
102
+ aborted? or
103
+ (closed? and batches_finished?)
104
+ end
105
+
106
+ def failed?
107
+ state? 'Failed'
108
+ end
109
+
110
+ def aborted?
111
+ state? 'Aborted'
112
+ end
113
+
114
+ def closed?
115
+ state? 'Closed'
116
+ end
117
+
118
+ def open?
119
+ state? 'Open'
120
+ end
121
+
122
+ def state?(value)
123
+ @state.present? && @state.casecmp(value) == 0
124
+ end
125
+ end
126
+ end
@@ -0,0 +1,48 @@
1
+ module SalesforceBulk
2
+ class QueryResultCollection < Array
3
+
4
+ attr_reader :client
5
+ attr_reader :batch_id
6
+ attr_reader :job_id
7
+ attr_reader :result_id
8
+ attr_reader :result_ids
9
+
10
+ def initialize(client, job_id, batch_id, result_id=nil, result_ids=[])
11
+ @client = client
12
+ @job_id = job_id
13
+ @batch_id = batch_id
14
+ @result_id = result_id
15
+ @result_ids = result_ids
16
+ @current_index = result_ids.index(result_id) || 0
17
+ end
18
+
19
+ def next?
20
+ @result_ids.present? && @current_index < @result_ids.length - 1
21
+ end
22
+
23
+ def next
24
+ if next?
25
+ replace(@client.query_result(job_id, batch_id, result_ids[@current_index + 1]))
26
+ @current_index += 1
27
+ @result_id = @result_ids[@current_index]
28
+ end
29
+
30
+ self
31
+ end
32
+
33
+ def previous?
34
+ @result_ids.present? && @current_index > 0
35
+ end
36
+
37
+ def previous
38
+ if previous?
39
+ replace(@client.query_result(job_id, batch_id, result_ids[@current_index - 1]))
40
+ @current_index -= 1
41
+ @result_id = @result_ids[@current_index]
42
+ end
43
+
44
+ self
45
+ end
46
+
47
+ end
48
+ end
@@ -0,0 +1,30 @@
1
+ module SalesforceBulk
2
+ # An exception raised when any non successful request is made through the Salesforce Bulk API.
3
+ class SalesforceError < StandardError
4
+ # The Net::HTTPResponse instance from the API call.
5
+ attr_accessor :response
6
+ # The status code from the server response body.
7
+ attr_accessor :error_code
8
+
9
+ def initialize(response)
10
+ self.response = response
11
+
12
+ data = XmlSimple.xml_in(response.body, 'ForceArray' => false)
13
+
14
+ if data
15
+ # seems responses for CSV requests use a different XML return format
16
+ # (use invalid_error.xml for reference)
17
+ if !data['exceptionMessage'].nil?
18
+ message = data['exceptionMessage']
19
+ else
20
+ # SOAP error response
21
+ message = data['Body']['Fault']['faultstring']
22
+ end
23
+
24
+ self.error_code = response.code
25
+ end
26
+
27
+ super(message)
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,3 @@
1
+ module SalesforceBulk
2
+ VERSION = "0.5.0"
3
+ end
@@ -0,0 +1,17 @@
1
+ require 'net/https'
2
+ require 'xmlsimple'
3
+ require 'csv'
4
+ require 'active_support'
5
+ require 'active_support/inflector'
6
+ require 'active_support/core_ext/object/blank'
7
+ require 'active_support/core_ext/hash/keys'
8
+ require 'salesforce_bulk/version'
9
+ require 'salesforce_bulk/core_extensions/string'
10
+ require 'salesforce_bulk/salesforce_error'
11
+ require 'salesforce_bulk/connection'
12
+ require 'salesforce_bulk/client'
13
+ require 'salesforce_bulk/job'
14
+ require 'salesforce_bulk/batch'
15
+ require 'salesforce_bulk/batch_result'
16
+ require 'salesforce_bulk/batch_result_collection'
17
+ require 'salesforce_bulk/query_result_collection'
@@ -0,0 +1,27 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "salesforce_bulk/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "salesforce_bulk2"
7
+ s.version = SalesforceBulk::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Adam Kerr", "Jorge Valdivia","Javier Julio"]
10
+ s.email = ["ajrkerr@gmail.com", "jorge@valdivia.me","jjfutbol@gmail.com"]
11
+ s.homepage = "https://github.com/ajrkerr/salesforce_bulk"
12
+ s.summary = %q{Ruby support for the Salesforce Bulk API}
13
+ s.description = %q{This gem is a simple interface to the Salesforce Bulk API providing support for insert, update, upsert, delete, and query.}
14
+
15
+ s.files = `git ls-files`.split("\n")
16
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
+ s.require_paths = ["lib"]
19
+
20
+ s.add_dependency "active_support"
21
+ s.add_dependency "xml-simple"
22
+
23
+ s.add_development_dependency "mocha"
24
+ s.add_development_dependency "rake"
25
+ s.add_development_dependency "shoulda"
26
+ s.add_development_dependency "webmock"
27
+ end
@@ -0,0 +1,3 @@
1
+ Id__c,Title__c,IsPreview__c
2
+ 12345,This is a test video,
3
+ 23456,A second test!,true
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><batchInfo
2
+ xmlns="http://www.force.com/2009/06/asyncapi/dataload">
3
+ <id>751E00000004ZmUIAU</id>
4
+ <jobId>750E00000004NRfIAM</jobId>
5
+ <state>Queued</state>
6
+ <createdDate>2012-06-02T21:03:56.000Z</createdDate>
7
+ <systemModstamp>2012-06-02T21:03:56.000Z</systemModstamp>
8
+ <numberRecordsProcessed>0</numberRecordsProcessed>
9
+ <numberRecordsFailed>0</numberRecordsFailed>
10
+ <totalProcessingTime>0</totalProcessingTime>
11
+ <apiActiveProcessingTime>0</apiActiveProcessingTime>
12
+ <apexProcessingTime>0</apexProcessingTime>
13
+ </batchInfo>
@@ -0,0 +1,27 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><batchInfoList
2
+ xmlns="http://www.force.com/2009/06/asyncapi/dataload">
3
+ <batchInfo>
4
+ <id>751E00000004ZRbIAM</id>
5
+ <jobId>750E00000004N97IAE</jobId>
6
+ <state>Completed</state>
7
+ <createdDate>2012-05-31T01:22:47.000Z</createdDate>
8
+ <systemModstamp>2012-05-31T01:22:47.000Z</systemModstamp>
9
+ <numberRecordsProcessed>2</numberRecordsProcessed>
10
+ <numberRecordsFailed>0</numberRecordsFailed>
11
+ <totalProcessingTime>72</totalProcessingTime>
12
+ <apiActiveProcessingTime>28</apiActiveProcessingTime>
13
+ <apexProcessingTime>0</apexProcessingTime>
14
+ </batchInfo>
15
+ <batchInfo>
16
+ <id>751E00000004ZQsIAM</id>
17
+ <jobId>750E00000004N97IAE</jobId>
18
+ <state>Completed</state>
19
+ <createdDate>2012-05-31T01:23:20.000Z</createdDate>
20
+ <systemModstamp>2012-05-31T01:23:20.000Z</systemModstamp>
21
+ <numberRecordsProcessed>2</numberRecordsProcessed>
22
+ <numberRecordsFailed>0</numberRecordsFailed>
23
+ <totalProcessingTime>72</totalProcessingTime>
24
+ <apiActiveProcessingTime>28</apiActiveProcessingTime>
25
+ <apexProcessingTime>0</apexProcessingTime>
26
+ </batchInfo>
27
+ </batchInfoList>
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><batchInfo
2
+ xmlns="http://www.force.com/2009/06/asyncapi/dataload">
3
+ <id>751E00000004ZRbIAM</id>
4
+ <jobId>750E00000004N97IAE</jobId>
5
+ <state>Completed</state>
6
+ <createdDate>2012-05-31T01:22:47.000Z</createdDate>
7
+ <systemModstamp>2012-05-31T01:22:47.000Z</systemModstamp>
8
+ <numberRecordsProcessed>2</numberRecordsProcessed>
9
+ <numberRecordsFailed>0</numberRecordsFailed>
10
+ <totalProcessingTime>72</totalProcessingTime>
11
+ <apiActiveProcessingTime>28</apiActiveProcessingTime>
12
+ <apexProcessingTime>0</apexProcessingTime>
13
+ </batchInfo>
@@ -0,0 +1,3 @@
1
+ "Id","Success","Created","Error"
2
+ "a00E0000002V30LIAS","true","false",""
3
+ "a00E0000002V30MIAS","true","false",""
@@ -0,0 +1,7 @@
1
+ ---
2
+ username: MyUsername
3
+ password: MyPassword
4
+ token: MySecurityToken
5
+ debugging: true
6
+ host: myhost.mydomain.com
7
+ version: 88.0
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <error xmlns="http://www.force.com/2009/06/asyncapi/dataload">
3
+ <exceptionCode>InvalidBatch</exceptionCode>
4
+ <exceptionMessage>Records not processed</exceptionMessage>
5
+ </error>
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><error
2
+ xmlns="http://www.force.com/2009/06/asyncapi/dataload">
3
+ <exceptionCode>UnsupportedContentType</exceptionCode>
4
+ <exceptionMessage>Unsupported content type: text/cs; charset=UTF-8</exceptionMessage>
5
+ </error>
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><error
2
+ xmlns="http://www.force.com/2009/06/asyncapi/dataload">
3
+ <exceptionCode>InvalidJob</exceptionCode>
4
+ <exceptionMessage>Unable to find object: Video__c</exceptionMessage>
5
+ </error>
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><error
2
+ xmlns="http://www.force.com/2009/06/asyncapi/dataload">
3
+ <exceptionCode>InvalidSessionId</exceptionCode>
4
+ <exceptionMessage>Invalid session id</exceptionMessage>
5
+ </error>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="utf-8"?><jobInfo xmlns="http://www.force.com/2009/06/asyncapi/dataload"><state>Aborted</state></jobInfo>
@@ -0,0 +1,25 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><jobInfo
2
+ xmlns="http://www.force.com/2009/06/asyncapi/dataload">
3
+ <id>750E00000004N1NIAU</id>
4
+ <operation>upsert</operation>
5
+ <object>VideoEvent__c</object>
6
+ <createdById>005E00000017spfIAA</createdById>
7
+ <createdDate>2012-05-30T00:16:04.000Z</createdDate>
8
+ <systemModstamp>2012-05-30T00:16:04.000Z</systemModstamp>
9
+ <state>Aborted</state>
10
+ <externalIdFieldName>Id__c</externalIdFieldName>
11
+ <concurrencyMode>Parallel</concurrencyMode>
12
+ <contentType>CSV</contentType>
13
+ <numberBatchesQueued>0</numberBatchesQueued>
14
+ <numberBatchesInProgress>0</numberBatchesInProgress>
15
+ <numberBatchesCompleted>0</numberBatchesCompleted>
16
+ <numberBatchesFailed>0</numberBatchesFailed>
17
+ <numberBatchesTotal>0</numberBatchesTotal>
18
+ <numberRecordsProcessed>0</numberRecordsProcessed>
19
+ <numberRetries>0</numberRetries>
20
+ <apiVersion>24.0</apiVersion>
21
+ <numberRecordsFailed>0</numberRecordsFailed>
22
+ <totalProcessingTime>0</totalProcessingTime>
23
+ <apiActiveProcessingTime>0</apiActiveProcessingTime>
24
+ <apexProcessingTime>0</apexProcessingTime>
25
+ </jobInfo>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="utf-8"?><jobInfo xmlns="http://www.force.com/2009/06/asyncapi/dataload"><state>Closed</state></jobInfo>
@@ -0,0 +1,25 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><jobInfo
2
+ xmlns="http://www.force.com/2009/06/asyncapi/dataload">
3
+ <id>750E00000004MzbIAE</id>
4
+ <operation>upsert</operation>
5
+ <object>VideoEvent__c</object>
6
+ <createdById>005E00000017spfIAA</createdById>
7
+ <createdDate>2012-05-29T23:51:53.000Z</createdDate>
8
+ <systemModstamp>2012-05-29T23:51:53.000Z</systemModstamp>
9
+ <state>Closed</state>
10
+ <externalIdFieldName>Id__c</externalIdFieldName>
11
+ <concurrencyMode>Parallel</concurrencyMode>
12
+ <contentType>CSV</contentType>
13
+ <numberBatchesQueued>0</numberBatchesQueued>
14
+ <numberBatchesInProgress>0</numberBatchesInProgress>
15
+ <numberBatchesCompleted>0</numberBatchesCompleted>
16
+ <numberBatchesFailed>0</numberBatchesFailed>
17
+ <numberBatchesTotal>0</numberBatchesTotal>
18
+ <numberRecordsProcessed>0</numberRecordsProcessed>
19
+ <numberRetries>0</numberRetries>
20
+ <apiVersion>24.0</apiVersion>
21
+ <numberRecordsFailed>0</numberRecordsFailed>
22
+ <totalProcessingTime>0</totalProcessingTime>
23
+ <apiActiveProcessingTime>0</apiActiveProcessingTime>
24
+ <apexProcessingTime>0</apexProcessingTime>
25
+ </jobInfo>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="utf-8"?><jobInfo xmlns="http://www.force.com/2009/06/asyncapi/dataload"><operation>upsert</operation><object>VideoEvent__c</object><externalIdFieldName>Id__c</externalIdFieldName><contentType>CSV</contentType></jobInfo>
@@ -0,0 +1,25 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <jobInfo xmlns="http://www.force.com/2009/06/asyncapi/dataload">
3
+ <id>750E00000004MzbIAE</id>
4
+ <operation>upsert</operation>
5
+ <object>VideoEvent__c</object>
6
+ <createdById>005E00000017spfIAA</createdById>
7
+ <createdDate>2012-05-29T21:50:47.000Z</createdDate>
8
+ <systemModstamp>2012-05-29T21:50:47.000Z</systemModstamp>
9
+ <state>Open</state>
10
+ <externalIdFieldName>Id__c</externalIdFieldName>
11
+ <concurrencyMode>Parallel</concurrencyMode>
12
+ <contentType>CSV</contentType>
13
+ <numberBatchesQueued>0</numberBatchesQueued>
14
+ <numberBatchesInProgress>0</numberBatchesInProgress>
15
+ <numberBatchesCompleted>0</numberBatchesCompleted>
16
+ <numberBatchesFailed>0</numberBatchesFailed>
17
+ <numberBatchesTotal>0</numberBatchesTotal>
18
+ <numberRecordsProcessed>0</numberRecordsProcessed>
19
+ <numberRetries>0</numberRetries>
20
+ <apiVersion>24.0</apiVersion>
21
+ <numberRecordsFailed>0</numberRecordsFailed>
22
+ <totalProcessingTime>0</totalProcessingTime>
23
+ <apiActiveProcessingTime>0</apiActiveProcessingTime>
24
+ <apexProcessingTime>0</apexProcessingTime>
25
+ </jobInfo>
@@ -0,0 +1,25 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><jobInfo
2
+ xmlns="http://www.force.com/2009/06/asyncapi/dataload">
3
+ <id>750E00000004N1mIAE</id>
4
+ <operation>upsert</operation>
5
+ <object>VideoEvent__c</object>
6
+ <createdById>005E00000017spfIAA</createdById>
7
+ <createdDate>2012-05-30T04:08:30.000Z</createdDate>
8
+ <systemModstamp>2012-05-30T04:08:30.000Z</systemModstamp>
9
+ <state>Open</state>
10
+ <externalIdFieldName>Id__c</externalIdFieldName>
11
+ <concurrencyMode>Parallel</concurrencyMode>
12
+ <contentType>CSV</contentType>
13
+ <numberBatchesQueued>0</numberBatchesQueued>
14
+ <numberBatchesInProgress>0</numberBatchesInProgress>
15
+ <numberBatchesCompleted>0</numberBatchesCompleted>
16
+ <numberBatchesFailed>0</numberBatchesFailed>
17
+ <numberBatchesTotal>0</numberBatchesTotal>
18
+ <numberRecordsProcessed>0</numberRecordsProcessed>
19
+ <numberRetries>0</numberRetries>
20
+ <apiVersion>24.0</apiVersion>
21
+ <numberRecordsFailed>0</numberRecordsFailed>
22
+ <totalProcessingTime>0</totalProcessingTime>
23
+ <apiActiveProcessingTime>0</apiActiveProcessingTime>
24
+ <apexProcessingTime>0</apexProcessingTime>
25
+ </jobInfo>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>sf:INVALID_LOGIN</faultcode><faultstring>INVALID_LOGIN: Invalid username, password, security token; or user locked out.</faultstring><detail><sf:LoginFault xsi:type="sf:LoginFault"><sf:exceptionCode>INVALID_LOGIN</sf:exceptionCode><sf:exceptionMessage>Invalid username, password, security token; or user locked out.</sf:exceptionMessage></sf:LoginFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="utf-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><n1:login xmlns:n1="urn:partner.soap.sforce.com"><n1:username>MyUsername</n1:username><n1:password>MyPasswordMySecurityToken</n1:password></n1:login></env:Body></env:Envelope>
@@ -0,0 +1,39 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3
+ <soapenv:Body>
4
+ <loginResponse>
5
+ <result>
6
+ <metadataServerUrl>https://na9-api.salesforce.com/services/Soap/m/24.0/00DE0000000YSKp</metadataServerUrl>
7
+ <passwordExpired>false</passwordExpired>
8
+ <sandbox>false</sandbox>
9
+ <serverUrl>https://na9-api.salesforce.com/services/Soap/u/24.0/00DE0000000YSKp</serverUrl>
10
+ <sessionId>00DE0000000YSKp!AQ4AQNQhDKLMORZx2NwZppuKfure.ChCmdI3S35PPxpNA5MHb3ZVxhYd5STM3euVJTI5.39s.jOBT.3mKdZ3BWFDdIrddS8O</sessionId>
11
+ <userId>005E00000017spfIAA</userId>
12
+ <userInfo>
13
+ <accessibilityMode>false</accessibilityMode>
14
+ <currencySymbol>$</currencySymbol>
15
+ <orgAttachmentFileSizeLimit>5242880</orgAttachmentFileSizeLimit>
16
+ <orgDefaultCurrencyIsoCode>USD</orgDefaultCurrencyIsoCode>
17
+ <orgDisallowHtmlAttachments>false</orgDisallowHtmlAttachments>
18
+ <orgHasPersonAccounts>false</orgHasPersonAccounts>
19
+ <organizationId>00DE0000000YSKpMAO</organizationId>
20
+ <organizationMultiCurrency>false</organizationMultiCurrency>
21
+ <organizationName>Gmail</organizationName>
22
+ <profileId>00eE0000000oANhIAM</profileId>
23
+ <roleId xsi:nil="true" />
24
+ <sessionSecondsValid>7200</sessionSecondsValid>
25
+ <userDefaultCurrencyIsoCode xsi:nil="true" />
26
+ <userEmail>jjfutbol@gmail.com</userEmail>
27
+ <userFullName>Javier Julio</userFullName>
28
+ <userId>005E00000017spfIAA</userId>
29
+ <userLanguage>en_US</userLanguage>
30
+ <userLocale>en_US</userLocale>
31
+ <userName>jjfutbol@gmail.com</userName>
32
+ <userTimeZone>America/Panama</userTimeZone>
33
+ <userType>Standard</userType>
34
+ <userUiSkin>Theme3</userUiSkin>
35
+ </userInfo>
36
+ </result>
37
+ </loginResponse>
38
+ </soapenv:Body>
39
+ </soapenv:Envelope>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><result-list xmlns="http://www.force.com/2009/06/asyncapi/dataload"><result>752E0000000TNaq</result></result-list>
@@ -0,0 +1,5 @@
1
+ "Id__c","Title__c","IsPreview__c"
2
+ "23456.0","A second test!","true"
3
+ "12345.0","This is a test video","false"
4
+ "3456.0","Some long title","false"
5
+ "4567.0","Another test title for testing","true"