Class: Emarsys::Export
- Inherits:
-
DataObject
- Object
- DataObject
- Emarsys::Export
- Defined in:
- lib/emarsys/data_objects/export.rb
Overview
Methods for the Export API
Class Method Summary collapse
-
.data(id, offset: nil, limit: nil, account: nil) ⇒ String
Download export data.
-
.filter(filter:, distribution_method:, contact_fields:, account: nil, **params) ⇒ Hash
Export a segment.
-
.resource(id, account: nil) ⇒ Hash
Find a specific export.
Methods inherited from DataObject
delete, get, parameterize_params, post, put, #request
Class Method Details
.data(id, offset: nil, limit: nil, account: nil) ⇒ String
Download export data
28 29 30 31 32 33 |
# File 'lib/emarsys/data_objects/export.rb', line 28 def data(id, offset: nil, limit: nil, account: nil) params = {} params.merge!(:offset => offset) if offset params.merge!(:limit => limit) if limit get account, "export/#{id}/data", params end |
.filter(filter:, distribution_method:, contact_fields:, account: nil, **params) ⇒ Hash
Export a segment
43 44 45 46 47 48 49 50 |
# File 'lib/emarsys/data_objects/export.rb', line 43 def filter(filter:, distribution_method:, contact_fields:, account: nil, **params) params.merge!( filter: filter, distribution_method: distribution_method, contact_fields: contact_fields ) post account, "export/filter", params end |
.resource(id, account: nil) ⇒ Hash
Find a specific export
16 17 18 |
# File 'lib/emarsys/data_objects/export.rb', line 16 def resource(id, account: nil) get account, "export/#{id}", {} end |