Class: Google::APIClient::BatchedCallResponse Private

Inherits:
Object
  • Object
show all
Defined in:
lib/google/api_client/batch.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Helper class to contain a response to an individual batched call.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(call_id, status = nil, headers = nil, body = nil) ⇒ BatchedCallResponse

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Initialize the call response

Parameters:

  • call_id (String)

    UUID of the original call

  • status (Fixnum) (defaults to: nil)

    HTTP status

  • headers (Hash) (defaults to: nil)

    HTTP response headers

  • body (#read, #to_str) (defaults to: nil)

    Response body



47
48
49
# File 'lib/google/api_client/batch.rb', line 47

def initialize(call_id, status = nil, headers = nil, body = nil)
  @call_id, @status, @headers, @body = call_id, status, headers, body
end

Instance Attribute Details

#bodyString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns HTTP response body.

Returns:

  • (String)

    HTTP response body



34
35
36
# File 'lib/google/api_client/batch.rb', line 34

def body
  @body
end

#call_idString (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns UUID of the call.

Returns:

  • (String)

    UUID of the call



28
29
30
# File 'lib/google/api_client/batch.rb', line 28

def call_id
  @call_id
end

#headersHash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns HTTP response headers.

Returns:

  • (Hash)

    HTTP response headers



32
33
34
# File 'lib/google/api_client/batch.rb', line 32

def headers
  @headers
end

#statusFixnum

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns HTTP status code.

Returns:

  • (Fixnum)

    HTTP status code



30
31
32
# File 'lib/google/api_client/batch.rb', line 30

def status
  @status
end