Skip to content

Commit

Permalink
Auto-generated php SDK code update
Browse files Browse the repository at this point in the history
Summary: ignore-conflict-markers

Reviewed By: stcheng

Differential Revision: D50280588

fbshipit-source-id: 0c0ccac8ccb8c9c5af9a77a162e8f07565433526
  • Loading branch information
generatedunixname89002005295453 authored and facebook-github-bot committed Oct 14, 2023
1 parent c1628cb commit eb61b29
Show file tree
Hide file tree
Showing 29 changed files with 270 additions and 167 deletions.
2 changes: 1 addition & 1 deletion src/FacebookAds/ApiConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
namespace FacebookAds;
class ApiConfig {
const APIVersion = '18.0';
const SDKVersion = '18.0.1';
const SDKVersion = '18.0.2';
const TYPE_CHECKER_STRICT_MODE = false;
}
97 changes: 0 additions & 97 deletions src/FacebookAds/Object/AdAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -842,103 +842,6 @@ public function createAd(array $fields = array(), array $params = array(), $pend
return $pending ? $request : $request->execute();
}

public function createAdsConversionGoal(array $fields = array(), array $params = array(), $pending = false) {
$this->assureId();

$param_types = array(
'conversion_event_value_source' => 'conversion_event_value_source_enum',
'description' => 'string',
'goal_creation_method' => 'goal_creation_method_enum',
'goal_name' => 'string',
'performance_goal' => 'performance_goal_enum',
'single_channel_conversion_events' => 'list<map>',
'value_adjustment_rule' => 'map',
);
$enums = array(
'conversion_event_value_source_enum' => array(
'DATA_SOURCE',
'VALUE_RULE',
),
'goal_creation_method_enum' => array(
'ADVERTISER_CREATED_UI',
'AUTO_MIGRATION',
'L2_ENHANCE_API_MIGRATION',
),
'performance_goal_enum' => array(
'AD_OPTIMIZATION_GOAL_AD_RECALL_LIFT',
'AD_OPTIMIZATION_GOAL_APP_DOWNLOADS',
'AD_OPTIMIZATION_GOAL_APP_INSTALLS',
'AD_OPTIMIZATION_GOAL_APP_INSTALLS_AND_OFFSITE_CONVERSIONS',
'AD_OPTIMIZATION_GOAL_BRAND_AWARENESS',
'AD_OPTIMIZATION_GOAL_CLICKS',
'AD_OPTIMIZATION_GOAL_COMPLETED_VIDEO_VIEWS',
'AD_OPTIMIZATION_GOAL_CONVERSATIONS',
'AD_OPTIMIZATION_GOAL_DERIVED_EVENTS',
'AD_OPTIMIZATION_GOAL_DWELLS',
'AD_OPTIMIZATION_GOAL_ENGAGED_REACH',
'AD_OPTIMIZATION_GOAL_ENGAGED_USERS',
'AD_OPTIMIZATION_GOAL_EVENT_RESPONSES',
'AD_OPTIMIZATION_GOAL_EXTERNAL',
'AD_OPTIMIZATION_GOAL_IMPRESSIONS',
'AD_OPTIMIZATION_GOAL_INCREMENTAL_OFFSITE_CONVERSIONS',
'AD_OPTIMIZATION_GOAL_IN_APP_VALUE',
'AD_OPTIMIZATION_GOAL_JOB_APPLICATIONS',
'AD_OPTIMIZATION_GOAL_LANDING_PAGE_VIEWS',
'AD_OPTIMIZATION_GOAL_LEAD_GENERATION',
'AD_OPTIMIZATION_GOAL_MEDIA_DOWNLOADS',
'AD_OPTIMIZATION_GOAL_MESSAGING_APPOINTMENT_CONVERSION',
'AD_OPTIMIZATION_GOAL_MESSAGING_DEEP_CONVERSATION_AND_FOLLOW',
'AD_OPTIMIZATION_GOAL_MESSAGING_DEEP_CONVERSATION_AND_REPLY',
'AD_OPTIMIZATION_GOAL_MESSAGING_PURCHASE_CONVERSION',
'AD_OPTIMIZATION_GOAL_MID_FUNNEL_EVENT',
'AD_OPTIMIZATION_GOAL_MRC_VIDEO_VIEWS',
'AD_OPTIMIZATION_GOAL_MULTI_CONVERSIONS',
'AD_OPTIMIZATION_GOAL_NONE',
'AD_OPTIMIZATION_GOAL_OFFER_CLAIMS',
'AD_OPTIMIZATION_GOAL_OFFLINE_CONVERSIONS',
'AD_OPTIMIZATION_GOAL_OFFSITE_CLICKS',
'AD_OPTIMIZATION_GOAL_OFFSITE_CONVERSIONS',
'AD_OPTIMIZATION_GOAL_ONSITE_CONVERSIONS',
'AD_OPTIMIZATION_GOAL_PAGE_ENGAGEMENT',
'AD_OPTIMIZATION_GOAL_PAGE_FOLLOWS',
'AD_OPTIMIZATION_GOAL_PAGE_LIKES',
'AD_OPTIMIZATION_GOAL_POST_ENGAGEMENT',
'AD_OPTIMIZATION_GOAL_QUALITY_CALL',
'AD_OPTIMIZATION_GOAL_QUALITY_LEAD',
'AD_OPTIMIZATION_GOAL_REACH',
'AD_OPTIMIZATION_GOAL_REMINDERS_SET',
'AD_OPTIMIZATION_GOAL_REPLIES',
'AD_OPTIMIZATION_GOAL_RESEARCH_POLL_RESPONSES',
'AD_OPTIMIZATION_GOAL_RETENTION',
'AD_OPTIMIZATION_GOAL_RETURN_ON_AD_SPEND',
'AD_OPTIMIZATION_GOAL_SOCIAL_IMPRESSIONS',
'AD_OPTIMIZATION_GOAL_STORE_VISITS',
'AD_OPTIMIZATION_GOAL_SUBSCRIBERS',
'AD_OPTIMIZATION_GOAL_TICKET_PURCHASE',
'AD_OPTIMIZATION_GOAL_VALUE',
'AD_OPTIMIZATION_GOAL_VIDEO_LONG_VIEWS',
'AD_OPTIMIZATION_GOAL_VIDEO_VIEWS',
'AD_OPTIMIZATION_GOAL_VIDEO_VIEWS_15S',
'AD_OPTIMIZATION_GOAL_VISIT_INSTAGRAM_PROFILE',
'AD_OPTIMIZATION_GOAL_VISIT_INSTAGRAM_PROFILE_AND_PROFILE_ACTIONS',
),
);

$request = new ApiRequest(
$this->api,
$this->data['id'],
RequestInterface::METHOD_POST,
'/ads_conversion_goal',
new AbstractCrudObject(),
'EDGE',
array(),
new TypeChecker($param_types, $enums)
);
$request->addParams($params);
$request->addFields($fields);
return $pending ? $request : $request->execute();
}

