Class: Karaden::Net::NoContentsResponse

Inherits:
ResponseInterface show all
Defined in:
lib/karaden/net/no_contents_response.rb

Constant Summary collapse

ERRORS =
{
  Karaden::Exception::BadRequestException::STATUS_CODE => Karaden::Exception::BadRequestException,
  Karaden::Exception::UnauthorizedException::STATUS_CODE => Karaden::Exception::UnauthorizedException,
  Karaden::Exception::NotFoundException::STATUS_CODE => Karaden::Exception::NotFoundException,
  Karaden::Exception::ForbiddenException::STATUS_CODE => Karaden::Exception::ForbiddenException,
  Karaden::Exception::UnprocessableEntityException::STATUS_CODE => Karaden::Exception::UnprocessableEntityException,
  Karaden::Exception::TooManyRequestsException::STATUS_CODE => Karaden::Exception::TooManyRequestsException
}.freeze

Instance Method Summary collapse

Constructor Details

#initialize(response, request_options) ⇒ NoContentsResponse

Returns a new instance of NoContentsResponse.



13
14
15
16
17
18
19
# File 'lib/karaden/net/no_contents_response.rb', line 13

def initialize(response, request_options)
  @error = nil
  @status_code = nil
  @headers = nil
  super()
  interpret(response, request_options)
end

Instance Method Details

#errorObject



21
22
23
# File 'lib/karaden/net/no_contents_response.rb', line 21

def error()
  @error
end

#error?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/karaden/net/no_contents_response.rb', line 37

def error?()
  !@error.nil?
end

#headersObject



33
34
35
# File 'lib/karaden/net/no_contents_response.rb', line 33

def headers()
  @headers
end

#objectObject

Raises:

  • (NotImplementedError)


25
26
27
# File 'lib/karaden/net/no_contents_response.rb', line 25

def object()
  raise NotImplementedError
end

#status_codeObject



29
30
31
# File 'lib/karaden/net/no_contents_response.rb', line 29

def status_code()
  @status_code
end