Closed Black-pikaso closed 5 years ago
Hi. It looks like that's a mistake in our example code. The :type
symbol should be :xsi_type
. Try changing your example to be like this:
:custom_field_values => [
{
:custom_field_id => 1282985,
:xsi_type => 'CustomFieldValue',
:value => {:xsi_type => 'NumberValue', :value => 1}
}
]
Let me know if that fixes the issue for you, and then I'll update our example code. Thanks for catching this!
Hi. Yeah, replacing type
with xsi_type
really fixed the issue.
Thank you very much for your hint!
Hi. I have a trouble creating a line item with
custom_field_values
attribute (withoutcustom_field_values
it works perfectly) My code example is like this:It causes an error:
AdsCommon::Errors::UnexpectedParametersError: [:type, :value]
Looks like it is not happy about
:type, :value
keys ofcustom_field_values
attributes but i was following an example from https://github.com/googleads/google-api-ads-ruby/blob/master/ad_manager_api/examples/v201811/custom_field_service/set_line_item_custom_field_value.rb#L88gem version = 1.5.0 API version = v201808
Any ideas why it is happening? Any help is appreciated. Thanks