Module: SilverPop::Client::User
- Included in:
- SilverPop::Client
- Defined in:
- lib/client/user.rb
Instance Method Summary collapse
-
#export_list(list_id, export_type, export_format, options = {}, export_columns = []) ⇒ Mash
ExportList - This interface exports contact data from a database, query, or contact list.
Instance Method Details
#export_list(list_id, export_type, export_format, options = {}, export_columns = []) ⇒ Mash
ExportList - This interface exports contact data from a database, query, or contact list. Engage exports the results to a CSV file, then adds that file to the FTP account associated with the current session.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/client/user.rb', line 15 def export_list(list_id, export_type, export_format, ={}, export_columns=[]) builder = Builder::XmlMarkup.new xml = builder.Envelope { builder.Body { builder.ExportList { builder.LIST_ID list_id builder.EXPORT_TYPE export_type builder.EXPORT_FORMAT export_format unless .empty? .each do |o| builder.tag! o[0], o[1] end end unless export_columns.empty? builder.EXPORT_COLUMNS { export_columns.each do |e| builder.COLUMN e end } end } } } post(xml) end |