Closed agejevasv closed 4 years ago
CustomTargetingKey type has reportableType as one of supported fields (https://developers.google.com/ad-manager/api/reference/v202002/CustomTargetingService.CustomTargetingKey#reportableType), but if it is included when creating a key, service call fails with:
CustomTargetingKey
reportableType
AdsCommon::Errors::UnexpectedParametersError: [:reportableType]
Here's an example code that could be used to reproduce it. It works if reportableType: 'ON' is removed from the key:
reportableType: 'ON'
require 'ad_manager_api' def create_custom_targeting_keys_and_values(ad_manager) custom_targeting_service = ad_manager.service(:CustomTargetingService, API_VERSION) key = { display_name: 'test', name: 'test', type: 'PREDEFINED', reportableType: 'ON' } custom_targeting_service.create_custom_targeting_keys([key]) end if __FILE__ == $0 API_VERSION = :v202002 ad_manager = AdManagerApi::Api.new create_custom_targeting_keys_and_values(ad_manager) end
Is there some issue on my part or is this field was not meant to be used when creating a new key?
Closing, my issue was reportableType should be reportable_type.
reportable_type
CustomTargetingKey
type hasreportableType
as one of supported fields (https://developers.google.com/ad-manager/api/reference/v202002/CustomTargetingService.CustomTargetingKey#reportableType), but if it is included when creating a key, service call fails with:AdsCommon::Errors::UnexpectedParametersError: [:reportableType]
Here's an example code that could be used to reproduce it. It works if
reportableType: 'ON'
is removed from the key:Is there some issue on my part or is this field was not meant to be used when creating a new key?