Class: Sendgrid::API::Service
- Inherits:
-
Object
- Object
- Sendgrid::API::Service
- Defined in:
- lib/sendgrid/api/service.rb
Direct Known Subclasses
Newsletter::Categories::Services, Newsletter::Emails::Services, Newsletter::Lists::Services, Newsletter::MarketingEmails::Services, Newsletter::Recipients::Services, Newsletter::Schedule::Services, Newsletter::SenderAddresses::Services, Web::Mail::Services, Web::Profile::Services, Web::Stats::Services
Instance Attribute Summary collapse
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Instance Method Summary collapse
-
#initialize(resource) ⇒ Service
constructor
A new instance of Service.
- #perform_request(entity, url, params = {}) ⇒ Object
Constructor Details
#initialize(resource) ⇒ Service
Returns a new instance of Service.
7 8 9 |
# File 'lib/sendgrid/api/service.rb', line 7 def initialize(resource) @resource = resource end |
Instance Attribute Details
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
5 6 7 |
# File 'lib/sendgrid/api/service.rb', line 5 def resource @resource end |
Instance Method Details
#perform_request(entity, url, params = {}) ⇒ Object
11 12 13 |
# File 'lib/sendgrid/api/service.rb', line 11 def perform_request(entity, url, params = {}) entity.from_response(request(url, params)) end |