Class: Invoance::Resources::Audit::Orgs
- Inherits:
-
Object
- Object
- Invoance::Resources::Audit::Orgs
- Defined in:
- lib/invoance/resources/audit.rb
Overview
audit.orgs.*
Instance Method Summary collapse
-
#create(organization_id:, name: nil) ⇒ Object
POST /audit/orgs.
-
#initialize(http) ⇒ Orgs
constructor
A new instance of Orgs.
-
#integrity(organization_id) ⇒ Object
GET /audit/orgs/:org_id/integrity.
-
#list ⇒ Object
GET /audit/orgs.
-
#set_retention(organization_id, days) ⇒ Object
PUT /audit/orgs/:org_id/retention.
Constructor Details
#initialize(http) ⇒ Orgs
Returns a new instance of Orgs.
99 100 101 |
# File 'lib/invoance/resources/audit.rb', line 99 def initialize(http) @http = http end |
Instance Method Details
#create(organization_id:, name: nil) ⇒ Object
POST /audit/orgs
104 105 106 107 108 |
# File 'lib/invoance/resources/audit.rb', line 104 def create(organization_id:, name: nil) body = { "organization_id" => organization_id } body["name"] = name if name @http.post("/audit/orgs", body) end |
#integrity(organization_id) ⇒ Object
GET /audit/orgs/:org_id/integrity
116 117 118 |
# File 'lib/invoance/resources/audit.rb', line 116 def integrity(organization_id) @http.get("/audit/orgs/#{organization_id}/integrity") end |
#list ⇒ Object
GET /audit/orgs
111 112 113 |
# File 'lib/invoance/resources/audit.rb', line 111 def list @http.get("/audit/orgs") end |
#set_retention(organization_id, days) ⇒ Object
PUT /audit/orgs/:org_id/retention
121 122 123 |
# File 'lib/invoance/resources/audit.rb', line 121 def set_retention(organization_id, days) @http.put("/audit/orgs/#{organization_id}/retention", { "days" => days }) end |