diff --git a/examples/AdAccountAdCreativesEdge.java b/examples/AdAccountAdCreativesEdge.java deleted file mode 100644 index 385df1c9..00000000 --- a/examples/AdAccountAdCreativesEdge.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdCreativesEdge { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).getAdCreatives() - .requestNameField() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdCreativesPost.java b/examples/AdAccountAdCreativesPost.java deleted file mode 100644 index 843806a8..00000000 --- a/examples/AdAccountAdCreativesPost.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdCreativesPost { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdCreative() - .setName("Sample Promoted Post") - .setObjectStoryId("_") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdCreativesPostCreateAdCreative.java b/examples/AdAccountAdCreativesPostCreateAdCreative.java deleted file mode 100644 index 4545aa03..00000000 --- a/examples/AdAccountAdCreativesPostCreateAdCreative.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdCreativesPostCreateAdCreative { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdCreative() - .setObjectStoryId("_") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdCreativesPostCreateAdCreativeCanvas.java b/examples/AdAccountAdCreativesPostCreateAdCreativeCanvas.java deleted file mode 100644 index 5df9d156..00000000 --- a/examples/AdAccountAdCreativesPostCreateAdCreativeCanvas.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdCreativesPostCreateAdCreativeCanvas { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdCreative() - .setImageHash("") - .setObjectStorySpec( - new AdCreativeObjectStorySpec() - .setFieldLinkData( - new AdCreativeLinkData() - .setFieldCallToAction( - new AdCreativeLinkDataCallToAction() - .setFieldType(AdCreativeLinkDataCallToAction.EnumType.VALUE_LEARN_MORE) - ) - .setFieldImageHash("") - .setFieldLink("") - .setFieldName("Creative message") - ) - .setFieldPageId("") - ) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasDV.java b/examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasDV.java deleted file mode 100644 index a0ada967..00000000 --- a/examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasDV.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasDV { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdCreative() - .setObjectStorySpec( - new AdCreativeObjectStorySpec() - .setFieldPageId("") - .setFieldTemplateData( - new AdCreativeLinkData() - .setFieldCallToAction( - new AdCreativeLinkDataCallToAction() - .setFieldType(AdCreativeLinkDataCallToAction.EnumType.VALUE_LEARN_MORE) - ) - .setFieldCustomizationRulesSpec(Arrays.asList( - new AdCustomizationRuleSpec() - .setFieldCustomizationSpec("{\"language\":\"en_XX\"}") - , - new AdCustomizationRuleSpec() - .setFieldCustomizationSpec("{\"language\":\"fr_XX\"}") - .setFieldLink("") - .setFieldMessage("French Creative message") - .setFieldName("French Creative title") - )) - .setFieldFormatOption(AdCreativeLinkData.EnumFormatOption.VALUE_COLLECTION_VIDEO) - .setFieldLink("") - .setFieldMessage("English Creative message") - .setFieldName("English Creative title") - .setFieldRetailerItemIds(Arrays.asList(0L, 0L, 0L, 0L)) - ) - ) - .setProductSetId("") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasImage.java b/examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasImage.java deleted file mode 100644 index e064e563..00000000 --- a/examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasImage.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasImage { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdCreative() - .setObjectStorySpec( - new AdCreativeObjectStorySpec() - .setFieldLinkData( - new AdCreativeLinkData() - .setFieldCallToAction( - new AdCreativeLinkDataCallToAction() - .setFieldType(AdCreativeLinkDataCallToAction.EnumType.VALUE_LEARN_MORE) - ) - .setFieldCustomizationRulesSpec(Arrays.asList( - new AdCustomizationRuleSpec() - .setFieldCustomizationSpec("{\"language\":\"en_XX\"}") - , - new AdCustomizationRuleSpec() - .setFieldCustomizationSpec("{\"language\":\"fr_XX\"}") - .setFieldLink("") - .setFieldMessage("French Creative message") - .setFieldName("French Creative title") - )) - .setFieldLink("") - .setFieldMessage("English Creative message") - .setFieldName("English Creative title") - .setFieldPicture("") - .setFieldRetailerItemIds(Arrays.asList(0L, 0L, 0L, 0L)) - ) - .setFieldPageId("") - ) - .setProductSetId("") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasVideo.java b/examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasVideo.java deleted file mode 100644 index 2e2c12e5..00000000 --- a/examples/AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasVideo.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdCreativesPostCreateAdCreativeCustomizationCanvasVideo { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdCreative() - .setObjectStorySpec( - new AdCreativeObjectStorySpec() - .setFieldPageId("") - .setFieldVideoData( - new AdCreativeVideoData() - .setFieldCallToAction( - new AdCreativeLinkDataCallToAction() - .setFieldType(AdCreativeLinkDataCallToAction.EnumType.VALUE_LEARN_MORE) - .setFieldValue( - new AdCreativeLinkDataCallToActionValue() - .setFieldLink("") - ) - ) - .setFieldImageUrl("") - .setFieldMessage("English Creative message") - .setFieldRetailerItemIds(Arrays.asList(0L, 0L, 0L, 0L)) - .setFieldTitle("English Creative title") - .setFieldVideoId("") - ) - ) - .setProductSetId("") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdSetsPost2CreateMAIA.java b/examples/AdAccountAdSetsPost2CreateMAIA.java deleted file mode 100644 index b1a35ad7..00000000 --- a/examples/AdAccountAdSetsPost2CreateMAIA.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdSetsPost2CreateMAIA { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdSet() - .setName("Mobile App Installs Ad Set") - .setDailyBudget(1000L) - .setBidAmount(2L) - .setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS) - .setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_APP_INSTALLS) - .setCampaignId("") - .setPromotedObject("{\"application_id\":\"\",\"object_store_url\":\"\"}") - .setTargeting( - new Targeting() - .setFieldDevicePlatforms(Arrays.asList(Targeting.EnumDevicePlatforms.VALUE_MOBILE)) - .setFieldFacebookPositions(Arrays.asList("feed")) - .setFieldGeoLocations( - new TargetingGeoLocation() - .setFieldCountries(Arrays.asList("US")) - ) - .setFieldPublisherPlatforms(Arrays.asList("facebook", "audience_network")) - .setFieldUserOs(Arrays.asList("IOS")) - ) - .setStatus(AdSet.EnumStatus.VALUE_PAUSED) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostAdSetCreateCpa.java b/examples/AdAccountAdSetsPostAdSetCreateCpa.java deleted file mode 100644 index bca1fce3..00000000 --- a/examples/AdAccountAdSetsPostAdSetCreateCpa.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdSetsPostAdSetCreateCpa { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdSet() - .setName("A CPA Ad Set") - .setCampaignId("") - .setDailyBudget(5000L) - .setStartTime("2024-06-18T16:39:15-0700") - .setEndTime("2024-06-25T16:39:15-0700") - .setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS) - .setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_REACH) - .setBidAmount(1000L) - .setPromotedObject("{\"page_id\":\"\"}") - .setTargeting( - new Targeting() - .setFieldFacebookPositions(Arrays.asList("feed")) - .setFieldGeoLocations( - new TargetingGeoLocation() - .setFieldCountries(Arrays.asList("US")) - ) - ) - .setParam("user_os", "iOS") - .setParam("publisher_platforms", "facebook") - .setParam("device_platforms", "mobile") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.java b/examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.java deleted file mode 100644 index 84afbb1b..00000000 --- a/examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdSetsPostAdSetCreateCpaAppEvents { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdSet() - .setName("A CPA Ad Set optimized for App Events") - .setCampaignId("") - .setDailyBudget(300L) - .setStartTime("2024-06-18T16:40:02-0700") - .setEndTime("2024-06-25T16:40:02-0700") - .setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS) - .setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_OFFSITE_CONVERSIONS) - .setBidAmount(100L) - .setStatus(AdSet.EnumStatus.VALUE_PAUSED) - .setPromotedObject("{\"application_id\":\"\",\"object_store_url\":\"\",\"custom_event_type\":\"PURCHASE\"}") - .setTargeting( - new Targeting() - .setFieldFacebookPositions(Arrays.asList("feed")) - .setFieldGeoLocations( - new TargetingGeoLocation() - .setFieldCountries(Arrays.asList("US")) - ) - .setFieldUserOs(Arrays.asList("iOS")) - ) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostBehaviorTargeting.java b/examples/AdAccountAdSetsPostBehaviorTargeting.java deleted file mode 100644 index 32807f5d..00000000 --- a/examples/AdAccountAdSetsPostBehaviorTargeting.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdSetsPostBehaviorTargeting { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdSet() - .setName("My AdSet") - .setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_REACH) - .setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS) - .setBidAmount(2L) - .setDailyBudget(1000L) - .setCampaignId("") - .setTargeting( - new Targeting() - .setFieldBehaviors(Arrays.asList( - new IDName() - .setFieldId(6007101597783L) - .setFieldName("Business Travelers") - , - new IDName() - .setFieldId(6004386044572L) - .setFieldName("Android Owners (All)") - )) - .setFieldFacebookPositions(Arrays.asList("feed")) - .setFieldGeoLocations( - new TargetingGeoLocation() - .setFieldCountries(Arrays.asList("US")) - ) - ) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostBidMultiplier.java b/examples/AdAccountAdSetsPostBidMultiplier.java deleted file mode 100644 index 3d78d400..00000000 --- a/examples/AdAccountAdSetsPostBidMultiplier.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdSetsPostBidMultiplier { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdSet() - .setName("My Adset with bid multiplier") - .setCampaignId("") - .setDailyBudget(3000L) - .setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS) - .setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_OFFSITE_CONVERSIONS) - .setBidAmount(500L) - .setBidAdjustments("{\"user_groups\":{\"gender\":{\"male\":0.8,\"female\":1}}}") - .setPromotedObject("{\"product_set_id\":\"\",\"custom_event_type\":\"ADD_TO_CART\"}") - .setTargeting( - new Targeting() - .setFieldFacebookPositions(Arrays.asList("feed")) - .setFieldGeoLocations( - new TargetingGeoLocation() - .setFieldCountries(Arrays.asList("US")) - ) - ) - .setStatus(AdSet.EnumStatus.VALUE_PAUSED) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostCreateAdSet.java b/examples/AdAccountAdSetsPostCreateAdSet.java deleted file mode 100644 index eab4c8ae..00000000 --- a/examples/AdAccountAdSetsPostCreateAdSet.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdSetsPostCreateAdSet { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdSet() - .setName("My First AdSet") - .setLifetimeBudget(20000L) - .setStartTime("2024-06-18T16:38:30-0700") - .setEndTime("2024-06-25T16:38:30-0700") - .setCampaignId("") - .setBidAmount(500L) - .setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS) - .setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_POST_ENGAGEMENT) - .setTargeting( - new Targeting() - .setFieldAgeMax(24L) - .setFieldAgeMin(20L) - .setFieldBehaviors(Arrays.asList( - new IDName() - .setFieldId(6002714895372L) - .setFieldName("All travelers") - )) - .setFieldFacebookPositions(Arrays.asList("feed")) - .setFieldGenders(Arrays.asList(1L)) - .setFieldGeoLocations( - new TargetingGeoLocation() - .setFieldCities(Arrays.asList( - new TargetingGeoLocationCity() - .setFieldDistanceUnit("mile") - .setFieldKey("777934") - .setFieldRadius(10L) - )) - .setFieldCountries(Arrays.asList("US")) - .setFieldRegions(Arrays.asList( - new TargetingGeoLocationRegion() - .setFieldKey("4081") - )) - ) - .setFieldInterests(Arrays.asList( - new IDName() - .setFieldId("") - .setFieldName("") - )) - .setFieldLifeEvents(Arrays.asList( - new IDName() - .setFieldId(6002714398172L) - .setFieldName("Newlywed (1 year)") - )) - .setFieldPublisherPlatforms(Arrays.asList("facebook", "audience_network")) - ) - .setStatus(AdSet.EnumStatus.VALUE_PAUSED) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostCreateAudienceNetwork.java b/examples/AdAccountAdSetsPostCreateAudienceNetwork.java deleted file mode 100644 index d9a628d2..00000000 --- a/examples/AdAccountAdSetsPostCreateAudienceNetwork.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdSetsPostCreateAudienceNetwork { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdSet() - .setName("My Ad Set") - .setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_LINK_CLICKS) - .setBillingEvent(AdSet.EnumBillingEvent.VALUE_LINK_CLICKS) - .setBidAmount(2L) - .setDailyBudget(1000L) - .setCampaignId("") - .setTargeting( - new Targeting() - .setFieldDevicePlatforms(Arrays.asList(Targeting.EnumDevicePlatforms.VALUE_MOBILE)) - .setFieldFacebookPositions(Arrays.asList("feed")) - .setFieldGeoLocations( - new TargetingGeoLocation() - .setFieldCountries(Arrays.asList("US")) - ) - .setFieldPublisherPlatforms(Arrays.asList("facebook", "audience_network")) - ) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostDailyBudget20.java b/examples/AdAccountAdSetsPostDailyBudget20.java deleted file mode 100644 index cae345de..00000000 --- a/examples/AdAccountAdSetsPostDailyBudget20.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdSetsPostDailyBudget20 { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdSet() - .setName("My First Adset") - .setDailyBudget(2000L) - .setStartTime("2024-06-11T16:39:34-0700") - .setEndTime("2024-06-18T16:39:34-0700") - .setCampaignId("") - .setBidAmount(100L) - .setBillingEvent(AdSet.EnumBillingEvent.VALUE_LINK_CLICKS) - .setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_LINK_CLICKS) - .setTargeting( - new Targeting() - .setFieldFacebookPositions(Arrays.asList("feed")) - .setFieldGeoLocations( - new TargetingGeoLocation() - .setFieldCountries(Arrays.asList("US")) - ) - ) - .setStatus(AdSet.EnumStatus.VALUE_PAUSED) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostDemographicTargeting.java b/examples/AdAccountAdSetsPostDemographicTargeting.java deleted file mode 100644 index 12c25ae9..00000000 --- a/examples/AdAccountAdSetsPostDemographicTargeting.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdSetsPostDemographicTargeting { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdSet() - .setName("My First AdSet") - .setDailyBudget(10000L) - .setBidAmount(300L) - .setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS) - .setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_REACH) - .setCampaignId("") - .setPromotedObject("{\"page_id\":\"\"}") - .setTargeting( - new Targeting() - .setFieldAgeMax(24L) - .setFieldAgeMin(20L) - .setFieldBehaviors(Arrays.asList( - new IDName() - .setFieldId(6002714895372L) - .setFieldName("All travelers") - )) - .setFieldDevicePlatforms(Arrays.asList(Targeting.EnumDevicePlatforms.VALUE_MOBILE)) - .setFieldFacebookPositions(Arrays.asList("feed")) - .setFieldGenders(Arrays.asList(1L)) - .setFieldGeoLocations( - new TargetingGeoLocation() - .setFieldCities(Arrays.asList( - new TargetingGeoLocationCity() - .setFieldDistanceUnit("mile") - .setFieldKey(777934L) - .setFieldRadius(10L) - )) - .setFieldCountries(Arrays.asList("US")) - .setFieldRegions(Arrays.asList( - new TargetingGeoLocationRegion() - .setFieldKey("4081") - )) - ) - .setFieldInterests(Arrays.asList( - new IDName() - .setFieldId("") - .setFieldName("") - )) - .setFieldLifeEvents(Arrays.asList( - new IDName() - .setFieldId(6002714398172L) - .setFieldName("Newlywed (1 year)") - )) - .setFieldPublisherPlatforms(Arrays.asList("facebook", "audience_network")) - ) - .setStatus(AdSet.EnumStatus.VALUE_PAUSED) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostInterestTargeting.java b/examples/AdAccountAdSetsPostInterestTargeting.java deleted file mode 100644 index df444bb1..00000000 --- a/examples/AdAccountAdSetsPostInterestTargeting.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdSetsPostInterestTargeting { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdSet() - .setName("My First AdSet") - .setDailyBudget(10000L) - .setBidAmount(300L) - .setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS) - .setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_REACH) - .setCampaignId("") - .setPromotedObject("{\"page_id\":\"\"}") - .setTargeting( - new Targeting() - .setFieldAgeMax(24L) - .setFieldAgeMin(20L) - .setFieldDevicePlatforms(Arrays.asList(Targeting.EnumDevicePlatforms.VALUE_MOBILE)) - .setFieldFacebookPositions(Arrays.asList("feed")) - .setFieldFlexibleSpec(Arrays.asList( - new FlexibleTargeting() - .setFieldInterests(Arrays.asList( - new IDName() - .setFieldId("") - .setFieldName("") - )) - )) - .setFieldGenders(Arrays.asList(1L)) - .setFieldGeoLocations( - new TargetingGeoLocation() - .setFieldCities(Arrays.asList( - new TargetingGeoLocationCity() - .setFieldDistanceUnit("mile") - .setFieldKey(777934L) - .setFieldRadius(10L) - )) - .setFieldCountries(Arrays.asList("US")) - .setFieldRegions(Arrays.asList( - new TargetingGeoLocationRegion() - .setFieldKey("4081") - )) - ) - .setFieldPublisherPlatforms(Arrays.asList("facebook", "audience_network")) - ) - .setStatus(AdSet.EnumStatus.VALUE_PAUSED) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostLifetimeBudget200Duration10Days.java b/examples/AdAccountAdSetsPostLifetimeBudget200Duration10Days.java deleted file mode 100644 index 501d0b15..00000000 --- a/examples/AdAccountAdSetsPostLifetimeBudget200Duration10Days.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdSetsPostLifetimeBudget200Duration10Days { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdSet() - .setName("My First Adset") - .setLifetimeBudget(20000L) - .setStartTime("2024-06-11T16:39:43-0700") - .setEndTime("2024-06-21T16:39:43-0700") - .setCampaignId("") - .setBidAmount(100L) - .setBillingEvent(AdSet.EnumBillingEvent.VALUE_LINK_CLICKS) - .setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_LINK_CLICKS) - .setTargeting( - new Targeting() - .setFieldFacebookPositions(Arrays.asList("feed")) - .setFieldGeoLocations( - new TargetingGeoLocation() - .setFieldCountries(Arrays.asList("US")) - ) - .setFieldPublisherPlatforms(Arrays.asList("facebook", "audience_network")) - ) - .setStatus(AdSet.EnumStatus.VALUE_PAUSED) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostOptimizePostEngagement.java b/examples/AdAccountAdSetsPostOptimizePostEngagement.java deleted file mode 100644 index 5bdf2b74..00000000 --- a/examples/AdAccountAdSetsPostOptimizePostEngagement.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdSetsPostOptimizePostEngagement { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdSet() - .setName("My First Adset") - .setLifetimeBudget(20000L) - .setStartTime("2024-06-11T16:39:52-0700") - .setEndTime("2024-06-21T16:39:52-0700") - .setCampaignId("") - .setBidAmount(500L) - .setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS) - .setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_POST_ENGAGEMENT) - .setTargeting( - new Targeting() - .setFieldAgeMax(24L) - .setFieldAgeMin(20L) - .setFieldBehaviors(Arrays.asList( - new IDName() - .setFieldId(6002714895372L) - .setFieldName("All travelers") - )) - .setFieldDevicePlatforms(Arrays.asList(Targeting.EnumDevicePlatforms.VALUE_DESKTOP)) - .setFieldFacebookPositions(Arrays.asList("feed")) - .setFieldGenders(Arrays.asList(1L)) - .setFieldGeoLocations( - new TargetingGeoLocation() - .setFieldCities(Arrays.asList( - new TargetingGeoLocationCity() - .setFieldDistanceUnit("mile") - .setFieldKey(777934L) - .setFieldRadius(10L) - )) - .setFieldCountries(Arrays.asList("US")) - .setFieldRegions(Arrays.asList( - new TargetingGeoLocationRegion() - .setFieldKey("4081") - )) - ) - .setFieldLifeEvents(Arrays.asList( - new IDName() - .setFieldId(6002714398172L) - .setFieldName("Newlywed (1 year)") - )) - .setFieldPublisherPlatforms(Arrays.asList("facebook")) - ) - .setStatus(AdSet.EnumStatus.VALUE_PAUSED) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostPageLikes.java b/examples/AdAccountAdSetsPostPageLikes.java deleted file mode 100644 index 3a35f08d..00000000 --- a/examples/AdAccountAdSetsPostPageLikes.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdSetsPostPageLikes { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdSet() - .setName("My Reach Ad Set") - .setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_REACH) - .setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS) - .setBidAmount(2L) - .setDailyBudget(1000L) - .setCampaignId("") - .setTargeting( - new Targeting() - .setFieldFacebookPositions(Arrays.asList("feed")) - .setFieldGeoLocations( - new TargetingGeoLocation() - .setFieldCountries(Arrays.asList("US")) - ) - ) - .setStatus(AdSet.EnumStatus.VALUE_PAUSED) - .setPromotedObject("{\"page_id\":\"\"}") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostPlacementTargeting.java b/examples/AdAccountAdSetsPostPlacementTargeting.java deleted file mode 100644 index eec4aaa9..00000000 --- a/examples/AdAccountAdSetsPostPlacementTargeting.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdSetsPostPlacementTargeting { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdSet() - .setName("My AdSet") - .setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_REACH) - .setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS) - .setBidAmount(2L) - .setDailyBudget(1000L) - .setCampaignId("") - .setTargeting( - new Targeting() - .setFieldFacebookPositions(Arrays.asList("feed")) - .setFieldGeoLocations( - new TargetingGeoLocation() - .setFieldCountries(Arrays.asList("US")) - ) - .setFieldPublisherPlatforms(Arrays.asList("facebook")) - ) - .setPromotedObject("{\"page_id\":\"\"}") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdSetsPostReach.java b/examples/AdAccountAdSetsPostReach.java deleted file mode 100644 index 92ec170d..00000000 --- a/examples/AdAccountAdSetsPostReach.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdSetsPostReach { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdSet() - .setName("My Reach Ad Set") - .setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_REACH) - .setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS) - .setBidAmount(2L) - .setDailyBudget(1000L) - .setCampaignId("") - .setTargeting( - new Targeting() - .setFieldExcludedGeoLocations( - new TargetingGeoLocation() - .setFieldRegions(Arrays.asList( - new TargetingGeoLocationRegion() - .setFieldKey("3847") - )) - ) - .setFieldFacebookPositions(Arrays.asList("feed")) - .setFieldGeoLocations( - new TargetingGeoLocation() - .setFieldCountries(Arrays.asList("US")) - ) - ) - .setStatus(AdSet.EnumStatus.VALUE_PAUSED) - .setPromotedObject("{\"page_id\":\"\"}") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdVideosPost.java b/examples/AdAccountAdVideosPost.java deleted file mode 100644 index 658189d6..00000000 --- a/examples/AdAccountAdVideosPost.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdVideosPost { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdVideo() - .setSource("") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdsPixelEdgeGetPixelCode.java b/examples/AdAccountAdsPixelEdgeGetPixelCode.java deleted file mode 100644 index 4fc9d4cc..00000000 --- a/examples/AdAccountAdsPixelEdgeGetPixelCode.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdsPixelEdgeGetPixelCode { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdsPixel(id, context).get() - .requestCodeField() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdsPixelsPost.java b/examples/AdAccountAdsPixelsPost.java deleted file mode 100644 index f5ac499d..00000000 --- a/examples/AdAccountAdsPixelsPost.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdsPixelsPost { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAdsPixel() - .setName("My WCA Pixel") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdsPost.java b/examples/AdAccountAdsPost.java deleted file mode 100644 index fdb7a69d..00000000 --- a/examples/AdAccountAdsPost.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdsPost { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAd() - .setName("My Ad") - .setAdsetId(L) - .setCreative( - new AdCreative() - .setFieldId("") - ) - .setStatus(Ad.EnumStatus.VALUE_PAUSED) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdsPostAdsRedownload.java b/examples/AdAccountAdsPostAdsRedownload.java deleted file mode 100644 index 6adda40b..00000000 --- a/examples/AdAccountAdsPostAdsRedownload.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdsPostAdsRedownload { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAd() - .setName("My AdGroup with Redownload") - .setAdsetId(L) - .setCreative( - new AdCreative() - .setFieldId("") - ) - .setParam("redownload", "1") - .setStatus(Ad.EnumStatus.VALUE_PAUSED) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountAdsPostTrackingPostEngagement.java b/examples/AdAccountAdsPostTrackingPostEngagement.java deleted file mode 100644 index 6a7497c5..00000000 --- a/examples/AdAccountAdsPostTrackingPostEngagement.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountAdsPostTrackingPostEngagement { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createAd() - .setName("My First Ad") - .setAdsetId(L) - .setCreative( - new AdCreative() - .setFieldId("") - ) - .setTrackingSpecs("{\"action.type\":\"post_engagement\",\"post\":\"\",\"page\":\"\"}") - .setStatus(Ad.EnumStatus.VALUE_PAUSED) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountCampaignsEdge.java b/examples/AdAccountCampaignsEdge.java deleted file mode 100644 index 51bd17c6..00000000 --- a/examples/AdAccountCampaignsEdge.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountCampaignsEdge { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).getCampaigns() - .setEffectiveStatus(Arrays.asList(Campaign.EnumEffectiveStatus.VALUE_ACTIVE,Campaign.EnumEffectiveStatus.VALUE_PAUSED)) - .requestNameField() - .requestObjectiveField() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountCampaignsPostLinkClicks.java b/examples/AdAccountCampaignsPostLinkClicks.java deleted file mode 100644 index b4829624..00000000 --- a/examples/AdAccountCampaignsPostLinkClicks.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountCampaignsPostLinkClicks { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createCampaign() - .setName("My campaign") - .setObjective(Campaign.EnumObjective.VALUE_OUTCOME_TRAFFIC) - .setStatus(Campaign.EnumStatus.VALUE_PAUSED) - .setParam("special_ad_categories", "[]") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesEdge.java b/examples/AdAccountCustomAudiencesEdge.java deleted file mode 100644 index 8c9683c1..00000000 --- a/examples/AdAccountCustomAudiencesEdge.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountCustomAudiencesEdge { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).getCustomAudiences() - .requestField("id") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesEdgeDataSourceSubtype.java b/examples/AdAccountCustomAudiencesEdgeDataSourceSubtype.java deleted file mode 100644 index c48ebf02..00000000 --- a/examples/AdAccountCustomAudiencesEdgeDataSourceSubtype.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountCustomAudiencesEdgeDataSourceSubtype { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).getCustomAudiences() - .requestField("data_source") - .requestField("subtype") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostCreateCustomAudience.java b/examples/AdAccountCustomAudiencesPostCreateCustomAudience.java deleted file mode 100644 index 7b6c1667..00000000 --- a/examples/AdAccountCustomAudiencesPostCreateCustomAudience.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountCustomAudiencesPostCreateCustomAudience { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createCustomAudience() - .setName("My new Custom Audience") - .setSubtype(CustomAudience.EnumSubtype.VALUE_CUSTOM) - .setDescription("People who purchased on my website") - .setCustomerFileSource(CustomAudience.EnumCustomerFileSource.VALUE_USER_PROVIDED_ONLY) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostDynamicEventValueBasedLookalikeCustomAudience.java b/examples/AdAccountCustomAudiencesPostDynamicEventValueBasedLookalikeCustomAudience.java deleted file mode 100644 index 2e524528..00000000 --- a/examples/AdAccountCustomAudiencesPostDynamicEventValueBasedLookalikeCustomAudience.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountCustomAudiencesPostDynamicEventValueBasedLookalikeCustomAudience { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createCustomAudience() - .setName("Test Value-Based lookalike from Pixel") - .setSubtype(CustomAudience.EnumSubtype.VALUE_LOOKALIKE) - .setLookalikeSpec("{\"origin_event_sources\":[{\"id\":\"\",\"event_names\":[\"AddToCart\"]}],\"type\":\"custom_ratio\",\"ratio\":0.01,\"country\":\"US\"}") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostDynamicValueBasedLookalikeCustomAudience.java b/examples/AdAccountCustomAudiencesPostDynamicValueBasedLookalikeCustomAudience.java deleted file mode 100644 index 97e00bc8..00000000 --- a/examples/AdAccountCustomAudiencesPostDynamicValueBasedLookalikeCustomAudience.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountCustomAudiencesPostDynamicValueBasedLookalikeCustomAudience { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createCustomAudience() - .setName("Test Value-Based lookalike from Pixel") - .setSubtype(CustomAudience.EnumSubtype.VALUE_LOOKALIKE) - .setLookalikeSpec("{\"origin_event_sources\":[{\"id\":\"\"}],\"type\":\"custom_ratio\",\"ratio\":0.01,\"country\":\"US\"}") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostPlatformCustomAudienceMACARule.java b/examples/AdAccountCustomAudiencesPostPlatformCustomAudienceMACARule.java deleted file mode 100644 index 0180a4f0..00000000 --- a/examples/AdAccountCustomAudiencesPostPlatformCustomAudienceMACARule.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountCustomAudiencesPostPlatformCustomAudienceMACARule { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createCustomAudience() - .setName("My Test Website Custom Audience") - .setRule("{\"inclusions\":{\"operator\":\"or\",\"rules\":[{\"event_sources\":[{\"id\":\"\",\"type\":\"app\"}],\"retention_seconds\":8400,\"filter\":{\"operator\":\"and\",\"filters\":[{\"field\":\"event\",\"operator\":\"eq\",\"value\":\"fb_mobile_purchase\"}]}}]}}") - .setPrefill(true) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostPlatformECAExclusions.java b/examples/AdAccountCustomAudiencesPostPlatformECAExclusions.java deleted file mode 100644 index 85ffb30d..00000000 --- a/examples/AdAccountCustomAudiencesPostPlatformECAExclusions.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountCustomAudiencesPostPlatformECAExclusions { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createCustomAudience() - .setName("My Test Engagement Custom Audience") - .setRule("{\"inclusions\":{\"operator\":\"or\",\"rules\":[{\"event_sources\":[{\"id\":\"\",\"type\":\"page\"}],\"retention_seconds\":31536000,\"filter\":{\"operator\":\"and\",\"filters\":[{\"field\":\"event\",\"operator\":\"eq\",\"value\":\"page_engaged\"}]}}]},\"exclusions\":{\"operator\":\"or\",\"rules\":[{\"event_sources\":[{\"id\":\"\",\"type\":\"page\"}],\"retention_seconds\":31536000,\"filter\":{\"operator\":\"and\",\"filters\":[{\"field\":\"event\",\"operator\":\"eq\",\"value\":\"page_cta_clicked\"}]}}]}}") - .setPrefill(true) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostPlatformECAMultiFilters.java b/examples/AdAccountCustomAudiencesPostPlatformECAMultiFilters.java deleted file mode 100644 index 39c06b38..00000000 --- a/examples/AdAccountCustomAudiencesPostPlatformECAMultiFilters.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountCustomAudiencesPostPlatformECAMultiFilters { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createCustomAudience() - .setName("My Test Engagement Custom Audience") - .setRule("{\"inclusions\":{\"operator\":\"or\",\"rules\":[{\"event_sources\":[{\"id\":\"\",\"type\":\"page\"}],\"retention_seconds\":31536000,\"filter\":{\"operator\":\"and\",\"filters\":[{\"field\":\"event\",\"operator\":\"eq\",\"value\":\"page_engaged\"},{\"field\":\"event\",\"operator\":\"eq\",\"value\":\"page_engaged\"}]}}]}}") - .setPrefill(true) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostPlatformECAMultiPages.java b/examples/AdAccountCustomAudiencesPostPlatformECAMultiPages.java deleted file mode 100644 index 9e7a572f..00000000 --- a/examples/AdAccountCustomAudiencesPostPlatformECAMultiPages.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountCustomAudiencesPostPlatformECAMultiPages { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createCustomAudience() - .setName("My Test Engagement Custom Audience") - .setRule("{\"inclusions\":{\"operator\":\"or\",\"rules\":[{\"event_sources\":[{\"id\":\"\",\"type\":\"page\"},{\"id\":\"\",\"type\":\"page\"}],\"retention_seconds\":31536000,\"filter\":{\"operator\":\"and\",\"filters\":[{\"field\":\"event\",\"operator\":\"eq\",\"value\":\"page_engaged\"}]}}]}}") - .setPrefill(true) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostPlatformEngagementCustomAudience.java b/examples/AdAccountCustomAudiencesPostPlatformEngagementCustomAudience.java deleted file mode 100644 index aba646b0..00000000 --- a/examples/AdAccountCustomAudiencesPostPlatformEngagementCustomAudience.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountCustomAudiencesPostPlatformEngagementCustomAudience { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createCustomAudience() - .setName("My Test Engagement Custom Audience") - .setRule("{\"inclusions\":{\"operator\":\"or\",\"rules\":[{\"event_sources\":[{\"id\":\"\",\"type\":\"page\"}],\"retention_seconds\":31536000,\"filter\":{\"operator\":\"and\",\"filters\":[{\"field\":\"event\",\"operator\":\"eq\",\"value\":\"page_engaged\"}]}}]}}") - .setPrefill(true) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostPlatformWebsiteCustomAudience.java b/examples/AdAccountCustomAudiencesPostPlatformWebsiteCustomAudience.java deleted file mode 100644 index 5764ef59..00000000 --- a/examples/AdAccountCustomAudiencesPostPlatformWebsiteCustomAudience.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountCustomAudiencesPostPlatformWebsiteCustomAudience { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createCustomAudience() - .setName("My Test Website Custom Audience") - .setRule("{\"inclusions\":{\"operator\":\"or\",\"rules\":[{\"event_sources\":[{\"id\":\"\",\"type\":\"pixel\"}],\"retention_seconds\":8400,\"filter\":{\"operator\":\"and\",\"filters\":[{\"field\":\"url\",\"operator\":\"i_contains\",\"value\":\"shoes\"}]}}]}}") - .setPrefill(true) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostValueBasedCustomAudience.java b/examples/AdAccountCustomAudiencesPostValueBasedCustomAudience.java deleted file mode 100644 index a512de45..00000000 --- a/examples/AdAccountCustomAudiencesPostValueBasedCustomAudience.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountCustomAudiencesPostValueBasedCustomAudience { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createCustomAudience() - .setName("Value-Based Custom Audience") - .setSubtype(CustomAudience.EnumSubtype.VALUE_CUSTOM) - .setIsValueBased(true) - .setCustomerFileSource(CustomAudience.EnumCustomerFileSource.VALUE_PARTNER_PROVIDED_ONLY) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountCustomAudiencesPostValueBasedLookalikeCustomAudience.java b/examples/AdAccountCustomAudiencesPostValueBasedLookalikeCustomAudience.java deleted file mode 100644 index b0e7df11..00000000 --- a/examples/AdAccountCustomAudiencesPostValueBasedLookalikeCustomAudience.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountCustomAudiencesPostValueBasedLookalikeCustomAudience { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createCustomAudience() - .setName("Value-Based lookalike") - .setSubtype(CustomAudience.EnumSubtype.VALUE_LOOKALIKE) - .setOriginAudienceId("") - .setLookalikeSpec("{\"type\":\"custom_ratio\",\"ratio\":0.01,\"country\":\"US\"}") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountGeneratePreviewsEdge.java b/examples/AdAccountGeneratePreviewsEdge.java deleted file mode 100644 index 9918ff78..00000000 --- a/examples/AdAccountGeneratePreviewsEdge.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountGeneratePreviewsEdge { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).getGeneratePreviews() - .setCreative( - new AdCreative() - ) - .setAdFormat(AdPreview.EnumAdFormat.VALUE_) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountGeneratePreviewsEdgeDesktopWithStoryId.java b/examples/AdAccountGeneratePreviewsEdgeDesktopWithStoryId.java deleted file mode 100644 index e7e6cd07..00000000 --- a/examples/AdAccountGeneratePreviewsEdgeDesktopWithStoryId.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountGeneratePreviewsEdgeDesktopWithStoryId { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).getGeneratePreviews() - .setCreative( - new AdCreative() - .setFieldObjectStoryId("_") - ) - .setAdFormat(AdPreview.EnumAdFormat.VALUE_DESKTOP_FEED_STANDARD) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountGeneratePreviewsEdgeInstagramStandards.java b/examples/AdAccountGeneratePreviewsEdgeInstagramStandards.java deleted file mode 100644 index 6ef63aa6..00000000 --- a/examples/AdAccountGeneratePreviewsEdgeInstagramStandards.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountGeneratePreviewsEdgeInstagramStandards { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).getGeneratePreviews() - .setCreative( - new AdCreative() - .setFieldInstagramActorId("") - .setFieldObjectStorySpec( - new AdCreativeObjectStorySpec() - .setFieldLinkData( - new AdCreativeLinkData() - .setFieldCallToAction( - new AdCreativeLinkDataCallToAction() - .setFieldType(AdCreativeLinkDataCallToAction.EnumType.VALUE_LEARN_MORE) - .setFieldValue( - new AdCreativeLinkDataCallToActionValue() - .setFieldLink("") - ) - ) - .setFieldCaption("www.example.com") - .setFieldImageHash("") - .setFieldLink("") - .setFieldMessage("Message") - ) - .setFieldPageId("") - ) - ) - .setAdFormat(AdPreview.EnumAdFormat.VALUE_INSTAGRAM_STANDARD) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountGeneratePreviewsEdgeMaiaWithObjectStorySpec.java b/examples/AdAccountGeneratePreviewsEdgeMaiaWithObjectStorySpec.java deleted file mode 100644 index d41886db..00000000 --- a/examples/AdAccountGeneratePreviewsEdgeMaiaWithObjectStorySpec.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountGeneratePreviewsEdgeMaiaWithObjectStorySpec { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).getGeneratePreviews() - .setCreative( - new AdCreative() - .setFieldObjectStorySpec( - new AdCreativeObjectStorySpec() - .setFieldLinkData( - new AdCreativeLinkData() - .setFieldCallToAction( - new AdCreativeLinkDataCallToAction() - .setFieldType(AdCreativeLinkDataCallToAction.EnumType.VALUE_USE_APP) - .setFieldValue( - new AdCreativeLinkDataCallToActionValue() - .setFieldLink("") - ) - ) - .setFieldDescription("Description") - .setFieldLink("") - .setFieldMessage("Message") - .setFieldName("Name") - .setFieldPicture("") - ) - .setFieldPageId("") - ) - ) - .setAdFormat(AdPreview.EnumAdFormat.VALUE_MOBILE_FEED_STANDARD) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountNode.java b/examples/AdAccountNode.java deleted file mode 100644 index e5d5841d..00000000 --- a/examples/AdAccountNode.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountNode { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).get() - .requestNameField() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountProductAudiencesPostIphoneViewNoPurchase.java b/examples/AdAccountProductAudiencesPostIphoneViewNoPurchase.java deleted file mode 100644 index d1f1cbd0..00000000 --- a/examples/AdAccountProductAudiencesPostIphoneViewNoPurchase.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountProductAudiencesPostIphoneViewNoPurchase { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createProductAudience() - .setName("Test Iphone Product Audience") - .setProductSetId("") - .setInclusions("[{\"retention_seconds\":86400,\"rule\":{\"and\":[{\"event\":{\"eq\":\"AddToCart\"}},{\"userAgent\":{\"i_contains\":\"iPhone\"}}]}}]") - .setExclusions("[{\"retention_seconds\":172800,\"rule\":{\"event\":{\"eq\":\"Purchase\"}}}]") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountProductAudiencesPostNoPurchase.java b/examples/AdAccountProductAudiencesPostNoPurchase.java deleted file mode 100644 index e43241d0..00000000 --- a/examples/AdAccountProductAudiencesPostNoPurchase.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountProductAudiencesPostNoPurchase { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).createProductAudience() - .setName("Test Product Audience") - .setProductSetId("") - .setInclusions("[{\"retention_seconds\":86400,\"rule\":{\"event\":{\"eq\":\"AddToCart\"}}},{\"retention_seconds\":72000,\"rule\":{\"event\":{\"eq\":\"ViewContent\"}}}]") - .setExclusions("[{\"retention_seconds\":172800,\"rule\":{\"event\":{\"eq\":\"Purchase\"}}}]") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdAccountReachEstimate.java b/examples/AdAccountReachEstimate.java deleted file mode 100644 index b902ad6f..00000000 --- a/examples/AdAccountReachEstimate.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdAccountReachEstimate { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdAccount(id, context).getReachEstimate() - .setTargetingSpec( - new Targeting() - .setFieldAgeMax(40L) - .setFieldAgeMin(20L) - .setFieldGeoLocations( - new TargetingGeoLocation() - .setFieldCountries(Arrays.asList("US")) - ) - ) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdCampaignGroupAdsEdge.java b/examples/AdCampaignGroupAdsEdge.java deleted file mode 100644 index 7d29839d..00000000 --- a/examples/AdCampaignGroupAdsEdge.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdCampaignGroupAdsEdge { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Campaign(id, context).getAds() - .requestNameField() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdCampaignGroupAdsEdgeAdgroupsWithStatusArchived.java b/examples/AdCampaignGroupAdsEdgeAdgroupsWithStatusArchived.java deleted file mode 100644 index ad9fcdaf..00000000 --- a/examples/AdCampaignGroupAdsEdgeAdgroupsWithStatusArchived.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdCampaignGroupAdsEdgeAdgroupsWithStatusArchived { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Campaign(id, context).getAds() - .setEffectiveStatus("[\"ARCHIVED\"]") - .requestNameField() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdCampaignGroupAdsetsEdge.java b/examples/AdCampaignGroupAdsetsEdge.java deleted file mode 100644 index 4d40c97b..00000000 --- a/examples/AdCampaignGroupAdsetsEdge.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdCampaignGroupAdsetsEdge { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Campaign(id, context).getAdSets() - .requestNameField() - .requestStartTimeField() - .requestEndTimeField() - .requestDailyBudgetField() - .requestLifetimeBudgetField() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdCampaignNode.java b/examples/AdCampaignNode.java deleted file mode 100644 index 7d8414a2..00000000 --- a/examples/AdCampaignNode.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdCampaignNode { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdSet(id, context).get() - .requestAdsetScheduleField() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdCampaignPost.java b/examples/AdCampaignPost.java deleted file mode 100644 index e7ab68ac..00000000 --- a/examples/AdCampaignPost.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdCampaignPost { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdSet(id, context).update() - .setBidAdjustments("{\"user_groups\":{\"user_bucket\":{\"event_sources\":[\"\",\"\"],\"1\":0.1,\"2\":0.2,\"3\":0.3,\"default\":{\"gender\":{\"male\":0.99,\"female\":0.12}}}}}") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdCampaignPostAdsetUpdateCpa.java b/examples/AdCampaignPostAdsetUpdateCpa.java deleted file mode 100644 index c3f55c2f..00000000 --- a/examples/AdCampaignPostAdsetUpdateCpa.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdCampaignPostAdsetUpdateCpa { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdSet(id, context).update() - .setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS) - .setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_LINK_CLICKS) - .setBidAmount(200L) - .setTargeting( - new Targeting() - .setFieldFacebookPositions(Arrays.asList("feed")) - .setFieldGeoLocations( - new TargetingGeoLocation() - .setFieldCountries(Arrays.asList("US")) - ) - ) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdCreativeNode.java b/examples/AdCreativeNode.java deleted file mode 100644 index 690f4745..00000000 --- a/examples/AdCreativeNode.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdCreativeNode { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdCreative(id, context).get() - .requestAssetFeedSpecField() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdCreativeNodeRead.java b/examples/AdCreativeNodeRead.java deleted file mode 100644 index 5611bf08..00000000 --- a/examples/AdCreativeNodeRead.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdCreativeNodeRead { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdCreative(id, context).get() - .requestNameField() - .requestObjectStoryIdField() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdCreativeNodeReadInstagramPermalinkUrl.java b/examples/AdCreativeNodeReadInstagramPermalinkUrl.java deleted file mode 100644 index a78a99d3..00000000 --- a/examples/AdCreativeNodeReadInstagramPermalinkUrl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdCreativeNodeReadInstagramPermalinkUrl { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdCreative(id, context).get() - .requestInstagramPermalinkUrlField() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdCreativePreviewsEdge.java b/examples/AdCreativePreviewsEdge.java deleted file mode 100644 index 5153bbcc..00000000 --- a/examples/AdCreativePreviewsEdge.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdCreativePreviewsEdge { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdCreative(id, context).getPreviews() - .setAdFormat(AdPreview.EnumAdFormat.VALUE_DESKTOP_FEED_STANDARD) - .setProductItemIds("[\"\"]") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdCreativePreviewsEdgePreview.java b/examples/AdCreativePreviewsEdgePreview.java deleted file mode 100644 index a68f8657..00000000 --- a/examples/AdCreativePreviewsEdgePreview.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdCreativePreviewsEdgePreview { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdCreative(id, context).getPreviews() - .setAdFormat(AdPreview.EnumAdFormat.VALUE_DESKTOP_FEED_STANDARD) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdCreativePreviewsEdgePreviewDynamicAds.java b/examples/AdCreativePreviewsEdgePreviewDynamicAds.java deleted file mode 100644 index 58687b20..00000000 --- a/examples/AdCreativePreviewsEdgePreviewDynamicAds.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdCreativePreviewsEdgePreviewDynamicAds { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdCreative(id, context).getPreviews() - .setAdFormat(AdPreview.EnumAdFormat.VALUE_DESKTOP_FEED_STANDARD) - .setProductItemIds("[\"\"]") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdCreativePreviewsEdgePreviewDynamicAdsWithCustomizations.java b/examples/AdCreativePreviewsEdgePreviewDynamicAdsWithCustomizations.java deleted file mode 100644 index 4291fe38..00000000 --- a/examples/AdCreativePreviewsEdgePreviewDynamicAdsWithCustomizations.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdCreativePreviewsEdgePreviewDynamicAdsWithCustomizations { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdCreative(id, context).getPreviews() - .setAdFormat(AdPreview.EnumAdFormat.VALUE_DESKTOP_FEED_STANDARD) - .setProductItemIds("[\"\"]") - .setDynamicCustomization("{\"language\":\"fr_XX\",\"country\":\"FR\"}") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdgroupLeadsEdgeAdgroupLeads.java b/examples/AdgroupLeadsEdgeAdgroupLeads.java deleted file mode 100644 index d1a3a9e1..00000000 --- a/examples/AdgroupLeadsEdgeAdgroupLeads.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdgroupLeadsEdgeAdgroupLeads { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Ad(id, context).getLeads() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdgroupLeadsEdgeAdgroupLeadsDPA.java b/examples/AdgroupLeadsEdgeAdgroupLeadsDPA.java deleted file mode 100644 index 55c84eaa..00000000 --- a/examples/AdgroupLeadsEdgeAdgroupLeadsDPA.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdgroupLeadsEdgeAdgroupLeadsDPA { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Ad(id, context).getLeads() - .requestFieldDataField() - .requestRetailerItemIdField() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdgroupLeadsEdgeAdgroupLeadsFiltered.java b/examples/AdgroupLeadsEdgeAdgroupLeadsFiltered.java deleted file mode 100644 index 086e4ba5..00000000 --- a/examples/AdgroupLeadsEdgeAdgroupLeadsFiltered.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdgroupLeadsEdgeAdgroupLeadsFiltered { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Ad(id, context).getLeads() - .setParam("filtering", "[{\"field\":\"time_created\",\"operator\":\"GREATER_THAN\",\"value\":1717544918}]") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdgroupPost.java b/examples/AdgroupPost.java deleted file mode 100644 index 59a20fce..00000000 --- a/examples/AdgroupPost.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdgroupPost { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Ad(id, context).update() - .setName("My New Ad") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdgroupPostUpdateStatus.java b/examples/AdgroupPostUpdateStatus.java deleted file mode 100644 index 9dcbf7c5..00000000 --- a/examples/AdgroupPostUpdateStatus.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdgroupPostUpdateStatus { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Ad(id, context).update() - .setParam("adgroup_status", "PAUSED") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdsInsightsEdgeAdCampaignInsights.java b/examples/AdsInsightsEdgeAdCampaignInsights.java deleted file mode 100644 index 4e7ecf42..00000000 --- a/examples/AdsInsightsEdgeAdCampaignInsights.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdsInsightsEdgeAdCampaignInsights { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdSet(id, context).getInsights() - .setParam("breakdown", "publisher_platform") - .requestField("impressions") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdsPixelEventsPost.java b/examples/AdsPixelEventsPost.java deleted file mode 100644 index 3f1d9410..00000000 --- a/examples/AdsPixelEventsPost.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdsPixelEventsPost { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdsPixel(id, context).createEvent() - .setData("[{\"event_name\":\"PageView\",\"event_time\":1718149023,\"user_data\":{\"fbc\":\"fb.1.1554763741205.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890\",\"fbp\":\"fb.1.1558571054389.1098115397\",\"em\":\"309a0a5c3e211326ae75ca18196d301a9bdbd1a882a4d2569511033da23f0abd\"}}]") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdsPixelEventsPostCustom.java b/examples/AdsPixelEventsPostCustom.java deleted file mode 100644 index 8660c8d9..00000000 --- a/examples/AdsPixelEventsPostCustom.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.APIContext; -import com.facebook.ads.sdk.APIException; -import com.facebook.ads.sdk.serverside.ActionSource; -import com.facebook.ads.sdk.serverside.Content; -import com.facebook.ads.sdk.serverside.CustomData; -import com.facebook.ads.sdk.serverside.DeliveryCategory; -import com.facebook.ads.sdk.serverside.Event; -import com.facebook.ads.sdk.serverside.EventRequest; -import com.facebook.ads.sdk.serverside.EventResponse; -import com.facebook.ads.sdk.serverside.UserData; - -import java.util.Arrays; - -public class ServerSideApiExample { - - public static final String ACCESS_TOKEN = ""; - public static final String PIXEL_ID = ""; - - public static void main(String[] args) { - APIContext context = new APIContext(ACCESS_TOKEN).enableDebug(true); - context.setLogger(System.out); - - UserData userData = new UserData() - .emails(Arrays.asList("joe@eg.com")) - .phones(Arrays.asList("12345678901", "14251234567")) - // It is recommended to send Client IP and User Agent for Conversions API Events. - .clientIpAddress(clientIpAddress) - .clientUserAgent(clientUserAgent) - .fbc("fb.1.1554763741205.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890") - .fbp("fb.1.1558571054389.1098115397"); - - Content content = new Content() - .productId("product123") - .quantity(1L) - .deliveryCategory(DeliveryCategory.home_delivery); - - CustomData customData = new CustomData() - .addContent(content) - .currency("usd") - .value(123.45F); - - Event purchaseEvent = new Event(); - purchaseEvent.eventName("Purchase") - .eventTime(System.currentTimeMillis() / 1000L) - .userData(userData) - .customData(customData) - .eventSourceUrl("http://jaspers-market.com/product/123") - .actionSource(ActionSource.website); - - EventRequest eventRequest = new EventRequest(PIXEL_ID, context); - eventRequest.addDataItem(purchaseEvent); - - try { - EventResponse response = eventRequest.execute(); - System.out.println(String.format("Standard API response : %s ", response)); - } catch (APIException e) { - e.printStackTrace(); - } - } -} \ No newline at end of file diff --git a/examples/AdsPixelSharedAccountsEdge.java b/examples/AdsPixelSharedAccountsEdge.java deleted file mode 100644 index 3b0af783..00000000 --- a/examples/AdsPixelSharedAccountsEdge.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdsPixelSharedAccountsEdge { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdsPixel(id, context).getSharedAccounts() - .setBusiness("") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdsPixelSharedAccountsPost.java b/examples/AdsPixelSharedAccountsPost.java deleted file mode 100644 index a87dd76b..00000000 --- a/examples/AdsPixelSharedAccountsPost.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdsPixelSharedAccountsPost { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdsPixel(id, context).createSharedAccount() - .setAccountId("") - .setBusiness("") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/AdsPixelSharedAgenciesEdge.java b/examples/AdsPixelSharedAgenciesEdge.java deleted file mode 100644 index e6daf70b..00000000 --- a/examples/AdsPixelSharedAgenciesEdge.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class AdsPixelSharedAgenciesEdge { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdsPixel(id, context).getSharedAgencies() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/CustomAudienceDelete.java b/examples/CustomAudienceDelete.java deleted file mode 100644 index 569edffe..00000000 --- a/examples/CustomAudienceDelete.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class CustomAudienceDelete { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new CustomAudience(id, context).delete() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/CustomAudienceNode.java b/examples/CustomAudienceNode.java deleted file mode 100644 index f6a7f217..00000000 --- a/examples/CustomAudienceNode.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class CustomAudienceNode { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new CustomAudience(id, context).get() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/CustomAudienceNodeReadRule.java b/examples/CustomAudienceNodeReadRule.java deleted file mode 100644 index 31addd17..00000000 --- a/examples/CustomAudienceNodeReadRule.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class CustomAudienceNodeReadRule { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new CustomAudience(id, context).get() - .requestNameField() - .requestRuleField() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/CustomAudiencePost.java b/examples/CustomAudiencePost.java deleted file mode 100644 index 294683db..00000000 --- a/examples/CustomAudiencePost.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class CustomAudiencePost { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new CustomAudience(id, context).update() - .setName("Updated Name for CA") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/CustomAudienceUsersPost.java b/examples/CustomAudienceUsersPost.java deleted file mode 100644 index a52ac7f4..00000000 --- a/examples/CustomAudienceUsersPost.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class CustomAudienceUsersPost { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new CustomAudience(id, context).createUser() - .setPayload("{\"schema\":[\"EMAIL\",\"LOOKALIKE_VALUE\"],\"data\":[[\"9b431636bd164765d63c573c346708846af4f68fe3701a77a3bdd7e7e5166254\",44.5],[\"8cc62c145cd0c6dc444168eaeb1b61b351f9b1809a579cc9b4c9e9d7213a39ee\",140],[\"4eaf70b1f7a797962b9d2a533f122c8039012b31e0a52b34a426729319cb792a\",0],[\"98df8d46f118f8bef552b0ec0a3d729466a912577830212a844b73960777ac56\",0.9]]}") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/CustomAudienceUsersPostCrossPlatform.java b/examples/CustomAudienceUsersPostCrossPlatform.java deleted file mode 100644 index 6d607888..00000000 --- a/examples/CustomAudienceUsersPostCrossPlatform.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class CustomAudienceUsersPostCrossPlatform { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new CustomAudience(id, context).createUser() - .setPayload("{\"schema\":[\"EMAIL\",\"MADID\",\"APPUID\",\"LOOKALIKE_VALUE\"],\"app_ids\":[\"\"],\"data\":[[\"b36a83701f1c3191e19722d6f90274bc1b5501fe69ebf33313e440fe4b0fe210\",\"6032d997-3ab0-4de0-aa16-8af0e5b482fb\",\"1234567890\",\"0.9\"],[\"2b3b2b9ce842ab8b6a6c614cb1f9604bb8a0d502d1af49c526b72b10894e95b5\",\"B67385F8-9A82-4670-8C0A-6F9EA7513F5F\",\"\",\"0\"],[\"898628e28890f937bdf009391def42879c401a4bcf1b5fd24e738d9f5da8cbbb\",\"\",\"9876543210\",\"0.4\"]]}") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/OfflineConversionsCreateOfflineSet.java b/examples/OfflineConversionsCreateOfflineSet.java deleted file mode 100644 index f8fef9b2..00000000 --- a/examples/OfflineConversionsCreateOfflineSet.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class OfflineConversionsCreateOfflineSet { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Business(id, context).createOfflineConversionDataSet() - .setName("offline_event_set") - .setDescription("conversion data used for superbowl campaign") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/PageFeedEdge.java b/examples/PageFeedEdge.java deleted file mode 100644 index 75a29225..00000000 --- a/examples/PageFeedEdge.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class PageFeedEdge { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Page(id, context).getFeed() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/PageFeedPost.java b/examples/PageFeedPost.java deleted file mode 100644 index 6545c632..00000000 --- a/examples/PageFeedPost.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class PageFeedPost { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Page(id, context).createFeed() - .setMessage("This is a test value") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/PageFeedPostFeedImageDeepLink.java b/examples/PageFeedPostFeedImageDeepLink.java deleted file mode 100644 index 419666f1..00000000 --- a/examples/PageFeedPostFeedImageDeepLink.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class PageFeedPostFeedImageDeepLink { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Page(id, context).createFeed() - .setMessage("This is a test message") - .setCallToAction("{\"type\":\"BUY_NOW\",\"value\":{\"link\":\"\",\"app_link\":\"\"}}") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/PageNode.java b/examples/PageNode.java deleted file mode 100644 index d0d14af5..00000000 --- a/examples/PageNode.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class PageNode { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Page(id, context).getLocations() - .setParam("limit", "30000") - .requestField("location{latitude") - .requestField("longitude}") - .requestIsPermanentlyClosedField() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/PageNodePageSearch.java b/examples/PageNodePageSearch.java deleted file mode 100644 index 750d90e7..00000000 --- a/examples/PageNodePageSearch.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class PageNodePageSearch { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Page(id, context).get() - .setParam("type", "adradiussuggestion") - .setParam("latitude", "51.5152253") - .setParam("longitude", "-0.1423029") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/PagePageWhatsAppNumberVerificationPost.java b/examples/PagePageWhatsAppNumberVerificationPost.java deleted file mode 100644 index ec94451b..00000000 --- a/examples/PagePageWhatsAppNumberVerificationPost.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class PagePageWhatsAppNumberVerificationPost { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Page(id, context).createPageWhatsappNumberVerification() - .setWhatsappNumber("123456789") - .setVerificationCode("12345") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/PagePhotosEdge.java b/examples/PagePhotosEdge.java deleted file mode 100644 index eebc3dbb..00000000 --- a/examples/PagePhotosEdge.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class PagePhotosEdge { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Page(id, context).getPhotos() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/PagePhotosPost.java b/examples/PagePhotosPost.java deleted file mode 100644 index 5b4e9003..00000000 --- a/examples/PagePhotosPost.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class PagePhotosPost { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Page(id, context).createPhoto() - .setUrl("https://www.facebook.com/images/fb_icon_325x325.png") - .setPublished(true) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/PagePictureEdge.java b/examples/PagePictureEdge.java deleted file mode 100644 index 1243da73..00000000 --- a/examples/PagePictureEdge.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class PagePictureEdge { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Page(id, context).getPicture() - .setRedirect(true) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/PagePostCommentsPost.java b/examples/PagePostCommentsPost.java deleted file mode 100644 index cad0c867..00000000 --- a/examples/PagePostCommentsPost.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class PagePostCommentsPost { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new PagePost(id, context).createComment() - .setMessage("This is a test value") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/PagePostDelete.java b/examples/PagePostDelete.java deleted file mode 100644 index 43435da1..00000000 --- a/examples/PagePostDelete.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class PagePostDelete { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new PagePost(id, context).delete() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/PagePostNode.java b/examples/PagePostNode.java deleted file mode 100644 index c6806154..00000000 --- a/examples/PagePostNode.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class PagePostNode { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new PagePost(id, context).get() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/PagePostPost.java b/examples/PagePostPost.java deleted file mode 100644 index 0c341f41..00000000 --- a/examples/PagePostPost.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class PagePostPost { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new PagePost(id, context).update() - .setMessage("This is a test value") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/PagePostsEdge.java b/examples/PagePostsEdge.java deleted file mode 100644 index 58d010ac..00000000 --- a/examples/PagePostsEdge.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class PagePostsEdge { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Page(id, context).getPosts() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/PagePostsEdgePagePostCreateCarousel.java b/examples/PagePostsEdgePagePostCreateCarousel.java deleted file mode 100644 index 78b55245..00000000 --- a/examples/PagePostsEdgePagePostCreateCarousel.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class PagePostsEdgePagePostCreateCarousel { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Page(id, context).getPosts() - .setParam("message", "Browse our latest products") - .setParam("published", "0") - .setParam("child_attachments", "[{\"link\":\"\",\"name\":\"Product 1\",\"description\":\"$4.99\",\"image_hash\":\"\"},{\"link\":\"\",\"name\":\"Product 2\",\"description\":\"$4.99\",\"image_hash\":\"\"},{\"link\":\"\",\"name\":\"Product 3\",\"description\":\"$4.99\",\"image_hash\":\"\"},{\"link\":\"\",\"name\":\"Product 4\",\"description\":\"$4.99\",\"image_hash\":\"\"}]") - .setParam("caption", "WWW.EXAMPLE.COM") - .setParam("link", "http://www.example.com/products") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/PageRolesEdge.java b/examples/PageRolesEdge.java deleted file mode 100644 index e73c3a30..00000000 --- a/examples/PageRolesEdge.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class PageRolesEdge { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Page(id, context).getRoles() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/PageSubscribedAppsPost.java b/examples/PageSubscribedAppsPost.java deleted file mode 100644 index f2e9418c..00000000 --- a/examples/PageSubscribedAppsPost.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class PageSubscribedAppsPost { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Page(id, context).createSubscribedApp() - .setSubscribedFields(Arrays.asList(Page.EnumSubscribedFields.VALUE_LEADGEN)) - .execute(); - - } -} \ No newline at end of file diff --git a/examples/ProductCatalogEventStatsEdge.java b/examples/ProductCatalogEventStatsEdge.java deleted file mode 100644 index c32d722d..00000000 --- a/examples/ProductCatalogEventStatsEdge.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class ProductCatalogEventStatsEdge { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new ProductCatalog(id, context).getEventStats() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/ProductCatalogHotelsPost.java b/examples/ProductCatalogHotelsPost.java deleted file mode 100644 index 7cf01fc6..00000000 --- a/examples/ProductCatalogHotelsPost.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class ProductCatalogHotelsPost { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new ProductCatalog(id, context).createHotel() - .setHotelId("h_1") - .setName("Sample Hotel") - .setDescription("hotel description") - .setBrand("hotel brand") - .setUrl("http://www.example.com/samplehotel") - .setImages("[{\"image_url\":\"https://www.example.com/pic1.jpg\",\"tags\":[\"front view\",\"balcony\"]},{\"image_url\":\"http://www.example.com/pic2.jpg\",\"tags\":[\"lobby view\"]}]") - .setAddress("{\"street_address\":\"1 Hacker Way\",\"city\":\"Menlo Park\",\"region\":\"California\",\"country\":\"United States\",\"postal_code\":\"94025\",\"neighborhoods\":[\"Palo Alto\",\"Menlo Park\"],\"latitude\":37.484116,\"longitude\":-122.148244}") - .setGuestRatings("[{\"score\":7.8,\"max_score\":10,\"rating_system\":\"sample_rating\",\"number_of_raters\":780}]") - .setStarRating((double) 4) - .setPhone("+351234123456") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/ProductCatalogHotelsPostUpdateHotelsCatalogSettings.java b/examples/ProductCatalogHotelsPostUpdateHotelsCatalogSettings.java deleted file mode 100644 index 2039df16..00000000 --- a/examples/ProductCatalogHotelsPostUpdateHotelsCatalogSettings.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class ProductCatalogHotelsPostUpdateHotelsCatalogSettings { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new ProductCatalog(id, context).update() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/ProductCatalogProductFeedsPostProductFeed.java b/examples/ProductCatalogProductFeedsPostProductFeed.java deleted file mode 100644 index b1ed9061..00000000 --- a/examples/ProductCatalogProductFeedsPostProductFeed.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class ProductCatalogProductFeedsPostProductFeed { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new ProductCatalog(id, context).createProductFeed() - .setName("Test Feed") - .setSchedule("{\"interval\":\"DAILY\",\"url\":\"http://www.example.com/sample_feed.tsv\",\"hour\":\"22\"}") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/ProductCatalogProductSetsPostHotelSet.java b/examples/ProductCatalogProductSetsPostHotelSet.java deleted file mode 100644 index c313338d..00000000 --- a/examples/ProductCatalogProductSetsPostHotelSet.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class ProductCatalogProductSetsPostHotelSet { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new ProductCatalog(id, context).createProductSet() - .setName("Test Hotel Set") - .setFilter("{\"brand\":{\"i_contains\":\"sample brand\"}}") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/ProductCatalogProductSetsPostProductSet.java b/examples/ProductCatalogProductSetsPostProductSet.java deleted file mode 100644 index 03b7b797..00000000 --- a/examples/ProductCatalogProductSetsPostProductSet.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class ProductCatalogProductSetsPostProductSet { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new ProductCatalog(id, context).createProductSet() - .setName("Test Set") - .setFilter("{\"product_type\":{\"i_contains\":\"shirt\"}}") - .execute(); - - } -} \ No newline at end of file diff --git a/examples/UserAccountsEdge.java b/examples/UserAccountsEdge.java deleted file mode 100644 index 49085d7c..00000000 --- a/examples/UserAccountsEdge.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class UserAccountsEdge { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new User(id, context).getAccounts() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/UserAdAccountsEdge.java b/examples/UserAdAccountsEdge.java deleted file mode 100644 index 3314e61d..00000000 --- a/examples/UserAdAccountsEdge.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class UserAdAccountsEdge { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new User(id, context).getAdAccounts() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/UserLeadGenInfoNode.java b/examples/UserLeadGenInfoNode.java deleted file mode 100644 index 5f1e47e7..00000000 --- a/examples/UserLeadGenInfoNode.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class UserLeadGenInfoNode { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new Lead(id, context).get() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/UserNode.java b/examples/UserNode.java deleted file mode 100644 index 654ab41a..00000000 --- a/examples/UserNode.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class UserNode { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new User(id, context).get() - .execute(); - - } -} \ No newline at end of file diff --git a/examples/VideoThumbnailsEdge.java b/examples/VideoThumbnailsEdge.java deleted file mode 100644 index 4647949f..00000000 --- a/examples/VideoThumbnailsEdge.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * All rights reserved. - * - * You are hereby granted a non-exclusive, worldwide, royalty-free license to - * use, copy, modify, and distribute this software in source code or binary - * form for use in connection with the web services and APIs provided by - * Facebook. - * - * As with any software that integrates with the Facebook platform, your use - * of this software is subject to the Facebook Developer Principles and - * Policies [http://developers.facebook.com/policy/]. This copyright notice - * shall be included in all copies or substantial portions of the software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - */ - - import com.facebook.ads.sdk.*; -import java.io.File; -import java.util.Arrays; - -public class VideoThumbnailsEdge { - public static void main (String args[]) throws APIException { - - String access_token = ""; - String app_secret = ""; - String app_id = ""; - String id = ""; - APIContext context = new APIContext(access_token).enableDebug(true); - - new AdVideo(id, context).getThumbnails() - .execute(); - - } -} \ No newline at end of file diff --git a/pom.xml b/pom.xml index a8f0b310..db1e6542 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.facebook.business.sdk facebook-java-business-sdk jar - 20.0.4 + 21.0.0 ${project.groupId}:${project.artifactId} Facebook Business Solutions SDK for Java https://developers.facebook.com/docs/marketing-api/sdks diff --git a/src/main/java/com/facebook/ads/sdk/ALMAdAccountInfo.java b/src/main/java/com/facebook/ads/sdk/ALMAdAccountInfo.java index 1d9a7f24..eb80c24e 100644 --- a/src/main/java/com/facebook/ads/sdk/ALMAdAccountInfo.java +++ b/src/main/java/com/facebook/ads/sdk/ALMAdAccountInfo.java @@ -47,6 +47,8 @@ public class ALMAdAccountInfo extends APINode { private String mId = null; @SerializedName("managed_by") private String mManagedBy = null; + @SerializedName("owned_by") + private String mOwnedBy = null; @SerializedName("parent_advertiser_id") private String mParentAdvertiserId = null; @SerializedName("sub_vertical") @@ -283,6 +285,10 @@ public String getFieldManagedBy() { return mManagedBy; } + public String getFieldOwnedBy() { + return mOwnedBy; + } + public String getFieldParentAdvertiserId() { return mParentAdvertiserId; } @@ -319,6 +325,7 @@ public ALMAdAccountInfo getLastResponse() { "ad_account_id", "id", "managed_by", + "owned_by", "parent_advertiser_id", "sub_vertical", "tag", @@ -437,6 +444,13 @@ public APIRequestGet requestManagedByField (boolean value) { this.requestField("managed_by", value); return this; } + public APIRequestGet requestOwnedByField () { + return this.requestOwnedByField(true); + } + public APIRequestGet requestOwnedByField (boolean value) { + this.requestField("owned_by", value); + return this; + } public APIRequestGet requestParentAdvertiserIdField () { return this.requestParentAdvertiserIdField(true); } @@ -492,6 +506,7 @@ public ALMAdAccountInfo copyFrom(ALMAdAccountInfo instance) { this.mAdAccountId = instance.mAdAccountId; this.mId = instance.mId; this.mManagedBy = instance.mManagedBy; + this.mOwnedBy = instance.mOwnedBy; this.mParentAdvertiserId = instance.mParentAdvertiserId; this.mSubVertical = instance.mSubVertical; this.mTag = instance.mTag; diff --git a/src/main/java/com/facebook/ads/sdk/APIConfig.java b/src/main/java/com/facebook/ads/sdk/APIConfig.java index 42ed96b6..d20adebc 100644 --- a/src/main/java/com/facebook/ads/sdk/APIConfig.java +++ b/src/main/java/com/facebook/ads/sdk/APIConfig.java @@ -24,8 +24,8 @@ package com.facebook.ads.sdk; public class APIConfig { - public static final String DEFAULT_API_VERSION = "v20.0"; + public static final String DEFAULT_API_VERSION = "v21.0"; public static final String DEFAULT_API_BASE = "https://graph.facebook.com"; public static final String DEFAULT_VIDEO_API_BASE = "https://graph-video.facebook.com"; - public static final String USER_AGENT = "fbbizsdk-java-v20.0.4"; + public static final String USER_AGENT = "fbbizsdk-java-v21.0.0"; }; diff --git a/src/main/java/com/facebook/ads/sdk/Ad.java b/src/main/java/com/facebook/ads/sdk/Ad.java index 2cf82fd8..e453a7b7 100644 --- a/src/main/java/com/facebook/ads/sdk/Ad.java +++ b/src/main/java/com/facebook/ads/sdk/Ad.java @@ -97,6 +97,8 @@ public class Ad extends APINode { private String mLastUpdatedByAppId = null; @SerializedName("name") private String mName = null; + @SerializedName("placement") + private Placement mPlacement = null; @SerializedName("preview_shareable_link") private String mPreviewShareableLink = null; @SerializedName("priority") @@ -500,6 +502,10 @@ public String getFieldName() { return mName; } + public Placement getFieldPlacement() { + return mPlacement; + } + public String getFieldPreviewShareableLink() { return mPreviewShareableLink; } @@ -597,6 +603,7 @@ public APINodeList getLastResponse() { "link_destination_display_url", "link_og_id", "link_url", + "messenger_sponsored_message", "name", "object_id", "object_store_url", @@ -1002,6 +1009,13 @@ public APIRequestGetAdCreatives requestLinkUrlField (boolean value) { this.requestField("link_url", value); return this; } + public APIRequestGetAdCreatives requestMessengerSponsoredMessageField () { + return this.requestMessengerSponsoredMessageField(true); + } + public APIRequestGetAdCreatives requestMessengerSponsoredMessageField (boolean value) { + this.requestField("messenger_sponsored_message", value); + return this; + } public APIRequestGetAdCreatives requestNameField () { return this.requestNameField(true); } @@ -1326,6 +1340,7 @@ public APINodeList getLastResponse() { "account_id", "created_by", "created_time", + "disable_error_code", "evaluation_spec", "execution_spec", "id", @@ -1455,6 +1470,13 @@ public APIRequestGetAdRulesGoverned requestCreatedTimeField (boolean value) { this.requestField("created_time", value); return this; } + public APIRequestGetAdRulesGoverned requestDisableErrorCodeField () { + return this.requestDisableErrorCodeField(true); + } + public APIRequestGetAdRulesGoverned requestDisableErrorCodeField (boolean value) { + this.requestField("disable_error_code", value); + return this; + } public APIRequestGetAdRulesGoverned requestEvaluationSpecField () { return this.requestEvaluationSpecField(true); } @@ -1549,6 +1571,7 @@ public APINodeList getLastResponse() { "issues_info", "last_updated_by_app_id", "name", + "placement", "preview_shareable_link", "priority", "recommendations", @@ -1883,6 +1906,13 @@ public APIRequestGetCopies requestNameField (boolean value) { this.requestField("name", value); return this; } + public APIRequestGetCopies requestPlacementField () { + return this.requestPlacementField(true); + } + public APIRequestGetCopies requestPlacementField (boolean value) { + this.requestField("placement", value); + return this; + } public APIRequestGetCopies requestPreviewShareableLinkField () { return this.requestPreviewShareableLinkField(true); } @@ -3472,6 +3502,7 @@ public Ad getLastResponse() { "issues_info", "last_updated_by_app_id", "name", + "placement", "preview_shareable_link", "priority", "recommendations", @@ -3815,6 +3846,13 @@ public APIRequestGet requestNameField (boolean value) { this.requestField("name", value); return this; } + public APIRequestGet requestPlacementField () { + return this.requestPlacementField(true); + } + public APIRequestGet requestPlacementField (boolean value) { + this.requestField("placement", value); + return this; + } public APIRequestGet requestPreviewShareableLinkField () { return this.requestPreviewShareableLinkField(true); } @@ -4417,6 +4455,7 @@ public Ad copyFrom(Ad instance) { this.mIssuesInfo = instance.mIssuesInfo; this.mLastUpdatedByAppId = instance.mLastUpdatedByAppId; this.mName = instance.mName; + this.mPlacement = instance.mPlacement; this.mPreviewShareableLink = instance.mPreviewShareableLink; this.mPriority = instance.mPriority; this.mRecommendations = instance.mRecommendations; diff --git a/src/main/java/com/facebook/ads/sdk/AdAccount.java b/src/main/java/com/facebook/ads/sdk/AdAccount.java index 076a98c5..3628bdf6 100644 --- a/src/main/java/com/facebook/ads/sdk/AdAccount.java +++ b/src/main/java/com/facebook/ads/sdk/AdAccount.java @@ -820,14 +820,18 @@ public APIRequestDeleteUsersOfAnyAudience deleteUsersOfAnyAudience() { return new APIRequestDeleteUsersOfAnyAudience(this.getPrefixedId().toString(), context); } - public APIRequestGetValueAdjustmentRuleCollections getValueAdjustmentRuleCollections() { - return new APIRequestGetValueAdjustmentRuleCollections(this.getPrefixedId().toString(), context); - } - public APIRequestGetValueAdjustmentRules getValueAdjustmentRules() { return new APIRequestGetValueAdjustmentRules(this.getPrefixedId().toString(), context); } + public APIRequestGetValueRuleSet getValueRuleSet() { + return new APIRequestGetValueRuleSet(this.getPrefixedId().toString(), context); + } + + public APIRequestGetVideoAds getVideoAds() { + return new APIRequestGetVideoAds(this.getPrefixedId().toString(), context); + } + public APIRequestGet get() { return new APIRequestGet(this.getPrefixedId().toString(), context); } @@ -2717,6 +2721,7 @@ public APINodeList getLastResponse() { "link_destination_display_url", "link_og_id", "link_url", + "messenger_sponsored_message", "name", "object_id", "object_store_url", @@ -3122,6 +3127,13 @@ public APIRequestGetAdCreatives requestLinkUrlField (boolean value) { this.requestField("link_url", value); return this; } + public APIRequestGetAdCreatives requestMessengerSponsoredMessageField () { + return this.requestMessengerSponsoredMessageField(true); + } + public APIRequestGetAdCreatives requestMessengerSponsoredMessageField (boolean value) { + this.requestField("messenger_sponsored_message", value); + return this; + } public APIRequestGetAdCreatives requestNameField () { return this.requestNameField(true); } @@ -3871,6 +3883,7 @@ public APINodeList getLastResponse() { "link_destination_display_url", "link_og_id", "link_url", + "messenger_sponsored_message", "name", "object_id", "object_store_url", @@ -4294,6 +4307,13 @@ public APIRequestGetAdCreativesByLabels requestLinkUrlField (boolean value) { this.requestField("link_url", value); return this; } + public APIRequestGetAdCreativesByLabels requestMessengerSponsoredMessageField () { + return this.requestMessengerSponsoredMessageField(true); + } + public APIRequestGetAdCreativesByLabels requestMessengerSponsoredMessageField (boolean value) { + this.requestField("messenger_sponsored_message", value); + return this; + } public APIRequestGetAdCreativesByLabels requestNameField () { return this.requestNameField(true); } @@ -5778,6 +5798,7 @@ public APINodeList getLastResponse() { "account_id", "created_by", "created_time", + "disable_error_code", "evaluation_spec", "execution_spec", "id", @@ -5898,6 +5919,13 @@ public APIRequestGetAdRulesLibrary requestCreatedTimeField (boolean value) { this.requestField("created_time", value); return this; } + public APIRequestGetAdRulesLibrary requestDisableErrorCodeField () { + return this.requestDisableErrorCodeField(true); + } + public APIRequestGetAdRulesLibrary requestDisableErrorCodeField (boolean value) { + this.requestField("disable_error_code", value); + return this; + } public APIRequestGetAdRulesLibrary requestEvaluationSpecField () { return this.requestEvaluationSpecField(true); } @@ -6159,6 +6187,7 @@ public APINodeList getLastResponse() { "issues_info", "last_updated_by_app_id", "name", + "placement", "preview_shareable_link", "priority", "recommendations", @@ -6493,6 +6522,13 @@ public APIRequestGetAds requestNameField (boolean value) { this.requestField("name", value); return this; } + public APIRequestGetAds requestPlacementField () { + return this.requestPlacementField(true); + } + public APIRequestGetAds requestPlacementField (boolean value) { + this.requestField("placement", value); + return this; + } public APIRequestGetAds requestPreviewShareableLinkField () { return this.requestPreviewShareableLinkField(true); } @@ -7450,6 +7486,7 @@ public APINodeList getLastResponse() { "issues_info", "last_updated_by_app_id", "name", + "placement", "preview_shareable_link", "priority", "recommendations", @@ -7766,6 +7803,13 @@ public APIRequestGetAdsByLabels requestNameField (boolean value) { this.requestField("name", value); return this; } + public APIRequestGetAdsByLabels requestPlacementField () { + return this.requestPlacementField(true); + } + public APIRequestGetAdsByLabels requestPlacementField (boolean value) { + this.requestField("placement", value); + return this; + } public APIRequestGetAdsByLabels requestPreviewShareableLinkField () { return this.requestPreviewShareableLinkField(true); } @@ -7895,6 +7939,8 @@ public APINodeList getLastResponse() { "lifetime_imps", "lifetime_min_spend_target", "lifetime_spend_cap", + "max_budget_spend_percentage", + "min_budget_spend_percentage", "multi_optimization_goal_weight", "name", "optimization_goal", @@ -8341,6 +8387,20 @@ public APIRequestGetAdSets requestLifetimeSpendCapField (boolean value) { this.requestField("lifetime_spend_cap", value); return this; } + public APIRequestGetAdSets requestMaxBudgetSpendPercentageField () { + return this.requestMaxBudgetSpendPercentageField(true); + } + public APIRequestGetAdSets requestMaxBudgetSpendPercentageField (boolean value) { + this.requestField("max_budget_spend_percentage", value); + return this; + } + public APIRequestGetAdSets requestMinBudgetSpendPercentageField () { + return this.requestMinBudgetSpendPercentageField(true); + } + public APIRequestGetAdSets requestMinBudgetSpendPercentageField (boolean value) { + this.requestField("min_budget_spend_percentage", value); + return this; + } public APIRequestGetAdSets requestMultiOptimizationGoalWeightField () { return this.requestMultiOptimizationGoalWeightField(true); } @@ -8536,6 +8596,8 @@ public AdSet getLastResponse() { "lifetime_min_spend_target", "lifetime_spend_cap", "line_number", + "max_budget_spend_percentage", + "min_budget_spend_percentage", "multi_optimization_goal_weight", "name", "optimization_goal", @@ -8874,6 +8936,24 @@ public APIRequestCreateAdSet setLineNumber (String lineNumber) { return this; } + public APIRequestCreateAdSet setMaxBudgetSpendPercentage (Long maxBudgetSpendPercentage) { + this.setParam("max_budget_spend_percentage", maxBudgetSpendPercentage); + return this; + } + public APIRequestCreateAdSet setMaxBudgetSpendPercentage (String maxBudgetSpendPercentage) { + this.setParam("max_budget_spend_percentage", maxBudgetSpendPercentage); + return this; + } + + public APIRequestCreateAdSet setMinBudgetSpendPercentage (Long minBudgetSpendPercentage) { + this.setParam("min_budget_spend_percentage", minBudgetSpendPercentage); + return this; + } + public APIRequestCreateAdSet setMinBudgetSpendPercentage (String minBudgetSpendPercentage) { + this.setParam("min_budget_spend_percentage", minBudgetSpendPercentage); + return this; + } + public APIRequestCreateAdSet setMultiOptimizationGoalWeight (AdSet.EnumMultiOptimizationGoalWeight multiOptimizationGoalWeight) { this.setParam("multi_optimization_goal_weight", multiOptimizationGoalWeight); return this; @@ -9114,6 +9194,8 @@ public APINodeList getLastResponse() { "lifetime_imps", "lifetime_min_spend_target", "lifetime_spend_cap", + "max_budget_spend_percentage", + "min_budget_spend_percentage", "multi_optimization_goal_weight", "name", "optimization_goal", @@ -9533,6 +9615,20 @@ public APIRequestGetAdSetsByLabels requestLifetimeSpendCapField (boolean value) this.requestField("lifetime_spend_cap", value); return this; } + public APIRequestGetAdSetsByLabels requestMaxBudgetSpendPercentageField () { + return this.requestMaxBudgetSpendPercentageField(true); + } + public APIRequestGetAdSetsByLabels requestMaxBudgetSpendPercentageField (boolean value) { + this.requestField("max_budget_spend_percentage", value); + return this; + } + public APIRequestGetAdSetsByLabels requestMinBudgetSpendPercentageField () { + return this.requestMinBudgetSpendPercentageField(true); + } + public APIRequestGetAdSetsByLabels requestMinBudgetSpendPercentageField (boolean value) { + this.requestField("min_budget_spend_percentage", value); + return this; + } public APIRequestGetAdSetsByLabels requestMultiOptimizationGoalWeightField () { return this.requestMultiOptimizationGoalWeightField(true); } @@ -11850,7 +11946,6 @@ public AdVideo getLastResponse() { "fun_fact_toastee_id", "guide", "guide_enabled", - "holiday_card", "initial_heading", "initial_pitch", "instant_game_entry_point_data", @@ -11859,7 +11954,6 @@ public AdVideo getLastResponse() { "is_voice_clip", "location_source_id", "name", - "offer_like_post_id", "og_action_type_id", "og_icon_id", "og_object_id", @@ -12124,10 +12218,6 @@ public APIRequestCreateAdVideo setFrontZRotation (String frontZRotation) { return this; } - public APIRequestCreateAdVideo setFunFactPromptId (Long funFactPromptId) { - this.setParam("fun_fact_prompt_id", funFactPromptId); - return this; - } public APIRequestCreateAdVideo setFunFactPromptId (String funFactPromptId) { this.setParam("fun_fact_prompt_id", funFactPromptId); return this; @@ -12160,11 +12250,6 @@ public APIRequestCreateAdVideo setGuideEnabled (String guideEnabled) { return this; } - public APIRequestCreateAdVideo setHolidayCard (String holidayCard) { - this.setParam("holiday_card", holidayCard); - return this; - } - public APIRequestCreateAdVideo setInitialHeading (Long initialHeading) { this.setParam("initial_heading", initialHeading); return this; @@ -12225,15 +12310,6 @@ public APIRequestCreateAdVideo setName (String name) { return this; } - public APIRequestCreateAdVideo setOfferLikePostId (Long offerLikePostId) { - this.setParam("offer_like_post_id", offerLikePostId); - return this; - } - public APIRequestCreateAdVideo setOfferLikePostId (String offerLikePostId) { - this.setParam("offer_like_post_id", offerLikePostId); - return this; - } - public APIRequestCreateAdVideo setOgActionTypeId (String ogActionTypeId) { this.setParam("og_action_type_id", ogActionTypeId); return this; @@ -12540,6 +12616,8 @@ public APINodeList getLastResponse() { "lifetime_imps", "lifetime_min_spend_target", "lifetime_spend_cap", + "max_budget_spend_percentage", + "min_budget_spend_percentage", "multi_optimization_goal_weight", "name", "optimization_goal", @@ -12941,6 +13019,20 @@ public APIRequestGetAffectedAdSets requestLifetimeSpendCapField (boolean value) this.requestField("lifetime_spend_cap", value); return this; } + public APIRequestGetAffectedAdSets requestMaxBudgetSpendPercentageField () { + return this.requestMaxBudgetSpendPercentageField(true); + } + public APIRequestGetAffectedAdSets requestMaxBudgetSpendPercentageField (boolean value) { + this.requestField("max_budget_spend_percentage", value); + return this; + } + public APIRequestGetAffectedAdSets requestMinBudgetSpendPercentageField () { + return this.requestMinBudgetSpendPercentageField(true); + } + public APIRequestGetAffectedAdSets requestMinBudgetSpendPercentageField (boolean value) { + this.requestField("min_budget_spend_percentage", value); + return this; + } public APIRequestGetAffectedAdSets requestMultiOptimizationGoalWeightField () { return this.requestMultiOptimizationGoalWeightField(true); } @@ -18587,11 +18679,13 @@ public CustomAudience getLastResponse() { "event_source_group", "event_sources", "exclusions", + "facebook_page_id", "inclusions", "is_snapshot", "is_value_based", "list_of_accounts", "lookalike_spec", + "marketing_message_channels", "name", "opt_out_link", "origin_audience_id", @@ -18605,7 +18699,9 @@ public CustomAudience getLastResponse() { "rev_share_policy_id", "rule", "rule_aggregation", + "subscription_info", "subtype", + "use_for_products", "use_in_campaigns", "video_group_ids", "whats_app_business_phone_number_id", @@ -18769,6 +18865,11 @@ public APIRequestCreateCustomAudience setExclusions (String exclusions) { return this; } + public APIRequestCreateCustomAudience setFacebookPageId (String facebookPageId) { + this.setParam("facebook_page_id", facebookPageId); + return this; + } + public APIRequestCreateCustomAudience setInclusions (List inclusions) { this.setParam("inclusions", inclusions); return this; @@ -18810,6 +18911,15 @@ public APIRequestCreateCustomAudience setLookalikeSpec (String lookalikeSpec) { return this; } + public APIRequestCreateCustomAudience setMarketingMessageChannels (Object marketingMessageChannels) { + this.setParam("marketing_message_channels", marketingMessageChannels); + return this; + } + public APIRequestCreateCustomAudience setMarketingMessageChannels (String marketingMessageChannels) { + this.setParam("marketing_message_channels", marketingMessageChannels); + return this; + } + public APIRequestCreateCustomAudience setName (String name) { this.setParam("name", name); return this; @@ -18891,6 +19001,15 @@ public APIRequestCreateCustomAudience setRuleAggregation (String ruleAggregation return this; } + public APIRequestCreateCustomAudience setSubscriptionInfo (List subscriptionInfo) { + this.setParam("subscription_info", subscriptionInfo); + return this; + } + public APIRequestCreateCustomAudience setSubscriptionInfo (String subscriptionInfo) { + this.setParam("subscription_info", subscriptionInfo); + return this; + } + public APIRequestCreateCustomAudience setSubtype (CustomAudience.EnumSubtype subtype) { this.setParam("subtype", subtype); return this; @@ -18900,6 +19019,15 @@ public APIRequestCreateCustomAudience setSubtype (String subtype) { return this; } + public APIRequestCreateCustomAudience setUseForProducts (List useForProducts) { + this.setParam("use_for_products", useForProducts); + return this; + } + public APIRequestCreateCustomAudience setUseForProducts (String useForProducts) { + this.setParam("use_for_products", useForProducts); + return this; + } + public APIRequestCreateCustomAudience setUseInCampaigns (Boolean useInCampaigns) { this.setParam("use_in_campaigns", useInCampaigns); return this; @@ -19865,6 +19993,8 @@ public APINodeList getLastResponse() { "lifetime_imps", "lifetime_min_spend_target", "lifetime_spend_cap", + "max_budget_spend_percentage", + "min_budget_spend_percentage", "multi_optimization_goal_weight", "name", "optimization_goal", @@ -20271,6 +20401,20 @@ public APIRequestGetDeprecatedTargetingAdSets requestLifetimeSpendCapField (bool this.requestField("lifetime_spend_cap", value); return this; } + public APIRequestGetDeprecatedTargetingAdSets requestMaxBudgetSpendPercentageField () { + return this.requestMaxBudgetSpendPercentageField(true); + } + public APIRequestGetDeprecatedTargetingAdSets requestMaxBudgetSpendPercentageField (boolean value) { + this.requestField("max_budget_spend_percentage", value); + return this; + } + public APIRequestGetDeprecatedTargetingAdSets requestMinBudgetSpendPercentageField () { + return this.requestMinBudgetSpendPercentageField(true); + } + public APIRequestGetDeprecatedTargetingAdSets requestMinBudgetSpendPercentageField (boolean value) { + this.requestField("min_budget_spend_percentage", value); + return this; + } public APIRequestGetDeprecatedTargetingAdSets requestMultiOptimizationGoalWeightField () { return this.requestMultiOptimizationGoalWeightField(true); } @@ -29089,49 +29233,49 @@ public APIRequestDeleteUsersOfAnyAudience requestField (String field, boolean va } - public static class APIRequestGetValueAdjustmentRuleCollections extends APIRequest { + public static class APIRequestGetValueAdjustmentRules extends APIRequest { - APINodeList lastResponse = null; + APINodeList lastResponse = null; @Override - public APINodeList getLastResponse() { + public APINodeList getLastResponse() { return lastResponse; } public static final String[] PARAMS = { }; public static final String[] FIELDS = { + "base_value", "id", - "name", }; @Override - public APINodeList parseResponse(String response, String header) throws APIException { - return AdsValueAdjustmentRuleCollection.parseResponse(response, getContext(), this, header); + public APINodeList parseResponse(String response, String header) throws APIException { + return AdsValueAdjustmentRule.parseResponse(response, getContext(), this, header); } @Override - public APINodeList execute() throws APIException { + public APINodeList execute() throws APIException { return execute(new HashMap()); } @Override - public APINodeList execute(Map extraParams) throws APIException { + public APINodeList execute(Map extraParams) throws APIException { ResponseWrapper rw = executeInternal(extraParams); lastResponse = parseResponse(rw.getBody(),rw.getHeader()); return lastResponse; } - public ListenableFuture> executeAsync() throws APIException { + public ListenableFuture> executeAsync() throws APIException { return executeAsync(new HashMap()); }; - public ListenableFuture> executeAsync(Map extraParams) throws APIException { + public ListenableFuture> executeAsync(Map extraParams) throws APIException { return Futures.transform( executeAsyncInternal(extraParams), - new Function>() { - public APINodeList apply(ResponseWrapper result) { + new Function>() { + public APINodeList apply(ResponseWrapper result) { try { - return APIRequestGetValueAdjustmentRuleCollections.this.parseResponse(result.getBody(), result.getHeader()); + return APIRequestGetValueAdjustmentRules.this.parseResponse(result.getBody(), result.getHeader()); } catch (Exception e) { throw new RuntimeException(e); } @@ -29141,28 +29285,28 @@ public APINodeList apply(ResponseWrapper resul ); }; - public APIRequestGetValueAdjustmentRuleCollections(String nodeId, APIContext context) { - super(context, nodeId, "/value_adjustment_rule_collections", "GET", Arrays.asList(PARAMS)); + public APIRequestGetValueAdjustmentRules(String nodeId, APIContext context) { + super(context, nodeId, "/value_adjustment_rules", "GET", Arrays.asList(PARAMS)); } @Override - public APIRequestGetValueAdjustmentRuleCollections setParam(String param, Object value) { + public APIRequestGetValueAdjustmentRules setParam(String param, Object value) { setParamInternal(param, value); return this; } @Override - public APIRequestGetValueAdjustmentRuleCollections setParams(Map params) { + public APIRequestGetValueAdjustmentRules setParams(Map params) { setParamsInternal(params); return this; } - public APIRequestGetValueAdjustmentRuleCollections requestAllFields () { + public APIRequestGetValueAdjustmentRules requestAllFields () { return this.requestAllFields(true); } - public APIRequestGetValueAdjustmentRuleCollections requestAllFields (boolean value) { + public APIRequestGetValueAdjustmentRules requestAllFields (boolean value) { for (String field : FIELDS) { this.requestField(field, value); } @@ -29170,12 +29314,12 @@ public APIRequestGetValueAdjustmentRuleCollections requestAllFields (boolean val } @Override - public APIRequestGetValueAdjustmentRuleCollections requestFields (List fields) { + public APIRequestGetValueAdjustmentRules requestFields (List fields) { return this.requestFields(fields, true); } @Override - public APIRequestGetValueAdjustmentRuleCollections requestFields (List fields, boolean value) { + public APIRequestGetValueAdjustmentRules requestFields (List fields, boolean value) { for (String field : fields) { this.requestField(field, value); } @@ -29183,76 +29327,76 @@ public APIRequestGetValueAdjustmentRuleCollections requestFields (List f } @Override - public APIRequestGetValueAdjustmentRuleCollections requestField (String field) { + public APIRequestGetValueAdjustmentRules requestField (String field) { this.requestField(field, true); return this; } @Override - public APIRequestGetValueAdjustmentRuleCollections requestField (String field, boolean value) { + public APIRequestGetValueAdjustmentRules requestField (String field, boolean value) { this.requestFieldInternal(field, value); return this; } - public APIRequestGetValueAdjustmentRuleCollections requestIdField () { - return this.requestIdField(true); + public APIRequestGetValueAdjustmentRules requestBaseValueField () { + return this.requestBaseValueField(true); } - public APIRequestGetValueAdjustmentRuleCollections requestIdField (boolean value) { - this.requestField("id", value); + public APIRequestGetValueAdjustmentRules requestBaseValueField (boolean value) { + this.requestField("base_value", value); return this; } - public APIRequestGetValueAdjustmentRuleCollections requestNameField () { - return this.requestNameField(true); + public APIRequestGetValueAdjustmentRules requestIdField () { + return this.requestIdField(true); } - public APIRequestGetValueAdjustmentRuleCollections requestNameField (boolean value) { - this.requestField("name", value); + public APIRequestGetValueAdjustmentRules requestIdField (boolean value) { + this.requestField("id", value); return this; } } - public static class APIRequestGetValueAdjustmentRules extends APIRequest { + public static class APIRequestGetValueRuleSet extends APIRequest { - APINodeList lastResponse = null; + APINodeList lastResponse = null; @Override - public APINodeList getLastResponse() { + public APINodeList getLastResponse() { return lastResponse; } public static final String[] PARAMS = { }; public static final String[] FIELDS = { - "base_value", "id", + "name", }; @Override - public APINodeList parseResponse(String response, String header) throws APIException { - return AdsValueAdjustmentRule.parseResponse(response, getContext(), this, header); + public APINodeList parseResponse(String response, String header) throws APIException { + return AdsValueAdjustmentRuleCollection.parseResponse(response, getContext(), this, header); } @Override - public APINodeList execute() throws APIException { + public APINodeList execute() throws APIException { return execute(new HashMap()); } @Override - public APINodeList execute(Map extraParams) throws APIException { + public APINodeList execute(Map extraParams) throws APIException { ResponseWrapper rw = executeInternal(extraParams); lastResponse = parseResponse(rw.getBody(),rw.getHeader()); return lastResponse; } - public ListenableFuture> executeAsync() throws APIException { + public ListenableFuture> executeAsync() throws APIException { return executeAsync(new HashMap()); }; - public ListenableFuture> executeAsync(Map extraParams) throws APIException { + public ListenableFuture> executeAsync(Map extraParams) throws APIException { return Futures.transform( executeAsyncInternal(extraParams), - new Function>() { - public APINodeList apply(ResponseWrapper result) { + new Function>() { + public APINodeList apply(ResponseWrapper result) { try { - return APIRequestGetValueAdjustmentRules.this.parseResponse(result.getBody(), result.getHeader()); + return APIRequestGetValueRuleSet.this.parseResponse(result.getBody(), result.getHeader()); } catch (Exception e) { throw new RuntimeException(e); } @@ -29262,28 +29406,28 @@ public APINodeList apply(ResponseWrapper result) { ); }; - public APIRequestGetValueAdjustmentRules(String nodeId, APIContext context) { - super(context, nodeId, "/value_adjustment_rules", "GET", Arrays.asList(PARAMS)); + public APIRequestGetValueRuleSet(String nodeId, APIContext context) { + super(context, nodeId, "/value_rule_set", "GET", Arrays.asList(PARAMS)); } @Override - public APIRequestGetValueAdjustmentRules setParam(String param, Object value) { + public APIRequestGetValueRuleSet setParam(String param, Object value) { setParamInternal(param, value); return this; } @Override - public APIRequestGetValueAdjustmentRules setParams(Map params) { + public APIRequestGetValueRuleSet setParams(Map params) { setParamsInternal(params); return this; } - public APIRequestGetValueAdjustmentRules requestAllFields () { + public APIRequestGetValueRuleSet requestAllFields () { return this.requestAllFields(true); } - public APIRequestGetValueAdjustmentRules requestAllFields (boolean value) { + public APIRequestGetValueRuleSet requestAllFields (boolean value) { for (String field : FIELDS) { this.requestField(field, value); } @@ -29291,12 +29435,12 @@ public APIRequestGetValueAdjustmentRules requestAllFields (boolean value) { } @Override - public APIRequestGetValueAdjustmentRules requestFields (List fields) { + public APIRequestGetValueRuleSet requestFields (List fields) { return this.requestFields(fields, true); } @Override - public APIRequestGetValueAdjustmentRules requestFields (List fields, boolean value) { + public APIRequestGetValueRuleSet requestFields (List fields, boolean value) { for (String field : fields) { this.requestField(field, value); } @@ -29304,29 +29448,514 @@ public APIRequestGetValueAdjustmentRules requestFields (List fields, boo } @Override - public APIRequestGetValueAdjustmentRules requestField (String field) { + public APIRequestGetValueRuleSet requestField (String field) { this.requestField(field, true); return this; } @Override - public APIRequestGetValueAdjustmentRules requestField (String field, boolean value) { + public APIRequestGetValueRuleSet requestField (String field, boolean value) { this.requestFieldInternal(field, value); return this; } - public APIRequestGetValueAdjustmentRules requestBaseValueField () { - return this.requestBaseValueField(true); + public APIRequestGetValueRuleSet requestIdField () { + return this.requestIdField(true); } - public APIRequestGetValueAdjustmentRules requestBaseValueField (boolean value) { - this.requestField("base_value", value); + public APIRequestGetValueRuleSet requestIdField (boolean value) { + this.requestField("id", value); return this; } - public APIRequestGetValueAdjustmentRules requestIdField () { - return this.requestIdField(true); + public APIRequestGetValueRuleSet requestNameField () { + return this.requestNameField(true); } - public APIRequestGetValueAdjustmentRules requestIdField (boolean value) { - this.requestField("id", value); + public APIRequestGetValueRuleSet requestNameField (boolean value) { + this.requestField("name", value); + return this; + } + } + + public static class APIRequestGetVideoAds extends APIRequest { + + APINodeList lastResponse = null; + @Override + public APINodeList getLastResponse() { + return lastResponse; + } + public static final String[] PARAMS = { + "since", + "until", + }; + + public static final String[] FIELDS = { + "ad_breaks", + "admin_creator", + "audio_isrc", + "backdated_time", + "backdated_time_granularity", + "content_category", + "content_tags", + "copyright", + "copyright_check_information", + "copyright_monitoring_status", + "created_time", + "custom_labels", + "description", + "embed_html", + "embeddable", + "event", + "expiration", + "format", + "from", + "icon", + "id", + "is_crosspost_video", + "is_crossposting_eligible", + "is_episode", + "is_instagram_eligible", + "is_reference_only", + "length", + "live_audience_count", + "live_status", + "music_video_copyright", + "permalink_url", + "picture", + "place", + "post_id", + "post_views", + "premiere_living_room_status", + "privacy", + "published", + "scheduled_publish_time", + "source", + "spherical", + "status", + "title", + "universal_video_id", + "updated_time", + "views", + }; + + @Override + public APINodeList parseResponse(String response, String header) throws APIException { + return AdVideo.parseResponse(response, getContext(), this, header); + } + + @Override + public APINodeList execute() throws APIException { + return execute(new HashMap()); + } + + @Override + public APINodeList execute(Map extraParams) throws APIException { + ResponseWrapper rw = executeInternal(extraParams); + lastResponse = parseResponse(rw.getBody(),rw.getHeader()); + return lastResponse; + } + + public ListenableFuture> executeAsync() throws APIException { + return executeAsync(new HashMap()); + }; + + public ListenableFuture> executeAsync(Map extraParams) throws APIException { + return Futures.transform( + executeAsyncInternal(extraParams), + new Function>() { + public APINodeList apply(ResponseWrapper result) { + try { + return APIRequestGetVideoAds.this.parseResponse(result.getBody(), result.getHeader()); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + }, + MoreExecutors.directExecutor() + ); + }; + + public APIRequestGetVideoAds(String nodeId, APIContext context) { + super(context, nodeId, "/video_ads", "GET", Arrays.asList(PARAMS)); + } + + @Override + public APIRequestGetVideoAds setParam(String param, Object value) { + setParamInternal(param, value); + return this; + } + + @Override + public APIRequestGetVideoAds setParams(Map params) { + setParamsInternal(params); + return this; + } + + + public APIRequestGetVideoAds setSince (String since) { + this.setParam("since", since); + return this; + } + + public APIRequestGetVideoAds setUntil (String until) { + this.setParam("until", until); + return this; + } + + public APIRequestGetVideoAds requestAllFields () { + return this.requestAllFields(true); + } + + public APIRequestGetVideoAds requestAllFields (boolean value) { + for (String field : FIELDS) { + this.requestField(field, value); + } + return this; + } + + @Override + public APIRequestGetVideoAds requestFields (List fields) { + return this.requestFields(fields, true); + } + + @Override + public APIRequestGetVideoAds requestFields (List fields, boolean value) { + for (String field : fields) { + this.requestField(field, value); + } + return this; + } + + @Override + public APIRequestGetVideoAds requestField (String field) { + this.requestField(field, true); + return this; + } + + @Override + public APIRequestGetVideoAds requestField (String field, boolean value) { + this.requestFieldInternal(field, value); + return this; + } + + public APIRequestGetVideoAds requestAdBreaksField () { + return this.requestAdBreaksField(true); + } + public APIRequestGetVideoAds requestAdBreaksField (boolean value) { + this.requestField("ad_breaks", value); + return this; + } + public APIRequestGetVideoAds requestAdminCreatorField () { + return this.requestAdminCreatorField(true); + } + public APIRequestGetVideoAds requestAdminCreatorField (boolean value) { + this.requestField("admin_creator", value); + return this; + } + public APIRequestGetVideoAds requestAudioIsrcField () { + return this.requestAudioIsrcField(true); + } + public APIRequestGetVideoAds requestAudioIsrcField (boolean value) { + this.requestField("audio_isrc", value); + return this; + } + public APIRequestGetVideoAds requestBackdatedTimeField () { + return this.requestBackdatedTimeField(true); + } + public APIRequestGetVideoAds requestBackdatedTimeField (boolean value) { + this.requestField("backdated_time", value); + return this; + } + public APIRequestGetVideoAds requestBackdatedTimeGranularityField () { + return this.requestBackdatedTimeGranularityField(true); + } + public APIRequestGetVideoAds requestBackdatedTimeGranularityField (boolean value) { + this.requestField("backdated_time_granularity", value); + return this; + } + public APIRequestGetVideoAds requestContentCategoryField () { + return this.requestContentCategoryField(true); + } + public APIRequestGetVideoAds requestContentCategoryField (boolean value) { + this.requestField("content_category", value); + return this; + } + public APIRequestGetVideoAds requestContentTagsField () { + return this.requestContentTagsField(true); + } + public APIRequestGetVideoAds requestContentTagsField (boolean value) { + this.requestField("content_tags", value); + return this; + } + public APIRequestGetVideoAds requestCopyrightField () { + return this.requestCopyrightField(true); + } + public APIRequestGetVideoAds requestCopyrightField (boolean value) { + this.requestField("copyright", value); + return this; + } + public APIRequestGetVideoAds requestCopyrightCheckInformationField () { + return this.requestCopyrightCheckInformationField(true); + } + public APIRequestGetVideoAds requestCopyrightCheckInformationField (boolean value) { + this.requestField("copyright_check_information", value); + return this; + } + public APIRequestGetVideoAds requestCopyrightMonitoringStatusField () { + return this.requestCopyrightMonitoringStatusField(true); + } + public APIRequestGetVideoAds requestCopyrightMonitoringStatusField (boolean value) { + this.requestField("copyright_monitoring_status", value); + return this; + } + public APIRequestGetVideoAds requestCreatedTimeField () { + return this.requestCreatedTimeField(true); + } + public APIRequestGetVideoAds requestCreatedTimeField (boolean value) { + this.requestField("created_time", value); + return this; + } + public APIRequestGetVideoAds requestCustomLabelsField () { + return this.requestCustomLabelsField(true); + } + public APIRequestGetVideoAds requestCustomLabelsField (boolean value) { + this.requestField("custom_labels", value); + return this; + } + public APIRequestGetVideoAds requestDescriptionField () { + return this.requestDescriptionField(true); + } + public APIRequestGetVideoAds requestDescriptionField (boolean value) { + this.requestField("description", value); + return this; + } + public APIRequestGetVideoAds requestEmbedHtmlField () { + return this.requestEmbedHtmlField(true); + } + public APIRequestGetVideoAds requestEmbedHtmlField (boolean value) { + this.requestField("embed_html", value); + return this; + } + public APIRequestGetVideoAds requestEmbeddableField () { + return this.requestEmbeddableField(true); + } + public APIRequestGetVideoAds requestEmbeddableField (boolean value) { + this.requestField("embeddable", value); + return this; + } + public APIRequestGetVideoAds requestEventField () { + return this.requestEventField(true); + } + public APIRequestGetVideoAds requestEventField (boolean value) { + this.requestField("event", value); + return this; + } + public APIRequestGetVideoAds requestExpirationField () { + return this.requestExpirationField(true); + } + public APIRequestGetVideoAds requestExpirationField (boolean value) { + this.requestField("expiration", value); + return this; + } + public APIRequestGetVideoAds requestFormatField () { + return this.requestFormatField(true); + } + public APIRequestGetVideoAds requestFormatField (boolean value) { + this.requestField("format", value); + return this; + } + public APIRequestGetVideoAds requestFromField () { + return this.requestFromField(true); + } + public APIRequestGetVideoAds requestFromField (boolean value) { + this.requestField("from", value); + return this; + } + public APIRequestGetVideoAds requestIconField () { + return this.requestIconField(true); + } + public APIRequestGetVideoAds requestIconField (boolean value) { + this.requestField("icon", value); + return this; + } + public APIRequestGetVideoAds requestIdField () { + return this.requestIdField(true); + } + public APIRequestGetVideoAds requestIdField (boolean value) { + this.requestField("id", value); + return this; + } + public APIRequestGetVideoAds requestIsCrosspostVideoField () { + return this.requestIsCrosspostVideoField(true); + } + public APIRequestGetVideoAds requestIsCrosspostVideoField (boolean value) { + this.requestField("is_crosspost_video", value); + return this; + } + public APIRequestGetVideoAds requestIsCrosspostingEligibleField () { + return this.requestIsCrosspostingEligibleField(true); + } + public APIRequestGetVideoAds requestIsCrosspostingEligibleField (boolean value) { + this.requestField("is_crossposting_eligible", value); + return this; + } + public APIRequestGetVideoAds requestIsEpisodeField () { + return this.requestIsEpisodeField(true); + } + public APIRequestGetVideoAds requestIsEpisodeField (boolean value) { + this.requestField("is_episode", value); + return this; + } + public APIRequestGetVideoAds requestIsInstagramEligibleField () { + return this.requestIsInstagramEligibleField(true); + } + public APIRequestGetVideoAds requestIsInstagramEligibleField (boolean value) { + this.requestField("is_instagram_eligible", value); + return this; + } + public APIRequestGetVideoAds requestIsReferenceOnlyField () { + return this.requestIsReferenceOnlyField(true); + } + public APIRequestGetVideoAds requestIsReferenceOnlyField (boolean value) { + this.requestField("is_reference_only", value); + return this; + } + public APIRequestGetVideoAds requestLengthField () { + return this.requestLengthField(true); + } + public APIRequestGetVideoAds requestLengthField (boolean value) { + this.requestField("length", value); + return this; + } + public APIRequestGetVideoAds requestLiveAudienceCountField () { + return this.requestLiveAudienceCountField(true); + } + public APIRequestGetVideoAds requestLiveAudienceCountField (boolean value) { + this.requestField("live_audience_count", value); + return this; + } + public APIRequestGetVideoAds requestLiveStatusField () { + return this.requestLiveStatusField(true); + } + public APIRequestGetVideoAds requestLiveStatusField (boolean value) { + this.requestField("live_status", value); + return this; + } + public APIRequestGetVideoAds requestMusicVideoCopyrightField () { + return this.requestMusicVideoCopyrightField(true); + } + public APIRequestGetVideoAds requestMusicVideoCopyrightField (boolean value) { + this.requestField("music_video_copyright", value); + return this; + } + public APIRequestGetVideoAds requestPermalinkUrlField () { + return this.requestPermalinkUrlField(true); + } + public APIRequestGetVideoAds requestPermalinkUrlField (boolean value) { + this.requestField("permalink_url", value); + return this; + } + public APIRequestGetVideoAds requestPictureField () { + return this.requestPictureField(true); + } + public APIRequestGetVideoAds requestPictureField (boolean value) { + this.requestField("picture", value); + return this; + } + public APIRequestGetVideoAds requestPlaceField () { + return this.requestPlaceField(true); + } + public APIRequestGetVideoAds requestPlaceField (boolean value) { + this.requestField("place", value); + return this; + } + public APIRequestGetVideoAds requestPostIdField () { + return this.requestPostIdField(true); + } + public APIRequestGetVideoAds requestPostIdField (boolean value) { + this.requestField("post_id", value); + return this; + } + public APIRequestGetVideoAds requestPostViewsField () { + return this.requestPostViewsField(true); + } + public APIRequestGetVideoAds requestPostViewsField (boolean value) { + this.requestField("post_views", value); + return this; + } + public APIRequestGetVideoAds requestPremiereLivingRoomStatusField () { + return this.requestPremiereLivingRoomStatusField(true); + } + public APIRequestGetVideoAds requestPremiereLivingRoomStatusField (boolean value) { + this.requestField("premiere_living_room_status", value); + return this; + } + public APIRequestGetVideoAds requestPrivacyField () { + return this.requestPrivacyField(true); + } + public APIRequestGetVideoAds requestPrivacyField (boolean value) { + this.requestField("privacy", value); + return this; + } + public APIRequestGetVideoAds requestPublishedField () { + return this.requestPublishedField(true); + } + public APIRequestGetVideoAds requestPublishedField (boolean value) { + this.requestField("published", value); + return this; + } + public APIRequestGetVideoAds requestScheduledPublishTimeField () { + return this.requestScheduledPublishTimeField(true); + } + public APIRequestGetVideoAds requestScheduledPublishTimeField (boolean value) { + this.requestField("scheduled_publish_time", value); + return this; + } + public APIRequestGetVideoAds requestSourceField () { + return this.requestSourceField(true); + } + public APIRequestGetVideoAds requestSourceField (boolean value) { + this.requestField("source", value); + return this; + } + public APIRequestGetVideoAds requestSphericalField () { + return this.requestSphericalField(true); + } + public APIRequestGetVideoAds requestSphericalField (boolean value) { + this.requestField("spherical", value); + return this; + } + public APIRequestGetVideoAds requestStatusField () { + return this.requestStatusField(true); + } + public APIRequestGetVideoAds requestStatusField (boolean value) { + this.requestField("status", value); + return this; + } + public APIRequestGetVideoAds requestTitleField () { + return this.requestTitleField(true); + } + public APIRequestGetVideoAds requestTitleField (boolean value) { + this.requestField("title", value); + return this; + } + public APIRequestGetVideoAds requestUniversalVideoIdField () { + return this.requestUniversalVideoIdField(true); + } + public APIRequestGetVideoAds requestUniversalVideoIdField (boolean value) { + this.requestField("universal_video_id", value); + return this; + } + public APIRequestGetVideoAds requestUpdatedTimeField () { + return this.requestUpdatedTimeField(true); + } + public APIRequestGetVideoAds requestUpdatedTimeField (boolean value) { + this.requestField("updated_time", value); + return this; + } + public APIRequestGetVideoAds requestViewsField () { + return this.requestViewsField(true); + } + public APIRequestGetVideoAds requestViewsField (boolean value) { + this.requestField("views", value); return this; } } @@ -30552,6 +31181,8 @@ public static enum EnumSubtype { VALUE_MANAGED("MANAGED"), @SerializedName("MEASUREMENT") VALUE_MEASUREMENT("MEASUREMENT"), + @SerializedName("MESSENGER_SUBSCRIBER_LIST") + VALUE_MESSENGER_SUBSCRIBER_LIST("MESSENGER_SUBSCRIBER_LIST"), @SerializedName("OFFLINE_CONVERSION") VALUE_OFFLINE_CONVERSION("OFFLINE_CONVERSION"), @SerializedName("PARTNER") diff --git a/src/main/java/com/facebook/ads/sdk/AdAccountAdRulesHistory.java b/src/main/java/com/facebook/ads/sdk/AdAccountAdRulesHistory.java index d2cfacc6..96cbbc89 100644 --- a/src/main/java/com/facebook/ads/sdk/AdAccountAdRulesHistory.java +++ b/src/main/java/com/facebook/ads/sdk/AdAccountAdRulesHistory.java @@ -326,6 +326,10 @@ public static enum EnumAction { VALUE_CHANGED_BID("CHANGED_BID"), @SerializedName("CHANGED_BUDGET") VALUE_CHANGED_BUDGET("CHANGED_BUDGET"), + @SerializedName("CONSOLIDATE_ASC_FRAGMENTATION") + VALUE_CONSOLIDATE_ASC_FRAGMENTATION("CONSOLIDATE_ASC_FRAGMENTATION"), + @SerializedName("CONVERT_ASC_CP_SINGLE_INSTANCE") + VALUE_CONVERT_ASC_CP_SINGLE_INSTANCE("CONVERT_ASC_CP_SINGLE_INSTANCE"), @SerializedName("EMAIL") VALUE_EMAIL("EMAIL"), @SerializedName("ENABLE_ADVANTAGE_CAMPAIGN_BUDGET") @@ -338,8 +342,12 @@ public static enum EnumAction { VALUE_ENABLE_AUTOFLOW("ENABLE_AUTOFLOW"), @SerializedName("ENABLE_GEN_UNCROP") VALUE_ENABLE_GEN_UNCROP("ENABLE_GEN_UNCROP"), + @SerializedName("ENABLE_LANDING_PAGE_VIEWS") + VALUE_ENABLE_LANDING_PAGE_VIEWS("ENABLE_LANDING_PAGE_VIEWS"), @SerializedName("ENABLE_MUSIC") VALUE_ENABLE_MUSIC("ENABLE_MUSIC"), + @SerializedName("ENABLE_REELS_PLACEMENTS") + VALUE_ENABLE_REELS_PLACEMENTS("ENABLE_REELS_PLACEMENTS"), @SerializedName("ENABLE_SEMANTIC_BASED_AUDIENCE_EXPANSION") VALUE_ENABLE_SEMANTIC_BASED_AUDIENCE_EXPANSION("ENABLE_SEMANTIC_BASED_AUDIENCE_EXPANSION"), @SerializedName("ENABLE_SHOPS_ADS") diff --git a/src/main/java/com/facebook/ads/sdk/AdAccountAdVolume.java b/src/main/java/com/facebook/ads/sdk/AdAccountAdVolume.java index d169a93a..fe2a44b0 100644 --- a/src/main/java/com/facebook/ads/sdk/AdAccountAdVolume.java +++ b/src/main/java/com/facebook/ads/sdk/AdAccountAdVolume.java @@ -367,6 +367,8 @@ public static enum EnumRecommendationType { VALUE_ADVANTAGE_LOOKALIKE_AUDIENCE("ADVANTAGE_LOOKALIKE_AUDIENCE"), @SerializedName("ADVANTAGE_LOOKALIKE_DUPLICATION") VALUE_ADVANTAGE_LOOKALIKE_DUPLICATION("ADVANTAGE_LOOKALIKE_DUPLICATION"), + @SerializedName("ADVANTAGE_PLUS_APP_CAMPAIGN") + VALUE_ADVANTAGE_PLUS_APP_CAMPAIGN("ADVANTAGE_PLUS_APP_CAMPAIGN"), @SerializedName("ADVANTAGE_PLUS_APP_CAMPAIGN_PRECREATE") VALUE_ADVANTAGE_PLUS_APP_CAMPAIGN_PRECREATE("ADVANTAGE_PLUS_APP_CAMPAIGN_PRECREATE"), @SerializedName("ADVANTAGE_PLUS_AUDIENCE") @@ -391,10 +393,14 @@ public static enum EnumRecommendationType { VALUE_ADVANTAGE_PLUS_PLACEMENTS_DUPLICATION("ADVANTAGE_PLUS_PLACEMENTS_DUPLICATION"), @SerializedName("ADVANTAGE_PLUS_PLACEMENTS_FRICTION") VALUE_ADVANTAGE_PLUS_PLACEMENTS_FRICTION("ADVANTAGE_PLUS_PLACEMENTS_FRICTION"), + @SerializedName("ADVANTAGE_PLUS_PLACEMENTS_V2_DUPLICATION") + VALUE_ADVANTAGE_PLUS_PLACEMENTS_V2_DUPLICATION("ADVANTAGE_PLUS_PLACEMENTS_V2_DUPLICATION"), @SerializedName("ADVANTAGE_SHOPPING_CAMPAIGN") VALUE_ADVANTAGE_SHOPPING_CAMPAIGN("ADVANTAGE_SHOPPING_CAMPAIGN"), @SerializedName("ADVANTAGE_SHOPPING_CAMPAIGN_FRAGMENTATION") VALUE_ADVANTAGE_SHOPPING_CAMPAIGN_FRAGMENTATION("ADVANTAGE_SHOPPING_CAMPAIGN_FRAGMENTATION"), + @SerializedName("AD_LIFT_RECALL_GOAL") + VALUE_AD_LIFT_RECALL_GOAL("AD_LIFT_RECALL_GOAL"), @SerializedName("AD_LIFT_RECALL_GOAL_PRECREATE") VALUE_AD_LIFT_RECALL_GOAL_PRECREATE("AD_LIFT_RECALL_GOAL_PRECREATE"), @SerializedName("AD_LIFT_RECALL_OPTIMIZATION_GOAL") @@ -435,6 +441,8 @@ public static enum EnumRecommendationType { VALUE_AUDIENCE_EXPANSION("AUDIENCE_EXPANSION"), @SerializedName("AUDIENCE_EXPANSION_GEORADIUS") VALUE_AUDIENCE_EXPANSION_GEORADIUS("AUDIENCE_EXPANSION_GEORADIUS"), + @SerializedName("AUDIENCE_EXPANSION_LOOKALIKE") + VALUE_AUDIENCE_EXPANSION_LOOKALIKE("AUDIENCE_EXPANSION_LOOKALIKE"), @SerializedName("AUDIENCE_EXPANSION_RETARGETING") VALUE_AUDIENCE_EXPANSION_RETARGETING("AUDIENCE_EXPANSION_RETARGETING"), @SerializedName("AUDIENCE_LEARNING_LIMITED") @@ -457,6 +465,8 @@ public static enum EnumRecommendationType { VALUE_BLENDED_ADS("BLENDED_ADS"), @SerializedName("BLENDED_ADS_DUPLICATION") VALUE_BLENDED_ADS_DUPLICATION("BLENDED_ADS_DUPLICATION"), + @SerializedName("BLENDED_ADS_FOR_SHOPS_ADS_DUPLICATION") + VALUE_BLENDED_ADS_FOR_SHOPS_ADS_DUPLICATION("BLENDED_ADS_FOR_SHOPS_ADS_DUPLICATION"), @SerializedName("BROAD_TARGETING") VALUE_BROAD_TARGETING("BROAD_TARGETING"), @SerializedName("BUDGET_LIMITED") @@ -527,6 +537,8 @@ public static enum EnumRecommendationType { VALUE_CTX_CREATION_PACKAGE("CTX_CREATION_PACKAGE"), @SerializedName("CTX_CTA_UPGRADE_IN_DUPLICATION") VALUE_CTX_CTA_UPGRADE_IN_DUPLICATION("CTX_CTA_UPGRADE_IN_DUPLICATION"), + @SerializedName("CTX_CTMPO_UPGRADE") + VALUE_CTX_CTMPO_UPGRADE("CTX_CTMPO_UPGRADE"), @SerializedName("CTX_GUIDANCE") VALUE_CTX_GUIDANCE("CTX_GUIDANCE"), @SerializedName("CTX_PRECREATE") @@ -549,6 +561,8 @@ public static enum EnumRecommendationType { VALUE_DYNAMIC_ADVANTAGE_CAMPAIGN_BUDGET("DYNAMIC_ADVANTAGE_CAMPAIGN_BUDGET"), @SerializedName("ECOSYSTEM_BID_REDUCE_L1_CARDINALITY") VALUE_ECOSYSTEM_BID_REDUCE_L1_CARDINALITY("ECOSYSTEM_BID_REDUCE_L1_CARDINALITY"), + @SerializedName("ENGAGED_VIEW_CONVERSIONS_CREATION") + VALUE_ENGAGED_VIEW_CONVERSIONS_CREATION("ENGAGED_VIEW_CONVERSIONS_CREATION"), @SerializedName("EVC_APP_DUPLICATION_UPGRADE") VALUE_EVC_APP_DUPLICATION_UPGRADE("EVC_APP_DUPLICATION_UPGRADE"), @SerializedName("EVC_WEB_DUPLICATION_UPGRADE") @@ -573,6 +587,8 @@ public static enum EnumRecommendationType { VALUE_HISTORICAL_BENCHMARK("HISTORICAL_BENCHMARK"), @SerializedName("IG_MULTI_ADS") VALUE_IG_MULTI_ADS("IG_MULTI_ADS"), + @SerializedName("LANDING_PAGE_VIEW") + VALUE_LANDING_PAGE_VIEW("LANDING_PAGE_VIEW"), @SerializedName("LANDING_PAGE_VIEW_OPTIMIZATION_GOAL") VALUE_LANDING_PAGE_VIEW_OPTIMIZATION_GOAL("LANDING_PAGE_VIEW_OPTIMIZATION_GOAL"), @SerializedName("LANDING_PAGE_VIEW_PRECREATE") @@ -585,16 +601,24 @@ public static enum EnumRecommendationType { VALUE_LEARNING_PAUSE_FRICTION("LEARNING_PAUSE_FRICTION"), @SerializedName("LEARNING_PHASE_BUDGET_EDITS") VALUE_LEARNING_PHASE_BUDGET_EDITS("LEARNING_PHASE_BUDGET_EDITS"), + @SerializedName("LOW_BUDGET_UTILIZATION") + VALUE_LOW_BUDGET_UTILIZATION("LOW_BUDGET_UTILIZATION"), @SerializedName("LOW_OUTCOME") VALUE_LOW_OUTCOME("LOW_OUTCOME"), @SerializedName("MERLIN_GUIDANCE") VALUE_MERLIN_GUIDANCE("MERLIN_GUIDANCE"), + @SerializedName("MESSAGING_EVENTS") + VALUE_MESSAGING_EVENTS("MESSAGING_EVENTS"), @SerializedName("MESSAGING_EVENTS_PRECREATE") VALUE_MESSAGING_EVENTS_PRECREATE("MESSAGING_EVENTS_PRECREATE"), + @SerializedName("MESSAGING_PARTNERS") + VALUE_MESSAGING_PARTNERS("MESSAGING_PARTNERS"), @SerializedName("MESSAGING_PARTNERS_PRECREATE") VALUE_MESSAGING_PARTNERS_PRECREATE("MESSAGING_PARTNERS_PRECREATE"), @SerializedName("META_VERIFIED_ADS_PERFORMANCE_GUIDANCE") VALUE_META_VERIFIED_ADS_PERFORMANCE_GUIDANCE("META_VERIFIED_ADS_PERFORMANCE_GUIDANCE"), + @SerializedName("MISSING_OR_INVALID_PARAMETERS") + VALUE_MISSING_OR_INVALID_PARAMETERS("MISSING_OR_INVALID_PARAMETERS"), @SerializedName("MIXED_FORMATS") VALUE_MIXED_FORMATS("MIXED_FORMATS"), @SerializedName("MIXED_PA_COMBINE_ADSETS") @@ -607,6 +631,8 @@ public static enum EnumRecommendationType { VALUE_MOBILE_FIRST_VIDEO("MOBILE_FIRST_VIDEO"), @SerializedName("MR_AEMV2SUB_KCONSOLIDATION") VALUE_MR_AEMV2SUB_KCONSOLIDATION("MR_AEMV2SUB_KCONSOLIDATION"), + @SerializedName("MULTI_ADVERTISER_ADS") + VALUE_MULTI_ADVERTISER_ADS("MULTI_ADVERTISER_ADS"), @SerializedName("MULTI_TEXT") VALUE_MULTI_TEXT("MULTI_TEXT"), @SerializedName("MUSIC") @@ -619,16 +645,24 @@ public static enum EnumRecommendationType { VALUE_OFFSITE_CONVERSION("OFFSITE_CONVERSION"), @SerializedName("OPTIMAL_BAU") VALUE_OPTIMAL_BAU("OPTIMAL_BAU"), + @SerializedName("OUTCOME_FORECASTER_SHADOW_LOGGING") + VALUE_OUTCOME_FORECASTER_SHADOW_LOGGING("OUTCOME_FORECASTER_SHADOW_LOGGING"), @SerializedName("PAYMENT_METHOD") VALUE_PAYMENT_METHOD("PAYMENT_METHOD"), @SerializedName("PERFORMANT_CREATIVE_REELS_OPT_IN") VALUE_PERFORMANT_CREATIVE_REELS_OPT_IN("PERFORMANT_CREATIVE_REELS_OPT_IN"), @SerializedName("PFR_L1_INLINE_MMT") VALUE_PFR_L1_INLINE_MMT("PFR_L1_INLINE_MMT"), + @SerializedName("PIXEL_OPTIMIZATION_AAM") + VALUE_PIXEL_OPTIMIZATION_AAM("PIXEL_OPTIMIZATION_AAM"), @SerializedName("PIXEL_OPTIMIZATION_AAM_PRECREATE") VALUE_PIXEL_OPTIMIZATION_AAM_PRECREATE("PIXEL_OPTIMIZATION_AAM_PRECREATE"), + @SerializedName("PIXEL_OPTIMIZATION_HIE") + VALUE_PIXEL_OPTIMIZATION_HIE("PIXEL_OPTIMIZATION_HIE"), @SerializedName("PIXEL_OPTIMIZATION_HIE_PRECREATE") VALUE_PIXEL_OPTIMIZATION_HIE_PRECREATE("PIXEL_OPTIMIZATION_HIE_PRECREATE"), + @SerializedName("PIXEL_SETUP") + VALUE_PIXEL_SETUP("PIXEL_SETUP"), @SerializedName("PIXEL_SETUP_PRECREATE") VALUE_PIXEL_SETUP_PRECREATE("PIXEL_SETUP_PRECREATE"), @SerializedName("PIXEL_UPSELL") @@ -671,6 +705,8 @@ public static enum EnumRecommendationType { VALUE_SCALE_GOOD_CAMPAIGN("SCALE_GOOD_CAMPAIGN"), @SerializedName("SCALE_GOOD_CAMPAIGN_DUPLICATION") VALUE_SCALE_GOOD_CAMPAIGN_DUPLICATION("SCALE_GOOD_CAMPAIGN_DUPLICATION"), + @SerializedName("SCALE_GOOD_CAMPAIGN_SMB") + VALUE_SCALE_GOOD_CAMPAIGN_SMB("SCALE_GOOD_CAMPAIGN_SMB"), @SerializedName("SCALE_GOOD_CTX_CAMPAIGN") VALUE_SCALE_GOOD_CTX_CAMPAIGN("SCALE_GOOD_CTX_CAMPAIGN"), @SerializedName("SEMANTIC_BASED_AUDIENCE_DUPLICATION") @@ -683,6 +719,8 @@ public static enum EnumRecommendationType { VALUE_SHOPS_ADS("SHOPS_ADS"), @SerializedName("SHOPS_ADS_DUPLICATION") VALUE_SHOPS_ADS_DUPLICATION("SHOPS_ADS_DUPLICATION"), + @SerializedName("SHOPS_ADS_TRAFFIC_CAP_SETTINGS") + VALUE_SHOPS_ADS_TRAFFIC_CAP_SETTINGS("SHOPS_ADS_TRAFFIC_CAP_SETTINGS"), @SerializedName("SHOP_ADS_V2") VALUE_SHOP_ADS_V2("SHOP_ADS_V2"), @SerializedName("SIGNALS_GROWTH_CAPI") @@ -729,12 +767,16 @@ public static enum EnumRecommendationType { VALUE_UNIFIED_INBOX("UNIFIED_INBOX"), @SerializedName("UNUSED_BUDGET") VALUE_UNUSED_BUDGET("UNUSED_BUDGET"), + @SerializedName("VALUE_DIAGNOSTICS_GUIDANCE") + VALUE_VALUE_DIAGNOSTICS_GUIDANCE("VALUE_DIAGNOSTICS_GUIDANCE"), @SerializedName("VIDEO_LENGTH") VALUE_VIDEO_LENGTH("VIDEO_LENGTH"), @SerializedName("VIDEO_VIEWS_UPSELL") VALUE_VIDEO_VIEWS_UPSELL("VIDEO_VIEWS_UPSELL"), @SerializedName("VIDEO_VIEWS_UPSELL_PRECREATE") VALUE_VIDEO_VIEWS_UPSELL_PRECREATE("VIDEO_VIEWS_UPSELL_PRECREATE"), + @SerializedName("WA_MESSAGING_PARTNERS") + VALUE_WA_MESSAGING_PARTNERS("WA_MESSAGING_PARTNERS"), @SerializedName("WA_MESSAGING_PARTNERS_PRECREATE") VALUE_WA_MESSAGING_PARTNERS_PRECREATE("WA_MESSAGING_PARTNERS_PRECREATE"), @SerializedName("WEB_ENGAGED_VIEW_CONVERSIONS") diff --git a/src/main/java/com/facebook/ads/sdk/ExternalEventSourceDAStatsResult.java b/src/main/java/com/facebook/ads/sdk/AdAccountLiveVideoAdvertiser.java similarity index 55% rename from src/main/java/com/facebook/ads/sdk/ExternalEventSourceDAStatsResult.java rename to src/main/java/com/facebook/ads/sdk/AdAccountLiveVideoAdvertiser.java index e073a5f2..c06f7ec7 100644 --- a/src/main/java/com/facebook/ads/sdk/ExternalEventSourceDAStatsResult.java +++ b/src/main/java/com/facebook/ads/sdk/AdAccountLiveVideoAdvertiser.java @@ -40,33 +40,27 @@ * pull request for this class. * */ -public class ExternalEventSourceDAStatsResult extends APINode { - @SerializedName("count_content_ids") - private Long mCountContentIds = null; - @SerializedName("count_content_ids_match_any_catalog") - private Long mCountContentIdsMatchAnyCatalog = null; - @SerializedName("count_fires") - private Long mCountFires = null; - @SerializedName("count_fires_match_any_catalog") - private Long mCountFiresMatchAnyCatalog = null; - @SerializedName("date") - private String mDate = null; - @SerializedName("percentage_missed_users") - private Double mPercentageMissedUsers = null; +public class AdAccountLiveVideoAdvertiser extends APINode { + @SerializedName("is_lva_toggle_on") + private Boolean mIsLvaToggleOn = null; + @SerializedName("lva_default_budget") + private Long mLvaDefaultBudget = null; + @SerializedName("should_show_lva_toggle") + private Boolean mShouldShowLvaToggle = null; protected static Gson gson = null; - public ExternalEventSourceDAStatsResult() { + public AdAccountLiveVideoAdvertiser() { } public String getId() { return null; } - public static ExternalEventSourceDAStatsResult loadJSON(String json, APIContext context, String header) { - ExternalEventSourceDAStatsResult externalEventSourceDAStatsResult = getGson().fromJson(json, ExternalEventSourceDAStatsResult.class); + public static AdAccountLiveVideoAdvertiser loadJSON(String json, APIContext context, String header) { + AdAccountLiveVideoAdvertiser adAccountLiveVideoAdvertiser = getGson().fromJson(json, AdAccountLiveVideoAdvertiser.class); if (context.isDebug()) { JsonParser parser = new JsonParser(); JsonElement o1 = parser.parse(json); - JsonElement o2 = parser.parse(externalEventSourceDAStatsResult.toString()); + JsonElement o2 = parser.parse(adAccountLiveVideoAdvertiser.toString()); if (o1.getAsJsonObject().get("__fb_trace_id__") != null) { o2.getAsJsonObject().add("__fb_trace_id__", o1.getAsJsonObject().get("__fb_trace_id__")); } @@ -76,14 +70,14 @@ public static ExternalEventSourceDAStatsResult loadJSON(String json, APIContext context.log("[Object]" + o2); } } - externalEventSourceDAStatsResult.context = context; - externalEventSourceDAStatsResult.rawValue = json; - externalEventSourceDAStatsResult.header = header; - return externalEventSourceDAStatsResult; + adAccountLiveVideoAdvertiser.context = context; + adAccountLiveVideoAdvertiser.rawValue = json; + adAccountLiveVideoAdvertiser.header = header; + return adAccountLiveVideoAdvertiser; } - public static APINodeList parseResponse(String json, APIContext context, APIRequest request, String header) throws MalformedResponseException { - APINodeList externalEventSourceDAStatsResults = new APINodeList(request, json, header); + public static APINodeList parseResponse(String json, APIContext context, APIRequest request, String header) throws MalformedResponseException { + APINodeList adAccountLiveVideoAdvertisers = new APINodeList(request, json, header); JsonArray arr; JsonObject obj; JsonParser parser = new JsonParser(); @@ -94,9 +88,9 @@ public static APINodeList parseResponse(String // First, check if it's a pure JSON Array arr = result.getAsJsonArray(); for (int i = 0; i < arr.size(); i++) { - externalEventSourceDAStatsResults.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header)); + adAccountLiveVideoAdvertisers.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header)); }; - return externalEventSourceDAStatsResults; + return adAccountLiveVideoAdvertisers; } else if (result.isJsonObject()) { obj = result.getAsJsonObject(); if (obj.has("data")) { @@ -106,20 +100,20 @@ public static APINodeList parseResponse(String JsonObject cursors = paging.get("cursors").getAsJsonObject(); String before = cursors.has("before") ? cursors.get("before").getAsString() : null; String after = cursors.has("after") ? cursors.get("after").getAsString() : null; - externalEventSourceDAStatsResults.setCursors(before, after); + adAccountLiveVideoAdvertisers.setCursors(before, after); } String previous = paging.has("previous") ? paging.get("previous").getAsString() : null; String next = paging.has("next") ? paging.get("next").getAsString() : null; - externalEventSourceDAStatsResults.setPaging(previous, next); + adAccountLiveVideoAdvertisers.setPaging(previous, next); if (context.hasAppSecret()) { - externalEventSourceDAStatsResults.setAppSecret(context.getAppSecretProof()); + adAccountLiveVideoAdvertisers.setAppSecret(context.getAppSecretProof()); } } if (obj.get("data").isJsonArray()) { // Second, check if it's a JSON array with "data" arr = obj.get("data").getAsJsonArray(); for (int i = 0; i < arr.size(); i++) { - externalEventSourceDAStatsResults.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header)); + adAccountLiveVideoAdvertisers.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header)); }; } else if (obj.get("data").isJsonObject()) { // Third, check if it's a JSON object with "data" @@ -130,23 +124,23 @@ public static APINodeList parseResponse(String isRedownload = true; obj = obj.getAsJsonObject(s); for (Map.Entry entry : obj.entrySet()) { - externalEventSourceDAStatsResults.add(loadJSON(entry.getValue().toString(), context, header)); + adAccountLiveVideoAdvertisers.add(loadJSON(entry.getValue().toString(), context, header)); } break; } } if (!isRedownload) { - externalEventSourceDAStatsResults.add(loadJSON(obj.toString(), context, header)); + adAccountLiveVideoAdvertisers.add(loadJSON(obj.toString(), context, header)); } } - return externalEventSourceDAStatsResults; + return adAccountLiveVideoAdvertisers; } else if (obj.has("images")) { // Fourth, check if it's a map of image objects obj = obj.get("images").getAsJsonObject(); for (Map.Entry entry : obj.entrySet()) { - externalEventSourceDAStatsResults.add(loadJSON(entry.getValue().toString(), context, header)); + adAccountLiveVideoAdvertisers.add(loadJSON(entry.getValue().toString(), context, header)); } - return externalEventSourceDAStatsResults; + return adAccountLiveVideoAdvertisers; } else { // Fifth, check if it's an array of objects indexed by id boolean isIdIndexedArray = true; @@ -163,20 +157,20 @@ public static APINodeList parseResponse(String value.getAsJsonObject().get("id") != null && value.getAsJsonObject().get("id").getAsString().equals(key) ) { - externalEventSourceDAStatsResults.add(loadJSON(value.toString(), context, header)); + adAccountLiveVideoAdvertisers.add(loadJSON(value.toString(), context, header)); } else { isIdIndexedArray = false; break; } } if (isIdIndexedArray) { - return externalEventSourceDAStatsResults; + return adAccountLiveVideoAdvertisers; } // Sixth, check if it's pure JsonObject - externalEventSourceDAStatsResults.clear(); - externalEventSourceDAStatsResults.add(loadJSON(json, context, header)); - return externalEventSourceDAStatsResults; + adAccountLiveVideoAdvertisers.clear(); + adAccountLiveVideoAdvertisers.add(loadJSON(json, context, header)); + return adAccountLiveVideoAdvertisers; } } } catch (Exception e) { @@ -204,57 +198,30 @@ public String toString() { } - public Long getFieldCountContentIds() { - return mCountContentIds; + public Boolean getFieldIsLvaToggleOn() { + return mIsLvaToggleOn; } - public ExternalEventSourceDAStatsResult setFieldCountContentIds(Long value) { - this.mCountContentIds = value; + public AdAccountLiveVideoAdvertiser setFieldIsLvaToggleOn(Boolean value) { + this.mIsLvaToggleOn = value; return this; } - public Long getFieldCountContentIdsMatchAnyCatalog() { - return mCountContentIdsMatchAnyCatalog; + public Long getFieldLvaDefaultBudget() { + return mLvaDefaultBudget; } - public ExternalEventSourceDAStatsResult setFieldCountContentIdsMatchAnyCatalog(Long value) { - this.mCountContentIdsMatchAnyCatalog = value; + public AdAccountLiveVideoAdvertiser setFieldLvaDefaultBudget(Long value) { + this.mLvaDefaultBudget = value; return this; } - public Long getFieldCountFires() { - return mCountFires; + public Boolean getFieldShouldShowLvaToggle() { + return mShouldShowLvaToggle; } - public ExternalEventSourceDAStatsResult setFieldCountFires(Long value) { - this.mCountFires = value; - return this; - } - - public Long getFieldCountFiresMatchAnyCatalog() { - return mCountFiresMatchAnyCatalog; - } - - public ExternalEventSourceDAStatsResult setFieldCountFiresMatchAnyCatalog(Long value) { - this.mCountFiresMatchAnyCatalog = value; - return this; - } - - public String getFieldDate() { - return mDate; - } - - public ExternalEventSourceDAStatsResult setFieldDate(String value) { - this.mDate = value; - return this; - } - - public Double getFieldPercentageMissedUsers() { - return mPercentageMissedUsers; - } - - public ExternalEventSourceDAStatsResult setFieldPercentageMissedUsers(Double value) { - this.mPercentageMissedUsers = value; + public AdAccountLiveVideoAdvertiser setFieldShouldShowLvaToggle(Boolean value) { + this.mShouldShowLvaToggle = value; return this; } @@ -274,22 +241,19 @@ public ExternalEventSourceDAStatsResult setFieldPercentageMissedUsers(Double val return gson; } - public ExternalEventSourceDAStatsResult copyFrom(ExternalEventSourceDAStatsResult instance) { - this.mCountContentIds = instance.mCountContentIds; - this.mCountContentIdsMatchAnyCatalog = instance.mCountContentIdsMatchAnyCatalog; - this.mCountFires = instance.mCountFires; - this.mCountFiresMatchAnyCatalog = instance.mCountFiresMatchAnyCatalog; - this.mDate = instance.mDate; - this.mPercentageMissedUsers = instance.mPercentageMissedUsers; + public AdAccountLiveVideoAdvertiser copyFrom(AdAccountLiveVideoAdvertiser instance) { + this.mIsLvaToggleOn = instance.mIsLvaToggleOn; + this.mLvaDefaultBudget = instance.mLvaDefaultBudget; + this.mShouldShowLvaToggle = instance.mShouldShowLvaToggle; this.context = instance.context; this.rawValue = instance.rawValue; return this; } - public static APIRequest.ResponseParser getParser() { - return new APIRequest.ResponseParser() { - public APINodeList parseResponse(String response, APIContext context, APIRequest request, String header) throws MalformedResponseException { - return ExternalEventSourceDAStatsResult.parseResponse(response, context, request, header); + public static APIRequest.ResponseParser getParser() { + return new APIRequest.ResponseParser() { + public APINodeList parseResponse(String response, APIContext context, APIRequest request, String header) throws MalformedResponseException { + return AdAccountLiveVideoAdvertiser.parseResponse(response, context, request, header); } }; } diff --git a/src/main/java/com/facebook/ads/sdk/AdAccountTargetingUnified.java b/src/main/java/com/facebook/ads/sdk/AdAccountTargetingUnified.java index 736e1222..345d585a 100644 --- a/src/main/java/com/facebook/ads/sdk/AdAccountTargetingUnified.java +++ b/src/main/java/com/facebook/ads/sdk/AdAccountTargetingUnified.java @@ -519,6 +519,8 @@ public static enum EnumRegulatedCategories { VALUE_CREDIT("CREDIT"), @SerializedName("EMPLOYMENT") VALUE_EMPLOYMENT("EMPLOYMENT"), + @SerializedName("FINANCIAL_PRODUCTS_SERVICES") + VALUE_FINANCIAL_PRODUCTS_SERVICES("FINANCIAL_PRODUCTS_SERVICES"), @SerializedName("HOUSING") VALUE_HOUSING("HOUSING"), @SerializedName("ISSUES_ELECTIONS_POLITICS") diff --git a/src/main/java/com/facebook/ads/sdk/AdActivity.java b/src/main/java/com/facebook/ads/sdk/AdActivity.java index d4871b81..650d525f 100644 --- a/src/main/java/com/facebook/ads/sdk/AdActivity.java +++ b/src/main/java/com/facebook/ads/sdk/AdActivity.java @@ -351,6 +351,8 @@ public static enum EnumEventType { VALUE_AD_ACCOUNT_RESET_SPEND_LIMIT("ad_account_reset_spend_limit"), @SerializedName("ad_account_set_business_information") VALUE_AD_ACCOUNT_SET_BUSINESS_INFORMATION("ad_account_set_business_information"), + @SerializedName("ad_account_update_audience_type_url_parameter") + VALUE_AD_ACCOUNT_UPDATE_AUDIENCE_TYPE_URL_PARAMETER("ad_account_update_audience_type_url_parameter"), @SerializedName("ad_account_update_spend_limit") VALUE_AD_ACCOUNT_UPDATE_SPEND_LIMIT("ad_account_update_spend_limit"), @SerializedName("ad_account_update_status") @@ -359,6 +361,8 @@ public static enum EnumEventType { VALUE_AD_REVIEW_APPROVED("ad_review_approved"), @SerializedName("ad_review_declined") VALUE_AD_REVIEW_DECLINED("ad_review_declined"), + @SerializedName("adaccount_update_audience_segment") + VALUE_ADACCOUNT_UPDATE_AUDIENCE_SEGMENT("adaccount_update_audience_segment"), @SerializedName("add_funding_source") VALUE_ADD_FUNDING_SOURCE("add_funding_source"), @SerializedName("add_images") @@ -469,6 +473,8 @@ public static enum EnumEventType { VALUE_UPDATE_CAMPAIGN_BUDGET_SCHEDULING_STATE("update_campaign_budget_scheduling_state"), @SerializedName("update_campaign_conversion_goal") VALUE_UPDATE_CAMPAIGN_CONVERSION_GOAL("update_campaign_conversion_goal"), + @SerializedName("update_campaign_delivery_destination") + VALUE_UPDATE_CAMPAIGN_DELIVERY_DESTINATION("update_campaign_delivery_destination"), @SerializedName("update_campaign_delivery_type") VALUE_UPDATE_CAMPAIGN_DELIVERY_TYPE("update_campaign_delivery_type"), @SerializedName("update_campaign_group_ad_scheduling") diff --git a/src/main/java/com/facebook/ads/sdk/AdCreative.java b/src/main/java/com/facebook/ads/sdk/AdCreative.java index 9bce68cd..85b2f0df 100644 --- a/src/main/java/com/facebook/ads/sdk/AdCreative.java +++ b/src/main/java/com/facebook/ads/sdk/AdCreative.java @@ -123,6 +123,8 @@ public class AdCreative extends APINode { private String mLinkOgId = null; @SerializedName("link_url") private String mLinkUrl = null; + @SerializedName("messenger_sponsored_message") + private String mMessengerSponsoredMessage = null; @SerializedName("name") private String mName = null; @SerializedName("object_id") @@ -834,6 +836,15 @@ public AdCreative setFieldLinkUrl(String value) { return this; } + public String getFieldMessengerSponsoredMessage() { + return mMessengerSponsoredMessage; + } + + public AdCreative setFieldMessengerSponsoredMessage(String value) { + this.mMessengerSponsoredMessage = value; + return this; + } + public String getFieldName() { return mName; } @@ -1764,6 +1775,7 @@ public AdCreative getLastResponse() { "link_destination_display_url", "link_og_id", "link_url", + "messenger_sponsored_message", "name", "object_id", "object_store_url", @@ -2187,6 +2199,13 @@ public APIRequestGet requestLinkUrlField (boolean value) { this.requestField("link_url", value); return this; } + public APIRequestGet requestMessengerSponsoredMessageField () { + return this.requestMessengerSponsoredMessageField(true); + } + public APIRequestGet requestMessengerSponsoredMessageField (boolean value) { + this.requestField("messenger_sponsored_message", value); + return this; + } public APIRequestGet requestNameField () { return this.requestNameField(true); } @@ -2939,6 +2958,7 @@ public AdCreative copyFrom(AdCreative instance) { this.mLinkDestinationDisplayUrl = instance.mLinkDestinationDisplayUrl; this.mLinkOgId = instance.mLinkOgId; this.mLinkUrl = instance.mLinkUrl; + this.mMessengerSponsoredMessage = instance.mMessengerSponsoredMessage; this.mName = instance.mName; this.mObjectId = instance.mObjectId; this.mObjectStoreUrl = instance.mObjectStoreUrl; diff --git a/src/main/java/com/facebook/ads/sdk/AdCreativeBrandedContentAds.java b/src/main/java/com/facebook/ads/sdk/AdCreativeBrandedContentAds.java index 6f44b363..a65f2652 100644 --- a/src/main/java/com/facebook/ads/sdk/AdCreativeBrandedContentAds.java +++ b/src/main/java/com/facebook/ads/sdk/AdCreativeBrandedContentAds.java @@ -53,6 +53,10 @@ public class AdCreativeBrandedContentAds extends APINode { private String mInstagramBoostPostAccessToken = null; @SerializedName("is_mca_internal") private Boolean mIsMcaInternal = null; + @SerializedName("parent_source_facebook_post_id") + private String mParentSourceFacebookPostId = null; + @SerializedName("parent_source_instagram_media_id") + private String mParentSourceInstagramMediaId = null; @SerializedName("partners") private List mPartners = null; @SerializedName("product_set_partner_selection_status") @@ -268,6 +272,24 @@ public AdCreativeBrandedContentAds setFieldIsMcaInternal(Boolean value) { return this; } + public String getFieldParentSourceFacebookPostId() { + return mParentSourceFacebookPostId; + } + + public AdCreativeBrandedContentAds setFieldParentSourceFacebookPostId(String value) { + this.mParentSourceFacebookPostId = value; + return this; + } + + public String getFieldParentSourceInstagramMediaId() { + return mParentSourceInstagramMediaId; + } + + public AdCreativeBrandedContentAds setFieldParentSourceInstagramMediaId(String value) { + this.mParentSourceInstagramMediaId = value; + return this; + } + public List getFieldPartners() { return mPartners; } @@ -341,6 +363,8 @@ public AdCreativeBrandedContentAds copyFrom(AdCreativeBrandedContentAds instance this.mFacebookBoostPostAccessToken = instance.mFacebookBoostPostAccessToken; this.mInstagramBoostPostAccessToken = instance.mInstagramBoostPostAccessToken; this.mIsMcaInternal = instance.mIsMcaInternal; + this.mParentSourceFacebookPostId = instance.mParentSourceFacebookPostId; + this.mParentSourceInstagramMediaId = instance.mParentSourceInstagramMediaId; this.mPartners = instance.mPartners; this.mProductSetPartnerSelectionStatus = instance.mProductSetPartnerSelectionStatus; this.mPromotedPageId = instance.mPromotedPageId; diff --git a/src/main/java/com/facebook/ads/sdk/AdCreativeBrandedContentAdsPartners.java b/src/main/java/com/facebook/ads/sdk/AdCreativeBrandedContentAdsPartners.java index 20f4282d..462a8c17 100644 --- a/src/main/java/com/facebook/ads/sdk/AdCreativeBrandedContentAdsPartners.java +++ b/src/main/java/com/facebook/ads/sdk/AdCreativeBrandedContentAdsPartners.java @@ -43,6 +43,8 @@ public class AdCreativeBrandedContentAdsPartners extends APINode { @SerializedName("fb_page_id") private String mFbPageId = null; + @SerializedName("has_create_ads_access") + private Boolean mHasCreateAdsAccess = null; @SerializedName("identity_type") private String mIdentityType = null; @SerializedName("ig_asset_id") @@ -209,6 +211,15 @@ public AdCreativeBrandedContentAdsPartners setFieldFbPageId(String value) { return this; } + public Boolean getFieldHasCreateAdsAccess() { + return mHasCreateAdsAccess; + } + + public AdCreativeBrandedContentAdsPartners setFieldHasCreateAdsAccess(Boolean value) { + this.mHasCreateAdsAccess = value; + return this; + } + public String getFieldIdentityType() { return mIdentityType; } @@ -254,6 +265,7 @@ public AdCreativeBrandedContentAdsPartners setFieldIgUserId(String value) { public AdCreativeBrandedContentAdsPartners copyFrom(AdCreativeBrandedContentAdsPartners instance) { this.mFbPageId = instance.mFbPageId; + this.mHasCreateAdsAccess = instance.mHasCreateAdsAccess; this.mIdentityType = instance.mIdentityType; this.mIgAssetId = instance.mIgAssetId; this.mIgUserId = instance.mIgUserId; diff --git a/src/main/java/com/facebook/ads/sdk/AdCreativeFeaturesSpec.java b/src/main/java/com/facebook/ads/sdk/AdCreativeFeaturesSpec.java index 8f6ddf86..77728532 100644 --- a/src/main/java/com/facebook/ads/sdk/AdCreativeFeaturesSpec.java +++ b/src/main/java/com/facebook/ads/sdk/AdCreativeFeaturesSpec.java @@ -65,12 +65,28 @@ public class AdCreativeFeaturesSpec extends APINode { private AdCreativeFeatureDetails mDescriptionAutomation = null; @SerializedName("dha_optimization") private AdCreativeFeatureDetails mDhaOptimization = null; + @SerializedName("dynamic_partner_content") + private AdCreativeFeatureDetails mDynamicPartnerContent = null; @SerializedName("enhance_cta") private AdCreativeFeatureDetails mEnhanceCta = null; + @SerializedName("fb_feed_tag") + private AdCreativeFeatureDetails mFbFeedTag = null; + @SerializedName("fb_reels_tag") + private AdCreativeFeatureDetails mFbReelsTag = null; + @SerializedName("fb_story_tag") + private AdCreativeFeatureDetails mFbStoryTag = null; @SerializedName("feed_caption_optimization") private AdCreativeFeatureDetails mFeedCaptionOptimization = null; + @SerializedName("ig_feed_tag") + private AdCreativeFeatureDetails mIgFeedTag = null; @SerializedName("ig_glados_feed") private AdCreativeFeatureDetails mIgGladosFeed = null; + @SerializedName("ig_reels_tag") + private AdCreativeFeatureDetails mIgReelsTag = null; + @SerializedName("ig_stream_tag") + private AdCreativeFeatureDetails mIgStreamTag = null; + @SerializedName("image_animation") + private AdCreativeFeatureDetails mImageAnimation = null; @SerializedName("image_auto_crop") private AdCreativeFeatureDetails mImageAutoCrop = null; @SerializedName("image_background_gen") @@ -95,6 +111,8 @@ public class AdCreativeFeaturesSpec extends APINode { private AdCreativeFeatureDetails mMediaOrder = null; @SerializedName("media_type_automation") private AdCreativeFeatureDetails mMediaTypeAutomation = null; + @SerializedName("pac_relaxation") + private AdCreativeFeatureDetails mPacRelaxation = null; @SerializedName("product_extensions") private AdCreativeFeatureDetails mProductExtensions = null; @SerializedName("product_metadata_automation") @@ -119,6 +137,8 @@ public class AdCreativeFeaturesSpec extends APINode { private AdCreativeFeatureDetails mVideoFiltering = null; @SerializedName("video_highlight") private AdCreativeFeatureDetails mVideoHighlight = null; + @SerializedName("video_uncrop") + private AdCreativeFeatureDetails mVideoUncrop = null; protected static Gson gson = null; public AdCreativeFeaturesSpec() { @@ -438,6 +458,20 @@ public AdCreativeFeaturesSpec setFieldDhaOptimization(String value) { this.mDhaOptimization = AdCreativeFeatureDetails.getGson().fromJson(value, type); return this; } + public AdCreativeFeatureDetails getFieldDynamicPartnerContent() { + return mDynamicPartnerContent; + } + + public AdCreativeFeaturesSpec setFieldDynamicPartnerContent(AdCreativeFeatureDetails value) { + this.mDynamicPartnerContent = value; + return this; + } + + public AdCreativeFeaturesSpec setFieldDynamicPartnerContent(String value) { + Type type = new TypeToken(){}.getType(); + this.mDynamicPartnerContent = AdCreativeFeatureDetails.getGson().fromJson(value, type); + return this; + } public AdCreativeFeatureDetails getFieldEnhanceCta() { return mEnhanceCta; } @@ -452,6 +486,48 @@ public AdCreativeFeaturesSpec setFieldEnhanceCta(String value) { this.mEnhanceCta = AdCreativeFeatureDetails.getGson().fromJson(value, type); return this; } + public AdCreativeFeatureDetails getFieldFbFeedTag() { + return mFbFeedTag; + } + + public AdCreativeFeaturesSpec setFieldFbFeedTag(AdCreativeFeatureDetails value) { + this.mFbFeedTag = value; + return this; + } + + public AdCreativeFeaturesSpec setFieldFbFeedTag(String value) { + Type type = new TypeToken(){}.getType(); + this.mFbFeedTag = AdCreativeFeatureDetails.getGson().fromJson(value, type); + return this; + } + public AdCreativeFeatureDetails getFieldFbReelsTag() { + return mFbReelsTag; + } + + public AdCreativeFeaturesSpec setFieldFbReelsTag(AdCreativeFeatureDetails value) { + this.mFbReelsTag = value; + return this; + } + + public AdCreativeFeaturesSpec setFieldFbReelsTag(String value) { + Type type = new TypeToken(){}.getType(); + this.mFbReelsTag = AdCreativeFeatureDetails.getGson().fromJson(value, type); + return this; + } + public AdCreativeFeatureDetails getFieldFbStoryTag() { + return mFbStoryTag; + } + + public AdCreativeFeaturesSpec setFieldFbStoryTag(AdCreativeFeatureDetails value) { + this.mFbStoryTag = value; + return this; + } + + public AdCreativeFeaturesSpec setFieldFbStoryTag(String value) { + Type type = new TypeToken(){}.getType(); + this.mFbStoryTag = AdCreativeFeatureDetails.getGson().fromJson(value, type); + return this; + } public AdCreativeFeatureDetails getFieldFeedCaptionOptimization() { return mFeedCaptionOptimization; } @@ -466,6 +542,20 @@ public AdCreativeFeaturesSpec setFieldFeedCaptionOptimization(String value) { this.mFeedCaptionOptimization = AdCreativeFeatureDetails.getGson().fromJson(value, type); return this; } + public AdCreativeFeatureDetails getFieldIgFeedTag() { + return mIgFeedTag; + } + + public AdCreativeFeaturesSpec setFieldIgFeedTag(AdCreativeFeatureDetails value) { + this.mIgFeedTag = value; + return this; + } + + public AdCreativeFeaturesSpec setFieldIgFeedTag(String value) { + Type type = new TypeToken(){}.getType(); + this.mIgFeedTag = AdCreativeFeatureDetails.getGson().fromJson(value, type); + return this; + } public AdCreativeFeatureDetails getFieldIgGladosFeed() { return mIgGladosFeed; } @@ -480,6 +570,48 @@ public AdCreativeFeaturesSpec setFieldIgGladosFeed(String value) { this.mIgGladosFeed = AdCreativeFeatureDetails.getGson().fromJson(value, type); return this; } + public AdCreativeFeatureDetails getFieldIgReelsTag() { + return mIgReelsTag; + } + + public AdCreativeFeaturesSpec setFieldIgReelsTag(AdCreativeFeatureDetails value) { + this.mIgReelsTag = value; + return this; + } + + public AdCreativeFeaturesSpec setFieldIgReelsTag(String value) { + Type type = new TypeToken(){}.getType(); + this.mIgReelsTag = AdCreativeFeatureDetails.getGson().fromJson(value, type); + return this; + } + public AdCreativeFeatureDetails getFieldIgStreamTag() { + return mIgStreamTag; + } + + public AdCreativeFeaturesSpec setFieldIgStreamTag(AdCreativeFeatureDetails value) { + this.mIgStreamTag = value; + return this; + } + + public AdCreativeFeaturesSpec setFieldIgStreamTag(String value) { + Type type = new TypeToken(){}.getType(); + this.mIgStreamTag = AdCreativeFeatureDetails.getGson().fromJson(value, type); + return this; + } + public AdCreativeFeatureDetails getFieldImageAnimation() { + return mImageAnimation; + } + + public AdCreativeFeaturesSpec setFieldImageAnimation(AdCreativeFeatureDetails value) { + this.mImageAnimation = value; + return this; + } + + public AdCreativeFeaturesSpec setFieldImageAnimation(String value) { + Type type = new TypeToken(){}.getType(); + this.mImageAnimation = AdCreativeFeatureDetails.getGson().fromJson(value, type); + return this; + } public AdCreativeFeatureDetails getFieldImageAutoCrop() { return mImageAutoCrop; } @@ -648,6 +780,20 @@ public AdCreativeFeaturesSpec setFieldMediaTypeAutomation(String value) { this.mMediaTypeAutomation = AdCreativeFeatureDetails.getGson().fromJson(value, type); return this; } + public AdCreativeFeatureDetails getFieldPacRelaxation() { + return mPacRelaxation; + } + + public AdCreativeFeaturesSpec setFieldPacRelaxation(AdCreativeFeatureDetails value) { + this.mPacRelaxation = value; + return this; + } + + public AdCreativeFeaturesSpec setFieldPacRelaxation(String value) { + Type type = new TypeToken(){}.getType(); + this.mPacRelaxation = AdCreativeFeatureDetails.getGson().fromJson(value, type); + return this; + } public AdCreativeFeatureDetails getFieldProductExtensions() { return mProductExtensions; } @@ -816,6 +962,20 @@ public AdCreativeFeaturesSpec setFieldVideoHighlight(String value) { this.mVideoHighlight = AdCreativeFeatureDetails.getGson().fromJson(value, type); return this; } + public AdCreativeFeatureDetails getFieldVideoUncrop() { + return mVideoUncrop; + } + + public AdCreativeFeaturesSpec setFieldVideoUncrop(AdCreativeFeatureDetails value) { + this.mVideoUncrop = value; + return this; + } + + public AdCreativeFeaturesSpec setFieldVideoUncrop(String value) { + Type type = new TypeToken(){}.getType(); + this.mVideoUncrop = AdCreativeFeatureDetails.getGson().fromJson(value, type); + return this; + } @@ -845,9 +1005,17 @@ public AdCreativeFeaturesSpec copyFrom(AdCreativeFeaturesSpec instance) { this.mCvTransformation = instance.mCvTransformation; this.mDescriptionAutomation = instance.mDescriptionAutomation; this.mDhaOptimization = instance.mDhaOptimization; + this.mDynamicPartnerContent = instance.mDynamicPartnerContent; this.mEnhanceCta = instance.mEnhanceCta; + this.mFbFeedTag = instance.mFbFeedTag; + this.mFbReelsTag = instance.mFbReelsTag; + this.mFbStoryTag = instance.mFbStoryTag; this.mFeedCaptionOptimization = instance.mFeedCaptionOptimization; + this.mIgFeedTag = instance.mIgFeedTag; this.mIgGladosFeed = instance.mIgGladosFeed; + this.mIgReelsTag = instance.mIgReelsTag; + this.mIgStreamTag = instance.mIgStreamTag; + this.mImageAnimation = instance.mImageAnimation; this.mImageAutoCrop = instance.mImageAutoCrop; this.mImageBackgroundGen = instance.mImageBackgroundGen; this.mImageBrightnessAndContrast = instance.mImageBrightnessAndContrast; @@ -860,6 +1028,7 @@ public AdCreativeFeaturesSpec copyFrom(AdCreativeFeaturesSpec instance) { this.mMediaLiquidityAnimatedImage = instance.mMediaLiquidityAnimatedImage; this.mMediaOrder = instance.mMediaOrder; this.mMediaTypeAutomation = instance.mMediaTypeAutomation; + this.mPacRelaxation = instance.mPacRelaxation; this.mProductExtensions = instance.mProductExtensions; this.mProductMetadataAutomation = instance.mProductMetadataAutomation; this.mProductTags = instance.mProductTags; @@ -872,6 +1041,7 @@ public AdCreativeFeaturesSpec copyFrom(AdCreativeFeaturesSpec instance) { this.mVideoAutoCrop = instance.mVideoAutoCrop; this.mVideoFiltering = instance.mVideoFiltering; this.mVideoHighlight = instance.mVideoHighlight; + this.mVideoUncrop = instance.mVideoUncrop; this.context = instance.context; this.rawValue = instance.rawValue; return this; diff --git a/src/main/java/com/facebook/ads/sdk/AdCreativeObjectStorySpec.java b/src/main/java/com/facebook/ads/sdk/AdCreativeObjectStorySpec.java index 833bcb38..58d07e52 100644 --- a/src/main/java/com/facebook/ads/sdk/AdCreativeObjectStorySpec.java +++ b/src/main/java/com/facebook/ads/sdk/AdCreativeObjectStorySpec.java @@ -49,12 +49,14 @@ public class AdCreativeObjectStorySpec extends APINode { private String mPageId = null; @SerializedName("photo_data") private AdCreativePhotoData mPhotoData = null; + @SerializedName("product_data") + private List mProductData = null; @SerializedName("template_data") private AdCreativeLinkData mTemplateData = null; @SerializedName("text_data") private AdCreativeTextData mTextData = null; - @SerializedName("threads_actor_id") - private String mThreadsActorId = null; + @SerializedName("threads_user_id") + private String mThreadsUserId = null; @SerializedName("video_data") private AdCreativeVideoData mVideoData = null; protected static Gson gson = null; @@ -254,6 +256,20 @@ public AdCreativeObjectStorySpec setFieldPhotoData(String value) { this.mPhotoData = AdCreativePhotoData.getGson().fromJson(value, type); return this; } + public List getFieldProductData() { + return mProductData; + } + + public AdCreativeObjectStorySpec setFieldProductData(List value) { + this.mProductData = value; + return this; + } + + public AdCreativeObjectStorySpec setFieldProductData(String value) { + Type type = new TypeToken>(){}.getType(); + this.mProductData = AdCreativeProductData.getGson().fromJson(value, type); + return this; + } public AdCreativeLinkData getFieldTemplateData() { return mTemplateData; } @@ -282,12 +298,12 @@ public AdCreativeObjectStorySpec setFieldTextData(String value) { this.mTextData = AdCreativeTextData.getGson().fromJson(value, type); return this; } - public String getFieldThreadsActorId() { - return mThreadsActorId; + public String getFieldThreadsUserId() { + return mThreadsUserId; } - public AdCreativeObjectStorySpec setFieldThreadsActorId(String value) { - this.mThreadsActorId = value; + public AdCreativeObjectStorySpec setFieldThreadsUserId(String value) { + this.mThreadsUserId = value; return this; } @@ -326,9 +342,10 @@ public AdCreativeObjectStorySpec copyFrom(AdCreativeObjectStorySpec instance) { this.mLinkData = instance.mLinkData; this.mPageId = instance.mPageId; this.mPhotoData = instance.mPhotoData; + this.mProductData = instance.mProductData; this.mTemplateData = instance.mTemplateData; this.mTextData = instance.mTextData; - this.mThreadsActorId = instance.mThreadsActorId; + this.mThreadsUserId = instance.mThreadsUserId; this.mVideoData = instance.mVideoData; this.context = instance.context; this.rawValue = instance.rawValue; diff --git a/src/main/java/com/facebook/ads/sdk/AdCreativeProductData.java b/src/main/java/com/facebook/ads/sdk/AdCreativeProductData.java new file mode 100644 index 00000000..e7f3f343 --- /dev/null +++ b/src/main/java/com/facebook/ads/sdk/AdCreativeProductData.java @@ -0,0 +1,248 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under the license found in the + * LICENSE file in the root directory of this source tree. + */ + +package com.facebook.ads.sdk; + +import java.io.File; +import java.lang.reflect.Modifier; +import java.lang.reflect.Type; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.common.base.Function; +import com.google.common.util.concurrent.Futures; +import com.google.common.util.concurrent.ListenableFuture; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.common.util.concurrent.SettableFuture; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; +import com.google.gson.JsonParser; + +import com.facebook.ads.sdk.APIException.MalformedResponseException; + +/** + * This class is auto-generated. + * + * For any issues or feature requests related to this class, please let us know + * on github and we'll fix in our codegen framework. We'll not be able to accept + * pull request for this class. + * + */ +public class AdCreativeProductData extends APINode { + @SerializedName("product_id") + private String mProductId = null; + @SerializedName("product_source") + private String mProductSource = null; + protected static Gson gson = null; + + public AdCreativeProductData() { + } + + public String getId() { + return null; + } + public static AdCreativeProductData loadJSON(String json, APIContext context, String header) { + AdCreativeProductData adCreativeProductData = getGson().fromJson(json, AdCreativeProductData.class); + if (context.isDebug()) { + JsonParser parser = new JsonParser(); + JsonElement o1 = parser.parse(json); + JsonElement o2 = parser.parse(adCreativeProductData.toString()); + if (o1.getAsJsonObject().get("__fb_trace_id__") != null) { + o2.getAsJsonObject().add("__fb_trace_id__", o1.getAsJsonObject().get("__fb_trace_id__")); + } + if (!o1.equals(o2)) { + context.log("[Warning] When parsing response, object is not consistent with JSON:"); + context.log("[JSON]" + o1); + context.log("[Object]" + o2); + } + } + adCreativeProductData.context = context; + adCreativeProductData.rawValue = json; + adCreativeProductData.header = header; + return adCreativeProductData; + } + + public static APINodeList parseResponse(String json, APIContext context, APIRequest request, String header) throws MalformedResponseException { + APINodeList adCreativeProductDatas = new APINodeList(request, json, header); + JsonArray arr; + JsonObject obj; + JsonParser parser = new JsonParser(); + Exception exception = null; + try{ + JsonElement result = parser.parse(json); + if (result.isJsonArray()) { + // First, check if it's a pure JSON Array + arr = result.getAsJsonArray(); + for (int i = 0; i < arr.size(); i++) { + adCreativeProductDatas.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header)); + }; + return adCreativeProductDatas; + } else if (result.isJsonObject()) { + obj = result.getAsJsonObject(); + if (obj.has("data")) { + if (obj.has("paging")) { + JsonObject paging = obj.get("paging").getAsJsonObject(); + if (paging.has("cursors")) { + JsonObject cursors = paging.get("cursors").getAsJsonObject(); + String before = cursors.has("before") ? cursors.get("before").getAsString() : null; + String after = cursors.has("after") ? cursors.get("after").getAsString() : null; + adCreativeProductDatas.setCursors(before, after); + } + String previous = paging.has("previous") ? paging.get("previous").getAsString() : null; + String next = paging.has("next") ? paging.get("next").getAsString() : null; + adCreativeProductDatas.setPaging(previous, next); + if (context.hasAppSecret()) { + adCreativeProductDatas.setAppSecret(context.getAppSecretProof()); + } + } + if (obj.get("data").isJsonArray()) { + // Second, check if it's a JSON array with "data" + arr = obj.get("data").getAsJsonArray(); + for (int i = 0; i < arr.size(); i++) { + adCreativeProductDatas.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header)); + }; + } else if (obj.get("data").isJsonObject()) { + // Third, check if it's a JSON object with "data" + obj = obj.get("data").getAsJsonObject(); + boolean isRedownload = false; + for (String s : new String[]{"campaigns", "adsets", "ads"}) { + if (obj.has(s)) { + isRedownload = true; + obj = obj.getAsJsonObject(s); + for (Map.Entry entry : obj.entrySet()) { + adCreativeProductDatas.add(loadJSON(entry.getValue().toString(), context, header)); + } + break; + } + } + if (!isRedownload) { + adCreativeProductDatas.add(loadJSON(obj.toString(), context, header)); + } + } + return adCreativeProductDatas; + } else if (obj.has("images")) { + // Fourth, check if it's a map of image objects + obj = obj.get("images").getAsJsonObject(); + for (Map.Entry entry : obj.entrySet()) { + adCreativeProductDatas.add(loadJSON(entry.getValue().toString(), context, header)); + } + return adCreativeProductDatas; + } else { + // Fifth, check if it's an array of objects indexed by id + boolean isIdIndexedArray = true; + for (Map.Entry entry : obj.entrySet()) { + String key = (String) entry.getKey(); + if (key.equals("__fb_trace_id__")) { + continue; + } + JsonElement value = (JsonElement) entry.getValue(); + if ( + value != null && + value.isJsonObject() && + value.getAsJsonObject().has("id") && + value.getAsJsonObject().get("id") != null && + value.getAsJsonObject().get("id").getAsString().equals(key) + ) { + adCreativeProductDatas.add(loadJSON(value.toString(), context, header)); + } else { + isIdIndexedArray = false; + break; + } + } + if (isIdIndexedArray) { + return adCreativeProductDatas; + } + + // Sixth, check if it's pure JsonObject + adCreativeProductDatas.clear(); + adCreativeProductDatas.add(loadJSON(json, context, header)); + return adCreativeProductDatas; + } + } + } catch (Exception e) { + exception = e; + } + throw new MalformedResponseException( + "Invalid response string: " + json, + exception + ); + } + + @Override + public APIContext getContext() { + return context; + } + + @Override + public void setContext(APIContext context) { + this.context = context; + } + + @Override + public String toString() { + return getGson().toJson(this); + } + + + public String getFieldProductId() { + return mProductId; + } + + public AdCreativeProductData setFieldProductId(String value) { + this.mProductId = value; + return this; + } + + public String getFieldProductSource() { + return mProductSource; + } + + public AdCreativeProductData setFieldProductSource(String value) { + this.mProductSource = value; + return this; + } + + + + + synchronized /*package*/ static Gson getGson() { + if (gson != null) { + return gson; + } else { + gson = new GsonBuilder() + .excludeFieldsWithModifiers(Modifier.STATIC) + .excludeFieldsWithModifiers(Modifier.PROTECTED) + .disableHtmlEscaping() + .create(); + } + return gson; + } + + public AdCreativeProductData copyFrom(AdCreativeProductData instance) { + this.mProductId = instance.mProductId; + this.mProductSource = instance.mProductSource; + this.context = instance.context; + this.rawValue = instance.rawValue; + return this; + } + + public static APIRequest.ResponseParser getParser() { + return new APIRequest.ResponseParser() { + public APINodeList parseResponse(String response, APIContext context, APIRequest request, String header) throws MalformedResponseException { + return AdCreativeProductData.parseResponse(response, context, request, header); + } + }; + } +} diff --git a/src/main/java/com/facebook/ads/sdk/AdLabel.java b/src/main/java/com/facebook/ads/sdk/AdLabel.java index 7162ca98..221e9387 100644 --- a/src/main/java/com/facebook/ads/sdk/AdLabel.java +++ b/src/main/java/com/facebook/ads/sdk/AdLabel.java @@ -366,6 +366,7 @@ public APINodeList getLastResponse() { "link_destination_display_url", "link_og_id", "link_url", + "messenger_sponsored_message", "name", "object_id", "object_store_url", @@ -771,6 +772,13 @@ public APIRequestGetAdCreatives requestLinkUrlField (boolean value) { this.requestField("link_url", value); return this; } + public APIRequestGetAdCreatives requestMessengerSponsoredMessageField () { + return this.requestMessengerSponsoredMessageField(true); + } + public APIRequestGetAdCreatives requestMessengerSponsoredMessageField (boolean value) { + this.requestField("messenger_sponsored_message", value); + return this; + } public APIRequestGetAdCreatives requestNameField () { return this.requestNameField(true); } @@ -994,6 +1002,7 @@ public APINodeList getLastResponse() { "issues_info", "last_updated_by_app_id", "name", + "placement", "preview_shareable_link", "priority", "recommendations", @@ -1292,6 +1301,13 @@ public APIRequestGetAds requestNameField (boolean value) { this.requestField("name", value); return this; } + public APIRequestGetAds requestPlacementField () { + return this.requestPlacementField(true); + } + public APIRequestGetAds requestPlacementField (boolean value) { + this.requestField("placement", value); + return this; + } public APIRequestGetAds requestPreviewShareableLinkField () { return this.requestPreviewShareableLinkField(true); } @@ -1416,6 +1432,8 @@ public APINodeList getLastResponse() { "lifetime_imps", "lifetime_min_spend_target", "lifetime_spend_cap", + "max_budget_spend_percentage", + "min_budget_spend_percentage", "multi_optimization_goal_weight", "name", "optimization_goal", @@ -1817,6 +1835,20 @@ public APIRequestGetAdSets requestLifetimeSpendCapField (boolean value) { this.requestField("lifetime_spend_cap", value); return this; } + public APIRequestGetAdSets requestMaxBudgetSpendPercentageField () { + return this.requestMaxBudgetSpendPercentageField(true); + } + public APIRequestGetAdSets requestMaxBudgetSpendPercentageField (boolean value) { + this.requestField("max_budget_spend_percentage", value); + return this; + } + public APIRequestGetAdSets requestMinBudgetSpendPercentageField () { + return this.requestMinBudgetSpendPercentageField(true); + } + public APIRequestGetAdSets requestMinBudgetSpendPercentageField (boolean value) { + this.requestField("min_budget_spend_percentage", value); + return this; + } public APIRequestGetAdSets requestMultiOptimizationGoalWeightField () { return this.requestMultiOptimizationGoalWeightField(true); } diff --git a/src/main/java/com/facebook/ads/sdk/AdPreview.java b/src/main/java/com/facebook/ads/sdk/AdPreview.java index e756079b..48f6f570 100644 --- a/src/main/java/com/facebook/ads/sdk/AdPreview.java +++ b/src/main/java/com/facebook/ads/sdk/AdPreview.java @@ -297,6 +297,8 @@ public static enum EnumAdFormat { VALUE_INSTREAM_BANNER_MOBILE("INSTREAM_BANNER_MOBILE"), @SerializedName("INSTREAM_VIDEO_DESKTOP") VALUE_INSTREAM_VIDEO_DESKTOP("INSTREAM_VIDEO_DESKTOP"), + @SerializedName("INSTREAM_VIDEO_FULLSCREEN_IOS") + VALUE_INSTREAM_VIDEO_FULLSCREEN_IOS("INSTREAM_VIDEO_FULLSCREEN_IOS"), @SerializedName("INSTREAM_VIDEO_FULLSCREEN_MOBILE") VALUE_INSTREAM_VIDEO_FULLSCREEN_MOBILE("INSTREAM_VIDEO_FULLSCREEN_MOBILE"), @SerializedName("INSTREAM_VIDEO_IMAGE") diff --git a/src/main/java/com/facebook/ads/sdk/AdPromotedObject.java b/src/main/java/com/facebook/ads/sdk/AdPromotedObject.java index eafa3a0f..6eba800d 100644 --- a/src/main/java/com/facebook/ads/sdk/AdPromotedObject.java +++ b/src/main/java/com/facebook/ads/sdk/AdPromotedObject.java @@ -57,6 +57,8 @@ public class AdPromotedObject extends APINode { private String mEventId = null; @SerializedName("fundraiser_campaign_id") private String mFundraiserCampaignId = null; + @SerializedName("lead_ads_form_event_source_type") + private String mLeadAdsFormEventSourceType = null; @SerializedName("mcme_conversion_id") private String mMcmeConversionId = null; @SerializedName("object_store_url") @@ -91,6 +93,10 @@ public class AdPromotedObject extends APINode { private String mProductSetId = null; @SerializedName("retention_days") private String mRetentionDays = null; + @SerializedName("value_semantic_type") + private String mValueSemanticType = null; + @SerializedName("variation") + private String mVariation = null; @SerializedName("whatsapp_phone_number") private String mWhatsappPhoneNumber = null; protected static Gson gson = null; @@ -316,6 +322,15 @@ public AdPromotedObject setFieldFundraiserCampaignId(String value) { return this; } + public String getFieldLeadAdsFormEventSourceType() { + return mLeadAdsFormEventSourceType; + } + + public AdPromotedObject setFieldLeadAdsFormEventSourceType(String value) { + this.mLeadAdsFormEventSourceType = value; + return this; + } + public String getFieldMcmeConversionId() { return mMcmeConversionId; } @@ -485,6 +500,24 @@ public AdPromotedObject setFieldRetentionDays(String value) { return this; } + public String getFieldValueSemanticType() { + return mValueSemanticType; + } + + public AdPromotedObject setFieldValueSemanticType(String value) { + this.mValueSemanticType = value; + return this; + } + + public String getFieldVariation() { + return mVariation; + } + + public AdPromotedObject setFieldVariation(String value) { + this.mVariation = value; + return this; + } + public String getFieldWhatsappPhoneNumber() { return mWhatsappPhoneNumber; } @@ -592,6 +625,7 @@ public AdPromotedObject copyFrom(AdPromotedObject instance) { this.mCustomEventType = instance.mCustomEventType; this.mEventId = instance.mEventId; this.mFundraiserCampaignId = instance.mFundraiserCampaignId; + this.mLeadAdsFormEventSourceType = instance.mLeadAdsFormEventSourceType; this.mMcmeConversionId = instance.mMcmeConversionId; this.mObjectStoreUrl = instance.mObjectStoreUrl; this.mOfferId = instance.mOfferId; @@ -609,6 +643,8 @@ public AdPromotedObject copyFrom(AdPromotedObject instance) { this.mProductSet = instance.mProductSet; this.mProductSetId = instance.mProductSetId; this.mRetentionDays = instance.mRetentionDays; + this.mValueSemanticType = instance.mValueSemanticType; + this.mVariation = instance.mVariation; this.mWhatsappPhoneNumber = instance.mWhatsappPhoneNumber; this.context = instance.context; this.rawValue = instance.rawValue; diff --git a/src/main/java/com/facebook/ads/sdk/AdReportRun.java b/src/main/java/com/facebook/ads/sdk/AdReportRun.java index ff2b8811..ffc0da6c 100644 --- a/src/main/java/com/facebook/ads/sdk/AdReportRun.java +++ b/src/main/java/com/facebook/ads/sdk/AdReportRun.java @@ -377,6 +377,7 @@ public APINodeList getLastResponse() { "auction_bid", "auction_competitiveness", "auction_max_competitor_bid", + "average_purchases_conversion_value", "buying_type", "campaign_id", "campaign_name", @@ -441,9 +442,6 @@ public APINodeList getLastResponse() { "instant_experience_outbound_clicks", "interactive_component_tap", "labels", - "landing_page_view_actions_per_link_click", - "landing_page_view_per_purchase_rate", - "link_clicks_per_results", "location", "marketing_messages_cost_per_delivered", "marketing_messages_cost_per_link_btn_click", @@ -457,7 +455,6 @@ public APINodeList getLastResponse() { "outbound_clicks_ctr", "place_page_name", "purchase_roas", - "purchases_per_link_click", "qualifying_question_qualify_answer_rate", "quality_ranking", "reach", @@ -716,6 +713,13 @@ public APIRequestGetInsights requestAuctionMaxCompetitorBidField (boolean value) this.requestField("auction_max_competitor_bid", value); return this; } + public APIRequestGetInsights requestAveragePurchasesConversionValueField () { + return this.requestAveragePurchasesConversionValueField(true); + } + public APIRequestGetInsights requestAveragePurchasesConversionValueField (boolean value) { + this.requestField("average_purchases_conversion_value", value); + return this; + } public APIRequestGetInsights requestBuyingTypeField () { return this.requestBuyingTypeField(true); } @@ -1164,27 +1168,6 @@ public APIRequestGetInsights requestLabelsField (boolean value) { this.requestField("labels", value); return this; } - public APIRequestGetInsights requestLandingPageViewActionsPerLinkClickField () { - return this.requestLandingPageViewActionsPerLinkClickField(true); - } - public APIRequestGetInsights requestLandingPageViewActionsPerLinkClickField (boolean value) { - this.requestField("landing_page_view_actions_per_link_click", value); - return this; - } - public APIRequestGetInsights requestLandingPageViewPerPurchaseRateField () { - return this.requestLandingPageViewPerPurchaseRateField(true); - } - public APIRequestGetInsights requestLandingPageViewPerPurchaseRateField (boolean value) { - this.requestField("landing_page_view_per_purchase_rate", value); - return this; - } - public APIRequestGetInsights requestLinkClicksPerResultsField () { - return this.requestLinkClicksPerResultsField(true); - } - public APIRequestGetInsights requestLinkClicksPerResultsField (boolean value) { - this.requestField("link_clicks_per_results", value); - return this; - } public APIRequestGetInsights requestLocationField () { return this.requestLocationField(true); } @@ -1276,13 +1259,6 @@ public APIRequestGetInsights requestPurchaseRoasField (boolean value) { this.requestField("purchase_roas", value); return this; } - public APIRequestGetInsights requestPurchasesPerLinkClickField () { - return this.requestPurchasesPerLinkClickField(true); - } - public APIRequestGetInsights requestPurchasesPerLinkClickField (boolean value) { - this.requestField("purchases_per_link_click", value); - return this; - } public APIRequestGetInsights requestQualifyingQuestionQualifyAnswerRateField () { return this.requestQualifyingQuestionQualifyAnswerRateField(true); } @@ -1894,6 +1870,8 @@ public static enum EnumBreakdowns { VALUE_APP_ID("app_id"), @SerializedName("body_asset") VALUE_BODY_ASSET("body_asset"), + @SerializedName("breakdown_reporting_ad_id") + VALUE_BREAKDOWN_REPORTING_AD_ID("breakdown_reporting_ad_id"), @SerializedName("call_to_action_asset") VALUE_CALL_TO_ACTION_ASSET("call_to_action_asset"), @SerializedName("coarse_conversion_value") @@ -1948,6 +1926,8 @@ public static enum EnumBreakdowns { VALUE_MEDIA_ORIGIN_URL("media_origin_url"), @SerializedName("media_text_content") VALUE_MEDIA_TEXT_CONTENT("media_text_content"), + @SerializedName("media_type") + VALUE_MEDIA_TYPE("media_type"), @SerializedName("mmm") VALUE_MMM("mmm"), @SerializedName("place_page_id") diff --git a/src/main/java/com/facebook/ads/sdk/AdRule.java b/src/main/java/com/facebook/ads/sdk/AdRule.java index 96131b91..62dd6168 100644 --- a/src/main/java/com/facebook/ads/sdk/AdRule.java +++ b/src/main/java/com/facebook/ads/sdk/AdRule.java @@ -47,6 +47,8 @@ public class AdRule extends APINode { private User mCreatedBy = null; @SerializedName("created_time") private String mCreatedTime = null; + @SerializedName("disable_error_code") + private Long mDisableErrorCode = null; @SerializedName("evaluation_spec") private AdRuleEvaluationSpec mEvaluationSpec = null; @SerializedName("execution_spec") @@ -310,6 +312,10 @@ public String getFieldCreatedTime() { return mCreatedTime; } + public Long getFieldDisableErrorCode() { + return mDisableErrorCode; + } + public AdRuleEvaluationSpec getFieldEvaluationSpec() { if (mEvaluationSpec != null) { mEvaluationSpec.context = getContext(); @@ -870,6 +876,7 @@ public AdRule getLastResponse() { "account_id", "created_by", "created_time", + "disable_error_code", "evaluation_spec", "execution_spec", "id", @@ -990,6 +997,13 @@ public APIRequestGet requestCreatedTimeField (boolean value) { this.requestField("created_time", value); return this; } + public APIRequestGet requestDisableErrorCodeField () { + return this.requestDisableErrorCodeField(true); + } + public APIRequestGet requestDisableErrorCodeField (boolean value) { + this.requestField("disable_error_code", value); + return this; + } public APIRequestGet requestEvaluationSpecField () { return this.requestEvaluationSpecField(true); } @@ -1306,6 +1320,7 @@ public AdRule copyFrom(AdRule instance) { this.mAccountId = instance.mAccountId; this.mCreatedBy = instance.mCreatedBy; this.mCreatedTime = instance.mCreatedTime; + this.mDisableErrorCode = instance.mDisableErrorCode; this.mEvaluationSpec = instance.mEvaluationSpec; this.mExecutionSpec = instance.mExecutionSpec; this.mId = instance.mId; diff --git a/src/main/java/com/facebook/ads/sdk/AdRuleHistory.java b/src/main/java/com/facebook/ads/sdk/AdRuleHistory.java index bf98962d..2936729c 100644 --- a/src/main/java/com/facebook/ads/sdk/AdRuleHistory.java +++ b/src/main/java/com/facebook/ads/sdk/AdRuleHistory.java @@ -315,6 +315,10 @@ public static enum EnumAction { VALUE_CHANGED_BID("CHANGED_BID"), @SerializedName("CHANGED_BUDGET") VALUE_CHANGED_BUDGET("CHANGED_BUDGET"), + @SerializedName("CONSOLIDATE_ASC_FRAGMENTATION") + VALUE_CONSOLIDATE_ASC_FRAGMENTATION("CONSOLIDATE_ASC_FRAGMENTATION"), + @SerializedName("CONVERT_ASC_CP_SINGLE_INSTANCE") + VALUE_CONVERT_ASC_CP_SINGLE_INSTANCE("CONVERT_ASC_CP_SINGLE_INSTANCE"), @SerializedName("EMAIL") VALUE_EMAIL("EMAIL"), @SerializedName("ENABLE_ADVANTAGE_CAMPAIGN_BUDGET") @@ -327,8 +331,12 @@ public static enum EnumAction { VALUE_ENABLE_AUTOFLOW("ENABLE_AUTOFLOW"), @SerializedName("ENABLE_GEN_UNCROP") VALUE_ENABLE_GEN_UNCROP("ENABLE_GEN_UNCROP"), + @SerializedName("ENABLE_LANDING_PAGE_VIEWS") + VALUE_ENABLE_LANDING_PAGE_VIEWS("ENABLE_LANDING_PAGE_VIEWS"), @SerializedName("ENABLE_MUSIC") VALUE_ENABLE_MUSIC("ENABLE_MUSIC"), + @SerializedName("ENABLE_REELS_PLACEMENTS") + VALUE_ENABLE_REELS_PLACEMENTS("ENABLE_REELS_PLACEMENTS"), @SerializedName("ENABLE_SEMANTIC_BASED_AUDIENCE_EXPANSION") VALUE_ENABLE_SEMANTIC_BASED_AUDIENCE_EXPANSION("ENABLE_SEMANTIC_BASED_AUDIENCE_EXPANSION"), @SerializedName("ENABLE_SHOPS_ADS") diff --git a/src/main/java/com/facebook/ads/sdk/AdSet.java b/src/main/java/com/facebook/ads/sdk/AdSet.java index b8d31520..03e527ab 100644 --- a/src/main/java/com/facebook/ads/sdk/AdSet.java +++ b/src/main/java/com/facebook/ads/sdk/AdSet.java @@ -123,6 +123,10 @@ public class AdSet extends APINode { private String mLifetimeMinSpendTarget = null; @SerializedName("lifetime_spend_cap") private String mLifetimeSpendCap = null; + @SerializedName("max_budget_spend_percentage") + private String mMaxBudgetSpendPercentage = null; + @SerializedName("min_budget_spend_percentage") + private String mMinBudgetSpendPercentage = null; @SerializedName("multi_optimization_goal_weight") private String mMultiOptimizationGoalWeight = null; @SerializedName("name") @@ -875,6 +879,24 @@ public AdSet setFieldLifetimeSpendCap(String value) { return this; } + public String getFieldMaxBudgetSpendPercentage() { + return mMaxBudgetSpendPercentage; + } + + public AdSet setFieldMaxBudgetSpendPercentage(String value) { + this.mMaxBudgetSpendPercentage = value; + return this; + } + + public String getFieldMinBudgetSpendPercentage() { + return mMinBudgetSpendPercentage; + } + + public AdSet setFieldMinBudgetSpendPercentage(String value) { + this.mMinBudgetSpendPercentage = value; + return this; + } + public String getFieldMultiOptimizationGoalWeight() { return mMultiOptimizationGoalWeight; } @@ -1659,6 +1681,7 @@ public APINodeList getLastResponse() { "link_destination_display_url", "link_og_id", "link_url", + "messenger_sponsored_message", "name", "object_id", "object_store_url", @@ -2064,6 +2087,13 @@ public APIRequestGetAdCreatives requestLinkUrlField (boolean value) { this.requestField("link_url", value); return this; } + public APIRequestGetAdCreatives requestMessengerSponsoredMessageField () { + return this.requestMessengerSponsoredMessageField(true); + } + public APIRequestGetAdCreatives requestMessengerSponsoredMessageField (boolean value) { + this.requestField("messenger_sponsored_message", value); + return this; + } public APIRequestGetAdCreatives requestNameField () { return this.requestNameField(true); } @@ -2513,6 +2543,7 @@ public APINodeList getLastResponse() { "account_id", "created_by", "created_time", + "disable_error_code", "evaluation_spec", "execution_spec", "id", @@ -2642,6 +2673,13 @@ public APIRequestGetAdRulesGoverned requestCreatedTimeField (boolean value) { this.requestField("created_time", value); return this; } + public APIRequestGetAdRulesGoverned requestDisableErrorCodeField () { + return this.requestDisableErrorCodeField(true); + } + public APIRequestGetAdRulesGoverned requestDisableErrorCodeField (boolean value) { + this.requestField("disable_error_code", value); + return this; + } public APIRequestGetAdRulesGoverned requestEvaluationSpecField () { return this.requestEvaluationSpecField(true); } @@ -2736,6 +2774,7 @@ public APINodeList getLastResponse() { "issues_info", "last_updated_by_app_id", "name", + "placement", "preview_shareable_link", "priority", "recommendations", @@ -3070,6 +3109,13 @@ public APIRequestGetAds requestNameField (boolean value) { this.requestField("name", value); return this; } + public APIRequestGetAds requestPlacementField () { + return this.requestPlacementField(true); + } + public APIRequestGetAds requestPlacementField (boolean value) { + this.requestField("placement", value); + return this; + } public APIRequestGetAds requestPreviewShareableLinkField () { return this.requestPreviewShareableLinkField(true); } @@ -3530,6 +3576,8 @@ public APINodeList getLastResponse() { "lifetime_imps", "lifetime_min_spend_target", "lifetime_spend_cap", + "max_budget_spend_percentage", + "min_budget_spend_percentage", "multi_optimization_goal_weight", "name", "optimization_goal", @@ -3967,6 +4015,20 @@ public APIRequestGetCopies requestLifetimeSpendCapField (boolean value) { this.requestField("lifetime_spend_cap", value); return this; } + public APIRequestGetCopies requestMaxBudgetSpendPercentageField () { + return this.requestMaxBudgetSpendPercentageField(true); + } + public APIRequestGetCopies requestMaxBudgetSpendPercentageField (boolean value) { + this.requestField("max_budget_spend_percentage", value); + return this; + } + public APIRequestGetCopies requestMinBudgetSpendPercentageField () { + return this.requestMinBudgetSpendPercentageField(true); + } + public APIRequestGetCopies requestMinBudgetSpendPercentageField (boolean value) { + this.requestField("min_budget_spend_percentage", value); + return this; + } public APIRequestGetCopies requestMultiOptimizationGoalWeightField () { return this.requestMultiOptimizationGoalWeightField(true); } @@ -5612,6 +5674,8 @@ public AdSet getLastResponse() { "lifetime_imps", "lifetime_min_spend_target", "lifetime_spend_cap", + "max_budget_spend_percentage", + "min_budget_spend_percentage", "multi_optimization_goal_weight", "name", "optimization_goal", @@ -6049,6 +6113,20 @@ public APIRequestGet requestLifetimeSpendCapField (boolean value) { this.requestField("lifetime_spend_cap", value); return this; } + public APIRequestGet requestMaxBudgetSpendPercentageField () { + return this.requestMaxBudgetSpendPercentageField(true); + } + public APIRequestGet requestMaxBudgetSpendPercentageField (boolean value) { + this.requestField("max_budget_spend_percentage", value); + return this; + } + public APIRequestGet requestMinBudgetSpendPercentageField () { + return this.requestMinBudgetSpendPercentageField(true); + } + public APIRequestGet requestMinBudgetSpendPercentageField (boolean value) { + this.requestField("min_budget_spend_percentage", value); + return this; + } public APIRequestGet requestMultiOptimizationGoalWeightField () { return this.requestMultiOptimizationGoalWeightField(true); } @@ -6241,6 +6319,8 @@ public AdSet getLastResponse() { "lifetime_imps", "lifetime_min_spend_target", "lifetime_spend_cap", + "max_budget_spend_percentage", + "min_budget_spend_percentage", "multi_optimization_goal_weight", "name", "optimization_goal", @@ -6550,6 +6630,24 @@ public APIRequestUpdate setLifetimeSpendCap (String lifetimeSpendCap) { return this; } + public APIRequestUpdate setMaxBudgetSpendPercentage (Long maxBudgetSpendPercentage) { + this.setParam("max_budget_spend_percentage", maxBudgetSpendPercentage); + return this; + } + public APIRequestUpdate setMaxBudgetSpendPercentage (String maxBudgetSpendPercentage) { + this.setParam("max_budget_spend_percentage", maxBudgetSpendPercentage); + return this; + } + + public APIRequestUpdate setMinBudgetSpendPercentage (Long minBudgetSpendPercentage) { + this.setParam("min_budget_spend_percentage", minBudgetSpendPercentage); + return this; + } + public APIRequestUpdate setMinBudgetSpendPercentage (String minBudgetSpendPercentage) { + this.setParam("min_budget_spend_percentage", minBudgetSpendPercentage); + return this; + } + public APIRequestUpdate setMultiOptimizationGoalWeight (AdSet.EnumMultiOptimizationGoalWeight multiOptimizationGoalWeight) { this.setParam("multi_optimization_goal_weight", multiOptimizationGoalWeight); return this; @@ -7145,6 +7243,8 @@ public static enum EnumRegionalRegulatedCategories { VALUE_0("0"), @SerializedName("1") VALUE_1("1"), + @SerializedName("2") + VALUE_2("2"), ; private String value; @@ -7164,6 +7264,8 @@ public static enum EnumTuneForCategory { VALUE_CREDIT("CREDIT"), @SerializedName("EMPLOYMENT") VALUE_EMPLOYMENT("EMPLOYMENT"), + @SerializedName("FINANCIAL_PRODUCTS_SERVICES") + VALUE_FINANCIAL_PRODUCTS_SERVICES("FINANCIAL_PRODUCTS_SERVICES"), @SerializedName("HOUSING") VALUE_HOUSING("HOUSING"), @SerializedName("ISSUES_ELECTIONS_POLITICS") @@ -7282,6 +7384,8 @@ public AdSet copyFrom(AdSet instance) { this.mLifetimeImps = instance.mLifetimeImps; this.mLifetimeMinSpendTarget = instance.mLifetimeMinSpendTarget; this.mLifetimeSpendCap = instance.mLifetimeSpendCap; + this.mMaxBudgetSpendPercentage = instance.mMaxBudgetSpendPercentage; + this.mMinBudgetSpendPercentage = instance.mMinBudgetSpendPercentage; this.mMultiOptimizationGoalWeight = instance.mMultiOptimizationGoalWeight; this.mName = instance.mName; this.mOptimizationGoal = instance.mOptimizationGoal; diff --git a/src/main/java/com/facebook/ads/sdk/AdStudyCell.java b/src/main/java/com/facebook/ads/sdk/AdStudyCell.java index 383fe87c..f7ad03b0 100644 --- a/src/main/java/com/facebook/ads/sdk/AdStudyCell.java +++ b/src/main/java/com/facebook/ads/sdk/AdStudyCell.java @@ -1020,6 +1020,8 @@ public APINodeList getLastResponse() { "lifetime_imps", "lifetime_min_spend_target", "lifetime_spend_cap", + "max_budget_spend_percentage", + "min_budget_spend_percentage", "multi_optimization_goal_weight", "name", "optimization_goal", @@ -1421,6 +1423,20 @@ public APIRequestGetAdSets requestLifetimeSpendCapField (boolean value) { this.requestField("lifetime_spend_cap", value); return this; } + public APIRequestGetAdSets requestMaxBudgetSpendPercentageField () { + return this.requestMaxBudgetSpendPercentageField(true); + } + public APIRequestGetAdSets requestMaxBudgetSpendPercentageField (boolean value) { + this.requestField("max_budget_spend_percentage", value); + return this; + } + public APIRequestGetAdSets requestMinBudgetSpendPercentageField () { + return this.requestMinBudgetSpendPercentageField(true); + } + public APIRequestGetAdSets requestMinBudgetSpendPercentageField (boolean value) { + this.requestField("min_budget_spend_percentage", value); + return this; + } public APIRequestGetAdSets requestMultiOptimizationGoalWeightField () { return this.requestMultiOptimizationGoalWeightField(true); } diff --git a/src/main/java/com/facebook/ads/sdk/AdVideo.java b/src/main/java/com/facebook/ads/sdk/AdVideo.java index d2487683..17b1fef2 100644 --- a/src/main/java/com/facebook/ads/sdk/AdVideo.java +++ b/src/main/java/com/facebook/ads/sdk/AdVideo.java @@ -6452,10 +6452,6 @@ public APIRequestUpdate setContentTags (String contentTags) { return this; } - public APIRequestUpdate setCustomLabels (List customLabels) { - this.setParam("custom_labels", customLabels); - return this; - } public APIRequestUpdate setCustomLabels (String customLabels) { this.setParam("custom_labels", customLabels); return this; diff --git a/src/main/java/com/facebook/ads/sdk/AdsInsights.java b/src/main/java/com/facebook/ads/sdk/AdsInsights.java index c616536e..0049fbc5 100644 --- a/src/main/java/com/facebook/ads/sdk/AdsInsights.java +++ b/src/main/java/com/facebook/ads/sdk/AdsInsights.java @@ -77,6 +77,8 @@ public class AdsInsights extends APINode { private String mAuctionCompetitiveness = null; @SerializedName("auction_max_competitor_bid") private String mAuctionMaxCompetitorBid = null; + @SerializedName("average_purchases_conversion_value") + private List mAveragePurchasesConversionValue = null; @SerializedName("buying_type") private String mBuyingType = null; @SerializedName("campaign_id") @@ -205,12 +207,6 @@ public class AdsInsights extends APINode { private List mInteractiveComponentTap = null; @SerializedName("labels") private String mLabels = null; - @SerializedName("landing_page_view_actions_per_link_click") - private List mLandingPageViewActionsPerLinkClick = null; - @SerializedName("landing_page_view_per_purchase_rate") - private List mLandingPageViewPerPurchaseRate = null; - @SerializedName("link_clicks_per_results") - private List mLinkClicksPerResults = null; @SerializedName("location") private String mLocation = null; @SerializedName("marketing_messages_cost_per_delivered") @@ -237,8 +233,6 @@ public class AdsInsights extends APINode { private String mPlacePageName = null; @SerializedName("purchase_roas") private List mPurchaseRoas = null; - @SerializedName("purchases_per_link_click") - private List mPurchasesPerLinkClick = null; @SerializedName("qualifying_question_qualify_answer_rate") private String mQualifyingQuestionQualifyAnswerRate = null; @SerializedName("quality_ranking") @@ -328,6 +322,8 @@ public class AdsInsights extends APINode { private String mAppId = null; @SerializedName("body_asset") private AdAssetBody mBodyAsset = null; + @SerializedName("breakdown_reporting_ad_id") + private String mBreakdownReportingAdId = null; @SerializedName("call_to_action_asset") private AdAssetCallToActionType mCallToActionAsset = null; @SerializedName("coarse_conversion_value") @@ -382,6 +378,8 @@ public class AdsInsights extends APINode { private String mMediaOriginUrl = null; @SerializedName("media_text_content") private String mMediaTextContent = null; + @SerializedName("media_type") + private String mMediaType = null; @SerializedName("mmm") private String mMmm = null; @SerializedName("place_page_id") @@ -749,6 +747,20 @@ public AdsInsights setFieldAuctionMaxCompetitorBid(String value) { return this; } + public List getFieldAveragePurchasesConversionValue() { + return mAveragePurchasesConversionValue; + } + + public AdsInsights setFieldAveragePurchasesConversionValue(List value) { + this.mAveragePurchasesConversionValue = value; + return this; + } + + public AdsInsights setFieldAveragePurchasesConversionValue(String value) { + Type type = new TypeToken>(){}.getType(); + this.mAveragePurchasesConversionValue = AdsActionStats.getGson().fromJson(value, type); + return this; + } public String getFieldBuyingType() { return mBuyingType; } @@ -1435,48 +1447,6 @@ public AdsInsights setFieldLabels(String value) { return this; } - public List getFieldLandingPageViewActionsPerLinkClick() { - return mLandingPageViewActionsPerLinkClick; - } - - public AdsInsights setFieldLandingPageViewActionsPerLinkClick(List value) { - this.mLandingPageViewActionsPerLinkClick = value; - return this; - } - - public AdsInsights setFieldLandingPageViewActionsPerLinkClick(String value) { - Type type = new TypeToken>(){}.getType(); - this.mLandingPageViewActionsPerLinkClick = AdsActionStats.getGson().fromJson(value, type); - return this; - } - public List getFieldLandingPageViewPerPurchaseRate() { - return mLandingPageViewPerPurchaseRate; - } - - public AdsInsights setFieldLandingPageViewPerPurchaseRate(List value) { - this.mLandingPageViewPerPurchaseRate = value; - return this; - } - - public AdsInsights setFieldLandingPageViewPerPurchaseRate(String value) { - Type type = new TypeToken>(){}.getType(); - this.mLandingPageViewPerPurchaseRate = AdsActionStats.getGson().fromJson(value, type); - return this; - } - public List getFieldLinkClicksPerResults() { - return mLinkClicksPerResults; - } - - public AdsInsights setFieldLinkClicksPerResults(List value) { - this.mLinkClicksPerResults = value; - return this; - } - - public AdsInsights setFieldLinkClicksPerResults(String value) { - Type type = new TypeToken>(){}.getType(); - this.mLinkClicksPerResults = AdsActionStats.getGson().fromJson(value, type); - return this; - } public String getFieldLocation() { return mLocation; } @@ -1619,20 +1589,6 @@ public AdsInsights setFieldPurchaseRoas(String value) { this.mPurchaseRoas = AdsActionStats.getGson().fromJson(value, type); return this; } - public List getFieldPurchasesPerLinkClick() { - return mPurchasesPerLinkClick; - } - - public AdsInsights setFieldPurchasesPerLinkClick(List value) { - this.mPurchasesPerLinkClick = value; - return this; - } - - public AdsInsights setFieldPurchasesPerLinkClick(String value) { - Type type = new TypeToken>(){}.getType(); - this.mPurchasesPerLinkClick = AdsActionStats.getGson().fromJson(value, type); - return this; - } public String getFieldQualifyingQuestionQualifyAnswerRate() { return mQualifyingQuestionQualifyAnswerRate; } @@ -2139,6 +2095,10 @@ public AdAssetBody getFieldBodyAsset() { return mBodyAsset; } + public String getFieldBreakdownReportingAdId() { + return mBreakdownReportingAdId; + } + public AdAssetCallToActionType getFieldCallToActionAsset() { return mCallToActionAsset; } @@ -2247,6 +2207,10 @@ public String getFieldMediaTextContent() { return mMediaTextContent; } + public String getFieldMediaType() { + return mMediaType; + } + public String getFieldMmm() { return mMmm; } @@ -2437,6 +2401,8 @@ public static enum EnumBreakdowns { VALUE_APP_ID("app_id"), @SerializedName("body_asset") VALUE_BODY_ASSET("body_asset"), + @SerializedName("breakdown_reporting_ad_id") + VALUE_BREAKDOWN_REPORTING_AD_ID("breakdown_reporting_ad_id"), @SerializedName("call_to_action_asset") VALUE_CALL_TO_ACTION_ASSET("call_to_action_asset"), @SerializedName("coarse_conversion_value") @@ -2491,6 +2457,8 @@ public static enum EnumBreakdowns { VALUE_MEDIA_ORIGIN_URL("media_origin_url"), @SerializedName("media_text_content") VALUE_MEDIA_TEXT_CONTENT("media_text_content"), + @SerializedName("media_type") + VALUE_MEDIA_TYPE("media_type"), @SerializedName("mmm") VALUE_MMM("mmm"), @SerializedName("place_page_id") @@ -2695,6 +2663,7 @@ public AdsInsights copyFrom(AdsInsights instance) { this.mAuctionBid = instance.mAuctionBid; this.mAuctionCompetitiveness = instance.mAuctionCompetitiveness; this.mAuctionMaxCompetitorBid = instance.mAuctionMaxCompetitorBid; + this.mAveragePurchasesConversionValue = instance.mAveragePurchasesConversionValue; this.mBuyingType = instance.mBuyingType; this.mCampaignId = instance.mCampaignId; this.mCampaignName = instance.mCampaignName; @@ -2759,9 +2728,6 @@ public AdsInsights copyFrom(AdsInsights instance) { this.mInstantExperienceOutboundClicks = instance.mInstantExperienceOutboundClicks; this.mInteractiveComponentTap = instance.mInteractiveComponentTap; this.mLabels = instance.mLabels; - this.mLandingPageViewActionsPerLinkClick = instance.mLandingPageViewActionsPerLinkClick; - this.mLandingPageViewPerPurchaseRate = instance.mLandingPageViewPerPurchaseRate; - this.mLinkClicksPerResults = instance.mLinkClicksPerResults; this.mLocation = instance.mLocation; this.mMarketingMessagesCostPerDelivered = instance.mMarketingMessagesCostPerDelivered; this.mMarketingMessagesCostPerLinkBtnClick = instance.mMarketingMessagesCostPerLinkBtnClick; @@ -2775,7 +2741,6 @@ public AdsInsights copyFrom(AdsInsights instance) { this.mOutboundClicksCtr = instance.mOutboundClicksCtr; this.mPlacePageName = instance.mPlacePageName; this.mPurchaseRoas = instance.mPurchaseRoas; - this.mPurchasesPerLinkClick = instance.mPurchasesPerLinkClick; this.mQualifyingQuestionQualifyAnswerRate = instance.mQualifyingQuestionQualifyAnswerRate; this.mQualityRanking = instance.mQualityRanking; this.mReach = instance.mReach; @@ -2820,6 +2785,7 @@ public AdsInsights copyFrom(AdsInsights instance) { this.mAge = instance.mAge; this.mAppId = instance.mAppId; this.mBodyAsset = instance.mBodyAsset; + this.mBreakdownReportingAdId = instance.mBreakdownReportingAdId; this.mCallToActionAsset = instance.mCallToActionAsset; this.mCoarseConversionValue = instance.mCoarseConversionValue; this.mConversionDestination = instance.mConversionDestination; @@ -2847,6 +2813,7 @@ public AdsInsights copyFrom(AdsInsights instance) { this.mMediaFormat = instance.mMediaFormat; this.mMediaOriginUrl = instance.mMediaOriginUrl; this.mMediaTextContent = instance.mMediaTextContent; + this.mMediaType = instance.mMediaType; this.mMmm = instance.mMmm; this.mPlacePageId = instance.mPlacePageId; this.mPlatformPosition = instance.mPlatformPosition; diff --git a/src/main/java/com/facebook/ads/sdk/PanelAPIReport.java b/src/main/java/com/facebook/ads/sdk/AdsQuickViews.java similarity index 57% rename from src/main/java/com/facebook/ads/sdk/PanelAPIReport.java rename to src/main/java/com/facebook/ads/sdk/AdsQuickViews.java index a2bc5ced..2f7ac39d 100644 --- a/src/main/java/com/facebook/ads/sdk/PanelAPIReport.java +++ b/src/main/java/com/facebook/ads/sdk/AdsQuickViews.java @@ -40,82 +40,78 @@ * pull request for this class. * */ -public class PanelAPIReport extends APINode { - @SerializedName("checksum") - private String mChecksum = null; - @SerializedName("download_url") - private String mDownloadUrl = null; - @SerializedName("end_date") - private String mEndDate = null; - @SerializedName("export_file_type") - private String mExportFileType = null; +public class AdsQuickViews extends APINode { + @SerializedName("attribution_windows") + private List mAttributionWindows = null; + @SerializedName("breakdowns") + private List mBreakdowns = null; + @SerializedName("column_fields") + private List mColumnFields = null; + @SerializedName("description") + private String mDescription = null; @SerializedName("id") private String mId = null; - @SerializedName("index") - private Long mIndex = null; @SerializedName("name") private String mName = null; - @SerializedName("number_of_chunks") - private Long mNumberOfChunks = null; - @SerializedName("start_date") - private String mStartDate = null; - @SerializedName("upload_date") - private String mUploadDate = null; + @SerializedName("permission") + private String mPermission = null; + @SerializedName("sort") + private List mSort = null; protected static Gson gson = null; - PanelAPIReport() { + AdsQuickViews() { } - public PanelAPIReport(Long id, APIContext context) { + public AdsQuickViews(Long id, APIContext context) { this(id.toString(), context); } - public PanelAPIReport(String id, APIContext context) { + public AdsQuickViews(String id, APIContext context) { this.mId = id; this.context = context; } - public PanelAPIReport fetch() throws APIException{ - PanelAPIReport newInstance = fetchById(this.getPrefixedId().toString(), this.context); + public AdsQuickViews fetch() throws APIException{ + AdsQuickViews newInstance = fetchById(this.getPrefixedId().toString(), this.context); this.copyFrom(newInstance); return this; } - public static PanelAPIReport fetchById(Long id, APIContext context) throws APIException { + public static AdsQuickViews fetchById(Long id, APIContext context) throws APIException { return fetchById(id.toString(), context); } - public static ListenableFuture fetchByIdAsync(Long id, APIContext context) throws APIException { + public static ListenableFuture fetchByIdAsync(Long id, APIContext context) throws APIException { return fetchByIdAsync(id.toString(), context); } - public static PanelAPIReport fetchById(String id, APIContext context) throws APIException { + public static AdsQuickViews fetchById(String id, APIContext context) throws APIException { return new APIRequestGet(id, context) .requestAllFields() .execute(); } - public static ListenableFuture fetchByIdAsync(String id, APIContext context) throws APIException { + public static ListenableFuture fetchByIdAsync(String id, APIContext context) throws APIException { return new APIRequestGet(id, context) .requestAllFields() .executeAsync(); } - public static APINodeList fetchByIds(List ids, List fields, APIContext context) throws APIException { - return (APINodeList)( - new APIRequest(context, "", "/", "GET", PanelAPIReport.getParser()) + public static APINodeList fetchByIds(List ids, List fields, APIContext context) throws APIException { + return (APINodeList)( + new APIRequest(context, "", "/", "GET", AdsQuickViews.getParser()) .setParam("ids", APIRequest.joinStringList(ids)) .requestFields(fields) .execute() ); } - public static ListenableFuture> fetchByIdsAsync(List ids, List fields, APIContext context) throws APIException { + public static ListenableFuture> fetchByIdsAsync(List ids, List fields, APIContext context) throws APIException { return - new APIRequest(context, "", "/", "GET", PanelAPIReport.getParser()) + new APIRequest(context, "", "/", "GET", AdsQuickViews.getParser()) .setParam("ids", APIRequest.joinStringList(ids)) .requestFields(fields) .executeAsyncBase(); @@ -128,12 +124,12 @@ private String getPrefixedId() { public String getId() { return getFieldId().toString(); } - public static PanelAPIReport loadJSON(String json, APIContext context, String header) { - PanelAPIReport panelAPIReport = getGson().fromJson(json, PanelAPIReport.class); + public static AdsQuickViews loadJSON(String json, APIContext context, String header) { + AdsQuickViews adsQuickViews = getGson().fromJson(json, AdsQuickViews.class); if (context.isDebug()) { JsonParser parser = new JsonParser(); JsonElement o1 = parser.parse(json); - JsonElement o2 = parser.parse(panelAPIReport.toString()); + JsonElement o2 = parser.parse(adsQuickViews.toString()); if (o1.getAsJsonObject().get("__fb_trace_id__") != null) { o2.getAsJsonObject().add("__fb_trace_id__", o1.getAsJsonObject().get("__fb_trace_id__")); } @@ -143,14 +139,14 @@ public static PanelAPIReport loadJSON(String json, APIContext context, String he context.log("[Object]" + o2); } } - panelAPIReport.context = context; - panelAPIReport.rawValue = json; - panelAPIReport.header = header; - return panelAPIReport; + adsQuickViews.context = context; + adsQuickViews.rawValue = json; + adsQuickViews.header = header; + return adsQuickViews; } - public static APINodeList parseResponse(String json, APIContext context, APIRequest request, String header) throws MalformedResponseException { - APINodeList panelAPIReports = new APINodeList(request, json, header); + public static APINodeList parseResponse(String json, APIContext context, APIRequest request, String header) throws MalformedResponseException { + APINodeList adsQuickViewss = new APINodeList(request, json, header); JsonArray arr; JsonObject obj; JsonParser parser = new JsonParser(); @@ -161,9 +157,9 @@ public static APINodeList parseResponse(String json, APIContext // First, check if it's a pure JSON Array arr = result.getAsJsonArray(); for (int i = 0; i < arr.size(); i++) { - panelAPIReports.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header)); + adsQuickViewss.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header)); }; - return panelAPIReports; + return adsQuickViewss; } else if (result.isJsonObject()) { obj = result.getAsJsonObject(); if (obj.has("data")) { @@ -173,20 +169,20 @@ public static APINodeList parseResponse(String json, APIContext JsonObject cursors = paging.get("cursors").getAsJsonObject(); String before = cursors.has("before") ? cursors.get("before").getAsString() : null; String after = cursors.has("after") ? cursors.get("after").getAsString() : null; - panelAPIReports.setCursors(before, after); + adsQuickViewss.setCursors(before, after); } String previous = paging.has("previous") ? paging.get("previous").getAsString() : null; String next = paging.has("next") ? paging.get("next").getAsString() : null; - panelAPIReports.setPaging(previous, next); + adsQuickViewss.setPaging(previous, next); if (context.hasAppSecret()) { - panelAPIReports.setAppSecret(context.getAppSecretProof()); + adsQuickViewss.setAppSecret(context.getAppSecretProof()); } } if (obj.get("data").isJsonArray()) { // Second, check if it's a JSON array with "data" arr = obj.get("data").getAsJsonArray(); for (int i = 0; i < arr.size(); i++) { - panelAPIReports.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header)); + adsQuickViewss.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header)); }; } else if (obj.get("data").isJsonObject()) { // Third, check if it's a JSON object with "data" @@ -197,23 +193,23 @@ public static APINodeList parseResponse(String json, APIContext isRedownload = true; obj = obj.getAsJsonObject(s); for (Map.Entry entry : obj.entrySet()) { - panelAPIReports.add(loadJSON(entry.getValue().toString(), context, header)); + adsQuickViewss.add(loadJSON(entry.getValue().toString(), context, header)); } break; } } if (!isRedownload) { - panelAPIReports.add(loadJSON(obj.toString(), context, header)); + adsQuickViewss.add(loadJSON(obj.toString(), context, header)); } } - return panelAPIReports; + return adsQuickViewss; } else if (obj.has("images")) { // Fourth, check if it's a map of image objects obj = obj.get("images").getAsJsonObject(); for (Map.Entry entry : obj.entrySet()) { - panelAPIReports.add(loadJSON(entry.getValue().toString(), context, header)); + adsQuickViewss.add(loadJSON(entry.getValue().toString(), context, header)); } - return panelAPIReports; + return adsQuickViewss; } else { // Fifth, check if it's an array of objects indexed by id boolean isIdIndexedArray = true; @@ -230,20 +226,20 @@ public static APINodeList parseResponse(String json, APIContext value.getAsJsonObject().get("id") != null && value.getAsJsonObject().get("id").getAsString().equals(key) ) { - panelAPIReports.add(loadJSON(value.toString(), context, header)); + adsQuickViewss.add(loadJSON(value.toString(), context, header)); } else { isIdIndexedArray = false; break; } } if (isIdIndexedArray) { - return panelAPIReports; + return adsQuickViewss; } // Sixth, check if it's pure JsonObject - panelAPIReports.clear(); - panelAPIReports.add(loadJSON(json, context, header)); - return panelAPIReports; + adsQuickViewss.clear(); + adsQuickViewss.add(loadJSON(json, context, header)); + return adsQuickViewss; } } } catch (Exception e) { @@ -275,97 +271,87 @@ public APIRequestGet get() { } - public String getFieldChecksum() { - return mChecksum; + public List getFieldAttributionWindows() { + return mAttributionWindows; } - public String getFieldDownloadUrl() { - return mDownloadUrl; + public List getFieldBreakdowns() { + return mBreakdowns; } - public String getFieldEndDate() { - return mEndDate; + public List getFieldColumnFields() { + return mColumnFields; } - public String getFieldExportFileType() { - return mExportFileType; + public String getFieldDescription() { + return mDescription; } public String getFieldId() { return mId; } - public Long getFieldIndex() { - return mIndex; - } - public String getFieldName() { return mName; } - public Long getFieldNumberOfChunks() { - return mNumberOfChunks; + public String getFieldPermission() { + return mPermission; } - public String getFieldStartDate() { - return mStartDate; + public List getFieldSort() { + return mSort; } - public String getFieldUploadDate() { - return mUploadDate; - } + public static class APIRequestGet extends APIRequest { - public static class APIRequestGet extends APIRequest { - - PanelAPIReport lastResponse = null; + AdsQuickViews lastResponse = null; @Override - public PanelAPIReport getLastResponse() { + public AdsQuickViews getLastResponse() { return lastResponse; } public static final String[] PARAMS = { }; public static final String[] FIELDS = { - "checksum", - "download_url", - "end_date", - "export_file_type", + "attribution_windows", + "breakdowns", + "column_fields", + "description", "id", - "index", "name", - "number_of_chunks", - "start_date", - "upload_date", + "permission", + "sort", }; @Override - public PanelAPIReport parseResponse(String response, String header) throws APIException { - return PanelAPIReport.parseResponse(response, getContext(), this, header).head(); + public AdsQuickViews parseResponse(String response, String header) throws APIException { + return AdsQuickViews.parseResponse(response, getContext(), this, header).head(); } @Override - public PanelAPIReport execute() throws APIException { + public AdsQuickViews execute() throws APIException { return execute(new HashMap()); } @Override - public PanelAPIReport execute(Map extraParams) throws APIException { + public AdsQuickViews execute(Map extraParams) throws APIException { ResponseWrapper rw = executeInternal(extraParams); lastResponse = parseResponse(rw.getBody(), rw.getHeader()); return lastResponse; } - public ListenableFuture executeAsync() throws APIException { + public ListenableFuture executeAsync() throws APIException { return executeAsync(new HashMap()); }; - public ListenableFuture executeAsync(Map extraParams) throws APIException { + public ListenableFuture executeAsync(Map extraParams) throws APIException { return Futures.transform( executeAsyncInternal(extraParams), - new Function() { - public PanelAPIReport apply(ResponseWrapper result) { + new Function() { + public AdsQuickViews apply(ResponseWrapper result) { try { return APIRequestGet.this.parseResponse(result.getBody(), result.getHeader()); } catch (Exception e) { @@ -430,32 +416,32 @@ public APIRequestGet requestField (String field, boolean value) { return this; } - public APIRequestGet requestChecksumField () { - return this.requestChecksumField(true); + public APIRequestGet requestAttributionWindowsField () { + return this.requestAttributionWindowsField(true); } - public APIRequestGet requestChecksumField (boolean value) { - this.requestField("checksum", value); + public APIRequestGet requestAttributionWindowsField (boolean value) { + this.requestField("attribution_windows", value); return this; } - public APIRequestGet requestDownloadUrlField () { - return this.requestDownloadUrlField(true); + public APIRequestGet requestBreakdownsField () { + return this.requestBreakdownsField(true); } - public APIRequestGet requestDownloadUrlField (boolean value) { - this.requestField("download_url", value); + public APIRequestGet requestBreakdownsField (boolean value) { + this.requestField("breakdowns", value); return this; } - public APIRequestGet requestEndDateField () { - return this.requestEndDateField(true); + public APIRequestGet requestColumnFieldsField () { + return this.requestColumnFieldsField(true); } - public APIRequestGet requestEndDateField (boolean value) { - this.requestField("end_date", value); + public APIRequestGet requestColumnFieldsField (boolean value) { + this.requestField("column_fields", value); return this; } - public APIRequestGet requestExportFileTypeField () { - return this.requestExportFileTypeField(true); + public APIRequestGet requestDescriptionField () { + return this.requestDescriptionField(true); } - public APIRequestGet requestExportFileTypeField (boolean value) { - this.requestField("export_file_type", value); + public APIRequestGet requestDescriptionField (boolean value) { + this.requestField("description", value); return this; } public APIRequestGet requestIdField () { @@ -465,13 +451,6 @@ public APIRequestGet requestIdField (boolean value) { this.requestField("id", value); return this; } - public APIRequestGet requestIndexField () { - return this.requestIndexField(true); - } - public APIRequestGet requestIndexField (boolean value) { - this.requestField("index", value); - return this; - } public APIRequestGet requestNameField () { return this.requestNameField(true); } @@ -479,25 +458,18 @@ public APIRequestGet requestNameField (boolean value) { this.requestField("name", value); return this; } - public APIRequestGet requestNumberOfChunksField () { - return this.requestNumberOfChunksField(true); - } - public APIRequestGet requestNumberOfChunksField (boolean value) { - this.requestField("number_of_chunks", value); - return this; - } - public APIRequestGet requestStartDateField () { - return this.requestStartDateField(true); + public APIRequestGet requestPermissionField () { + return this.requestPermissionField(true); } - public APIRequestGet requestStartDateField (boolean value) { - this.requestField("start_date", value); + public APIRequestGet requestPermissionField (boolean value) { + this.requestField("permission", value); return this; } - public APIRequestGet requestUploadDateField () { - return this.requestUploadDateField(true); + public APIRequestGet requestSortField () { + return this.requestSortField(true); } - public APIRequestGet requestUploadDateField (boolean value) { - this.requestField("upload_date", value); + public APIRequestGet requestSortField (boolean value) { + this.requestField("sort", value); return this; } } @@ -516,26 +488,24 @@ public APIRequestGet requestUploadDateField (boolean value) { return gson; } - public PanelAPIReport copyFrom(PanelAPIReport instance) { - this.mChecksum = instance.mChecksum; - this.mDownloadUrl = instance.mDownloadUrl; - this.mEndDate = instance.mEndDate; - this.mExportFileType = instance.mExportFileType; + public AdsQuickViews copyFrom(AdsQuickViews instance) { + this.mAttributionWindows = instance.mAttributionWindows; + this.mBreakdowns = instance.mBreakdowns; + this.mColumnFields = instance.mColumnFields; + this.mDescription = instance.mDescription; this.mId = instance.mId; - this.mIndex = instance.mIndex; this.mName = instance.mName; - this.mNumberOfChunks = instance.mNumberOfChunks; - this.mStartDate = instance.mStartDate; - this.mUploadDate = instance.mUploadDate; + this.mPermission = instance.mPermission; + this.mSort = instance.mSort; this.context = instance.context; this.rawValue = instance.rawValue; return this; } - public static APIRequest.ResponseParser getParser() { - return new APIRequest.ResponseParser() { - public APINodeList parseResponse(String response, APIContext context, APIRequest request, String header) throws MalformedResponseException { - return PanelAPIReport.parseResponse(response, context, request, header); + public static APIRequest.ResponseParser getParser() { + return new APIRequest.ResponseParser() { + public APINodeList parseResponse(String response, APIContext context, APIRequest request, String header) throws MalformedResponseException { + return AdsQuickViews.parseResponse(response, context, request, header); } }; } diff --git a/src/main/java/com/facebook/ads/sdk/AdsUserSettings.java b/src/main/java/com/facebook/ads/sdk/AdsUserSettings.java index b39252ee..87d1996f 100644 --- a/src/main/java/com/facebook/ads/sdk/AdsUserSettings.java +++ b/src/main/java/com/facebook/ads/sdk/AdsUserSettings.java @@ -43,6 +43,8 @@ public class AdsUserSettings extends APINode { @SerializedName("a_plus_c_survey_seen") private Boolean mAPlusCSurveySeen = null; + @SerializedName("add_overlays_opt_in_status") + private String mAddOverlaysOptInStatus = null; @SerializedName("adgroup_name_template") private Object mAdgroupNameTemplate = null; @SerializedName("ads_cs_catalog_opt_out_timestamp") @@ -85,6 +87,8 @@ public class AdsUserSettings extends APINode { private Long mGenAiAlphaTestStatus = null; @SerializedName("id") private String mId = null; + @SerializedName("image_background_generation_opt_in_status") + private String mImageBackgroundGenerationOptInStatus = null; @SerializedName("image_expansion_opt_in_status") private String mImageExpansionOptInStatus = null; @SerializedName("is_ads_ai_consented") @@ -373,6 +377,10 @@ public Boolean getFieldAPlusCSurveySeen() { return mAPlusCSurveySeen; } + public String getFieldAddOverlaysOptInStatus() { + return mAddOverlaysOptInStatus; + } + public Object getFieldAdgroupNameTemplate() { return mAdgroupNameTemplate; } @@ -457,6 +465,10 @@ public String getFieldId() { return mId; } + public String getFieldImageBackgroundGenerationOptInStatus() { + return mImageBackgroundGenerationOptInStatus; + } + public String getFieldImageExpansionOptInStatus() { return mImageExpansionOptInStatus; } @@ -620,6 +632,7 @@ public AdsUserSettings getLastResponse() { public static final String[] FIELDS = { "a_plus_c_survey_seen", + "add_overlays_opt_in_status", "adgroup_name_template", "ads_cs_catalog_opt_out_timestamp", "ads_tool_visits", @@ -641,6 +654,7 @@ public AdsUserSettings getLastResponse() { "focus_mode_default", "gen_ai_alpha_test_status", "id", + "image_background_generation_opt_in_status", "image_expansion_opt_in_status", "is_ads_ai_consented", "is_cbo_default_on", @@ -775,6 +789,13 @@ public APIRequestGet requestAPlusCSurveySeenField (boolean value) { this.requestField("a_plus_c_survey_seen", value); return this; } + public APIRequestGet requestAddOverlaysOptInStatusField () { + return this.requestAddOverlaysOptInStatusField(true); + } + public APIRequestGet requestAddOverlaysOptInStatusField (boolean value) { + this.requestField("add_overlays_opt_in_status", value); + return this; + } public APIRequestGet requestAdgroupNameTemplateField () { return this.requestAdgroupNameTemplateField(true); } @@ -922,6 +943,13 @@ public APIRequestGet requestIdField (boolean value) { this.requestField("id", value); return this; } + public APIRequestGet requestImageBackgroundGenerationOptInStatusField () { + return this.requestImageBackgroundGenerationOptInStatusField(true); + } + public APIRequestGet requestImageBackgroundGenerationOptInStatusField (boolean value) { + this.requestField("image_background_generation_opt_in_status", value); + return this; + } public APIRequestGet requestImageExpansionOptInStatusField () { return this.requestImageExpansionOptInStatusField(true); } @@ -1185,6 +1213,7 @@ public APIRequestGet requestUserField (boolean value) { public AdsUserSettings copyFrom(AdsUserSettings instance) { this.mAPlusCSurveySeen = instance.mAPlusCSurveySeen; + this.mAddOverlaysOptInStatus = instance.mAddOverlaysOptInStatus; this.mAdgroupNameTemplate = instance.mAdgroupNameTemplate; this.mAdsCsCatalogOptOutTimestamp = instance.mAdsCsCatalogOptOutTimestamp; this.mAdsToolVisits = instance.mAdsToolVisits; @@ -1206,6 +1235,7 @@ public AdsUserSettings copyFrom(AdsUserSettings instance) { this.mFocusModeDefault = instance.mFocusModeDefault; this.mGenAiAlphaTestStatus = instance.mGenAiAlphaTestStatus; this.mId = instance.mId; + this.mImageBackgroundGenerationOptInStatus = instance.mImageBackgroundGenerationOptInStatus; this.mImageExpansionOptInStatus = instance.mImageExpansionOptInStatus; this.mIsAdsAiConsented = instance.mIsAdsAiConsented; this.mIsCboDefaultOn = instance.mIsCboDefaultOn; diff --git a/src/main/java/com/facebook/ads/sdk/AdsValueAdjustmentRuleCollection.java b/src/main/java/com/facebook/ads/sdk/AdsValueAdjustmentRuleCollection.java index e6e57aa5..45c3640c 100644 --- a/src/main/java/com/facebook/ads/sdk/AdsValueAdjustmentRuleCollection.java +++ b/src/main/java/com/facebook/ads/sdk/AdsValueAdjustmentRuleCollection.java @@ -254,8 +254,8 @@ public String toString() { return getGson().toJson(this); } - public APIRequestGetPersonas getPersonas() { - return new APIRequestGetPersonas(this.getPrefixedId().toString(), context); + public APIRequestGetRules getRules() { + return new APIRequestGetRules(this.getPrefixedId().toString(), context); } public APIRequestGet get() { @@ -273,7 +273,7 @@ public String getFieldName() { - public static class APIRequestGetPersonas extends APIRequest { + public static class APIRequestGetRules extends APIRequest { APINodeList lastResponse = null; @Override @@ -313,7 +313,7 @@ public ListenableFuture> executeAsync(Map e new Function>() { public APINodeList apply(ResponseWrapper result) { try { - return APIRequestGetPersonas.this.parseResponse(result.getBody(), result.getHeader()); + return APIRequestGetRules.this.parseResponse(result.getBody(), result.getHeader()); } catch (Exception e) { throw new RuntimeException(e); } @@ -323,28 +323,28 @@ public APINodeList apply(ResponseWrapper result) { ); }; - public APIRequestGetPersonas(String nodeId, APIContext context) { - super(context, nodeId, "/personas", "GET", Arrays.asList(PARAMS)); + public APIRequestGetRules(String nodeId, APIContext context) { + super(context, nodeId, "/rules", "GET", Arrays.asList(PARAMS)); } @Override - public APIRequestGetPersonas setParam(String param, Object value) { + public APIRequestGetRules setParam(String param, Object value) { setParamInternal(param, value); return this; } @Override - public APIRequestGetPersonas setParams(Map params) { + public APIRequestGetRules setParams(Map params) { setParamsInternal(params); return this; } - public APIRequestGetPersonas requestAllFields () { + public APIRequestGetRules requestAllFields () { return this.requestAllFields(true); } - public APIRequestGetPersonas requestAllFields (boolean value) { + public APIRequestGetRules requestAllFields (boolean value) { for (String field : FIELDS) { this.requestField(field, value); } @@ -352,12 +352,12 @@ public APIRequestGetPersonas requestAllFields (boolean value) { } @Override - public APIRequestGetPersonas requestFields (List fields) { + public APIRequestGetRules requestFields (List fields) { return this.requestFields(fields, true); } @Override - public APIRequestGetPersonas requestFields (List fields, boolean value) { + public APIRequestGetRules requestFields (List fields, boolean value) { for (String field : fields) { this.requestField(field, value); } @@ -365,13 +365,13 @@ public APIRequestGetPersonas requestFields (List fields, boolean value) } @Override - public APIRequestGetPersonas requestField (String field) { + public APIRequestGetRules requestField (String field) { this.requestField(field, true); return this; } @Override - public APIRequestGetPersonas requestField (String field, boolean value) { + public APIRequestGetRules requestField (String field, boolean value) { this.requestFieldInternal(field, value); return this; } diff --git a/src/main/java/com/facebook/ads/sdk/Application.java b/src/main/java/com/facebook/ads/sdk/Application.java index f7f88daf..bb70bb81 100644 --- a/src/main/java/com/facebook/ads/sdk/Application.java +++ b/src/main/java/com/facebook/ads/sdk/Application.java @@ -596,6 +596,10 @@ public APIRequestGetLinkedDataset getLinkedDataset() { return new APIRequestGetLinkedDataset(this.getPrefixedId().toString(), context); } + public APIRequestGetMessageTemplates getMessageTemplates() { + return new APIRequestGetMessageTemplates(this.getPrefixedId().toString(), context); + } + public APIRequestCreateMmpAuditing createMmpAuditing() { return new APIRequestCreateMmpAuditing(this.getPrefixedId().toString(), context); } @@ -624,10 +628,6 @@ public APIRequestCreateOccludesPopup createOccludesPopup() { return new APIRequestCreateOccludesPopup(this.getPrefixedId().toString(), context); } - public APIRequestCreatePageActivity createPageActivity() { - return new APIRequestCreatePageActivity(this.getPrefixedId().toString(), context); - } - public APIRequestCreatePaymentCurrency createPaymentCurrency() { return new APIRequestCreatePaymentCurrency(this.getPrefixedId().toString(), context); } @@ -1564,6 +1564,7 @@ public APINode getLastResponse() { "data_processing_options_state", "device_token", "event", + "event_id", "extinfo", "include_dwell_data", "include_video_data", @@ -1781,6 +1782,11 @@ public APIRequestCreateActivity setEvent (String event) { return this; } + public APIRequestCreateActivity setEventId (String eventId) { + this.setParam("event_id", eventId); + return this; + } + public APIRequestCreateActivity setExtinfo (Object extinfo) { this.setParam("extinfo", extinfo); return this; @@ -7105,6 +7111,117 @@ public APIRequestGetLinkedDataset requestValidEntriesField (boolean value) { } } + public static class APIRequestGetMessageTemplates extends APIRequest { + + APINodeList lastResponse = null; + @Override + public APINodeList getLastResponse() { + return lastResponse; + } + public static final String[] PARAMS = { + "template_id", + }; + + public static final String[] FIELDS = { + }; + + @Override + public APINodeList parseResponse(String response, String header) throws APIException { + return APINode.parseResponse(response, getContext(), this, header); + } + + @Override + public APINodeList execute() throws APIException { + return execute(new HashMap()); + } + + @Override + public APINodeList execute(Map extraParams) throws APIException { + ResponseWrapper rw = executeInternal(extraParams); + lastResponse = parseResponse(rw.getBody(),rw.getHeader()); + return lastResponse; + } + + public ListenableFuture> executeAsync() throws APIException { + return executeAsync(new HashMap()); + }; + + public ListenableFuture> executeAsync(Map extraParams) throws APIException { + return Futures.transform( + executeAsyncInternal(extraParams), + new Function>() { + public APINodeList apply(ResponseWrapper result) { + try { + return APIRequestGetMessageTemplates.this.parseResponse(result.getBody(), result.getHeader()); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + }, + MoreExecutors.directExecutor() + ); + }; + + public APIRequestGetMessageTemplates(String nodeId, APIContext context) { + super(context, nodeId, "/message_templates", "GET", Arrays.asList(PARAMS)); + } + + @Override + public APIRequestGetMessageTemplates setParam(String param, Object value) { + setParamInternal(param, value); + return this; + } + + @Override + public APIRequestGetMessageTemplates setParams(Map params) { + setParamsInternal(params); + return this; + } + + + public APIRequestGetMessageTemplates setTemplateId (String templateId) { + this.setParam("template_id", templateId); + return this; + } + + public APIRequestGetMessageTemplates requestAllFields () { + return this.requestAllFields(true); + } + + public APIRequestGetMessageTemplates requestAllFields (boolean value) { + for (String field : FIELDS) { + this.requestField(field, value); + } + return this; + } + + @Override + public APIRequestGetMessageTemplates requestFields (List fields) { + return this.requestFields(fields, true); + } + + @Override + public APIRequestGetMessageTemplates requestFields (List fields, boolean value) { + for (String field : fields) { + this.requestField(field, value); + } + return this; + } + + @Override + public APIRequestGetMessageTemplates requestField (String field) { + this.requestField(field, true); + return this; + } + + @Override + public APIRequestGetMessageTemplates requestField (String field, boolean value) { + this.requestFieldInternal(field, value); + return this; + } + + } + public static class APIRequestCreateMmpAuditing extends APIRequest { APINode lastResponse = null; @@ -8042,181 +8159,6 @@ public APIRequestCreateOccludesPopup requestField (String field, boolean value) } - public static class APIRequestCreatePageActivity extends APIRequest { - - Application lastResponse = null; - @Override - public Application getLastResponse() { - return lastResponse; - } - public static final String[] PARAMS = { - "advertiser_tracking_enabled", - "application_tracking_enabled", - "custom_events", - "logging_source", - "logging_target", - "page_id", - "page_scoped_user_id", - }; - - public static final String[] FIELDS = { - }; - - @Override - public Application parseResponse(String response, String header) throws APIException { - return Application.parseResponse(response, getContext(), this, header).head(); - } - - @Override - public Application execute() throws APIException { - return execute(new HashMap()); - } - - @Override - public Application execute(Map extraParams) throws APIException { - ResponseWrapper rw = executeInternal(extraParams); - lastResponse = parseResponse(rw.getBody(), rw.getHeader()); - return lastResponse; - } - - public ListenableFuture executeAsync() throws APIException { - return executeAsync(new HashMap()); - }; - - public ListenableFuture executeAsync(Map extraParams) throws APIException { - return Futures.transform( - executeAsyncInternal(extraParams), - new Function() { - public Application apply(ResponseWrapper result) { - try { - return APIRequestCreatePageActivity.this.parseResponse(result.getBody(), result.getHeader()); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - }, - MoreExecutors.directExecutor() - ); - }; - - public APIRequestCreatePageActivity(String nodeId, APIContext context) { - super(context, nodeId, "/page_activities", "POST", Arrays.asList(PARAMS)); - } - - @Override - public APIRequestCreatePageActivity setParam(String param, Object value) { - setParamInternal(param, value); - return this; - } - - @Override - public APIRequestCreatePageActivity setParams(Map params) { - setParamsInternal(params); - return this; - } - - - public APIRequestCreatePageActivity setAdvertiserTrackingEnabled (Boolean advertiserTrackingEnabled) { - this.setParam("advertiser_tracking_enabled", advertiserTrackingEnabled); - return this; - } - public APIRequestCreatePageActivity setAdvertiserTrackingEnabled (String advertiserTrackingEnabled) { - this.setParam("advertiser_tracking_enabled", advertiserTrackingEnabled); - return this; - } - - public APIRequestCreatePageActivity setApplicationTrackingEnabled (Boolean applicationTrackingEnabled) { - this.setParam("application_tracking_enabled", applicationTrackingEnabled); - return this; - } - public APIRequestCreatePageActivity setApplicationTrackingEnabled (String applicationTrackingEnabled) { - this.setParam("application_tracking_enabled", applicationTrackingEnabled); - return this; - } - - public APIRequestCreatePageActivity setCustomEvents (List customEvents) { - this.setParam("custom_events", customEvents); - return this; - } - public APIRequestCreatePageActivity setCustomEvents (String customEvents) { - this.setParam("custom_events", customEvents); - return this; - } - - public APIRequestCreatePageActivity setLoggingSource (Application.EnumLoggingSource loggingSource) { - this.setParam("logging_source", loggingSource); - return this; - } - public APIRequestCreatePageActivity setLoggingSource (String loggingSource) { - this.setParam("logging_source", loggingSource); - return this; - } - - public APIRequestCreatePageActivity setLoggingTarget (Application.EnumLoggingTarget loggingTarget) { - this.setParam("logging_target", loggingTarget); - return this; - } - public APIRequestCreatePageActivity setLoggingTarget (String loggingTarget) { - this.setParam("logging_target", loggingTarget); - return this; - } - - public APIRequestCreatePageActivity setPageId (Long pageId) { - this.setParam("page_id", pageId); - return this; - } - public APIRequestCreatePageActivity setPageId (String pageId) { - this.setParam("page_id", pageId); - return this; - } - - public APIRequestCreatePageActivity setPageScopedUserId (Long pageScopedUserId) { - this.setParam("page_scoped_user_id", pageScopedUserId); - return this; - } - public APIRequestCreatePageActivity setPageScopedUserId (String pageScopedUserId) { - this.setParam("page_scoped_user_id", pageScopedUserId); - return this; - } - - public APIRequestCreatePageActivity requestAllFields () { - return this.requestAllFields(true); - } - - public APIRequestCreatePageActivity requestAllFields (boolean value) { - for (String field : FIELDS) { - this.requestField(field, value); - } - return this; - } - - @Override - public APIRequestCreatePageActivity requestFields (List fields) { - return this.requestFields(fields, true); - } - - @Override - public APIRequestCreatePageActivity requestFields (List fields, boolean value) { - for (String field : fields) { - this.requestField(field, value); - } - return this; - } - - @Override - public APIRequestCreatePageActivity requestField (String field) { - this.requestField(field, true); - return this; - } - - @Override - public APIRequestCreatePageActivity requestField (String field, boolean value) { - this.requestFieldInternal(field, value); - return this; - } - - } - public static class APIRequestCreatePaymentCurrency extends APIRequest { Application lastResponse = null; @@ -11573,46 +11515,6 @@ public String toString() { } } - public static enum EnumLoggingSource { - @SerializedName("DETECTION") - VALUE_DETECTION("DETECTION"), - @SerializedName("MESSENGER_BOT") - VALUE_MESSENGER_BOT("MESSENGER_BOT"), - ; - - private String value; - - private EnumLoggingSource(String value) { - this.value = value; - } - - @Override - public String toString() { - return value; - } - } - - public static enum EnumLoggingTarget { - @SerializedName("APP") - VALUE_APP("APP"), - @SerializedName("APP_AND_PAGE") - VALUE_APP_AND_PAGE("APP_AND_PAGE"), - @SerializedName("PAGE") - VALUE_PAGE("PAGE"), - ; - - private String value; - - private EnumLoggingTarget(String value) { - this.value = value; - } - - @Override - public String toString() { - return value; - } - } - public static enum EnumOwnerPermissions { @SerializedName("DEVELOP") VALUE_DEVELOP("DEVELOP"), diff --git a/src/main/java/com/facebook/ads/sdk/Business.java b/src/main/java/com/facebook/ads/sdk/Business.java index c70c4928..07262503 100644 --- a/src/main/java/com/facebook/ads/sdk/Business.java +++ b/src/main/java/com/facebook/ads/sdk/Business.java @@ -966,6 +966,7 @@ public APINodeList getLastResponse() { "ad_account_id", "id", "managed_by", + "owned_by", "parent_advertiser_id", "sub_vertical", "tag", @@ -1099,6 +1100,13 @@ public APIRequestGetAdAccountInfos requestManagedByField (boolean value) { this.requestField("managed_by", value); return this; } + public APIRequestGetAdAccountInfos requestOwnedByField () { + return this.requestOwnedByField(true); + } + public APIRequestGetAdAccountInfos requestOwnedByField (boolean value) { + this.requestField("owned_by", value); + return this; + } public APIRequestGetAdAccountInfos requestParentAdvertiserIdField () { return this.requestParentAdvertiserIdField(true); } @@ -23910,7 +23918,6 @@ public AdVideo getLastResponse() { "fun_fact_toastee_id", "guide", "guide_enabled", - "holiday_card", "initial_heading", "initial_pitch", "instant_game_entry_point_data", @@ -23918,7 +23925,6 @@ public AdVideo getLastResponse() { "is_group_linking_post", "is_voice_clip", "location_source_id", - "offer_like_post_id", "og_action_type_id", "og_icon_id", "og_object_id", @@ -24187,10 +24193,6 @@ public APIRequestCreateVideo setFrontZRotation (String frontZRotation) { return this; } - public APIRequestCreateVideo setFunFactPromptId (Long funFactPromptId) { - this.setParam("fun_fact_prompt_id", funFactPromptId); - return this; - } public APIRequestCreateVideo setFunFactPromptId (String funFactPromptId) { this.setParam("fun_fact_prompt_id", funFactPromptId); return this; @@ -24223,11 +24225,6 @@ public APIRequestCreateVideo setGuideEnabled (String guideEnabled) { return this; } - public APIRequestCreateVideo setHolidayCard (String holidayCard) { - this.setParam("holiday_card", holidayCard); - return this; - } - public APIRequestCreateVideo setInitialHeading (Long initialHeading) { this.setParam("initial_heading", initialHeading); return this; @@ -24283,15 +24280,6 @@ public APIRequestCreateVideo setLocationSourceId (String locationSourceId) { return this; } - public APIRequestCreateVideo setOfferLikePostId (Long offerLikePostId) { - this.setParam("offer_like_post_id", offerLikePostId); - return this; - } - public APIRequestCreateVideo setOfferLikePostId (String offerLikePostId) { - this.setParam("offer_like_post_id", offerLikePostId); - return this; - } - public APIRequestCreateVideo setOgActionTypeId (String ogActionTypeId) { this.setParam("og_action_type_id", ogActionTypeId); return this; diff --git a/src/main/java/com/facebook/ads/sdk/CTWAWhatsAppNumbersInfo.java b/src/main/java/com/facebook/ads/sdk/CTWAWhatsAppNumbersInfo.java index cf0a9509..c3e5f137 100644 --- a/src/main/java/com/facebook/ads/sdk/CTWAWhatsAppNumbersInfo.java +++ b/src/main/java/com/facebook/ads/sdk/CTWAWhatsAppNumbersInfo.java @@ -47,6 +47,8 @@ public class CTWAWhatsAppNumbersInfo extends APINode { private String mFormattedWhatsappNumber = null; @SerializedName("is_business_number") private Boolean mIsBusinessNumber = null; + @SerializedName("number_country_prefix") + private String mNumberCountryPrefix = null; @SerializedName("page_whatsapp_number_id") private String mPageWhatsappNumberId = null; @SerializedName("waba_id") @@ -233,6 +235,15 @@ public CTWAWhatsAppNumbersInfo setFieldIsBusinessNumber(Boolean value) { return this; } + public String getFieldNumberCountryPrefix() { + return mNumberCountryPrefix; + } + + public CTWAWhatsAppNumbersInfo setFieldNumberCountryPrefix(String value) { + this.mNumberCountryPrefix = value; + return this; + } + public String getFieldPageWhatsappNumberId() { return mPageWhatsappNumberId; } @@ -289,6 +300,7 @@ public CTWAWhatsAppNumbersInfo copyFrom(CTWAWhatsAppNumbersInfo instance) { this.mCanManageWaFlows = instance.mCanManageWaFlows; this.mFormattedWhatsappNumber = instance.mFormattedWhatsappNumber; this.mIsBusinessNumber = instance.mIsBusinessNumber; + this.mNumberCountryPrefix = instance.mNumberCountryPrefix; this.mPageWhatsappNumberId = instance.mPageWhatsappNumberId; this.mWabaId = instance.mWabaId; this.mWhatsappNumber = instance.mWhatsappNumber; diff --git a/src/main/java/com/facebook/ads/sdk/Campaign.java b/src/main/java/com/facebook/ads/sdk/Campaign.java index 69ab2f45..f9e21f96 100644 --- a/src/main/java/com/facebook/ads/sdk/Campaign.java +++ b/src/main/java/com/facebook/ads/sdk/Campaign.java @@ -943,6 +943,7 @@ public APINodeList getLastResponse() { "account_id", "created_by", "created_time", + "disable_error_code", "evaluation_spec", "execution_spec", "id", @@ -1072,6 +1073,13 @@ public APIRequestGetAdRulesGoverned requestCreatedTimeField (boolean value) { this.requestField("created_time", value); return this; } + public APIRequestGetAdRulesGoverned requestDisableErrorCodeField () { + return this.requestDisableErrorCodeField(true); + } + public APIRequestGetAdRulesGoverned requestDisableErrorCodeField (boolean value) { + this.requestField("disable_error_code", value); + return this; + } public APIRequestGetAdRulesGoverned requestEvaluationSpecField () { return this.requestEvaluationSpecField(true); } @@ -1166,6 +1174,7 @@ public APINodeList getLastResponse() { "issues_info", "last_updated_by_app_id", "name", + "placement", "preview_shareable_link", "priority", "recommendations", @@ -1500,6 +1509,13 @@ public APIRequestGetAds requestNameField (boolean value) { this.requestField("name", value); return this; } + public APIRequestGetAds requestPlacementField () { + return this.requestPlacementField(true); + } + public APIRequestGetAds requestPlacementField (boolean value) { + this.requestField("placement", value); + return this; + } public APIRequestGetAds requestPreviewShareableLinkField () { return this.requestPreviewShareableLinkField(true); } @@ -1628,6 +1644,8 @@ public APINodeList getLastResponse() { "lifetime_imps", "lifetime_min_spend_target", "lifetime_spend_cap", + "max_budget_spend_percentage", + "min_budget_spend_percentage", "multi_optimization_goal_weight", "name", "optimization_goal", @@ -2065,6 +2083,20 @@ public APIRequestGetAdSets requestLifetimeSpendCapField (boolean value) { this.requestField("lifetime_spend_cap", value); return this; } + public APIRequestGetAdSets requestMaxBudgetSpendPercentageField () { + return this.requestMaxBudgetSpendPercentageField(true); + } + public APIRequestGetAdSets requestMaxBudgetSpendPercentageField (boolean value) { + this.requestField("max_budget_spend_percentage", value); + return this; + } + public APIRequestGetAdSets requestMinBudgetSpendPercentageField () { + return this.requestMinBudgetSpendPercentageField(true); + } + public APIRequestGetAdSets requestMinBudgetSpendPercentageField (boolean value) { + this.requestField("min_budget_spend_percentage", value); + return this; + } public APIRequestGetAdSets requestMultiOptimizationGoalWeightField () { return this.requestMultiOptimizationGoalWeightField(true); } @@ -4734,6 +4766,8 @@ public static enum EnumSpecialAdCategories { VALUE_CREDIT("CREDIT"), @SerializedName("EMPLOYMENT") VALUE_EMPLOYMENT("EMPLOYMENT"), + @SerializedName("FINANCIAL_PRODUCTS_SERVICES") + VALUE_FINANCIAL_PRODUCTS_SERVICES("FINANCIAL_PRODUCTS_SERVICES"), @SerializedName("HOUSING") VALUE_HOUSING("HOUSING"), @SerializedName("ISSUES_ELECTIONS_POLITICS") @@ -5297,6 +5331,8 @@ public static enum EnumSpecialAdCategory { VALUE_CREDIT("CREDIT"), @SerializedName("EMPLOYMENT") VALUE_EMPLOYMENT("EMPLOYMENT"), + @SerializedName("FINANCIAL_PRODUCTS_SERVICES") + VALUE_FINANCIAL_PRODUCTS_SERVICES("FINANCIAL_PRODUCTS_SERVICES"), @SerializedName("HOUSING") VALUE_HOUSING("HOUSING"), @SerializedName("ISSUES_ELECTIONS_POLITICS") diff --git a/src/main/java/com/facebook/ads/sdk/CatalogItemRejectionReasons.java b/src/main/java/com/facebook/ads/sdk/CatalogItemRejectionReasons.java index 2a58086e..e54b00ff 100644 --- a/src/main/java/com/facebook/ads/sdk/CatalogItemRejectionReasons.java +++ b/src/main/java/com/facebook/ads/sdk/CatalogItemRejectionReasons.java @@ -42,7 +42,7 @@ */ public class CatalogItemRejectionReasons extends APINode { @SerializedName("capability") - private EnumCapability mCapability = null; + private String mCapability = null; @SerializedName("rejection_information") private List mRejectionInformation = null; protected static Gson gson = null; @@ -196,11 +196,11 @@ public String toString() { } - public EnumCapability getFieldCapability() { + public String getFieldCapability() { return mCapability; } - public CatalogItemRejectionReasons setFieldCapability(EnumCapability value) { + public CatalogItemRejectionReasons setFieldCapability(String value) { this.mCapability = value; return this; } @@ -216,33 +216,6 @@ public CatalogItemRejectionReasons setFieldRejectionInformation(List val - public static enum EnumCapability { - @SerializedName("business_inbox_in_messenger") - VALUE_BUSINESS_INBOX_IN_MESSENGER("business_inbox_in_messenger"), - @SerializedName("shops") - VALUE_SHOPS("shops"), - @SerializedName("test_capability") - VALUE_TEST_CAPABILITY("test_capability"), - @SerializedName("universal_checkout") - VALUE_UNIVERSAL_CHECKOUT("universal_checkout"), - @SerializedName("us_marketplace") - VALUE_US_MARKETPLACE("us_marketplace"), - @SerializedName("whatsapp_marketing_message") - VALUE_WHATSAPP_MARKETING_MESSAGE("whatsapp_marketing_message"), - ; - - private String value; - - private EnumCapability(String value) { - this.value = value; - } - - @Override - public String toString() { - return value; - } - } - synchronized /*package*/ static Gson getGson() { if (gson != null) { diff --git a/src/main/java/com/facebook/ads/sdk/CustomAudience.java b/src/main/java/com/facebook/ads/sdk/CustomAudience.java index ec955228..eb594789 100644 --- a/src/main/java/com/facebook/ads/sdk/CustomAudience.java +++ b/src/main/java/com/facebook/ads/sdk/CustomAudience.java @@ -1517,6 +1517,7 @@ public APINodeList getLastResponse() { "issues_info", "last_updated_by_app_id", "name", + "placement", "preview_shareable_link", "priority", "recommendations", @@ -1833,6 +1834,13 @@ public APIRequestGetAds requestNameField (boolean value) { this.requestField("name", value); return this; } + public APIRequestGetAds requestPlacementField () { + return this.requestPlacementField(true); + } + public APIRequestGetAds requestPlacementField (boolean value) { + this.requestField("placement", value); + return this; + } public APIRequestGetAds requestPreviewShareableLinkField () { return this.requestPreviewShareableLinkField(true); } @@ -3796,6 +3804,25 @@ public String toString() { } } + public static enum EnumSubscriptionInfo { + @SerializedName("MESSENGER") + VALUE_MESSENGER("MESSENGER"), + @SerializedName("WHATSAPP") + VALUE_WHATSAPP("WHATSAPP"), + ; + + private String value; + + private EnumSubscriptionInfo(String value) { + this.value = value; + } + + @Override + public String toString() { + return value; + } + } + public static enum EnumSubtype { @SerializedName("APP") VALUE_APP("APP"), @@ -3819,6 +3846,8 @@ public static enum EnumSubtype { VALUE_MANAGED("MANAGED"), @SerializedName("MEASUREMENT") VALUE_MEASUREMENT("MEASUREMENT"), + @SerializedName("MESSENGER_SUBSCRIBER_LIST") + VALUE_MESSENGER_SUBSCRIBER_LIST("MESSENGER_SUBSCRIBER_LIST"), @SerializedName("OFFLINE_CONVERSION") VALUE_OFFLINE_CONVERSION("OFFLINE_CONVERSION"), @SerializedName("PARTNER") @@ -3849,6 +3878,25 @@ public String toString() { } } + public static enum EnumUseForProducts { + @SerializedName("ADS") + VALUE_ADS("ADS"), + @SerializedName("MARKETING_MESSAGES") + VALUE_MARKETING_MESSAGES("MARKETING_MESSAGES"), + ; + + private String value; + + private EnumUseForProducts(String value) { + this.value = value; + } + + @Override + public String toString() { + return value; + } + } + public static enum EnumActionSource { @SerializedName("PHYSICAL_STORE") VALUE_PHYSICAL_STORE("PHYSICAL_STORE"), diff --git a/src/main/java/com/facebook/ads/sdk/ExtendedCredit.java b/src/main/java/com/facebook/ads/sdk/ExtendedCredit.java index e1cc3858..7e532de7 100644 --- a/src/main/java/com/facebook/ads/sdk/ExtendedCredit.java +++ b/src/main/java/com/facebook/ads/sdk/ExtendedCredit.java @@ -304,6 +304,14 @@ public APIRequestCreateOwningCreditAllocationConfig createOwningCreditAllocation return new APIRequestCreateOwningCreditAllocationConfig(this.getPrefixedId().toString(), context); } + public APIRequestCreateWhatsAppCreditAttach createWhatsAppCreditAttach() { + return new APIRequestCreateWhatsAppCreditAttach(this.getPrefixedId().toString(), context); + } + + public APIRequestCreateWhatsAppCreditSharing createWhatsAppCreditSharing() { + return new APIRequestCreateWhatsAppCreditSharing(this.getPrefixedId().toString(), context); + } + public APIRequestCreateWhatsAppCreditSharingAndAttach createWhatsAppCreditSharingAndAttach() { return new APIRequestCreateWhatsAppCreditSharingAndAttach(this.getPrefixedId().toString(), context); } @@ -1046,6 +1054,234 @@ public APIRequestCreateOwningCreditAllocationConfig requestField (String field, } + public static class APIRequestCreateWhatsAppCreditAttach extends APIRequest { + + APINode lastResponse = null; + @Override + public APINode getLastResponse() { + return lastResponse; + } + public static final String[] PARAMS = { + "waba_currency", + "waba_id", + }; + + public static final String[] FIELDS = { + }; + + @Override + public APINode parseResponse(String response, String header) throws APIException { + return APINode.parseResponse(response, getContext(), this, header).head(); + } + + @Override + public APINode execute() throws APIException { + return execute(new HashMap()); + } + + @Override + public APINode execute(Map extraParams) throws APIException { + ResponseWrapper rw = executeInternal(extraParams); + lastResponse = parseResponse(rw.getBody(), rw.getHeader()); + return lastResponse; + } + + public ListenableFuture executeAsync() throws APIException { + return executeAsync(new HashMap()); + }; + + public ListenableFuture executeAsync(Map extraParams) throws APIException { + return Futures.transform( + executeAsyncInternal(extraParams), + new Function() { + public APINode apply(ResponseWrapper result) { + try { + return APIRequestCreateWhatsAppCreditAttach.this.parseResponse(result.getBody(), result.getHeader()); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + }, + MoreExecutors.directExecutor() + ); + }; + + public APIRequestCreateWhatsAppCreditAttach(String nodeId, APIContext context) { + super(context, nodeId, "/whatsapp_credit_attach", "POST", Arrays.asList(PARAMS)); + } + + @Override + public APIRequestCreateWhatsAppCreditAttach setParam(String param, Object value) { + setParamInternal(param, value); + return this; + } + + @Override + public APIRequestCreateWhatsAppCreditAttach setParams(Map params) { + setParamsInternal(params); + return this; + } + + + public APIRequestCreateWhatsAppCreditAttach setWabaCurrency (String wabaCurrency) { + this.setParam("waba_currency", wabaCurrency); + return this; + } + + public APIRequestCreateWhatsAppCreditAttach setWabaId (String wabaId) { + this.setParam("waba_id", wabaId); + return this; + } + + public APIRequestCreateWhatsAppCreditAttach requestAllFields () { + return this.requestAllFields(true); + } + + public APIRequestCreateWhatsAppCreditAttach requestAllFields (boolean value) { + for (String field : FIELDS) { + this.requestField(field, value); + } + return this; + } + + @Override + public APIRequestCreateWhatsAppCreditAttach requestFields (List fields) { + return this.requestFields(fields, true); + } + + @Override + public APIRequestCreateWhatsAppCreditAttach requestFields (List fields, boolean value) { + for (String field : fields) { + this.requestField(field, value); + } + return this; + } + + @Override + public APIRequestCreateWhatsAppCreditAttach requestField (String field) { + this.requestField(field, true); + return this; + } + + @Override + public APIRequestCreateWhatsAppCreditAttach requestField (String field, boolean value) { + this.requestFieldInternal(field, value); + return this; + } + + } + + public static class APIRequestCreateWhatsAppCreditSharing extends APIRequest { + + APINode lastResponse = null; + @Override + public APINode getLastResponse() { + return lastResponse; + } + public static final String[] PARAMS = { + "receiving_business_id", + }; + + public static final String[] FIELDS = { + }; + + @Override + public APINode parseResponse(String response, String header) throws APIException { + return APINode.parseResponse(response, getContext(), this, header).head(); + } + + @Override + public APINode execute() throws APIException { + return execute(new HashMap()); + } + + @Override + public APINode execute(Map extraParams) throws APIException { + ResponseWrapper rw = executeInternal(extraParams); + lastResponse = parseResponse(rw.getBody(), rw.getHeader()); + return lastResponse; + } + + public ListenableFuture executeAsync() throws APIException { + return executeAsync(new HashMap()); + }; + + public ListenableFuture executeAsync(Map extraParams) throws APIException { + return Futures.transform( + executeAsyncInternal(extraParams), + new Function() { + public APINode apply(ResponseWrapper result) { + try { + return APIRequestCreateWhatsAppCreditSharing.this.parseResponse(result.getBody(), result.getHeader()); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + }, + MoreExecutors.directExecutor() + ); + }; + + public APIRequestCreateWhatsAppCreditSharing(String nodeId, APIContext context) { + super(context, nodeId, "/whatsapp_credit_sharing", "POST", Arrays.asList(PARAMS)); + } + + @Override + public APIRequestCreateWhatsAppCreditSharing setParam(String param, Object value) { + setParamInternal(param, value); + return this; + } + + @Override + public APIRequestCreateWhatsAppCreditSharing setParams(Map params) { + setParamsInternal(params); + return this; + } + + + public APIRequestCreateWhatsAppCreditSharing setReceivingBusinessId (String receivingBusinessId) { + this.setParam("receiving_business_id", receivingBusinessId); + return this; + } + + public APIRequestCreateWhatsAppCreditSharing requestAllFields () { + return this.requestAllFields(true); + } + + public APIRequestCreateWhatsAppCreditSharing requestAllFields (boolean value) { + for (String field : FIELDS) { + this.requestField(field, value); + } + return this; + } + + @Override + public APIRequestCreateWhatsAppCreditSharing requestFields (List fields) { + return this.requestFields(fields, true); + } + + @Override + public APIRequestCreateWhatsAppCreditSharing requestFields (List fields, boolean value) { + for (String field : fields) { + this.requestField(field, value); + } + return this; + } + + @Override + public APIRequestCreateWhatsAppCreditSharing requestField (String field) { + this.requestField(field, true); + return this; + } + + @Override + public APIRequestCreateWhatsAppCreditSharing requestField (String field, boolean value) { + this.requestFieldInternal(field, value); + return this; + } + + } + public static class APIRequestCreateWhatsAppCreditSharingAndAttach extends APIRequest { APINode lastResponse = null; diff --git a/src/main/java/com/facebook/ads/sdk/Group.java b/src/main/java/com/facebook/ads/sdk/Group.java index b4884002..bb65969a 100644 --- a/src/main/java/com/facebook/ads/sdk/Group.java +++ b/src/main/java/com/facebook/ads/sdk/Group.java @@ -300,10 +300,6 @@ public APIRequestGetAlbums getAlbums() { return new APIRequestGetAlbums(this.getPrefixedId().toString(), context); } - public APIRequestCreateAlbum createAlbum() { - return new APIRequestCreateAlbum(this.getPrefixedId().toString(), context); - } - public APIRequestGetDocs getDocs() { return new APIRequestGetDocs(this.getPrefixedId().toString(), context); } @@ -974,203 +970,6 @@ public APIRequestGetAlbums requestVideoCountField (boolean value) { } } - public static class APIRequestCreateAlbum extends APIRequest { - - Album lastResponse = null; - @Override - public Album getLastResponse() { - return lastResponse; - } - public static final String[] PARAMS = { - "contributors", - "description", - "is_default", - "location", - "make_shared_album", - "message", - "name", - "place", - "privacy", - "session_id", - "tags", - "visible", - }; - - public static final String[] FIELDS = { - }; - - @Override - public Album parseResponse(String response, String header) throws APIException { - return Album.parseResponse(response, getContext(), this, header).head(); - } - - @Override - public Album execute() throws APIException { - return execute(new HashMap()); - } - - @Override - public Album execute(Map extraParams) throws APIException { - ResponseWrapper rw = executeInternal(extraParams); - lastResponse = parseResponse(rw.getBody(), rw.getHeader()); - return lastResponse; - } - - public ListenableFuture executeAsync() throws APIException { - return executeAsync(new HashMap()); - }; - - public ListenableFuture executeAsync(Map extraParams) throws APIException { - return Futures.transform( - executeAsyncInternal(extraParams), - new Function() { - public Album apply(ResponseWrapper result) { - try { - return APIRequestCreateAlbum.this.parseResponse(result.getBody(), result.getHeader()); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - }, - MoreExecutors.directExecutor() - ); - }; - - public APIRequestCreateAlbum(String nodeId, APIContext context) { - super(context, nodeId, "/albums", "POST", Arrays.asList(PARAMS)); - } - - @Override - public APIRequestCreateAlbum setParam(String param, Object value) { - setParamInternal(param, value); - return this; - } - - @Override - public APIRequestCreateAlbum setParams(Map params) { - setParamsInternal(params); - return this; - } - - - public APIRequestCreateAlbum setContributors (List contributors) { - this.setParam("contributors", contributors); - return this; - } - public APIRequestCreateAlbum setContributors (String contributors) { - this.setParam("contributors", contributors); - return this; - } - - public APIRequestCreateAlbum setDescription (String description) { - this.setParam("description", description); - return this; - } - - public APIRequestCreateAlbum setIsDefault (Boolean isDefault) { - this.setParam("is_default", isDefault); - return this; - } - public APIRequestCreateAlbum setIsDefault (String isDefault) { - this.setParam("is_default", isDefault); - return this; - } - - public APIRequestCreateAlbum setLocation (String location) { - this.setParam("location", location); - return this; - } - - public APIRequestCreateAlbum setMakeSharedAlbum (Boolean makeSharedAlbum) { - this.setParam("make_shared_album", makeSharedAlbum); - return this; - } - public APIRequestCreateAlbum setMakeSharedAlbum (String makeSharedAlbum) { - this.setParam("make_shared_album", makeSharedAlbum); - return this; - } - - public APIRequestCreateAlbum setMessage (String message) { - this.setParam("message", message); - return this; - } - - public APIRequestCreateAlbum setName (String name) { - this.setParam("name", name); - return this; - } - - public APIRequestCreateAlbum setPlace (Object place) { - this.setParam("place", place); - return this; - } - public APIRequestCreateAlbum setPlace (String place) { - this.setParam("place", place); - return this; - } - - public APIRequestCreateAlbum setPrivacy (String privacy) { - this.setParam("privacy", privacy); - return this; - } - - public APIRequestCreateAlbum setSessionId (String sessionId) { - this.setParam("session_id", sessionId); - return this; - } - - public APIRequestCreateAlbum setTags (List tags) { - this.setParam("tags", tags); - return this; - } - public APIRequestCreateAlbum setTags (String tags) { - this.setParam("tags", tags); - return this; - } - - public APIRequestCreateAlbum setVisible (String visible) { - this.setParam("visible", visible); - return this; - } - - public APIRequestCreateAlbum requestAllFields () { - return this.requestAllFields(true); - } - - public APIRequestCreateAlbum requestAllFields (boolean value) { - for (String field : FIELDS) { - this.requestField(field, value); - } - return this; - } - - @Override - public APIRequestCreateAlbum requestFields (List fields) { - return this.requestFields(fields, true); - } - - @Override - public APIRequestCreateAlbum requestFields (List fields, boolean value) { - for (String field : fields) { - this.requestField(field, value); - } - return this; - } - - @Override - public APIRequestCreateAlbum requestField (String field) { - this.requestField(field, true); - return this; - } - - @Override - public APIRequestCreateAlbum requestField (String field, boolean value) { - this.requestFieldInternal(field, value); - return this; - } - - } - public static class APIRequestGetDocs extends APIRequest { APINodeList lastResponse = null; @@ -2361,7 +2160,6 @@ public Post getLastResponse() { "fun_fact_prompt_id", "fun_fact_toastee_id", "height", - "holiday_card", "home_checkin_city_id", "image_crops", "implicit_with_tags", @@ -2382,7 +2180,6 @@ public Post getLastResponse() { "name", "nectar_module", "object_attachment", - "offer_like_post_id", "og_action_type_id", "og_hide_object_attachment", "og_icon_id", @@ -2522,10 +2319,6 @@ public APIRequestCreateFeed setAskedFunFactPromptId (String askedFunFactPromptId return this; } - public APIRequestCreateFeed setAsset3dId (Long asset3dId) { - this.setParam("asset3d_id", asset3dId); - return this; - } public APIRequestCreateFeed setAsset3dId (String asset3dId) { this.setParam("asset3d_id", asset3dId); return this; @@ -2741,10 +2534,6 @@ public APIRequestCreateFeed setFormatting (String formatting) { return this; } - public APIRequestCreateFeed setFunFactPromptId (Long funFactPromptId) { - this.setParam("fun_fact_prompt_id", funFactPromptId); - return this; - } public APIRequestCreateFeed setFunFactPromptId (String funFactPromptId) { this.setParam("fun_fact_prompt_id", funFactPromptId); return this; @@ -2768,11 +2557,6 @@ public APIRequestCreateFeed setHeight (String height) { return this; } - public APIRequestCreateFeed setHolidayCard (String holidayCard) { - this.setParam("holiday_card", holidayCard); - return this; - } - public APIRequestCreateFeed setHomeCheckinCityId (Object homeCheckinCityId) { this.setParam("home_checkin_city_id", homeCheckinCityId); return this; @@ -2921,15 +2705,6 @@ public APIRequestCreateFeed setObjectAttachment (String objectAttachment) { return this; } - public APIRequestCreateFeed setOfferLikePostId (Long offerLikePostId) { - this.setParam("offer_like_post_id", offerLikePostId); - return this; - } - public APIRequestCreateFeed setOfferLikePostId (String offerLikePostId) { - this.setParam("offer_like_post_id", offerLikePostId); - return this; - } - public APIRequestCreateFeed setOgActionTypeId (String ogActionTypeId) { this.setParam("og_action_type_id", ogActionTypeId); return this; @@ -6503,7 +6278,6 @@ public AdVideo getLastResponse() { "fun_fact_toastee_id", "guide", "guide_enabled", - "holiday_card", "initial_heading", "initial_pitch", "instant_game_entry_point_data", @@ -6513,7 +6287,6 @@ public AdVideo getLastResponse() { "is_voice_clip", "location_source_id", "manual_privacy", - "offer_like_post_id", "og_action_type_id", "og_icon_id", "og_object_id", @@ -6764,10 +6537,6 @@ public APIRequestCreateVideo setFrontZRotation (String frontZRotation) { return this; } - public APIRequestCreateVideo setFunFactPromptId (Long funFactPromptId) { - this.setParam("fun_fact_prompt_id", funFactPromptId); - return this; - } public APIRequestCreateVideo setFunFactPromptId (String funFactPromptId) { this.setParam("fun_fact_prompt_id", funFactPromptId); return this; @@ -6800,11 +6569,6 @@ public APIRequestCreateVideo setGuideEnabled (String guideEnabled) { return this; } - public APIRequestCreateVideo setHolidayCard (String holidayCard) { - this.setParam("holiday_card", holidayCard); - return this; - } - public APIRequestCreateVideo setInitialHeading (Long initialHeading) { this.setParam("initial_heading", initialHeading); return this; @@ -6878,15 +6642,6 @@ public APIRequestCreateVideo setManualPrivacy (String manualPrivacy) { return this; } - public APIRequestCreateVideo setOfferLikePostId (Long offerLikePostId) { - this.setParam("offer_like_post_id", offerLikePostId); - return this; - } - public APIRequestCreateVideo setOfferLikePostId (String offerLikePostId) { - this.setParam("offer_like_post_id", offerLikePostId); - return this; - } - public APIRequestCreateVideo setOgActionTypeId (String ogActionTypeId) { this.setParam("og_action_type_id", ogActionTypeId); return this; diff --git a/src/main/java/com/facebook/ads/sdk/Hotel.java b/src/main/java/com/facebook/ads/sdk/Hotel.java index 694a56b9..10b0f85d 100644 --- a/src/main/java/com/facebook/ads/sdk/Hotel.java +++ b/src/main/java/com/facebook/ads/sdk/Hotel.java @@ -75,6 +75,16 @@ public class Hotel extends APINode { private String mName = null; @SerializedName("phone") private String mPhone = null; + @SerializedName("product_priority_0") + private Double mProductPriority0 = null; + @SerializedName("product_priority_1") + private Double mProductPriority1 = null; + @SerializedName("product_priority_2") + private Double mProductPriority2 = null; + @SerializedName("product_priority_3") + private Double mProductPriority3 = null; + @SerializedName("product_priority_4") + private Double mProductPriority4 = null; @SerializedName("sale_price") private String mSalePrice = null; @SerializedName("sanitized_images") @@ -395,6 +405,26 @@ public String getFieldPhone() { return mPhone; } + public Double getFieldProductPriority0() { + return mProductPriority0; + } + + public Double getFieldProductPriority1() { + return mProductPriority1; + } + + public Double getFieldProductPriority2() { + return mProductPriority2; + } + + public Double getFieldProductPriority3() { + return mProductPriority3; + } + + public Double getFieldProductPriority4() { + return mProductPriority4; + } + public String getFieldSalePrice() { return mSalePrice; } @@ -1158,6 +1188,11 @@ public Hotel getLastResponse() { "margin_level", "name", "phone", + "product_priority_0", + "product_priority_1", + "product_priority_2", + "product_priority_3", + "product_priority_4", "sale_price", "sanitized_images", "star_rating", @@ -1376,6 +1411,41 @@ public APIRequestGet requestPhoneField (boolean value) { this.requestField("phone", value); return this; } + public APIRequestGet requestProductPriority0Field () { + return this.requestProductPriority0Field(true); + } + public APIRequestGet requestProductPriority0Field (boolean value) { + this.requestField("product_priority_0", value); + return this; + } + public APIRequestGet requestProductPriority1Field () { + return this.requestProductPriority1Field(true); + } + public APIRequestGet requestProductPriority1Field (boolean value) { + this.requestField("product_priority_1", value); + return this; + } + public APIRequestGet requestProductPriority2Field () { + return this.requestProductPriority2Field(true); + } + public APIRequestGet requestProductPriority2Field (boolean value) { + this.requestField("product_priority_2", value); + return this; + } + public APIRequestGet requestProductPriority3Field () { + return this.requestProductPriority3Field(true); + } + public APIRequestGet requestProductPriority3Field (boolean value) { + this.requestField("product_priority_3", value); + return this; + } + public APIRequestGet requestProductPriority4Field () { + return this.requestProductPriority4Field(true); + } + public APIRequestGet requestProductPriority4Field (boolean value) { + this.requestField("product_priority_4", value); + return this; + } public APIRequestGet requestSalePriceField () { return this.requestSalePriceField(true); } @@ -1706,6 +1776,11 @@ public Hotel copyFrom(Hotel instance) { this.mMarginLevel = instance.mMarginLevel; this.mName = instance.mName; this.mPhone = instance.mPhone; + this.mProductPriority0 = instance.mProductPriority0; + this.mProductPriority1 = instance.mProductPriority1; + this.mProductPriority2 = instance.mProductPriority2; + this.mProductPriority3 = instance.mProductPriority3; + this.mProductPriority4 = instance.mProductPriority4; this.mSalePrice = instance.mSalePrice; this.mSanitizedImages = instance.mSanitizedImages; this.mStarRating = instance.mStarRating; diff --git a/src/main/java/com/facebook/ads/sdk/IGMedia.java b/src/main/java/com/facebook/ads/sdk/IGMedia.java index 5f1f91b9..aa004ae0 100644 --- a/src/main/java/com/facebook/ads/sdk/IGMedia.java +++ b/src/main/java/com/facebook/ads/sdk/IGMedia.java @@ -2191,6 +2191,8 @@ public IGMedia getLastResponse() { return lastResponse; } public static final String[] PARAMS = { + "ad_account_id", + "business_id", "primary_fb_page_id", "primary_ig_user_id", "secondary_fb_page_id", @@ -2272,6 +2274,20 @@ public APIRequestGet setParams(Map params) { } + public APIRequestGet setAdAccountId (Long adAccountId) { + this.setParam("ad_account_id", adAccountId); + return this; + } + public APIRequestGet setAdAccountId (String adAccountId) { + this.setParam("ad_account_id", adAccountId); + return this; + } + + public APIRequestGet setBusinessId (String businessId) { + this.setParam("business_id", businessId); + return this; + } + public APIRequestGet setPrimaryFbPageId (String primaryFbPageId) { this.setParam("primary_fb_page_id", primaryFbPageId); return this; diff --git a/src/main/java/com/facebook/ads/sdk/IGMediaForIGOnlyAPI.java b/src/main/java/com/facebook/ads/sdk/IGMediaForIGOnlyAPI.java index d99dfffe..c5c50212 100644 --- a/src/main/java/com/facebook/ads/sdk/IGMediaForIGOnlyAPI.java +++ b/src/main/java/com/facebook/ads/sdk/IGMediaForIGOnlyAPI.java @@ -292,6 +292,10 @@ public APIRequestCreateComment createComment() { return new APIRequestCreateComment(this.getPrefixedId().toString(), context); } + public APIRequestGetInsights getInsights() { + return new APIRequestGetInsights(this.getPrefixedId().toString(), context); + } + public APIRequestGet get() { return new APIRequestGet(this.getPrefixedId().toString(), context); } @@ -871,6 +875,197 @@ public APIRequestCreateComment requestField (String field, boolean value) { } + public static class APIRequestGetInsights extends APIRequest { + + APINodeList lastResponse = null; + @Override + public APINodeList getLastResponse() { + return lastResponse; + } + public static final String[] PARAMS = { + "breakdown", + "metric", + "period", + }; + + public static final String[] FIELDS = { + "description", + "description_from_api_doc", + "id", + "name", + "period", + "title", + "values", + }; + + @Override + public APINodeList parseResponse(String response, String header) throws APIException { + return InsightsResult.parseResponse(response, getContext(), this, header); + } + + @Override + public APINodeList execute() throws APIException { + return execute(new HashMap()); + } + + @Override + public APINodeList execute(Map extraParams) throws APIException { + ResponseWrapper rw = executeInternal(extraParams); + lastResponse = parseResponse(rw.getBody(),rw.getHeader()); + return lastResponse; + } + + public ListenableFuture> executeAsync() throws APIException { + return executeAsync(new HashMap()); + }; + + public ListenableFuture> executeAsync(Map extraParams) throws APIException { + return Futures.transform( + executeAsyncInternal(extraParams), + new Function>() { + public APINodeList apply(ResponseWrapper result) { + try { + return APIRequestGetInsights.this.parseResponse(result.getBody(), result.getHeader()); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + }, + MoreExecutors.directExecutor() + ); + }; + + public APIRequestGetInsights(String nodeId, APIContext context) { + super(context, nodeId, "/insights", "GET", Arrays.asList(PARAMS)); + } + + @Override + public APIRequestGetInsights setParam(String param, Object value) { + setParamInternal(param, value); + return this; + } + + @Override + public APIRequestGetInsights setParams(Map params) { + setParamsInternal(params); + return this; + } + + + public APIRequestGetInsights setBreakdown (List breakdown) { + this.setParam("breakdown", breakdown); + return this; + } + public APIRequestGetInsights setBreakdown (String breakdown) { + this.setParam("breakdown", breakdown); + return this; + } + + public APIRequestGetInsights setMetric (List metric) { + this.setParam("metric", metric); + return this; + } + public APIRequestGetInsights setMetric (String metric) { + this.setParam("metric", metric); + return this; + } + + public APIRequestGetInsights setPeriod (List period) { + this.setParam("period", period); + return this; + } + public APIRequestGetInsights setPeriod (String period) { + this.setParam("period", period); + return this; + } + + public APIRequestGetInsights requestAllFields () { + return this.requestAllFields(true); + } + + public APIRequestGetInsights requestAllFields (boolean value) { + for (String field : FIELDS) { + this.requestField(field, value); + } + return this; + } + + @Override + public APIRequestGetInsights requestFields (List fields) { + return this.requestFields(fields, true); + } + + @Override + public APIRequestGetInsights requestFields (List fields, boolean value) { + for (String field : fields) { + this.requestField(field, value); + } + return this; + } + + @Override + public APIRequestGetInsights requestField (String field) { + this.requestField(field, true); + return this; + } + + @Override + public APIRequestGetInsights requestField (String field, boolean value) { + this.requestFieldInternal(field, value); + return this; + } + + public APIRequestGetInsights requestDescriptionField () { + return this.requestDescriptionField(true); + } + public APIRequestGetInsights requestDescriptionField (boolean value) { + this.requestField("description", value); + return this; + } + public APIRequestGetInsights requestDescriptionFromApiDocField () { + return this.requestDescriptionFromApiDocField(true); + } + public APIRequestGetInsights requestDescriptionFromApiDocField (boolean value) { + this.requestField("description_from_api_doc", value); + return this; + } + public APIRequestGetInsights requestIdField () { + return this.requestIdField(true); + } + public APIRequestGetInsights requestIdField (boolean value) { + this.requestField("id", value); + return this; + } + public APIRequestGetInsights requestNameField () { + return this.requestNameField(true); + } + public APIRequestGetInsights requestNameField (boolean value) { + this.requestField("name", value); + return this; + } + public APIRequestGetInsights requestPeriodField () { + return this.requestPeriodField(true); + } + public APIRequestGetInsights requestPeriodField (boolean value) { + this.requestField("period", value); + return this; + } + public APIRequestGetInsights requestTitleField () { + return this.requestTitleField(true); + } + public APIRequestGetInsights requestTitleField (boolean value) { + this.requestField("title", value); + return this; + } + public APIRequestGetInsights requestValuesField () { + return this.requestValuesField(true); + } + public APIRequestGetInsights requestValuesField (boolean value) { + this.requestField("values", value); + return this; + } + } + public static class APIRequestGet extends APIRequest { IGMediaForIGOnlyAPI lastResponse = null; diff --git a/src/main/java/com/facebook/ads/sdk/IGUserForIGOnlyAPI.java b/src/main/java/com/facebook/ads/sdk/IGUserForIGOnlyAPI.java index 59ad3509..f7061f0a 100644 --- a/src/main/java/com/facebook/ads/sdk/IGUserForIGOnlyAPI.java +++ b/src/main/java/com/facebook/ads/sdk/IGUserForIGOnlyAPI.java @@ -344,6 +344,10 @@ public APIRequestGetWelcomeMessageFlows getWelcomeMessageFlows() { return new APIRequestGetWelcomeMessageFlows(this.getPrefixedId().toString(), context); } + public APIRequestCreateWelcomeMessageFlow createWelcomeMessageFlow() { + return new APIRequestCreateWelcomeMessageFlow(this.getPrefixedId().toString(), context); + } + public APIRequestGet get() { return new APIRequestGet(this.getPrefixedId().toString(), context); } @@ -2829,6 +2833,143 @@ public APIRequestGetWelcomeMessageFlows requestWelcomeMessageSequenceField (bool } } + public static class APIRequestCreateWelcomeMessageFlow extends APIRequest { + + APINode lastResponse = null; + @Override + public APINode getLastResponse() { + return lastResponse; + } + public static final String[] PARAMS = { + "eligible_platforms", + "flow_id", + "name", + "welcome_message_flow", + }; + + public static final String[] FIELDS = { + }; + + @Override + public APINode parseResponse(String response, String header) throws APIException { + return APINode.parseResponse(response, getContext(), this, header).head(); + } + + @Override + public APINode execute() throws APIException { + return execute(new HashMap()); + } + + @Override + public APINode execute(Map extraParams) throws APIException { + ResponseWrapper rw = executeInternal(extraParams); + lastResponse = parseResponse(rw.getBody(), rw.getHeader()); + return lastResponse; + } + + public ListenableFuture executeAsync() throws APIException { + return executeAsync(new HashMap()); + }; + + public ListenableFuture executeAsync(Map extraParams) throws APIException { + return Futures.transform( + executeAsyncInternal(extraParams), + new Function() { + public APINode apply(ResponseWrapper result) { + try { + return APIRequestCreateWelcomeMessageFlow.this.parseResponse(result.getBody(), result.getHeader()); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + }, + MoreExecutors.directExecutor() + ); + }; + + public APIRequestCreateWelcomeMessageFlow(String nodeId, APIContext context) { + super(context, nodeId, "/welcome_message_flows", "POST", Arrays.asList(PARAMS)); + } + + @Override + public APIRequestCreateWelcomeMessageFlow setParam(String param, Object value) { + setParamInternal(param, value); + return this; + } + + @Override + public APIRequestCreateWelcomeMessageFlow setParams(Map params) { + setParamsInternal(params); + return this; + } + + + public APIRequestCreateWelcomeMessageFlow setEligiblePlatforms (List eligiblePlatforms) { + this.setParam("eligible_platforms", eligiblePlatforms); + return this; + } + public APIRequestCreateWelcomeMessageFlow setEligiblePlatforms (String eligiblePlatforms) { + this.setParam("eligible_platforms", eligiblePlatforms); + return this; + } + + public APIRequestCreateWelcomeMessageFlow setFlowId (String flowId) { + this.setParam("flow_id", flowId); + return this; + } + + public APIRequestCreateWelcomeMessageFlow setName (String name) { + this.setParam("name", name); + return this; + } + + public APIRequestCreateWelcomeMessageFlow setWelcomeMessageFlow (List welcomeMessageFlow) { + this.setParam("welcome_message_flow", welcomeMessageFlow); + return this; + } + public APIRequestCreateWelcomeMessageFlow setWelcomeMessageFlow (String welcomeMessageFlow) { + this.setParam("welcome_message_flow", welcomeMessageFlow); + return this; + } + + public APIRequestCreateWelcomeMessageFlow requestAllFields () { + return this.requestAllFields(true); + } + + public APIRequestCreateWelcomeMessageFlow requestAllFields (boolean value) { + for (String field : FIELDS) { + this.requestField(field, value); + } + return this; + } + + @Override + public APIRequestCreateWelcomeMessageFlow requestFields (List fields) { + return this.requestFields(fields, true); + } + + @Override + public APIRequestCreateWelcomeMessageFlow requestFields (List fields, boolean value) { + for (String field : fields) { + this.requestField(field, value); + } + return this; + } + + @Override + public APIRequestCreateWelcomeMessageFlow requestField (String field) { + this.requestField(field, true); + return this; + } + + @Override + public APIRequestCreateWelcomeMessageFlow requestField (String field, boolean value) { + this.requestFieldInternal(field, value); + return this; + } + + } + public static class APIRequestGet extends APIRequest { IGUserForIGOnlyAPI lastResponse = null; @@ -3158,6 +3299,27 @@ public String toString() { } } + public static enum EnumEligiblePlatforms { + @SerializedName("INSTAGRAM") + VALUE_INSTAGRAM("INSTAGRAM"), + @SerializedName("MESSENGER") + VALUE_MESSENGER("MESSENGER"), + @SerializedName("WHATSAPP") + VALUE_WHATSAPP("WHATSAPP"), + ; + + private String value; + + private EnumEligiblePlatforms(String value) { + this.value = value; + } + + @Override + public String toString() { + return value; + } + } + synchronized /*package*/ static Gson getGson() { if (gson != null) { diff --git a/src/main/java/com/facebook/ads/sdk/InsightsResult.java b/src/main/java/com/facebook/ads/sdk/InsightsResult.java index fd9090dd..392f7ac9 100644 --- a/src/main/java/com/facebook/ads/sdk/InsightsResult.java +++ b/src/main/java/com/facebook/ads/sdk/InsightsResult.java @@ -276,6 +276,119 @@ public InsightsResult setFieldValues(String value) { } + public static enum EnumBreakdown { + @SerializedName("action_type") + VALUE_ACTION_TYPE("action_type"), + @SerializedName("follow_type") + VALUE_FOLLOW_TYPE("follow_type"), + @SerializedName("story_navigation_action_type") + VALUE_STORY_NAVIGATION_ACTION_TYPE("story_navigation_action_type"), + @SerializedName("surface_type") + VALUE_SURFACE_TYPE("surface_type"), + ; + + private String value; + + private EnumBreakdown(String value) { + this.value = value; + } + + @Override + public String toString() { + return value; + } + } + + public static enum EnumMetric { + @SerializedName("clips_replays_count") + VALUE_CLIPS_REPLAYS_COUNT("clips_replays_count"), + @SerializedName("comments") + VALUE_COMMENTS("comments"), + @SerializedName("follows") + VALUE_FOLLOWS("follows"), + @SerializedName("ig_reels_aggregated_all_plays_count") + VALUE_IG_REELS_AGGREGATED_ALL_PLAYS_COUNT("ig_reels_aggregated_all_plays_count"), + @SerializedName("ig_reels_avg_watch_time") + VALUE_IG_REELS_AVG_WATCH_TIME("ig_reels_avg_watch_time"), + @SerializedName("ig_reels_video_view_total_time") + VALUE_IG_REELS_VIDEO_VIEW_TOTAL_TIME("ig_reels_video_view_total_time"), + @SerializedName("impressions") + VALUE_IMPRESSIONS("impressions"), + @SerializedName("likes") + VALUE_LIKES("likes"), + @SerializedName("navigation") + VALUE_NAVIGATION("navigation"), + @SerializedName("peak_concurrent_viewers") + VALUE_PEAK_CONCURRENT_VIEWERS("peak_concurrent_viewers"), + @SerializedName("plays") + VALUE_PLAYS("plays"), + @SerializedName("profile_activity") + VALUE_PROFILE_ACTIVITY("profile_activity"), + @SerializedName("profile_visits") + VALUE_PROFILE_VISITS("profile_visits"), + @SerializedName("quotes") + VALUE_QUOTES("quotes"), + @SerializedName("reach") + VALUE_REACH("reach"), + @SerializedName("replies") + VALUE_REPLIES("replies"), + @SerializedName("reposts") + VALUE_REPOSTS("reposts"), + @SerializedName("saved") + VALUE_SAVED("saved"), + @SerializedName("shares") + VALUE_SHARES("shares"), + @SerializedName("thread_replies") + VALUE_THREAD_REPLIES("thread_replies"), + @SerializedName("thread_shares") + VALUE_THREAD_SHARES("thread_shares"), + @SerializedName("total_interactions") + VALUE_TOTAL_INTERACTIONS("total_interactions"), + @SerializedName("video_views") + VALUE_VIDEO_VIEWS("video_views"), + @SerializedName("views") + VALUE_VIEWS("views"), + ; + + private String value; + + private EnumMetric(String value) { + this.value = value; + } + + @Override + public String toString() { + return value; + } + } + + public static enum EnumPeriod { + @SerializedName("day") + VALUE_DAY("day"), + @SerializedName("days_28") + VALUE_DAYS_28("days_28"), + @SerializedName("lifetime") + VALUE_LIFETIME("lifetime"), + @SerializedName("month") + VALUE_MONTH("month"), + @SerializedName("total_over_range") + VALUE_TOTAL_OVER_RANGE("total_over_range"), + @SerializedName("week") + VALUE_WEEK("week"), + ; + + private String value; + + private EnumPeriod(String value) { + this.value = value; + } + + @Override + public String toString() { + return value; + } + } + public static enum EnumDatePreset { @SerializedName("data_maximum") VALUE_DATA_MAXIMUM("data_maximum"), @@ -331,62 +444,6 @@ public String toString() { } } - public static enum EnumPeriod { - @SerializedName("day") - VALUE_DAY("day"), - @SerializedName("days_28") - VALUE_DAYS_28("days_28"), - @SerializedName("lifetime") - VALUE_LIFETIME("lifetime"), - @SerializedName("month") - VALUE_MONTH("month"), - @SerializedName("total_over_range") - VALUE_TOTAL_OVER_RANGE("total_over_range"), - @SerializedName("week") - VALUE_WEEK("week"), - ; - - private String value; - - private EnumPeriod(String value) { - this.value = value; - } - - @Override - public String toString() { - return value; - } - } - - public static enum EnumMetric { - @SerializedName("PAGES_FB_STORY_REPLIES") - VALUE_PAGES_FB_STORY_REPLIES("PAGES_FB_STORY_REPLIES"), - @SerializedName("PAGES_FB_STORY_SHARES") - VALUE_PAGES_FB_STORY_SHARES("PAGES_FB_STORY_SHARES"), - @SerializedName("PAGES_FB_STORY_STICKER_INTERACTIONS") - VALUE_PAGES_FB_STORY_STICKER_INTERACTIONS("PAGES_FB_STORY_STICKER_INTERACTIONS"), - @SerializedName("PAGES_FB_STORY_THREAD_LIGHTWEIGHT_REACTIONS") - VALUE_PAGES_FB_STORY_THREAD_LIGHTWEIGHT_REACTIONS("PAGES_FB_STORY_THREAD_LIGHTWEIGHT_REACTIONS"), - @SerializedName("PAGE_STORY_IMPRESSIONS_BY_STORY_ID") - VALUE_PAGE_STORY_IMPRESSIONS_BY_STORY_ID("PAGE_STORY_IMPRESSIONS_BY_STORY_ID"), - @SerializedName("PAGE_STORY_IMPRESSIONS_BY_STORY_ID_UNIQUE") - VALUE_PAGE_STORY_IMPRESSIONS_BY_STORY_ID_UNIQUE("PAGE_STORY_IMPRESSIONS_BY_STORY_ID_UNIQUE"), - @SerializedName("STORY_INTERACTION") - VALUE_STORY_INTERACTION("STORY_INTERACTION"), - ; - - private String value; - - private EnumMetric(String value) { - this.value = value; - } - - @Override - public String toString() { - return value; - } - } - synchronized /*package*/ static Gson getGson() { if (gson != null) { diff --git a/src/main/java/com/facebook/ads/sdk/InstagramInsightsResult.java b/src/main/java/com/facebook/ads/sdk/InstagramInsightsResult.java index fd072df7..7ca7c51c 100644 --- a/src/main/java/com/facebook/ads/sdk/InstagramInsightsResult.java +++ b/src/main/java/com/facebook/ads/sdk/InstagramInsightsResult.java @@ -340,6 +340,8 @@ public static enum EnumMetric { VALUE_SHARES("shares"), @SerializedName("thread_replies") VALUE_THREAD_REPLIES("thread_replies"), + @SerializedName("thread_shares") + VALUE_THREAD_SHARES("thread_shares"), @SerializedName("total_interactions") VALUE_TOTAL_INTERACTIONS("total_interactions"), @SerializedName("video_views") diff --git a/src/main/java/com/facebook/ads/sdk/DogNotificationSettings.java b/src/main/java/com/facebook/ads/sdk/MessengerBusinessTemplate.java similarity index 50% rename from src/main/java/com/facebook/ads/sdk/DogNotificationSettings.java rename to src/main/java/com/facebook/ads/sdk/MessengerBusinessTemplate.java index db423e24..19e0a489 100644 --- a/src/main/java/com/facebook/ads/sdk/DogNotificationSettings.java +++ b/src/main/java/com/facebook/ads/sdk/MessengerBusinessTemplate.java @@ -40,68 +40,84 @@ * pull request for this class. * */ -public class DogNotificationSettings extends APINode { - @SerializedName("dog_check_key") - private String mDogCheckKey = null; +public class MessengerBusinessTemplate extends APINode { + @SerializedName("category") + private String mCategory = null; + @SerializedName("components") + private List mComponents = null; + @SerializedName("creation_time") + private Long mCreationTime = null; @SerializedName("id") private String mId = null; - @SerializedName("subscription_status_per_channel") - private List> mSubscriptionStatusPerChannel = null; + @SerializedName("language") + private String mLanguage = null; + @SerializedName("language_count") + private Long mLanguageCount = null; + @SerializedName("last_updated_time") + private String mLastUpdatedTime = null; + @SerializedName("library_template_name") + private String mLibraryTemplateName = null; + @SerializedName("name") + private String mName = null; + @SerializedName("rejected_reason") + private String mRejectedReason = null; + @SerializedName("status") + private String mStatus = null; protected static Gson gson = null; - DogNotificationSettings() { + MessengerBusinessTemplate() { } - public DogNotificationSettings(Long id, APIContext context) { + public MessengerBusinessTemplate(Long id, APIContext context) { this(id.toString(), context); } - public DogNotificationSettings(String id, APIContext context) { + public MessengerBusinessTemplate(String id, APIContext context) { this.mId = id; this.context = context; } - public DogNotificationSettings fetch() throws APIException{ - DogNotificationSettings newInstance = fetchById(this.getPrefixedId().toString(), this.context); + public MessengerBusinessTemplate fetch() throws APIException{ + MessengerBusinessTemplate newInstance = fetchById(this.getPrefixedId().toString(), this.context); this.copyFrom(newInstance); return this; } - public static DogNotificationSettings fetchById(Long id, APIContext context) throws APIException { + public static MessengerBusinessTemplate fetchById(Long id, APIContext context) throws APIException { return fetchById(id.toString(), context); } - public static ListenableFuture fetchByIdAsync(Long id, APIContext context) throws APIException { + public static ListenableFuture fetchByIdAsync(Long id, APIContext context) throws APIException { return fetchByIdAsync(id.toString(), context); } - public static DogNotificationSettings fetchById(String id, APIContext context) throws APIException { + public static MessengerBusinessTemplate fetchById(String id, APIContext context) throws APIException { return new APIRequestGet(id, context) .requestAllFields() .execute(); } - public static ListenableFuture fetchByIdAsync(String id, APIContext context) throws APIException { + public static ListenableFuture fetchByIdAsync(String id, APIContext context) throws APIException { return new APIRequestGet(id, context) .requestAllFields() .executeAsync(); } - public static APINodeList fetchByIds(List ids, List fields, APIContext context) throws APIException { - return (APINodeList)( - new APIRequest(context, "", "/", "GET", DogNotificationSettings.getParser()) + public static APINodeList fetchByIds(List ids, List fields, APIContext context) throws APIException { + return (APINodeList)( + new APIRequest(context, "", "/", "GET", MessengerBusinessTemplate.getParser()) .setParam("ids", APIRequest.joinStringList(ids)) .requestFields(fields) .execute() ); } - public static ListenableFuture> fetchByIdsAsync(List ids, List fields, APIContext context) throws APIException { + public static ListenableFuture> fetchByIdsAsync(List ids, List fields, APIContext context) throws APIException { return - new APIRequest(context, "", "/", "GET", DogNotificationSettings.getParser()) + new APIRequest(context, "", "/", "GET", MessengerBusinessTemplate.getParser()) .setParam("ids", APIRequest.joinStringList(ids)) .requestFields(fields) .executeAsyncBase(); @@ -114,12 +130,12 @@ private String getPrefixedId() { public String getId() { return getFieldId().toString(); } - public static DogNotificationSettings loadJSON(String json, APIContext context, String header) { - DogNotificationSettings dogNotificationSettings = getGson().fromJson(json, DogNotificationSettings.class); + public static MessengerBusinessTemplate loadJSON(String json, APIContext context, String header) { + MessengerBusinessTemplate messengerBusinessTemplate = getGson().fromJson(json, MessengerBusinessTemplate.class); if (context.isDebug()) { JsonParser parser = new JsonParser(); JsonElement o1 = parser.parse(json); - JsonElement o2 = parser.parse(dogNotificationSettings.toString()); + JsonElement o2 = parser.parse(messengerBusinessTemplate.toString()); if (o1.getAsJsonObject().get("__fb_trace_id__") != null) { o2.getAsJsonObject().add("__fb_trace_id__", o1.getAsJsonObject().get("__fb_trace_id__")); } @@ -129,14 +145,14 @@ public static DogNotificationSettings loadJSON(String json, APIContext context, context.log("[Object]" + o2); } } - dogNotificationSettings.context = context; - dogNotificationSettings.rawValue = json; - dogNotificationSettings.header = header; - return dogNotificationSettings; + messengerBusinessTemplate.context = context; + messengerBusinessTemplate.rawValue = json; + messengerBusinessTemplate.header = header; + return messengerBusinessTemplate; } - public static APINodeList parseResponse(String json, APIContext context, APIRequest request, String header) throws MalformedResponseException { - APINodeList dogNotificationSettingss = new APINodeList(request, json, header); + public static APINodeList parseResponse(String json, APIContext context, APIRequest request, String header) throws MalformedResponseException { + APINodeList messengerBusinessTemplates = new APINodeList(request, json, header); JsonArray arr; JsonObject obj; JsonParser parser = new JsonParser(); @@ -147,9 +163,9 @@ public static APINodeList parseResponse(String json, AP // First, check if it's a pure JSON Array arr = result.getAsJsonArray(); for (int i = 0; i < arr.size(); i++) { - dogNotificationSettingss.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header)); + messengerBusinessTemplates.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header)); }; - return dogNotificationSettingss; + return messengerBusinessTemplates; } else if (result.isJsonObject()) { obj = result.getAsJsonObject(); if (obj.has("data")) { @@ -159,20 +175,20 @@ public static APINodeList parseResponse(String json, AP JsonObject cursors = paging.get("cursors").getAsJsonObject(); String before = cursors.has("before") ? cursors.get("before").getAsString() : null; String after = cursors.has("after") ? cursors.get("after").getAsString() : null; - dogNotificationSettingss.setCursors(before, after); + messengerBusinessTemplates.setCursors(before, after); } String previous = paging.has("previous") ? paging.get("previous").getAsString() : null; String next = paging.has("next") ? paging.get("next").getAsString() : null; - dogNotificationSettingss.setPaging(previous, next); + messengerBusinessTemplates.setPaging(previous, next); if (context.hasAppSecret()) { - dogNotificationSettingss.setAppSecret(context.getAppSecretProof()); + messengerBusinessTemplates.setAppSecret(context.getAppSecretProof()); } } if (obj.get("data").isJsonArray()) { // Second, check if it's a JSON array with "data" arr = obj.get("data").getAsJsonArray(); for (int i = 0; i < arr.size(); i++) { - dogNotificationSettingss.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header)); + messengerBusinessTemplates.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header)); }; } else if (obj.get("data").isJsonObject()) { // Third, check if it's a JSON object with "data" @@ -183,23 +199,23 @@ public static APINodeList parseResponse(String json, AP isRedownload = true; obj = obj.getAsJsonObject(s); for (Map.Entry entry : obj.entrySet()) { - dogNotificationSettingss.add(loadJSON(entry.getValue().toString(), context, header)); + messengerBusinessTemplates.add(loadJSON(entry.getValue().toString(), context, header)); } break; } } if (!isRedownload) { - dogNotificationSettingss.add(loadJSON(obj.toString(), context, header)); + messengerBusinessTemplates.add(loadJSON(obj.toString(), context, header)); } } - return dogNotificationSettingss; + return messengerBusinessTemplates; } else if (obj.has("images")) { // Fourth, check if it's a map of image objects obj = obj.get("images").getAsJsonObject(); for (Map.Entry entry : obj.entrySet()) { - dogNotificationSettingss.add(loadJSON(entry.getValue().toString(), context, header)); + messengerBusinessTemplates.add(loadJSON(entry.getValue().toString(), context, header)); } - return dogNotificationSettingss; + return messengerBusinessTemplates; } else { // Fifth, check if it's an array of objects indexed by id boolean isIdIndexedArray = true; @@ -216,20 +232,20 @@ public static APINodeList parseResponse(String json, AP value.getAsJsonObject().get("id") != null && value.getAsJsonObject().get("id").getAsString().equals(key) ) { - dogNotificationSettingss.add(loadJSON(value.toString(), context, header)); + messengerBusinessTemplates.add(loadJSON(value.toString(), context, header)); } else { isIdIndexedArray = false; break; } } if (isIdIndexedArray) { - return dogNotificationSettingss; + return messengerBusinessTemplates; } // Sixth, check if it's pure JsonObject - dogNotificationSettingss.clear(); - dogNotificationSettingss.add(loadJSON(json, context, header)); - return dogNotificationSettingss; + messengerBusinessTemplates.clear(); + messengerBusinessTemplates.add(loadJSON(json, context, header)); + return messengerBusinessTemplates; } } } catch (Exception e) { @@ -261,62 +277,102 @@ public APIRequestGet get() { } - public String getFieldDogCheckKey() { - return mDogCheckKey; + public String getFieldCategory() { + return mCategory; + } + + public List getFieldComponents() { + return mComponents; + } + + public Long getFieldCreationTime() { + return mCreationTime; } public String getFieldId() { return mId; } - public List> getFieldSubscriptionStatusPerChannel() { - return mSubscriptionStatusPerChannel; + public String getFieldLanguage() { + return mLanguage; + } + + public Long getFieldLanguageCount() { + return mLanguageCount; + } + + public String getFieldLastUpdatedTime() { + return mLastUpdatedTime; + } + + public String getFieldLibraryTemplateName() { + return mLibraryTemplateName; } + public String getFieldName() { + return mName; + } + + public String getFieldRejectedReason() { + return mRejectedReason; + } + + public String getFieldStatus() { + return mStatus; + } - public static class APIRequestGet extends APIRequest { - DogNotificationSettings lastResponse = null; + public static class APIRequestGet extends APIRequest { + + MessengerBusinessTemplate lastResponse = null; @Override - public DogNotificationSettings getLastResponse() { + public MessengerBusinessTemplate getLastResponse() { return lastResponse; } public static final String[] PARAMS = { }; public static final String[] FIELDS = { - "dog_check_key", + "category", + "components", + "creation_time", "id", - "subscription_status_per_channel", + "language", + "language_count", + "last_updated_time", + "library_template_name", + "name", + "rejected_reason", + "status", }; @Override - public DogNotificationSettings parseResponse(String response, String header) throws APIException { - return DogNotificationSettings.parseResponse(response, getContext(), this, header).head(); + public MessengerBusinessTemplate parseResponse(String response, String header) throws APIException { + return MessengerBusinessTemplate.parseResponse(response, getContext(), this, header).head(); } @Override - public DogNotificationSettings execute() throws APIException { + public MessengerBusinessTemplate execute() throws APIException { return execute(new HashMap()); } @Override - public DogNotificationSettings execute(Map extraParams) throws APIException { + public MessengerBusinessTemplate execute(Map extraParams) throws APIException { ResponseWrapper rw = executeInternal(extraParams); lastResponse = parseResponse(rw.getBody(), rw.getHeader()); return lastResponse; } - public ListenableFuture executeAsync() throws APIException { + public ListenableFuture executeAsync() throws APIException { return executeAsync(new HashMap()); }; - public ListenableFuture executeAsync(Map extraParams) throws APIException { + public ListenableFuture executeAsync(Map extraParams) throws APIException { return Futures.transform( executeAsyncInternal(extraParams), - new Function() { - public DogNotificationSettings apply(ResponseWrapper result) { + new Function() { + public MessengerBusinessTemplate apply(ResponseWrapper result) { try { return APIRequestGet.this.parseResponse(result.getBody(), result.getHeader()); } catch (Exception e) { @@ -381,11 +437,25 @@ public APIRequestGet requestField (String field, boolean value) { return this; } - public APIRequestGet requestDogCheckKeyField () { - return this.requestDogCheckKeyField(true); + public APIRequestGet requestCategoryField () { + return this.requestCategoryField(true); + } + public APIRequestGet requestCategoryField (boolean value) { + this.requestField("category", value); + return this; + } + public APIRequestGet requestComponentsField () { + return this.requestComponentsField(true); + } + public APIRequestGet requestComponentsField (boolean value) { + this.requestField("components", value); + return this; + } + public APIRequestGet requestCreationTimeField () { + return this.requestCreationTimeField(true); } - public APIRequestGet requestDogCheckKeyField (boolean value) { - this.requestField("dog_check_key", value); + public APIRequestGet requestCreationTimeField (boolean value) { + this.requestField("creation_time", value); return this; } public APIRequestGet requestIdField () { @@ -395,11 +465,53 @@ public APIRequestGet requestIdField (boolean value) { this.requestField("id", value); return this; } - public APIRequestGet requestSubscriptionStatusPerChannelField () { - return this.requestSubscriptionStatusPerChannelField(true); + public APIRequestGet requestLanguageField () { + return this.requestLanguageField(true); + } + public APIRequestGet requestLanguageField (boolean value) { + this.requestField("language", value); + return this; + } + public APIRequestGet requestLanguageCountField () { + return this.requestLanguageCountField(true); + } + public APIRequestGet requestLanguageCountField (boolean value) { + this.requestField("language_count", value); + return this; + } + public APIRequestGet requestLastUpdatedTimeField () { + return this.requestLastUpdatedTimeField(true); + } + public APIRequestGet requestLastUpdatedTimeField (boolean value) { + this.requestField("last_updated_time", value); + return this; + } + public APIRequestGet requestLibraryTemplateNameField () { + return this.requestLibraryTemplateNameField(true); + } + public APIRequestGet requestLibraryTemplateNameField (boolean value) { + this.requestField("library_template_name", value); + return this; + } + public APIRequestGet requestNameField () { + return this.requestNameField(true); + } + public APIRequestGet requestNameField (boolean value) { + this.requestField("name", value); + return this; + } + public APIRequestGet requestRejectedReasonField () { + return this.requestRejectedReasonField(true); + } + public APIRequestGet requestRejectedReasonField (boolean value) { + this.requestField("rejected_reason", value); + return this; + } + public APIRequestGet requestStatusField () { + return this.requestStatusField(true); } - public APIRequestGet requestSubscriptionStatusPerChannelField (boolean value) { - this.requestField("subscription_status_per_channel", value); + public APIRequestGet requestStatusField (boolean value) { + this.requestField("status", value); return this; } } @@ -418,19 +530,27 @@ public APIRequestGet requestSubscriptionStatusPerChannelField (boolean value) { return gson; } - public DogNotificationSettings copyFrom(DogNotificationSettings instance) { - this.mDogCheckKey = instance.mDogCheckKey; + public MessengerBusinessTemplate copyFrom(MessengerBusinessTemplate instance) { + this.mCategory = instance.mCategory; + this.mComponents = instance.mComponents; + this.mCreationTime = instance.mCreationTime; this.mId = instance.mId; - this.mSubscriptionStatusPerChannel = instance.mSubscriptionStatusPerChannel; + this.mLanguage = instance.mLanguage; + this.mLanguageCount = instance.mLanguageCount; + this.mLastUpdatedTime = instance.mLastUpdatedTime; + this.mLibraryTemplateName = instance.mLibraryTemplateName; + this.mName = instance.mName; + this.mRejectedReason = instance.mRejectedReason; + this.mStatus = instance.mStatus; this.context = instance.context; this.rawValue = instance.rawValue; return this; } - public static APIRequest.ResponseParser getParser() { - return new APIRequest.ResponseParser() { - public APINodeList parseResponse(String response, APIContext context, APIRequest request, String header) throws MalformedResponseException { - return DogNotificationSettings.parseResponse(response, context, request, header); + public static APIRequest.ResponseParser getParser() { + return new APIRequest.ResponseParser() { + public APINodeList parseResponse(String response, APIContext context, APIRequest request, String header) throws MalformedResponseException { + return MessengerBusinessTemplate.parseResponse(response, context, request, header); } }; } diff --git a/src/main/java/com/facebook/ads/sdk/Page.java b/src/main/java/com/facebook/ads/sdk/Page.java index 0b6f34a2..f19db64c 100644 --- a/src/main/java/com/facebook/ads/sdk/Page.java +++ b/src/main/java/com/facebook/ads/sdk/Page.java @@ -680,6 +680,10 @@ public APIRequestGetCrosspostWhitelistedPages getCrosspostWhitelistedPages() { return new APIRequestGetCrosspostWhitelistedPages(this.getPrefixedId().toString(), context); } + public APIRequestGetCtxOptimizationEligibility getCtxOptimizationEligibility() { + return new APIRequestGetCtxOptimizationEligibility(this.getPrefixedId().toString(), context); + } + public APIRequestGetCustomLabels getCustomLabels() { return new APIRequestGetCustomLabels(this.getPrefixedId().toString(), context); } @@ -9180,6 +9184,119 @@ public APIRequestGetCrosspostWhitelistedPages requestWrittenByField (boolean val } } + public static class APIRequestGetCtxOptimizationEligibility extends APIRequest { + + APINodeList lastResponse = null; + @Override + public APINodeList getLastResponse() { + return lastResponse; + } + public static final String[] PARAMS = { + }; + + public static final String[] FIELDS = { + "ctm", + }; + + @Override + public APINodeList parseResponse(String response, String header) throws APIException { + return CTXOptimizationEligibility.parseResponse(response, getContext(), this, header); + } + + @Override + public APINodeList execute() throws APIException { + return execute(new HashMap()); + } + + @Override + public APINodeList execute(Map extraParams) throws APIException { + ResponseWrapper rw = executeInternal(extraParams); + lastResponse = parseResponse(rw.getBody(),rw.getHeader()); + return lastResponse; + } + + public ListenableFuture> executeAsync() throws APIException { + return executeAsync(new HashMap()); + }; + + public ListenableFuture> executeAsync(Map extraParams) throws APIException { + return Futures.transform( + executeAsyncInternal(extraParams), + new Function>() { + public APINodeList apply(ResponseWrapper result) { + try { + return APIRequestGetCtxOptimizationEligibility.this.parseResponse(result.getBody(), result.getHeader()); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + }, + MoreExecutors.directExecutor() + ); + }; + + public APIRequestGetCtxOptimizationEligibility(String nodeId, APIContext context) { + super(context, nodeId, "/ctx_optimization_eligibility", "GET", Arrays.asList(PARAMS)); + } + + @Override + public APIRequestGetCtxOptimizationEligibility setParam(String param, Object value) { + setParamInternal(param, value); + return this; + } + + @Override + public APIRequestGetCtxOptimizationEligibility setParams(Map params) { + setParamsInternal(params); + return this; + } + + + public APIRequestGetCtxOptimizationEligibility requestAllFields () { + return this.requestAllFields(true); + } + + public APIRequestGetCtxOptimizationEligibility requestAllFields (boolean value) { + for (String field : FIELDS) { + this.requestField(field, value); + } + return this; + } + + @Override + public APIRequestGetCtxOptimizationEligibility requestFields (List fields) { + return this.requestFields(fields, true); + } + + @Override + public APIRequestGetCtxOptimizationEligibility requestFields (List fields, boolean value) { + for (String field : fields) { + this.requestField(field, value); + } + return this; + } + + @Override + public APIRequestGetCtxOptimizationEligibility requestField (String field) { + this.requestField(field, true); + return this; + } + + @Override + public APIRequestGetCtxOptimizationEligibility requestField (String field, boolean value) { + this.requestFieldInternal(field, value); + return this; + } + + public APIRequestGetCtxOptimizationEligibility requestCtmField () { + return this.requestCtmField(true); + } + public APIRequestGetCtxOptimizationEligibility requestCtmField (boolean value) { + this.requestField("ctm", value); + return this; + } + } + public static class APIRequestGetCustomLabels extends APIRequest { APINodeList lastResponse = null; @@ -11331,7 +11448,6 @@ public Page getLastResponse() { "fun_fact_prompt_id", "fun_fact_toastee_id", "height", - "holiday_card", "home_checkin_city_id", "image_crops", "implicit_with_tags", @@ -11352,7 +11468,6 @@ public Page getLastResponse() { "name", "nectar_module", "object_attachment", - "offer_like_post_id", "og_action_type_id", "og_hide_object_attachment", "og_icon_id", @@ -11492,10 +11607,6 @@ public APIRequestCreateFeed setAskedFunFactPromptId (String askedFunFactPromptId return this; } - public APIRequestCreateFeed setAsset3dId (Long asset3dId) { - this.setParam("asset3d_id", asset3dId); - return this; - } public APIRequestCreateFeed setAsset3dId (String asset3dId) { this.setParam("asset3d_id", asset3dId); return this; @@ -11720,10 +11831,6 @@ public APIRequestCreateFeed setFormatting (String formatting) { return this; } - public APIRequestCreateFeed setFunFactPromptId (Long funFactPromptId) { - this.setParam("fun_fact_prompt_id", funFactPromptId); - return this; - } public APIRequestCreateFeed setFunFactPromptId (String funFactPromptId) { this.setParam("fun_fact_prompt_id", funFactPromptId); return this; @@ -11747,11 +11854,6 @@ public APIRequestCreateFeed setHeight (String height) { return this; } - public APIRequestCreateFeed setHolidayCard (String holidayCard) { - this.setParam("holiday_card", holidayCard); - return this; - } - public APIRequestCreateFeed setHomeCheckinCityId (Object homeCheckinCityId) { this.setParam("home_checkin_city_id", homeCheckinCityId); return this; @@ -11900,15 +12002,6 @@ public APIRequestCreateFeed setObjectAttachment (String objectAttachment) { return this; } - public APIRequestCreateFeed setOfferLikePostId (Long offerLikePostId) { - this.setParam("offer_like_post_id", offerLikePostId); - return this; - } - public APIRequestCreateFeed setOfferLikePostId (String offerLikePostId) { - this.setParam("offer_like_post_id", offerLikePostId); - return this; - } - public APIRequestCreateFeed setOgActionTypeId (String ogActionTypeId) { this.setParam("og_action_type_id", ogActionTypeId); return this; @@ -33295,7 +33388,6 @@ public AdVideo getLastResponse() { "fun_fact_toastee_id", "guide", "guide_enabled", - "holiday_card", "initial_heading", "initial_pitch", "instant_game_entry_point_data", @@ -33307,7 +33399,6 @@ public AdVideo getLastResponse() { "manual_privacy", "multilingual_data", "no_story", - "offer_like_post_id", "og_action_type_id", "og_icon_id", "og_object_id", @@ -33644,10 +33735,6 @@ public APIRequestCreateVideo setFrontZRotation (String frontZRotation) { return this; } - public APIRequestCreateVideo setFunFactPromptId (Long funFactPromptId) { - this.setParam("fun_fact_prompt_id", funFactPromptId); - return this; - } public APIRequestCreateVideo setFunFactPromptId (String funFactPromptId) { this.setParam("fun_fact_prompt_id", funFactPromptId); return this; @@ -33680,11 +33767,6 @@ public APIRequestCreateVideo setGuideEnabled (String guideEnabled) { return this; } - public APIRequestCreateVideo setHolidayCard (String holidayCard) { - this.setParam("holiday_card", holidayCard); - return this; - } - public APIRequestCreateVideo setInitialHeading (Long initialHeading) { this.setParam("initial_heading", initialHeading); return this; @@ -33776,15 +33858,6 @@ public APIRequestCreateVideo setNoStory (String noStory) { return this; } - public APIRequestCreateVideo setOfferLikePostId (Long offerLikePostId) { - this.setParam("offer_like_post_id", offerLikePostId); - return this; - } - public APIRequestCreateVideo setOfferLikePostId (String offerLikePostId) { - this.setParam("offer_like_post_id", offerLikePostId); - return this; - } - public APIRequestCreateVideo setOgActionTypeId (String ogActionTypeId) { this.setParam("og_action_type_id", ogActionTypeId); return this; diff --git a/src/main/java/com/facebook/ads/sdk/PartnershipAdContentSearchMedia.java b/src/main/java/com/facebook/ads/sdk/PartnershipAdContentSearchMedia.java index 3fd99001..d9a93722 100644 --- a/src/main/java/com/facebook/ads/sdk/PartnershipAdContentSearchMedia.java +++ b/src/main/java/com/facebook/ads/sdk/PartnershipAdContentSearchMedia.java @@ -41,10 +41,16 @@ * */ public class PartnershipAdContentSearchMedia extends APINode { + @SerializedName("ig_ad_code_sponsor_count") + private Long mIgAdCodeSponsorCount = null; + @SerializedName("ig_ad_code_sponsors") + private List mIgAdCodeSponsors = null; @SerializedName("ig_media") private IGMedia mIgMedia = null; @SerializedName("ig_media_has_product_tags") private Boolean mIgMediaHasProductTags = null; + @SerializedName("is_ad_code_eligible_for_boosting_by_two_sponsors") + private Boolean mIsAdCodeEligibleForBoostingByTwoSponsors = null; @SerializedName("is_ad_code_entry") private Boolean mIsAdCodeEntry = null; protected static Gson gson = null; @@ -198,6 +204,29 @@ public String toString() { } + public Long getFieldIgAdCodeSponsorCount() { + return mIgAdCodeSponsorCount; + } + + public PartnershipAdContentSearchMedia setFieldIgAdCodeSponsorCount(Long value) { + this.mIgAdCodeSponsorCount = value; + return this; + } + + public List getFieldIgAdCodeSponsors() { + return mIgAdCodeSponsors; + } + + public PartnershipAdContentSearchMedia setFieldIgAdCodeSponsors(List value) { + this.mIgAdCodeSponsors = value; + return this; + } + + public PartnershipAdContentSearchMedia setFieldIgAdCodeSponsors(String value) { + Type type = new TypeToken>(){}.getType(); + this.mIgAdCodeSponsors = FBPageAndInstagramAccount.getGson().fromJson(value, type); + return this; + } public IGMedia getFieldIgMedia() { if (mIgMedia != null) { mIgMedia.context = getContext(); @@ -224,6 +253,15 @@ public PartnershipAdContentSearchMedia setFieldIgMediaHasProductTags(Boolean val return this; } + public Boolean getFieldIsAdCodeEligibleForBoostingByTwoSponsors() { + return mIsAdCodeEligibleForBoostingByTwoSponsors; + } + + public PartnershipAdContentSearchMedia setFieldIsAdCodeEligibleForBoostingByTwoSponsors(Boolean value) { + this.mIsAdCodeEligibleForBoostingByTwoSponsors = value; + return this; + } + public Boolean getFieldIsAdCodeEntry() { return mIsAdCodeEntry; } @@ -250,8 +288,11 @@ public PartnershipAdContentSearchMedia setFieldIsAdCodeEntry(Boolean value) { } public PartnershipAdContentSearchMedia copyFrom(PartnershipAdContentSearchMedia instance) { + this.mIgAdCodeSponsorCount = instance.mIgAdCodeSponsorCount; + this.mIgAdCodeSponsors = instance.mIgAdCodeSponsors; this.mIgMedia = instance.mIgMedia; this.mIgMediaHasProductTags = instance.mIgMediaHasProductTags; + this.mIsAdCodeEligibleForBoostingByTwoSponsors = instance.mIsAdCodeEligibleForBoostingByTwoSponsors; this.mIsAdCodeEntry = instance.mIsAdCodeEntry; this.context = instance.context; this.rawValue = instance.rawValue; diff --git a/src/main/java/com/facebook/ads/sdk/Placement.java b/src/main/java/com/facebook/ads/sdk/Placement.java new file mode 100644 index 00000000..212428b5 --- /dev/null +++ b/src/main/java/com/facebook/ads/sdk/Placement.java @@ -0,0 +1,478 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * All rights reserved. + * + * This source code is licensed under the license found in the + * LICENSE file in the root directory of this source tree. + */ + +package com.facebook.ads.sdk; + +import java.io.File; +import java.lang.reflect.Modifier; +import java.lang.reflect.Type; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.common.base.Function; +import com.google.common.util.concurrent.Futures; +import com.google.common.util.concurrent.ListenableFuture; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.common.util.concurrent.SettableFuture; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; +import com.google.gson.JsonParser; + +import com.facebook.ads.sdk.APIException.MalformedResponseException; + +/** + * This class is auto-generated. + * + * For any issues or feature requests related to this class, please let us know + * on github and we'll fix in our codegen framework. We'll not be able to accept + * pull request for this class. + * + */ +public class Placement extends APINode { + @SerializedName("audience_network_positions") + private List mAudienceNetworkPositions = null; + @SerializedName("device_platforms") + private List mDevicePlatforms = null; + @SerializedName("effective_audience_network_positions") + private List mEffectiveAudienceNetworkPositions = null; + @SerializedName("effective_device_platforms") + private List mEffectiveDevicePlatforms = null; + @SerializedName("effective_facebook_positions") + private List mEffectiveFacebookPositions = null; + @SerializedName("effective_instagram_positions") + private List mEffectiveInstagramPositions = null; + @SerializedName("effective_messenger_positions") + private List mEffectiveMessengerPositions = null; + @SerializedName("effective_oculus_positions") + private List mEffectiveOculusPositions = null; + @SerializedName("effective_publisher_platforms") + private List mEffectivePublisherPlatforms = null; + @SerializedName("effective_threads_positions") + private List mEffectiveThreadsPositions = null; + @SerializedName("effective_whatsapp_positions") + private List mEffectiveWhatsappPositions = null; + @SerializedName("facebook_positions") + private List mFacebookPositions = null; + @SerializedName("instagram_positions") + private List mInstagramPositions = null; + @SerializedName("messenger_positions") + private List mMessengerPositions = null; + @SerializedName("oculus_positions") + private List mOculusPositions = null; + @SerializedName("publisher_platforms") + private List mPublisherPlatforms = null; + @SerializedName("threads_positions") + private List mThreadsPositions = null; + @SerializedName("whatsapp_positions") + private List mWhatsappPositions = null; + protected static Gson gson = null; + + public Placement() { + } + + public String getId() { + return null; + } + public static Placement loadJSON(String json, APIContext context, String header) { + Placement placement = getGson().fromJson(json, Placement.class); + if (context.isDebug()) { + JsonParser parser = new JsonParser(); + JsonElement o1 = parser.parse(json); + JsonElement o2 = parser.parse(placement.toString()); + if (o1.getAsJsonObject().get("__fb_trace_id__") != null) { + o2.getAsJsonObject().add("__fb_trace_id__", o1.getAsJsonObject().get("__fb_trace_id__")); + } + if (!o1.equals(o2)) { + context.log("[Warning] When parsing response, object is not consistent with JSON:"); + context.log("[JSON]" + o1); + context.log("[Object]" + o2); + } + } + placement.context = context; + placement.rawValue = json; + placement.header = header; + return placement; + } + + public static APINodeList parseResponse(String json, APIContext context, APIRequest request, String header) throws MalformedResponseException { + APINodeList placements = new APINodeList(request, json, header); + JsonArray arr; + JsonObject obj; + JsonParser parser = new JsonParser(); + Exception exception = null; + try{ + JsonElement result = parser.parse(json); + if (result.isJsonArray()) { + // First, check if it's a pure JSON Array + arr = result.getAsJsonArray(); + for (int i = 0; i < arr.size(); i++) { + placements.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header)); + }; + return placements; + } else if (result.isJsonObject()) { + obj = result.getAsJsonObject(); + if (obj.has("data")) { + if (obj.has("paging")) { + JsonObject paging = obj.get("paging").getAsJsonObject(); + if (paging.has("cursors")) { + JsonObject cursors = paging.get("cursors").getAsJsonObject(); + String before = cursors.has("before") ? cursors.get("before").getAsString() : null; + String after = cursors.has("after") ? cursors.get("after").getAsString() : null; + placements.setCursors(before, after); + } + String previous = paging.has("previous") ? paging.get("previous").getAsString() : null; + String next = paging.has("next") ? paging.get("next").getAsString() : null; + placements.setPaging(previous, next); + if (context.hasAppSecret()) { + placements.setAppSecret(context.getAppSecretProof()); + } + } + if (obj.get("data").isJsonArray()) { + // Second, check if it's a JSON array with "data" + arr = obj.get("data").getAsJsonArray(); + for (int i = 0; i < arr.size(); i++) { + placements.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header)); + }; + } else if (obj.get("data").isJsonObject()) { + // Third, check if it's a JSON object with "data" + obj = obj.get("data").getAsJsonObject(); + boolean isRedownload = false; + for (String s : new String[]{"campaigns", "adsets", "ads"}) { + if (obj.has(s)) { + isRedownload = true; + obj = obj.getAsJsonObject(s); + for (Map.Entry entry : obj.entrySet()) { + placements.add(loadJSON(entry.getValue().toString(), context, header)); + } + break; + } + } + if (!isRedownload) { + placements.add(loadJSON(obj.toString(), context, header)); + } + } + return placements; + } else if (obj.has("images")) { + // Fourth, check if it's a map of image objects + obj = obj.get("images").getAsJsonObject(); + for (Map.Entry entry : obj.entrySet()) { + placements.add(loadJSON(entry.getValue().toString(), context, header)); + } + return placements; + } else { + // Fifth, check if it's an array of objects indexed by id + boolean isIdIndexedArray = true; + for (Map.Entry entry : obj.entrySet()) { + String key = (String) entry.getKey(); + if (key.equals("__fb_trace_id__")) { + continue; + } + JsonElement value = (JsonElement) entry.getValue(); + if ( + value != null && + value.isJsonObject() && + value.getAsJsonObject().has("id") && + value.getAsJsonObject().get("id") != null && + value.getAsJsonObject().get("id").getAsString().equals(key) + ) { + placements.add(loadJSON(value.toString(), context, header)); + } else { + isIdIndexedArray = false; + break; + } + } + if (isIdIndexedArray) { + return placements; + } + + // Sixth, check if it's pure JsonObject + placements.clear(); + placements.add(loadJSON(json, context, header)); + return placements; + } + } + } catch (Exception e) { + exception = e; + } + throw new MalformedResponseException( + "Invalid response string: " + json, + exception + ); + } + + @Override + public APIContext getContext() { + return context; + } + + @Override + public void setContext(APIContext context) { + this.context = context; + } + + @Override + public String toString() { + return getGson().toJson(this); + } + + + public List getFieldAudienceNetworkPositions() { + return mAudienceNetworkPositions; + } + + public Placement setFieldAudienceNetworkPositions(List value) { + this.mAudienceNetworkPositions = value; + return this; + } + + public List getFieldDevicePlatforms() { + return mDevicePlatforms; + } + + public Placement setFieldDevicePlatforms(List value) { + this.mDevicePlatforms = value; + return this; + } + + public List getFieldEffectiveAudienceNetworkPositions() { + return mEffectiveAudienceNetworkPositions; + } + + public Placement setFieldEffectiveAudienceNetworkPositions(List value) { + this.mEffectiveAudienceNetworkPositions = value; + return this; + } + + public List getFieldEffectiveDevicePlatforms() { + return mEffectiveDevicePlatforms; + } + + public Placement setFieldEffectiveDevicePlatforms(List value) { + this.mEffectiveDevicePlatforms = value; + return this; + } + + public List getFieldEffectiveFacebookPositions() { + return mEffectiveFacebookPositions; + } + + public Placement setFieldEffectiveFacebookPositions(List value) { + this.mEffectiveFacebookPositions = value; + return this; + } + + public List getFieldEffectiveInstagramPositions() { + return mEffectiveInstagramPositions; + } + + public Placement setFieldEffectiveInstagramPositions(List value) { + this.mEffectiveInstagramPositions = value; + return this; + } + + public List getFieldEffectiveMessengerPositions() { + return mEffectiveMessengerPositions; + } + + public Placement setFieldEffectiveMessengerPositions(List value) { + this.mEffectiveMessengerPositions = value; + return this; + } + + public List getFieldEffectiveOculusPositions() { + return mEffectiveOculusPositions; + } + + public Placement setFieldEffectiveOculusPositions(List value) { + this.mEffectiveOculusPositions = value; + return this; + } + + public List getFieldEffectivePublisherPlatforms() { + return mEffectivePublisherPlatforms; + } + + public Placement setFieldEffectivePublisherPlatforms(List value) { + this.mEffectivePublisherPlatforms = value; + return this; + } + + public List getFieldEffectiveThreadsPositions() { + return mEffectiveThreadsPositions; + } + + public Placement setFieldEffectiveThreadsPositions(List value) { + this.mEffectiveThreadsPositions = value; + return this; + } + + public List getFieldEffectiveWhatsappPositions() { + return mEffectiveWhatsappPositions; + } + + public Placement setFieldEffectiveWhatsappPositions(List value) { + this.mEffectiveWhatsappPositions = value; + return this; + } + + public List getFieldFacebookPositions() { + return mFacebookPositions; + } + + public Placement setFieldFacebookPositions(List value) { + this.mFacebookPositions = value; + return this; + } + + public List getFieldInstagramPositions() { + return mInstagramPositions; + } + + public Placement setFieldInstagramPositions(List value) { + this.mInstagramPositions = value; + return this; + } + + public List getFieldMessengerPositions() { + return mMessengerPositions; + } + + public Placement setFieldMessengerPositions(List value) { + this.mMessengerPositions = value; + return this; + } + + public List getFieldOculusPositions() { + return mOculusPositions; + } + + public Placement setFieldOculusPositions(List value) { + this.mOculusPositions = value; + return this; + } + + public List getFieldPublisherPlatforms() { + return mPublisherPlatforms; + } + + public Placement setFieldPublisherPlatforms(List value) { + this.mPublisherPlatforms = value; + return this; + } + + public List getFieldThreadsPositions() { + return mThreadsPositions; + } + + public Placement setFieldThreadsPositions(List value) { + this.mThreadsPositions = value; + return this; + } + + public List getFieldWhatsappPositions() { + return mWhatsappPositions; + } + + public Placement setFieldWhatsappPositions(List value) { + this.mWhatsappPositions = value; + return this; + } + + + + public static enum EnumDevicePlatforms { + @SerializedName("desktop") + VALUE_DESKTOP("desktop"), + @SerializedName("mobile") + VALUE_MOBILE("mobile"), + ; + + private String value; + + private EnumDevicePlatforms(String value) { + this.value = value; + } + + @Override + public String toString() { + return value; + } + } + + public static enum EnumEffectiveDevicePlatforms { + @SerializedName("desktop") + VALUE_DESKTOP("desktop"), + @SerializedName("mobile") + VALUE_MOBILE("mobile"), + ; + + private String value; + + private EnumEffectiveDevicePlatforms(String value) { + this.value = value; + } + + @Override + public String toString() { + return value; + } + } + + + synchronized /*package*/ static Gson getGson() { + if (gson != null) { + return gson; + } else { + gson = new GsonBuilder() + .excludeFieldsWithModifiers(Modifier.STATIC) + .excludeFieldsWithModifiers(Modifier.PROTECTED) + .disableHtmlEscaping() + .create(); + } + return gson; + } + + public Placement copyFrom(Placement instance) { + this.mAudienceNetworkPositions = instance.mAudienceNetworkPositions; + this.mDevicePlatforms = instance.mDevicePlatforms; + this.mEffectiveAudienceNetworkPositions = instance.mEffectiveAudienceNetworkPositions; + this.mEffectiveDevicePlatforms = instance.mEffectiveDevicePlatforms; + this.mEffectiveFacebookPositions = instance.mEffectiveFacebookPositions; + this.mEffectiveInstagramPositions = instance.mEffectiveInstagramPositions; + this.mEffectiveMessengerPositions = instance.mEffectiveMessengerPositions; + this.mEffectiveOculusPositions = instance.mEffectiveOculusPositions; + this.mEffectivePublisherPlatforms = instance.mEffectivePublisherPlatforms; + this.mEffectiveThreadsPositions = instance.mEffectiveThreadsPositions; + this.mEffectiveWhatsappPositions = instance.mEffectiveWhatsappPositions; + this.mFacebookPositions = instance.mFacebookPositions; + this.mInstagramPositions = instance.mInstagramPositions; + this.mMessengerPositions = instance.mMessengerPositions; + this.mOculusPositions = instance.mOculusPositions; + this.mPublisherPlatforms = instance.mPublisherPlatforms; + this.mThreadsPositions = instance.mThreadsPositions; + this.mWhatsappPositions = instance.mWhatsappPositions; + this.context = instance.context; + this.rawValue = instance.rawValue; + return this; + } + + public static APIRequest.ResponseParser getParser() { + return new APIRequest.ResponseParser() { + public APINodeList parseResponse(String response, APIContext context, APIRequest request, String header) throws MalformedResponseException { + return Placement.parseResponse(response, context, request, header); + } + }; + } +} diff --git a/src/main/java/com/facebook/ads/sdk/ProductCatalog.java b/src/main/java/com/facebook/ads/sdk/ProductCatalog.java index 6163db12..1c8f1912 100644 --- a/src/main/java/com/facebook/ads/sdk/ProductCatalog.java +++ b/src/main/java/com/facebook/ads/sdk/ProductCatalog.java @@ -416,6 +416,10 @@ public APIRequestCreateLocalizedItemsBatch createLocalizedItemsBatch() { return new APIRequestCreateLocalizedItemsBatch(this.getPrefixedId().toString(), context); } + public APIRequestCreateMarketPlacePartnerSellersDetail createMarketPlacePartnerSellersDetail() { + return new APIRequestCreateMarketPlacePartnerSellersDetail(this.getPrefixedId().toString(), context); + } + public APIRequestGetPricingVariablesBatch getPricingVariablesBatch() { return new APIRequestGetPricingVariablesBatch(this.getPrefixedId().toString(), context); } @@ -5753,6 +5757,11 @@ public APINodeList getLastResponse() { "margin_level", "name", "phone", + "product_priority_0", + "product_priority_1", + "product_priority_2", + "product_priority_3", + "product_priority_4", "sale_price", "sanitized_images", "star_rating", @@ -5989,6 +5998,41 @@ public APIRequestGetHotels requestPhoneField (boolean value) { this.requestField("phone", value); return this; } + public APIRequestGetHotels requestProductPriority0Field () { + return this.requestProductPriority0Field(true); + } + public APIRequestGetHotels requestProductPriority0Field (boolean value) { + this.requestField("product_priority_0", value); + return this; + } + public APIRequestGetHotels requestProductPriority1Field () { + return this.requestProductPriority1Field(true); + } + public APIRequestGetHotels requestProductPriority1Field (boolean value) { + this.requestField("product_priority_1", value); + return this; + } + public APIRequestGetHotels requestProductPriority2Field () { + return this.requestProductPriority2Field(true); + } + public APIRequestGetHotels requestProductPriority2Field (boolean value) { + this.requestField("product_priority_2", value); + return this; + } + public APIRequestGetHotels requestProductPriority3Field () { + return this.requestProductPriority3Field(true); + } + public APIRequestGetHotels requestProductPriority3Field (boolean value) { + this.requestField("product_priority_3", value); + return this; + } + public APIRequestGetHotels requestProductPriority4Field () { + return this.requestProductPriority4Field(true); + } + public APIRequestGetHotels requestProductPriority4Field (boolean value) { + this.requestField("product_priority_4", value); + return this; + } public APIRequestGetHotels requestSalePriceField () { return this.requestSalePriceField(true); } @@ -6539,6 +6583,121 @@ public APIRequestCreateLocalizedItemsBatch requestField (String field, boolean v } + public static class APIRequestCreateMarketPlacePartnerSellersDetail extends APIRequest { + + ProductCatalog lastResponse = null; + @Override + public ProductCatalog getLastResponse() { + return lastResponse; + } + public static final String[] PARAMS = { + "requests", + }; + + public static final String[] FIELDS = { + }; + + @Override + public ProductCatalog parseResponse(String response, String header) throws APIException { + return ProductCatalog.parseResponse(response, getContext(), this, header).head(); + } + + @Override + public ProductCatalog execute() throws APIException { + return execute(new HashMap()); + } + + @Override + public ProductCatalog execute(Map extraParams) throws APIException { + ResponseWrapper rw = executeInternal(extraParams); + lastResponse = parseResponse(rw.getBody(), rw.getHeader()); + return lastResponse; + } + + public ListenableFuture executeAsync() throws APIException { + return executeAsync(new HashMap()); + }; + + public ListenableFuture executeAsync(Map extraParams) throws APIException { + return Futures.transform( + executeAsyncInternal(extraParams), + new Function() { + public ProductCatalog apply(ResponseWrapper result) { + try { + return APIRequestCreateMarketPlacePartnerSellersDetail.this.parseResponse(result.getBody(), result.getHeader()); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + }, + MoreExecutors.directExecutor() + ); + }; + + public APIRequestCreateMarketPlacePartnerSellersDetail(String nodeId, APIContext context) { + super(context, nodeId, "/marketplace_partner_sellers_details", "POST", Arrays.asList(PARAMS)); + } + + @Override + public APIRequestCreateMarketPlacePartnerSellersDetail setParam(String param, Object value) { + setParamInternal(param, value); + return this; + } + + @Override + public APIRequestCreateMarketPlacePartnerSellersDetail setParams(Map params) { + setParamsInternal(params); + return this; + } + + + public APIRequestCreateMarketPlacePartnerSellersDetail setRequests (Map requests) { + this.setParam("requests", requests); + return this; + } + public APIRequestCreateMarketPlacePartnerSellersDetail setRequests (String requests) { + this.setParam("requests", requests); + return this; + } + + public APIRequestCreateMarketPlacePartnerSellersDetail requestAllFields () { + return this.requestAllFields(true); + } + + public APIRequestCreateMarketPlacePartnerSellersDetail requestAllFields (boolean value) { + for (String field : FIELDS) { + this.requestField(field, value); + } + return this; + } + + @Override + public APIRequestCreateMarketPlacePartnerSellersDetail requestFields (List fields) { + return this.requestFields(fields, true); + } + + @Override + public APIRequestCreateMarketPlacePartnerSellersDetail requestFields (List fields, boolean value) { + for (String field : fields) { + this.requestField(field, value); + } + return this; + } + + @Override + public APIRequestCreateMarketPlacePartnerSellersDetail requestField (String field) { + this.requestField(field, true); + return this; + } + + @Override + public APIRequestCreateMarketPlacePartnerSellersDetail requestField (String field, boolean value) { + this.requestFieldInternal(field, value); + return this; + } + + } + public static class APIRequestGetPricingVariablesBatch extends APIRequest { APINodeList lastResponse = null; @@ -9653,6 +9812,11 @@ public APINodeList getLastResponse() { "offer_disclaimer", "offer_type", "price", + "product_priority_0", + "product_priority_1", + "product_priority_2", + "product_priority_3", + "product_priority_4", "sanitized_images", "start_date", "start_time", @@ -10000,6 +10164,41 @@ public APIRequestGetVehicleOffers requestPriceField (boolean value) { this.requestField("price", value); return this; } + public APIRequestGetVehicleOffers requestProductPriority0Field () { + return this.requestProductPriority0Field(true); + } + public APIRequestGetVehicleOffers requestProductPriority0Field (boolean value) { + this.requestField("product_priority_0", value); + return this; + } + public APIRequestGetVehicleOffers requestProductPriority1Field () { + return this.requestProductPriority1Field(true); + } + public APIRequestGetVehicleOffers requestProductPriority1Field (boolean value) { + this.requestField("product_priority_1", value); + return this; + } + public APIRequestGetVehicleOffers requestProductPriority2Field () { + return this.requestProductPriority2Field(true); + } + public APIRequestGetVehicleOffers requestProductPriority2Field (boolean value) { + this.requestField("product_priority_2", value); + return this; + } + public APIRequestGetVehicleOffers requestProductPriority3Field () { + return this.requestProductPriority3Field(true); + } + public APIRequestGetVehicleOffers requestProductPriority3Field (boolean value) { + this.requestField("product_priority_3", value); + return this; + } + public APIRequestGetVehicleOffers requestProductPriority4Field () { + return this.requestProductPriority4Field(true); + } + public APIRequestGetVehicleOffers requestProductPriority4Field (boolean value) { + this.requestField("product_priority_4", value); + return this; + } public APIRequestGetVehicleOffers requestSanitizedImagesField () { return this.requestSanitizedImagesField(true); } @@ -10138,6 +10337,11 @@ public APINodeList getLastResponse() { "previous_currency", "previous_price", "price", + "product_priority_0", + "product_priority_1", + "product_priority_2", + "product_priority_3", + "product_priority_4", "sale_currency", "sale_price", "sanitized_images", @@ -10488,6 +10692,41 @@ public APIRequestGetVehicles requestPriceField (boolean value) { this.requestField("price", value); return this; } + public APIRequestGetVehicles requestProductPriority0Field () { + return this.requestProductPriority0Field(true); + } + public APIRequestGetVehicles requestProductPriority0Field (boolean value) { + this.requestField("product_priority_0", value); + return this; + } + public APIRequestGetVehicles requestProductPriority1Field () { + return this.requestProductPriority1Field(true); + } + public APIRequestGetVehicles requestProductPriority1Field (boolean value) { + this.requestField("product_priority_1", value); + return this; + } + public APIRequestGetVehicles requestProductPriority2Field () { + return this.requestProductPriority2Field(true); + } + public APIRequestGetVehicles requestProductPriority2Field (boolean value) { + this.requestField("product_priority_2", value); + return this; + } + public APIRequestGetVehicles requestProductPriority3Field () { + return this.requestProductPriority3Field(true); + } + public APIRequestGetVehicles requestProductPriority3Field (boolean value) { + this.requestField("product_priority_3", value); + return this; + } + public APIRequestGetVehicles requestProductPriority4Field () { + return this.requestProductPriority4Field(true); + } + public APIRequestGetVehicles requestProductPriority4Field (boolean value) { + this.requestField("product_priority_4", value); + return this; + } public APIRequestGetVehicles requestSaleCurrencyField () { return this.requestSaleCurrencyField(true); } diff --git a/src/main/java/com/facebook/ads/sdk/ProductCatalogDiagnosticGroup.java b/src/main/java/com/facebook/ads/sdk/ProductCatalogDiagnosticGroup.java index 170f1b08..14b21c41 100644 --- a/src/main/java/com/facebook/ads/sdk/ProductCatalogDiagnosticGroup.java +++ b/src/main/java/com/facebook/ads/sdk/ProductCatalogDiagnosticGroup.java @@ -42,7 +42,7 @@ */ public class ProductCatalogDiagnosticGroup extends APINode { @SerializedName("affected_channels") - private List mAffectedChannels = null; + private List mAffectedChannels = null; @SerializedName("affected_entity") private EnumAffectedEntity mAffectedEntity = null; @SerializedName("affected_features") @@ -214,11 +214,11 @@ public String toString() { } - public List getFieldAffectedChannels() { + public List getFieldAffectedChannels() { return mAffectedChannels; } - public ProductCatalogDiagnosticGroup setFieldAffectedChannels(List value) { + public ProductCatalogDiagnosticGroup setFieldAffectedChannels(List value) { this.mAffectedChannels = value; return this; } @@ -315,49 +315,6 @@ public ProductCatalogDiagnosticGroup setFieldType(EnumType value) { - public static enum EnumAffectedChannels { - @SerializedName("b2c_marketplace") - VALUE_B2C_MARKETPLACE("b2c_marketplace"), - @SerializedName("c2c_marketplace") - VALUE_C2C_MARKETPLACE("c2c_marketplace"), - @SerializedName("da") - VALUE_DA("da"), - @SerializedName("daily_deals") - VALUE_DAILY_DEALS("daily_deals"), - @SerializedName("daily_deals_legacy") - VALUE_DAILY_DEALS_LEGACY("daily_deals_legacy"), - @SerializedName("ig_product_tagging") - VALUE_IG_PRODUCT_TAGGING("ig_product_tagging"), - @SerializedName("marketplace") - VALUE_MARKETPLACE("marketplace"), - @SerializedName("marketplace_ads_deprecated") - VALUE_MARKETPLACE_ADS_DEPRECATED("marketplace_ads_deprecated"), - @SerializedName("marketplace_shops") - VALUE_MARKETPLACE_SHOPS("marketplace_shops"), - @SerializedName("mini_shops") - VALUE_MINI_SHOPS("mini_shops"), - @SerializedName("offline_conversions") - VALUE_OFFLINE_CONVERSIONS("offline_conversions"), - @SerializedName("shops") - VALUE_SHOPS("shops"), - @SerializedName("universal_checkout") - VALUE_UNIVERSAL_CHECKOUT("universal_checkout"), - @SerializedName("whatsapp") - VALUE_WHATSAPP("whatsapp"), - ; - - private String value; - - private EnumAffectedChannels(String value) { - this.value = value; - } - - @Override - public String toString() { - return value; - } - } - public static enum EnumAffectedEntity { @SerializedName("product_catalog") VALUE_PRODUCT_CATALOG("product_catalog"), @@ -456,6 +413,49 @@ public String toString() { } } + public static enum EnumAffectedChannels { + @SerializedName("b2c_marketplace") + VALUE_B2C_MARKETPLACE("b2c_marketplace"), + @SerializedName("c2c_marketplace") + VALUE_C2C_MARKETPLACE("c2c_marketplace"), + @SerializedName("da") + VALUE_DA("da"), + @SerializedName("daily_deals") + VALUE_DAILY_DEALS("daily_deals"), + @SerializedName("daily_deals_legacy") + VALUE_DAILY_DEALS_LEGACY("daily_deals_legacy"), + @SerializedName("ig_product_tagging") + VALUE_IG_PRODUCT_TAGGING("ig_product_tagging"), + @SerializedName("marketplace") + VALUE_MARKETPLACE("marketplace"), + @SerializedName("marketplace_ads_deprecated") + VALUE_MARKETPLACE_ADS_DEPRECATED("marketplace_ads_deprecated"), + @SerializedName("marketplace_shops") + VALUE_MARKETPLACE_SHOPS("marketplace_shops"), + @SerializedName("mini_shops") + VALUE_MINI_SHOPS("mini_shops"), + @SerializedName("offline_conversions") + VALUE_OFFLINE_CONVERSIONS("offline_conversions"), + @SerializedName("shops") + VALUE_SHOPS("shops"), + @SerializedName("universal_checkout") + VALUE_UNIVERSAL_CHECKOUT("universal_checkout"), + @SerializedName("whatsapp") + VALUE_WHATSAPP("whatsapp"), + ; + + private String value; + + private EnumAffectedChannels(String value) { + this.value = value; + } + + @Override + public String toString() { + return value; + } + } + public static enum EnumAffectedEntities { @SerializedName("product_catalog") VALUE_PRODUCT_CATALOG("product_catalog"), diff --git a/src/main/java/com/facebook/ads/sdk/ProductFeed.java b/src/main/java/com/facebook/ads/sdk/ProductFeed.java index 730e95ef..109e9c77 100644 --- a/src/main/java/com/facebook/ads/sdk/ProductFeed.java +++ b/src/main/java/com/facebook/ads/sdk/ProductFeed.java @@ -1900,6 +1900,11 @@ public APINodeList getLastResponse() { "margin_level", "name", "phone", + "product_priority_0", + "product_priority_1", + "product_priority_2", + "product_priority_3", + "product_priority_4", "sale_price", "sanitized_images", "star_rating", @@ -2136,6 +2141,41 @@ public APIRequestGetHotels requestPhoneField (boolean value) { this.requestField("phone", value); return this; } + public APIRequestGetHotels requestProductPriority0Field () { + return this.requestProductPriority0Field(true); + } + public APIRequestGetHotels requestProductPriority0Field (boolean value) { + this.requestField("product_priority_0", value); + return this; + } + public APIRequestGetHotels requestProductPriority1Field () { + return this.requestProductPriority1Field(true); + } + public APIRequestGetHotels requestProductPriority1Field (boolean value) { + this.requestField("product_priority_1", value); + return this; + } + public APIRequestGetHotels requestProductPriority2Field () { + return this.requestProductPriority2Field(true); + } + public APIRequestGetHotels requestProductPriority2Field (boolean value) { + this.requestField("product_priority_2", value); + return this; + } + public APIRequestGetHotels requestProductPriority3Field () { + return this.requestProductPriority3Field(true); + } + public APIRequestGetHotels requestProductPriority3Field (boolean value) { + this.requestField("product_priority_3", value); + return this; + } + public APIRequestGetHotels requestProductPriority4Field () { + return this.requestProductPriority4Field(true); + } + public APIRequestGetHotels requestProductPriority4Field (boolean value) { + this.requestField("product_priority_4", value); + return this; + } public APIRequestGetHotels requestSalePriceField () { return this.requestSalePriceField(true); } @@ -4331,6 +4371,11 @@ public APINodeList getLastResponse() { "offer_disclaimer", "offer_type", "price", + "product_priority_0", + "product_priority_1", + "product_priority_2", + "product_priority_3", + "product_priority_4", "sanitized_images", "start_date", "start_time", @@ -4678,6 +4723,41 @@ public APIRequestGetVehicleOffers requestPriceField (boolean value) { this.requestField("price", value); return this; } + public APIRequestGetVehicleOffers requestProductPriority0Field () { + return this.requestProductPriority0Field(true); + } + public APIRequestGetVehicleOffers requestProductPriority0Field (boolean value) { + this.requestField("product_priority_0", value); + return this; + } + public APIRequestGetVehicleOffers requestProductPriority1Field () { + return this.requestProductPriority1Field(true); + } + public APIRequestGetVehicleOffers requestProductPriority1Field (boolean value) { + this.requestField("product_priority_1", value); + return this; + } + public APIRequestGetVehicleOffers requestProductPriority2Field () { + return this.requestProductPriority2Field(true); + } + public APIRequestGetVehicleOffers requestProductPriority2Field (boolean value) { + this.requestField("product_priority_2", value); + return this; + } + public APIRequestGetVehicleOffers requestProductPriority3Field () { + return this.requestProductPriority3Field(true); + } + public APIRequestGetVehicleOffers requestProductPriority3Field (boolean value) { + this.requestField("product_priority_3", value); + return this; + } + public APIRequestGetVehicleOffers requestProductPriority4Field () { + return this.requestProductPriority4Field(true); + } + public APIRequestGetVehicleOffers requestProductPriority4Field (boolean value) { + this.requestField("product_priority_4", value); + return this; + } public APIRequestGetVehicleOffers requestSanitizedImagesField () { return this.requestSanitizedImagesField(true); } @@ -4816,6 +4896,11 @@ public APINodeList getLastResponse() { "previous_currency", "previous_price", "price", + "product_priority_0", + "product_priority_1", + "product_priority_2", + "product_priority_3", + "product_priority_4", "sale_currency", "sale_price", "sanitized_images", @@ -5166,6 +5251,41 @@ public APIRequestGetVehicles requestPriceField (boolean value) { this.requestField("price", value); return this; } + public APIRequestGetVehicles requestProductPriority0Field () { + return this.requestProductPriority0Field(true); + } + public APIRequestGetVehicles requestProductPriority0Field (boolean value) { + this.requestField("product_priority_0", value); + return this; + } + public APIRequestGetVehicles requestProductPriority1Field () { + return this.requestProductPriority1Field(true); + } + public APIRequestGetVehicles requestProductPriority1Field (boolean value) { + this.requestField("product_priority_1", value); + return this; + } + public APIRequestGetVehicles requestProductPriority2Field () { + return this.requestProductPriority2Field(true); + } + public APIRequestGetVehicles requestProductPriority2Field (boolean value) { + this.requestField("product_priority_2", value); + return this; + } + public APIRequestGetVehicles requestProductPriority3Field () { + return this.requestProductPriority3Field(true); + } + public APIRequestGetVehicles requestProductPriority3Field (boolean value) { + this.requestField("product_priority_3", value); + return this; + } + public APIRequestGetVehicles requestProductPriority4Field () { + return this.requestProductPriority4Field(true); + } + public APIRequestGetVehicles requestProductPriority4Field (boolean value) { + this.requestField("product_priority_4", value); + return this; + } public APIRequestGetVehicles requestSaleCurrencyField () { return this.requestSaleCurrencyField(true); } @@ -5924,6 +6044,8 @@ public String toString() { public static enum EnumFeedType { @SerializedName("AUTOMOTIVE_MODEL") VALUE_AUTOMOTIVE_MODEL("AUTOMOTIVE_MODEL"), + @SerializedName("COLLECTION") + VALUE_COLLECTION("COLLECTION"), @SerializedName("DESTINATION") VALUE_DESTINATION("DESTINATION"), @SerializedName("FLIGHT") diff --git a/src/main/java/com/facebook/ads/sdk/ProductItem.java b/src/main/java/com/facebook/ads/sdk/ProductItem.java index 5f485237..b7bd6a02 100644 --- a/src/main/java/com/facebook/ads/sdk/ProductItem.java +++ b/src/main/java/com/facebook/ads/sdk/ProductItem.java @@ -60,7 +60,7 @@ public class ProductItem extends APINode { @SerializedName("bundle_retailer_ids") private List mBundleRetailerIds = null; @SerializedName("capability_to_review_status") - private List> mCapabilityToReviewStatus = null; + private List> mCapabilityToReviewStatus = null; @SerializedName("category") private String mCategory = null; @SerializedName("category_specific_fields") @@ -471,7 +471,7 @@ public List getFieldBundleRetailerIds() { return mBundleRetailerIds; } - public List> getFieldCapabilityToReviewStatus() { + public List> getFieldCapabilityToReviewStatus() { return mCapabilityToReviewStatus; } @@ -2972,6 +2972,31 @@ public String toString() { } } + public static enum EnumCapabilityToReviewStatus { + @SerializedName("APPROVED") + VALUE_APPROVED("APPROVED"), + @SerializedName("NO_REVIEW") + VALUE_NO_REVIEW("NO_REVIEW"), + @SerializedName("OUTDATED") + VALUE_OUTDATED("OUTDATED"), + @SerializedName("PENDING") + VALUE_PENDING("PENDING"), + @SerializedName("REJECTED") + VALUE_REJECTED("REJECTED"), + ; + + private String value; + + private EnumCapabilityToReviewStatus(String value) { + this.value = value; + } + + @Override + public String toString() { + return value; + } + } + public static enum EnumCondition { @SerializedName("cpo") VALUE_CPO("cpo"), @@ -3720,6 +3745,8 @@ public static enum EnumErrorType { VALUE_INVALID_SUBSCRIPTION_ENABLE_PARAMS("INVALID_SUBSCRIPTION_ENABLE_PARAMS"), @SerializedName("INVALID_SUBSCRIPTION_PARAMS") VALUE_INVALID_SUBSCRIPTION_PARAMS("INVALID_SUBSCRIPTION_PARAMS"), + @SerializedName("INVALID_TAX_EXTENSION_STATE") + VALUE_INVALID_TAX_EXTENSION_STATE("INVALID_TAX_EXTENSION_STATE"), @SerializedName("INVALID_VEHICLE_STATE") VALUE_INVALID_VEHICLE_STATE("INVALID_VEHICLE_STATE"), @SerializedName("INVALID_VIRTUAL_TOUR_URL_DOMAIN") diff --git a/src/main/java/com/facebook/ads/sdk/ProductSet.java b/src/main/java/com/facebook/ads/sdk/ProductSet.java index 8362e988..77dc2d00 100644 --- a/src/main/java/com/facebook/ads/sdk/ProductSet.java +++ b/src/main/java/com/facebook/ads/sdk/ProductSet.java @@ -1806,6 +1806,11 @@ public APINodeList getLastResponse() { "margin_level", "name", "phone", + "product_priority_0", + "product_priority_1", + "product_priority_2", + "product_priority_3", + "product_priority_4", "sale_price", "sanitized_images", "star_rating", @@ -2042,6 +2047,41 @@ public APIRequestGetHotels requestPhoneField (boolean value) { this.requestField("phone", value); return this; } + public APIRequestGetHotels requestProductPriority0Field () { + return this.requestProductPriority0Field(true); + } + public APIRequestGetHotels requestProductPriority0Field (boolean value) { + this.requestField("product_priority_0", value); + return this; + } + public APIRequestGetHotels requestProductPriority1Field () { + return this.requestProductPriority1Field(true); + } + public APIRequestGetHotels requestProductPriority1Field (boolean value) { + this.requestField("product_priority_1", value); + return this; + } + public APIRequestGetHotels requestProductPriority2Field () { + return this.requestProductPriority2Field(true); + } + public APIRequestGetHotels requestProductPriority2Field (boolean value) { + this.requestField("product_priority_2", value); + return this; + } + public APIRequestGetHotels requestProductPriority3Field () { + return this.requestProductPriority3Field(true); + } + public APIRequestGetHotels requestProductPriority3Field (boolean value) { + this.requestField("product_priority_3", value); + return this; + } + public APIRequestGetHotels requestProductPriority4Field () { + return this.requestProductPriority4Field(true); + } + public APIRequestGetHotels requestProductPriority4Field (boolean value) { + this.requestField("product_priority_4", value); + return this; + } public APIRequestGetHotels requestSalePriceField () { return this.requestSalePriceField(true); } @@ -3200,6 +3240,11 @@ public APINodeList getLastResponse() { "offer_disclaimer", "offer_type", "price", + "product_priority_0", + "product_priority_1", + "product_priority_2", + "product_priority_3", + "product_priority_4", "sanitized_images", "start_date", "start_time", @@ -3547,6 +3592,41 @@ public APIRequestGetVehicleOffers requestPriceField (boolean value) { this.requestField("price", value); return this; } + public APIRequestGetVehicleOffers requestProductPriority0Field () { + return this.requestProductPriority0Field(true); + } + public APIRequestGetVehicleOffers requestProductPriority0Field (boolean value) { + this.requestField("product_priority_0", value); + return this; + } + public APIRequestGetVehicleOffers requestProductPriority1Field () { + return this.requestProductPriority1Field(true); + } + public APIRequestGetVehicleOffers requestProductPriority1Field (boolean value) { + this.requestField("product_priority_1", value); + return this; + } + public APIRequestGetVehicleOffers requestProductPriority2Field () { + return this.requestProductPriority2Field(true); + } + public APIRequestGetVehicleOffers requestProductPriority2Field (boolean value) { + this.requestField("product_priority_2", value); + return this; + } + public APIRequestGetVehicleOffers requestProductPriority3Field () { + return this.requestProductPriority3Field(true); + } + public APIRequestGetVehicleOffers requestProductPriority3Field (boolean value) { + this.requestField("product_priority_3", value); + return this; + } + public APIRequestGetVehicleOffers requestProductPriority4Field () { + return this.requestProductPriority4Field(true); + } + public APIRequestGetVehicleOffers requestProductPriority4Field (boolean value) { + this.requestField("product_priority_4", value); + return this; + } public APIRequestGetVehicleOffers requestSanitizedImagesField () { return this.requestSanitizedImagesField(true); } @@ -3685,6 +3765,11 @@ public APINodeList getLastResponse() { "previous_currency", "previous_price", "price", + "product_priority_0", + "product_priority_1", + "product_priority_2", + "product_priority_3", + "product_priority_4", "sale_currency", "sale_price", "sanitized_images", @@ -4035,6 +4120,41 @@ public APIRequestGetVehicles requestPriceField (boolean value) { this.requestField("price", value); return this; } + public APIRequestGetVehicles requestProductPriority0Field () { + return this.requestProductPriority0Field(true); + } + public APIRequestGetVehicles requestProductPriority0Field (boolean value) { + this.requestField("product_priority_0", value); + return this; + } + public APIRequestGetVehicles requestProductPriority1Field () { + return this.requestProductPriority1Field(true); + } + public APIRequestGetVehicles requestProductPriority1Field (boolean value) { + this.requestField("product_priority_1", value); + return this; + } + public APIRequestGetVehicles requestProductPriority2Field () { + return this.requestProductPriority2Field(true); + } + public APIRequestGetVehicles requestProductPriority2Field (boolean value) { + this.requestField("product_priority_2", value); + return this; + } + public APIRequestGetVehicles requestProductPriority3Field () { + return this.requestProductPriority3Field(true); + } + public APIRequestGetVehicles requestProductPriority3Field (boolean value) { + this.requestField("product_priority_3", value); + return this; + } + public APIRequestGetVehicles requestProductPriority4Field () { + return this.requestProductPriority4Field(true); + } + public APIRequestGetVehicles requestProductPriority4Field (boolean value) { + this.requestField("product_priority_4", value); + return this; + } public APIRequestGetVehicles requestSaleCurrencyField () { return this.requestSaleCurrencyField(true); } diff --git a/src/main/java/com/facebook/ads/sdk/SavedMessageResponse.java b/src/main/java/com/facebook/ads/sdk/SavedMessageResponse.java index 6c7dc73a..0a7ef0e0 100644 --- a/src/main/java/com/facebook/ads/sdk/SavedMessageResponse.java +++ b/src/main/java/com/facebook/ads/sdk/SavedMessageResponse.java @@ -41,8 +41,6 @@ * */ public class SavedMessageResponse extends APINode { - @SerializedName("category") - private String mCategory = null; @SerializedName("id") private String mId = null; @SerializedName("image") @@ -267,10 +265,6 @@ public APIRequestGet get() { } - public String getFieldCategory() { - return mCategory; - } - public String getFieldId() { return mId; } @@ -304,7 +298,6 @@ public SavedMessageResponse getLastResponse() { }; public static final String[] FIELDS = { - "category", "id", "image", "is_enabled", @@ -402,13 +395,6 @@ public APIRequestGet requestField (String field, boolean value) { return this; } - public APIRequestGet requestCategoryField () { - return this.requestCategoryField(true); - } - public APIRequestGet requestCategoryField (boolean value) { - this.requestField("category", value); - return this; - } public APIRequestGet requestIdField () { return this.requestIdField(true); } @@ -461,7 +447,6 @@ public APIRequestGet requestTitleField (boolean value) { } public SavedMessageResponse copyFrom(SavedMessageResponse instance) { - this.mCategory = instance.mCategory; this.mId = instance.mId; this.mImage = instance.mImage; this.mIsEnabled = instance.mIsEnabled; diff --git a/src/main/java/com/facebook/ads/sdk/User.java b/src/main/java/com/facebook/ads/sdk/User.java index 4d4633d6..a6815189 100644 --- a/src/main/java/com/facebook/ads/sdk/User.java +++ b/src/main/java/com/facebook/ads/sdk/User.java @@ -954,10 +954,6 @@ public APIRequestCreateAccessToken setParams(Map params) { } - public APIRequestCreateAccessToken setBusinessApp (Long businessApp) { - this.setParam("business_app", businessApp); - return this; - } public APIRequestCreateAccessToken setBusinessApp (String businessApp) { this.setParam("business_app", businessApp); return this; @@ -968,7 +964,7 @@ public APIRequestCreateAccessToken setPageId (String pageId) { return this; } - public APIRequestCreateAccessToken setScope (List scope) { + public APIRequestCreateAccessToken setScope (List scope) { this.setParam("scope", scope); return this; } @@ -10140,7 +10136,6 @@ public Post getLastResponse() { "fun_fact_prompt_id", "fun_fact_toastee_id", "height", - "holiday_card", "home_checkin_city_id", "image_crops", "implicit_with_tags", @@ -10161,7 +10156,6 @@ public Post getLastResponse() { "name", "nectar_module", "object_attachment", - "offer_like_post_id", "og_action_type_id", "og_hide_object_attachment", "og_icon_id", @@ -10301,10 +10295,6 @@ public APIRequestCreateFeed setAskedFunFactPromptId (String askedFunFactPromptId return this; } - public APIRequestCreateFeed setAsset3dId (Long asset3dId) { - this.setParam("asset3d_id", asset3dId); - return this; - } public APIRequestCreateFeed setAsset3dId (String asset3dId) { this.setParam("asset3d_id", asset3dId); return this; @@ -10520,10 +10510,6 @@ public APIRequestCreateFeed setFormatting (String formatting) { return this; } - public APIRequestCreateFeed setFunFactPromptId (Long funFactPromptId) { - this.setParam("fun_fact_prompt_id", funFactPromptId); - return this; - } public APIRequestCreateFeed setFunFactPromptId (String funFactPromptId) { this.setParam("fun_fact_prompt_id", funFactPromptId); return this; @@ -10547,11 +10533,6 @@ public APIRequestCreateFeed setHeight (String height) { return this; } - public APIRequestCreateFeed setHolidayCard (String holidayCard) { - this.setParam("holiday_card", holidayCard); - return this; - } - public APIRequestCreateFeed setHomeCheckinCityId (Object homeCheckinCityId) { this.setParam("home_checkin_city_id", homeCheckinCityId); return this; @@ -10700,15 +10681,6 @@ public APIRequestCreateFeed setObjectAttachment (String objectAttachment) { return this; } - public APIRequestCreateFeed setOfferLikePostId (Long offerLikePostId) { - this.setParam("offer_like_post_id", offerLikePostId); - return this; - } - public APIRequestCreateFeed setOfferLikePostId (String offerLikePostId) { - this.setParam("offer_like_post_id", offerLikePostId); - return this; - } - public APIRequestCreateFeed setOgActionTypeId (String ogActionTypeId) { this.setParam("og_action_type_id", ogActionTypeId); return this; @@ -20186,7 +20158,6 @@ public AdVideo getLastResponse() { "fun_fact_toastee_id", "guide", "guide_enabled", - "holiday_card", "initial_heading", "initial_pitch", "instant_game_entry_point_data", @@ -20197,7 +20168,6 @@ public AdVideo getLastResponse() { "location_source_id", "manual_privacy", "no_story", - "offer_like_post_id", "og_action_type_id", "og_icon_id", "og_object_id", @@ -20457,10 +20427,6 @@ public APIRequestCreateVideo setFrontZRotation (String frontZRotation) { return this; } - public APIRequestCreateVideo setFunFactPromptId (Long funFactPromptId) { - this.setParam("fun_fact_prompt_id", funFactPromptId); - return this; - } public APIRequestCreateVideo setFunFactPromptId (String funFactPromptId) { this.setParam("fun_fact_prompt_id", funFactPromptId); return this; @@ -20493,11 +20459,6 @@ public APIRequestCreateVideo setGuideEnabled (String guideEnabled) { return this; } - public APIRequestCreateVideo setHolidayCard (String holidayCard) { - this.setParam("holiday_card", holidayCard); - return this; - } - public APIRequestCreateVideo setInitialHeading (Long initialHeading) { this.setParam("initial_heading", initialHeading); return this; @@ -20580,15 +20541,6 @@ public APIRequestCreateVideo setNoStory (String noStory) { return this; } - public APIRequestCreateVideo setOfferLikePostId (Long offerLikePostId) { - this.setParam("offer_like_post_id", offerLikePostId); - return this; - } - public APIRequestCreateVideo setOfferLikePostId (String offerLikePostId) { - this.setParam("offer_like_post_id", offerLikePostId); - return this; - } - public APIRequestCreateVideo setOgActionTypeId (String ogActionTypeId) { this.setParam("og_action_type_id", ogActionTypeId); return this; diff --git a/src/main/java/com/facebook/ads/sdk/Vehicle.java b/src/main/java/com/facebook/ads/sdk/Vehicle.java index 794d433e..354dfa54 100644 --- a/src/main/java/com/facebook/ads/sdk/Vehicle.java +++ b/src/main/java/com/facebook/ads/sdk/Vehicle.java @@ -105,6 +105,16 @@ public class Vehicle extends APINode { private String mPreviousPrice = null; @SerializedName("price") private String mPrice = null; + @SerializedName("product_priority_0") + private Double mProductPriority0 = null; + @SerializedName("product_priority_1") + private Double mProductPriority1 = null; + @SerializedName("product_priority_2") + private Double mProductPriority2 = null; + @SerializedName("product_priority_3") + private Double mProductPriority3 = null; + @SerializedName("product_priority_4") + private Double mProductPriority4 = null; @SerializedName("sale_currency") private String mSaleCurrency = null; @SerializedName("sale_price") @@ -498,6 +508,26 @@ public String getFieldPrice() { return mPrice; } + public Double getFieldProductPriority0() { + return mProductPriority0; + } + + public Double getFieldProductPriority1() { + return mProductPriority1; + } + + public Double getFieldProductPriority2() { + return mProductPriority2; + } + + public Double getFieldProductPriority3() { + return mProductPriority3; + } + + public Double getFieldProductPriority4() { + return mProductPriority4; + } + public String getFieldSaleCurrency() { return mSaleCurrency; } @@ -1014,6 +1044,11 @@ public Vehicle getLastResponse() { "previous_currency", "previous_price", "price", + "product_priority_0", + "product_priority_1", + "product_priority_2", + "product_priority_3", + "product_priority_4", "sale_currency", "sale_price", "sanitized_images", @@ -1346,6 +1381,41 @@ public APIRequestGet requestPriceField (boolean value) { this.requestField("price", value); return this; } + public APIRequestGet requestProductPriority0Field () { + return this.requestProductPriority0Field(true); + } + public APIRequestGet requestProductPriority0Field (boolean value) { + this.requestField("product_priority_0", value); + return this; + } + public APIRequestGet requestProductPriority1Field () { + return this.requestProductPriority1Field(true); + } + public APIRequestGet requestProductPriority1Field (boolean value) { + this.requestField("product_priority_1", value); + return this; + } + public APIRequestGet requestProductPriority2Field () { + return this.requestProductPriority2Field(true); + } + public APIRequestGet requestProductPriority2Field (boolean value) { + this.requestField("product_priority_2", value); + return this; + } + public APIRequestGet requestProductPriority3Field () { + return this.requestProductPriority3Field(true); + } + public APIRequestGet requestProductPriority3Field (boolean value) { + this.requestField("product_priority_3", value); + return this; + } + public APIRequestGet requestProductPriority4Field () { + return this.requestProductPriority4Field(true); + } + public APIRequestGet requestProductPriority4Field (boolean value) { + this.requestField("product_priority_4", value); + return this; + } public APIRequestGet requestSaleCurrencyField () { return this.requestSaleCurrencyField(true); } @@ -2136,6 +2206,11 @@ public Vehicle copyFrom(Vehicle instance) { this.mPreviousCurrency = instance.mPreviousCurrency; this.mPreviousPrice = instance.mPreviousPrice; this.mPrice = instance.mPrice; + this.mProductPriority0 = instance.mProductPriority0; + this.mProductPriority1 = instance.mProductPriority1; + this.mProductPriority2 = instance.mProductPriority2; + this.mProductPriority3 = instance.mProductPriority3; + this.mProductPriority4 = instance.mProductPriority4; this.mSaleCurrency = instance.mSaleCurrency; this.mSalePrice = instance.mSalePrice; this.mSanitizedImages = instance.mSanitizedImages; diff --git a/src/main/java/com/facebook/ads/sdk/VehicleOffer.java b/src/main/java/com/facebook/ads/sdk/VehicleOffer.java index 6a32a4cb..a13a1a14 100644 --- a/src/main/java/com/facebook/ads/sdk/VehicleOffer.java +++ b/src/main/java/com/facebook/ads/sdk/VehicleOffer.java @@ -105,6 +105,16 @@ public class VehicleOffer extends APINode { private String mOfferType = null; @SerializedName("price") private String mPrice = null; + @SerializedName("product_priority_0") + private Double mProductPriority0 = null; + @SerializedName("product_priority_1") + private Double mProductPriority1 = null; + @SerializedName("product_priority_2") + private Double mProductPriority2 = null; + @SerializedName("product_priority_3") + private Double mProductPriority3 = null; + @SerializedName("product_priority_4") + private Double mProductPriority4 = null; @SerializedName("sanitized_images") private List mSanitizedImages = null; @SerializedName("start_date") @@ -485,6 +495,26 @@ public String getFieldPrice() { return mPrice; } + public Double getFieldProductPriority0() { + return mProductPriority0; + } + + public Double getFieldProductPriority1() { + return mProductPriority1; + } + + public Double getFieldProductPriority2() { + return mProductPriority2; + } + + public Double getFieldProductPriority3() { + return mProductPriority3; + } + + public Double getFieldProductPriority4() { + return mProductPriority4; + } + public List getFieldSanitizedImages() { return mSanitizedImages; } @@ -989,6 +1019,11 @@ public VehicleOffer getLastResponse() { "offer_disclaimer", "offer_type", "price", + "product_priority_0", + "product_priority_1", + "product_priority_2", + "product_priority_3", + "product_priority_4", "sanitized_images", "start_date", "start_time", @@ -1318,6 +1353,41 @@ public APIRequestGet requestPriceField (boolean value) { this.requestField("price", value); return this; } + public APIRequestGet requestProductPriority0Field () { + return this.requestProductPriority0Field(true); + } + public APIRequestGet requestProductPriority0Field (boolean value) { + this.requestField("product_priority_0", value); + return this; + } + public APIRequestGet requestProductPriority1Field () { + return this.requestProductPriority1Field(true); + } + public APIRequestGet requestProductPriority1Field (boolean value) { + this.requestField("product_priority_1", value); + return this; + } + public APIRequestGet requestProductPriority2Field () { + return this.requestProductPriority2Field(true); + } + public APIRequestGet requestProductPriority2Field (boolean value) { + this.requestField("product_priority_2", value); + return this; + } + public APIRequestGet requestProductPriority3Field () { + return this.requestProductPriority3Field(true); + } + public APIRequestGet requestProductPriority3Field (boolean value) { + this.requestField("product_priority_3", value); + return this; + } + public APIRequestGet requestProductPriority4Field () { + return this.requestProductPriority4Field(true); + } + public APIRequestGet requestProductPriority4Field (boolean value) { + this.requestField("product_priority_4", value); + return this; + } public APIRequestGet requestSanitizedImagesField () { return this.requestSanitizedImagesField(true); } @@ -1504,6 +1574,11 @@ public VehicleOffer copyFrom(VehicleOffer instance) { this.mOfferDisclaimer = instance.mOfferDisclaimer; this.mOfferType = instance.mOfferType; this.mPrice = instance.mPrice; + this.mProductPriority0 = instance.mProductPriority0; + this.mProductPriority1 = instance.mProductPriority1; + this.mProductPriority2 = instance.mProductPriority2; + this.mProductPriority3 = instance.mProductPriority3; + this.mProductPriority4 = instance.mProductPriority4; this.mSanitizedImages = instance.mSanitizedImages; this.mStartDate = instance.mStartDate; this.mStartTime = instance.mStartTime; diff --git a/src/main/java/com/facebook/ads/sdk/WhatsAppBusinessAccount.java b/src/main/java/com/facebook/ads/sdk/WhatsAppBusinessAccount.java index face3d9f..f723036d 100644 --- a/src/main/java/com/facebook/ads/sdk/WhatsAppBusinessAccount.java +++ b/src/main/java/com/facebook/ads/sdk/WhatsAppBusinessAccount.java @@ -314,6 +314,10 @@ public APIRequestGetAudiences getAudiences() { return new APIRequestGetAudiences(this.getPrefixedId().toString(), context); } + public APIRequestGetCallAnalytics getCallAnalytics() { + return new APIRequestGetCallAnalytics(this.getPrefixedId().toString(), context); + } + public APIRequestGetConversationAnalytics getConversationAnalytics() { return new APIRequestGetConversationAnalytics(this.getPrefixedId().toString(), context); } @@ -1148,6 +1152,191 @@ public APIRequestGetAudiences requestField (String field, boolean value) { } + public static class APIRequestGetCallAnalytics extends APIRequest { + + APINodeList lastResponse = null; + @Override + public APINodeList getLastResponse() { + return lastResponse; + } + public static final String[] PARAMS = { + "country_codes", + "dimensions", + "directions", + "end", + "granularity", + "metric_types", + "phone_numbers", + "start", + }; + + public static final String[] FIELDS = { + }; + + @Override + public APINodeList parseResponse(String response, String header) throws APIException { + return APINode.parseResponse(response, getContext(), this, header); + } + + @Override + public APINodeList execute() throws APIException { + return execute(new HashMap()); + } + + @Override + public APINodeList execute(Map extraParams) throws APIException { + ResponseWrapper rw = executeInternal(extraParams); + lastResponse = parseResponse(rw.getBody(),rw.getHeader()); + return lastResponse; + } + + public ListenableFuture> executeAsync() throws APIException { + return executeAsync(new HashMap()); + }; + + public ListenableFuture> executeAsync(Map extraParams) throws APIException { + return Futures.transform( + executeAsyncInternal(extraParams), + new Function>() { + public APINodeList apply(ResponseWrapper result) { + try { + return APIRequestGetCallAnalytics.this.parseResponse(result.getBody(), result.getHeader()); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + }, + MoreExecutors.directExecutor() + ); + }; + + public APIRequestGetCallAnalytics(String nodeId, APIContext context) { + super(context, nodeId, "/call_analytics", "GET", Arrays.asList(PARAMS)); + } + + @Override + public APIRequestGetCallAnalytics setParam(String param, Object value) { + setParamInternal(param, value); + return this; + } + + @Override + public APIRequestGetCallAnalytics setParams(Map params) { + setParamsInternal(params); + return this; + } + + + public APIRequestGetCallAnalytics setCountryCodes (List countryCodes) { + this.setParam("country_codes", countryCodes); + return this; + } + public APIRequestGetCallAnalytics setCountryCodes (String countryCodes) { + this.setParam("country_codes", countryCodes); + return this; + } + + public APIRequestGetCallAnalytics setDimensions (List dimensions) { + this.setParam("dimensions", dimensions); + return this; + } + public APIRequestGetCallAnalytics setDimensions (String dimensions) { + this.setParam("dimensions", dimensions); + return this; + } + + public APIRequestGetCallAnalytics setDirections (List directions) { + this.setParam("directions", directions); + return this; + } + public APIRequestGetCallAnalytics setDirections (String directions) { + this.setParam("directions", directions); + return this; + } + + public APIRequestGetCallAnalytics setEnd (Long end) { + this.setParam("end", end); + return this; + } + public APIRequestGetCallAnalytics setEnd (String end) { + this.setParam("end", end); + return this; + } + + public APIRequestGetCallAnalytics setGranularity (EnumGranularity granularity) { + this.setParam("granularity", granularity); + return this; + } + public APIRequestGetCallAnalytics setGranularity (String granularity) { + this.setParam("granularity", granularity); + return this; + } + + public APIRequestGetCallAnalytics setMetricTypes (List metricTypes) { + this.setParam("metric_types", metricTypes); + return this; + } + public APIRequestGetCallAnalytics setMetricTypes (String metricTypes) { + this.setParam("metric_types", metricTypes); + return this; + } + + public APIRequestGetCallAnalytics setPhoneNumbers (List phoneNumbers) { + this.setParam("phone_numbers", phoneNumbers); + return this; + } + public APIRequestGetCallAnalytics setPhoneNumbers (String phoneNumbers) { + this.setParam("phone_numbers", phoneNumbers); + return this; + } + + public APIRequestGetCallAnalytics setStart (Long start) { + this.setParam("start", start); + return this; + } + public APIRequestGetCallAnalytics setStart (String start) { + this.setParam("start", start); + return this; + } + + public APIRequestGetCallAnalytics requestAllFields () { + return this.requestAllFields(true); + } + + public APIRequestGetCallAnalytics requestAllFields (boolean value) { + for (String field : FIELDS) { + this.requestField(field, value); + } + return this; + } + + @Override + public APIRequestGetCallAnalytics requestFields (List fields) { + return this.requestFields(fields, true); + } + + @Override + public APIRequestGetCallAnalytics requestFields (List fields, boolean value) { + for (String field : fields) { + this.requestField(field, value); + } + return this; + } + + @Override + public APIRequestGetCallAnalytics requestField (String field) { + this.requestField(field, true); + return this; + } + + @Override + public APIRequestGetCallAnalytics requestField (String field, boolean value) { + this.requestFieldInternal(field, value); + return this; + } + + } + public static class APIRequestGetConversationAnalytics extends APIRequest { APINodeList lastResponse = null; @@ -2599,6 +2788,7 @@ public WhatsAppBusinessAccount getLastResponse() { "cta_url_link_tracking_opted_out", "display_format", "language", + "library_template_body_inputs", "library_template_button_inputs", "library_template_name", "message_send_ttl_seconds", @@ -2713,6 +2903,15 @@ public APIRequestCreateMessageTemplate setLanguage (String language) { return this; } + public APIRequestCreateMessageTemplate setLibraryTemplateBodyInputs (Map libraryTemplateBodyInputs) { + this.setParam("library_template_body_inputs", libraryTemplateBodyInputs); + return this; + } + public APIRequestCreateMessageTemplate setLibraryTemplateBodyInputs (String libraryTemplateBodyInputs) { + this.setParam("library_template_body_inputs", libraryTemplateBodyInputs); + return this; + } + public APIRequestCreateMessageTemplate setLibraryTemplateButtonInputs (List> libraryTemplateButtonInputs) { this.setParam("library_template_button_inputs", libraryTemplateButtonInputs); return this; @@ -6097,6 +6296,8 @@ public String toString() { } public static enum EnumProviderName { + @SerializedName("BILLDESK") + VALUE_BILLDESK("BILLDESK"), @SerializedName("PAYU") VALUE_PAYU("PAYU"), @SerializedName("RAZORPAY") @@ -6119,28 +6320,20 @@ public String toString() { } } - public static enum EnumConversationCategories { - @SerializedName("AUTHENTICATION") - VALUE_AUTHENTICATION("AUTHENTICATION"), - @SerializedName("AUTHENTICATION_INTERNATIONAL") - VALUE_AUTHENTICATION_INTERNATIONAL("AUTHENTICATION_INTERNATIONAL"), - @SerializedName("MARKETING") - VALUE_MARKETING("MARKETING"), - @SerializedName("MARKETING_OPTIMIZED_DELIVERY") - VALUE_MARKETING_OPTIMIZED_DELIVERY("MARKETING_OPTIMIZED_DELIVERY"), - @SerializedName("SERVICE") - VALUE_SERVICE("SERVICE"), + public static enum EnumDimensions { + @SerializedName("COUNTRY") + VALUE_COUNTRY("COUNTRY"), + @SerializedName("DIRECTION") + VALUE_DIRECTION("DIRECTION"), + @SerializedName("PHONE") + VALUE_PHONE("PHONE"), @SerializedName("UNKNOWN") VALUE_UNKNOWN("UNKNOWN"), - @SerializedName("UTILITY") - VALUE_UTILITY("UTILITY"), - @SerializedName("UTILITY_FIXED_TEMPLATE") - VALUE_UTILITY_FIXED_TEMPLATE("UTILITY_FIXED_TEMPLATE"), ; private String value; - private EnumConversationCategories(String value) { + private EnumDimensions(String value) { this.value = value; } @@ -6150,7 +6343,7 @@ public String toString() { } } - public static enum EnumConversationDirections { + public static enum EnumDirections { @SerializedName("BUSINESS_INITIATED") VALUE_BUSINESS_INITIATED("BUSINESS_INITIATED"), @SerializedName("UNKNOWN") @@ -6161,7 +6354,7 @@ public static enum EnumConversationDirections { private String value; - private EnumConversationDirections(String value) { + private EnumDirections(String value) { this.value = value; } @@ -6171,20 +6364,41 @@ public String toString() { } } - public static enum EnumConversationTypes { - @SerializedName("FREE_ENTRY_POINT") - VALUE_FREE_ENTRY_POINT("FREE_ENTRY_POINT"), - @SerializedName("FREE_TIER") - VALUE_FREE_TIER("FREE_TIER"), - @SerializedName("REGULAR") - VALUE_REGULAR("REGULAR"), + public static enum EnumGranularity { + @SerializedName("DAILY") + VALUE_DAILY("DAILY"), + @SerializedName("HALF_HOUR") + VALUE_HALF_HOUR("HALF_HOUR"), + @SerializedName("MONTHLY") + VALUE_MONTHLY("MONTHLY"), + ; + + private String value; + + private EnumGranularity(String value) { + this.value = value; + } + + @Override + public String toString() { + return value; + } + } + + public static enum EnumMetricTypes { + @SerializedName("AVERAGE_DURATION") + VALUE_AVERAGE_DURATION("AVERAGE_DURATION"), + @SerializedName("COST") + VALUE_COST("COST"), + @SerializedName("COUNT") + VALUE_COUNT("COUNT"), @SerializedName("UNKNOWN") VALUE_UNKNOWN("UNKNOWN"), ; private String value; - private EnumConversationTypes(String value) { + private EnumMetricTypes(String value) { this.value = value; } @@ -6194,24 +6408,28 @@ public String toString() { } } - public static enum EnumDimensions { - @SerializedName("CONVERSATION_CATEGORY") - VALUE_CONVERSATION_CATEGORY("CONVERSATION_CATEGORY"), - @SerializedName("CONVERSATION_DIRECTION") - VALUE_CONVERSATION_DIRECTION("CONVERSATION_DIRECTION"), - @SerializedName("CONVERSATION_TYPE") - VALUE_CONVERSATION_TYPE("CONVERSATION_TYPE"), - @SerializedName("COUNTRY") - VALUE_COUNTRY("COUNTRY"), - @SerializedName("PHONE") - VALUE_PHONE("PHONE"), + public static enum EnumConversationCategories { + @SerializedName("AUTHENTICATION") + VALUE_AUTHENTICATION("AUTHENTICATION"), + @SerializedName("AUTHENTICATION_INTERNATIONAL") + VALUE_AUTHENTICATION_INTERNATIONAL("AUTHENTICATION_INTERNATIONAL"), + @SerializedName("MARKETING") + VALUE_MARKETING("MARKETING"), + @SerializedName("MARKETING_OPTIMIZED_DELIVERY") + VALUE_MARKETING_OPTIMIZED_DELIVERY("MARKETING_OPTIMIZED_DELIVERY"), + @SerializedName("SERVICE") + VALUE_SERVICE("SERVICE"), @SerializedName("UNKNOWN") VALUE_UNKNOWN("UNKNOWN"), + @SerializedName("UTILITY") + VALUE_UTILITY("UTILITY"), + @SerializedName("UTILITY_FIXED_TEMPLATE") + VALUE_UTILITY_FIXED_TEMPLATE("UTILITY_FIXED_TEMPLATE"), ; private String value; - private EnumDimensions(String value) { + private EnumConversationCategories(String value) { this.value = value; } @@ -6221,18 +6439,18 @@ public String toString() { } } - public static enum EnumGranularity { - @SerializedName("DAILY") - VALUE_DAILY("DAILY"), - @SerializedName("HALF_HOUR") - VALUE_HALF_HOUR("HALF_HOUR"), - @SerializedName("MONTHLY") - VALUE_MONTHLY("MONTHLY"), + public static enum EnumConversationDirections { + @SerializedName("BUSINESS_INITIATED") + VALUE_BUSINESS_INITIATED("BUSINESS_INITIATED"), + @SerializedName("UNKNOWN") + VALUE_UNKNOWN("UNKNOWN"), + @SerializedName("USER_INITIATED") + VALUE_USER_INITIATED("USER_INITIATED"), ; private String value; - private EnumGranularity(String value) { + private EnumConversationDirections(String value) { this.value = value; } @@ -6242,18 +6460,20 @@ public String toString() { } } - public static enum EnumMetricTypes { - @SerializedName("CONVERSATION") - VALUE_CONVERSATION("CONVERSATION"), - @SerializedName("COST") - VALUE_COST("COST"), + public static enum EnumConversationTypes { + @SerializedName("FREE_ENTRY_POINT") + VALUE_FREE_ENTRY_POINT("FREE_ENTRY_POINT"), + @SerializedName("FREE_TIER") + VALUE_FREE_TIER("FREE_TIER"), + @SerializedName("REGULAR") + VALUE_REGULAR("REGULAR"), @SerializedName("UNKNOWN") VALUE_UNKNOWN("UNKNOWN"), ; private String value; - private EnumMetricTypes(String value) { + private EnumConversationTypes(String value) { this.value = value; }