Class: IronBank::Resources::Export
- Inherits:
-
IronBank::Resource
- Object
- IronBank::Resource
- IronBank::Resources::Export
- Defined in:
- lib/iron_bank/resources/export.rb
Overview
Export ZOQL queries.
Constant Summary collapse
- DEFAULT_CREATE_OPTIONS =
{ format: "csv", zip: false }.freeze
- ENDPOINT =
"/v1/object/export"
Instance Attribute Summary
Attributes inherited from IronBank::Resource
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from IronBank::Resource
#==, #id, #initialize, #inspect, object_name, #reload, #remove_instance_vars, with_cache, with_local_records
Methods included from Associations::ClassMethods
Methods included from Metadata
#excluded_fields, #fields, #query_custom_fields, #query_fields, #reset, #schema, #single_resource_query_fields, #with_schema
Methods included from Queryable
#all, #find, #find_each, #first, #where
Methods included from Associations
Constructor Details
This class inherits a constructor from IronBank::Resource
Class Method Details
.create(query, options = {}) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/iron_bank/resources/export.rb', line 17 def self.create(query, = {}) payload = IronBank::Object.new( DEFAULT_CREATE_OPTIONS.merge(query: query, **) ).deep_camelize response = IronBank.client.connection.post(ENDPOINT, payload) new(IronBank::Object.new(response.body).deep_underscore) end |