Module: AdsCommonForAdcenter::ApiConfig
- Includes:
- AdsCommon::ApiConfig
- Included in:
- AdcenterApi::ApiConfig
- Defined in:
- lib/ads_common_for_adcenter/api_config.rb
Overview
Overriden for Adcenter #########
Instance Method Summary collapse
-
#endpoint(environment, version, service) ⇒ Object
Get the endpoint for a service on a given environment and API version.
-
#get_wsdls(version) ⇒ Object
Generates an array of WSDL URLs based on defined Services and version supplied.
Instance Method Details
#endpoint(environment, version, service) ⇒ Object
Get the endpoint for a service on a given environment and API version.
Args:
-
environment: the service environment to be used
-
version: the API version
-
service: the name of the API service
Returns: The endpoint URL
14 15 16 17 18 19 20 |
# File 'lib/ads_common_for_adcenter/api_config.rb', line 14 def endpoint(environment, version, service) if !address_config().nil? address_config()[version][service][environment].to_s else "" end end |
#get_wsdls(version) ⇒ Object
Generates an array of WSDL URLs based on defined Services and version supplied. This method is used by generators to determine what service wrappers to generate.
Args:
- version: the API version.
Returns
hash of pairs Service => WSDL URL
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/ads_common_for_adcenter/api_config.rb', line 31 def get_wsdls(version) res = {} services(version).each do |service| if (!address_config().nil?) path = address_config()[version][service][default_environment()].to_s end res[service.to_s] = path || "" end return res end |