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: D50948236

fbshipit-source-id: 631bc21751f943b0f6bf6fed31caab3b7051d380
  • Loading branch information
generatedunixname89002005295453 authored and facebook-github-bot committed Nov 2, 2023
1 parent eb61b29 commit bf538a2
Show file tree
Hide file tree
Showing 37 changed files with 531 additions and 80 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.2';
const SDKVersion = '18.0.3';
const TYPE_CHECKER_STRICT_MODE = false;
}
4 changes: 0 additions & 4 deletions src/FacebookAds/Object/Ad.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use FacebookAds\Object\Values\AdDatePresetValues;
use FacebookAds\Object\Values\AdEffectiveStatusValues;
use FacebookAds\Object\Values\AdExecutionOptionsValues;
use FacebookAds\Object\Values\AdMetaRewardAdgroupStatusValues;
use FacebookAds\Object\Values\AdOperatorValues;
use FacebookAds\Object\Values\AdPreviewAdFormatValues;
use FacebookAds\Object\Values\AdPreviewCreativeFeatureValues;
Expand Down Expand Up @@ -71,7 +70,6 @@ protected static function getReferencedEnums() {
$ref_enums['Status'] = AdStatusValues::getInstance()->getValues();
$ref_enums['DatePreset'] = AdDatePresetValues::getInstance()->getValues();
$ref_enums['ExecutionOptions'] = AdExecutionOptionsValues::getInstance()->getValues();
$ref_enums['MetaRewardAdgroupStatus'] = AdMetaRewardAdgroupStatusValues::getInstance()->getValues();
$ref_enums['Operator'] = AdOperatorValues::getInstance()->getValues();
$ref_enums['StatusOption'] = AdStatusOptionValues::getInstance()->getValues();
return $ref_enums;
Expand Down Expand Up @@ -484,15 +482,13 @@ public function updateSelf(array $fields = array(), array $params = array(), $pe
'engagement_audience' => 'bool',
'execution_options' => 'list<execution_options_enum>',
'include_demolink_hashes' => 'bool',
'meta_reward_adgroup_status' => 'meta_reward_adgroup_status_enum',
'name' => 'string',
'priority' => 'unsigned int',
'status' => 'status_enum',
'tracking_specs' => 'Object',
);
$enums = array(
'execution_options_enum' => AdExecutionOptionsValues::getInstance()->getValues(),
'meta_reward_adgroup_status_enum' => AdMetaRewardAdgroupStatusValues::getInstance()->getValues(),
'status_enum' => AdStatusValues::getInstance()->getValues(),
);

Expand Down
4 changes: 1 addition & 3 deletions src/FacebookAds/Object/AdAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
use FacebookAds\Object\Values\AdCreativeOperatorValues;
use FacebookAds\Object\Values\AdDatePresetValues;
use FacebookAds\Object\Values\AdExecutionOptionsValues;
use FacebookAds\Object\Values\AdMetaRewardAdgroupStatusValues;
use FacebookAds\Object\Values\AdOperatorValues;
use FacebookAds\Object\Values\AdPlacePageSetLocationTypesValues;
use FacebookAds\Object\Values\AdPlacePageSetTargetedAreaTypeValues;
Expand Down Expand Up @@ -813,7 +812,6 @@ public function createAd(array $fields = array(), array $params = array(), $pend
'engagement_audience' => 'bool',
'execution_options' => 'list<execution_options_enum>',
'include_demolink_hashes' => 'bool',
'meta_reward_adgroup_status' => 'meta_reward_adgroup_status_enum',
'name' => 'string',
'priority' => 'unsigned int',
'source_ad_id' => 'string',
Expand All @@ -822,7 +820,6 @@ public function createAd(array $fields = array(), array $params = array(), $pend
);
$enums = array(
'execution_options_enum' => AdExecutionOptionsValues::getInstance()->getValues(),
'meta_reward_adgroup_status_enum' => AdMetaRewardAdgroupStatusValues::getInstance()->getValues(),
'status_enum' => AdStatusValues::getInstance()->getValues(),
);

Expand Down Expand Up @@ -1907,6 +1904,7 @@ public function createCustomAudience(array $fields = array(), array $params = ar
'subtype' => 'subtype_enum',
'use_in_campaigns' => 'bool',
'video_group_ids' => 'list<string>',
'whats_app_business_phone_number_id' => 'string',
);
$enums = array(
'claim_objective_enum' => CustomAudienceClaimObjectiveValues::getInstance()->getValues(),
Expand Down
29 changes: 29 additions & 0 deletions src/FacebookAds/Object/AdSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
use FacebookAds\Object\Values\AdsInsightsDatePresetValues;
use FacebookAds\Object\Values\AdsInsightsLevelValues;
use FacebookAds\Object\Values\AdsInsightsSummaryActionBreakdownsValues;
use FacebookAds\Object\Values\HighDemandPeriodBudgetValueTypeValues;
use FacebookAds\Object\Traits\AdLabelAwareCrudObjectTrait;
use FacebookAds\Object\Traits\ObjectValidation;

Expand Down Expand Up @@ -299,6 +300,34 @@ public function getAsyncAdRequests(array $fields = array(), array $params = arra
return $pending ? $request : $request->execute();
}

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

$param_types = array(
'budget_value' => 'unsigned int',
'budget_value_type' => 'budget_value_type_enum',
'time_end' => 'unsigned int',
'time_start' => 'unsigned int',
);
$enums = array(
'budget_value_type_enum' => HighDemandPeriodBudgetValueTypeValues::getInstance()->getValues(),
);

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

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

Expand Down
1 change: 1 addition & 0 deletions src/FacebookAds/Object/Business.php
Original file line number Diff line number Diff line change
Expand Up @@ -1607,6 +1607,7 @@ public function createManagedPartnerBusiness(array $fields = array(), array $par
'sales_rep_email' => 'string',
'seller_external_website_url' => 'string',
'seller_targeting_countries' => 'list<string>',
'skip_partner_page_creation' => 'bool',
'survey_business_type' => 'survey_business_type_enum',
'survey_num_assets' => 'unsigned int',
'survey_num_people' => 'unsigned int',
Expand Down
65 changes: 65 additions & 0 deletions src/FacebookAds/Object/CTXPartnerAppWelcomeMessageFlow.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?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;

use FacebookAds\ApiRequest;
use FacebookAds\Cursor;
use FacebookAds\Http\RequestInterface;
use FacebookAds\TypeChecker;
use FacebookAds\Object\Fields\CTXPartnerAppWelcomeMessageFlowFields;

/**
* 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 CTXPartnerAppWelcomeMessageFlow extends AbstractCrudObject {

/**
* @return CTXPartnerAppWelcomeMessageFlowFields
*/
public static function getFieldsEnum() {
return CTXPartnerAppWelcomeMessageFlowFields::getInstance();
}

protected static function getReferencedEnums() {
$ref_enums = array();
return $ref_enums;
}


public function getSelf(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,
'/',
new CTXPartnerAppWelcomeMessageFlow(),
'NODE',
CTXPartnerAppWelcomeMessageFlow::getFieldsEnum()->getValues(),
new TypeChecker($param_types, $enums)
);
$request->addParams($params);
$request->addFields($fields);
return $pending ? $request : $request->execute();
}

}
29 changes: 29 additions & 0 deletions src/FacebookAds/Object/Campaign.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
use FacebookAds\Object\Values\CampaignSpecialAdCategoryValues;
use FacebookAds\Object\Values\CampaignStatusOptionValues;
use FacebookAds\Object\Values\CampaignStatusValues;
use FacebookAds\Object\Values\HighDemandPeriodBudgetValueTypeValues;
use FacebookAds\Object\Traits\AdLabelAwareCrudObjectTrait;
use FacebookAds\Object\Traits\ObjectValidation;

Expand Down Expand Up @@ -217,6 +218,34 @@ public function getAdSets(array $fields = array(), array $params = array(), $pen
return $pending ? $request : $request->execute();
}

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

$param_types = array(
'budget_value' => 'unsigned int',
'budget_value_type' => 'budget_value_type_enum',
'time_end' => 'unsigned int',
'time_start' => 'unsigned int',
);
$enums = array(
'budget_value_type_enum' => HighDemandPeriodBudgetValueTypeValues::getInstance()->getValues(),
);

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

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

Expand Down
6 changes: 6 additions & 0 deletions src/FacebookAds/Object/Fields/AdAssetFeedSpecFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ class AdAssetFeedSpecFields extends AbstractEnum {
const IMAGES = 'images';
const LINK_URLS = 'link_urls';
const MESSAGE_EXTENSIONS = 'message_extensions';
const ONSITE_DESTINATIONS = 'onsite_destinations';
const OPTIMIZATION_TYPE = 'optimization_type';
const REASONS_TO_SHOP = 'reasons_to_shop';
const SHOPS_BUNDLE = 'shops_bundle';
const TITLES = 'titles';
const VIDEOS = 'videos';

Expand All @@ -60,7 +63,10 @@ public function getFieldTypes() {
'images' => 'list<AdAssetFeedSpecImage>',
'link_urls' => 'list<AdAssetFeedSpecLinkURL>',
'message_extensions' => 'list<AdAssetMessageExtensions>',
'onsite_destinations' => 'list<Object>',
'optimization_type' => 'string',
'reasons_to_shop' => 'bool',
'shops_bundle' => 'bool',
'titles' => 'list<AdAssetFeedSpecTitle>',
'videos' => 'list<AdAssetFeedSpecVideo>',
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class AdCreativeBrandedContentAdsFields extends AbstractEnum {
const AD_FORMAT = 'ad_format';
const CREATOR_AD_PERMISSION_TYPE = 'creator_ad_permission_type';
const INSTAGRAM_BOOST_POST_ACCESS_TOKEN = 'instagram_boost_post_access_token';
const IS_MCA_INTERNAL = 'is_mca_internal';
const PARTNERS = 'partners';
const UI_VERSION = 'ui_version';

Expand All @@ -33,6 +34,7 @@ public function getFieldTypes() {
'ad_format' => 'int',
'creator_ad_permission_type' => 'string',
'instagram_boost_post_access_token' => 'string',
'is_mca_internal' => 'bool',
'partners' => 'list<Object>',
'ui_version' => 'int',
);
Expand Down
2 changes: 2 additions & 0 deletions src/FacebookAds/Object/Fields/AdCreativeFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class AdCreativeFields extends AbstractEnum {
const OBJECT_TYPE = 'object_type';
const OBJECT_URL = 'object_url';
const OMNICHANNEL_LINK_SPEC = 'omnichannel_link_spec';
const PHOTO_ALBUM_SOURCE_OBJECT_STORY_ID = 'photo_album_source_object_story_id';
const PLACE_PAGE_SET_ID = 'place_page_set_id';
const PLATFORM_CUSTOMIZATIONS = 'platform_customizations';
const PLAYABLE_ASSET_ID = 'playable_asset_id';
Expand Down Expand Up @@ -142,6 +143,7 @@ public function getFieldTypes() {
'object_type' => 'ObjectType',
'object_url' => 'string',
'omnichannel_link_spec' => 'AdCreativeOmnichannelLinkSpec',
'photo_album_source_object_story_id' => 'string',
'place_page_set_id' => 'string',
'platform_customizations' => 'AdCreativePlatformCustomization',
'playable_asset_id' => 'string',
Expand Down
2 changes: 2 additions & 0 deletions src/FacebookAds/Object/Fields/AdCreativeLinkDataFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class AdCreativeLinkDataFields extends AbstractEnum {
const ADDITIONAL_IMAGE_INDEX = 'additional_image_index';
const APP_LINK_SPEC = 'app_link_spec';
const ATTACHMENT_STYLE = 'attachment_style';
const AUTOMATED_PRODUCT_TAGS = 'automated_product_tags';
const BRANDED_CONTENT_SHARED_TO_SPONSOR_STATUS = 'branded_content_shared_to_sponsor_status';
const BRANDED_CONTENT_SPONSOR_PAGE_ID = 'branded_content_sponsor_page_id';
const CALL_TO_ACTION = 'call_to_action';
Expand Down Expand Up @@ -62,6 +63,7 @@ public function getFieldTypes() {
'additional_image_index' => 'int',
'app_link_spec' => 'AdCreativeLinkDataAppLinkSpec',
'attachment_style' => 'string',
'automated_product_tags' => 'bool',
'branded_content_shared_to_sponsor_status' => 'string',
'branded_content_sponsor_page_id' => 'string',
'call_to_action' => 'AdCreativeLinkDataCallToAction',
Expand Down
2 changes: 0 additions & 2 deletions src/FacebookAds/Object/Fields/AdFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class AdFields extends AbstractEnum {
const ID = 'id';
const ISSUES_INFO = 'issues_info';
const LAST_UPDATED_BY_APP_ID = 'last_updated_by_app_id';
const META_REWARD_ADGROUP_STATUS = 'meta_reward_adgroup_status';
const NAME = 'name';
const PREVIEW_SHAREABLE_LINK = 'preview_shareable_link';
const PRIORITY = 'priority';
Expand Down Expand Up @@ -96,7 +95,6 @@ public function getFieldTypes() {
'id' => 'string',
'issues_info' => 'list<AdgroupIssuesInfo>',
'last_updated_by_app_id' => 'string',
'meta_reward_adgroup_status' => 'string',
'name' => 'string',
'preview_shareable_link' => 'string',
'priority' => 'unsigned int',
Expand Down
4 changes: 4 additions & 0 deletions src/FacebookAds/Object/Fields/AdsInsightsFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class AdsInsightsFields extends AbstractEnum {
const CATALOG_SEGMENT_VALUE_OMNI_PURCHASE_ROAS = 'catalog_segment_value_omni_purchase_roas';
const CATALOG_SEGMENT_VALUE_WEBSITE_PURCHASE_ROAS = 'catalog_segment_value_website_purchase_roas';
const CLICKS = 'clicks';
const CONVERSION_LEAD_RATE = 'conversion_lead_rate';
const CONVERSION_RATE_RANKING = 'conversion_rate_ranking';
const CONVERSION_VALUES = 'conversion_values';
const CONVERSIONS = 'conversions';
Expand All @@ -61,6 +62,7 @@ class AdsInsightsFields extends AbstractEnum {
const COST_PER_ACTION_TYPE = 'cost_per_action_type';
const COST_PER_AD_CLICK = 'cost_per_ad_click';
const COST_PER_CONVERSION = 'cost_per_conversion';
const COST_PER_CONVERSION_LEAD = 'cost_per_conversion_lead';
const COST_PER_DDA_COUNTBY_CONVS = 'cost_per_dda_countby_convs';
const COST_PER_ESTIMATED_AD_RECALLERS = 'cost_per_estimated_ad_recallers';
const COST_PER_INLINE_LINK_CLICK = 'cost_per_inline_link_click';
Expand Down Expand Up @@ -186,6 +188,7 @@ public function getFieldTypes() {
'catalog_segment_value_omni_purchase_roas' => 'list<AdsActionStats>',
'catalog_segment_value_website_purchase_roas' => 'list<AdsActionStats>',
'clicks' => 'string',
'conversion_lead_rate' => 'string',
'conversion_rate_ranking' => 'string',
'conversion_values' => 'list<AdsActionStats>',
'conversions' => 'list<AdsActionStats>',
Expand All @@ -196,6 +199,7 @@ public function getFieldTypes() {
'cost_per_action_type' => 'list<AdsActionStats>',
'cost_per_ad_click' => 'list<AdsActionStats>',
'cost_per_conversion' => 'list<AdsActionStats>',
'cost_per_conversion_lead' => 'string',
'cost_per_dda_countby_convs' => 'string',
'cost_per_estimated_ad_recallers' => 'string',
'cost_per_inline_link_click' => 'string',
Expand Down
4 changes: 4 additions & 0 deletions src/FacebookAds/Object/Fields/ApplicationFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ class ApplicationFields extends AbstractEnum {
const RESTRICTIONS = 'restrictions';
const RESTRICTIVE_DATA_FILTER_PARAMS = 'restrictive_data_filter_params';
const RESTRICTIVE_DATA_FILTER_RULES = 'restrictive_data_filter_rules';
const SDK_AUTO_LOGGING_DEFAULT_VALUE = 'sdk_auto_logging_default_value';
const SDK_AUTO_LOGGING_OVERRIDE_VALUE = 'sdk_auto_logging_override_value';
const SDK_UPDATE_MESSAGE = 'sdk_update_message';
const SEAMLESS_LOGIN = 'seamless_login';
const SECURE_CANVAS_URL = 'secure_canvas_url';
Expand Down Expand Up @@ -210,6 +212,8 @@ public function getFieldTypes() {
'restrictions' => 'Object',
'restrictive_data_filter_params' => 'string',
'restrictive_data_filter_rules' => 'string',
'sdk_auto_logging_default_value' => 'bool',
'sdk_auto_logging_override_value' => 'bool',
'sdk_update_message' => 'string',
'seamless_login' => 'int',
'secure_canvas_url' => 'string',
Expand Down
Loading

0 comments on commit bf538a2

Please sign in to comment.