Class: ContextIO::Lite::EmailAccount

Inherits:
Object
  • Object
show all
Includes:
API::Resource
Defined in:
lib/contextio/lite/email_account.rb

Instance Attribute Summary collapse

Attributes included from API::Resource

#api, #api_attributes, #primary_key, #resource_url, #with_constraints

Instance Method Summary collapse

Methods included from API::Resource

#initialize, #with

Instance Attribute Details

#use_ssl?Boolean (readonly)

Returns:

  • (Boolean)


20
21
22
# File 'lib/contextio/lite/email_account.rb', line 20

def use_ssl?
	use_ssl
end

Instance Method Details

#deleteObject



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(options={})
	it_worked = api.request(:post, resource_url, options)['success']

	if it_worked
		options.each do |key, value|
			key = key.to_s.gsub('-', '_')

			instance_variable_set("@#{key}", value)
		end
	end

	it_worked
end