diff --git a/examples/AdAccountAdSetsPostAdSetCreateCpa.php b/examples/AdAccountAdSetsPostAdSetCreateCpa.php index 11b392d08..159293325 100644 --- a/examples/AdAccountAdSetsPostAdSetCreateCpa.php +++ b/examples/AdAccountAdSetsPostAdSetCreateCpa.php @@ -43,8 +43,8 @@ 'name' => 'A CPA Ad Set', 'campaign_id' => '', 'daily_budget' => '5000', - 'start_time' => '2024-03-20T14:31:58-0700', - 'end_time' => '2024-03-27T14:31:58-0700', + 'start_time' => '2024-04-08T11:26:05-0700', + 'end_time' => '2024-04-15T11:26:05-0700', 'billing_event' => 'IMPRESSIONS', 'optimization_goal' => 'REACH', 'bid_amount' => '1000', diff --git a/examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.php b/examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.php index 6fc0ed287..af2168288 100644 --- a/examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.php +++ b/examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.php @@ -43,8 +43,8 @@ 'name' => 'A CPA Ad Set optimized for App Events', 'campaign_id' => '', 'daily_budget' => '300', - 'start_time' => '2024-03-20T14:32:42-0700', - 'end_time' => '2024-03-27T14:32:42-0700', + 'start_time' => '2024-04-08T11:26:49-0700', + 'end_time' => '2024-04-15T11:26:49-0700', 'billing_event' => 'IMPRESSIONS', 'optimization_goal' => 'OFFSITE_CONVERSIONS', 'bid_amount' => '100', diff --git a/examples/AdAccountAdSetsPostCreateAdSet.php b/examples/AdAccountAdSetsPostCreateAdSet.php index a2c30d77b..303ab57a3 100644 --- a/examples/AdAccountAdSetsPostCreateAdSet.php +++ b/examples/AdAccountAdSetsPostCreateAdSet.php @@ -42,8 +42,8 @@ $params = array( 'name' => 'My First AdSet', 'lifetime_budget' => '20000', - 'start_time' => '2024-03-20T14:31:13-0700', - 'end_time' => '2024-03-27T14:31:13-0700', + 'start_time' => '2024-04-08T11:25:19-0700', + 'end_time' => '2024-04-15T11:25:19-0700', 'campaign_id' => '', 'bid_amount' => '500', 'billing_event' => 'IMPRESSIONS', diff --git a/examples/AdAccountAdSetsPostDailyBudget20.php b/examples/AdAccountAdSetsPostDailyBudget20.php index d33b75b04..594200388 100644 --- a/examples/AdAccountAdSetsPostDailyBudget20.php +++ b/examples/AdAccountAdSetsPostDailyBudget20.php @@ -42,8 +42,8 @@ $params = array( 'name' => 'My First Adset', 'daily_budget' => '2000', - 'start_time' => '2024-03-13T14:32:15-0700', - 'end_time' => '2024-03-20T14:32:15-0700', + 'start_time' => '2024-04-01T11:26:23-0700', + 'end_time' => '2024-04-08T11:26:23-0700', 'campaign_id' => '', 'bid_amount' => '100', 'billing_event' => 'LINK_CLICKS', diff --git a/examples/AdAccountAdSetsPostLifetimeBudget200Duration10Days.php b/examples/AdAccountAdSetsPostLifetimeBudget200Duration10Days.php index fad96b6a6..bb8933629 100644 --- a/examples/AdAccountAdSetsPostLifetimeBudget200Duration10Days.php +++ b/examples/AdAccountAdSetsPostLifetimeBudget200Duration10Days.php @@ -42,8 +42,8 @@ $params = array( 'name' => 'My First Adset', 'lifetime_budget' => '20000', - 'start_time' => '2024-03-13T14:32:24-0700', - 'end_time' => '2024-03-23T14:32:24-0700', + 'start_time' => '2024-04-01T11:26:32-0700', + 'end_time' => '2024-04-11T11:26:32-0700', 'campaign_id' => '', 'bid_amount' => '100', 'billing_event' => 'LINK_CLICKS', diff --git a/examples/AdAccountAdSetsPostOptimizePostEngagement.php b/examples/AdAccountAdSetsPostOptimizePostEngagement.php index b42a2ae2a..7f5a38781 100644 --- a/examples/AdAccountAdSetsPostOptimizePostEngagement.php +++ b/examples/AdAccountAdSetsPostOptimizePostEngagement.php @@ -42,8 +42,8 @@ $params = array( 'name' => 'My First Adset', 'lifetime_budget' => '20000', - 'start_time' => '2024-03-13T14:32:33-0700', - 'end_time' => '2024-03-23T14:32:33-0700', + 'start_time' => '2024-04-01T11:26:40-0700', + 'end_time' => '2024-04-11T11:26:40-0700', 'campaign_id' => '', 'bid_amount' => '500', 'billing_event' => 'IMPRESSIONS', diff --git a/examples/AdgroupLeadsEdgeAdgroupLeadsFiltered.php b/examples/AdgroupLeadsEdgeAdgroupLeadsFiltered.php index 3e8a1dd0e..67a44e4f8 100644 --- a/examples/AdgroupLeadsEdgeAdgroupLeadsFiltered.php +++ b/examples/AdgroupLeadsEdgeAdgroupLeadsFiltered.php @@ -40,7 +40,7 @@ $fields = array( ); $params = array( - 'filtering' => array(array('field' => 'time_created','operator' => 'GREATER_THAN','value' => 1681144509)), + 'filtering' => array(array('field' => 'time_created','operator' => 'GREATER_THAN','value' => 1711391704)), ); echo json_encode((new Ad($id))->getLeads( $fields, diff --git a/examples/AdsPixelEventsPost.php b/examples/AdsPixelEventsPost.php index 55d05f03d..df944d5c3 100644 --- a/examples/AdsPixelEventsPost.php +++ b/examples/AdsPixelEventsPost.php @@ -39,7 +39,7 @@ $fields = array( ); $params = array( - 'data' => array(array('event_name' => 'PageView','event_time' => 1681748568,'user_data' => array('fbc' => 'fb.1.1554763741205.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890','fbp' => 'fb.1.1558571054389.1098115397','em' => '309a0a5c3e211326ae75ca18196d301a9bdbd1a882a4d2569511033da23f0abd'))), + 'data' => array(array('event_name' => 'PageView','event_time' => 1711995835,'user_data' => array('fbc' => 'fb.1.1554763741205.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890','fbp' => 'fb.1.1558571054389.1098115397','em' => '309a0a5c3e211326ae75ca18196d301a9bdbd1a882a4d2569511033da23f0abd'))), ); echo json_encode((new AdsPixel($id))->createEvent( $fields, diff --git a/src/FacebookAds/ApiConfig.php b/src/FacebookAds/ApiConfig.php index a2e4abc50..29cabbc16 100644 --- a/src/FacebookAds/ApiConfig.php +++ b/src/FacebookAds/ApiConfig.php @@ -10,6 +10,6 @@ namespace FacebookAds; class ApiConfig { const APIVersion = '19.0'; - const SDKVersion = '19.0.2'; + const SDKVersion = '19.0.3'; const TYPE_CHECKER_STRICT_MODE = false; } diff --git a/src/FacebookAds/Object/AdAccount.php b/src/FacebookAds/Object/AdAccount.php index 03f6980da..3a43e56d2 100644 --- a/src/FacebookAds/Object/AdAccount.php +++ b/src/FacebookAds/Object/AdAccount.php @@ -1609,6 +1609,29 @@ public function createAsyncAdRequestSet(array $fields = array(), array $params = return $pending ? $request : $request->execute(); } + public function getAudienceFunnel(array $fields = array(), array $params = array(), $pending = false) { + $this->assureId(); + + $param_types = array( + ); + $enums = array( + ); + + $request = new ApiRequest( + $this->api, + $this->data['id'], + RequestInterface::METHOD_GET, + '/audience_funnel', + new AbstractCrudObject(), + 'EDGE', + array(), + new TypeChecker($param_types, $enums) + ); + $request->addParams($params); + $request->addFields($fields); + return $pending ? $request : $request->execute(); + } + public function createBlockListDraft(array $fields = array(), array $params = array(), $pending = false) { $this->assureId(); @@ -1889,6 +1912,29 @@ public function getConversionGoals(array $fields = array(), array $params = arra return $pending ? $request : $request->execute(); } + public function getCpaGuidance(array $fields = array(), array $params = array(), $pending = false) { + $this->assureId(); + + $param_types = array( + ); + $enums = array( + ); + + $request = new ApiRequest( + $this->api, + $this->data['id'], + RequestInterface::METHOD_GET, + '/cpa_guidance', + new AbstractCrudObject(), + 'EDGE', + array(), + new TypeChecker($param_types, $enums) + ); + $request->addParams($params); + $request->addFields($fields); + return $pending ? $request : $request->execute(); + } + public function getCustomAudiences(array $fields = array(), array $params = array(), $pending = false) { $this->assureId(); @@ -2925,6 +2971,8 @@ public function getTargetingSearch(array $fields = array(), array $params = arra 'allow_only_fat_head_interests' => 'bool', 'app_store' => 'app_store_enum', 'countries' => 'list', + 'is_account_level_brand_safety_exclusion' => 'bool', + 'is_account_level_employer_exclusion' => 'bool', 'is_exclusion' => 'bool', 'limit_type' => 'limit_type_enum', 'objective' => 'objective_enum', @@ -3151,6 +3199,29 @@ public function deleteUsersOfAnyAudience(array $fields = array(), array $params return $pending ? $request : $request->execute(); } + public function getValueAdjustmentRuleCollections(array $fields = array(), array $params = array(), $pending = false) { + $this->assureId(); + + $param_types = array( + ); + $enums = array( + ); + + $request = new ApiRequest( + $this->api, + $this->data['id'], + RequestInterface::METHOD_GET, + '/value_adjustment_rule_collections', + new AbstractCrudObject(), + 'EDGE', + array(), + new TypeChecker($param_types, $enums) + ); + $request->addParams($params); + $request->addFields($fields); + return $pending ? $request : $request->execute(); + } + public function getValueAdjustmentRules(array $fields = array(), array $params = array(), $pending = false) { $this->assureId(); diff --git a/src/FacebookAds/Object/AdsPixel.php b/src/FacebookAds/Object/AdsPixel.php index 699f030b0..d4f95b25e 100644 --- a/src/FacebookAds/Object/AdsPixel.php +++ b/src/FacebookAds/Object/AdsPixel.php @@ -442,29 +442,6 @@ public function getStats(array $fields = array(), array $params = array(), $pend return $pending ? $request : $request->execute(); } - public function createTelemetry(array $fields = array(), array $params = array(), $pending = false) { - $this->assureId(); - - $param_types = array( - ); - $enums = array( - ); - - $request = new ApiRequest( - $this->api, - $this->data['id'], - RequestInterface::METHOD_POST, - '/telemetry', - new AbstractCrudObject(), - 'EDGE', - array(), - new TypeChecker($param_types, $enums) - ); - $request->addParams($params); - $request->addFields($fields); - return $pending ? $request : $request->execute(); - } - public function getSelf(array $fields = array(), array $params = array(), $pending = false) { $this->assureId(); diff --git a/src/FacebookAds/Object/Application.php b/src/FacebookAds/Object/Application.php index b4e016cd5..55daffd92 100644 --- a/src/FacebookAds/Object/Application.php +++ b/src/FacebookAds/Object/Application.php @@ -28,7 +28,6 @@ use FacebookAds\Object\Values\ApplicationRequestTypeValues; use FacebookAds\Object\Values\ApplicationSupportedPlatformsValues; use FacebookAds\Object\Values\DACheckConnectionMethodValues; -use FacebookAds\Object\Values\EventTypeValues; /** * This class is auto-generated. @@ -192,6 +191,7 @@ public function createActivity(array $fields = array(), array $params = array(), 'page_id' => 'unsigned int', 'page_scoped_user_id' => 'unsigned int', 'receipt_data' => 'string', + 'sdk_version' => 'string', 'ud' => 'map', 'url_schemes' => 'list', 'user_id' => 'string', @@ -899,32 +899,6 @@ public function getDaChecks(array $fields = array(), array $params = array(), $p return $pending ? $request : $request->execute(); } - public function getEvents(array $fields = array(), array $params = array(), $pending = false) { - $this->assureId(); - - $param_types = array( - 'include_canceled' => 'bool', - 'type' => 'type_enum', - ); - $enums = array( - 'type_enum' => EventTypeValues::getInstance()->getValues(), - ); - - $request = new ApiRequest( - $this->api, - $this->data['id'], - RequestInterface::METHOD_GET, - '/events', - new Event(), - 'EDGE', - Event::getFieldsEnum()->getValues(), - new TypeChecker($param_types, $enums) - ); - $request->addParams($params); - $request->addFields($fields); - return $pending ? $request : $request->execute(); - } - public function getIapPurchases(array $fields = array(), array $params = array(), $pending = false) { $this->assureId(); diff --git a/src/FacebookAds/Object/CommerceMerchantSettings.php b/src/FacebookAds/Object/CommerceMerchantSettings.php index 7bfac355e..48a8caa30 100644 --- a/src/FacebookAds/Object/CommerceMerchantSettings.php +++ b/src/FacebookAds/Object/CommerceMerchantSettings.php @@ -249,29 +249,6 @@ public function getReturns(array $fields = array(), array $params = array(), $pe return $pending ? $request : $request->execute(); } - public function getSellerIssues(array $fields = array(), array $params = array(), $pending = false) { - $this->assureId(); - - $param_types = array( - ); - $enums = array( - ); - - $request = new ApiRequest( - $this->api, - $this->data['id'], - RequestInterface::METHOD_GET, - '/seller_issues', - new AbstractCrudObject(), - 'EDGE', - array(), - new TypeChecker($param_types, $enums) - ); - $request->addParams($params); - $request->addFields($fields); - return $pending ? $request : $request->execute(); - } - public function getSetupStatus(array $fields = array(), array $params = array(), $pending = false) { $this->assureId(); @@ -394,35 +371,6 @@ public function getTaxSettings(array $fields = array(), array $params = array(), return $pending ? $request : $request->execute(); } - public function createWhatsappChannel(array $fields = array(), array $params = array(), $pending = false) { - $this->assureId(); - - $param_types = array( - 'op' => 'op_enum', - 'whatsapp_business_accounts' => 'list', - ); - $enums = array( - 'op_enum' => array( - 'ADD', - 'REMOVE', - ), - ); - - $request = new ApiRequest( - $this->api, - $this->data['id'], - RequestInterface::METHOD_POST, - '/whatsapp_channel', - new AbstractCrudObject(), - 'EDGE', - array(), - new TypeChecker($param_types, $enums) - ); - $request->addParams($params); - $request->addFields($fields); - return $pending ? $request : $request->execute(); - } - public function getSelf(array $fields = array(), array $params = array(), $pending = false) { $this->assureId(); diff --git a/src/FacebookAds/Object/CommerceOrder.php b/src/FacebookAds/Object/CommerceOrder.php index d0d18a2d6..d19e2c6f8 100644 --- a/src/FacebookAds/Object/CommerceOrder.php +++ b/src/FacebookAds/Object/CommerceOrder.php @@ -121,12 +121,12 @@ public function createCancellation(array $fields = array(), array $params = arra return $pending ? $request : $request->execute(); } - public function createFulfillOrder(array $fields = array(), array $params = array(), $pending = false) { + public function createItemUpdate(array $fields = array(), array $params = array(), $pending = false) { $this->assureId(); $param_types = array( - 'idempotency_key' => 'string', 'items' => 'list', + 'merchant_order_reference' => 'string', ); $enums = array( ); @@ -135,7 +135,7 @@ public function createFulfillOrder(array $fields = array(), array $params = arra $this->api, $this->data['id'], RequestInterface::METHOD_POST, - '/fulfill_order', + '/item_updates', new CommerceOrder(), 'EDGE', CommerceOrder::getFieldsEnum()->getValues(), @@ -436,6 +436,34 @@ public function createUpdateShipment(array $fields = array(), array $params = ar return $pending ? $request : $request->execute(); } + public function createUpdate(array $fields = array(), array $params = array(), $pending = false) { + $this->assureId(); + + $param_types = array( + 'cancel_amount' => 'map', + 'fulfill_amount' => 'map', + 'merchant_order_reference' => 'string', + 'refund_amount' => 'map', + 'total_amount' => 'map', + ); + $enums = array( + ); + + $request = new ApiRequest( + $this->api, + $this->data['id'], + RequestInterface::METHOD_POST, + '/updates', + new CommerceOrder(), + 'EDGE', + CommerceOrder::getFieldsEnum()->getValues(), + new TypeChecker($param_types, $enums) + ); + $request->addParams($params); + $request->addFields($fields); + return $pending ? $request : $request->execute(); + } + public function getSelf(array $fields = array(), array $params = array(), $pending = false) { $this->assureId(); diff --git a/src/FacebookAds/Object/Fields/AdAccountFields.php b/src/FacebookAds/Object/Fields/AdAccountFields.php index 5f7002875..0010a3da6 100644 --- a/src/FacebookAds/Object/Fields/AdAccountFields.php +++ b/src/FacebookAds/Object/Fields/AdAccountFields.php @@ -31,6 +31,7 @@ class AdAccountFields extends AbstractEnum { const AMOUNT_SPENT = 'amount_spent'; const ATTRIBUTION_SPEC = 'attribution_spec'; const BALANCE = 'balance'; + const BRAND_SAFETY_CONTENT_FILTER_LEVELS = 'brand_safety_content_filter_levels'; const BUSINESS = 'business'; const BUSINESS_CITY = 'business_city'; const BUSINESS_COUNTRY_CODE = 'business_country_code'; @@ -103,6 +104,7 @@ public function getFieldTypes() { 'amount_spent' => 'string', 'attribution_spec' => 'list', 'balance' => 'string', + 'brand_safety_content_filter_levels' => 'list', 'business' => 'Business', 'business_city' => 'string', 'business_country_code' => 'string', diff --git a/src/FacebookAds/Object/Fields/AdAssetFeedSpecFields.php b/src/FacebookAds/Object/Fields/AdAssetFeedSpecFields.php index 0fc9c1ca4..29a34da1f 100644 --- a/src/FacebookAds/Object/Fields/AdAssetFeedSpecFields.php +++ b/src/FacebookAds/Object/Fields/AdAssetFeedSpecFields.php @@ -40,6 +40,7 @@ class AdAssetFeedSpecFields extends AbstractEnum { const MESSAGE_EXTENSIONS = 'message_extensions'; const ONSITE_DESTINATIONS = 'onsite_destinations'; const OPTIMIZATION_TYPE = 'optimization_type'; + const PROMOTIONAL_METADATA = 'promotional_metadata'; const REASONS_TO_SHOP = 'reasons_to_shop'; const SHOPS_BUNDLE = 'shops_bundle'; const TITLES = 'titles'; @@ -65,6 +66,7 @@ public function getFieldTypes() { 'message_extensions' => 'list', 'onsite_destinations' => 'list', 'optimization_type' => 'string', + 'promotional_metadata' => 'Object', 'reasons_to_shop' => 'bool', 'shops_bundle' => 'bool', 'titles' => 'list', diff --git a/src/FacebookAds/Object/Fields/AdCreativeFeaturesSpecFields.php b/src/FacebookAds/Object/Fields/AdCreativeFeaturesSpecFields.php index 1cba352fe..f225d283f 100644 --- a/src/FacebookAds/Object/Fields/AdCreativeFeaturesSpecFields.php +++ b/src/FacebookAds/Object/Fields/AdCreativeFeaturesSpecFields.php @@ -23,8 +23,11 @@ class AdCreativeFeaturesSpecFields extends AbstractEnum { const ADVANTAGE_PLUS_CREATIVE = 'advantage_plus_creative'; + const APP_HIGHLIGHTS = 'app_highlights'; const AUDIO = 'audio'; const CAROUSEL_TO_VIDEO = 'carousel_to_video'; + const CATALOG_FEED_TAG = 'catalog_feed_tag'; + const CUSTOMIZE_PRODUCT_RECOMMENDATION = 'customize_product_recommendation'; const CV_TRANSFORMATION = 'cv_transformation'; const DESCRIPTION_AUTOMATION = 'description_automation'; const DHA_OPTIMIZATION = 'dha_optimization'; @@ -43,6 +46,7 @@ class AdCreativeFeaturesSpecFields extends AbstractEnum { const PRODUCT_METADATA_AUTOMATION = 'product_metadata_automation'; const PRODUCT_TAGS = 'product_tags'; const PROFILE_CARD = 'profile_card'; + const SITE_EXTENSIONS = 'site_extensions'; const STANDARD_ENHANCEMENTS = 'standard_enhancements'; const STANDARD_ENHANCEMENTS_CATALOG = 'standard_enhancements_catalog'; const TEXT_GENERATION = 'text_generation'; @@ -53,8 +57,11 @@ class AdCreativeFeaturesSpecFields extends AbstractEnum { public function getFieldTypes() { return array( 'advantage_plus_creative' => 'AdCreativeFeatureDetails', + 'app_highlights' => 'AdCreativeFeatureDetails', 'audio' => 'AdCreativeFeatureDetails', 'carousel_to_video' => 'AdCreativeFeatureDetails', + 'catalog_feed_tag' => 'AdCreativeFeatureDetails', + 'customize_product_recommendation' => 'AdCreativeFeatureDetails', 'cv_transformation' => 'AdCreativeFeatureDetails', 'description_automation' => 'AdCreativeFeatureDetails', 'dha_optimization' => 'AdCreativeFeatureDetails', @@ -73,6 +80,7 @@ public function getFieldTypes() { 'product_metadata_automation' => 'AdCreativeFeatureDetails', 'product_tags' => 'AdCreativeFeatureDetails', 'profile_card' => 'AdCreativeFeatureDetails', + 'site_extensions' => 'AdCreativeFeatureDetails', 'standard_enhancements' => 'AdCreativeFeatureDetails', 'standard_enhancements_catalog' => 'AdCreativeFeatureDetails', 'text_generation' => 'AdCreativeFeatureDetails', diff --git a/src/FacebookAds/Object/Fields/AdCreativeSourcingSpecFields.php b/src/FacebookAds/Object/Fields/AdCreativeSourcingSpecFields.php index ca1de8979..e19ec1bf4 100644 --- a/src/FacebookAds/Object/Fields/AdCreativeSourcingSpecFields.php +++ b/src/FacebookAds/Object/Fields/AdCreativeSourcingSpecFields.php @@ -25,12 +25,14 @@ class AdCreativeSourcingSpecFields extends AbstractEnum { const ASSOCIATED_PRODUCT_SET_ID = 'associated_product_set_id'; const PROMOTION_METADATA_SPEC = 'promotion_metadata_spec'; const SITE_LINKS_SPEC = 'site_links_spec'; + const SOURCE_URL = 'source_url'; public function getFieldTypes() { return array( 'associated_product_set_id' => 'string', 'promotion_metadata_spec' => 'list', 'site_links_spec' => 'list', + 'source_url' => 'string', ); } } diff --git a/src/FacebookAds/Object/Fields/AdSetFields.php b/src/FacebookAds/Object/Fields/AdSetFields.php index 3310972b0..c40e0c1b6 100644 --- a/src/FacebookAds/Object/Fields/AdSetFields.php +++ b/src/FacebookAds/Object/Fields/AdSetFields.php @@ -70,6 +70,7 @@ class AdSetFields extends AbstractEnum { const PROMOTED_OBJECT = 'promoted_object'; const RECOMMENDATIONS = 'recommendations'; const RECURRING_BUDGET_SEMANTICS = 'recurring_budget_semantics'; + const REGIONAL_REGULATION_IDENTITIES = 'regional_regulation_identities'; const REVIEW_FEEDBACK = 'review_feedback'; const RF_PREDICTION_ID = 'rf_prediction_id'; const SOURCE_ADSET = 'source_adset'; @@ -143,6 +144,7 @@ public function getFieldTypes() { 'promoted_object' => 'AdPromotedObject', 'recommendations' => 'list', 'recurring_budget_semantics' => 'bool', + 'regional_regulation_identities' => 'Object', 'review_feedback' => 'string', 'rf_prediction_id' => 'string', 'source_adset' => 'AdSet', diff --git a/src/FacebookAds/Object/Fields/CommerceMerchantSettingsFields.php b/src/FacebookAds/Object/Fields/CommerceMerchantSettingsFields.php index 525c786d9..8ccbecc04 100644 --- a/src/FacebookAds/Object/Fields/CommerceMerchantSettingsFields.php +++ b/src/FacebookAds/Object/Fields/CommerceMerchantSettingsFields.php @@ -46,7 +46,6 @@ class CommerceMerchantSettingsFields extends AbstractEnum { const SUPPORTED_CARD_TYPES = 'supported_card_types'; const TERMS = 'terms'; const TERMS_URL_BY_LOCALE = 'terms_url_by_locale'; - const WHATSAPP_CHANNEL = 'whatsapp_channel'; public function getFieldTypes() { return array( @@ -74,7 +73,6 @@ public function getFieldTypes() { 'supported_card_types' => 'list', 'terms' => 'string', 'terms_url_by_locale' => 'list>', - 'whatsapp_channel' => 'Object', ); } } diff --git a/src/FacebookAds/Object/Fields/DestinationFields.php b/src/FacebookAds/Object/Fields/DestinationFields.php index 7e96b2c2d..8864af438 100644 --- a/src/FacebookAds/Object/Fields/DestinationFields.php +++ b/src/FacebookAds/Object/Fields/DestinationFields.php @@ -35,6 +35,7 @@ class DestinationFields extends AbstractEnum { const PRICE = 'price'; const PRICE_CHANGE = 'price_change'; const SANITIZED_IMAGES = 'sanitized_images'; + const TAGS = 'tags'; const TYPES = 'types'; const UNIT_PRICE = 'unit_price'; const URL = 'url'; @@ -55,6 +56,7 @@ public function getFieldTypes() { 'price' => 'string', 'price_change' => 'string', 'sanitized_images' => 'list', + 'tags' => 'list', 'types' => 'list', 'unit_price' => 'Object', 'url' => 'string', diff --git a/src/FacebookAds/Object/Fields/FlightFields.php b/src/FacebookAds/Object/Fields/FlightFields.php index 66ec9d82d..bf95e9b3c 100644 --- a/src/FacebookAds/Object/Fields/FlightFields.php +++ b/src/FacebookAds/Object/Fields/FlightFields.php @@ -38,6 +38,7 @@ class FlightFields extends AbstractEnum { const ORIGIN_CITY = 'origin_city'; const PRICE = 'price'; const SANITIZED_IMAGES = 'sanitized_images'; + const TAGS = 'tags'; const UNIT_PRICE = 'unit_price'; const URL = 'url'; const VISIBILITY = 'visibility'; @@ -60,6 +61,7 @@ public function getFieldTypes() { 'origin_city' => 'string', 'price' => 'string', 'sanitized_images' => 'list', + 'tags' => 'list', 'unit_price' => 'Object', 'url' => 'string', 'visibility' => 'Visibility', diff --git a/src/FacebookAds/Object/Fields/HotelFields.php b/src/FacebookAds/Object/Fields/HotelFields.php index 4b9c38e84..73b192bc6 100644 --- a/src/FacebookAds/Object/Fields/HotelFields.php +++ b/src/FacebookAds/Object/Fields/HotelFields.php @@ -42,6 +42,7 @@ class HotelFields extends AbstractEnum { const SALE_PRICE = 'sale_price'; const SANITIZED_IMAGES = 'sanitized_images'; const STAR_RATING = 'star_rating'; + const TAGS = 'tags'; const UNIT_PRICE = 'unit_price'; const URL = 'url'; const VISIBILITY = 'visibility'; @@ -69,6 +70,7 @@ public function getFieldTypes() { 'sale_price' => 'string', 'sanitized_images' => 'list', 'star_rating' => 'float', + 'tags' => 'list', 'unit_price' => 'Object', 'url' => 'string', 'visibility' => 'Visibility', diff --git a/src/FacebookAds/Object/Fields/PageCommerceEligibilityFields.php b/src/FacebookAds/Object/Fields/IGUpcomingEventFields.php similarity index 68% rename from src/FacebookAds/Object/Fields/PageCommerceEligibilityFields.php rename to src/FacebookAds/Object/Fields/IGUpcomingEventFields.php index 18c3c60c7..5fa6e0f09 100644 --- a/src/FacebookAds/Object/Fields/PageCommerceEligibilityFields.php +++ b/src/FacebookAds/Object/Fields/IGUpcomingEventFields.php @@ -20,15 +20,19 @@ * */ -class PageCommerceEligibilityFields extends AbstractEnum { +class IGUpcomingEventFields extends AbstractEnum { - const OFFSITE = 'offsite'; - const ONSITE = 'onsite'; + const END_TIME = 'end_time'; + const ID = 'id'; + const START_TIME = 'start_time'; + const TITLE = 'title'; public function getFieldTypes() { return array( - 'offsite' => 'Object', - 'onsite' => 'Object', + 'end_time' => 'datetime', + 'id' => 'string', + 'start_time' => 'datetime', + 'title' => 'string', ); } } diff --git a/src/FacebookAds/Object/Fields/LocalServiceBusinessFields.php b/src/FacebookAds/Object/Fields/LocalServiceBusinessFields.php index b4971cfa3..648a1121c 100644 --- a/src/FacebookAds/Object/Fields/LocalServiceBusinessFields.php +++ b/src/FacebookAds/Object/Fields/LocalServiceBusinessFields.php @@ -56,6 +56,7 @@ class LocalServiceBusinessFields extends AbstractEnum { const RETAILER_CATEGORY = 'retailer_category'; const SANITIZED_IMAGES = 'sanitized_images'; const SIZE = 'size'; + const TAGS = 'tags'; const TITLE = 'title'; const UNIT_PRICE = 'unit_price'; const URL = 'url'; @@ -98,6 +99,7 @@ public function getFieldTypes() { 'retailer_category' => 'string', 'sanitized_images' => 'list', 'size' => 'string', + 'tags' => 'list', 'title' => 'string', 'unit_price' => 'Object', 'url' => 'string', diff --git a/src/FacebookAds/Object/Fields/PageFields.php b/src/FacebookAds/Object/Fields/PageFields.php index 27b4bb2ac..c08680024 100644 --- a/src/FacebookAds/Object/Fields/PageFields.php +++ b/src/FacebookAds/Object/Fields/PageFields.php @@ -91,6 +91,7 @@ class PageFields extends AbstractEnum { const IS_COMMUNITY_PAGE = 'is_community_page'; const IS_ELIGIBLE_FOR_BRANDED_CONTENT = 'is_eligible_for_branded_content'; const IS_ELIGIBLE_FOR_DISABLE_CONNECT_IG_BTN_FOR_NON_PAGE_ADMIN_AM_WEB = 'is_eligible_for_disable_connect_ig_btn_for_non_page_admin_am_web'; + const IS_ELIGIBLE_FOR_LIVE_BOOSTING_EXPANSION = 'is_eligible_for_live_boosting_expansion'; const IS_MESSENGER_BOT_GET_STARTED_ENABLED = 'is_messenger_bot_get_started_enabled'; const IS_MESSENGER_PLATFORM_BOT = 'is_messenger_platform_bot'; const IS_OWNED = 'is_owned'; @@ -244,6 +245,7 @@ public function getFieldTypes() { 'is_community_page' => 'bool', 'is_eligible_for_branded_content' => 'bool', 'is_eligible_for_disable_connect_ig_btn_for_non_page_admin_am_web' => 'bool', + 'is_eligible_for_live_boosting_expansion' => 'bool', 'is_messenger_bot_get_started_enabled' => 'bool', 'is_messenger_platform_bot' => 'bool', 'is_owned' => 'bool', diff --git a/src/FacebookAds/Object/Fields/TargetingGeoLocationFields.php b/src/FacebookAds/Object/Fields/TargetingGeoLocationFields.php index 2095677d0..ca64a7802 100644 --- a/src/FacebookAds/Object/Fields/TargetingGeoLocationFields.php +++ b/src/FacebookAds/Object/Fields/TargetingGeoLocationFields.php @@ -30,7 +30,6 @@ class TargetingGeoLocationFields extends AbstractEnum { const GEO_MARKETS = 'geo_markets'; const LARGE_GEO_AREAS = 'large_geo_areas'; const LOCATION_CLUSTER_IDS = 'location_cluster_ids'; - const LOCATION_EXPANSION = 'location_expansion'; const LOCATION_TYPES = 'location_types'; const MEDIUM_GEO_AREAS = 'medium_geo_areas'; const METRO_AREAS = 'metro_areas'; @@ -53,7 +52,6 @@ public function getFieldTypes() { 'geo_markets' => 'list', 'large_geo_areas' => 'list', 'location_cluster_ids' => 'list', - 'location_expansion' => 'TargetingGeoLocationLocationExpansion', 'location_types' => 'list', 'medium_geo_areas' => 'list', 'metro_areas' => 'list', diff --git a/src/FacebookAds/Object/Fields/WhatsAppBusinessPartnerClientVerificationSubmissionFields.php b/src/FacebookAds/Object/Fields/WhatsAppBusinessPartnerClientVerificationSubmissionFields.php index 51bee605f..582b3fc1b 100644 --- a/src/FacebookAds/Object/Fields/WhatsAppBusinessPartnerClientVerificationSubmissionFields.php +++ b/src/FacebookAds/Object/Fields/WhatsAppBusinessPartnerClientVerificationSubmissionFields.php @@ -34,11 +34,11 @@ public function getFieldTypes() { return array( 'client_business_id' => 'string', 'id' => 'string', - 'rejection_reasons' => 'list', + 'rejection_reasons' => 'list', 'submitted_info' => 'Object', 'submitted_time' => 'datetime', 'update_time' => 'datetime', - 'verification_status' => 'string', + 'verification_status' => 'VerificationStatus', ); } } diff --git a/src/FacebookAds/Object/IGUpcomingEvent.php b/src/FacebookAds/Object/IGUpcomingEvent.php new file mode 100644 index 000000000..36e577ea4 --- /dev/null +++ b/src/FacebookAds/Object/IGUpcomingEvent.php @@ -0,0 +1,91 @@ +assureId(); + + $param_types = array( + ); + $enums = array( + ); + + $request = new ApiRequest( + $this->api, + $this->data['id'], + RequestInterface::METHOD_GET, + '/', + new IGUpcomingEvent(), + 'NODE', + IGUpcomingEvent::getFieldsEnum()->getValues(), + new TypeChecker($param_types, $enums) + ); + $request->addParams($params); + $request->addFields($fields); + return $pending ? $request : $request->execute(); + } + + public function updateSelf(array $fields = array(), array $params = array(), $pending = false) { + $this->assureId(); + + $param_types = array( + 'end_time' => 'datetime', + 'start_time' => 'datetime', + 'title' => 'string', + ); + $enums = array( + ); + + $request = new ApiRequest( + $this->api, + $this->data['id'], + RequestInterface::METHOD_POST, + '/', + new IGUpcomingEvent(), + 'NODE', + IGUpcomingEvent::getFieldsEnum()->getValues(), + new TypeChecker($param_types, $enums) + ); + $request->addParams($params); + $request->addFields($fields); + return $pending ? $request : $request->execute(); + } + +} diff --git a/src/FacebookAds/Object/InstagramUser.php b/src/FacebookAds/Object/InstagramUser.php index c801ef92d..d6a2ac724 100644 --- a/src/FacebookAds/Object/InstagramUser.php +++ b/src/FacebookAds/Object/InstagramUser.php @@ -147,9 +147,35 @@ public function getUpcomingEvents(array $fields = array(), array $params = array $this->data['id'], RequestInterface::METHOD_GET, '/upcoming_events', - new AbstractCrudObject(), + new IGUpcomingEvent(), 'EDGE', - array(), + IGUpcomingEvent::getFieldsEnum()->getValues(), + new TypeChecker($param_types, $enums) + ); + $request->addParams($params); + $request->addFields($fields); + return $pending ? $request : $request->execute(); + } + + public function createUpcomingEvent(array $fields = array(), array $params = array(), $pending = false) { + $this->assureId(); + + $param_types = array( + 'end_time' => 'datetime', + 'start_time' => 'datetime', + 'title' => 'string', + ); + $enums = array( + ); + + $request = new ApiRequest( + $this->api, + $this->data['id'], + RequestInterface::METHOD_POST, + '/upcoming_events', + new IGUpcomingEvent(), + 'EDGE', + IGUpcomingEvent::getFieldsEnum()->getValues(), new TypeChecker($param_types, $enums) ); $request->addParams($params); diff --git a/src/FacebookAds/Object/Page.php b/src/FacebookAds/Object/Page.php index 2d7c774c2..9c327e73d 100644 --- a/src/FacebookAds/Object/Page.php +++ b/src/FacebookAds/Object/Page.php @@ -770,29 +770,6 @@ public function createChatPlugin(array $fields = array(), array $params = array( return $pending ? $request : $request->execute(); } - public function getCommerceEligibility(array $fields = array(), array $params = array(), $pending = false) { - $this->assureId(); - - $param_types = array( - ); - $enums = array( - ); - - $request = new ApiRequest( - $this->api, - $this->data['id'], - RequestInterface::METHOD_GET, - '/commerce_eligibility', - new PageCommerceEligibility(), - 'EDGE', - PageCommerceEligibility::getFieldsEnum()->getValues(), - new TypeChecker($param_types, $enums) - ); - $request->addParams($params); - $request->addFields($fields); - return $pending ? $request : $request->execute(); - } - public function getCommerceMerchantSettings(array $fields = array(), array $params = array(), $pending = false) { $this->assureId(); diff --git a/src/FacebookAds/Object/PageCommerceEligibility.php b/src/FacebookAds/Object/PageCommerceEligibility.php deleted file mode 100644 index 6d92e0bda..000000000 --- a/src/FacebookAds/Object/PageCommerceEligibility.php +++ /dev/null @@ -1,42 +0,0 @@ -execute(); } + public function createVersionItemsBatch(array $fields = array(), array $params = array(), $pending = false) { + $this->assureId(); + + $param_types = array( + 'allow_upsert' => 'bool', + 'item_type' => 'string', + 'item_version' => 'string', + 'requests' => 'map', + 'version' => 'unsigned int', + ); + $enums = array( + ); + + $request = new ApiRequest( + $this->api, + $this->data['id'], + RequestInterface::METHOD_POST, + '/version_items_batch', + new ProductCatalog(), + 'EDGE', + ProductCatalog::getFieldsEnum()->getValues(), + new TypeChecker($param_types, $enums) + ); + $request->addParams($params); + $request->addFields($fields); + return $pending ? $request : $request->execute(); + } + public function deleteSelf(array $fields = array(), array $params = array(), $pending = false) { $this->assureId(); diff --git a/src/FacebookAds/Object/TargetingGeoLocationLocationExpansion.php b/src/FacebookAds/Object/TargetingGeoLocationLocationExpansion.php deleted file mode 100644 index bd8ea93a6..000000000 --- a/src/FacebookAds/Object/TargetingGeoLocationLocationExpansion.php +++ /dev/null @@ -1,42 +0,0 @@ - 'bool', - ); - } + const APPROVED = 'APPROVED'; + const FAILED = 'FAILED'; + const PENDING = 'PENDING'; } diff --git a/src/FacebookAds/Object/WhatsAppBusinessAccount.php b/src/FacebookAds/Object/WhatsAppBusinessAccount.php index 245d88750..279498ee1 100644 --- a/src/FacebookAds/Object/WhatsAppBusinessAccount.php +++ b/src/FacebookAds/Object/WhatsAppBusinessAccount.php @@ -160,6 +160,8 @@ public function getConversationAnalytics(array $fields = array(), array $params $enums = array( 'conversation_categories_enum' => array( 'AUTHENTICATION', + 'AUTHENTICATION_INTERNATIONAL', + 'FIXED_TEMPLATE_NOTIFY', 'MARKETING', 'MARKETING_OPTIMIZED_DELIVERY', 'SERVICE', @@ -630,6 +632,29 @@ public function getSchedules(array $fields = array(), array $params = array(), $ return $pending ? $request : $request->execute(); } + public function createSetOboMobilityIntent(array $fields = array(), array $params = array(), $pending = false) { + $this->assureId(); + + $param_types = array( + ); + $enums = array( + ); + + $request = new ApiRequest( + $this->api, + $this->data['id'], + RequestInterface::METHOD_POST, + '/set_obo_mobility_intent', + new AbstractCrudObject(), + 'EDGE', + array(), + new TypeChecker($param_types, $enums) + ); + $request->addParams($params); + $request->addFields($fields); + return $pending ? $request : $request->execute(); + } + public function deleteSubscribedApps(array $fields = array(), array $params = array(), $pending = false) { $this->assureId(); diff --git a/src/FacebookAds/Object/WhatsAppBusinessPartnerClientVerificationSubmission.php b/src/FacebookAds/Object/WhatsAppBusinessPartnerClientVerificationSubmission.php index 116059196..5991ec408 100644 --- a/src/FacebookAds/Object/WhatsAppBusinessPartnerClientVerificationSubmission.php +++ b/src/FacebookAds/Object/WhatsAppBusinessPartnerClientVerificationSubmission.php @@ -14,6 +14,8 @@ use FacebookAds\Http\RequestInterface; use FacebookAds\TypeChecker; use FacebookAds\Object\Fields\WhatsAppBusinessPartnerClientVerificationSubmissionFields; +use FacebookAds\Object\Values\WhatsAppBusinessPartnerClientVerificationSubmissionRejectionReasonsValues; +use FacebookAds\Object\Values\WhatsAppBusinessPartnerClientVerificationSubmissionVerificationStatusValues; /** * This class is auto-generated. @@ -35,6 +37,8 @@ public static function getFieldsEnum() { protected static function getReferencedEnums() { $ref_enums = array(); + $ref_enums['RejectionReasons'] = WhatsAppBusinessPartnerClientVerificationSubmissionRejectionReasonsValues::getInstance()->getValues(); + $ref_enums['VerificationStatus'] = WhatsAppBusinessPartnerClientVerificationSubmissionVerificationStatusValues::getInstance()->getValues(); return $ref_enums; }