Module: Unforlogistics::Core::Emails
- Included in:
- Api
- Defined in:
- lib/unforlogistics/core/emails.rb
Instance Method Summary collapse
- #create_email(attrs = {}) ⇒ Object
- #get_email(id) ⇒ Object
- #get_emails(filters = {}) ⇒ Object
- #set_email_status(id, status) ⇒ Object
- #update_email(id, attrs = {}) ⇒ Object
Instance Method Details
#create_email(attrs = {}) ⇒ Object
14 15 16 17 18 |
# File 'lib/unforlogistics/core/emails.rb', line 14 def create_email(attrs={}) response = post_request('/emails', attrs) get_persistance_response(response) end |
#get_email(id) ⇒ Object
10 11 12 |
# File 'lib/unforlogistics/core/emails.rb', line 10 def get_email(id) get_request("/emails/#{id}").body end |
#get_emails(filters = {}) ⇒ Object
4 5 6 7 8 |
# File 'lib/unforlogistics/core/emails.rb', line 4 def get_emails(filters={}) response = get_request('/emails', filters) get_paging_response(response) end |
#set_email_status(id, status) ⇒ Object
26 27 28 29 30 |
# File 'lib/unforlogistics/core/emails.rb', line 26 def set_email_status(id, status) response = put_request("/emails/#{id}/status", { value: status }) get_persistance_response(response) end |
#update_email(id, attrs = {}) ⇒ Object
20 21 22 23 24 |
# File 'lib/unforlogistics/core/emails.rb', line 20 def update_email(id, attrs={}) response = put_request("/emails/#{id}", attrs) get_persistance_response(response) end |