class RestforceMock::Client::Body

Public Class Methods

new(id, type= nil) click to toggle source
# File lib/restforce_mock/client.rb, line 99
def initialize(id, type= nil)
  collection = {"totalSize"=>1, "done"=>true,
                "records"=>[{"attributes"=>{"type"=>"Contact", "url"=>""}, "Id"=> id}]}

  @body =

    if type == 'query'
     Restforce::Collection.new(collection, Restforce::Data::Client.new)
    else
      {'id' => id}
    end
end

Public Instance Methods

body() click to toggle source
# File lib/restforce_mock/client.rb, line 112
def body
  @body
end