Sha256: b6efceb2332a2a93932d7ec9c06055f90c7caa187b35f05c90390b648b9971fa

Contents?: true

Size: 279 Bytes

Versions: 7

Compression:

Stored size: 279 Bytes

Contents

require 'json'

module SendGrid
  class Response
    attr_reader :code, :headers, :body, :raw_body

    def initialize(params)
      @code = params[:code]
      @headers = params[:headers]
      @body = JSON.parse(params[:body])
      @raw_body = params[:body]
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sendgrid-ruby-1.1.6 lib/sendgrid/response.rb
sendgrid-ruby-1.1.5 lib/sendgrid/response.rb
sendgrid-ruby-1.0.5 lib/sendgrid/response.rb
sendgrid-ruby-1.0.4 lib/sendgrid/response.rb
sendgrid-ruby-1.0.3 lib/sendgrid/response.rb
sendgrid-ruby-1.0.2 lib/sendgrid/response.rb
sendgrid-ruby-1.0.0.alpha.1 lib/sendgrid/response.rb