Class: ZendeskAPI::Attachment
Instance Attribute Summary (collapse)
-
- (ZendeskAPI::Association) association
inherited
from Data
The association.
-
- (Hash) attributes
(also: #to_param)
inherited
from Data
readonly
The resource's attributes.
-
- (Array) errors
inherited
from Data
The last received errors.
-
- (Object) response
inherited
from Data
Place to dump the last response.
Instance Method Summary (collapse)
-
- (Attachment) initialize(client, attributes)
constructor
A new instance of Attachment.
- - (Object) save
- - (Object) to_param
Constructor Details
- (Attachment) initialize(client, attributes)
A new instance of Attachment
31 32 33 34 35 36 37 |
# File 'lib/zendesk_api/resources.rb', line 31 def initialize(client, attributes) if attributes.is_a?(Hash) super else super(client, :file => attributes) end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ZendeskAPI::Data
Instance Attribute Details
- (ZendeskAPI::Association) association Originally defined in class Data
The association
- (Hash) attributes (readonly) Also known as: to_param Originally defined in class Data
The resource's attributes
- (Array) errors Originally defined in class Data
The last received errors
- (Object) response Originally defined in class Data
Place to dump the last response
Instance Method Details
- (Object) save
39 40 41 42 |
# File 'lib/zendesk_api/resources.rb', line 39 def save upload = Upload.create!(@client, attributes) self.token = upload.token end |
- (Object) to_param
44 45 46 |
# File 'lib/zendesk_api/resources.rb', line 44 def to_param token end |