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

אם אתם צריכים לבצע פעולות על סוגים שונים של ישויות בו-זמנית או שאתם מעדיפים לכתוב מול נקודת קצה אחת במקום להשתמש בנקודת קצה נפרדת לכל סוג משאב, אתם יכולים להשתמש בנקודת הקצה 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])

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