שינויים בכמות גדולה

אם אתם צריכים לבצע פעולות על סוגי ישויות שונים בו-זמנית, או אם אתם מעדיפים לכתוב לנקודת קצה אחת במקום להשתמש בנקודת קצה נפרדת לכל סוג משאב, תוכלו להשתמש בנקודת הקצה GoogleAdsService.Mutate לכל פעולות השינוי הנתמכות.

פעולות שינוי

כל MutateGoogleAdsRequest מקבל MutateOperation חוזר, שכל אחד מהם יכול לכלול פעולה אחת לסוג משאב אחד. כדי ליצור קמפיין אחד וקבוצת מודעות אחת בקריאה אחת ל-GoogleAdsService.Mutate, צריך ליצור שתי ישויות MutateOperation (אחת ל-CampaignOperation והשנייה ל-AdGroupOperation) ולהעביר את שתיהן ל-GoogleAdsService.

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])

כמו שירותים אחרים, נקודת הקצה הזו תומכת בכישלון חלקי ובאימות בלבד.