Class: Hachi::Clients::Artifact
- Defined in:
- lib/hachi/clients/artifact.rb
Instance Attribute Summary
Attributes inherited from Base
#api_endpoint, #api_key, #api_version
Instance Method Summary collapse
-
#create(case_id, **payload) ⇒ Hash
Create an artifact.
-
#delete_by_id(id) ⇒ String
Delete an artifact.
-
#get_by_id(id) ⇒ Hash
Get an artifact.
Methods inherited from Base
#delete, #get, #initialize, #patch, #post
Methods included from Awrence::Methods
#to_camel_keys, #to_camelback_keys
Constructor Details
This class inherits a constructor from Hachi::Clients::Base
Instance Method Details
#create(case_id, **payload) ⇒ Hash
Create an artifact
14 15 16 |
# File 'lib/hachi/clients/artifact.rb', line 14 def create(case_id, **payload) post("/api/case/#{case_id}/artifact", json: payload) { |json| json } end |
#delete_by_id(id) ⇒ String
Delete an artifact
36 37 38 |
# File 'lib/hachi/clients/artifact.rb', line 36 def delete_by_id(id) delete("/api/case/artifact/#{id}") { |json| json } end |
#get_by_id(id) ⇒ Hash
Get an artifact
25 26 27 |
# File 'lib/hachi/clients/artifact.rb', line 25 def get_by_id(id) get("/api/case/artifact/#{id}") { |json| json } end |