public function getAdsReportingMmmReports(array $fields = array(), array $params = array(), $pending = false) {
$this->assureId();

Expand Down
24 changes: 24 additions & 0 deletions src/FacebookAds/Object/AdsPixel.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,30 @@ public function getAgencies(array $fields = array(), array $params = array(), $p
return $pending ? $request : $request->execute();
}

public function createAhpConfig(array $fields = array(), array $params = array(), $pending = false) {
$this->assureId();

$param_types = array(
'applink_autosetup' => 'bool',
);
$enums = array(
);

$request = new ApiRequest(
$this->api,
$this->data['id'],
RequestInterface::METHOD_POST,
'/ahp_configs',
new AbstractCrudObject(),
'EDGE',
array(),
new TypeChecker($param_types, $enums)
);
$request->addParams($params);
$request->addFields($fields);
return $pending ? $request : $request->execute();
}

public function getAssignedUsers(array $fields = array(), array $params = array(), $pending = false) {
$this->assureId();

Expand Down
4 changes: 4 additions & 0 deletions src/FacebookAds/Object/Business.php
Original file line number Diff line number Diff line change
Expand Up @@ -1770,6 +1770,8 @@ public function createOpenBridgeConfiguration(array $fields = array(), array $pa
'access_key' => 'string',
'active' => 'bool',
'endpoint' => 'string',
'fallback_domain' => 'string',
'fallback_domain_enabled' => 'bool',
'host_business_id' => 'unsigned int',
'host_external_id' => 'string',
'pixel_id' => 'unsigned int',
Expand Down Expand Up @@ -2046,6 +2048,7 @@ public function createOwnedPage(array $fields = array(), array $params = array()

$param_types = array(
'code' => 'string',
'entry_point' => 'string',
'page_id' => 'int',
);
$enums = array(
Expand Down Expand Up @@ -2825,6 +2828,7 @@ public function updateSelf(array $fields = array(), array $params = array(), $pe
$this->assureId();

$param_types = array(
'entry_point' => 'string',
'name' => 'string',
'primary_page' => 'string',
'timezone_id' => 'unsigned int',
Expand Down
2 changes: 0 additions & 2 deletions src/FacebookAds/Object/Fields/AdPromotedObjectFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class AdPromotedObjectFields extends AbstractEnum {
const PRODUCT_ITEM_ID = 'product_item_id';
const PRODUCT_SET_ID = 'product_set_id';
const RETENTION_DAYS = 'retention_days';
const WHATS_APP_BUSINESS_PHONE_NUMBER_ID = 'whats_app_business_phone_number_id';

public function getFieldTypes() {
return array(
Expand All @@ -72,7 +71,6 @@ public function getFieldTypes() {
'product_item_id' => 'string',
'product_set_id' => 'string',
'retention_days' => 'string',
'whats_app_business_phone_number_id' => 'Object',
);
}
}
2 changes: 2 additions & 0 deletions src/FacebookAds/Object/Fields/IGMediaFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class IGMediaFields extends AbstractEnum {

const CAPTION = 'caption';
const COMMENTS_COUNT = 'comments_count';
const COPYRIGHT_CHECK_INFORMATION = 'copyright_check_information';
const ID = 'id';
const IG_ID = 'ig_id';
const IS_COMMENT_ENABLED = 'is_comment_enabled';
Expand All @@ -43,6 +44,7 @@ public function getFieldTypes() {
return array(
'caption' => 'string',
'comments_count' => 'int',
'copyright_check_information' => 'IGVideoCopyrightCheckMatchesInformation',
'id' => 'string',
'ig_id' => 'string',
'is_comment_enabled' => 'bool',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
/*
* 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.
*/

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
* 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.
*
*/

class IGVideoCopyrightCheckMatchesInformationFields extends AbstractEnum {

const COPYRIGHT_MATCHES = 'copyright_matches';
const STATUS = 'status';

public function getFieldTypes() {
return array(
'copyright_matches' => 'list<Object>',
'status' => 'IGVideoCopyrightCheckStatus',
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
/*
* 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.
*/

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
* 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.
*
*/

class IGVideoCopyrightCheckStatusFields extends AbstractEnum {

const MATCHES_FOUND = 'matches_found';
const STATUS = 'status';

public function getFieldTypes() {
return array(
'matches_found' => 'bool',
'status' => 'string',
);
}
}
2 changes: 2 additions & 0 deletions src/FacebookAds/Object/Fields/InstagramCommentFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class InstagramCommentFields extends AbstractEnum {
const INSTAGRAM_USER = 'instagram_user';
const MENTIONED_INSTAGRAM_USERS = 'mentioned_instagram_users';
const MESSAGE = 'message';
const USERNAME = 'username';

public function getFieldTypes() {
return array(
Expand All @@ -39,6 +40,7 @@ public function getFieldTypes() {
'instagram_user' => 'InstagramUser',
'mentioned_instagram_users' => 'list<InstagramUser>',
'message' => 'string',
'username' => 'string',
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class OpenBridgeConfigurationFields extends AbstractEnum {
const ACCESS_KEY = 'access_key';
const ACTIVE = 'active';
const ENDPOINT = 'endpoint';
const FALLBACK_DOMAIN = 'fallback_domain';
const FALLBACK_DOMAIN_ENABLED = 'fallback_domain_enabled';
const HOST_BUSINESS_ID = 'host_business_id';
const HOST_EXTERNAL_ID = 'host_external_id';
const ID = 'id';
Expand All @@ -35,6 +37,8 @@ public function getFieldTypes() {
'access_key' => 'string',
'active' => 'bool',
'endpoint' => 'string',
'fallback_domain' => 'string',
'fallback_domain_enabled' => 'bool',
'host_business_id' => 'string',
'host_external_id' => 'string',
'id' => 'string',
Expand Down
6 changes: 4 additions & 2 deletions src/FacebookAds/Object/Fields/PageFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class PageFields extends AbstractEnum {
const DIRECTED_BY = 'directed_by';
const DISPLAY_SUBTEXT = 'display_subtext';
const DISPLAYED_MESSAGE_RESPONSE_TIME = 'displayed_message_response_time';
const DOES_VIEWER_HAVE_PAGE_PERMISSION_LINK_IG = 'does_viewer_have_page_permission_link_ig';
const EMAILS = 'emails';
const ENGAGEMENT = 'engagement';
const FAN_COUNT = 'fan_count';
Expand Down Expand Up @@ -87,6 +88,7 @@ class PageFields extends AbstractEnum {
const IS_CHAIN = 'is_chain';
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_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';
Expand All @@ -106,7 +108,6 @@ class PageFields extends AbstractEnum {
const MERCHANT_REVIEW_STATUS = 'merchant_review_status';
const MESSAGING_FEATURE_STATUS = 'messaging_feature_status';
const MESSENGER_ADS_DEFAULT_ICEBREAKERS = 'messenger_ads_default_icebreakers';
const MESSENGER_ADS_DEFAULT_PAGE_WELCOME_MESSAGE = 'messenger_ads_default_page_welcome_message';
const MESSENGER_ADS_DEFAULT_QUICK_REPLIES = 'messenger_ads_default_quick_replies';
const MESSENGER_ADS_QUICK_REPLIES_TYPE = 'messenger_ads_quick_replies_type';
const MINI_SHOP_STOREFRONT = 'mini_shop_storefront';
Expand Down Expand Up @@ -210,6 +211,7 @@ public function getFieldTypes() {
'directed_by' => 'string',
'display_subtext' => 'string',
'displayed_message_response_time' => 'string',
'does_viewer_have_page_permission_link_ig' => 'bool',
'emails' => 'list<string>',
'engagement' => 'Engagement',
'fan_count' => 'unsigned int',
Expand Down Expand Up @@ -238,6 +240,7 @@ public function getFieldTypes() {
'is_chain' => 'bool',
'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_messenger_bot_get_started_enabled' => 'bool',
'is_messenger_platform_bot' => 'bool',
'is_owned' => 'bool',
Expand All @@ -257,7 +260,6 @@ public function getFieldTypes() {
'merchant_review_status' => 'string',
'messaging_feature_status' => 'MessagingFeatureStatus',
'messenger_ads_default_icebreakers' => 'list<string>',
'messenger_ads_default_page_welcome_message' => 'MessengerDestinationPageWelcomeMessage',
'messenger_ads_default_quick_replies' => 'list<string>',
'messenger_ads_quick_replies_type' => 'string',
'mini_shop_storefront' => 'Shop',
Expand Down
2 changes: 2 additions & 0 deletions src/FacebookAds/Object/Fields/ShadowIGMediaBuilderFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@

class ShadowIGMediaBuilderFields extends AbstractEnum {

const COPYRIGHT_CHECK_STATUS = 'copyright_check_status';
const ID = 'id';
const STATUS = 'status';
const STATUS_CODE = 'status_code';

public function getFieldTypes() {
return array(
'copyright_check_status' => 'IGVideoCopyrightCheckStatus',
'id' => 'string',
'status' => 'string',
'status_code' => 'string',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,17 @@
*
*/

class MessengerDestinationPageWelcomeMessageFields extends AbstractEnum {
class ShadowIGMediaCollaboratorsFields extends AbstractEnum {

const ID = 'id';
const PAGE_WELCOME_MESSAGE_BODY = 'page_welcome_message_body';
const PAGE_WELCOME_MESSAGE_TYPE = 'page_welcome_message_type';
const TEMPLATE_NAME = 'template_name';
const TIME_CREATED = 'time_created';
const TIME_LAST_USED = 'time_last_used';
const INVITE_STATUS = 'invite_status';
const USERNAME = 'username';

public function getFieldTypes() {
return array(
'id' => 'string',
'page_welcome_message_body' => 'string',
'page_welcome_message_type' => 'string',
'template_name' => 'string',
'time_created' => 'datetime',
'time_last_used' => 'datetime',
'invite_status' => 'string',
'username' => 'string',
);
}
}
Loading

0 comments on commit eb61b29

Please sign in to comment.