Class: Restforce::Bulk::Result

Inherits:
Object
  • Object
show all
Includes:
Attributes
Defined in:
lib/restforce/bulk/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Attributes

#assign_attributes

Constructor Details

#initialize(attributes = {}) ⇒ Result

Returns a new instance of Result.



8
9
10
# File 'lib/restforce/bulk/result.rb', line 8

def initialize(attributes={})
  assign_attributes(attributes)
end

Instance Attribute Details

#batch_idObject

Returns the value of attribute batch_id.



6
7
8
# File 'lib/restforce/bulk/result.rb', line 6

def batch_id
  @batch_id
end

#createdObject

Returns the value of attribute created.



6
7
8
# File 'lib/restforce/bulk/result.rb', line 6

def created
  @created
end

#errorObject

Returns the value of attribute error.



6
7
8
# File 'lib/restforce/bulk/result.rb', line 6

def error
  @error
end

#idObject

Returns the value of attribute id.



6
7
8
# File 'lib/restforce/bulk/result.rb', line 6

def id
  @id
end

#job_idObject

Returns the value of attribute job_id.



6
7
8
# File 'lib/restforce/bulk/result.rb', line 6

def job_id
  @job_id
end

#successObject

Returns the value of attribute success.



6
7
8
# File 'lib/restforce/bulk/result.rb', line 6

def success
  @success
end

Instance Method Details

#contentObject



12
13
14
15
16
17
# File 'lib/restforce/bulk/result.rb', line 12

def content
  response = Restforce::Bulk.client.perform_request(:get, "job/#{job_id}/batch/#{batch_id}/result/#{id}")
  parser   = results_parser_for(response.body).new

  parser.content_on(response.body)
end