Class: ActiveForce::Bulk::JobResult

Inherits:
Object
  • Object
show all
Defined in:
lib/active_force/bulk/job_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(job:) ⇒ JobResult

Returns a new instance of JobResult.



6
7
8
9
10
11
12
# File 'lib/active_force/bulk/job_result.rb', line 6

def initialize(job:)
  @job = job
  @stats = result_from_job_info
  @failed = failed_results
  @successful = successful_results
  @errors = errors_from_failed_results
end

Instance Attribute Details

#errorsObject

Returns the value of attribute errors.



4
5
6
# File 'lib/active_force/bulk/job_result.rb', line 4

def errors
  @errors
end

#failedObject

Returns the value of attribute failed.



4
5
6
# File 'lib/active_force/bulk/job_result.rb', line 4

def failed
  @failed
end

#jobObject (readonly)

Returns the value of attribute job.



4
5
6
# File 'lib/active_force/bulk/job_result.rb', line 4

def job
  @job
end

#statsObject (readonly)

Returns the value of attribute stats.



4
5
6
# File 'lib/active_force/bulk/job_result.rb', line 4

def stats
  @stats
end

#successfulObject

Returns the value of attribute successful.



4
5
6
# File 'lib/active_force/bulk/job_result.rb', line 4

def successful
  @successful
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/active_force/bulk/job_result.rb', line 14

def success?
  failed.blank? && successful.present?
end