Aynı anda farklı türlerdeki öğeler üzerinde işlem yapmanız gerekiyorsa veya kaynak türü başına ayrı bir uç nokta kullanmak yerine tek bir uç noktaya karşı yazmayı tercih ediyorsanız desteklenen tüm değiştirme işlemleri için GoogleAdsService.Mutate
uç noktasını kullanabilirsiniz.
Değiştirme işlemleri
Her MutateGoogleAdsRequest
, tekrarlanan bir MutateOperation
kabul eder. Bunların her biri, bir kaynak türü için tek bir işlem içerebilir. Tek bir GoogleAdsService.Mutate
çağrısında bir kampanya ve bir reklam grubu oluşturmak için iki MutateOperation
öğesi (biri CampaignOperation
, diğeri AdGroupOperation
için) oluşturmanız ve ardından her ikisini de GoogleAdsService
'a iletmeniz gerekir.
Ruby
mutate_operation1 = client.operation(:Mutate)
mutate_operation2 = client.operation(:Mutate)
campaign_operation = client.operation(:Campaign)
ad_group_operation = client.operation(:AdGroup)
# Do some setup here to get campaign_operation and ad_group_operation into the
# state you would want them for a regular mutate call to their respective
# services.
mutate_operation1.campaign_operation = campaign_operation
mutate_operation2.ad_group_operation = ad_group_operation
google_ads_service.mutate(customer_id, [mutate_operation1, mutate_operation2])
Diğer hizmetler gibi bu uç nokta da kısmi hatayı ve yalnızca doğrulama özelliğini destekler.