def build_response(resource_name)
      response = yield
      resource = response_successful?(response) ? resource_name : "error"

      response_object = Montage::Response.new(response.status, response.body, resource)

      set_token(response_object.token.value) if resource_name == "token" && response.success?

      response_object
    end
def build_response(resource_name)
      response = yield
      resource = response_successful?(response) ? resource_name : "error"

      response_object = Montage::Response.new(response.status, response.body, resource)

      set_token(response_object.token.value) if resource_name == "token" && response.success?

      response_object
    end
Instantiates a response object based on the yielded block

 * *Args*    :
   - +resource_name+ -> The name of the Montage resource
 * *Returns* :
   * A Montage::Response Object containing:
     - A http status code
     - The response body
     - The resource name