Aynı anda farklı varlık türleri üzerinde çalışmanız gerekiyorsa veya kaynak türü başına ayrı bir uç nokta kullanmak yerine tek bir uç noktaya göre yazmayı tercih ediyorsanız desteklenen tüm değiştirme işlemleri için GoogleAdsService.Mutate
uç noktasını kullanabilirsiniz.
İşlemleri değiştirme
Her MutateGoogleAdsRequest
, her biri bir kaynak türü için tek bir işlem içerebilen tekrarlanan MutateOperation
kabul eder. Tek bir GoogleAdsService.Mutate
çağrısında bir kampanya ve bir reklam grubu oluşturmak için iki MutateOperation
varlığı (biri CampaignOperation
, diğeri AdGroupOperation
için) oluşturup her ikisini de GoogleAdsService
adlı işletmeye 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 hizmetlerde olduğu gibi bu uç nokta da kısmi hata ve yalnızca doğrulama işlemlerini destekler.