Class: SilverPop::Client
- Inherits:
-
Object
- Object
- SilverPop::Client
- Includes:
- Contact, RelationalTable, Reporting, User, Connection, Request
- Defined in:
- lib/client/user.rb,
lib/client/contact.rb,
lib/client/reporting.rb,
lib/silverpop/client.rb,
lib/client/relational_table.rb
Defined Under Namespace
Modules: Contact, RelationalTable, Reporting, User
Instance Method Summary collapse
-
#export_table(table_id, export_format, options = {}) ⇒ Mash
ExportTable - This interface supports programmatically exporting Relational Table data from Engage into a CSV file, which Engage uploads to the FTP account or to the Stored Files directory associated with the session.
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Methods included from RelationalTable
#insert_update_relational_table
Methods included from User
Methods included from Reporting
#get_job_status, #get_sent_mailings_for_org, #raw_recipient_data_export
Methods included from Contact
Methods included from Request
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
11 12 13 14 |
# File 'lib/silverpop/client.rb', line 11 def initialize(={}) @access_token = [:access_token] @silverpop_url = [:url] end |
Instance Method Details
#export_table(table_id, export_format, options = {}) ⇒ Mash
ExportTable - This interface supports programmatically exporting Relational Table data from Engage into a CSV file, which Engage uploads to the FTP account or to the Stored Files directory associated with the session.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/client/relational_table.rb', line 48 def export_table(table_id, export_format, ={}) builder = Builder::XmlMarkup.new xml = builder.Envelope { builder.Body { builder.ExportTable { builder.TABLE_NAME table_id builder.EXPORT_FORMAT export_format unless .empty? .each do |o| builder.tag! o[0], o[1] end end } } } post(xml) end |