Toplu Dönüştürme

Aynı anda farklı türde öğelerle işlem yapmanız gerekiyorsa veya kaynak türü başına ayrı bir uç nokta kullanmak yerine tek bir uç noktaya yazmak istiyorsanız desteklenen tüm değiştirme işlemleri için GoogleAdsService.Mutate uç noktasını kullanabilirsiniz.

Değişiklik işlemleri

Her MutateGoogleAdsRequest, tekrarlanan bir MutateOperation kabul eder. Bu MutateOperation'lerin 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 ikisini de GoogleAdsService'e 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 hata ve yalnızca doğrulamayı destekler.