class Emarsys::Export
Methods for the Export
API
Public Class Methods
data(id, offset: nil, limit: nil, account: nil)
click to toggle source
Download export data
@param id [Integer, String] The internal emarsys id @option offset [Integer] Defines the ID to start listing from @option limit [Integer] Defines how many IDs are listed @return [String] text/csv @example
Emarsys::Export.data(2)
# 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)
click to toggle source
Export
a segment
@param filter [Integer] The segment ID @option distribution_method [String] ftp, sftp, local or mail @option contact_fields [Array] Contact
field IDs to export @return [Hash] Result data @example
Emarsys::Export.filter(filter: 123, distribution_method: 'local', contact_fields: [1, 3, 106533])
# 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)
click to toggle source
Find a specific export
@param id [Integer, String] The internal emarsys id @return [Hash] Result data @example
Emarsys::Export.resource(2)
# File lib/emarsys/data_objects/export.rb, line 16 def resource(id, account: nil) get account, "export/#{id}", {} end