class Youtube::ProblemDetailsException
ProblemDetails class.
Attributes
status[R]
TODO: Write general description for this method @return [Integer]
title[R]
TODO: Write general description for this method @return [String]
trace_id[R]
TODO: Write general description for this method @return [String]
type[R]
TODO: Write general description for this method @return [String]
Public Class Methods
new(reason, response)
click to toggle source
The constructor. @param [String] The reason for raising an exception. @param [HttpResponse] The HttpReponse of the API call.
Calls superclass method
Youtube::APIException::new
# File lib/youtube/exceptions/problem_details_exception.rb, line 28 def initialize(reason, response) super(reason, response) hash = APIHelper.json_deserialize(@response.raw_body) unbox(hash) end
Public Instance Methods
unbox(hash)
click to toggle source
Populates this object by extracting properties from a hash. @param [Hash] The deserialized response sent by the server in the response body.
# File lib/youtube/exceptions/problem_details_exception.rb, line 37 def unbox(hash) @type = hash['type'] @title = hash['title'] @status = hash['status'] @trace_id = hash['traceId'] end