Class: Sendgrid::API::Entities::Response

Inherits:
Entity
  • Object
show all
Defined in:
lib/sendgrid/api/entities/response.rb

Instance Attribute Summary

Attributes inherited from Entity

#attributes

Instance Method Summary collapse

Methods inherited from Entity

#as_json, attribute, attributes, clear_attributes, from_response, #initialize, #method_missing, #respond_to?, #to_json

Constructor Details

This class inherits a constructor from Sendgrid::API::Entities::Entity

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Sendgrid::API::Entities::Entity

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/sendgrid/api/entities/response.rb', line 14

def error?
  message == 'error'
end

#success?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/sendgrid/api/entities/response.rb', line 10

def success?
  message == 'success'
end