Class: Zm::Client::Signature

Inherits:
Base::Object show all
Includes:
RequestMethodsMailbox
Defined in:
lib/zm/client/signature/signature.rb

Overview

class account signature

Instance Attribute Summary collapse

Attributes inherited from Base::Object

#parent, #token

Instance Method Summary collapse

Methods included from RequestMethodsMailbox

#build_create, #build_delete, #build_modify, #build_rename, #delete!, #modify!, #rename!

Methods inherited from Base::Object

#clone, #initialize, #inspect, #instance_variables_map, #logger, #recorded?, #save!, #to_h, #to_s, #update_attribute

Constructor Details

This class inherits a constructor from Zm::Client::Base::Object

Instance Attribute Details

#htmlObject

Returns the value of attribute html.



9
10
11
# File 'lib/zm/client/signature/signature.rb', line 9

def html
  @html
end

#idObject

Returns the value of attribute id.



9
10
11
# File 'lib/zm/client/signature/signature.rb', line 9

def id
  @id
end

#nameObject

Returns the value of attribute name.



9
10
11
# File 'lib/zm/client/signature/signature.rb', line 9

def name
  @name
end

#txtObject

Returns the value of attribute txt.



9
10
11
# File 'lib/zm/client/signature/signature.rb', line 9

def txt
  @txt
end

Instance Method Details

#contentObject



34
35
36
# File 'lib/zm/client/signature/signature.rb', line 34

def content
  html || txt || ''
end

#create!Object



11
12
13
14
# File 'lib/zm/client/signature/signature.rb', line 11

def create!
  rep = @parent.soap_connector.invoke(build_create)
  @id = rep[:CreateSignatureResponse][:signature].first[:id]
end

#html?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/zm/client/signature/signature.rb', line 26

def html?
  type == ContentType::HTML
end

#txt?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/zm/client/signature/signature.rb', line 30

def txt?
  type == ContentType::TEXT
end

#typeObject



20
21
22
23
24
# File 'lib/zm/client/signature/signature.rb', line 20

def type
  return ContentType::HTML unless html.nil?

  ContentType::TEXT
end

#update!(*args) ⇒ Object

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/zm/client/signature/signature.rb', line 16

def update!(*args)
  raise NotImplementedError
end