Class: Zm::Client::Message::Attachment
- Inherits:
-
Object
- Object
- Zm::Client::Message::Attachment
- Defined in:
- lib/zm/client/message/attachments_collection.rb
Overview
class attachment for email
Instance Attribute Summary collapse
-
#aid ⇒ Object
Returns the value of attribute aid.
-
#cd ⇒ Object
Returns the value of attribute cd.
-
#ci ⇒ Object
Returns the value of attribute ci.
-
#ct ⇒ Object
Returns the value of attribute ct.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#mid ⇒ Object
Returns the value of attribute mid.
-
#part ⇒ Object
Returns the value of attribute part.
-
#s ⇒ Object
Returns the value of attribute s.
Instance Method Summary collapse
- #account ⇒ Object
- #download(dest_file_path) ⇒ Object
-
#initialize(parent) {|_self| ... } ⇒ Attachment
constructor
A new instance of Attachment.
Constructor Details
#initialize(parent) {|_self| ... } ⇒ Attachment
Returns a new instance of Attachment.
27 28 29 30 |
# File 'lib/zm/client/message/attachments_collection.rb', line 27 def initialize(parent) @parent = parent yield(self) if block_given? end |
Instance Attribute Details
#aid ⇒ Object
Returns the value of attribute aid.
25 26 27 |
# File 'lib/zm/client/message/attachments_collection.rb', line 25 def aid @aid end |
#cd ⇒ Object
Returns the value of attribute cd.
25 26 27 |
# File 'lib/zm/client/message/attachments_collection.rb', line 25 def cd @cd end |
#ci ⇒ Object
Returns the value of attribute ci.
25 26 27 |
# File 'lib/zm/client/message/attachments_collection.rb', line 25 def ci @ci end |
#ct ⇒ Object
Returns the value of attribute ct.
25 26 27 |
# File 'lib/zm/client/message/attachments_collection.rb', line 25 def ct @ct end |
#filename ⇒ Object
Returns the value of attribute filename.
25 26 27 |
# File 'lib/zm/client/message/attachments_collection.rb', line 25 def filename @filename end |
#mid ⇒ Object
Returns the value of attribute mid.
25 26 27 |
# File 'lib/zm/client/message/attachments_collection.rb', line 25 def mid @mid end |
#part ⇒ Object
Returns the value of attribute part.
25 26 27 |
# File 'lib/zm/client/message/attachments_collection.rb', line 25 def part @part end |
#s ⇒ Object
Returns the value of attribute s.
25 26 27 |
# File 'lib/zm/client/message/attachments_collection.rb', line 25 def s @s end |
Instance Method Details
#account ⇒ Object
49 50 51 |
# File 'lib/zm/client/message/attachments_collection.rb', line 49 def account @parent.parent end |
#download(dest_file_path) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/zm/client/message/attachments_collection.rb', line 32 def download(dest_file_path) h = { id: @parent.id, part: part, auth: 'qp', zauthtoken: account.token, disp: 'a' } url = account.home_url url << '?' << Utils.format_url_params(h) uploader = Upload.new(@parent, RestAccountConnector.new) uploader.download_file_with_url(url, dest_file_path) end |