Class: FidorApi::Message
- Inherits:
-
Connectivity::Resource
- Object
- Connectivity::Resource
- FidorApi::Message
- Extended by:
- AmountAttributes, ModelAttribute
- Defined in:
- lib/fidor_api/message.rb
Defined Under Namespace
Modules: ClientSupport Classes: Attachment
Instance Attribute Summary
Attributes inherited from Connectivity::Resource
Instance Method Summary collapse
Methods included from AmountAttributes
amount_attribute, attributes, extended
Methods inherited from Connectivity::Resource
all, find, #initialize, model_name, #persisted?, #reload, #save, #update_attributes
Constructor Details
This class inherits a constructor from FidorApi::Connectivity::Resource
Instance Method Details
#attachment ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/fidor_api/message.rb', line 21 def response = endpoint.for(self).get(action: 'attachment') Attachment.new( type: response.headers["content-type"], filename: response.headers["content-disposition"][/filename="([^"]+)"/, 1], content: response.body, ) end |
#content ⇒ Object
30 31 32 |
# File 'lib/fidor_api/message.rb', line 30 def content endpoint.for(self).get(action: 'content').body end |