Class: HelpScout::Conversation::Attachment

Inherits:
Object
  • Object
show all
Defined in:
lib/helpscout/models.rb

Overview

Conversation::Attachment developer.helpscout.net/objects/conversation/attachment/

Name      Type    Example               Notes
id        Int     12391                 Unique identifier
mimeType  String  image/jpeg   
filename  String  logo.jpg   
size      Int     22                    Size of the attachment in bytes.
width     Int     160  
height    Int     160  
url       String  https://.../logo.jpg  Public-facing url where 
                  attachment can be downloaded

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ Attachment

Creates a new Conversation::Attachment object from a Hash of attributes



364
365
366
367
368
369
370
371
372
# File 'lib/helpscout/models.rb', line 364

def initialize(object)
  @id = object["id"]
  @mimeType = object["mimeType"]
  @filename = object["filename"]
  @size = object["size"]
  @width = object["width"]
  @height = object["height"]
  @url = object["url"]
end

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename.



361
362
363
# File 'lib/helpscout/models.rb', line 361

def filename
  @filename
end

#heightObject (readonly)

Returns the value of attribute height.



361
362
363
# File 'lib/helpscout/models.rb', line 361

def height
  @height
end

#idObject (readonly)

Returns the value of attribute id.



361
362
363
# File 'lib/helpscout/models.rb', line 361

def id
  @id
end

#mimeTypeObject (readonly)

Returns the value of attribute mimeType.



361
362
363
# File 'lib/helpscout/models.rb', line 361

def mimeType
  @mimeType
end

#sizeObject (readonly)

Returns the value of attribute size.



361
362
363
# File 'lib/helpscout/models.rb', line 361

def size
  @size
end

#urlObject (readonly)

Returns the value of attribute url.



361
362
363
# File 'lib/helpscout/models.rb', line 361

def url
  @url
end

#widthObject (readonly)

Returns the value of attribute width.



361
362
363
# File 'lib/helpscout/models.rb', line 361

def width
  @width
end