Class: SoapyBing::Soap::Request::PollGenerateReportRequest

Inherits:
Base
  • Object
show all
Defined in:
lib/soapy_bing/soap/request/poll_generate_report_request.rb

Defined Under Namespace

Classes: FailedStatusError, PendingStatusError, PollingTimeoutError

Constant Summary collapse

API_BASE_URL =
'https://reporting.api.bingads.microsoft.com'
API_VERSION =
9
API_ENDPOINT =
"#{API_BASE_URL}/Api/Advertiser/Reporting/V#{API_VERSION}/ReportingService.svc"
POLLING_TRIES =
100

Constants inherited from Base

Base::DEFAULT_HTTP_HEADERS

Instance Attribute Summary

Attributes inherited from Base

#context

Instance Method Summary collapse

Methods inherited from Base

#action_name, #default_body, #default_headers, #initialize, #post

Methods included from Helpers::ClassName

#class_name

Constructor Details

This class inherits a constructor from SoapyBing::Soap::Request::Base

Instance Method Details

#performObject



17
18
19
20
21
# File 'lib/soapy_bing/soap/request/poll_generate_report_request.rb', line 17

def perform
  Retryable.retryable(tries: POLLING_TRIES, on: PendingStatusError) { poll! }
rescue PendingStatusError
  raise PollingTimeoutError
end