Hi team,
We are migrating from version 3.3 to 3.4 using java API library and we have seen that the patch request has changed (in this example, for landing pages):
//v3.3
patchedLandingPage = reporting.advertiserLandingPages().patch(userProfileId, id, landingPage).execute();
//v3.4
patchedLandingPage = reporting.advertiserLandingPages().patch(userProfileId, landingPage).execute();
This is the definition:
Patch com.google.api.services.dfareporting.Dfareporting.AdvertiserLandingPages.patch(Long profileId, LandingPage content) throws IOException
so now it does not allow to specify the ID of the object. We have informed the id in the patched object itself (we just want to change the name of the landing page, in this case):
myLandingPage = new LandingPage();
myLandingPage.setName("DEFAULT_LP_CAMPAIGN ID_24632863"); //set new name
myLandingPage.setId(27708076); //inform original landing page id
That generates the following object:
GenericData{classInfo=[advertiserId, archived, deepLinks, id, kind, name, url], {id=27708076, name=DEFAULT_LP_CAMPAIGN ID_24632863}}
but we still are getting an error informing us that no ID has been provided:
com.google.api.client.googleapis.json.GoogleJsonResponseException: 404 Not Found
{
"code" : 404,
"errors" : [ {
"domain" : "global",
"message" : "18101 : Landing page with ID 0 can't be found.",
"reason" : "notFound"
} ],
"message" : "18101 : Landing page with ID 0 can't be found."
}
I have reviewed the patching method in the documentation and I havent't found any information; more even, it states that it requires the id:
But unfortunately I don't see any patch operations example.
The library I am using is the one informed in the project page (v3.4-rev20200825-1.30.10):
As there are other patch operations (ad, account, subaccount) that seem to have changed too, I would like to know how they should be managed with java (and preferably, a full example, pretty please!). I fail to understand it right now. Sorry if I am asking something obvious I am overlooking.
Finally, I would like to know if there is a changelog with breaking changes like this one (a change in the method's signature), for planning future migrations.