Class: HelpScout::Conversation::Attachment
- Inherits:
-
Object
- Object
- HelpScout::Conversation::Attachment
- 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
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#mimeType ⇒ Object
readonly
Returns the value of attribute mimeType.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(object) ⇒ Attachment
constructor
Creates a new Conversation::Attachment object from a Hash of attributes.
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
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
361 362 363 |
# File 'lib/helpscout/models.rb', line 361 def filename @filename end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
361 362 363 |
# File 'lib/helpscout/models.rb', line 361 def height @height end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
361 362 363 |
# File 'lib/helpscout/models.rb', line 361 def id @id end |
#mimeType ⇒ Object (readonly)
Returns the value of attribute mimeType.
361 362 363 |
# File 'lib/helpscout/models.rb', line 361 def mimeType @mimeType end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
361 362 363 |
# File 'lib/helpscout/models.rb', line 361 def size @size end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
361 362 363 |
# File 'lib/helpscout/models.rb', line 361 def url @url end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
361 362 363 |
# File 'lib/helpscout/models.rb', line 361 def width @width end |