Class: Mailosaur::Models::Attachment

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/Mailosaur/models/attachment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_json

Constructor Details

#initialize(data = {}) ⇒ Attachment



4
5
6
7
8
9
10
11
12
# File 'lib/Mailosaur/models/attachment.rb', line 4

def initialize(data = {})
  @id = data['id']
  @content_type = data['contentType']
  @file_name = data['fileName']
  @content = data['content']
  @content_id = data['contentId']
  @length = data['length']
  @url = data['url']
end

Instance Attribute Details

#contentString



24
25
26
# File 'lib/Mailosaur/models/attachment.rb', line 24

def content
  @content
end

#content_idString



27
28
29
# File 'lib/Mailosaur/models/attachment.rb', line 27

def content_id
  @content_id
end

#content_typeString



18
19
20
# File 'lib/Mailosaur/models/attachment.rb', line 18

def content_type
  @content_type
end

#file_nameString



21
22
23
# File 'lib/Mailosaur/models/attachment.rb', line 21

def file_name
  @file_name
end

#idObject



15
16
17
# File 'lib/Mailosaur/models/attachment.rb', line 15

def id
  @id
end

#lengthInteger



30
31
32
# File 'lib/Mailosaur/models/attachment.rb', line 30

def length
  @length
end

#urlString



33
34
35
# File 'lib/Mailosaur/models/attachment.rb', line 33

def url
  @url
end