Sha256: 44a94ff2d48bfa41bb5d0235edbe49ba5367c6febbde938d3c8bdf8361ea27be
Contents?: true
Size: 360 Bytes
Versions: 17
Compression:
Stored size: 360 Bytes
Contents
module Twilio class Response attr_accessor :status_code, :body, :headers def initialize(status_code, body, headers: nil) @status_code = status_code body = '{}' if !body || body.empty? @body = JSON.parse(body) @headers = !headers ? {} : headers.to_hash end def to_s "[#{status_code}] #{body}" end end end
Version data entries
17 entries across 17 versions & 1 rubygems