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

fbshipit-source-id: 0d905f15789f9c0d18d4c8ad291539c44e00c62e
  • Loading branch information
generatedunixname89002005295453 authored and facebook-github-bot committed Apr 15, 2024
1 parent 37777aa commit f3eb099
Show file tree
Hide file tree
Showing 53 changed files with 404 additions and 251 deletions.
4 changes: 2 additions & 2 deletions examples/AdAccountAdSetsPostAdSetCreateCpa.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
'name' => 'A CPA Ad Set',
'campaign_id' => '<adCampaignLinkClicksID>',
'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',
Expand Down
4 changes: 2 additions & 2 deletions examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
'name' => 'A CPA Ad Set optimized for App Events',
'campaign_id' => '<adCampaignAppInstallsID>',
'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',
Expand Down
4 changes: 2 additions & 2 deletions examples/AdAccountAdSetsPostCreateAdSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '<adCampaignLinkClicksID>',
'bid_amount' => '500',
'billing_event' => 'IMPRESSIONS',
Expand Down
4 changes: 2 additions & 2 deletions examples/AdAccountAdSetsPostDailyBudget20.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '<adCampaignLinkClicksID>',
'bid_amount' => '100',
'billing_event' => 'LINK_CLICKS',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '<adCampaignLinkClicksID>',
'bid_amount' => '100',
'billing_event' => 'LINK_CLICKS',
Expand Down
4 changes: 2 additions & 2 deletions examples/AdAccountAdSetsPostOptimizePostEngagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '<adCampaignLinkClicksID>',
'bid_amount' => '500',
'billing_event' => 'IMPRESSIONS',
Expand Down
2 changes: 1 addition & 1 deletion examples/AdgroupLeadsEdgeAdgroupLeadsFiltered.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion examples/AdsPixelEventsPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
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 = '19.0';
const SDKVersion = '19.0.2';
const SDKVersion = '19.0.3';
const TYPE_CHECKER_STRICT_MODE = false;
}
71 changes: 71 additions & 0 deletions src/FacebookAds/Object/AdAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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<string>',
'is_account_level_brand_safety_exclusion' => 'bool',
'is_account_level_employer_exclusion' => 'bool',
'is_exclusion' => 'bool',
'limit_type' => 'limit_type_enum',
'objective' => 'objective_enum',
Expand Down Expand Up @@ -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();

Expand Down
23 changes: 0 additions & 23 deletions src/FacebookAds/Object/AdsPixel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
28 changes: 1 addition & 27 deletions src/FacebookAds/Object/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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<string>',
'user_id' => 'string',
Expand Down Expand Up @@ -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();

Expand Down
52 changes: 0 additions & 52 deletions src/FacebookAds/Object/CommerceMerchantSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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<string>',
);
$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();

Expand Down
34 changes: 31 additions & 3 deletions src/FacebookAds/Object/CommerceOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<map>',
'merchant_order_reference' => 'string',
);
$enums = array(
);
Expand All @@ -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(),
Expand Down Expand Up @@ -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();

Expand Down
Loading

0 comments on commit f3eb099

Please sign in to comment.