T
- The Bing Ads service interface that should be called. For example, ICampaignManagementService
.public class ServiceClient<T> extends Object
Note: Valid value of T
are:
Constructor and Description |
---|
ServiceClient(AuthorizationData authorizationData,
ApiEnvironment environment,
Class<T> serviceInterface) |
ServiceClient(AuthorizationData authorizationData,
ApiEnvironment environment,
Class<T> serviceInterface,
boolean enableRestApi)
Initializes a new instance of this class with the specified authorization data and Bing Ads API environment.
|
ServiceClient(AuthorizationData authorizationData,
Class<T> serviceInterface)
Initializes a new instance of this class with the specified authorization data.
|
Modifier and Type | Method and Description |
---|---|
AuthorizationData |
getAuthorizationData()
Gets the data representing a user who intends to call the API.
|
ApiEnvironment |
getEnvironment()
Gets the Bing Ads API environment.
|
static boolean |
getRestApiEnabledDefault(Class<?> serviceClass) |
T |
getService()
Creates an object implementing the service interface that needs to be called.
|
static void |
setRestApiEnabledDefault(Class<?> serviceClass,
boolean restApiEnabled) |
public ServiceClient(AuthorizationData authorizationData, Class<T> serviceInterface)
authorizationData
- Represents a user who intends to access the corresponding customer and account.serviceInterface
- the Bing Ads service interface that should be calledpublic ServiceClient(AuthorizationData authorizationData, ApiEnvironment environment, Class<T> serviceInterface)
public ServiceClient(AuthorizationData authorizationData, ApiEnvironment environment, Class<T> serviceInterface, boolean enableRestApi)
authorizationData
- Represents a user who intends to access the corresponding customer and account.environment
- Bing Ads API environmentserviceInterface
- the Bing Ads service interface that should be calledpublic ApiEnvironment getEnvironment()
public AuthorizationData getAuthorizationData()
public static void setRestApiEnabledDefault(Class<?> serviceClass, boolean restApiEnabled)
public static boolean getRestApiEnabledDefault(Class<?> serviceClass)
public T getService()
Copyright © 2024. All rights reserved.