Class: Invoance::Resources::Audit::Exports
- Inherits:
-
Object
- Object
- Invoance::Resources::Audit::Exports
- Defined in:
- lib/invoance/resources/audit.rb
Overview
audit.exports.*
Instance Method Summary collapse
-
#create(organization_id:, format:, filters: nil) ⇒ Object
POST /audit/exports — queue an async CSV/NDJSON export job.
-
#get(export_id) ⇒ Object
GET /audit/exports/:id — poll a job.
-
#initialize(http) ⇒ Exports
constructor
A new instance of Exports.
Constructor Details
#initialize(http) ⇒ Exports
Returns a new instance of Exports.
175 176 177 |
# File 'lib/invoance/resources/audit.rb', line 175 def initialize(http) @http = http end |
Instance Method Details
#create(organization_id:, format:, filters: nil) ⇒ Object
POST /audit/exports — queue an async CSV/NDJSON export job.
181 182 183 184 185 |
# File 'lib/invoance/resources/audit.rb', line 181 def create(organization_id:, format:, filters: nil) body = { "organization_id" => organization_id, "format" => format } body["filters"] = filters if filters @http.post("/audit/exports", body) end |
#get(export_id) ⇒ Object
GET /audit/exports/:id — poll a job.
188 189 190 |
# File 'lib/invoance/resources/audit.rb', line 188 def get(export_id) @http.get("/audit/exports/#{export_id}") end |