Class: FreeAgent::AttachmentsResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/free_agent/resources/attachments.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from FreeAgent::Resource

Instance Method Details

#delete(id:) ⇒ Object



9
10
11
12
# File 'lib/free_agent/resources/attachments.rb', line 9

def delete(id:)
  response = delete_request("attachments/#{id}")
  response.success?
end

#retrieve(id:) ⇒ Object



4
5
6
7
# File 'lib/free_agent/resources/attachments.rb', line 4

def retrieve(id:)
  response = get_request("attachments/#{id}")
  Attachment.new(response.body["attachment"])
end