class SoapyBing::Ads::CampaignPerformanceReport
Attributes
date_end[R]
date_start[R]
Public Class Methods
new(options)
click to toggle source
Calls superclass method
# File lib/soapy_bing/ads/campaign_performance_report.rb, line 11 def initialize(options) super @date_start = Date.parse(options.fetch(:date_start)) @date_end = Date.parse(options.fetch(:date_end)) end
Public Instance Methods
message()
click to toggle source
# File lib/soapy_bing/ads/campaign_performance_report.rb, line 17 def message { aggregation: settings.aggregation, columns: { campaign_performance_report_column: settings.columns }, scope: scope, time: { custom_date_range_end: date_hash(date_end), custom_date_range_start: date_hash(date_start) }, report_time_zone: settings.report_time_zone } end
Private Instance Methods
date_hash(date)
click to toggle source
# File lib/soapy_bing/ads/campaign_performance_report.rb, line 41 def date_hash(date) { day: date.day, month: date.month, year: date.year } end
request_type()
click to toggle source
# File lib/soapy_bing/ads/campaign_performance_report.rb, line 45 def request_type 'CampaignPerformanceReportRequest' end
scope()
click to toggle source
# File lib/soapy_bing/ads/campaign_performance_report.rb, line 32 def scope { account_ids: { '@xmlns:a1' => 'http://schemas.microsoft.com/2003/10/Serialization/Arrays', 'a1:long' => service.account.account_id } } end