如需同時在不同類型的實體上執行,或
偏好寫入單一端點,而非使用獨立的端點
那麼您可以使用
GoogleAdsService.Mutate敬上
端點,用於所有支援的 mut 作業端點。
更改作業
每個 MutateGoogleAdsRequest
接受重複的 MutateOperation,每個
其中可以包含一項資源類型的單一作業。建立
一個廣告活動和一個廣告群組
GoogleAdsService.Mutate 呼叫,
您需要建立兩個 MutateOperation
實體 (也就是 CampaignOperation 的一個實體,
AdGroupOperation 的另一個版本,
然後將這兩項工具
GoogleAdsService。
小茹
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])
如同其他服務,這個端點也支援 部分失敗和 。