Class: SalesforceBulk::Job
- Inherits:
-
Object
- Object
- SalesforceBulk::Job
- Defined in:
- lib/salesforce_bulk/job.rb
Instance Attribute Summary collapse
-
#apex_processing_time ⇒ Object
Returns the value of attribute apex_processing_time.
-
#api_active_processing_time ⇒ Object
Returns the value of attribute api_active_processing_time.
-
#api_version ⇒ Object
Returns the value of attribute api_version.
-
#completed_at ⇒ Object
Returns the value of attribute completed_at.
-
#completed_batches ⇒ Object
Returns the value of attribute completed_batches.
-
#concurrency_mode ⇒ Object
Returns the value of attribute concurrency_mode.
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#created_by ⇒ Object
Returns the value of attribute created_by.
-
#external_id_field_name ⇒ Object
Returns the value of attribute external_id_field_name.
-
#failed_batches ⇒ Object
Returns the value of attribute failed_batches.
-
#failed_records ⇒ Object
Returns the value of attribute failed_records.
-
#id ⇒ Object
Returns the value of attribute id.
-
#in_progress_batches ⇒ Object
Returns the value of attribute in_progress_batches.
-
#operation ⇒ Object
Returns the value of attribute operation.
-
#processed_records ⇒ Object
Returns the value of attribute processed_records.
-
#queued_batches ⇒ Object
Returns the value of attribute queued_batches.
-
#retries ⇒ Object
Returns the value of attribute retries.
-
#sobject ⇒ Object
Returns the value of attribute sobject.
-
#state ⇒ Object
Returns the value of attribute state.
-
#total_batches ⇒ Object
Returns the value of attribute total_batches.
-
#total_processing_time ⇒ Object
Returns the value of attribute total_processing_time.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#apex_processing_time ⇒ Object
Returns the value of attribute apex_processing_time.
22 23 24 |
# File 'lib/salesforce_bulk/job.rb', line 22 def apex_processing_time @apex_processing_time end |
#api_active_processing_time ⇒ Object
Returns the value of attribute api_active_processing_time.
23 24 25 |
# File 'lib/salesforce_bulk/job.rb', line 23 def api_active_processing_time @api_active_processing_time end |
#api_version ⇒ Object
Returns the value of attribute api_version.
25 26 27 |
# File 'lib/salesforce_bulk/job.rb', line 25 def api_version @api_version end |
#completed_at ⇒ Object
Returns the value of attribute completed_at.
12 13 14 |
# File 'lib/salesforce_bulk/job.rb', line 12 def completed_at @completed_at end |
#completed_batches ⇒ Object
Returns the value of attribute completed_batches.
16 17 18 |
# File 'lib/salesforce_bulk/job.rb', line 16 def completed_batches @completed_batches end |
#concurrency_mode ⇒ Object
Returns the value of attribute concurrency_mode.
4 5 6 |
# File 'lib/salesforce_bulk/job.rb', line 4 def concurrency_mode @concurrency_mode end |
#content_type ⇒ Object
Returns the value of attribute content_type.
13 14 15 |
# File 'lib/salesforce_bulk/job.rb', line 13 def content_type @content_type end |
#created_at ⇒ Object
Returns the value of attribute created_at.
11 12 13 |
# File 'lib/salesforce_bulk/job.rb', line 11 def created_at @created_at end |
#created_by ⇒ Object
Returns the value of attribute created_by.
10 11 12 |
# File 'lib/salesforce_bulk/job.rb', line 10 def created_by @created_by end |
#external_id_field_name ⇒ Object
Returns the value of attribute external_id_field_name.
5 6 7 |
# File 'lib/salesforce_bulk/job.rb', line 5 def external_id_field_name @external_id_field_name end |
#failed_batches ⇒ Object
Returns the value of attribute failed_batches.
17 18 19 |
# File 'lib/salesforce_bulk/job.rb', line 17 def failed_batches @failed_batches end |
#failed_records ⇒ Object
Returns the value of attribute failed_records.
20 21 22 |
# File 'lib/salesforce_bulk/job.rb', line 20 def failed_records @failed_records end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/salesforce_bulk/job.rb', line 6 def id @id end |
#in_progress_batches ⇒ Object
Returns the value of attribute in_progress_batches.
15 16 17 |
# File 'lib/salesforce_bulk/job.rb', line 15 def in_progress_batches @in_progress_batches end |
#operation ⇒ Object
Returns the value of attribute operation.
7 8 9 |
# File 'lib/salesforce_bulk/job.rb', line 7 def operation @operation end |
#processed_records ⇒ Object
Returns the value of attribute processed_records.
21 22 23 |
# File 'lib/salesforce_bulk/job.rb', line 21 def processed_records @processed_records end |
#queued_batches ⇒ Object
Returns the value of attribute queued_batches.
14 15 16 |
# File 'lib/salesforce_bulk/job.rb', line 14 def queued_batches @queued_batches end |
#retries ⇒ Object
Returns the value of attribute retries.
19 20 21 |
# File 'lib/salesforce_bulk/job.rb', line 19 def retries @retries end |
#sobject ⇒ Object
Returns the value of attribute sobject.
8 9 10 |
# File 'lib/salesforce_bulk/job.rb', line 8 def sobject @sobject end |
#state ⇒ Object
Returns the value of attribute state.
9 10 11 |
# File 'lib/salesforce_bulk/job.rb', line 9 def state @state end |
#total_batches ⇒ Object
Returns the value of attribute total_batches.
18 19 20 |
# File 'lib/salesforce_bulk/job.rb', line 18 def total_batches @total_batches end |
#total_processing_time ⇒ Object
Returns the value of attribute total_processing_time.
24 25 26 |
# File 'lib/salesforce_bulk/job.rb', line 24 def total_processing_time @total_processing_time end |
Class Method Details
.new_from_xml(data) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/salesforce_bulk/job.rb', line 27 def self.new_from_xml(data) job = self.new job.id = data['id'] job.operation = data['operation'] job.sobject = data['object'] job.created_by = data['createdById'] job.state = data['state'] job.created_at = DateTime.parse(data['createdDate']) job.completed_at = DateTime.parse(data['systemModstamp']) job.external_id_field_name = data['externalIdFieldName'] job.concurrency_mode = data['concurrencyMode'] job.content_type = data['contentType'] job.queued_batches = data['numberBatchesQueued'].to_i job.in_progress_batches = data['numberBatchesInProgress'].to_i job.completed_batches = data['numberBatchesCompleted'].to_i job.failed_batches = data['numberBatchesFailed'].to_i job.total_batches = data['numberBatchesTotal'].to_i job.retries = data['retries'].to_i job.processed_records = data['numberRecordsProcessed'].to_i job.failed_records = data['numberRecordsFailed'].to_i job.total_processing_time = data['totalProcessingTime'].to_i job.api_active_processing_time = data['apiActiveProcessingTime'].to_i job.apex_processing_time = data['apexProcessingTime'].to_i job.api_version = data['apiVersion'].to_i job end |
Instance Method Details
#aborted? ⇒ Boolean
54 55 56 |
# File 'lib/salesforce_bulk/job.rb', line 54 def aborted? state? 'Aborted' end |
#closed? ⇒ Boolean
58 59 60 |
# File 'lib/salesforce_bulk/job.rb', line 58 def closed? state? 'Closed' end |
#open? ⇒ Boolean
62 63 64 |
# File 'lib/salesforce_bulk/job.rb', line 62 def open? state? 'Open' end |
#state?(value) ⇒ Boolean
66 67 68 |
# File 'lib/salesforce_bulk/job.rb', line 66 def state?(value) !self.state.nil? && self.state.casecmp(value) == 0 end |