Sha256: c1f2ced49d79b7ed3634beaa99198d7a72778db18ea150186d97844a97678506
Contents?: true
Size: 777 Bytes
Versions: 36
Compression:
Stored size: 777 Bytes
Contents
# frozen_string_literal: true module IronBank module Resources # Export ZOQL queries. # class Export < Resource with_schema DEFAULT_CREATE_OPTIONS = { format: "csv", zip: false }.freeze ENDPOINT = "/v1/object/export" def self.create(query, options = {}) payload = IronBank::Object.new( DEFAULT_CREATE_OPTIONS.merge(query: query, **options) ).deep_camelize response = IronBank.client.connection.post(ENDPOINT, payload) new(IronBank::Object.new(response.body).deep_underscore) end def content return unless status&.casecmp?("Completed") @content ||= IronBank.client.connection.get("/v1/files/#{file_id}").body end end end end
Version data entries
36 entries across 36 versions & 1 rubygems