Class: AdWords::V13::ReportService::ReportServiceWrapper
- Inherits:
-
Object
- Object
- AdWords::V13::ReportService::ReportServiceWrapper
- Defined in:
- lib/adwords4r/v13/ReportServiceWrapper.rb
Overview
Wrapper class for the v13 Report service. This class is automatically generated.
Instance Attribute Summary collapse
-
#api ⇒ Object
readonly
Holds the AdWords::API object to which the wrapper belongs.
-
#module ⇒ Object
readonly
Holds a shortcut to the parent module.
Instance Method Summary collapse
-
#deleteReport(reportJobId) ⇒ Object
Calls the deleteReport method of the Report service.
-
#downloadCsvReport(job_id) ⇒ Object
Extension method – Calls the AdWords::Extensions.downloadCsvReport method with
selfas the first parameter. -
#downloadXmlReport(job_id) ⇒ Object
Extension method – Calls the AdWords::Extensions.downloadXmlReport method with
selfas the first parameter. -
#getAllJobs ⇒ Object
Calls the getAllJobs method of the Report service.
-
#getGzipReportDownloadUrl(reportJobId) ⇒ Object
Calls the getGzipReportDownloadUrl method of the Report service.
-
#getReportDownloadUrl(reportJobId) ⇒ Object
Calls the getReportDownloadUrl method of the Report service.
-
#getReportJobStatus(reportJobId) ⇒ Object
Calls the getReportJobStatus method of the Report service.
-
#initialize(driver, api) ⇒ ReportServiceWrapper
constructor
Constructor for ReportServiceWrapper.
-
#scheduleReportJob(job) ⇒ Object
Calls the scheduleReportJob method of the Report service.
-
#validateReportJob(job) ⇒ Object
Calls the validateReportJob method of the Report service.
Constructor Details
#initialize(driver, api) ⇒ ReportServiceWrapper
Constructor for ReportServiceWrapper.
Args:
-
driver: SOAP::RPC::Driver object with the remote SOAP methods for this service
-
api: the AdWords::API object to which the wrapper belongs
34 35 36 37 38 |
# File 'lib/adwords4r/v13/ReportServiceWrapper.rb', line 34 def initialize(driver, api) @driver = driver @api = api @module = AdWords::V13::ReportService end |
Instance Attribute Details
#api ⇒ Object (readonly)
Holds the AdWords::API object to which the wrapper belongs.
14 15 16 |
# File 'lib/adwords4r/v13/ReportServiceWrapper.rb', line 14 def api @api end |
#module ⇒ Object (readonly)
Holds a shortcut to the parent module. Use this to avoid typing the full class name when creating classes belonging to this service, e.g.
service_object.module::ClassName
instead of
AdWords::V13::ReportService::ClassName
This will make it easier to migrate your code between API versions.
23 24 25 |
# File 'lib/adwords4r/v13/ReportServiceWrapper.rb', line 23 def module @module end |
Instance Method Details
#deleteReport(reportJobId) ⇒ Object
Calls the deleteReport method of the Report service. Check the online documentation for this method.
Args:
-
reportJobId: SOAP::SOAPLong
Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/adwords4r/v13/ReportServiceWrapper.rb', line 49 def deleteReport(reportJobId) begin AdWords::Service.validate_param('reportJobId', reportJobId, SOAP::SOAPLong) # Construct request object and make API call obj = AdWords::V13::ReportService::DeleteReport.new(reportJobId) return @driver.deleteReport(obj) rescue SOAP::FaultError => fault raise(AdWords::Error::create_specific_api_error(fault), "deleteReport Call Failed: " + fault.faultstring.to_s, caller) end end |
#downloadCsvReport(job_id) ⇒ Object
Extension method – Calls the AdWords::Extensions.downloadCsvReport method with self as the first parameter.
212 213 214 |
# File 'lib/adwords4r/v13/ReportServiceWrapper.rb', line 212 def downloadCsvReport(job_id) return AdWords::Extensions.downloadCsvReport(self, job_id) end |
#downloadXmlReport(job_id) ⇒ Object
Extension method – Calls the AdWords::Extensions.downloadXmlReport method with self as the first parameter.
206 207 208 |
# File 'lib/adwords4r/v13/ReportServiceWrapper.rb', line 206 def downloadXmlReport(job_id) return AdWords::Extensions.downloadXmlReport(self, job_id) end |
#getAllJobs ⇒ Object
Calls the getAllJobs method of the Report service. Check the online documentation for this method.
Returns:
-
getAllJobsReturn: SOAP::SOAPArray of AdWords::V13::ReportService::ReportJob
Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.
71 72 73 74 75 76 77 78 79 80 |
# File 'lib/adwords4r/v13/ReportServiceWrapper.rb', line 71 def getAllJobs() begin # Construct request object and make API call obj = AdWords::V13::ReportService::GetAllJobs.new() return @driver.getAllJobs(obj) rescue SOAP::FaultError => fault raise(AdWords::Error::create_specific_api_error(fault), "getAllJobs Call Failed: " + fault.faultstring.to_s, caller) end end |
#getGzipReportDownloadUrl(reportJobId) ⇒ Object
Calls the getGzipReportDownloadUrl method of the Report service. Check the online documentation for this method.
Args:
-
reportJobId: SOAP::SOAPLong
Returns:
-
getGzipReportDownloadUrlReturn: SOAP::SOAPString
Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.
94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/adwords4r/v13/ReportServiceWrapper.rb', line 94 def getGzipReportDownloadUrl(reportJobId) begin AdWords::Service.validate_param('reportJobId', reportJobId, SOAP::SOAPLong) # Construct request object and make API call obj = AdWords::V13::ReportService::GetGzipReportDownloadUrl.new(reportJobId) return @driver.getGzipReportDownloadUrl(obj) rescue SOAP::FaultError => fault raise(AdWords::Error::create_specific_api_error(fault), "getGzipReportDownloadUrl Call Failed: " + fault.faultstring.to_s, caller) end end |
#getReportDownloadUrl(reportJobId) ⇒ Object
Calls the getReportDownloadUrl method of the Report service. Check the online documentation for this method.
Args:
-
reportJobId: SOAP::SOAPLong
Returns:
-
getReportDownloadUrlReturn: SOAP::SOAPString
Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.
119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/adwords4r/v13/ReportServiceWrapper.rb', line 119 def getReportDownloadUrl(reportJobId) begin AdWords::Service.validate_param('reportJobId', reportJobId, SOAP::SOAPLong) # Construct request object and make API call obj = AdWords::V13::ReportService::GetReportDownloadUrl.new(reportJobId) return @driver.getReportDownloadUrl(obj) rescue SOAP::FaultError => fault raise(AdWords::Error::create_specific_api_error(fault), "getReportDownloadUrl Call Failed: " + fault.faultstring.to_s, caller) end end |
#getReportJobStatus(reportJobId) ⇒ Object
Calls the getReportJobStatus method of the Report service. Check the online documentation for this method.
Args:
-
reportJobId: SOAP::SOAPLong
Returns:
-
getReportJobStatusReturn: AdWords::V13::ReportService::ReportJobStatus
Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.
144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/adwords4r/v13/ReportServiceWrapper.rb', line 144 def getReportJobStatus(reportJobId) begin AdWords::Service.validate_param('reportJobId', reportJobId, SOAP::SOAPLong) # Construct request object and make API call obj = AdWords::V13::ReportService::GetReportJobStatus.new(reportJobId) return @driver.getReportJobStatus(obj) rescue SOAP::FaultError => fault raise(AdWords::Error::create_specific_api_error(fault), "getReportJobStatus Call Failed: " + fault.faultstring.to_s, caller) end end |
#scheduleReportJob(job) ⇒ Object
Calls the scheduleReportJob method of the Report service. Check the online documentation for this method.
Args:
-
job: AdWords::V13::ReportService::ReportJob
Returns:
-
scheduleReportJobReturn: SOAP::SOAPLong
Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.
169 170 171 172 173 174 175 176 177 178 179 180 |
# File 'lib/adwords4r/v13/ReportServiceWrapper.rb', line 169 def scheduleReportJob(job) begin AdWords::Service.validate_param('job', job, AdWords::V13::ReportService::ReportJob) # Construct request object and make API call obj = AdWords::V13::ReportService::ScheduleReportJob.new(job) return @driver.scheduleReportJob(obj) rescue SOAP::FaultError => fault raise(AdWords::Error::create_specific_api_error(fault), "scheduleReportJob Call Failed: " + fault.faultstring.to_s, caller) end end |
#validateReportJob(job) ⇒ Object
Calls the validateReportJob method of the Report service. Check the online documentation for this method.
Args:
-
job: AdWords::V13::ReportService::ReportJob
Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.
191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/adwords4r/v13/ReportServiceWrapper.rb', line 191 def validateReportJob(job) begin AdWords::Service.validate_param('job', job, AdWords::V13::ReportService::ReportJob) # Construct request object and make API call obj = AdWords::V13::ReportService::ValidateReportJob.new(job) return @driver.validateReportJob(obj) rescue SOAP::FaultError => fault raise(AdWords::Error::create_specific_api_error(fault), "validateReportJob Call Failed: " + fault.faultstring.to_s, caller) end end |