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.
202 203 204 |
# File 'lib/invoance/resources/audit.rb', line 202 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.
208 209 210 211 212 |
# File 'lib/invoance/resources/audit.rb', line 208 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.
215 216 217 |
# File 'lib/invoance/resources/audit.rb', line 215 def get(export_id) @http.get("/audit/exports/#{export_id}") end |