Class: Iterable::EmailTemplates
- Inherits:
-
ApiResource
- Object
- ApiResource
- Iterable::EmailTemplates
- Defined in:
- lib/iterable/email_templates.rb
Overview
Interact with /templates/email API endpoints
Instance Attribute Summary
Attributes inherited from ApiResource
Instance Method Summary collapse
- #get(template_id, params = {}) ⇒ Object
- #update(template_id, attrs = {}) ⇒ Object
- #upsert(client_template_id, attrs = {}) ⇒ Object
Methods inherited from ApiResource
#default_config, default_config, #initialize
Constructor Details
This class inherits a constructor from Iterable::ApiResource
Instance Method Details
#get(template_id, params = {}) ⇒ Object
31 32 33 34 |
# File 'lib/iterable/email_templates.rb', line 31 def get(template_id, params = {}) params['templateId'] = template_id Iterable.request(conf, '/templates/email/get', params).get end |
#update(template_id, attrs = {}) ⇒ Object
50 51 52 53 |
# File 'lib/iterable/email_templates.rb', line 50 def update(template_id, attrs = {}) attrs['templateId'] = template_id Iterable.request(conf, '/templates/email/update').post(attrs) end |
#upsert(client_template_id, attrs = {}) ⇒ Object
69 70 71 72 |
# File 'lib/iterable/email_templates.rb', line 69 def upsert(client_template_id, attrs = {}) attrs['clientTemplateId'] = client_template_id Iterable.request(conf, '/templates/email/upsert').post(attrs) end |