Module: SilverPop::Client::Reporting
- Included in:
- SilverPop::Client
- Defined in:
- lib/client/reporting.rb
Instance Method Summary collapse
-
#get_job_status(job_id) ⇒ Mash
GetJobStatus - After initiating a data job, you can monitor the status of the job using this operation.
-
#get_sent_mailings_for_org(date_start, date_end, options = {}) ⇒ Mash
GetSentMailingsForOrg - This interface extracts a listing of mailings sent for an organization for a specified date range.
-
#raw_recipient_data_export(query_params = {}, options = {}, columns = []) ⇒ Mash
RawRecipientDataExport - Allows exporting unique contact-level events and creates a .zip file containing a single flat file with all metrics.
Instance Method Details
#get_job_status(job_id) ⇒ Mash
GetJobStatus - After initiating a data job, you can monitor the status of the job using this operation.
84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/client/reporting.rb', line 84 def get_job_status(job_id) builder = Builder::XmlMarkup.new xml = builder.Envelope { builder.Body { builder.GetJobStatus { builder.JOB_ID job_id } } } post(xml) end |
#get_sent_mailings_for_org(date_start, date_end, options = {}) ⇒ Mash
GetSentMailingsForOrg - This interface extracts a listing of mailings sent for an organization for a specified date range.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/client/reporting.rb', line 14 def get_sent_mailings_for_org(date_start, date_end, ={}) builder = Builder::XmlMarkup.new xml = builder.Envelope { builder.Body { builder.GetSentMailingsForOrg { unless .empty? .each do |o| builder.tag! o[0], o[1] end end builder.DATE_START date_start builder.DATE_END date_end } } } post(xml) end |
#raw_recipient_data_export(query_params = {}, options = {}, columns = []) ⇒ Mash
RawRecipientDataExport - Allows exporting unique contact-level events and creates a .zip file containing a single flat file with all metrics
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/client/reporting.rb', line 41 def raw_recipient_data_export(query_params={}, ={}, columns=[]) builder = Builder::XmlMarkup.new xml = builder.Envelope { builder.Body { builder.RawRecipientDataExport { unless query_params.empty? query_params.each do |q| if q[0] == :MAILING_ID || q[0] == :REPORT_ID builder.MAILING { builder.tag! q[0], q[1] } else builder.tag! q[0], q[1] end end end unless .empty? .each do |opt| builder.tag! opt[0], opt[1] end end unless columns.empty? builder.COLUMNS { columns.each do |column| builder.COLUMN { builder.NAME column } end } end } } } post(xml) end |