class Hubspot::File
HubSpot
Files API
Constants
- DELETE_FILE_PATH
- GET_FILE_PATH
- LIST_FILE_PATH
Attributes
id[R]
properties[R]
Public Class Methods
find_by_id(file_id)
click to toggle source
# File lib/hubspot/file.rb, line 25 def find_by_id(file_id) response = Hubspot::Connection.get_json(GET_FILE_PATH, { file_id: file_id }) new(response) end
new(response_hash)
click to toggle source
# File lib/hubspot/file.rb, line 19 def initialize(response_hash) @id = response_hash["id"] @properties = response_hash end
Public Instance Methods
destroy!()
click to toggle source
Permanently delete a file and all related data and thumbnails from file manager. {developers.hubspot.com/docs/methods/files/hard_delete_file_and_associated_objects}
# File lib/hubspot/file.rb, line 33 def destroy! Hubspot::Connection.post_json(DELETE_FILE_PATH, params: {file_id: id}) end