Class: ContextIO::Lite::EmailAccount
- Inherits:
-
Object
- Object
- ContextIO::Lite::EmailAccount
- Includes:
- API::Resource
- Defined in:
- lib/contextio/lite/email_account.rb
Instance Attribute Summary collapse
- #use_ssl? ⇒ Boolean readonly
Attributes included from API::Resource
#api, #api_attributes, #primary_key, #resource_url, #with_constraints
Instance Method Summary collapse
- #delete ⇒ Object
-
#update(options = {}) ⇒ Object
Updates the email_account.
Methods included from API::Resource
Instance Attribute Details
#use_ssl? ⇒ Boolean (readonly)
20 21 22 |
# File 'lib/contextio/lite/email_account.rb', line 20 def use_ssl? use_ssl end |
Instance Method Details
#delete ⇒ Object
42 43 44 |
# File 'lib/contextio/lite/email_account.rb', line 42 def delete api.request(:delete, resource_url)['success'] end |
#update(options = {}) ⇒ Object
Updates the email_account.
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/contextio/lite/email_account.rb', line 28 def update(={}) it_worked = api.request(:post, resource_url, )['success'] if it_worked .each do |key, value| key = key.to_s.gsub('-', '_') instance_variable_set("@#{key}", value) end end it_worked end |