renatosnrg/sendgrid-api

View on GitHub
lib/sendgrid/api/entities/response.rb

Summary

Maintainability
A
0 mins
Test Coverage
require 'sendgrid/api/entities/entity'

module Sendgrid
  module API
    module Entities
      class Response < Entity

        attribute :message, :errors

        def success?
          message == 'success'
        end

        def error?
          message == 'error'
        end

      end
    end
  end
end