diff --git a/.circleci/config.yml b/.circleci/config.yml index 8ba41a802..e6bfd960c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,26 +3,25 @@ version: 2 shared: &shared - steps: - - checkout - # Define config in CircleCi's project settings → Environment Variables - - run: echo \{\"app_id\":\"$FB_APP_ID\",\"app_secret\":\"$FB_APP_SECRET\",\"act_id\":\"act_$FB_ACCOUNT_ID\",\"page_id\":\"$FB_PAGE_ID\",\"access_token\":\"$FB_ACCESS_TOKEN\",\"business\":\"$FB_BUSINESS_ID\",\"sec_business\":\"$FB_BUSINESS_ID_BIS\",\"sec_act_id\":\"act_$FB_ACCOUNT_ID_BIS\"\} > config.json - # Cheapo virtualenv, CCi images use the circleci user so no writing to the root site-packages - - run: virtualenv venv - - run: venv/bin/python setup.py install - - run: venv/bin/python -m facebook_business.test.unit + steps: + - checkout + # Define config in CircleCi's project settings → Environment Variables + - run: echo \{\"app_id\":\"$FB_APP_ID\",\"app_secret\":\"$FB_APP_SECRET\",\"act_id\":\"act_$FB_ACCOUNT_ID\",\"page_id\":\"$FB_PAGE_ID\",\"access_token\":\"$FB_ACCESS_TOKEN\",\"business\":\"$FB_BUSINESS_ID\",\"sec_business\":\"$FB_BUSINESS_ID_BIS\",\"sec_act_id\":\"act_$FB_ACCOUNT_ID_BIS\"\} > config.json + # Cheapo virtualenv, CCi images use the circleci user so no writing to the root site-packages + - run: pip install --no-cache-dir virtualenv && virtualenv venv3 + - run: virtualenv venv + - run: venv/bin/python setup.py install + - run: venv/bin/python -m facebook_business.test.unit jobs: - python-3.7: # Not specified in tox.ini + python-3.10: # Not specified in tox.ini <<: *shared docker: - - image: circleci/python:3.7-stretch-node - - + - image: python:3.7-buster all_jobs: &all_jobs - jobs: - - python-3.7 + jobs: + - python-3.10 workflows: version: 2 diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..75d6dcd08 --- /dev/null +++ b/LICENSE @@ -0,0 +1,18 @@ +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 Platform Policy +[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. diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index 42f447b2a..000000000 --- a/LICENSE.txt +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014-present, Facebook, Inc. 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. diff --git a/README.md b/README.md index 0e9723f98..add823433 100644 --- a/README.md +++ b/README.md @@ -170,7 +170,7 @@ API using a specific api object instead of the default, you can specify the ### Edges Look at the methods of an object to see what associations over which we can -iterate. For example an ``AdUser`` object has a method ``get_ad_accounts`` which +iterate. For example an ``User`` object has a method ``get_ad_accounts`` which returns an iterator of ``AdAccount`` objects. ### Ad Account @@ -183,7 +183,8 @@ Let's get all the ad accounts for the user with the given access token. I only have one account so the following is printed: ```python ->>> me = adobjects.AdUser(fbid='me') +>>> from facebook_business.adobjects.user import User +>>> me = adobjects.User(fbid='me') >>> my_accounts = list(me.get_ad_accounts()) >>> print(my_accounts) [{ 'account_id': u'17842443', 'id': u'act_17842443'}] @@ -192,7 +193,7 @@ have one account so the following is printed: ``` **WARNING**: We do not specify a keyword argument ``api=api`` when instantiating -the ``AdUser`` object here because we've already set the default api when +the ``User`` object here because we've already set the default api when bootstrapping. **NOTE**: We wrap the return value of ``get_ad_accounts`` with ``list()`` diff --git a/examples/AdAccountAdSetsPostAdSetCreateCpa.py b/examples/AdAccountAdSetsPostAdSetCreateCpa.py index aa996f0ca..4eb1f62a9 100644 --- a/examples/AdAccountAdSetsPostAdSetCreateCpa.py +++ b/examples/AdAccountAdSetsPostAdSetCreateCpa.py @@ -35,8 +35,8 @@ 'name': 'A CPA Ad Set', 'campaign_id': '', 'daily_budget': '5000', - 'start_time': '2023-04-24T09:25:05-0700', - 'end_time': '2023-05-01T09:25:05-0700', + 'start_time': '2024-06-18T16:39:15-0700', + 'end_time': '2024-06-25T16:39:15-0700', 'billing_event': 'IMPRESSIONS', 'optimization_goal': 'REACH', 'bid_amount': '1000', diff --git a/examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.py b/examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.py index 965a93abb..2a1f622ae 100644 --- a/examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.py +++ b/examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.py @@ -35,8 +35,8 @@ 'name': 'A CPA Ad Set optimized for App Events', 'campaign_id': '', 'daily_budget': '300', - 'start_time': '2023-04-24T09:25:55-0700', - 'end_time': '2023-05-01T09:25:55-0700', + 'start_time': '2024-06-18T16:40:02-0700', + 'end_time': '2024-06-25T16:40:02-0700', 'billing_event': 'IMPRESSIONS', 'optimization_goal': 'OFFSITE_CONVERSIONS', 'bid_amount': '100', diff --git a/examples/AdAccountAdSetsPostCreateAdSet.py b/examples/AdAccountAdSetsPostCreateAdSet.py index 992efe229..8367b5c71 100644 --- a/examples/AdAccountAdSetsPostCreateAdSet.py +++ b/examples/AdAccountAdSetsPostCreateAdSet.py @@ -34,8 +34,8 @@ params = { 'name': 'My First AdSet', 'lifetime_budget': '20000', - 'start_time': '2023-04-24T09:24:18-0700', - 'end_time': '2023-05-01T09:24:18-0700', + 'start_time': '2024-06-18T16:38:30-0700', + 'end_time': '2024-06-25T16:38:30-0700', 'campaign_id': '', 'bid_amount': '500', 'billing_event': 'IMPRESSIONS', diff --git a/examples/AdAccountAdSetsPostDailyBudget20.py b/examples/AdAccountAdSetsPostDailyBudget20.py index 94b8bd53c..cdff0eae6 100644 --- a/examples/AdAccountAdSetsPostDailyBudget20.py +++ b/examples/AdAccountAdSetsPostDailyBudget20.py @@ -34,8 +34,8 @@ params = { 'name': 'My First Adset', 'daily_budget': '2000', - 'start_time': '2023-04-17T09:25:24-0700', - 'end_time': '2023-04-24T09:25:24-0700', + 'start_time': '2024-06-11T16:39:34-0700', + 'end_time': '2024-06-18T16:39:34-0700', 'campaign_id': '', 'bid_amount': '100', 'billing_event': 'LINK_CLICKS', diff --git a/examples/AdAccountAdSetsPostLifetimeBudget200Duration10Days.py b/examples/AdAccountAdSetsPostLifetimeBudget200Duration10Days.py index aed28b9d7..d78657ff5 100644 --- a/examples/AdAccountAdSetsPostLifetimeBudget200Duration10Days.py +++ b/examples/AdAccountAdSetsPostLifetimeBudget200Duration10Days.py @@ -34,8 +34,8 @@ params = { 'name': 'My First Adset', 'lifetime_budget': '20000', - 'start_time': '2023-04-17T09:25:36-0700', - 'end_time': '2023-04-27T09:25:36-0700', + 'start_time': '2024-06-11T16:39:43-0700', + 'end_time': '2024-06-21T16:39:43-0700', 'campaign_id': '', 'bid_amount': '100', 'billing_event': 'LINK_CLICKS', diff --git a/examples/AdAccountAdSetsPostOptimizePostEngagement.py b/examples/AdAccountAdSetsPostOptimizePostEngagement.py index 725a4ab52..81cefea6d 100644 --- a/examples/AdAccountAdSetsPostOptimizePostEngagement.py +++ b/examples/AdAccountAdSetsPostOptimizePostEngagement.py @@ -34,8 +34,8 @@ params = { 'name': 'My First Adset', 'lifetime_budget': '20000', - 'start_time': '2023-04-17T09:25:45-0700', - 'end_time': '2023-04-27T09:25:45-0700', + 'start_time': '2024-06-11T16:39:52-0700', + 'end_time': '2024-06-21T16:39:52-0700', 'campaign_id': '', 'bid_amount': '500', 'billing_event': 'IMPRESSIONS', diff --git a/examples/AdgroupLeadsEdgeAdgroupLeadsFiltered.py b/examples/AdgroupLeadsEdgeAdgroupLeadsFiltered.py index 354a8472e..4b8b7221a 100644 --- a/examples/AdgroupLeadsEdgeAdgroupLeadsFiltered.py +++ b/examples/AdgroupLeadsEdgeAdgroupLeadsFiltered.py @@ -32,7 +32,7 @@ fields = [ ] params = { - 'filtering': [{'field':'time_created','operator':'GREATER_THAN','value':1681144509}], + 'filtering': [{'field':'time_created','operator':'GREATER_THAN','value':1717544918}], } print Ad(id).get_leads( fields=fields, diff --git a/examples/AdsPixelEventsPost.py b/examples/AdsPixelEventsPost.py index 8c3d050ba..22e0acb15 100644 --- a/examples/AdsPixelEventsPost.py +++ b/examples/AdsPixelEventsPost.py @@ -31,7 +31,7 @@ fields = [ ] params = { - 'data': [{'event_name':'PageView','event_time':1681748568,'user_data':{'fbc':'fb.1.1554763741205.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890','fbp':'fb.1.1558571054389.1098115397','em':'309a0a5c3e211326ae75ca18196d301a9bdbd1a882a4d2569511033da23f0abd'}}], + 'data': [{'event_name':'PageView','event_time':1718149023,'user_data':{'fbc':'fb.1.1554763741205.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890','fbp':'fb.1.1558571054389.1098115397','em':'309a0a5c3e211326ae75ca18196d301a9bdbd1a882a4d2569511033da23f0abd'}}], } print AdsPixel(id).create_event( fields=fields, diff --git a/examples/ProductCatalogHotelsPostUpdateHotelsCatalogSettings.py b/examples/ProductCatalogHotelsPostUpdateHotelsCatalogSettings.py index 7c939066f..e5a80644b 100644 --- a/examples/ProductCatalogHotelsPostUpdateHotelsCatalogSettings.py +++ b/examples/ProductCatalogHotelsPostUpdateHotelsCatalogSettings.py @@ -31,7 +31,6 @@ fields = [ ] params = { - 'hotel_catalog_settings': {'pull_config_id':''}, } print ProductCatalog(id).update( fields=fields, diff --git a/examples/async.py b/examples/async.py index 203e7129f..de93f59d6 100644 --- a/examples/async.py +++ b/examples/async.py @@ -33,9 +33,8 @@ this_dir = os.path.dirname(__file__) config_filename = os.path.join(this_dir, 'config.json') -config_file = open(config_filename) -config = json.load(config_file) -config_file.close() +with open(config_filename) as config_file: + config = json.load(config_file) api = FacebookAdsApi.init(access_token=config['access_token']) account_id = config['act_id'] diff --git a/examples/batch_create.py b/examples/batch_create.py index 42d00eebe..bc20bf52c 100644 --- a/examples/batch_create.py +++ b/examples/batch_create.py @@ -22,6 +22,7 @@ Creates several ads using batch calls. """ + from facebook_business import FacebookSession from facebook_business import FacebookAdsApi from facebook_business.adobjects.adaccount import AdAccount @@ -35,9 +36,8 @@ this_dir = os.path.dirname(__file__) config_filename = os.path.join(this_dir, 'config.json') -config_file = open(config_filename) -config = json.load(config_file) -config_file.close() +with open(config_filename) as config_file: + config = json.load(config_file) ### Setup session and api objects session = FacebookSession( diff --git a/examples/batch_pause.py b/examples/batch_pause.py index d46e13192..55fd6ec6d 100644 --- a/examples/batch_pause.py +++ b/examples/batch_pause.py @@ -22,6 +22,7 @@ Pauses all active ad campaigns using batch calls. """ + from facebook_business import FacebookSession from facebook_business import FacebookAdsApi from facebook_business.adobjects.adaccount import AdAccount @@ -35,9 +36,8 @@ this_dir = os.path.dirname(__file__) config_filename = os.path.join(this_dir, 'config.json') -config_file = open(config_filename) -config = json.load(config_file) -config_file.close() +with open(config_filename) as config_file: + config = json.load(config_file) ### Setup session and api objects session = FacebookSession( diff --git a/examples/custom_audience_utils.py b/examples/custom_audience_utils.py index b35804c26..2823589d6 100644 --- a/examples/custom_audience_utils.py +++ b/examples/custom_audience_utils.py @@ -24,6 +24,7 @@ https://github.com/facebook/facebook-python-ads-sdk """ + from facebook_business import FacebookAdsApi from facebook_business.adobjects.adaccount import AdAccount from facebook_business.adobjects.customaudience import CustomAudience @@ -38,10 +39,8 @@ this_dir = os.path.dirname(__file__) config_filename = os.path.join(this_dir, 'config.json') -### Setup session and api objects -config_file = open(config_filename) -config = json.load(config_file) -config_file.close() +with open(config_filename) as config_file: + config = json.load(config_file) auth_info = ( config['app_id'], diff --git a/examples/dpa-update/dpa_search.py b/examples/dpa-update/dpa_search.py index 8f5614439..6e9deaa79 100644 --- a/examples/dpa-update/dpa_search.py +++ b/examples/dpa-update/dpa_search.py @@ -29,9 +29,8 @@ import sys sys.path.insert(1, os.path.join(this_dir, os.pardir, os.pardir)) -config_file = open(config_filename) -config = json.load(config_file) -config_file.close() +with open(config_filename) as config_file: + config = json.load(config_file) from facebook_business.api import FacebookAdsApi from facebook_business.adobjects.productcatalog import ProductCatalog diff --git a/examples/dpa-update/dpa_update.py b/examples/dpa-update/dpa_update.py index e70dd5e0a..e79402f27 100644 --- a/examples/dpa-update/dpa_update.py +++ b/examples/dpa-update/dpa_update.py @@ -30,9 +30,8 @@ import sys sys.path.insert(1, os.path.join(this_dir, os.pardir, os.pardir)) -config_file = open(config_filename) -config = json.load(config_file) -config_file.close() +with open(config_filename) as config_file: + config = json.load(config_file) from facebook_business.api import FacebookAdsApi from facebook_business.adobjects.productcatalog import ProductCatalog diff --git a/examples/read_objects.py b/examples/read_objects.py index 20306907b..b8f325945 100644 --- a/examples/read_objects.py +++ b/examples/read_objects.py @@ -22,6 +22,7 @@ Prints account permissions and campaign statistics. """ + from facebook_business import FacebookSession from facebook_business import FacebookAdsApi from facebook_business.adobjects.campaign import Campaign as AdCampaign @@ -35,9 +36,8 @@ this_dir = os.path.dirname(__file__) config_filename = os.path.join(this_dir, 'config.json') -config_file = open(config_filename) -config = json.load(config_file) -config_file.close() +with open(config_filename) as config_file: + config = json.load(config_file) ### Setup session and api objects session = FacebookSession( diff --git a/examples/simple_create.py b/examples/simple_create.py index 692d8e2a5..9f0d8825a 100644 --- a/examples/simple_create.py +++ b/examples/simple_create.py @@ -22,6 +22,7 @@ Creates an ad through a utility function. """ + from facebook_business import FacebookSession from facebook_business import FacebookAdsApi from facebook_business.adobjects.adaccount import AdAccount @@ -36,9 +37,8 @@ this_dir = os.path.dirname(__file__) config_filename = os.path.join(this_dir, 'config.json') -config_file = open(config_filename) -config = json.load(config_file) -config_file.close() +with open(config_filename) as config_file: + config = json.load(config_file) ### Setup session and api objects session = FacebookSession( @@ -88,10 +88,9 @@ 'ad_format': AdPreview.AdFormat.right_column_standard }) preview_filename = os.path.join(this_dir, 'preview_ad.html') - preview_file = open(preview_filename, 'w') - preview_file.write( - "Facebook Ad Preview%s" - % preview.get_html() - ) - preview_file.close() + with open(preview_filename, 'w') as preview_file: + preview_file.write( + "Facebook Ad Preview%s" + % preview.get_html() + ) print('**** %s has been created!' % preview_filename) diff --git a/examples/upload_video.py b/examples/upload_video.py index c4482f8a0..5ede3a4c4 100644 --- a/examples/upload_video.py +++ b/examples/upload_video.py @@ -22,6 +22,7 @@ Upload a video to adaccount """ + import sys import os @@ -34,9 +35,8 @@ config_filename = os.path.join(sdk_path, './config.json') -config_file = open(config_filename) -config = json.load(config_file) -config_file.close() +with open(config_filename) as config_file: + config = json.load(config_file) ### Setup session and api objects session = FacebookSession( diff --git a/facebook_business/__init__.py b/facebook_business/__init__.py index dae775fbf..d9464e273 100644 --- a/facebook_business/__init__.py +++ b/facebook_business/__init__.py @@ -1,27 +1,13 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.session import FacebookSession from facebook_business.api import FacebookAdsApi -__version__ = '17.0.4+work4' +__version__ = '20.0.0+work4' __all__ = [ 'session', 'objects', diff --git a/facebook_business/adobjects/__init__.py b/facebook_business/adobjects/__init__.py index dfc80ec50..e69de29bb 100644 --- a/facebook_business/adobjects/__init__.py +++ b/facebook_business/adobjects/__init__.py @@ -1,19 +0,0 @@ -# Copyright 2014 Facebook, Inc. - -# 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. diff --git a/facebook_business/adobjects/abstractcrudobject.py b/facebook_business/adobjects/abstractcrudobject.py index 13e097a2f..3ad3fe4f3 100644 --- a/facebook_business/adobjects/abstractcrudobject.py +++ b/facebook_business/adobjects/abstractcrudobject.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.exceptions import ( FacebookBadObjectError, diff --git a/facebook_business/adobjects/abstractobject.py b/facebook_business/adobjects/abstractobject.py index 727a2f942..f1070af53 100644 --- a/facebook_business/adobjects/abstractobject.py +++ b/facebook_business/adobjects/abstractobject.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.exceptions import ( FacebookBadObjectError, diff --git a/facebook_business/adobjects/ad.py b/facebook_business/adobjects/ad.py index b4226bab5..35830b440 100644 --- a/facebook_business/adobjects/ad.py +++ b/facebook_business/adobjects/ad.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -44,7 +30,10 @@ def __init__(self, fbid=None, parent_id=None, api=None): class Field(AbstractObject.Field): account_id = 'account_id' + ad_active_time = 'ad_active_time' ad_review_feedback = 'ad_review_feedback' + ad_schedule_end_time = 'ad_schedule_end_time' + ad_schedule_start_time = 'ad_schedule_start_time' adlabels = 'adlabels' adset = 'adset' adset_id = 'adset_id' @@ -58,6 +47,7 @@ class Field(AbstractObject.Field): conversion_specs = 'conversion_specs' created_time = 'created_time' creative = 'creative' + creative_asset_groups_spec = 'creative_asset_groups_spec' demolink_hash = 'demolink_hash' display_sequence = 'display_sequence' effective_status = 'effective_status' @@ -66,7 +56,6 @@ class Field(AbstractObject.Field): id = 'id' issues_info = 'issues_info' last_updated_by_app_id = 'last_updated_by_app_id' - meta_reward_adgroup_status = 'meta_reward_adgroup_status' name = 'name' preview_shareable_link = 'preview_shareable_link' priority = 'priority' @@ -146,10 +135,6 @@ class ExecutionOptions: synchronous_ad_review = 'synchronous_ad_review' validate_only = 'validate_only' - class MetaRewardAdgroupStatus: - active = 'ACTIVE' - inactive = 'INACTIVE' - class Operator: all = 'ALL' any = 'ANY' @@ -208,7 +193,7 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No 'date_preset': 'date_preset_enum', 'from_adtable': 'bool', 'review_feedback_breakdown': 'bool', - 'time_range': 'Object', + 'time_range': 'map', } enums = { 'date_preset_enum': [ @@ -261,18 +246,20 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') param_types = { + 'ad_schedule_end_time': 'datetime', + 'ad_schedule_start_time': 'datetime', 'adlabels': 'list', 'adset_spec': 'AdSet', 'audience_id': 'string', 'bid_amount': 'int', 'conversion_domain': 'string', 'creative': 'AdCreative', + 'creative_asset_groups_spec': 'Object', 'display_sequence': 'unsigned int', 'draft_adgroup_id': 'string', 'engagement_audience': 'bool', 'execution_options': 'list', 'include_demolink_hashes': 'bool', - 'meta_reward_adgroup_status': 'meta_reward_adgroup_status_enum', 'name': 'string', 'priority': 'unsigned int', 'status': 'status_enum', @@ -280,7 +267,6 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure } enums = { 'execution_options_enum': Ad.ExecutionOptions.__dict__.values(), - 'meta_reward_adgroup_status_enum': Ad.MetaRewardAdgroupStatus.__dict__.values(), 'status_enum': Ad.Status.__dict__.values(), } request = FacebookRequest( @@ -408,7 +394,7 @@ def get_copies(self, fields=None, params=None, batch=None, success=None, failure param_types = { 'date_preset': 'date_preset_enum', 'effective_status': 'list', - 'time_range': 'Object', + 'time_range': 'map', 'updated_since': 'int', } enums = { @@ -495,8 +481,8 @@ def get_insights(self, fields=None, params=None, is_async=False, batch=None, suc 'summary': 'list', 'summary_action_breakdowns': 'list', 'time_increment': 'string', - 'time_range': 'Object', - 'time_ranges': 'list', + 'time_range': 'map', + 'time_ranges': 'list', 'use_account_attribution_setting': 'bool', 'use_unified_attribution_setting': 'bool', } @@ -556,8 +542,8 @@ def get_insights_async(self, fields=None, params=None, batch=None, success=None, 'summary': 'list', 'summary_action_breakdowns': 'list', 'time_increment': 'string', - 'time_range': 'Object', - 'time_ranges': 'list', + 'time_range': 'map', + 'time_ranges': 'list', 'use_account_attribution_setting': 'bool', 'use_unified_attribution_setting': 'bool', } @@ -709,7 +695,10 @@ def get_targeting_sentence_lines(self, fields=None, params=None, batch=None, suc _field_types = { 'account_id': 'string', + 'ad_active_time': 'string', 'ad_review_feedback': 'AdgroupReviewFeedback', + 'ad_schedule_end_time': 'datetime', + 'ad_schedule_start_time': 'datetime', 'adlabels': 'list', 'adset': 'AdSet', 'adset_id': 'string', @@ -723,6 +712,7 @@ def get_targeting_sentence_lines(self, fields=None, params=None, batch=None, suc 'conversion_specs': 'list', 'created_time': 'datetime', 'creative': 'AdCreative', + 'creative_asset_groups_spec': 'AdCreativeAssetGroupsSpec', 'demolink_hash': 'string', 'display_sequence': 'int', 'effective_status': 'EffectiveStatus', @@ -731,7 +721,6 @@ def get_targeting_sentence_lines(self, fields=None, params=None, batch=None, suc 'id': 'string', 'issues_info': 'list', 'last_updated_by_app_id': 'string', - 'meta_reward_adgroup_status': 'string', 'name': 'string', 'preview_shareable_link': 'string', 'priority': 'unsigned int', @@ -760,7 +749,6 @@ def _get_field_enum_info(cls): field_enum_info['Status'] = Ad.Status.__dict__.values() field_enum_info['DatePreset'] = Ad.DatePreset.__dict__.values() field_enum_info['ExecutionOptions'] = Ad.ExecutionOptions.__dict__.values() - field_enum_info['MetaRewardAdgroupStatus'] = Ad.MetaRewardAdgroupStatus.__dict__.values() field_enum_info['Operator'] = Ad.Operator.__dict__.values() field_enum_info['StatusOption'] = Ad.StatusOption.__dict__.values() return field_enum_info diff --git a/facebook_business/adobjects/adaccount.py b/facebook_business/adobjects/adaccount.py index 44106ee0e..3360d4811 100644 --- a/facebook_business/adobjects/adaccount.py +++ b/facebook_business/adobjects/adaccount.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -50,9 +36,11 @@ class Field(AbstractObject.Field): ad_account_promotable_objects = 'ad_account_promotable_objects' age = 'age' agency_client_declaration = 'agency_client_declaration' + all_capabilities = 'all_capabilities' amount_spent = 'amount_spent' attribution_spec = 'attribution_spec' balance = 'balance' + brand_safety_content_filter_levels = 'brand_safety_content_filter_levels' business = 'business' business_city = 'business_city' business_country_code = 'business_country_code' @@ -110,6 +98,7 @@ class Field(AbstractObject.Field): timezone_name = 'timezone_name' timezone_offset_hours_utc = 'timezone_offset_hours_utc' tos_accepted = 'tos_accepted' + user_access_expire_time = 'user_access_expire_time' user_tasks = 'user_tasks' user_tos_accepted = 'user_tos_accepted' viewable_business = 'viewable_business' @@ -171,6 +160,13 @@ class Currency: vnd = 'VND' zar = 'ZAR' + class PermittedTasks: + aa_analyze = 'AA_ANALYZE' + advertise = 'ADVERTISE' + analyze = 'ANALYZE' + draft = 'DRAFT' + manage = 'MANAGE' + class Tasks: aa_analyze = 'AA_ANALYZE' advertise = 'ADVERTISE' @@ -192,11 +188,11 @@ class ContentType: automotive_model = 'AUTOMOTIVE_MODEL' destination = 'DESTINATION' flight = 'FLIGHT' + generic = 'GENERIC' home_listing = 'HOME_LISTING' hotel = 'HOTEL' job = 'JOB' local_service_business = 'LOCAL_SERVICE_BUSINESS' - location_based_item = 'LOCATION_BASED_ITEM' media_title = 'MEDIA_TITLE' offline_product = 'OFFLINE_PRODUCT' product = 'PRODUCT' @@ -210,6 +206,7 @@ class Subtype: claim = 'CLAIM' custom = 'CUSTOM' engagement = 'ENGAGEMENT' + exclusion = 'EXCLUSION' fox = 'FOX' lookalike = 'LOOKALIKE' managed = 'MANAGED' @@ -219,6 +216,7 @@ class Subtype: primary = 'PRIMARY' regulated_categories_audience = 'REGULATED_CATEGORIES_AUDIENCE' study_rule_audience = 'STUDY_RULE_AUDIENCE' + subscriber_segment = 'SUBSCRIBER_SEGMENT' video = 'VIDEO' website = 'WEBSITE' @@ -347,6 +345,7 @@ def create_account_control(self, fields=None, params=None, batch=None, success=N from facebook_business.adobjects.adaccountbusinessconstraints import AdAccountBusinessConstraints param_types = { 'audience_controls': 'Object', + 'placement_controls': 'Object', } enums = { } @@ -525,6 +524,7 @@ def get_ad_saved_keywords(self, fields=None, params=None, batch=None, success=No from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adsavedkeywords import AdSavedKeywords param_types = { 'fields': 'list', } @@ -536,9 +536,9 @@ def get_ad_saved_keywords(self, fields=None, params=None, batch=None, success=No endpoint='/ad_saved_keywords', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=AdSavedKeywords, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=AdSavedKeywords, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -663,6 +663,7 @@ def create_ad_creative(self, fields=None, params=None, batch=None, success=None, 'call_to_action': 'Object', 'categorization_criteria': 'categorization_criteria_enum', 'category_media_source': 'category_media_source_enum', + 'contextual_multi_ads': 'map', 'degrees_of_freedom_spec': 'map', 'destination_set_id': 'string', 'dynamic_ad_voice': 'dynamic_ad_voice_enum', @@ -680,7 +681,6 @@ def create_ad_creative(self, fields=None, params=None, batch=None, success=None, 'is_dco_internal': 'bool', 'link_og_id': 'string', 'link_url': 'string', - 'messenger_sponsored_message': 'string', 'name': 'string', 'object_id': 'unsigned int', 'object_story_id': 'string', @@ -688,6 +688,7 @@ def create_ad_creative(self, fields=None, params=None, batch=None, success=None, 'object_type': 'string', 'object_url': 'string', 'omnichannel_link_spec': 'map', + 'page_welcome_message': 'string', 'place_page_set_id': 'string', 'platform_customizations': 'Object', 'playable_asset_id': 'string', @@ -696,7 +697,7 @@ def create_ad_creative(self, fields=None, params=None, batch=None, success=None, 'recommender_settings': 'map', 'source_instagram_media_id': 'string', 'template_url': 'string', - 'template_url_spec': 'Object', + 'template_url_spec': 'string', 'thumbnail_url': 'string', 'title': 'string', 'url_tags': 'string', @@ -840,7 +841,7 @@ def create_ad_image(self, fields=None, params=None, batch=None, success=None, fa api_utils.warning('`success` and `failure` callback only work for batch call.') from facebook_business.adobjects.adimage import AdImage param_types = { - 'bytes': 'Object', + 'bytes': 'string', 'copy_from': 'Object', } enums = { @@ -1115,7 +1116,7 @@ def get_ads(self, fields=None, params=None, batch=None, success=None, failure=No param_types = { 'date_preset': 'date_preset_enum', 'effective_status': 'list', - 'time_range': 'Object', + 'time_range': 'map', 'updated_since': 'int', } enums = { @@ -1149,6 +1150,8 @@ def create_ad(self, fields=None, params=None, batch=None, success=None, failure= api_utils.warning('`success` and `failure` callback only work for batch call.') from facebook_business.adobjects.ad import Ad param_types = { + 'ad_schedule_end_time': 'datetime', + 'ad_schedule_start_time': 'datetime', 'adlabels': 'list', 'adset_id': 'unsigned int', 'adset_spec': 'AdSet', @@ -1156,13 +1159,13 @@ def create_ad(self, fields=None, params=None, batch=None, success=None, failure= 'bid_amount': 'int', 'conversion_domain': 'string', 'creative': 'AdCreative', + 'creative_asset_groups_spec': 'Object', 'date_format': 'string', 'display_sequence': 'unsigned int', 'draft_adgroup_id': 'string', 'engagement_audience': 'bool', 'execution_options': 'list', 'include_demolink_hashes': 'bool', - 'meta_reward_adgroup_status': 'meta_reward_adgroup_status_enum', 'name': 'string', 'priority': 'unsigned int', 'source_ad_id': 'string', @@ -1171,7 +1174,6 @@ def create_ad(self, fields=None, params=None, batch=None, success=None, failure= } enums = { 'execution_options_enum': Ad.ExecutionOptions.__dict__.values(), - 'meta_reward_adgroup_status_enum': Ad.MetaRewardAdgroupStatus.__dict__.values(), 'status_enum': Ad.Status.__dict__.values(), } request = FacebookRequest( @@ -1197,43 +1199,11 @@ def create_ad(self, fields=None, params=None, batch=None, success=None, failure= self.assure_call() return request.execute() - def create_ads_conversion_goal(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'description': 'string', - 'goal_name': 'string', - 'single_channel_conversion_events': 'list', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/ads_conversion_goal', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, - api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - def get_ads_reporting_mmm_reports(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adsreportbuildermmmreport import AdsReportBuilderMMMReport param_types = { 'filtering': 'list', } @@ -1245,9 +1215,9 @@ def get_ads_reporting_mmm_reports(self, fields=None, params=None, batch=None, su endpoint='/ads_reporting_mmm_reports', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=AdsReportBuilderMMMReport, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=AdsReportBuilderMMMReport, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -1265,6 +1235,7 @@ def get_ads_reporting_mmm_schedulers(self, fields=None, params=None, batch=None, from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adsreportbuildermmmreportscheduler import AdsReportBuilderMMMReportScheduler param_types = { } enums = { @@ -1275,9 +1246,9 @@ def get_ads_reporting_mmm_schedulers(self, fields=None, params=None, batch=None, endpoint='/ads_reporting_mmm_schedulers', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=AdsReportBuilderMMMReportScheduler, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=AdsReportBuilderMMMReportScheduler, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -1297,7 +1268,7 @@ def get_ads_volume(self, fields=None, params=None, batch=None, success=None, fai api_utils.warning('`success` and `failure` callback only work for batch call.') from facebook_business.adobjects.adaccountadvolume import AdAccountAdVolume param_types = { - 'page_id': 'int', + 'page_id': 'string', 'recommendation_type': 'recommendation_type_enum', 'show_breakdown_by_actor': 'bool', } @@ -1369,7 +1340,7 @@ def get_ad_sets(self, fields=None, params=None, batch=None, success=None, failur 'date_preset': 'date_preset_enum', 'effective_status': 'list', 'is_completed': 'bool', - 'time_range': 'Object', + 'time_range': 'map', 'updated_since': 'int', } enums = { @@ -1412,6 +1383,7 @@ def create_ad_set(self, fields=None, params=None, batch=None, success=None, fail 'bid_constraints': 'map', 'bid_strategy': 'bid_strategy_enum', 'billing_event': 'billing_event_enum', + 'campaign_attribution': 'Object', 'campaign_id': 'string', 'campaign_spec': 'Object', 'creative_sequence': 'list', @@ -1441,6 +1413,8 @@ def create_ad_set(self, fields=None, params=None, batch=None, success=None, fail 'pacing_type': 'list', 'promoted_object': 'Object', 'rb_prediction_id': 'string', + 'regional_regulated_categories': 'list', + 'regional_regulation_identities': 'map', 'rf_prediction_id': 'string', 'source_adset_id': 'string', 'start_time': 'datetime', @@ -1462,6 +1436,7 @@ def create_ad_set(self, fields=None, params=None, batch=None, success=None, fail 'multi_optimization_goal_weight_enum': AdSet.MultiOptimizationGoalWeight.__dict__.values(), 'optimization_goal_enum': AdSet.OptimizationGoal.__dict__.values(), 'optimization_sub_event_enum': AdSet.OptimizationSubEvent.__dict__.values(), + 'regional_regulated_categories_enum': AdSet.RegionalRegulatedCategories.__dict__.values(), 'status_enum': AdSet.Status.__dict__.values(), 'tune_for_category_enum': AdSet.TuneForCategory.__dict__.values(), } @@ -1696,7 +1671,6 @@ def create_ad_video(self, fields=None, params=None, batch=None, success=None, fa api_utils.warning('`success` and `failure` callback only work for batch call.') from facebook_business.adobjects.advideo import AdVideo param_types = { - 'adaptive_type': 'string', 'animated_effect_id': 'unsigned int', 'application_id': 'string', 'asked_fun_fact_prompt_id': 'unsigned int', @@ -1726,7 +1700,6 @@ def create_ad_video(self, fields=None, params=None, batch=None, success=None, fa 'fun_fact_toastee_id': 'unsigned int', 'guide': 'list>', 'guide_enabled': 'bool', - 'has_nickname': 'bool', 'holiday_card': 'string', 'initial_heading': 'unsigned int', 'initial_pitch': 'unsigned int', @@ -1745,7 +1718,6 @@ def create_ad_video(self, fields=None, params=None, batch=None, success=None, fa 'original_fov': 'unsigned int', 'original_projection_type': 'original_projection_type_enum', 'publish_event_id': 'unsigned int', - 'react_mode_metadata': 'string', 'referenced_sticker_id': 'string', 'replace_video_id': 'string', 'slideshow_spec': 'map', @@ -1894,6 +1866,39 @@ def get_agencies(self, fields=None, params=None, batch=None, success=None, failu self.assure_call() return request.execute() + def create_agency(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'business': 'string', + 'permitted_tasks': 'list', + } + enums = { + 'permitted_tasks_enum': AdAccount.PermittedTasks.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/agencies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccount, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAccount, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_applications(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -2157,6 +2162,37 @@ def create_async_ad_request_set(self, fields=None, params=None, batch=None, succ self.assure_call() return request.execute() + def get_audience_funnel(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.audiencefunnel import AudienceFunnel + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/audience_funnel', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AudienceFunnel, + api_type='EDGE', + response_parser=ObjectParser(target_class=AudienceFunnel, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def create_block_list_draft(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -2224,6 +2260,7 @@ def get_business_projects(self, fields=None, params=None, batch=None, success=No from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.businessproject import BusinessProject param_types = { 'business': 'string', } @@ -2235,9 +2272,9 @@ def get_business_projects(self, fields=None, params=None, batch=None, success=No endpoint='/businessprojects', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=BusinessProject, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=BusinessProject, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -2299,7 +2336,7 @@ def get_campaigns(self, fields=None, params=None, batch=None, success=None, fail 'date_preset': 'date_preset_enum', 'effective_status': 'list', 'is_completed': 'bool', - 'time_range': 'Object', + 'time_range': 'map', } enums = { 'date_preset_enum': Campaign.DatePreset.__dict__.values(), @@ -2451,10 +2488,43 @@ def get_connected_instagram_accounts(self, fields=None, params=None, batch=None, self.assure_call() return request.execute() + def get_connected_instagram_accounts_with_iabp(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.instagramuser import InstagramUser + param_types = { + 'business_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/connected_instagram_accounts_with_iabp', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=InstagramUser, + api_type='EDGE', + response_parser=ObjectParser(target_class=InstagramUser, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_conversion_goals(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adsconversiongoal import AdsConversionGoal param_types = { } enums = { @@ -2465,9 +2535,40 @@ def get_conversion_goals(self, fields=None, params=None, batch=None, success=Non endpoint='/conversion_goals', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=AdsConversionGoal, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=AdsConversionGoal, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_cpa_guidance(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.bespokepartnerguidancelaser import BespokePartnerGuidanceLaser + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/cpa_guidance', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BespokePartnerGuidanceLaser, + api_type='EDGE', + response_parser=ObjectParser(target_class=BespokePartnerGuidanceLaser, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -2557,6 +2658,7 @@ def create_custom_audience(self, fields=None, params=None, batch=None, success=N 'subtype': 'subtype_enum', 'use_in_campaigns': 'bool', 'video_group_ids': 'list', + 'whats_app_business_phone_number_id': 'string', } enums = { 'claim_objective_enum': CustomAudience.ClaimObjective.__dict__.values(), @@ -2686,6 +2788,7 @@ def create_custom_conversion(self, fields=None, params=None, batch=None, success api_utils.warning('`success` and `failure` callback only work for batch call.') from facebook_business.adobjects.customconversion import CustomConversion param_types = { + 'action_source_type': 'action_source_type_enum', 'advanced_rule': 'string', 'custom_event_type': 'custom_event_type_enum', 'default_conversion_value': 'float', @@ -2695,6 +2798,7 @@ def create_custom_conversion(self, fields=None, params=None, batch=None, success 'rule': 'string', } enums = { + 'action_source_type_enum': CustomConversion.ActionSourceType.__dict__.values(), 'custom_event_type_enum': CustomConversion.CustomEventType.__dict__.values(), } request = FacebookRequest( @@ -2786,6 +2890,37 @@ def get_deprecated_targeting_ad_sets(self, fields=None, params=None, batch=None, self.assure_call() return request.execute() + def get_dsa_recommendations(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adaccountdsarecommendations import AdAccountDsaRecommendations + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/dsa_recommendations', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccountDsaRecommendations, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAccountDsaRecommendations, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_generate_previews(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -2891,8 +3026,8 @@ def get_insights(self, fields=None, params=None, is_async=False, batch=None, suc 'summary': 'list', 'summary_action_breakdowns': 'list', 'time_increment': 'string', - 'time_range': 'Object', - 'time_ranges': 'list', + 'time_range': 'map', + 'time_ranges': 'list', 'use_account_attribution_setting': 'bool', 'use_unified_attribution_setting': 'bool', } @@ -2952,8 +3087,8 @@ def get_insights_async(self, fields=None, params=None, batch=None, success=None, 'summary': 'list', 'summary_action_breakdowns': 'list', 'time_increment': 'string', - 'time_range': 'Object', - 'time_ranges': 'list', + 'time_range': 'map', + 'time_ranges': 'list', 'use_account_attribution_setting': 'bool', 'use_unified_attribution_setting': 'bool', } @@ -3056,7 +3191,7 @@ def get_ios_fourteen_campaign_limits(self, fields=None, params=None, batch=None, self.assure_call() return request.execute() - def create_managed_partner_ad(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def create_m_an_age_d_partner_ad(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -3065,6 +3200,9 @@ def create_managed_partner_ad(self, fields=None, params=None, batch=None, succes 'campaign_group_status': 'campaign_group_status_enum', 'conversion_domain': 'string', 'custom_event_type': 'custom_event_type_enum', + 'daily_budget': 'unsigned int', + 'dsa_beneficiary': 'string', + 'dsa_payor': 'string', 'end_time': 'unsigned int', 'lifetime_budget': 'unsigned int', 'override_creative_text': 'string', @@ -3219,37 +3357,6 @@ def get_minimum_budgets(self, fields=None, params=None, batch=None, success=None self.assure_call() return request.execute() - def get_offline_conversion_data_sets(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.offlineconversiondataset import OfflineConversionDataSet - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/offline_conversion_data_sets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=OfflineConversionDataSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=OfflineConversionDataSet, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - def get_on_behalf_requests(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -3524,6 +3631,7 @@ def create_reach_frequency_prediction(self, fields=None, params=None, batch=None 'impression': 'unsigned int', 'instream_packages': 'list', 'interval_frequency_cap_reset_period': 'unsigned int', + 'is_balanced_frequency': 'bool', 'is_bonus_media': 'bool', 'is_conversion_goal': 'bool', 'is_full_view': 'bool', @@ -3542,6 +3650,8 @@ def create_reach_frequency_prediction(self, fields=None, params=None, batch=None 'stop_time': 'unsigned int', 'story_event_type': 'unsigned int', 'target_cpm': 'unsigned int', + 'target_frequency': 'unsigned int', + 'target_frequency_reset_period': 'unsigned int', 'target_spec': 'Targeting', 'video_view_length_constraint': 'unsigned int', } @@ -3751,6 +3861,8 @@ def get_targeting_search(self, fields=None, params=None, batch=None, success=Non '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', @@ -3876,7 +3988,7 @@ def get_targeting_suggestions(self, fields=None, params=None, batch=None, succes self.assure_call() return request.execute() - def get_targeting_validation(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_targeting_valid_a_t_i_on(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -4037,15 +4149,79 @@ def delete_users_of_any_audience(self, fields=None, params=None, batch=None, suc self.assure_call() return request.execute() + def get_value_adjustment_rule_collections(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adsvalueadjustmentrulecollection import AdsValueAdjustmentRuleCollection + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/value_adjustment_rule_collections', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsValueAdjustmentRuleCollection, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdsValueAdjustmentRuleCollection, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_value_adjustment_rules(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adsvalueadjustmentrule import AdsValueAdjustmentRule + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/value_adjustment_rules', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsValueAdjustmentRule, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdsValueAdjustmentRule, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + _field_types = { 'account_id': 'string', 'account_status': 'unsigned int', 'ad_account_promotable_objects': 'AdAccountPromotableObjects', 'age': 'float', 'agency_client_declaration': 'AgencyClientDeclaration', + 'all_capabilities': 'list', 'amount_spent': 'string', 'attribution_spec': 'list', 'balance': 'string', + 'brand_safety_content_filter_levels': 'list', 'business': 'Business', 'business_city': 'string', 'business_country_code': 'string', @@ -4103,6 +4279,7 @@ def delete_users_of_any_audience(self, fields=None, params=None, batch=None, suc 'timezone_name': 'string', 'timezone_offset_hours_utc': 'float', 'tos_accepted': 'map', + 'user_access_expire_time': 'datetime', 'user_tasks': 'list', 'user_tos_accepted': 'map', 'viewable_business': 'Business', @@ -4111,6 +4288,7 @@ def delete_users_of_any_audience(self, fields=None, params=None, batch=None, suc def _get_field_enum_info(cls): field_enum_info = {} field_enum_info['Currency'] = AdAccount.Currency.__dict__.values() + field_enum_info['PermittedTasks'] = AdAccount.PermittedTasks.__dict__.values() field_enum_info['Tasks'] = AdAccount.Tasks.__dict__.values() field_enum_info['ClaimObjective'] = AdAccount.ClaimObjective.__dict__.values() field_enum_info['ContentType'] = AdAccount.ContentType.__dict__.values() diff --git a/facebook_business/adobjects/adaccountaaacompatibleadobjects.py b/facebook_business/adobjects/adaccountaaacompatibleadobjects.py new file mode 100644 index 000000000..6f0573d44 --- /dev/null +++ b/facebook_business/adobjects/adaccountaaacompatibleadobjects.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountAAACompatibleAdObjects( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountAAACompatibleAdObjects, self).__init__() + self._isAdAccountAAACompatibleAdObjects = True + self._api = api + + class Field(AbstractObject.Field): + adgroup_ids = 'adgroup_ids' + campaign_group_ids = 'campaign_group_ids' + campaign_ids = 'campaign_ids' + + _field_types = { + 'adgroup_ids': 'list', + 'campaign_group_ids': 'list', + 'campaign_ids': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountaaasimilarcampaigns.py b/facebook_business/adobjects/adaccountaaasimilarcampaigns.py new file mode 100644 index 000000000..38d8ea31f --- /dev/null +++ b/facebook_business/adobjects/adaccountaaasimilarcampaigns.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountAAASimilarCampaigns( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountAAASimilarCampaigns, self).__init__() + self._isAdAccountAAASimilarCampaigns = True + self._api = api + + class Field(AbstractObject.Field): + similar_campaign_limit = 'similar_campaign_limit' + similar_campaigns_info = 'similar_campaigns_info' + used_campaign_slots = 'used_campaign_slots' + + _field_types = { + 'similar_campaign_limit': 'unsigned int', + 'similar_campaigns_info': 'list>', + 'used_campaign_slots': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountadlimitsinsights.py b/facebook_business/adobjects/adaccountadlimitsinsights.py new file mode 100644 index 000000000..becbfe976 --- /dev/null +++ b/facebook_business/adobjects/adaccountadlimitsinsights.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountAdLimitsInsights( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountAdLimitsInsights, self).__init__() + self._isAdAccountAdLimitsInsights = True + self._api = api + + class Field(AbstractObject.Field): + date_start = 'date_start' + date_stop = 'date_stop' + + _field_types = { + 'date_start': 'string', + 'date_stop': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountadrulescountbytype.py b/facebook_business/adobjects/adaccountadrulescountbytype.py new file mode 100644 index 000000000..974fad5ba --- /dev/null +++ b/facebook_business/adobjects/adaccountadrulescountbytype.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountAdRulesCountByType( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountAdRulesCountByType, self).__init__() + self._isAdAccountAdRulesCountByType = True + self._api = api + + class Field(AbstractObject.Field): + count = 'count' + evaluation_type = 'evaluation_type' + + _field_types = { + 'count': 'int', + 'evaluation_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountadruleshistory.py b/facebook_business/adobjects/adaccountadruleshistory.py index 9a70b352b..e47b57bec 100644 --- a/facebook_business/adobjects/adaccountadruleshistory.py +++ b/facebook_business/adobjects/adaccountadruleshistory.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -53,7 +39,14 @@ class Action: changed_bid = 'CHANGED_BID' changed_budget = 'CHANGED_BUDGET' email = 'EMAIL' + enable_advantage_campaign_budget = 'ENABLE_ADVANTAGE_CAMPAIGN_BUDGET' + enable_advantage_plus_creative = 'ENABLE_ADVANTAGE_PLUS_CREATIVE' + enable_advantage_plus_placements = 'ENABLE_ADVANTAGE_PLUS_PLACEMENTS' enable_autoflow = 'ENABLE_AUTOFLOW' + enable_gen_uncrop = 'ENABLE_GEN_UNCROP' + enable_music = 'ENABLE_MUSIC' + enable_semantic_based_audience_expansion = 'ENABLE_SEMANTIC_BASED_AUDIENCE_EXPANSION' + enable_shops_ads = 'ENABLE_SHOPS_ADS' endpoint_pinged = 'ENDPOINT_PINGED' error = 'ERROR' facebook_notification_sent = 'FACEBOOK_NOTIFICATION_SENT' diff --git a/facebook_business/adobjects/adaccountadsrecommendedaudios.py b/facebook_business/adobjects/adaccountadsrecommendedaudios.py new file mode 100644 index 000000000..5846e08a0 --- /dev/null +++ b/facebook_business/adobjects/adaccountadsrecommendedaudios.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountAdsRecommendedAudios( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountAdsRecommendedAudios, self).__init__() + self._isAdAccountAdsRecommendedAudios = True + self._api = api + + class Field(AbstractObject.Field): + audio_assets = 'audio_assets' + + _field_types = { + 'audio_assets': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountadvolume.py b/facebook_business/adobjects/adaccountadvolume.py index 68fe4f748..41be0f2fb 100644 --- a/facebook_business/adobjects/adaccountadvolume.py +++ b/facebook_business/adobjects/adaccountadvolume.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -52,61 +38,152 @@ class Field(AbstractObject.Field): recommendations = 'recommendations' class RecommendationType: + aac_creation_package = 'AAC_CREATION_PACKAGE' ab_test = 'AB_TEST' + account_spend_limit = 'ACCOUNT_SPEND_LIMIT' aco_toggle = 'ACO_TOGGLE' ads_reporting = 'ADS_REPORTING' + advanced_campaign_budget = 'ADVANCED_CAMPAIGN_BUDGET' + advantage_app_campaign = 'ADVANTAGE_APP_CAMPAIGN' + advantage_custom_audience = 'ADVANTAGE_CUSTOM_AUDIENCE' + advantage_custom_audience_upsell = 'ADVANTAGE_CUSTOM_AUDIENCE_UPSELL' + advantage_detailed_targeting = 'ADVANTAGE_DETAILED_TARGETING' + advantage_lookalike_audience = 'ADVANTAGE_LOOKALIKE_AUDIENCE' + advantage_plus_audience = 'ADVANTAGE_PLUS_AUDIENCE' + advantage_plus_audience_duplication = 'ADVANTAGE_PLUS_AUDIENCE_DUPLICATION' + advantage_plus_audience_friction = 'ADVANTAGE_PLUS_AUDIENCE_FRICTION' + advantage_plus_audience_toggle = 'ADVANTAGE_PLUS_AUDIENCE_TOGGLE' + advantage_plus_campaign_budget = 'ADVANTAGE_PLUS_CAMPAIGN_BUDGET' advantage_plus_creative = 'ADVANTAGE_PLUS_CREATIVE' + advantage_plus_creative_catalog = 'ADVANTAGE_PLUS_CREATIVE_CATALOG' + advantage_plus_creative_se = 'ADVANTAGE_PLUS_CREATIVE_SE' + advantage_plus_placements_duplication = 'ADVANTAGE_PLUS_PLACEMENTS_DUPLICATION' + advantage_plus_placements_friction = 'ADVANTAGE_PLUS_PLACEMENTS_FRICTION' + advantage_shopping_campaign = 'ADVANTAGE_SHOPPING_CAMPAIGN' + advantage_shopping_campaign_fragmentation = 'ADVANTAGE_SHOPPING_CAMPAIGN_FRAGMENTATION' ad_objective = 'AD_OBJECTIVE' aem_v2_ineligible = 'AEM_V2_INELIGIBLE' aggregated_bid_limited = 'AGGREGATED_BID_LIMITED' aggregated_budget_limited = 'AGGREGATED_BUDGET_LIMITED' aggregated_cost_limited = 'AGGREGATED_COST_LIMITED' + app_aem_v2_installation_promotion = 'APP_AEM_V2_INSTALLATION_PROMOTION' + asc_budget_optimization = 'ASC_BUDGET_OPTIMIZATION' + asc_creation_package = 'ASC_CREATION_PACKAGE' + asc_fragmentation_v2 = 'ASC_FRAGMENTATION_V2' + aspect_ratio = 'ASPECT_RATIO' + atleast_6_placements = 'ATLEAST_6_PLACEMENTS' auction_overlap = 'AUCTION_OVERLAP' auction_overlap_consolidation = 'AUCTION_OVERLAP_CONSOLIDATION' audience_expansion = 'AUDIENCE_EXPANSION' + audience_expansion_georadius = 'AUDIENCE_EXPANSION_GEORADIUS' + audience_expansion_retargeting = 'AUDIENCE_EXPANSION_RETARGETING' + audience_learning_limited = 'AUDIENCE_LEARNING_LIMITED' autoflow_opt_in = 'AUTOFLOW_OPT_IN' + autoflow_opt_in_fallback_duplication_flow = 'AUTOFLOW_OPT_IN_FALLBACK_DUPLICATION_FLOW' + autoflow_opt_in_v2 = 'AUTOFLOW_OPT_IN_V2' automatic_placements = 'AUTOMATIC_PLACEMENTS' + automatic_placements_v2 = 'AUTOMATIC_PLACEMENTS_V2' auto_bid = 'AUTO_BID' + blended_ads = 'BLENDED_ADS' broad_targeting = 'BROAD_TARGETING' + budget_limited = 'BUDGET_LIMITED' capi = 'CAPI' + capi_performance_match_key = 'CAPI_PERFORMANCE_MATCH_KEY' + capi_performance_match_key_v2 = 'CAPI_PERFORMANCE_MATCH_KEY_V2' + cash_rewards_opt_in = 'CASH_REWARDS_OPT_IN' + connected_sources = 'CONNECTED_SOURCES' connect_facebook_page_to_instagram = 'CONNECT_FACEBOOK_PAGE_TO_INSTAGRAM' connect_facebook_page_to_whatsapp = 'CONNECT_FACEBOOK_PAGE_TO_WHATSAPP' + conversion_lead_ads = 'CONVERSION_LEAD_ADS' cost_goal = 'COST_GOAL' cost_goal_budget_limited = 'COST_GOAL_BUDGET_LIMITED' cost_goal_cpa_limited = 'COST_GOAL_CPA_LIMITED' + cost_per_result = 'COST_PER_RESULT' + creation_package_upgrade_to_asc = 'CREATION_PACKAGE_UPGRADE_TO_ASC' + creation_package_upgrade_to_ctx = 'CREATION_PACKAGE_UPGRADE_TO_CTX' + creation_package_upgrade_to_tla = 'CREATION_PACKAGE_UPGRADE_TO_TLA' + creation_package_upgrade_to_tmc = 'CREATION_PACKAGE_UPGRADE_TO_TMC' creative_badge = 'CREATIVE_BADGE' + creative_diversity = 'CREATIVE_DIVERSITY' creative_fatigue = 'CREATIVE_FATIGUE' creative_fatigue_hourly = 'CREATIVE_FATIGUE_HOURLY' creative_limited = 'CREATIVE_LIMITED' creative_limited_hourly = 'CREATIVE_LIMITED_HOURLY' + creator_ads_pa_conversion = 'CREATOR_ADS_PA_CONVERSION' + cta = 'CTA' + ctx_budget_optimization = 'CTX_BUDGET_OPTIMIZATION' + ctx_creation_package = 'CTX_CREATION_PACKAGE' + ctx_guidance = 'CTX_GUIDANCE' + da_advantage_plus_creative_info_labels = 'DA_ADVANTAGE_PLUS_CREATIVE_INFO_LABELS' + da_duplication_product_tags = 'DA_DUPLICATION_PRODUCT_TAGS' dead_link = 'DEAD_LINK' + defragmentation_acb = 'DEFRAGMENTATION_ACB' + dynamic_advantage_campaign_budget = 'DYNAMIC_ADVANTAGE_CAMPAIGN_BUDGET' ecosystem_bid_reduce_l1_cardinality = 'ECOSYSTEM_BID_REDUCE_L1_CARDINALITY' + evc_app_duplication_upgrade = 'EVC_APP_DUPLICATION_UPGRADE' + evc_web_duplication_upgrade = 'EVC_WEB_DUPLICATION_UPGRADE' fragmentation = 'FRAGMENTATION' + fragmentation_v2 = 'FRAGMENTATION_V2' ges_test = 'GES_TEST' + guidance_center_code_gen = 'GUIDANCE_CENTER_CODE_GEN' + heuristic_default_duration = 'HEURISTIC_DEFAULT_DURATION' + high_cost = 'HIGH_COST' + historical_benchmark = 'HISTORICAL_BENCHMARK' + ig_multi_ads = 'IG_MULTI_ADS' + lead_ads_guidance = 'LEAD_ADS_GUIDANCE' learning_limited = 'LEARNING_LIMITED' + learning_pause_friction = 'LEARNING_PAUSE_FRICTION' + learning_phase_budget_edits = 'LEARNING_PHASE_BUDGET_EDITS' low_outcome = 'LOW_OUTCOME' + merlin_guidance = 'MERLIN_GUIDANCE' + mixed_pa_combine_adsets = 'MIXED_PA_COMBINE_ADSETS' mmt_carousel_to_video = 'MMT_CAROUSEL_TO_VIDEO' mobile_first_video = 'MOBILE_FIRST_VIDEO' + mr_aemv2sub_kconsolidation = 'MR_AEMV2SUB_KCONSOLIDATION' multi_text = 'MULTI_TEXT' music = 'MUSIC' - optimal_spend = 'OPTIMAL_SPEND' + not_applicable = 'NOT_APPLICABLE' + no_delivery_status = 'NO_DELIVERY_STATUS' + optimal_bau = 'OPTIMAL_BAU' payment_method = 'PAYMENT_METHOD' + performant_creative_reels_opt_in = 'PERFORMANT_CREATIVE_REELS_OPT_IN' pfr_l1_inline_mmt = 'PFR_L1_INLINE_MMT' + pixel_upsell = 'PIXEL_UPSELL' predictive_creative_limited = 'PREDICTIVE_CREATIVE_LIMITED' predictive_creative_limited_hourly = 'PREDICTIVE_CREATIVE_LIMITED_HOURLY' + preparing_status = 'PREPARING_STATUS' + purchase_optimization = 'PURCHASE_OPTIMIZATION' + rapid_learning_limited = 'RAPID_LEARNING_LIMITED' + rapid_learning_phase = 'RAPID_LEARNING_PHASE' + reels_duplication_upsell = 'REELS_DUPLICATION_UPSELL' + reels_placement = 'REELS_PLACEMENT' revert = 'REVERT' scale_good_campaign = 'SCALE_GOOD_CAMPAIGN' semantic_based_audience_expansion = 'SEMANTIC_BASED_AUDIENCE_EXPANSION' setup_pixel = 'SETUP_PIXEL' shops_ads = 'SHOPS_ADS' + shops_ads_duplication = 'SHOPS_ADS_DUPLICATION' signals_growth_capi = 'SIGNALS_GROWTH_CAPI' + signals_growth_capi_table = 'SIGNALS_GROWTH_CAPI_TABLE' + signals_growth_capi_v2 = 'SIGNALS_GROWTH_CAPI_V2' + similar_advertiser_budget_recommendation = 'SIMILAR_ADVERTISER_BUDGET_RECOMMENDATION' six_plus_manual_placements = 'SIX_PLUS_MANUAL_PLACEMENTS' spend_limit = 'SPEND_LIMIT' syd_test_mode = 'SYD_TEST_MODE' + tailored_lead_ad_campaign = 'TAILORED_LEAD_AD_CAMPAIGN' + tailored_messages_campaign = 'TAILORED_MESSAGES_CAMPAIGN' + tla_creation_package = 'TLA_CREATION_PACKAGE' top_adsets_with_ads_under_cap = 'TOP_ADSETS_WITH_ADS_UNDER_CAP' top_campaigns_with_ads_under_cap = 'TOP_CAMPAIGNS_WITH_ADS_UNDER_CAP' + two_p_guidance_card_aaa = 'TWO_P_GUIDANCE_CARD_AAA' + two_p_guidance_card_auto_placement = 'TWO_P_GUIDANCE_CARD_AUTO_PLACEMENT' + two_p_guidance_card_cbo_off = 'TWO_P_GUIDANCE_CARD_CBO_OFF' + two_p_guidance_card_ctm_preflight = 'TWO_P_GUIDANCE_CARD_CTM_PREFLIGHT' + uncrop_image = 'UNCROP_IMAGE' uneconomical_ads_throttling = 'UNECONOMICAL_ADS_THROTTLING' unused_budget = 'UNUSED_BUDGET' + video_length = 'VIDEO_LENGTH' + zero_conversion = 'ZERO_CONVERSION' zero_impression = 'ZERO_IMPRESSION' _field_types = { diff --git a/facebook_business/adobjects/adaccountallpaymentmethods.py b/facebook_business/adobjects/adaccountallpaymentmethods.py new file mode 100644 index 000000000..0047c9a10 --- /dev/null +++ b/facebook_business/adobjects/adaccountallpaymentmethods.py @@ -0,0 +1,36 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountAllPaymentMethods( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountAllPaymentMethods, self).__init__() + self._isAdAccountAllPaymentMethods = True + self._api = api + + class Field(AbstractObject.Field): + pass + + _field_types = { + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountappsetuprequirements.py b/facebook_business/adobjects/adaccountappsetuprequirements.py new file mode 100644 index 000000000..c90b5f221 --- /dev/null +++ b/facebook_business/adobjects/adaccountappsetuprequirements.py @@ -0,0 +1,36 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountAppSetupRequirements( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountAppSetupRequirements, self).__init__() + self._isAdAccountAppSetupRequirements = True + self._api = api + + class Field(AbstractObject.Field): + pass + + _field_types = { + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountaslschedule.py b/facebook_business/adobjects/adaccountaslschedule.py new file mode 100644 index 000000000..e5fbfbdb3 --- /dev/null +++ b/facebook_business/adobjects/adaccountaslschedule.py @@ -0,0 +1,46 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdAccountASLSchedule( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAccountASLSchedule = True + super(AdAccountASLSchedule, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_account = 'ad_account' + id = 'id' + time_created = 'time_created' + time_updated = 'time_updated' + + _field_types = { + 'ad_account': 'AdAccount', + 'id': 'string', + 'time_created': 'datetime', + 'time_updated': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountbankinfolist.py b/facebook_business/adobjects/adaccountbankinfolist.py new file mode 100644 index 000000000..f41d92d48 --- /dev/null +++ b/facebook_business/adobjects/adaccountbankinfolist.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountBankInfoList( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountBankInfoList, self).__init__() + self._isAdAccountBankInfoList = True + self._api = api + + class Field(AbstractObject.Field): + banks = 'banks' + + _field_types = { + 'banks': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountbillingdatepreference.py b/facebook_business/adobjects/adaccountbillingdatepreference.py new file mode 100644 index 000000000..7a54c72fd --- /dev/null +++ b/facebook_business/adobjects/adaccountbillingdatepreference.py @@ -0,0 +1,50 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdAccountBillingDatePreference( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAccountBillingDatePreference = True + super(AdAccountBillingDatePreference, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_account = 'ad_account' + day_of_month = 'day_of_month' + id = 'id' + next_bill_date = 'next_bill_date' + time_created = 'time_created' + time_effective = 'time_effective' + + _field_types = { + 'ad_account': 'AdAccount', + 'day_of_month': 'int', + 'id': 'string', + 'next_bill_date': 'datetime', + 'time_created': 'datetime', + 'time_effective': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountbusinessconstraints.py b/facebook_business/adobjects/adaccountbusinessconstraints.py index e3970bbb9..8dc32edc4 100644 --- a/facebook_business/adobjects/adaccountbusinessconstraints.py +++ b/facebook_business/adobjects/adaccountbusinessconstraints.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -42,6 +28,14 @@ def __init__(self, fbid=None, parent_id=None, api=None): class Field(AbstractObject.Field): audience_controls = 'audience_controls' + campaigns_with_error = 'campaigns_with_error' + placement_controls = 'placement_controls' + status = 'status' + + class Status: + active = 'ACTIVE' + application_in_progress = 'APPLICATION_IN_PROGRESS' + with_campaign_error = 'WITH_CAMPAIGN_ERROR' # @deprecated get_endpoint function is deprecated @classmethod @@ -55,10 +49,14 @@ def api_create(self, parent_id, fields=None, params=None, batch=None, success=No _field_types = { 'audience_controls': 'Object', + 'campaigns_with_error': 'list', + 'placement_controls': 'Object', + 'status': 'Status', } @classmethod def _get_field_enum_info(cls): field_enum_info = {} + field_enum_info['Status'] = AdAccountBusinessConstraints.Status.__dict__.values() return field_enum_info diff --git a/facebook_business/adobjects/adaccountcampaignattributionoptioninfo.py b/facebook_business/adobjects/adaccountcampaignattributionoptioninfo.py new file mode 100644 index 000000000..c0c5888d3 --- /dev/null +++ b/facebook_business/adobjects/adaccountcampaignattributionoptioninfo.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountCampaignAttributionOptionInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountCampaignAttributionOptionInfo, self).__init__() + self._isAdAccountCampaignAttributionOptionInfo = True + self._api = api + + class Field(AbstractObject.Field): + is_eligible = 'is_eligible' + value = 'value' + + _field_types = { + 'is_eligible': 'bool', + 'value': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountcreationrequest.py b/facebook_business/adobjects/adaccountcreationrequest.py new file mode 100644 index 000000000..0a9d05242 --- /dev/null +++ b/facebook_business/adobjects/adaccountcreationrequest.py @@ -0,0 +1,169 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdAccountCreationRequest( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAccountCreationRequest = True + super(AdAccountCreationRequest, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_accounts_currency = 'ad_accounts_currency' + ad_accounts_info = 'ad_accounts_info' + additional_comment = 'additional_comment' + address_in_chinese = 'address_in_chinese' + address_in_english = 'address_in_english' + address_in_local_language = 'address_in_local_language' + advertiser_business = 'advertiser_business' + appeal_reason = 'appeal_reason' + business = 'business' + business_registration_id = 'business_registration_id' + chinese_legal_entity_name = 'chinese_legal_entity_name' + contact = 'contact' + creator = 'creator' + credit_card_id = 'credit_card_id' + disapproval_reasons = 'disapproval_reasons' + english_legal_entity_name = 'english_legal_entity_name' + extended_credit_id = 'extended_credit_id' + id = 'id' + is_smb = 'is_smb' + is_test = 'is_test' + legal_entity_name_in_local_language = 'legal_entity_name_in_local_language' + oe_request_id = 'oe_request_id' + official_website_url = 'official_website_url' + planning_agency_business = 'planning_agency_business' + planning_agency_business_id = 'planning_agency_business_id' + promotable_app_ids = 'promotable_app_ids' + promotable_page_ids = 'promotable_page_ids' + promotable_urls = 'promotable_urls' + request_change_reasons = 'request_change_reasons' + status = 'status' + subvertical = 'subvertical' + subvertical_v2 = 'subvertical_v2' + time_created = 'time_created' + vertical = 'vertical' + vertical_v2 = 'vertical_v2' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccountCreationRequest, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_ad_accounts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adaccount import AdAccount + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/adaccounts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccount, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdAccount, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'ad_accounts_currency': 'string', + 'ad_accounts_info': 'list', + 'additional_comment': 'string', + 'address_in_chinese': 'string', + 'address_in_english': 'Object', + 'address_in_local_language': 'string', + 'advertiser_business': 'Business', + 'appeal_reason': 'Object', + 'business': 'Business', + 'business_registration_id': 'string', + 'chinese_legal_entity_name': 'string', + 'contact': 'Object', + 'creator': 'User', + 'credit_card_id': 'string', + 'disapproval_reasons': 'list', + 'english_legal_entity_name': 'string', + 'extended_credit_id': 'string', + 'id': 'string', + 'is_smb': 'bool', + 'is_test': 'bool', + 'legal_entity_name_in_local_language': 'string', + 'oe_request_id': 'string', + 'official_website_url': 'string', + 'planning_agency_business': 'Business', + 'planning_agency_business_id': 'string', + 'promotable_app_ids': 'list', + 'promotable_page_ids': 'list', + 'promotable_urls': 'list', + 'request_change_reasons': 'list', + 'status': 'string', + 'subvertical': 'string', + 'subvertical_v2': 'string', + 'time_created': 'datetime', + 'vertical': 'string', + 'vertical_v2': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountcustomaudiencelimits.py b/facebook_business/adobjects/adaccountcustomaudiencelimits.py new file mode 100644 index 000000000..3980f2a33 --- /dev/null +++ b/facebook_business/adobjects/adaccountcustomaudiencelimits.py @@ -0,0 +1,45 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountCustomAudienceLimits( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountCustomAudienceLimits, self).__init__() + self._isAdAccountCustomAudienceLimits = True + self._api = api + + class Field(AbstractObject.Field): + audience_update_quota_in_total = 'audience_update_quota_in_total' + audience_update_quota_left = 'audience_update_quota_left' + has_hit_audience_update_limit = 'has_hit_audience_update_limit' + next_audience_update_available_time = 'next_audience_update_available_time' + rate_limit_reset_time = 'rate_limit_reset_time' + + _field_types = { + 'audience_update_quota_in_total': 'int', + 'audience_update_quota_left': 'float', + 'has_hit_audience_update_limit': 'bool', + 'next_audience_update_available_time': 'string', + 'rate_limit_reset_time': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountdefaultdestination.py b/facebook_business/adobjects/adaccountdefaultdestination.py index 00f504bdf..f8a6875c0 100644 --- a/facebook_business/adobjects/adaccountdefaultdestination.py +++ b/facebook_business/adobjects/adaccountdefaultdestination.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adaccountdefaultobjective.py b/facebook_business/adobjects/adaccountdefaultobjective.py index 711302cb2..bb86b4ea9 100644 --- a/facebook_business/adobjects/adaccountdefaultobjective.py +++ b/facebook_business/adobjects/adaccountdefaultobjective.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adaccountdeliveryestimate.py b/facebook_business/adobjects/adaccountdeliveryestimate.py index ba6b19d42..504300208 100644 --- a/facebook_business/adobjects/adaccountdeliveryestimate.py +++ b/facebook_business/adobjects/adaccountdeliveryestimate.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -58,15 +44,18 @@ class OptimizationGoal: landing_page_views = 'LANDING_PAGE_VIEWS' lead_generation = 'LEAD_GENERATION' link_clicks = 'LINK_CLICKS' + meaningful_call_attempt = 'MEANINGFUL_CALL_ATTEMPT' messaging_appointment_conversion = 'MESSAGING_APPOINTMENT_CONVERSION' messaging_purchase_conversion = 'MESSAGING_PURCHASE_CONVERSION' none = 'NONE' offsite_conversions = 'OFFSITE_CONVERSIONS' page_likes = 'PAGE_LIKES' post_engagement = 'POST_ENGAGEMENT' + profile_visit = 'PROFILE_VISIT' quality_call = 'QUALITY_CALL' quality_lead = 'QUALITY_LEAD' reach = 'REACH' + reminders_set = 'REMINDERS_SET' subscribers = 'SUBSCRIBERS' thruplay = 'THRUPLAY' value = 'VALUE' diff --git a/facebook_business/adobjects/adaccountdsarecommendations.py b/facebook_business/adobjects/adaccountdsarecommendations.py new file mode 100644 index 000000000..6e2a3479f --- /dev/null +++ b/facebook_business/adobjects/adaccountdsarecommendations.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountDsaRecommendations( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountDsaRecommendations, self).__init__() + self._isAdAccountDsaRecommendations = True + self._api = api + + class Field(AbstractObject.Field): + recommendations = 'recommendations' + + _field_types = { + 'recommendations': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountiosfourteencampaignlimits.py b/facebook_business/adobjects/adaccountiosfourteencampaignlimits.py index 2c563c950..75a966717 100644 --- a/facebook_business/adobjects/adaccountiosfourteencampaignlimits.py +++ b/facebook_business/adobjects/adaccountiosfourteencampaignlimits.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adaccountmatchedsearchapplicationsedgedata.py b/facebook_business/adobjects/adaccountmatchedsearchapplicationsedgedata.py index d14f0efa3..a45d6635a 100644 --- a/facebook_business/adobjects/adaccountmatchedsearchapplicationsedgedata.py +++ b/facebook_business/adobjects/adaccountmatchedsearchapplicationsedgedata.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -54,6 +40,7 @@ class AppStore: apk_pure = 'APK_PURE' aptoide_a1_store = 'APTOIDE_A1_STORE' bemobi_mobile_store = 'BEMOBI_MOBILE_STORE' + digital_turbine_store = 'DIGITAL_TURBINE_STORE' does_not_exist = 'DOES_NOT_EXIST' fb_android_store = 'FB_ANDROID_STORE' fb_canvas = 'FB_CANVAS' diff --git a/facebook_business/adobjects/adaccountmaxbid.py b/facebook_business/adobjects/adaccountmaxbid.py index 788451b66..0da1a73de 100644 --- a/facebook_business/adobjects/adaccountmaxbid.py +++ b/facebook_business/adobjects/adaccountmaxbid.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adaccountoptimizationgoalsaemv2eligibility.py b/facebook_business/adobjects/adaccountoptimizationgoalsaemv2eligibility.py new file mode 100644 index 000000000..e65a6cd2e --- /dev/null +++ b/facebook_business/adobjects/adaccountoptimizationgoalsaemv2eligibility.py @@ -0,0 +1,70 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountOptimizationGoalsAEMv2Eligibility( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountOptimizationGoalsAEMv2Eligibility, self).__init__() + self._isAdAccountOptimizationGoalsAEMv2Eligibility = True + self._api = api + + class Field(AbstractObject.Field): + is_disabled = 'is_disabled' + optimization_goal = 'optimization_goal' + + class OptimizationGoal: + ad_recall_lift = 'AD_RECALL_LIFT' + app_installs = 'APP_INSTALLS' + app_installs_and_offsite_conversions = 'APP_INSTALLS_AND_OFFSITE_CONVERSIONS' + conversations = 'CONVERSATIONS' + derived_events = 'DERIVED_EVENTS' + engaged_users = 'ENGAGED_USERS' + event_responses = 'EVENT_RESPONSES' + impressions = 'IMPRESSIONS' + in_app_value = 'IN_APP_VALUE' + landing_page_views = 'LANDING_PAGE_VIEWS' + lead_generation = 'LEAD_GENERATION' + link_clicks = 'LINK_CLICKS' + meaningful_call_attempt = 'MEANINGFUL_CALL_ATTEMPT' + messaging_appointment_conversion = 'MESSAGING_APPOINTMENT_CONVERSION' + messaging_purchase_conversion = 'MESSAGING_PURCHASE_CONVERSION' + none = 'NONE' + offsite_conversions = 'OFFSITE_CONVERSIONS' + page_likes = 'PAGE_LIKES' + post_engagement = 'POST_ENGAGEMENT' + profile_visit = 'PROFILE_VISIT' + quality_call = 'QUALITY_CALL' + quality_lead = 'QUALITY_LEAD' + reach = 'REACH' + reminders_set = 'REMINDERS_SET' + subscribers = 'SUBSCRIBERS' + thruplay = 'THRUPLAY' + value = 'VALUE' + visit_instagram_profile = 'VISIT_INSTAGRAM_PROFILE' + + _field_types = { + 'is_disabled': 'bool', + 'optimization_goal': 'OptimizationGoal', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['OptimizationGoal'] = AdAccountOptimizationGoalsAEMv2Eligibility.OptimizationGoal.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountpaymentdetails.py b/facebook_business/adobjects/adaccountpaymentdetails.py new file mode 100644 index 000000000..62f554d9e --- /dev/null +++ b/facebook_business/adobjects/adaccountpaymentdetails.py @@ -0,0 +1,50 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdAccountPaymentDetails( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAccountPaymentDetails = True + super(AdAccountPaymentDetails, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + amount = 'amount' + create_date = 'create_date' + id = 'id' + last_action_status = 'last_action_status' + metadata = 'metadata' + payment_details_id = 'payment_details_id' + + _field_types = { + 'amount': 'CurrencyAmount', + 'create_date': 'int', + 'id': 'string', + 'last_action_status': 'string', + 'metadata': 'Object', + 'payment_details_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountpaymentoptions.py b/facebook_business/adobjects/adaccountpaymentoptions.py new file mode 100644 index 000000000..d129fc66b --- /dev/null +++ b/facebook_business/adobjects/adaccountpaymentoptions.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountPaymentOptions( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountPaymentOptions, self).__init__() + self._isAdAccountPaymentOptions = True + self._api = api + + class Field(AbstractObject.Field): + available_altpay_options = 'available_altpay_options' + available_card_types = 'available_card_types' + available_payment_options = 'available_payment_options' + existing_payment_methods = 'existing_payment_methods' + + _field_types = { + 'available_altpay_options': 'list', + 'available_card_types': 'list', + 'available_payment_options': 'list', + 'existing_payment_methods': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountprepaydetails.py b/facebook_business/adobjects/adaccountprepaydetails.py new file mode 100644 index 000000000..d4844a1b8 --- /dev/null +++ b/facebook_business/adobjects/adaccountprepaydetails.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountPrepayDetails( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountPrepayDetails, self).__init__() + self._isAdAccountPrepayDetails = True + self._api = api + + class Field(AbstractObject.Field): + default_funding_amount = 'default_funding_amount' + max_acceptable_amount = 'max_acceptable_amount' + min_acceptable_amount = 'min_acceptable_amount' + should_collect_business_details = 'should_collect_business_details' + + _field_types = { + 'default_funding_amount': 'CurrencyAmount', + 'max_acceptable_amount': 'CurrencyAmount', + 'min_acceptable_amount': 'CurrencyAmount', + 'should_collect_business_details': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountpromotableobjects.py b/facebook_business/adobjects/adaccountpromotableobjects.py index a26d1ca81..4b66f6d02 100644 --- a/facebook_business/adobjects/adaccountpromotableobjects.py +++ b/facebook_business/adobjects/adaccountpromotableobjects.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adaccountpromotionprogressbar.py b/facebook_business/adobjects/adaccountpromotionprogressbar.py new file mode 100644 index 000000000..ad886cf78 --- /dev/null +++ b/facebook_business/adobjects/adaccountpromotionprogressbar.py @@ -0,0 +1,51 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountPromotionProgressBar( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountPromotionProgressBar, self).__init__() + self._isAdAccountPromotionProgressBar = True + self._api = api + + class Field(AbstractObject.Field): + adaccount_permission = 'adaccount_permission' + coupon_currency = 'coupon_currency' + coupon_value = 'coupon_value' + expiration_time = 'expiration_time' + progress_completed = 'progress_completed' + promotion_type = 'promotion_type' + spend_requirement_in_cent = 'spend_requirement_in_cent' + spend_since_enrollment = 'spend_since_enrollment' + + _field_types = { + 'adaccount_permission': 'bool', + 'coupon_currency': 'string', + 'coupon_value': 'int', + 'expiration_time': 'datetime', + 'progress_completed': 'bool', + 'promotion_type': 'string', + 'spend_requirement_in_cent': 'int', + 'spend_since_enrollment': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountreachestimate.py b/facebook_business/adobjects/adaccountreachestimate.py index b77c1d174..2bbafd715 100644 --- a/facebook_business/adobjects/adaccountreachestimate.py +++ b/facebook_business/adobjects/adaccountreachestimate.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adaccountrecommendations.py b/facebook_business/adobjects/adaccountrecommendations.py new file mode 100644 index 000000000..e3418d0b8 --- /dev/null +++ b/facebook_business/adobjects/adaccountrecommendations.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountRecommendations( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountRecommendations, self).__init__() + self._isAdAccountRecommendations = True + self._api = api + + class Field(AbstractObject.Field): + recommendations = 'recommendations' + + _field_types = { + 'recommendations': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountrecommendedcamapaignbudget.py b/facebook_business/adobjects/adaccountrecommendedcamapaignbudget.py index af1badfb0..44b2db696 100644 --- a/facebook_business/adobjects/adaccountrecommendedcamapaignbudget.py +++ b/facebook_business/adobjects/adaccountrecommendedcamapaignbudget.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adaccountrelatedicostudy.py b/facebook_business/adobjects/adaccountrelatedicostudy.py new file mode 100644 index 000000000..925eb2f5a --- /dev/null +++ b/facebook_business/adobjects/adaccountrelatedicostudy.py @@ -0,0 +1,36 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountRelatedIcoStudy( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountRelatedIcoStudy, self).__init__() + self._isAdAccountRelatedIcoStudy = True + self._api = api + + class Field(AbstractObject.Field): + pass + + _field_types = { + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountsmartsuggestedads.py b/facebook_business/adobjects/adaccountsmartsuggestedads.py new file mode 100644 index 000000000..40382b58d --- /dev/null +++ b/facebook_business/adobjects/adaccountsmartsuggestedads.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountSmartSuggestedAds( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountSmartSuggestedAds, self).__init__() + self._isAdAccountSmartSuggestedAds = True + self._api = api + + class Field(AbstractObject.Field): + ad_creative_spec = 'ad_creative_spec' + description = 'description' + guidance_spec = 'guidance_spec' + thumbnail_url = 'thumbnail_url' + + _field_types = { + 'ad_creative_spec': 'string', + 'description': 'string', + 'guidance_spec': 'list', + 'thumbnail_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountspendlimit.py b/facebook_business/adobjects/adaccountspendlimit.py new file mode 100644 index 000000000..788837c6c --- /dev/null +++ b/facebook_business/adobjects/adaccountspendlimit.py @@ -0,0 +1,49 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountSpendLimit( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountSpendLimit, self).__init__() + self._isAdAccountSpendLimit = True + self._api = api + + class Field(AbstractObject.Field): + amount_spent = 'amount_spent' + group_id = 'group_id' + limit_id = 'limit_id' + limit_value = 'limit_value' + time_created = 'time_created' + time_start = 'time_start' + time_stop = 'time_stop' + + _field_types = { + 'amount_spent': 'string', + 'group_id': 'string', + 'limit_id': 'string', + 'limit_value': 'string', + 'time_created': 'unsigned int', + 'time_start': 'unsigned int', + 'time_stop': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountsubscribedapps.py b/facebook_business/adobjects/adaccountsubscribedapps.py index e474b2bb3..c750fd80c 100644 --- a/facebook_business/adobjects/adaccountsubscribedapps.py +++ b/facebook_business/adobjects/adaccountsubscribedapps.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/adaccountsubsidyamountdetails.py b/facebook_business/adobjects/adaccountsubsidyamountdetails.py new file mode 100644 index 000000000..1142bc568 --- /dev/null +++ b/facebook_business/adobjects/adaccountsubsidyamountdetails.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountSubsidyAmountDetails( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountSubsidyAmountDetails, self).__init__() + self._isAdAccountSubsidyAmountDetails = True + self._api = api + + class Field(AbstractObject.Field): + entered_amount = 'entered_amount' + fee_amount = 'fee_amount' + total_amount = 'total_amount' + + _field_types = { + 'entered_amount': 'CurrencyAmount', + 'fee_amount': 'CurrencyAmount', + 'total_amount': 'CurrencyAmount', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountsuggestedtag.py b/facebook_business/adobjects/adaccountsuggestedtag.py new file mode 100644 index 000000000..6909986a8 --- /dev/null +++ b/facebook_business/adobjects/adaccountsuggestedtag.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountSuggestedTag( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountSuggestedTag, self).__init__() + self._isAdAccountSuggestedTag = True + self._api = api + + class Field(AbstractObject.Field): + product_id = 'product_id' + x = 'x' + y = 'y' + + _field_types = { + 'product_id': 'int', + 'x': 'float', + 'y': 'float', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccounttargetingunified.py b/facebook_business/adobjects/adaccounttargetingunified.py index 54d8907a1..2a34ecfc9 100644 --- a/facebook_business/adobjects/adaccounttargetingunified.py +++ b/facebook_business/adobjects/adaccounttargetingunified.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -409,6 +395,7 @@ class WhitelistedTypes: excluded_user_adclusters = 'excluded_user_adclusters' excluded_user_device = 'excluded_user_device' exclusions = 'exclusions' + expanded_implicit_custom_audiences = 'expanded_implicit_custom_audiences' facebook_positions = 'facebook_positions' family_statuses = 'family_statuses' fb_deal_id = 'fb_deal_id' @@ -443,6 +430,8 @@ class WhitelistedTypes: location_categories = 'location_categories' location_cluster_ids = 'location_cluster_ids' location_expansion = 'location_expansion' + marketing_message_channels = 'marketing_message_channels' + marketing_message_targeting = 'marketing_message_targeting' marketplace_product_categories = 'marketplace_product_categories' messenger_positions = 'messenger_positions' mobile_device_model = 'mobile_device_model' @@ -463,6 +452,7 @@ class WhitelistedTypes: relationship_statuses = 'relationship_statuses' rtb_flag = 'rtb_flag' site_category = 'site_category' + tafe_ca_mitigation_strategy = 'tafe_ca_mitigation_strategy' targeting_automation = 'targeting_automation' targeting_optimization = 'targeting_optimization' targeting_relaxation_types = 'targeting_relaxation_types' @@ -488,6 +478,7 @@ class AppStore: apk_pure = 'apk_pure' aptoide_a1_store = 'aptoide_a1_store' bemobi_mobile_store = 'bemobi_mobile_store' + digital_turbine_store = 'digital_turbine_store' does_not_exist = 'does_not_exist' fb_android_store = 'fb_android_store' fb_canvas = 'fb_canvas' diff --git a/facebook_business/adobjects/adaccounttrackingdata.py b/facebook_business/adobjects/adaccounttrackingdata.py index 841386088..bad847869 100644 --- a/facebook_business/adobjects/adaccounttrackingdata.py +++ b/facebook_business/adobjects/adaccounttrackingdata.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adaccounturlforassetextraction.py b/facebook_business/adobjects/adaccounturlforassetextraction.py new file mode 100644 index 000000000..a096cedf2 --- /dev/null +++ b/facebook_business/adobjects/adaccounturlforassetextraction.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountURLForAssetExtraction( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountURLForAssetExtraction, self).__init__() + self._isAdAccountURLForAssetExtraction = True + self._api = api + + class Field(AbstractObject.Field): + source_type = 'source_type' + source_url = 'source_url' + + _field_types = { + 'source_type': 'string', + 'source_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountuser.py b/facebook_business/adobjects/adaccountuser.py index 927c0d083..e4b0944a7 100644 --- a/facebook_business/adobjects/adaccountuser.py +++ b/facebook_business/adobjects/adaccountuser.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/adaccountuserpermissions.py b/facebook_business/adobjects/adaccountuserpermissions.py new file mode 100644 index 000000000..445e6eaf4 --- /dev/null +++ b/facebook_business/adobjects/adaccountuserpermissions.py @@ -0,0 +1,55 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountUserPermissions( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountUserPermissions, self).__init__() + self._isAdAccountUserPermissions = True + self._api = api + + class Field(AbstractObject.Field): + business = 'business' + business_persona = 'business_persona' + created_by = 'created_by' + created_time = 'created_time' + email = 'email' + status = 'status' + tasks = 'tasks' + updated_by = 'updated_by' + updated_time = 'updated_time' + user = 'user' + + _field_types = { + 'business': 'Business', + 'business_persona': 'Object', + 'created_by': 'User', + 'created_time': 'datetime', + 'email': 'string', + 'status': 'string', + 'tasks': 'list', + 'updated_by': 'User', + 'updated_time': 'datetime', + 'user': 'User', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountusersettings.py b/facebook_business/adobjects/adaccountusersettings.py new file mode 100644 index 000000000..60286183f --- /dev/null +++ b/facebook_business/adobjects/adaccountusersettings.py @@ -0,0 +1,200 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdAccountUserSettings( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAccountUserSettings = True + super(AdAccountUserSettings, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + acf_should_opt_out_video_adjustments = 'acf_should_opt_out_video_adjustments' + aco_sticky_settings = 'aco_sticky_settings' + ad_account = 'ad_account' + ad_object_export_format = 'ad_object_export_format' + auto_review_video_caption = 'auto_review_video_caption' + campaign_overview_columns = 'campaign_overview_columns' + column_suggestion_status = 'column_suggestion_status' + default_account_overview_agegender_metrics = 'default_account_overview_agegender_metrics' + default_account_overview_location_metrics = 'default_account_overview_location_metrics' + default_account_overview_metrics = 'default_account_overview_metrics' + default_account_overview_time_metrics = 'default_account_overview_time_metrics' + default_builtin_column_preset = 'default_builtin_column_preset' + default_nam_time_range = 'default_nam_time_range' + draft_mode_enabled = 'draft_mode_enabled' + export_deleted_items_with_delivery = 'export_deleted_items_with_delivery' + export_summary_row = 'export_summary_row' + has_seen_groups_column_flexing_experience = 'has_seen_groups_column_flexing_experience' + has_seen_leads_column_flexing_experience = 'has_seen_leads_column_flexing_experience' + has_seen_shops_ads_metrics_onboarding_tour = 'has_seen_shops_ads_metrics_onboarding_tour' + has_seen_shops_column_flexing_experience = 'has_seen_shops_column_flexing_experience' + hidden_optimization_tips = 'hidden_optimization_tips' + id = 'id' + is_3p_auth_setting_set = 'is_3p_auth_setting_set' + is_text_variation_nux_close = 'is_text_variation_nux_close' + last_used_columns = 'last_used_columns' + last_used_pe_filters = 'last_used_pe_filters' + last_used_website_urls = 'last_used_website_urls' + outlier_preferences = 'outlier_preferences' + pinned_ad_object_ids = 'pinned_ad_object_ids' + rb_export_format = 'rb_export_format' + rb_export_raw_data = 'rb_export_raw_data' + rb_export_summary_row = 'rb_export_summary_row' + saip_advertiser_setup_optimisation_guidance_overall_state = 'saip_advertiser_setup_optimisation_guidance_overall_state' + saip_advertiser_setup_optimisation_guidance_state = 'saip_advertiser_setup_optimisation_guidance_state' + shops_ads_metrics_onboarding_tour_close_count = 'shops_ads_metrics_onboarding_tour_close_count' + shops_ads_metrics_onboarding_tour_last_action_time = 'shops_ads_metrics_onboarding_tour_last_action_time' + should_default_image_auto_crop = 'should_default_image_auto_crop' + should_default_image_auto_crop_for_tail = 'should_default_image_auto_crop_for_tail' + should_default_image_auto_crop_optimization = 'should_default_image_auto_crop_optimization' + should_default_image_dof_toggle = 'should_default_image_dof_toggle' + should_default_image_lpp_ads_to_square = 'should_default_image_lpp_ads_to_square' + should_default_instagram_profile_card_optimization = 'should_default_instagram_profile_card_optimization' + should_default_text_swapping_optimization = 'should_default_text_swapping_optimization' + should_logout_of_3p_sourcing = 'should_logout_of_3p_sourcing' + show_archived_data = 'show_archived_data' + show_text_variation_nux_tooltip = 'show_text_variation_nux_tooltip' + syd_campaign_trends_activemetric = 'syd_campaign_trends_activemetric' + syd_campaign_trends_attribution = 'syd_campaign_trends_attribution' + syd_campaign_trends_metrics = 'syd_campaign_trends_metrics' + syd_campaign_trends_objective = 'syd_campaign_trends_objective' + syd_campaign_trends_time_range = 'syd_campaign_trends_time_range' + syd_landing_page_opt_in_status = 'syd_landing_page_opt_in_status' + text_variations_opt_in_type = 'text_variations_opt_in_type' + user = 'user' + + class SydCampaignTrendsObjective: + app_installs = 'APP_INSTALLS' + brand_awareness = 'BRAND_AWARENESS' + event_responses = 'EVENT_RESPONSES' + lead_generation = 'LEAD_GENERATION' + link_clicks = 'LINK_CLICKS' + local_awareness = 'LOCAL_AWARENESS' + messages = 'MESSAGES' + offer_claims = 'OFFER_CLAIMS' + outcome_app_promotion = 'OUTCOME_APP_PROMOTION' + outcome_awareness = 'OUTCOME_AWARENESS' + outcome_engagement = 'OUTCOME_ENGAGEMENT' + outcome_leads = 'OUTCOME_LEADS' + outcome_sales = 'OUTCOME_SALES' + outcome_traffic = 'OUTCOME_TRAFFIC' + page_likes = 'PAGE_LIKES' + post_engagement = 'POST_ENGAGEMENT' + product_catalog_sales = 'PRODUCT_CATALOG_SALES' + reach = 'REACH' + store_visits = 'STORE_VISITS' + video_views = 'VIDEO_VIEWS' + website_conversions = 'WEBSITE_CONVERSIONS' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdAccountUserSettings, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'acf_should_opt_out_video_adjustments': 'bool', + 'aco_sticky_settings': 'list>', + 'ad_account': 'AdAccount', + 'ad_object_export_format': 'string', + 'auto_review_video_caption': 'bool', + 'campaign_overview_columns': 'list', + 'column_suggestion_status': 'string', + 'default_account_overview_agegender_metrics': 'list', + 'default_account_overview_location_metrics': 'list', + 'default_account_overview_metrics': 'list', + 'default_account_overview_time_metrics': 'list', + 'default_builtin_column_preset': 'string', + 'default_nam_time_range': 'string', + 'draft_mode_enabled': 'bool', + 'export_deleted_items_with_delivery': 'bool', + 'export_summary_row': 'bool', + 'has_seen_groups_column_flexing_experience': 'bool', + 'has_seen_leads_column_flexing_experience': 'bool', + 'has_seen_shops_ads_metrics_onboarding_tour': 'bool', + 'has_seen_shops_column_flexing_experience': 'bool', + 'hidden_optimization_tips': 'list>', + 'id': 'string', + 'is_3p_auth_setting_set': 'bool', + 'is_text_variation_nux_close': 'bool', + 'last_used_columns': 'Object', + 'last_used_pe_filters': 'list', + 'last_used_website_urls': 'list', + 'outlier_preferences': 'Object', + 'pinned_ad_object_ids': 'list', + 'rb_export_format': 'string', + 'rb_export_raw_data': 'bool', + 'rb_export_summary_row': 'bool', + 'saip_advertiser_setup_optimisation_guidance_overall_state': 'string', + 'saip_advertiser_setup_optimisation_guidance_state': 'list>', + 'shops_ads_metrics_onboarding_tour_close_count': 'int', + 'shops_ads_metrics_onboarding_tour_last_action_time': 'datetime', + 'should_default_image_auto_crop': 'bool', + 'should_default_image_auto_crop_for_tail': 'bool', + 'should_default_image_auto_crop_optimization': 'bool', + 'should_default_image_dof_toggle': 'bool', + 'should_default_image_lpp_ads_to_square': 'bool', + 'should_default_instagram_profile_card_optimization': 'bool', + 'should_default_text_swapping_optimization': 'bool', + 'should_logout_of_3p_sourcing': 'bool', + 'show_archived_data': 'bool', + 'show_text_variation_nux_tooltip': 'bool', + 'syd_campaign_trends_activemetric': 'string', + 'syd_campaign_trends_attribution': 'string', + 'syd_campaign_trends_metrics': 'list', + 'syd_campaign_trends_objective': 'SydCampaignTrendsObjective', + 'syd_campaign_trends_time_range': 'string', + 'syd_landing_page_opt_in_status': 'string', + 'text_variations_opt_in_type': 'string', + 'user': 'User', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['SydCampaignTrendsObjective'] = AdAccountUserSettings.SydCampaignTrendsObjective.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/adaccountyouthadsadvertiser.py b/facebook_business/adobjects/adaccountyouthadsadvertiser.py new file mode 100644 index 000000000..e85bd5a9a --- /dev/null +++ b/facebook_business/adobjects/adaccountyouthadsadvertiser.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAccountYouthAdsAdvertiser( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAccountYouthAdsAdvertiser, self).__init__() + self._isAdAccountYouthAdsAdvertiser = True + self._api = api + + class Field(AbstractObject.Field): + is_youth_ads_advertiser = 'is_youth_ads_advertiser' + + _field_types = { + 'is_youth_ads_advertiser': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adactivity.py b/facebook_business/adobjects/adactivity.py index 3fec8b34b..432295001 100644 --- a/facebook_business/adobjects/adactivity.py +++ b/facebook_business/adobjects/adactivity.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -121,13 +107,19 @@ class EventType: update_campaign_ad_scheduling = 'update_campaign_ad_scheduling' update_campaign_budget = 'update_campaign_budget' update_campaign_budget_optimization_toggling_status = 'update_campaign_budget_optimization_toggling_status' + update_campaign_budget_scheduling_state = 'update_campaign_budget_scheduling_state' + update_campaign_conversion_goal = 'update_campaign_conversion_goal' update_campaign_delivery_type = 'update_campaign_delivery_type' update_campaign_group_ad_scheduling = 'update_campaign_group_ad_scheduling' + update_campaign_group_budget_scheduling_state = 'update_campaign_group_budget_scheduling_state' update_campaign_group_delivery_type = 'update_campaign_group_delivery_type' + update_campaign_group_high_demand_periods = 'update_campaign_group_high_demand_periods' update_campaign_group_spend_cap = 'update_campaign_group_spend_cap' + update_campaign_high_demand_periods = 'update_campaign_high_demand_periods' update_campaign_name = 'update_campaign_name' update_campaign_run_status = 'update_campaign_run_status' update_campaign_schedule = 'update_campaign_schedule' + update_campaign_value_adjustment_rule = 'update_campaign_value_adjustment_rule' update_delivery_type_cross_level_shift = 'update_delivery_type_cross_level_shift' class Category: diff --git a/facebook_business/adobjects/adassetbody.py b/facebook_business/adobjects/adassetbody.py new file mode 100644 index 000000000..02beba057 --- /dev/null +++ b/facebook_business/adobjects/adassetbody.py @@ -0,0 +1,44 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdAssetBody( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAssetBody = True + super(AdAssetBody, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + text = 'text' + url_tags = 'url_tags' + + _field_types = { + 'id': 'string', + 'text': 'string', + 'url_tags': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adassetcalltoactiontype.py b/facebook_business/adobjects/adassetcalltoactiontype.py new file mode 100644 index 000000000..11a790538 --- /dev/null +++ b/facebook_business/adobjects/adassetcalltoactiontype.py @@ -0,0 +1,42 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdAssetCallToActionType( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAssetCallToActionType = True + super(AdAssetCallToActionType, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + name = 'name' + + _field_types = { + 'id': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adassetcustomizationrulecustomizationspec.py b/facebook_business/adobjects/adassetcustomizationrulecustomizationspec.py new file mode 100644 index 000000000..5ea7ade46 --- /dev/null +++ b/facebook_business/adobjects/adassetcustomizationrulecustomizationspec.py @@ -0,0 +1,60 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAssetCustomizationRuleCustomizationSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAssetCustomizationRuleCustomizationSpec, self).__init__() + self._isAdAssetCustomizationRuleCustomizationSpec = True + self._api = api + + class Field(AbstractObject.Field): + age_max = 'age_max' + age_min = 'age_min' + audience_network_positions = 'audience_network_positions' + device_platforms = 'device_platforms' + facebook_positions = 'facebook_positions' + geo_locations = 'geo_locations' + instagram_positions = 'instagram_positions' + locales = 'locales' + messenger_positions = 'messenger_positions' + publisher_platforms = 'publisher_platforms' + + class DevicePlatforms: + desktop = 'desktop' + mobile = 'mobile' + + _field_types = { + 'age_max': 'unsigned int', + 'age_min': 'unsigned int', + 'audience_network_positions': 'list', + 'device_platforms': 'list', + 'facebook_positions': 'list', + 'geo_locations': 'TargetingGeoLocation', + 'instagram_positions': 'list', + 'locales': 'list', + 'messenger_positions': 'list', + 'publisher_platforms': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['DevicePlatforms'] = AdAssetCustomizationRuleCustomizationSpec.DevicePlatforms.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/adassetdescription.py b/facebook_business/adobjects/adassetdescription.py new file mode 100644 index 000000000..b824e97bc --- /dev/null +++ b/facebook_business/adobjects/adassetdescription.py @@ -0,0 +1,44 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdAssetDescription( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAssetDescription = True + super(AdAssetDescription, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + text = 'text' + url_tags = 'url_tags' + + _field_types = { + 'id': 'string', + 'text': 'string', + 'url_tags': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adassetfeedadditionaldata.py b/facebook_business/adobjects/adassetfeedadditionaldata.py new file mode 100644 index 000000000..95b3779f8 --- /dev/null +++ b/facebook_business/adobjects/adassetfeedadditionaldata.py @@ -0,0 +1,47 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAssetFeedAdditionalData( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAssetFeedAdditionalData, self).__init__() + self._isAdAssetFeedAdditionalData = True + self._api = api + + class Field(AbstractObject.Field): + automated_product_tags = 'automated_product_tags' + brand_page_id = 'brand_page_id' + is_click_to_message = 'is_click_to_message' + multi_share_end_card = 'multi_share_end_card' + page_welcome_message = 'page_welcome_message' + partner_app_welcome_message_flow_id = 'partner_app_welcome_message_flow_id' + + _field_types = { + 'automated_product_tags': 'bool', + 'brand_page_id': 'string', + 'is_click_to_message': 'bool', + 'multi_share_end_card': 'bool', + 'page_welcome_message': 'string', + 'partner_app_welcome_message_flow_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adassetfeedadditionaldatapagenudgemessage.py b/facebook_business/adobjects/adassetfeedadditionaldatapagenudgemessage.py new file mode 100644 index 000000000..5e125be9f --- /dev/null +++ b/facebook_business/adobjects/adassetfeedadditionaldatapagenudgemessage.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAssetFeedAdditionalDataPageNudgeMessage( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAssetFeedAdditionalDataPageNudgeMessage, self).__init__() + self._isAdAssetFeedAdditionalDataPageNudgeMessage = True + self._api = api + + class Field(AbstractObject.Field): + enabled = 'enabled' + quick_replies = 'quick_replies' + text = 'text' + + _field_types = { + 'enabled': 'bool', + 'quick_replies': 'list', + 'text': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adassetfeedspec.py b/facebook_business/adobjects/adassetfeedspec.py index 47d810785..8cbf90cf6 100644 --- a/facebook_business/adobjects/adassetfeedspec.py +++ b/facebook_business/adobjects/adassetfeedspec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -53,21 +39,34 @@ class Field(AbstractObject.Field): groups = 'groups' images = 'images' link_urls = 'link_urls' + message_extensions = 'message_extensions' + onsite_destinations = 'onsite_destinations' optimization_type = 'optimization_type' + promotional_metadata = 'promotional_metadata' + reasons_to_shop = 'reasons_to_shop' + shops_bundle = 'shops_bundle' titles = 'titles' + upcoming_events = 'upcoming_events' videos = 'videos' class CallToActionTypes: add_to_cart = 'ADD_TO_CART' apply_now = 'APPLY_NOW' + ask_about_services = 'ASK_ABOUT_SERVICES' + ask_for_more_info = 'ASK_FOR_MORE_INFO' audio_call = 'AUDIO_CALL' + book_a_consultation = 'BOOK_A_CONSULTATION' + book_now = 'BOOK_NOW' book_travel = 'BOOK_TRAVEL' buy = 'BUY' buy_now = 'BUY_NOW' buy_tickets = 'BUY_TICKETS' + buy_via_message = 'BUY_VIA_MESSAGE' call = 'CALL' call_me = 'CALL_ME' call_now = 'CALL_NOW' + chat_with_us = 'CHAT_WITH_US' + confirm = 'CONFIRM' contact = 'CONTACT' contact_us = 'CONTACT_US' donate = 'DONATE' @@ -79,6 +78,7 @@ class CallToActionTypes: follow_news_storyline = 'FOLLOW_NEWS_STORYLINE' follow_page = 'FOLLOW_PAGE' follow_user = 'FOLLOW_USER' + get_a_quote = 'GET_A_QUOTE' get_directions = 'GET_DIRECTIONS' get_offer = 'GET_OFFER' get_offer_view = 'GET_OFFER_VIEW' @@ -89,13 +89,14 @@ class CallToActionTypes: inquire_now = 'INQUIRE_NOW' install_app = 'INSTALL_APP' install_mobile_app = 'INSTALL_MOBILE_APP' + join_channel = 'JOIN_CHANNEL' learn_more = 'LEARN_MORE' like_page = 'LIKE_PAGE' listen_music = 'LISTEN_MUSIC' listen_now = 'LISTEN_NOW' + make_an_appointment = 'MAKE_AN_APPOINTMENT' message_page = 'MESSAGE_PAGE' mobile_download = 'MOBILE_DOWNLOAD' - moments = 'MOMENTS' no_button = 'NO_BUTTON' open_instant_app = 'OPEN_INSTANT_APP' open_link = 'OPEN_LINK' @@ -127,6 +128,7 @@ class CallToActionTypes: use_mobile_app = 'USE_MOBILE_APP' video_annotation = 'VIDEO_ANNOTATION' video_call = 'VIDEO_CALL' + view_product = 'VIEW_PRODUCT' visit_pages_feed = 'VISIT_PAGES_FEED' watch_more = 'WATCH_MORE' watch_video = 'WATCH_VIDEO' @@ -135,22 +137,28 @@ class CallToActionTypes: _field_types = { 'ad_formats': 'list', - 'additional_data': 'Object', + 'additional_data': 'AdAssetFeedAdditionalData', 'app_product_page_id': 'string', - 'asset_customization_rules': 'list', + 'asset_customization_rules': 'list', 'autotranslate': 'list', 'bodies': 'list', 'call_to_action_types': 'list', - 'call_to_actions': 'list', + 'call_to_actions': 'list', 'captions': 'list', - 'carousels': 'list', + 'carousels': 'list', 'descriptions': 'list', - 'events': 'list', + 'events': 'list', 'groups': 'list', 'images': 'list', 'link_urls': 'list', + 'message_extensions': 'list', + 'onsite_destinations': 'list', 'optimization_type': 'string', + 'promotional_metadata': 'Object', + 'reasons_to_shop': 'bool', + 'shops_bundle': 'bool', 'titles': 'list', + 'upcoming_events': 'list', 'videos': 'list', } @classmethod diff --git a/facebook_business/adobjects/adassetfeedspecassetcustomizationrule.py b/facebook_business/adobjects/adassetfeedspecassetcustomizationrule.py new file mode 100644 index 000000000..42dd02e72 --- /dev/null +++ b/facebook_business/adobjects/adassetfeedspecassetcustomizationrule.py @@ -0,0 +1,61 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAssetFeedSpecAssetCustomizationRule( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAssetFeedSpecAssetCustomizationRule, self).__init__() + self._isAdAssetFeedSpecAssetCustomizationRule = True + self._api = api + + class Field(AbstractObject.Field): + body_label = 'body_label' + call_to_action_label = 'call_to_action_label' + call_to_action_type_label = 'call_to_action_type_label' + caption_label = 'caption_label' + carousel_label = 'carousel_label' + customization_spec = 'customization_spec' + description_label = 'description_label' + image_label = 'image_label' + is_default = 'is_default' + link_url_label = 'link_url_label' + priority = 'priority' + title_label = 'title_label' + video_label = 'video_label' + + _field_types = { + 'body_label': 'AdAssetFeedSpecAssetLabel', + 'call_to_action_label': 'AdAssetFeedSpecAssetLabel', + 'call_to_action_type_label': 'AdAssetFeedSpecAssetLabel', + 'caption_label': 'AdAssetFeedSpecAssetLabel', + 'carousel_label': 'AdAssetFeedSpecAssetLabel', + 'customization_spec': 'AdAssetCustomizationRuleCustomizationSpec', + 'description_label': 'AdAssetFeedSpecAssetLabel', + 'image_label': 'AdAssetFeedSpecAssetLabel', + 'is_default': 'bool', + 'link_url_label': 'AdAssetFeedSpecAssetLabel', + 'priority': 'int', + 'title_label': 'AdAssetFeedSpecAssetLabel', + 'video_label': 'AdAssetFeedSpecAssetLabel', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adassetfeedspecassetlabel.py b/facebook_business/adobjects/adassetfeedspecassetlabel.py index 8e7edd50c..1e22ee433 100644 --- a/facebook_business/adobjects/adassetfeedspecassetlabel.py +++ b/facebook_business/adobjects/adassetfeedspecassetlabel.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/adassetfeedspecbody.py b/facebook_business/adobjects/adassetfeedspecbody.py index 839786b84..eed5bc7d3 100644 --- a/facebook_business/adobjects/adassetfeedspecbody.py +++ b/facebook_business/adobjects/adassetfeedspecbody.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adassetfeedspeccalltoaction.py b/facebook_business/adobjects/adassetfeedspeccalltoaction.py new file mode 100644 index 000000000..25b07ecf7 --- /dev/null +++ b/facebook_business/adobjects/adassetfeedspeccalltoaction.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAssetFeedSpecCallToAction( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAssetFeedSpecCallToAction, self).__init__() + self._isAdAssetFeedSpecCallToAction = True + self._api = api + + class Field(AbstractObject.Field): + adlabels = 'adlabels' + type = 'type' + value = 'value' + + _field_types = { + 'adlabels': 'list', + 'type': 'string', + 'value': 'AdCreativeLinkDataCallToActionValue', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adassetfeedspeccaption.py b/facebook_business/adobjects/adassetfeedspeccaption.py index f0327c5ba..4545c68f3 100644 --- a/facebook_business/adobjects/adassetfeedspeccaption.py +++ b/facebook_business/adobjects/adassetfeedspeccaption.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adassetfeedspeccarousel.py b/facebook_business/adobjects/adassetfeedspeccarousel.py new file mode 100644 index 000000000..d46b446c6 --- /dev/null +++ b/facebook_business/adobjects/adassetfeedspeccarousel.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAssetFeedSpecCarousel( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAssetFeedSpecCarousel, self).__init__() + self._isAdAssetFeedSpecCarousel = True + self._api = api + + class Field(AbstractObject.Field): + adlabels = 'adlabels' + child_attachments = 'child_attachments' + multi_share_end_card = 'multi_share_end_card' + multi_share_optimized = 'multi_share_optimized' + + _field_types = { + 'adlabels': 'list', + 'child_attachments': 'list', + 'multi_share_end_card': 'bool', + 'multi_share_optimized': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adassetfeedspeccarouselchildattachment.py b/facebook_business/adobjects/adassetfeedspeccarouselchildattachment.py new file mode 100644 index 000000000..b839436b2 --- /dev/null +++ b/facebook_business/adobjects/adassetfeedspeccarouselchildattachment.py @@ -0,0 +1,55 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAssetFeedSpecCarouselChildAttachment( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAssetFeedSpecCarouselChildAttachment, self).__init__() + self._isAdAssetFeedSpecCarouselChildAttachment = True + self._api = api + + class Field(AbstractObject.Field): + body_label = 'body_label' + call_to_action_type_label = 'call_to_action_type_label' + caption_label = 'caption_label' + description_label = 'description_label' + image_label = 'image_label' + link_url_label = 'link_url_label' + phone_data_ids_label = 'phone_data_ids_label' + static_card = 'static_card' + title_label = 'title_label' + video_label = 'video_label' + + _field_types = { + 'body_label': 'AdAssetFeedSpecAssetLabel', + 'call_to_action_type_label': 'AdAssetFeedSpecAssetLabel', + 'caption_label': 'AdAssetFeedSpecAssetLabel', + 'description_label': 'AdAssetFeedSpecAssetLabel', + 'image_label': 'AdAssetFeedSpecAssetLabel', + 'link_url_label': 'AdAssetFeedSpecAssetLabel', + 'phone_data_ids_label': 'AdAssetFeedSpecAssetLabel', + 'static_card': 'bool', + 'title_label': 'AdAssetFeedSpecAssetLabel', + 'video_label': 'AdAssetFeedSpecAssetLabel', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adassetfeedspecdescription.py b/facebook_business/adobjects/adassetfeedspecdescription.py index f442447c7..9c5a09ccc 100644 --- a/facebook_business/adobjects/adassetfeedspecdescription.py +++ b/facebook_business/adobjects/adassetfeedspecdescription.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adassetfeedspecevents.py b/facebook_business/adobjects/adassetfeedspecevents.py new file mode 100644 index 000000000..0b8a36094 --- /dev/null +++ b/facebook_business/adobjects/adassetfeedspecevents.py @@ -0,0 +1,40 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdAssetFeedSpecEvents( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAssetFeedSpecEvents = True + super(AdAssetFeedSpecEvents, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + + _field_types = { + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adassetfeedspecgrouprule.py b/facebook_business/adobjects/adassetfeedspecgrouprule.py index 36637f0c9..dd749d5c6 100644 --- a/facebook_business/adobjects/adassetfeedspecgrouprule.py +++ b/facebook_business/adobjects/adassetfeedspecgrouprule.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adassetfeedspecimage.py b/facebook_business/adobjects/adassetfeedspecimage.py index df85db814..6f5f627ea 100644 --- a/facebook_business/adobjects/adassetfeedspecimage.py +++ b/facebook_business/adobjects/adassetfeedspecimage.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adassetfeedspeclinkurl.py b/facebook_business/adobjects/adassetfeedspeclinkurl.py index 26359676a..c27e7df91 100644 --- a/facebook_business/adobjects/adassetfeedspeclinkurl.py +++ b/facebook_business/adobjects/adassetfeedspeclinkurl.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adassetfeedspectitle.py b/facebook_business/adobjects/adassetfeedspectitle.py index b3f447e11..34982772f 100644 --- a/facebook_business/adobjects/adassetfeedspectitle.py +++ b/facebook_business/adobjects/adassetfeedspectitle.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adassetfeedspecvideo.py b/facebook_business/adobjects/adassetfeedspecvideo.py index 79cb2cc87..8ba34b0de 100644 --- a/facebook_business/adobjects/adassetfeedspecvideo.py +++ b/facebook_business/adobjects/adassetfeedspecvideo.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adassetimage.py b/facebook_business/adobjects/adassetimage.py new file mode 100644 index 000000000..bae05d3bb --- /dev/null +++ b/facebook_business/adobjects/adassetimage.py @@ -0,0 +1,52 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdAssetImage( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAssetImage = True + super(AdAssetImage, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + hash = 'hash' + id = 'id' + image_crops = 'image_crops' + name = 'name' + tag = 'tag' + url = 'url' + url_tags = 'url_tags' + + _field_types = { + 'hash': 'string', + 'id': 'string', + 'image_crops': 'AdsImageCrops', + 'name': 'string', + 'tag': 'string', + 'url': 'string', + 'url_tags': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adassetlinkurl.py b/facebook_business/adobjects/adassetlinkurl.py new file mode 100644 index 000000000..563893704 --- /dev/null +++ b/facebook_business/adobjects/adassetlinkurl.py @@ -0,0 +1,56 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdAssetLinkURL( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAssetLinkURL = True + super(AdAssetLinkURL, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + android_deeplink_url = 'android_deeplink_url' + carousel_see_more_url = 'carousel_see_more_url' + deeplink_url = 'deeplink_url' + display_url = 'display_url' + id = 'id' + ipad_deeplink_url = 'ipad_deeplink_url' + iphone_deeplink_url = 'iphone_deeplink_url' + url_tags = 'url_tags' + website_url = 'website_url' + + _field_types = { + 'android_deeplink_url': 'string', + 'carousel_see_more_url': 'string', + 'deeplink_url': 'string', + 'display_url': 'string', + 'id': 'string', + 'ipad_deeplink_url': 'string', + 'iphone_deeplink_url': 'string', + 'url_tags': 'string', + 'website_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adassetmessageextensions.py b/facebook_business/adobjects/adassetmessageextensions.py new file mode 100644 index 000000000..a3ea877c3 --- /dev/null +++ b/facebook_business/adobjects/adassetmessageextensions.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAssetMessageExtensions( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAssetMessageExtensions, self).__init__() + self._isAdAssetMessageExtensions = True + self._api = api + + class Field(AbstractObject.Field): + type = 'type' + + _field_types = { + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adassetonsitedestinations.py b/facebook_business/adobjects/adassetonsitedestinations.py new file mode 100644 index 000000000..2aa7681cd --- /dev/null +++ b/facebook_business/adobjects/adassetonsitedestinations.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAssetOnsiteDestinations( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAssetOnsiteDestinations, self).__init__() + self._isAdAssetOnsiteDestinations = True + self._api = api + + class Field(AbstractObject.Field): + auto_optimization = 'auto_optimization' + details_page_product_id = 'details_page_product_id' + shop_collection_product_set_id = 'shop_collection_product_set_id' + storefront_shop_id = 'storefront_shop_id' + + _field_types = { + 'auto_optimization': 'string', + 'details_page_product_id': 'string', + 'shop_collection_product_set_id': 'string', + 'storefront_shop_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adassettargetruletargeting.py b/facebook_business/adobjects/adassettargetruletargeting.py new file mode 100644 index 000000000..9848beb15 --- /dev/null +++ b/facebook_business/adobjects/adassettargetruletargeting.py @@ -0,0 +1,56 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdAssetTargetRuleTargeting( + AbstractObject, +): + + def __init__(self, api=None): + super(AdAssetTargetRuleTargeting, self).__init__() + self._isAdAssetTargetRuleTargeting = True + self._api = api + + class Field(AbstractObject.Field): + age_max = 'age_max' + age_min = 'age_min' + audience_network_positions = 'audience_network_positions' + device_platforms = 'device_platforms' + facebook_positions = 'facebook_positions' + geo_locations = 'geo_locations' + instagram_positions = 'instagram_positions' + publisher_platforms = 'publisher_platforms' + + class DevicePlatforms: + desktop = 'desktop' + mobile = 'mobile' + + _field_types = { + 'age_max': 'unsigned int', + 'age_min': 'unsigned int', + 'audience_network_positions': 'list', + 'device_platforms': 'list', + 'facebook_positions': 'list', + 'geo_locations': 'TargetingGeoLocation', + 'instagram_positions': 'list', + 'publisher_platforms': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['DevicePlatforms'] = AdAssetTargetRuleTargeting.DevicePlatforms.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/adassettitle.py b/facebook_business/adobjects/adassettitle.py new file mode 100644 index 000000000..60a855d8c --- /dev/null +++ b/facebook_business/adobjects/adassettitle.py @@ -0,0 +1,44 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdAssetTitle( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAssetTitle = True + super(AdAssetTitle, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + text = 'text' + url_tags = 'url_tags' + + _field_types = { + 'id': 'string', + 'text': 'string', + 'url_tags': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adassetvideo.py b/facebook_business/adobjects/adassetvideo.py new file mode 100644 index 000000000..547a5085f --- /dev/null +++ b/facebook_business/adobjects/adassetvideo.py @@ -0,0 +1,60 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdAssetVideo( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdAssetVideo = True + super(AdAssetVideo, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + caption_ids = 'caption_ids' + id = 'id' + source_image_url = 'source_image_url' + tag = 'tag' + thumbnail_hash = 'thumbnail_hash' + thumbnail_source = 'thumbnail_source' + thumbnail_url = 'thumbnail_url' + url = 'url' + url_tags = 'url_tags' + video_id = 'video_id' + video_name = 'video_name' + + _field_types = { + 'caption_ids': 'list', + 'id': 'string', + 'source_image_url': 'string', + 'tag': 'string', + 'thumbnail_hash': 'string', + 'thumbnail_source': 'string', + 'thumbnail_url': 'string', + 'url': 'string', + 'url_tags': 'string', + 'video_id': 'string', + 'video_name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adasyncrequest.py b/facebook_business/adobjects/adasyncrequest.py index d7918be7b..410a0f7d1 100644 --- a/facebook_business/adobjects/adasyncrequest.py +++ b/facebook_business/adobjects/adasyncrequest.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/adasyncrequestset.py b/facebook_business/adobjects/adasyncrequestset.py index 2b03ac90d..f65519489 100644 --- a/facebook_business/adobjects/adasyncrequestset.py +++ b/facebook_business/adobjects/adasyncrequestset.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/adasyncrequestsetnotificationresult.py b/facebook_business/adobjects/adasyncrequestsetnotificationresult.py index 2c7c98454..75bdcae73 100644 --- a/facebook_business/adobjects/adasyncrequestsetnotificationresult.py +++ b/facebook_business/adobjects/adasyncrequestsetnotificationresult.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adbidadjustments.py b/facebook_business/adobjects/adbidadjustments.py index 7b1c006d7..a8d3e2fe4 100644 --- a/facebook_business/adobjects/adbidadjustments.py +++ b/facebook_business/adobjects/adbidadjustments.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcampaignbidconstraint.py b/facebook_business/adobjects/adcampaignbidconstraint.py index 9a8eb34f6..6090e8bbe 100644 --- a/facebook_business/adobjects/adcampaignbidconstraint.py +++ b/facebook_business/adobjects/adcampaignbidconstraint.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcampaigndeliveryestimate.py b/facebook_business/adobjects/adcampaigndeliveryestimate.py index 21ed2693c..3e6ad1a9a 100644 --- a/facebook_business/adobjects/adcampaigndeliveryestimate.py +++ b/facebook_business/adobjects/adcampaigndeliveryestimate.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -58,15 +44,18 @@ class OptimizationGoal: landing_page_views = 'LANDING_PAGE_VIEWS' lead_generation = 'LEAD_GENERATION' link_clicks = 'LINK_CLICKS' + meaningful_call_attempt = 'MEANINGFUL_CALL_ATTEMPT' messaging_appointment_conversion = 'MESSAGING_APPOINTMENT_CONVERSION' messaging_purchase_conversion = 'MESSAGING_PURCHASE_CONVERSION' none = 'NONE' offsite_conversions = 'OFFSITE_CONVERSIONS' page_likes = 'PAGE_LIKES' post_engagement = 'POST_ENGAGEMENT' + profile_visit = 'PROFILE_VISIT' quality_call = 'QUALITY_CALL' quality_lead = 'QUALITY_LEAD' reach = 'REACH' + reminders_set = 'REMINDERS_SET' subscribers = 'SUBSCRIBERS' thruplay = 'THRUPLAY' value = 'VALUE' diff --git a/facebook_business/adobjects/adcampaigndeliverystats.py b/facebook_business/adobjects/adcampaigndeliverystats.py new file mode 100644 index 000000000..a1c08aa6c --- /dev/null +++ b/facebook_business/adobjects/adcampaigndeliverystats.py @@ -0,0 +1,47 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCampaignDeliveryStats( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCampaignDeliveryStats, self).__init__() + self._isAdCampaignDeliveryStats = True + self._api = api + + class Field(AbstractObject.Field): + bid_recommendation = 'bid_recommendation' + current_average_cost = 'current_average_cost' + last_significant_edit_ts = 'last_significant_edit_ts' + learning_stage_exit_info = 'learning_stage_exit_info' + learning_stage_info = 'learning_stage_info' + unsupported_features = 'unsupported_features' + + _field_types = { + 'bid_recommendation': 'int', + 'current_average_cost': 'float', + 'last_significant_edit_ts': 'int', + 'learning_stage_exit_info': 'Object', + 'learning_stage_info': 'AdCampaignLearningStageInfo', + 'unsupported_features': 'list>', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcampaigndeliverystatsunsupportedreasons.py b/facebook_business/adobjects/adcampaigndeliverystatsunsupportedreasons.py index cc0b4c38e..dbcb8cdbc 100644 --- a/facebook_business/adobjects/adcampaigndeliverystatsunsupportedreasons.py +++ b/facebook_business/adobjects/adcampaigndeliverystatsunsupportedreasons.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcampaignfrequencycontrolspecs.py b/facebook_business/adobjects/adcampaignfrequencycontrolspecs.py index 4d6bb6e94..2186a7de0 100644 --- a/facebook_business/adobjects/adcampaignfrequencycontrolspecs.py +++ b/facebook_business/adobjects/adcampaignfrequencycontrolspecs.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcampaigngroupincrementalconversionoptimizationconfig.py b/facebook_business/adobjects/adcampaigngroupincrementalconversionoptimizationconfig.py new file mode 100644 index 000000000..2fa276ac5 --- /dev/null +++ b/facebook_business/adobjects/adcampaigngroupincrementalconversionoptimizationconfig.py @@ -0,0 +1,55 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCampaignGroupIncrementalConversionOptimizationConfig( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCampaignGroupIncrementalConversionOptimizationConfig, self).__init__() + self._isAdCampaignGroupIncrementalConversionOptimizationConfig = True + self._api = api + + class Field(AbstractObject.Field): + action_type = 'action_type' + ad_study_end_time = 'ad_study_end_time' + ad_study_id = 'ad_study_id' + ad_study_name = 'ad_study_name' + ad_study_start_time = 'ad_study_start_time' + cell_id = 'cell_id' + cell_name = 'cell_name' + holdout_size = 'holdout_size' + ico_type = 'ico_type' + objectives = 'objectives' + + _field_types = { + 'action_type': 'string', + 'ad_study_end_time': 'datetime', + 'ad_study_id': 'string', + 'ad_study_name': 'string', + 'ad_study_start_time': 'datetime', + 'cell_id': 'string', + 'cell_name': 'string', + 'holdout_size': 'float', + 'ico_type': 'string', + 'objectives': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcampaigngroupmetricsmetadata.py b/facebook_business/adobjects/adcampaigngroupmetricsmetadata.py new file mode 100644 index 000000000..33bd942ab --- /dev/null +++ b/facebook_business/adobjects/adcampaigngroupmetricsmetadata.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCampaignGroupMetricsMetadata( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCampaignGroupMetricsMetadata, self).__init__() + self._isAdCampaignGroupMetricsMetadata = True + self._api = api + + class Field(AbstractObject.Field): + budget_optimization = 'budget_optimization' + duplication_flow_tips = 'duplication_flow_tips' + + _field_types = { + 'budget_optimization': 'list', + 'duplication_flow_tips': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcampaigngroupstats.py b/facebook_business/adobjects/adcampaigngroupstats.py new file mode 100644 index 000000000..1679d66be --- /dev/null +++ b/facebook_business/adobjects/adcampaigngroupstats.py @@ -0,0 +1,65 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCampaignGroupStats( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCampaignGroupStats, self).__init__() + self._isAdCampaignGroupStats = True + self._api = api + + class Field(AbstractObject.Field): + actions = 'actions' + campaign_group_id = 'campaign_group_id' + clicks = 'clicks' + end_time = 'end_time' + impressions = 'impressions' + inline_actions = 'inline_actions' + social_clicks = 'social_clicks' + social_impressions = 'social_impressions' + social_spent = 'social_spent' + social_unique_clicks = 'social_unique_clicks' + social_unique_impressions = 'social_unique_impressions' + spent = 'spent' + start_time = 'start_time' + unique_clicks = 'unique_clicks' + unique_impressions = 'unique_impressions' + + _field_types = { + 'actions': 'map', + 'campaign_group_id': 'string', + 'clicks': 'unsigned int', + 'end_time': 'datetime', + 'impressions': 'unsigned int', + 'inline_actions': 'map', + 'social_clicks': 'unsigned int', + 'social_impressions': 'unsigned int', + 'social_spent': 'unsigned int', + 'social_unique_clicks': 'unsigned int', + 'social_unique_impressions': 'unsigned int', + 'spent': 'unsigned int', + 'start_time': 'datetime', + 'unique_clicks': 'unsigned int', + 'unique_impressions': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcampaigngroupstructuretree.py b/facebook_business/adobjects/adcampaigngroupstructuretree.py new file mode 100644 index 000000000..0251dd7d8 --- /dev/null +++ b/facebook_business/adobjects/adcampaigngroupstructuretree.py @@ -0,0 +1,46 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdCampaignGroupStructureTree( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdCampaignGroupStructureTree = True + super(AdCampaignGroupStructureTree, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + children = 'children' + id = 'id' + name = 'name' + time_updated = 'time_updated' + + _field_types = { + 'children': 'list', + 'id': 'string', + 'name': 'string', + 'time_updated': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcampaignissuesinfo.py b/facebook_business/adobjects/adcampaignissuesinfo.py index 9cbcea4f9..657184bfe 100644 --- a/facebook_business/adobjects/adcampaignissuesinfo.py +++ b/facebook_business/adobjects/adcampaignissuesinfo.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcampaignlearningstageinfo.py b/facebook_business/adobjects/adcampaignlearningstageinfo.py index f4907b9fa..fef9b4431 100644 --- a/facebook_business/adobjects/adcampaignlearningstageinfo.py +++ b/facebook_business/adobjects/adcampaignlearningstageinfo.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcampaignmetricsmetadata.py b/facebook_business/adobjects/adcampaignmetricsmetadata.py new file mode 100644 index 000000000..79fc9df9c --- /dev/null +++ b/facebook_business/adobjects/adcampaignmetricsmetadata.py @@ -0,0 +1,47 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCampaignMetricsMetadata( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCampaignMetricsMetadata, self).__init__() + self._isAdCampaignMetricsMetadata = True + self._api = api + + class Field(AbstractObject.Field): + boosted_component_optimization = 'boosted_component_optimization' + creation_flow_tips = 'creation_flow_tips' + default_opted_in_placements = 'default_opted_in_placements' + delivery_growth_optimizations = 'delivery_growth_optimizations' + duplication_flow_tips = 'duplication_flow_tips' + edit_flow_tips = 'edit_flow_tips' + + _field_types = { + 'boosted_component_optimization': 'list', + 'creation_flow_tips': 'list', + 'default_opted_in_placements': 'list', + 'delivery_growth_optimizations': 'list', + 'duplication_flow_tips': 'list', + 'edit_flow_tips': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcampaignmultiads.py b/facebook_business/adobjects/adcampaignmultiads.py new file mode 100644 index 000000000..52b713fd5 --- /dev/null +++ b/facebook_business/adobjects/adcampaignmultiads.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCampaignMultiAds( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCampaignMultiAds, self).__init__() + self._isAdCampaignMultiAds = True + self._api = api + + class Field(AbstractObject.Field): + enroll_status = 'enroll_status' + source_type = 'source_type' + + _field_types = { + 'enroll_status': 'string', + 'source_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcampaignoptimizationevent.py b/facebook_business/adobjects/adcampaignoptimizationevent.py index 926ca857f..7ad474861 100644 --- a/facebook_business/adobjects/adcampaignoptimizationevent.py +++ b/facebook_business/adobjects/adcampaignoptimizationevent.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcampaignpacedbidinfo.py b/facebook_business/adobjects/adcampaignpacedbidinfo.py index fc1523dde..15e70df1c 100644 --- a/facebook_business/adobjects/adcampaignpacedbidinfo.py +++ b/facebook_business/adobjects/adcampaignpacedbidinfo.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcampaignstats.py b/facebook_business/adobjects/adcampaignstats.py new file mode 100644 index 000000000..26ff92229 --- /dev/null +++ b/facebook_business/adobjects/adcampaignstats.py @@ -0,0 +1,86 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdCampaignStats( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdCampaignStats = True + super(AdCampaignStats, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account_id = 'account_id' + actions = 'actions' + adgroup_id = 'adgroup_id' + campaign_id = 'campaign_id' + campaign_ids = 'campaign_ids' + clicks = 'clicks' + end_time = 'end_time' + id = 'id' + impressions = 'impressions' + inline_actions = 'inline_actions' + io_number = 'io_number' + is_completed = 'is_completed' + line_number = 'line_number' + newsfeed_position = 'newsfeed_position' + social_clicks = 'social_clicks' + social_impressions = 'social_impressions' + social_spent = 'social_spent' + social_unique_clicks = 'social_unique_clicks' + social_unique_impressions = 'social_unique_impressions' + spent = 'spent' + start_time = 'start_time' + topline_id = 'topline_id' + unique_clicks = 'unique_clicks' + unique_impressions = 'unique_impressions' + + _field_types = { + 'account_id': 'string', + 'actions': 'Object', + 'adgroup_id': 'string', + 'campaign_id': 'string', + 'campaign_ids': 'list', + 'clicks': 'unsigned int', + 'end_time': 'Object', + 'id': 'string', + 'impressions': 'string', + 'inline_actions': 'map', + 'io_number': 'unsigned int', + 'is_completed': 'bool', + 'line_number': 'unsigned int', + 'newsfeed_position': 'Object', + 'social_clicks': 'unsigned int', + 'social_impressions': 'string', + 'social_spent': 'unsigned int', + 'social_unique_clicks': 'unsigned int', + 'social_unique_impressions': 'string', + 'spent': 'int', + 'start_time': 'Object', + 'topline_id': 'string', + 'unique_clicks': 'unsigned int', + 'unique_impressions': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcolumnsizes.py b/facebook_business/adobjects/adcolumnsizes.py new file mode 100644 index 000000000..a2a64c133 --- /dev/null +++ b/facebook_business/adobjects/adcolumnsizes.py @@ -0,0 +1,86 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdColumnSizes( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdColumnSizes = True + super(AdColumnSizes, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + admarket_account = 'admarket_account' + app_id = 'app_id' + columns = 'columns' + id = 'id' + owner = 'owner' + page = 'page' + report = 'report' + tab = 'tab' + view = 'view' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdColumnSizes, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'admarket_account': 'AdAccount', + 'app_id': 'string', + 'columns': 'list>', + 'id': 'string', + 'owner': 'User', + 'page': 'string', + 'report': 'string', + 'tab': 'string', + 'view': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcontract.py b/facebook_business/adobjects/adcontract.py new file mode 100644 index 000000000..0f0099293 --- /dev/null +++ b/facebook_business/adobjects/adcontract.py @@ -0,0 +1,117 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdContract( + AbstractObject, +): + + def __init__(self, api=None): + super(AdContract, self).__init__() + self._isAdContract = True + self._api = api + + class Field(AbstractObject.Field): + account_id = 'account_id' + account_mgr_fbid = 'account_mgr_fbid' + account_mgr_name = 'account_mgr_name' + adops_person_name = 'adops_person_name' + advertiser_address_fbid = 'advertiser_address_fbid' + advertiser_fbid = 'advertiser_fbid' + advertiser_name = 'advertiser_name' + agency_discount = 'agency_discount' + agency_name = 'agency_name' + bill_to_address_fbid = 'bill_to_address_fbid' + bill_to_fbid = 'bill_to_fbid' + campaign_name = 'campaign_name' + created_by = 'created_by' + created_date = 'created_date' + customer_io = 'customer_io' + io_number = 'io_number' + io_terms = 'io_terms' + io_type = 'io_type' + last_updated_by = 'last_updated_by' + last_updated_date = 'last_updated_date' + max_end_date = 'max_end_date' + mdc_fbid = 'mdc_fbid' + media_plan_number = 'media_plan_number' + min_start_date = 'min_start_date' + msa_contract = 'msa_contract' + payment_terms = 'payment_terms' + rev_hold_flag = 'rev_hold_flag' + rev_hold_released_by = 'rev_hold_released_by' + rev_hold_released_on = 'rev_hold_released_on' + salesrep_fbid = 'salesrep_fbid' + salesrep_name = 'salesrep_name' + sold_to_address_fbid = 'sold_to_address_fbid' + sold_to_fbid = 'sold_to_fbid' + status = 'status' + subvertical = 'subvertical' + thirdparty_billed = 'thirdparty_billed' + thirdparty_uid = 'thirdparty_uid' + thirdparty_url = 'thirdparty_url' + vat_country = 'vat_country' + version = 'version' + vertical = 'vertical' + + _field_types = { + 'account_id': 'string', + 'account_mgr_fbid': 'string', + 'account_mgr_name': 'string', + 'adops_person_name': 'string', + 'advertiser_address_fbid': 'string', + 'advertiser_fbid': 'string', + 'advertiser_name': 'string', + 'agency_discount': 'float', + 'agency_name': 'string', + 'bill_to_address_fbid': 'string', + 'bill_to_fbid': 'string', + 'campaign_name': 'string', + 'created_by': 'string', + 'created_date': 'unsigned int', + 'customer_io': 'string', + 'io_number': 'unsigned int', + 'io_terms': 'string', + 'io_type': 'string', + 'last_updated_by': 'string', + 'last_updated_date': 'unsigned int', + 'max_end_date': 'unsigned int', + 'mdc_fbid': 'string', + 'media_plan_number': 'string', + 'min_start_date': 'unsigned int', + 'msa_contract': 'string', + 'payment_terms': 'string', + 'rev_hold_flag': 'bool', + 'rev_hold_released_by': 'int', + 'rev_hold_released_on': 'unsigned int', + 'salesrep_fbid': 'string', + 'salesrep_name': 'string', + 'sold_to_address_fbid': 'string', + 'sold_to_fbid': 'string', + 'status': 'string', + 'subvertical': 'string', + 'thirdparty_billed': 'unsigned int', + 'thirdparty_uid': 'string', + 'thirdparty_url': 'string', + 'vat_country': 'string', + 'version': 'unsigned int', + 'vertical': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adconversions.py b/facebook_business/adobjects/adconversions.py new file mode 100644 index 000000000..ae822842a --- /dev/null +++ b/facebook_business/adobjects/adconversions.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdConversions( + AbstractObject, +): + + def __init__(self, api=None): + super(AdConversions, self).__init__() + self._isAdConversions = True + self._api = api + + class Field(AbstractObject.Field): + account_id = 'account_id' + adgroup_id = 'adgroup_id' + campaign_id = 'campaign_id' + values = 'values' + + _field_types = { + 'account_id': 'string', + 'adgroup_id': 'string', + 'campaign_id': 'string', + 'values': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adconversionvalues.py b/facebook_business/adobjects/adconversionvalues.py new file mode 100644 index 000000000..49dcc111c --- /dev/null +++ b/facebook_business/adobjects/adconversionvalues.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdConversionValues( + AbstractObject, +): + + def __init__(self, api=None): + super(AdConversionValues, self).__init__() + self._isAdConversionValues = True + self._api = api + + class Field(AbstractObject.Field): + adgroup_id = 'adgroup_id' + campaign_id = 'campaign_id' + values = 'values' + + _field_types = { + 'adgroup_id': 'string', + 'campaign_id': 'string', + 'values': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreationpackageconfig.py b/facebook_business/adobjects/adcreationpackageconfig.py new file mode 100644 index 000000000..de491e2ec --- /dev/null +++ b/facebook_business/adobjects/adcreationpackageconfig.py @@ -0,0 +1,80 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdCreationPackageConfig( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdCreationPackageConfig = True + super(AdCreationPackageConfig, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + api_version = 'api_version' + id = 'id' + is_eligible_for_default_opt_in = 'is_eligible_for_default_opt_in' + objective = 'objective' + package_id = 'package_id' + status = 'status' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdCreationPackageConfig, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'api_version': 'string', + 'id': 'string', + 'is_eligible_for_default_opt_in': 'bool', + 'objective': 'string', + 'package_id': 'string', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreative.py b/facebook_business/adobjects/adcreative.py index 7ef2be26b..a18fd71d5 100644 --- a/facebook_business/adobjects/adcreative.py +++ b/facebook_business/adobjects/adcreative.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -58,6 +44,8 @@ class Field(AbstractObject.Field): categorization_criteria = 'categorization_criteria' category_media_source = 'category_media_source' collaborative_ads_lsb_image_bank_id = 'collaborative_ads_lsb_image_bank_id' + contextual_multi_ads = 'contextual_multi_ads' + creative_sourcing_spec = 'creative_sourcing_spec' degrees_of_freedom_spec = 'degrees_of_freedom_spec' destination_set_id = 'destination_set_id' dynamic_ad_voice = 'dynamic_ad_voice' @@ -82,7 +70,6 @@ class Field(AbstractObject.Field): link_destination_display_url = 'link_destination_display_url' link_og_id = 'link_og_id' link_url = 'link_url' - messenger_sponsored_message = 'messenger_sponsored_message' name = 'name' object_id = 'object_id' object_store_url = 'object_store_url' @@ -91,6 +78,8 @@ class Field(AbstractObject.Field): object_type = 'object_type' object_url = 'object_url' omnichannel_link_spec = 'omnichannel_link_spec' + page_welcome_message = 'page_welcome_message' + photo_album_source_object_story_id = 'photo_album_source_object_story_id' place_page_set_id = 'place_page_set_id' platform_customizations = 'platform_customizations' playable_asset_id = 'playable_asset_id' @@ -114,14 +103,21 @@ class Field(AbstractObject.Field): class CallToActionType: add_to_cart = 'ADD_TO_CART' apply_now = 'APPLY_NOW' + ask_about_services = 'ASK_ABOUT_SERVICES' + ask_for_more_info = 'ASK_FOR_MORE_INFO' audio_call = 'AUDIO_CALL' + book_a_consultation = 'BOOK_A_CONSULTATION' + book_now = 'BOOK_NOW' book_travel = 'BOOK_TRAVEL' buy = 'BUY' buy_now = 'BUY_NOW' buy_tickets = 'BUY_TICKETS' + buy_via_message = 'BUY_VIA_MESSAGE' call = 'CALL' call_me = 'CALL_ME' call_now = 'CALL_NOW' + chat_with_us = 'CHAT_WITH_US' + confirm = 'CONFIRM' contact = 'CONTACT' contact_us = 'CONTACT_US' donate = 'DONATE' @@ -133,6 +129,7 @@ class CallToActionType: follow_news_storyline = 'FOLLOW_NEWS_STORYLINE' follow_page = 'FOLLOW_PAGE' follow_user = 'FOLLOW_USER' + get_a_quote = 'GET_A_QUOTE' get_directions = 'GET_DIRECTIONS' get_offer = 'GET_OFFER' get_offer_view = 'GET_OFFER_VIEW' @@ -143,13 +140,14 @@ class CallToActionType: inquire_now = 'INQUIRE_NOW' install_app = 'INSTALL_APP' install_mobile_app = 'INSTALL_MOBILE_APP' + join_channel = 'JOIN_CHANNEL' learn_more = 'LEARN_MORE' like_page = 'LIKE_PAGE' listen_music = 'LISTEN_MUSIC' listen_now = 'LISTEN_NOW' + make_an_appointment = 'MAKE_AN_APPOINTMENT' message_page = 'MESSAGE_PAGE' mobile_download = 'MOBILE_DOWNLOAD' - moments = 'MOMENTS' no_button = 'NO_BUTTON' open_instant_app = 'OPEN_INSTANT_APP' open_link = 'OPEN_LINK' @@ -181,6 +179,7 @@ class CallToActionType: use_mobile_app = 'USE_MOBILE_APP' video_annotation = 'VIDEO_ANNOTATION' video_call = 'VIDEO_CALL' + view_product = 'VIEW_PRODUCT' visit_pages_feed = 'VISIT_PAGES_FEED' watch_more = 'WATCH_MORE' watch_video = 'WATCH_VIDEO' @@ -217,6 +216,7 @@ class ApplinkTreatment: class AuthorizationCategory: none = 'NONE' political = 'POLITICAL' + political_with_digitally_created_media = 'POLITICAL_WITH_DIGITALLY_CREATED_MEDIA' class CategorizationCriteria: brand = 'brand' @@ -475,6 +475,8 @@ def get_previews(self, fields=None, params=None, batch=None, success=None, failu 'categorization_criteria': 'string', 'category_media_source': 'string', 'collaborative_ads_lsb_image_bank_id': 'string', + 'contextual_multi_ads': 'AdCreativeContextualMultiAds', + 'creative_sourcing_spec': 'AdCreativeSourcingSpec', 'degrees_of_freedom_spec': 'AdCreativeDegreesOfFreedomSpec', 'destination_set_id': 'string', 'dynamic_ad_voice': 'string', @@ -499,7 +501,6 @@ def get_previews(self, fields=None, params=None, batch=None, success=None, failu 'link_destination_display_url': 'string', 'link_og_id': 'string', 'link_url': 'string', - 'messenger_sponsored_message': 'string', 'name': 'string', 'object_id': 'string', 'object_store_url': 'string', @@ -508,6 +509,8 @@ def get_previews(self, fields=None, params=None, batch=None, success=None, failu 'object_type': 'ObjectType', 'object_url': 'string', 'omnichannel_link_spec': 'AdCreativeOmnichannelLinkSpec', + 'page_welcome_message': 'string', + 'photo_album_source_object_story_id': 'string', 'place_page_set_id': 'string', 'platform_customizations': 'AdCreativePlatformCustomization', 'playable_asset_id': 'string', diff --git a/facebook_business/adobjects/adcreativeaddisclaimer.py b/facebook_business/adobjects/adcreativeaddisclaimer.py index cd582e4d7..6eeec1919 100644 --- a/facebook_business/adobjects/adcreativeaddisclaimer.py +++ b/facebook_business/adobjects/adcreativeaddisclaimer.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativeassetgroupsspec.py b/facebook_business/adobjects/adcreativeassetgroupsspec.py new file mode 100644 index 000000000..470d1950c --- /dev/null +++ b/facebook_business/adobjects/adcreativeassetgroupsspec.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCreativeAssetGroupsSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeAssetGroupsSpec, self).__init__() + self._isAdCreativeAssetGroupsSpec = True + self._api = api + + class Field(AbstractObject.Field): + groups = 'groups' + origin = 'origin' + + _field_types = { + 'groups': 'list', + 'origin': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativebrandedcontentads.py b/facebook_business/adobjects/adcreativebrandedcontentads.py index 9ec39a0b0..1f9e720b2 100644 --- a/facebook_business/adobjects/adcreativebrandedcontentads.py +++ b/facebook_business/adobjects/adcreativebrandedcontentads.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject @@ -39,16 +25,24 @@ def __init__(self, api=None): class Field(AbstractObject.Field): ad_format = 'ad_format' + content_search_input = 'content_search_input' creator_ad_permission_type = 'creator_ad_permission_type' + facebook_boost_post_access_token = 'facebook_boost_post_access_token' instagram_boost_post_access_token = 'instagram_boost_post_access_token' + is_mca_internal = 'is_mca_internal' partners = 'partners' + promoted_page_id = 'promoted_page_id' ui_version = 'ui_version' _field_types = { 'ad_format': 'int', + 'content_search_input': 'string', 'creator_ad_permission_type': 'string', + 'facebook_boost_post_access_token': 'string', 'instagram_boost_post_access_token': 'string', - 'partners': 'list', + 'is_mca_internal': 'bool', + 'partners': 'list', + 'promoted_page_id': 'string', 'ui_version': 'int', } @classmethod diff --git a/facebook_business/adobjects/adcreativebrandedcontentadspartners.py b/facebook_business/adobjects/adcreativebrandedcontentadspartners.py new file mode 100644 index 000000000..d0b7d2cba --- /dev/null +++ b/facebook_business/adobjects/adcreativebrandedcontentadspartners.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCreativeBrandedContentAdsPartners( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeBrandedContentAdsPartners, self).__init__() + self._isAdCreativeBrandedContentAdsPartners = True + self._api = api + + class Field(AbstractObject.Field): + fb_page_id = 'fb_page_id' + identity_type = 'identity_type' + ig_asset_id = 'ig_asset_id' + ig_user_id = 'ig_user_id' + + _field_types = { + 'fb_page_id': 'string', + 'identity_type': 'string', + 'ig_asset_id': 'string', + 'ig_user_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativecollectionthumbnailinfo.py b/facebook_business/adobjects/adcreativecollectionthumbnailinfo.py index fbfbf634e..7307ae933 100644 --- a/facebook_business/adobjects/adcreativecollectionthumbnailinfo.py +++ b/facebook_business/adobjects/adcreativecollectionthumbnailinfo.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativecontextualmultiads.py b/facebook_business/adobjects/adcreativecontextualmultiads.py new file mode 100644 index 000000000..021a068a8 --- /dev/null +++ b/facebook_business/adobjects/adcreativecontextualmultiads.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCreativeContextualMultiAds( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeContextualMultiAds, self).__init__() + self._isAdCreativeContextualMultiAds = True + self._api = api + + class Field(AbstractObject.Field): + enroll_status = 'enroll_status' + + _field_types = { + 'enroll_status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativedegreesoffreedomspec.py b/facebook_business/adobjects/adcreativedegreesoffreedomspec.py index 0095de3a5..51559d6fa 100644 --- a/facebook_business/adobjects/adcreativedegreesoffreedomspec.py +++ b/facebook_business/adobjects/adcreativedegreesoffreedomspec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -49,7 +35,7 @@ class Field(AbstractObject.Field): _field_types = { 'ad_handle_type': 'string', - 'creative_features_spec': 'Object', + 'creative_features_spec': 'AdCreativeFeaturesSpec', 'degrees_of_freedom_type': 'string', 'image_transformation_types': 'list', 'multi_media_transformation_type': 'string', diff --git a/facebook_business/adobjects/adcreativefacebookbrandedcontent.py b/facebook_business/adobjects/adcreativefacebookbrandedcontent.py index 70c198009..c042871a1 100644 --- a/facebook_business/adobjects/adcreativefacebookbrandedcontent.py +++ b/facebook_business/adobjects/adcreativefacebookbrandedcontent.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativefeatureactionmetadata.py b/facebook_business/adobjects/adcreativefeatureactionmetadata.py new file mode 100644 index 000000000..c90cd687e --- /dev/null +++ b/facebook_business/adobjects/adcreativefeatureactionmetadata.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCreativeFeatureActionMetadata( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeFeatureActionMetadata, self).__init__() + self._isAdCreativeFeatureActionMetadata = True + self._api = api + + class Field(AbstractObject.Field): + type = 'type' + + _field_types = { + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativefeaturecustomizations.py b/facebook_business/adobjects/adcreativefeaturecustomizations.py new file mode 100644 index 000000000..512ab30e1 --- /dev/null +++ b/facebook_business/adobjects/adcreativefeaturecustomizations.py @@ -0,0 +1,49 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCreativeFeatureCustomizations( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeFeatureCustomizations, self).__init__() + self._isAdCreativeFeatureCustomizations = True + self._api = api + + class Field(AbstractObject.Field): + background_color = 'background_color' + catalog_feed_tag_name = 'catalog_feed_tag_name' + font_name = 'font_name' + product_recommendation_type = 'product_recommendation_type' + showcase_card_display = 'showcase_card_display' + text_style = 'text_style' + video_crop_style = 'video_crop_style' + + _field_types = { + 'background_color': 'string', + 'catalog_feed_tag_name': 'string', + 'font_name': 'string', + 'product_recommendation_type': 'string', + 'showcase_card_display': 'string', + 'text_style': 'string', + 'video_crop_style': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativefeaturedetails.py b/facebook_business/adobjects/adcreativefeaturedetails.py new file mode 100644 index 000000000..bf7cccec3 --- /dev/null +++ b/facebook_business/adobjects/adcreativefeaturedetails.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCreativeFeatureDetails( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeFeatureDetails, self).__init__() + self._isAdCreativeFeatureDetails = True + self._api = api + + class Field(AbstractObject.Field): + enroll_status = 'enroll_status' + + _field_types = { + 'enroll_status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativefeaturesspec.py b/facebook_business/adobjects/adcreativefeaturesspec.py new file mode 100644 index 000000000..dd5bf0e85 --- /dev/null +++ b/facebook_business/adobjects/adcreativefeaturesspec.py @@ -0,0 +1,107 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCreativeFeaturesSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeFeaturesSpec, self).__init__() + self._isAdCreativeFeaturesSpec = True + self._api = api + + class Field(AbstractObject.Field): + adapt_to_placement = 'adapt_to_placement' + ads_with_benefits = 'ads_with_benefits' + advantage_plus_creative = 'advantage_plus_creative' + app_highlights = 'app_highlights' + audio = 'audio' + carousel_to_video = 'carousel_to_video' + catalog_feed_tag = 'catalog_feed_tag' + customize_product_recommendation = 'customize_product_recommendation' + cv_transformation = 'cv_transformation' + description_automation = 'description_automation' + dha_optimization = 'dha_optimization' + feed_caption_optimization = 'feed_caption_optimization' + ig_glados_feed = 'ig_glados_feed' + image_auto_crop = 'image_auto_crop' + image_background_gen = 'image_background_gen' + image_brightness_and_contrast = 'image_brightness_and_contrast' + image_enhancement = 'image_enhancement' + image_templates = 'image_templates' + image_touchups = 'image_touchups' + image_uncrop = 'image_uncrop' + inline_comment = 'inline_comment' + media_liquidity_animated_image = 'media_liquidity_animated_image' + media_order = 'media_order' + media_type_automation = 'media_type_automation' + product_extensions = 'product_extensions' + product_metadata_automation = 'product_metadata_automation' + product_tags = 'product_tags' + profile_card = 'profile_card' + site_extensions = 'site_extensions' + standard_enhancements = 'standard_enhancements' + standard_enhancements_catalog = 'standard_enhancements_catalog' + text_generation = 'text_generation' + text_optimizations = 'text_optimizations' + video_auto_crop = 'video_auto_crop' + video_filtering = 'video_filtering' + video_highlight = 'video_highlight' + + _field_types = { + 'adapt_to_placement': 'AdCreativeFeatureDetails', + 'ads_with_benefits': 'AdCreativeFeatureDetails', + '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', + 'feed_caption_optimization': 'AdCreativeFeatureDetails', + 'ig_glados_feed': 'AdCreativeFeatureDetails', + 'image_auto_crop': 'AdCreativeFeatureDetails', + 'image_background_gen': 'AdCreativeFeatureDetails', + 'image_brightness_and_contrast': 'AdCreativeFeatureDetails', + 'image_enhancement': 'AdCreativeFeatureDetails', + 'image_templates': 'AdCreativeFeatureDetails', + 'image_touchups': 'AdCreativeFeatureDetails', + 'image_uncrop': 'AdCreativeFeatureDetails', + 'inline_comment': 'AdCreativeFeatureDetails', + 'media_liquidity_animated_image': 'AdCreativeFeatureDetails', + 'media_order': 'AdCreativeFeatureDetails', + 'media_type_automation': 'AdCreativeFeatureDetails', + 'product_extensions': 'AdCreativeFeatureDetails', + 'product_metadata_automation': 'AdCreativeFeatureDetails', + 'product_tags': 'AdCreativeFeatureDetails', + 'profile_card': 'AdCreativeFeatureDetails', + 'site_extensions': 'AdCreativeFeatureDetails', + 'standard_enhancements': 'AdCreativeFeatureDetails', + 'standard_enhancements_catalog': 'AdCreativeFeatureDetails', + 'text_generation': 'AdCreativeFeatureDetails', + 'text_optimizations': 'AdCreativeFeatureDetails', + 'video_auto_crop': 'AdCreativeFeatureDetails', + 'video_filtering': 'AdCreativeFeatureDetails', + 'video_highlight': 'AdCreativeFeatureDetails', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativegenerativeassetspec.py b/facebook_business/adobjects/adcreativegenerativeassetspec.py new file mode 100644 index 000000000..f6c2339a2 --- /dev/null +++ b/facebook_business/adobjects/adcreativegenerativeassetspec.py @@ -0,0 +1,36 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCreativeGenerativeAssetSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeGenerativeAssetSpec, self).__init__() + self._isAdCreativeGenerativeAssetSpec = True + self._api = api + + class Field(AbstractObject.Field): + pass + + _field_types = { + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativehouseshopsadssellercontent.py b/facebook_business/adobjects/adcreativehouseshopsadssellercontent.py new file mode 100644 index 000000000..caa68aedb --- /dev/null +++ b/facebook_business/adobjects/adcreativehouseshopsadssellercontent.py @@ -0,0 +1,36 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCreativeHouseShopsAdsSellerContent( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeHouseShopsAdsSellerContent, self).__init__() + self._isAdCreativeHouseShopsAdsSellerContent = True + self._api = api + + class Field(AbstractObject.Field): + pass + + _field_types = { + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativeimagedatamediaelements.py b/facebook_business/adobjects/adcreativeimagedatamediaelements.py new file mode 100644 index 000000000..6c95a8d18 --- /dev/null +++ b/facebook_business/adobjects/adcreativeimagedatamediaelements.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCreativeImageDataMediaElements( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeImageDataMediaElements, self).__init__() + self._isAdCreativeImageDataMediaElements = True + self._api = api + + class Field(AbstractObject.Field): + element_id = 'element_id' + element_type = 'element_type' + x = 'x' + y = 'y' + + _field_types = { + 'element_id': 'string', + 'element_type': 'string', + 'x': 'float', + 'y': 'float', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativeinsights.py b/facebook_business/adobjects/adcreativeinsights.py index 4465fb892..1faf2881c 100644 --- a/facebook_business/adobjects/adcreativeinsights.py +++ b/facebook_business/adobjects/adcreativeinsights.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativeinstagrambrandedcontent.py b/facebook_business/adobjects/adcreativeinstagrambrandedcontent.py index 20dbb1db5..fe469dcda 100644 --- a/facebook_business/adobjects/adcreativeinstagrambrandedcontent.py +++ b/facebook_business/adobjects/adcreativeinstagrambrandedcontent.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativeinteractivecomponentsspec.py b/facebook_business/adobjects/adcreativeinteractivecomponentsspec.py index 455c483ba..fa60a7421 100644 --- a/facebook_business/adobjects/adcreativeinteractivecomponentsspec.py +++ b/facebook_business/adobjects/adcreativeinteractivecomponentsspec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativelinkdata.py b/facebook_business/adobjects/adcreativelinkdata.py index a9680be8a..f241bfb7d 100644 --- a/facebook_business/adobjects/adcreativelinkdata.py +++ b/facebook_business/adobjects/adcreativelinkdata.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -42,6 +28,7 @@ class Field(AbstractObject.Field): additional_image_index = 'additional_image_index' app_link_spec = 'app_link_spec' attachment_style = 'attachment_style' + automated_product_tags = 'automated_product_tags' branded_content_shared_to_sponsor_status = 'branded_content_shared_to_sponsor_status' branded_content_sponsor_page_id = 'branded_content_sponsor_page_id' call_to_action = 'call_to_action' @@ -72,22 +59,20 @@ class Field(AbstractObject.Field): static_fallback_spec = 'static_fallback_spec' use_flexible_image_aspect_ratio = 'use_flexible_image_aspect_ratio' - class AttachmentStyle: - value_default = 'default' - link = 'link' - class FormatOption: carousel_ar_effects = 'carousel_ar_effects' carousel_images_multi_items = 'carousel_images_multi_items' carousel_images_single_item = 'carousel_images_single_item' carousel_slideshows = 'carousel_slideshows' + collection_video = 'collection_video' single_image = 'single_image' _field_types = { 'ad_context': 'string', 'additional_image_index': 'int', 'app_link_spec': 'AdCreativeLinkDataAppLinkSpec', - 'attachment_style': 'AttachmentStyle', + 'attachment_style': 'string', + 'automated_product_tags': 'bool', 'branded_content_shared_to_sponsor_status': 'string', 'branded_content_sponsor_page_id': 'string', 'call_to_action': 'AdCreativeLinkDataCallToAction', @@ -121,7 +106,6 @@ class FormatOption: @classmethod def _get_field_enum_info(cls): field_enum_info = {} - field_enum_info['AttachmentStyle'] = AdCreativeLinkData.AttachmentStyle.__dict__.values() field_enum_info['FormatOption'] = AdCreativeLinkData.FormatOption.__dict__.values() return field_enum_info diff --git a/facebook_business/adobjects/adcreativelinkdataapplinkspec.py b/facebook_business/adobjects/adcreativelinkdataapplinkspec.py index 42e685348..0f47bcbdd 100644 --- a/facebook_business/adobjects/adcreativelinkdataapplinkspec.py +++ b/facebook_business/adobjects/adcreativelinkdataapplinkspec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativelinkdatacalltoaction.py b/facebook_business/adobjects/adcreativelinkdatacalltoaction.py index 679dfe0d8..2c45ddafa 100644 --- a/facebook_business/adobjects/adcreativelinkdatacalltoaction.py +++ b/facebook_business/adobjects/adcreativelinkdatacalltoaction.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -44,14 +30,21 @@ class Field(AbstractObject.Field): class Type: add_to_cart = 'ADD_TO_CART' apply_now = 'APPLY_NOW' + ask_about_services = 'ASK_ABOUT_SERVICES' + ask_for_more_info = 'ASK_FOR_MORE_INFO' audio_call = 'AUDIO_CALL' + book_a_consultation = 'BOOK_A_CONSULTATION' + book_now = 'BOOK_NOW' book_travel = 'BOOK_TRAVEL' buy = 'BUY' buy_now = 'BUY_NOW' buy_tickets = 'BUY_TICKETS' + buy_via_message = 'BUY_VIA_MESSAGE' call = 'CALL' call_me = 'CALL_ME' call_now = 'CALL_NOW' + chat_with_us = 'CHAT_WITH_US' + confirm = 'CONFIRM' contact = 'CONTACT' contact_us = 'CONTACT_US' donate = 'DONATE' @@ -63,6 +56,7 @@ class Type: follow_news_storyline = 'FOLLOW_NEWS_STORYLINE' follow_page = 'FOLLOW_PAGE' follow_user = 'FOLLOW_USER' + get_a_quote = 'GET_A_QUOTE' get_directions = 'GET_DIRECTIONS' get_offer = 'GET_OFFER' get_offer_view = 'GET_OFFER_VIEW' @@ -73,13 +67,14 @@ class Type: inquire_now = 'INQUIRE_NOW' install_app = 'INSTALL_APP' install_mobile_app = 'INSTALL_MOBILE_APP' + join_channel = 'JOIN_CHANNEL' learn_more = 'LEARN_MORE' like_page = 'LIKE_PAGE' listen_music = 'LISTEN_MUSIC' listen_now = 'LISTEN_NOW' + make_an_appointment = 'MAKE_AN_APPOINTMENT' message_page = 'MESSAGE_PAGE' mobile_download = 'MOBILE_DOWNLOAD' - moments = 'MOMENTS' no_button = 'NO_BUTTON' open_instant_app = 'OPEN_INSTANT_APP' open_link = 'OPEN_LINK' @@ -111,6 +106,7 @@ class Type: use_mobile_app = 'USE_MOBILE_APP' video_annotation = 'VIDEO_ANNOTATION' video_call = 'VIDEO_CALL' + view_product = 'VIEW_PRODUCT' visit_pages_feed = 'VISIT_PAGES_FEED' watch_more = 'WATCH_MORE' watch_video = 'WATCH_VIDEO' diff --git a/facebook_business/adobjects/adcreativelinkdatacalltoactionvalue.py b/facebook_business/adobjects/adcreativelinkdatacalltoactionvalue.py index f69f908c1..c4f832577 100644 --- a/facebook_business/adobjects/adcreativelinkdatacalltoactionvalue.py +++ b/facebook_business/adobjects/adcreativelinkdatacalltoactionvalue.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativelinkdatachildattachment.py b/facebook_business/adobjects/adcreativelinkdatachildattachment.py index 143e3c157..a664cd7ef 100644 --- a/facebook_business/adobjects/adcreativelinkdatachildattachment.py +++ b/facebook_business/adobjects/adcreativelinkdatachildattachment.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativelinkdatacustomoverlayspec.py b/facebook_business/adobjects/adcreativelinkdatacustomoverlayspec.py new file mode 100644 index 000000000..12e70c95e --- /dev/null +++ b/facebook_business/adobjects/adcreativelinkdatacustomoverlayspec.py @@ -0,0 +1,110 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCreativeLinkDataCustomOverlaySpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeLinkDataCustomOverlaySpec, self).__init__() + self._isAdCreativeLinkDataCustomOverlaySpec = True + self._api = api + + class Field(AbstractObject.Field): + background_color = 'background_color' + float_with_margin = 'float_with_margin' + font = 'font' + option = 'option' + position = 'position' + render_with_icon = 'render_with_icon' + template = 'template' + text_color = 'text_color' + + class BackgroundColor: + background_000000 = 'background_000000' + background_0090ff = 'background_0090ff' + background_00af4c = 'background_00af4c' + background_595959 = 'background_595959' + background_755dde = 'background_755dde' + background_e50900 = 'background_e50900' + background_f23474 = 'background_f23474' + background_f78400 = 'background_f78400' + background_ffffff = 'background_ffffff' + + class Font: + droid_serif_regular = 'droid_serif_regular' + lato_regular = 'lato_regular' + noto_sans_regular = 'noto_sans_regular' + nunito_sans_bold = 'nunito_sans_bold' + open_sans_bold = 'open_sans_bold' + pt_serif_bold = 'pt_serif_bold' + roboto_condensed_regular = 'roboto_condensed_regular' + roboto_medium = 'roboto_medium' + + class Option: + bank_transfer = 'bank_transfer' + boleto = 'boleto' + cash_on_delivery = 'cash_on_delivery' + discount_with_boleto = 'discount_with_boleto' + fast_delivery = 'fast_delivery' + free_shipping = 'free_shipping' + home_delivery = 'home_delivery' + inventory = 'inventory' + pay_at_hotel = 'pay_at_hotel' + pay_on_arrival = 'pay_on_arrival' + + class Position: + bottom_left = 'bottom_left' + bottom_right = 'bottom_right' + top_left = 'top_left' + top_right = 'top_right' + + class Template: + pill_with_text = 'pill_with_text' + + class TextColor: + text_000000 = 'text_000000' + text_007ad0 = 'text_007ad0' + text_009c2a = 'text_009c2a' + text_646464 = 'text_646464' + text_755dde = 'text_755dde' + text_c91b00 = 'text_c91b00' + text_f23474 = 'text_f23474' + text_f78400 = 'text_f78400' + text_ffffff = 'text_ffffff' + + _field_types = { + 'background_color': 'BackgroundColor', + 'float_with_margin': 'bool', + 'font': 'Font', + 'option': 'Option', + 'position': 'Position', + 'render_with_icon': 'bool', + 'template': 'Template', + 'text_color': 'TextColor', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['BackgroundColor'] = AdCreativeLinkDataCustomOverlaySpec.BackgroundColor.__dict__.values() + field_enum_info['Font'] = AdCreativeLinkDataCustomOverlaySpec.Font.__dict__.values() + field_enum_info['Option'] = AdCreativeLinkDataCustomOverlaySpec.Option.__dict__.values() + field_enum_info['Position'] = AdCreativeLinkDataCustomOverlaySpec.Position.__dict__.values() + field_enum_info['Template'] = AdCreativeLinkDataCustomOverlaySpec.Template.__dict__.values() + field_enum_info['TextColor'] = AdCreativeLinkDataCustomOverlaySpec.TextColor.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativelinkdataimagelayerspec.py b/facebook_business/adobjects/adcreativelinkdataimagelayerspec.py index d21822ecf..cbc9f3d2a 100644 --- a/facebook_business/adobjects/adcreativelinkdataimagelayerspec.py +++ b/facebook_business/adobjects/adcreativelinkdataimagelayerspec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativelinkdataimageoverlayspec.py b/facebook_business/adobjects/adcreativelinkdataimageoverlayspec.py index 1c4dd43f3..024ec6846 100644 --- a/facebook_business/adobjects/adcreativelinkdataimageoverlayspec.py +++ b/facebook_business/adobjects/adcreativelinkdataimageoverlayspec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject @@ -84,6 +70,7 @@ class TextType: price = 'price' star_rating = 'star_rating' strikethrough_price = 'strikethrough_price' + sustainable = 'sustainable' class ThemeColor: background_000000_text_ffffff = 'background_000000_text_ffffff' diff --git a/facebook_business/adobjects/adcreativelinkdatamoment.py b/facebook_business/adobjects/adcreativelinkdatamoment.py new file mode 100644 index 000000000..c7140b5c7 --- /dev/null +++ b/facebook_business/adobjects/adcreativelinkdatamoment.py @@ -0,0 +1,48 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdCreativeLinkDataMoment( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdCreativeLinkDataMoment = True + super(AdCreativeLinkDataMoment, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + type = 'type' + + class Type: + fb_live_shopping = 'FB_LIVE_SHOPPING' + ig_drops = 'IG_DROPS' + ig_live_shopping = 'IG_LIVE_SHOPPING' + + _field_types = { + 'id': 'string', + 'type': 'Type', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Type'] = AdCreativeLinkDataMoment.Type.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativelinkdatasponsorshipinfospec.py b/facebook_business/adobjects/adcreativelinkdatasponsorshipinfospec.py index 41e08d12c..3b5139990 100644 --- a/facebook_business/adobjects/adcreativelinkdatasponsorshipinfospec.py +++ b/facebook_business/adobjects/adcreativelinkdatasponsorshipinfospec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativelinkdatatemplatevideospec.py b/facebook_business/adobjects/adcreativelinkdatatemplatevideospec.py index 17fbdbcb5..0a3c19666 100644 --- a/facebook_business/adobjects/adcreativelinkdatatemplatevideospec.py +++ b/facebook_business/adobjects/adcreativelinkdatatemplatevideospec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativemarketingmessagestructuredspec.py b/facebook_business/adobjects/adcreativemarketingmessagestructuredspec.py new file mode 100644 index 000000000..cc54ec4a5 --- /dev/null +++ b/facebook_business/adobjects/adcreativemarketingmessagestructuredspec.py @@ -0,0 +1,47 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCreativeMarketingMessageStructuredSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeMarketingMessageStructuredSpec, self).__init__() + self._isAdCreativeMarketingMessageStructuredSpec = True + self._api = api + + class Field(AbstractObject.Field): + buttons = 'buttons' + footer = 'footer' + greeting = 'greeting' + language = 'language' + referenced_adgroup_id = 'referenced_adgroup_id' + whats_app_business_phone_number_id = 'whats_app_business_phone_number_id' + + _field_types = { + 'buttons': 'list', + 'footer': 'string', + 'greeting': 'string', + 'language': 'string', + 'referenced_adgroup_id': 'string', + 'whats_app_business_phone_number_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativeobjectstoryspec.py b/facebook_business/adobjects/adcreativeobjectstoryspec.py index b393cb083..38c2d17da 100644 --- a/facebook_business/adobjects/adcreativeobjectstoryspec.py +++ b/facebook_business/adobjects/adcreativeobjectstoryspec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativeomnichannellinkspec.py b/facebook_business/adobjects/adcreativeomnichannellinkspec.py index e14e22ebe..7046d48cf 100644 --- a/facebook_business/adobjects/adcreativeomnichannellinkspec.py +++ b/facebook_business/adobjects/adcreativeomnichannellinkspec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativephotodata.py b/facebook_business/adobjects/adcreativephotodata.py index 8958650fc..882e5722e 100644 --- a/facebook_business/adobjects/adcreativephotodata.py +++ b/facebook_business/adobjects/adcreativephotodata.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativephotodatamediaelements.py b/facebook_business/adobjects/adcreativephotodatamediaelements.py index d628b9237..2f123dd50 100644 --- a/facebook_business/adobjects/adcreativephotodatamediaelements.py +++ b/facebook_business/adobjects/adcreativephotodatamediaelements.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativeplacedata.py b/facebook_business/adobjects/adcreativeplacedata.py index 9805c89fd..2a98e1371 100644 --- a/facebook_business/adobjects/adcreativeplacedata.py +++ b/facebook_business/adobjects/adcreativeplacedata.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativeplatformcustomization.py b/facebook_business/adobjects/adcreativeplatformcustomization.py index e236dcbb9..34f1d3512 100644 --- a/facebook_business/adobjects/adcreativeplatformcustomization.py +++ b/facebook_business/adobjects/adcreativeplatformcustomization.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativeportraitcustomizations.py b/facebook_business/adobjects/adcreativeportraitcustomizations.py index 729969ef3..1e6d1503f 100644 --- a/facebook_business/adobjects/adcreativeportraitcustomizations.py +++ b/facebook_business/adobjects/adcreativeportraitcustomizations.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativepostclickconfiguration.py b/facebook_business/adobjects/adcreativepostclickconfiguration.py index 8a736f5a5..937e52004 100644 --- a/facebook_business/adobjects/adcreativepostclickconfiguration.py +++ b/facebook_business/adobjects/adcreativepostclickconfiguration.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativepromotionmetadataspec.py b/facebook_business/adobjects/adcreativepromotionmetadataspec.py new file mode 100644 index 000000000..fad3d9030 --- /dev/null +++ b/facebook_business/adobjects/adcreativepromotionmetadataspec.py @@ -0,0 +1,52 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdCreativePromotionMetadataSpec( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdCreativePromotionMetadataSpec = True + super(AdCreativePromotionMetadataSpec, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + end_date = 'end_date' + id = 'id' + promotion_source = 'promotion_source' + promotion_type = 'promotion_type' + promotion_value = 'promotion_value' + required_code = 'required_code' + start_date = 'start_date' + + _field_types = { + 'end_date': 'int', + 'id': 'string', + 'promotion_source': 'string', + 'promotion_type': 'string', + 'promotion_value': 'float', + 'required_code': 'string', + 'start_date': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativerecommendersettings.py b/facebook_business/adobjects/adcreativerecommendersettings.py index 365b31918..2eb3e1f8a 100644 --- a/facebook_business/adobjects/adcreativerecommendersettings.py +++ b/facebook_business/adobjects/adcreativerecommendersettings.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativeregionalregulationdisclaimer.py b/facebook_business/adobjects/adcreativeregionalregulationdisclaimer.py new file mode 100644 index 000000000..394fd7689 --- /dev/null +++ b/facebook_business/adobjects/adcreativeregionalregulationdisclaimer.py @@ -0,0 +1,36 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCreativeRegionalRegulationDisclaimer( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeRegionalRegulationDisclaimer, self).__init__() + self._isAdCreativeRegionalRegulationDisclaimer = True + self._api = api + + class Field(AbstractObject.Field): + pass + + _field_types = { + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativerewardinfo.py b/facebook_business/adobjects/adcreativerewardinfo.py new file mode 100644 index 000000000..5a744efc1 --- /dev/null +++ b/facebook_business/adobjects/adcreativerewardinfo.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCreativeRewardInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeRewardInfo, self).__init__() + self._isAdCreativeRewardInfo = True + self._api = api + + class Field(AbstractObject.Field): + reward_offer_id = 'reward_offer_id' + reward_program_id = 'reward_program_id' + + _field_types = { + 'reward_offer_id': 'string', + 'reward_program_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativeshopspec.py b/facebook_business/adobjects/adcreativeshopspec.py new file mode 100644 index 000000000..ab587a902 --- /dev/null +++ b/facebook_business/adobjects/adcreativeshopspec.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCreativeShopSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeShopSpec, self).__init__() + self._isAdCreativeShopSpec = True + self._api = api + + class Field(AbstractObject.Field): + collection_id = 'collection_id' + landing_view = 'landing_view' + shop_id = 'shop_id' + + _field_types = { + 'collection_id': 'string', + 'landing_view': 'string', + 'shop_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativesitelinksspec.py b/facebook_business/adobjects/adcreativesitelinksspec.py new file mode 100644 index 000000000..1c9db272c --- /dev/null +++ b/facebook_business/adobjects/adcreativesitelinksspec.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCreativeSiteLinksSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeSiteLinksSpec, self).__init__() + self._isAdCreativeSiteLinksSpec = True + self._api = api + + class Field(AbstractObject.Field): + site_link_title = 'site_link_title' + site_link_url = 'site_link_url' + + _field_types = { + 'site_link_title': 'string', + 'site_link_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativesourcingspec.py b/facebook_business/adobjects/adcreativesourcingspec.py new file mode 100644 index 000000000..3357d36c9 --- /dev/null +++ b/facebook_business/adobjects/adcreativesourcingspec.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCreativeSourcingSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeSourcingSpec, self).__init__() + self._isAdCreativeSourcingSpec = True + self._api = api + + class Field(AbstractObject.Field): + associated_product_set_id = 'associated_product_set_id' + promotion_metadata_spec = 'promotion_metadata_spec' + site_links_spec = 'site_links_spec' + source_url = 'source_url' + + _field_types = { + 'associated_product_set_id': 'string', + 'promotion_metadata_spec': 'list', + 'site_links_spec': 'list', + 'source_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativestaticfallbackspec.py b/facebook_business/adobjects/adcreativestaticfallbackspec.py index 32861ce82..a23e4badc 100644 --- a/facebook_business/adobjects/adcreativestaticfallbackspec.py +++ b/facebook_business/adobjects/adcreativestaticfallbackspec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativetemplateurlspec.py b/facebook_business/adobjects/adcreativetemplateurlspec.py index a31e08244..6fe93a233 100644 --- a/facebook_business/adobjects/adcreativetemplateurlspec.py +++ b/facebook_business/adobjects/adcreativetemplateurlspec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativetextdata.py b/facebook_business/adobjects/adcreativetextdata.py index 6f8a6c51e..7e9fb2227 100644 --- a/facebook_business/adobjects/adcreativetextdata.py +++ b/facebook_business/adobjects/adcreativetextdata.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativevideodata.py b/facebook_business/adobjects/adcreativevideodata.py index 0b5a5657a..05493d3a7 100644 --- a/facebook_business/adobjects/adcreativevideodata.py +++ b/facebook_business/adobjects/adcreativevideodata.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adcreativevideodatacustomoverlayspec.py b/facebook_business/adobjects/adcreativevideodatacustomoverlayspec.py new file mode 100644 index 000000000..f9926e87b --- /dev/null +++ b/facebook_business/adobjects/adcreativevideodatacustomoverlayspec.py @@ -0,0 +1,86 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCreativeVideoDataCustomOverlaySpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeVideoDataCustomOverlaySpec, self).__init__() + self._isAdCreativeVideoDataCustomOverlaySpec = True + self._api = api + + class Field(AbstractObject.Field): + background_color = 'background_color' + background_opacity = 'background_opacity' + duration = 'duration' + float_with_margin = 'float_with_margin' + full_width = 'full_width' + option = 'option' + position = 'position' + start = 'start' + template = 'template' + text_color = 'text_color' + + class BackgroundOpacity: + half = 'half' + solid = 'solid' + + class Option: + bank_transfer = 'bank_transfer' + boleto = 'boleto' + cash_on_delivery = 'cash_on_delivery' + discount_with_boleto = 'discount_with_boleto' + fast_delivery = 'fast_delivery' + free_shipping = 'free_shipping' + home_delivery = 'home_delivery' + inventory = 'inventory' + pay_at_hotel = 'pay_at_hotel' + pay_on_arrival = 'pay_on_arrival' + + class Position: + middle_center = 'middle_center' + middle_left = 'middle_left' + middle_right = 'middle_right' + top_center = 'top_center' + top_left = 'top_left' + top_right = 'top_right' + + class Template: + rectangle_with_text = 'rectangle_with_text' + + _field_types = { + 'background_color': 'string', + 'background_opacity': 'BackgroundOpacity', + 'duration': 'int', + 'float_with_margin': 'bool', + 'full_width': 'bool', + 'option': 'Option', + 'position': 'Position', + 'start': 'int', + 'template': 'Template', + 'text_color': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['BackgroundOpacity'] = AdCreativeVideoDataCustomOverlaySpec.BackgroundOpacity.__dict__.values() + field_enum_info['Option'] = AdCreativeVideoDataCustomOverlaySpec.Option.__dict__.values() + field_enum_info['Position'] = AdCreativeVideoDataCustomOverlaySpec.Position.__dict__.values() + field_enum_info['Template'] = AdCreativeVideoDataCustomOverlaySpec.Template.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativevideodatamediaelements.py b/facebook_business/adobjects/adcreativevideodatamediaelements.py new file mode 100644 index 000000000..f010f47f5 --- /dev/null +++ b/facebook_business/adobjects/adcreativevideodatamediaelements.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCreativeVideoDataMediaElements( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeVideoDataMediaElements, self).__init__() + self._isAdCreativeVideoDataMediaElements = True + self._api = api + + class Field(AbstractObject.Field): + element_id = 'element_id' + element_type = 'element_type' + + _field_types = { + 'element_id': 'string', + 'element_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcreativewhatsappchannelspec.py b/facebook_business/adobjects/adcreativewhatsappchannelspec.py new file mode 100644 index 000000000..5a8df73bc --- /dev/null +++ b/facebook_business/adobjects/adcreativewhatsappchannelspec.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdCreativeWhatsAppChannelSpec( + AbstractObject, +): + + def __init__(self, api=None): + super(AdCreativeWhatsAppChannelSpec, self).__init__() + self._isAdCreativeWhatsAppChannelSpec = True + self._api = api + + class Field(AbstractObject.Field): + channel_id = 'channel_id' + channel_url = 'channel_url' + + _field_types = { + 'channel_id': 'string', + 'channel_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcustomderivedmetrics.py b/facebook_business/adobjects/adcustomderivedmetrics.py new file mode 100644 index 000000000..64f5c1817 --- /dev/null +++ b/facebook_business/adobjects/adcustomderivedmetrics.py @@ -0,0 +1,102 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdCustomDerivedMetrics( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdCustomDerivedMetrics = True + super(AdCustomDerivedMetrics, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_account_id = 'ad_account_id' + business = 'business' + creation_time = 'creation_time' + creator = 'creator' + custom_derived_metric_type = 'custom_derived_metric_type' + deletion_time = 'deletion_time' + deletor = 'deletor' + description = 'description' + format_type = 'format_type' + formula = 'formula' + has_attribution_windows = 'has_attribution_windows' + has_inline_attribution_window = 'has_inline_attribution_window' + id = 'id' + name = 'name' + permission = 'permission' + saved_report_id = 'saved_report_id' + scope = 'scope' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdCustomDerivedMetrics, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'ad_account_id': 'string', + 'business': 'Business', + 'creation_time': 'datetime', + 'creator': 'Profile', + 'custom_derived_metric_type': 'string', + 'deletion_time': 'datetime', + 'deletor': 'Profile', + 'description': 'string', + 'format_type': 'string', + 'formula': 'string', + 'has_attribution_windows': 'bool', + 'has_inline_attribution_window': 'bool', + 'id': 'string', + 'name': 'string', + 'permission': 'string', + 'saved_report_id': 'string', + 'scope': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adcustomizationrulespec.py b/facebook_business/adobjects/adcustomizationrulespec.py index 59a7bffc6..c81de8a39 100644 --- a/facebook_business/adobjects/adcustomizationrulespec.py +++ b/facebook_business/adobjects/adcustomizationrulespec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/addefaultvalues.py b/facebook_business/adobjects/addefaultvalues.py new file mode 100644 index 000000000..5f7401f18 --- /dev/null +++ b/facebook_business/adobjects/addefaultvalues.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdDefaultValues( + AbstractObject, +): + + def __init__(self, api=None): + super(AdDefaultValues, self).__init__() + self._isAdDefaultValues = True + self._api = api + + class Field(AbstractObject.Field): + campaign_group = 'campaign_group' + + _field_types = { + 'campaign_group': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/addraft.py b/facebook_business/adobjects/addraft.py new file mode 100644 index 000000000..fad59d1ab --- /dev/null +++ b/facebook_business/adobjects/addraft.py @@ -0,0 +1,98 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdDraft( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdDraft = True + super(AdDraft, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account_id = 'account_id' + api_version = 'api_version' + async_request_set = 'async_request_set' + author_id = 'author_id' + created_by = 'created_by' + draft_version = 'draft_version' + id = 'id' + is_active = 'is_active' + name = 'name' + ownership_type = 'ownership_type' + publish_status = 'publish_status' + state = 'state' + summary = 'summary' + time_created = 'time_created' + time_updated = 'time_updated' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdDraft, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'account_id': 'string', + 'api_version': 'string', + 'async_request_set': 'AdAsyncRequestSet', + 'author_id': 'string', + 'created_by': 'string', + 'draft_version': 'string', + 'id': 'string', + 'is_active': 'bool', + 'name': 'string', + 'ownership_type': 'string', + 'publish_status': 'Object', + 'state': 'string', + 'summary': 'string', + 'time_created': 'datetime', + 'time_updated': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/addynamiccreative.py b/facebook_business/adobjects/addynamiccreative.py index 6b8725da7..585241d77 100644 --- a/facebook_business/adobjects/addynamiccreative.py +++ b/facebook_business/adobjects/addynamiccreative.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adentitytargetspend.py b/facebook_business/adobjects/adentitytargetspend.py index b8913aaee..4ce69b626 100644 --- a/facebook_business/adobjects/adentitytargetspend.py +++ b/facebook_business/adobjects/adentitytargetspend.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adexportpreset.py b/facebook_business/adobjects/adexportpreset.py new file mode 100644 index 000000000..088b17678 --- /dev/null +++ b/facebook_business/adobjects/adexportpreset.py @@ -0,0 +1,80 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdExportPreset( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdExportPreset = True + super(AdExportPreset, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + created_time = 'created_time' + fields = 'fields' + id = 'id' + name = 'name' + owner = 'owner' + updated_time = 'updated_time' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdExportPreset, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'created_time': 'datetime', + 'fields': 'list', + 'id': 'string', + 'name': 'string', + 'owner': 'User', + 'updated_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adgroupfacebookfeedback.py b/facebook_business/adobjects/adgroupfacebookfeedback.py new file mode 100644 index 000000000..bb35c2f4d --- /dev/null +++ b/facebook_business/adobjects/adgroupfacebookfeedback.py @@ -0,0 +1,75 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdgroupFacebookFeedback( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdgroupFacebookFeedback = True + super(AdgroupFacebookFeedback, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + preview = 'preview' + + def get_comments(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.comment import Comment + param_types = { + 'order': 'order_enum', + } + enums = { + 'order_enum': Comment.Order.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/comments', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Comment, + api_type='EDGE', + response_parser=ObjectParser(target_class=Comment, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'preview': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adgroupissuesinfo.py b/facebook_business/adobjects/adgroupissuesinfo.py index 7e049e6d2..32bd11ae1 100644 --- a/facebook_business/adobjects/adgroupissuesinfo.py +++ b/facebook_business/adobjects/adgroupissuesinfo.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adgroupmetadata.py b/facebook_business/adobjects/adgroupmetadata.py index 9115f5223..2734e0ac5 100644 --- a/facebook_business/adobjects/adgroupmetadata.py +++ b/facebook_business/adobjects/adgroupmetadata.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adgroupplacementspecificreviewfeedback.py b/facebook_business/adobjects/adgroupplacementspecificreviewfeedback.py index c86e4f02d..99b8209f9 100644 --- a/facebook_business/adobjects/adgroupplacementspecificreviewfeedback.py +++ b/facebook_business/adobjects/adgroupplacementspecificreviewfeedback.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -46,6 +32,7 @@ class Field(AbstractObject.Field): bsg = 'bsg' city_community = 'city_community' commerce = 'commerce' + compromise = 'compromise' daily_deals = 'daily_deals' daily_deals_legacy = 'daily_deals_legacy' dpa = 'dpa' @@ -84,6 +71,7 @@ class Field(AbstractObject.Field): 'bsg': 'map', 'city_community': 'map', 'commerce': 'map', + 'compromise': 'map', 'daily_deals': 'map', 'daily_deals_legacy': 'map', 'dpa': 'map', diff --git a/facebook_business/adobjects/adgroupreviewfeedback.py b/facebook_business/adobjects/adgroupreviewfeedback.py index 359130a4a..aa6dfe029 100644 --- a/facebook_business/adobjects/adgroupreviewfeedback.py +++ b/facebook_business/adobjects/adgroupreviewfeedback.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adimage.py b/facebook_business/adobjects/adimage.py index 9bf773da2..27db9dd0e 100644 --- a/facebook_business/adobjects/adimage.py +++ b/facebook_business/adobjects/adimage.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -127,7 +113,7 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No 'url': 'string', 'url_128': 'string', 'width': 'unsigned int', - 'bytes': 'Object', + 'bytes': 'string', 'copy_from': 'Object', 'filename': 'file' } diff --git a/facebook_business/adobjects/adjacentcontentdeliveryreport.py b/facebook_business/adobjects/adjacentcontentdeliveryreport.py new file mode 100644 index 000000000..6808fc335 --- /dev/null +++ b/facebook_business/adobjects/adjacentcontentdeliveryreport.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdjacentContentDeliveryReport( + AbstractObject, +): + + def __init__(self, api=None): + super(AdjacentContentDeliveryReport, self).__init__() + self._isAdjacentContentDeliveryReport = True + self._api = api + + class Field(AbstractObject.Field): + content = 'content' + + _field_types = { + 'content': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adkeywords.py b/facebook_business/adobjects/adkeywords.py index 75eee89ba..ac578b698 100644 --- a/facebook_business/adobjects/adkeywords.py +++ b/facebook_business/adobjects/adkeywords.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adkeywordstats.py b/facebook_business/adobjects/adkeywordstats.py new file mode 100644 index 000000000..b2ce33464 --- /dev/null +++ b/facebook_business/adobjects/adkeywordstats.py @@ -0,0 +1,83 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdKeywordStats( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdKeywordStats = True + super(AdKeywordStats, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + actions = 'actions' + clicks = 'clicks' + cost_per_total_action = 'cost_per_total_action' + cost_per_unique_click = 'cost_per_unique_click' + cpc = 'cpc' + cpm = 'cpm' + cpp = 'cpp' + ctr = 'ctr' + frequency = 'frequency' + id = 'id' + impressions = 'impressions' + name = 'name' + reach = 'reach' + spend = 'spend' + total_actions = 'total_actions' + total_unique_actions = 'total_unique_actions' + unique_actions = 'unique_actions' + unique_clicks = 'unique_clicks' + unique_ctr = 'unique_ctr' + unique_impressions = 'unique_impressions' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'keywordstats' + + _field_types = { + 'actions': 'list', + 'clicks': 'unsigned int', + 'cost_per_total_action': 'float', + 'cost_per_unique_click': 'float', + 'cpc': 'float', + 'cpm': 'float', + 'cpp': 'float', + 'ctr': 'float', + 'frequency': 'float', + 'id': 'string', + 'impressions': 'unsigned int', + 'name': 'string', + 'reach': 'unsigned int', + 'spend': 'float', + 'total_actions': 'unsigned int', + 'total_unique_actions': 'unsigned int', + 'unique_actions': 'list', + 'unique_clicks': 'unsigned int', + 'unique_ctr': 'float', + 'unique_impressions': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adkpishift.py b/facebook_business/adobjects/adkpishift.py new file mode 100644 index 000000000..cb5682d57 --- /dev/null +++ b/facebook_business/adobjects/adkpishift.py @@ -0,0 +1,47 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdKpiShift( + AbstractObject, +): + + def __init__(self, api=None): + super(AdKpiShift, self).__init__() + self._isAdKpiShift = True + self._api = api + + class Field(AbstractObject.Field): + ad_set = 'ad_set' + cost_per_result_shift = 'cost_per_result_shift' + enough_effective_days = 'enough_effective_days' + result_indicator = 'result_indicator' + result_shift = 'result_shift' + spend_shift = 'spend_shift' + + _field_types = { + 'ad_set': 'AdSet', + 'cost_per_result_shift': 'float', + 'enough_effective_days': 'bool', + 'result_indicator': 'string', + 'result_shift': 'float', + 'spend_shift': 'float', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adlabel.py b/facebook_business/adobjects/adlabel.py index 14140d924..fb593315d 100644 --- a/facebook_business/adobjects/adlabel.py +++ b/facebook_business/adobjects/adlabel.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/adlightadgroup.py b/facebook_business/adobjects/adlightadgroup.py new file mode 100644 index 000000000..ab4cb84af --- /dev/null +++ b/facebook_business/adobjects/adlightadgroup.py @@ -0,0 +1,72 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdLightAdgroup( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdLightAdgroup = True + super(AdLightAdgroup, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + adset_id = 'adset_id' + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdLightAdgroup, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'adset_id': 'string', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adlightcampaign.py b/facebook_business/adobjects/adlightcampaign.py new file mode 100644 index 000000000..06d689d67 --- /dev/null +++ b/facebook_business/adobjects/adlightcampaign.py @@ -0,0 +1,72 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdLightCampaign( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdLightCampaign = True + super(AdLightCampaign, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + campaign_id = 'campaign_id' + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdLightCampaign, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'campaign_id': 'string', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adlightcampaigngroup.py b/facebook_business/adobjects/adlightcampaigngroup.py new file mode 100644 index 000000000..73e60e044 --- /dev/null +++ b/facebook_business/adobjects/adlightcampaigngroup.py @@ -0,0 +1,70 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdLightCampaignGroup( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdLightCampaignGroup = True + super(AdLightCampaignGroup, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdLightCampaignGroup, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adlimitsenforcementdata.py b/facebook_business/adobjects/adlimitsenforcementdata.py new file mode 100644 index 000000000..e11907848 --- /dev/null +++ b/facebook_business/adobjects/adlimitsenforcementdata.py @@ -0,0 +1,47 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdLimitsEnforcementData( + AbstractObject, +): + + def __init__(self, api=None): + super(AdLimitsEnforcementData, self).__init__() + self._isAdLimitsEnforcementData = True + self._api = api + + class Field(AbstractObject.Field): + ad_limit_on_page = 'ad_limit_on_page' + ad_limit_on_scope = 'ad_limit_on_scope' + ad_volume_on_page = 'ad_volume_on_page' + ad_volume_on_scope = 'ad_volume_on_scope' + is_admin = 'is_admin' + page_name = 'page_name' + + _field_types = { + 'ad_limit_on_page': 'int', + 'ad_limit_on_scope': 'int', + 'ad_volume_on_page': 'int', + 'ad_volume_on_scope': 'int', + 'is_admin': 'bool', + 'page_name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adlimitsetting.py b/facebook_business/adobjects/adlimitsetting.py new file mode 100644 index 000000000..1eb72112e --- /dev/null +++ b/facebook_business/adobjects/adlimitsetting.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdLimitSetting( + AbstractObject, +): + + def __init__(self, api=None): + super(AdLimitSetting, self).__init__() + self._isAdLimitSetting = True + self._api = api + + class Field(AbstractObject.Field): + limit_allocation_by_page_advertisers = 'limit_allocation_by_page_advertisers' + + _field_types = { + 'limit_allocation_by_page_advertisers': 'list>', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/admonetizationproperty.py b/facebook_business/adobjects/admonetizationproperty.py index ad3960797..a69a3d9b4 100644 --- a/facebook_business/adobjects/admonetizationproperty.py +++ b/facebook_business/adobjects/admonetizationproperty.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/adnetworkanalyticsasyncqueryexport.py b/facebook_business/adobjects/adnetworkanalyticsasyncqueryexport.py new file mode 100644 index 000000000..ac4234d28 --- /dev/null +++ b/facebook_business/adobjects/adnetworkanalyticsasyncqueryexport.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdNetworkAnalyticsAsyncQueryExport( + AbstractObject, +): + + def __init__(self, api=None): + super(AdNetworkAnalyticsAsyncQueryExport, self).__init__() + self._isAdNetworkAnalyticsAsyncQueryExport = True + self._api = api + + class Field(AbstractObject.Field): + error = 'error' + export_link = 'export_link' + query_id = 'query_id' + status = 'status' + + _field_types = { + 'error': 'Object', + 'export_link': 'string', + 'query_id': 'string', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adnetworkanalyticsasyncqueryresult.py b/facebook_business/adobjects/adnetworkanalyticsasyncqueryresult.py index de907c22d..7fd82e398 100644 --- a/facebook_business/adobjects/adnetworkanalyticsasyncqueryresult.py +++ b/facebook_business/adobjects/adnetworkanalyticsasyncqueryresult.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adnetworkanalyticssyncqueryresult.py b/facebook_business/adobjects/adnetworkanalyticssyncqueryresult.py index f5f45d5cc..d39b37faa 100644 --- a/facebook_business/adobjects/adnetworkanalyticssyncqueryresult.py +++ b/facebook_business/adobjects/adnetworkanalyticssyncqueryresult.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adoptablepet.py b/facebook_business/adobjects/adoptablepet.py new file mode 100644 index 000000000..e30b5d5fd --- /dev/null +++ b/facebook_business/adobjects/adoptablepet.py @@ -0,0 +1,233 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdoptablePet( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdoptablePet = True + super(AdoptablePet, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + adoptable_pet_id = 'adoptable_pet_id' + adoption_application_form_url = 'adoption_application_form_url' + age_bucket = 'age_bucket' + animal_type = 'animal_type' + applinks = 'applinks' + availability = 'availability' + breed = 'breed' + category_specific_fields = 'category_specific_fields' + coat_length = 'coat_length' + color = 'color' + currency = 'currency' + description = 'description' + features = 'features' + gender = 'gender' + id = 'id' + image_fetch_status = 'image_fetch_status' + images = 'images' + name = 'name' + price = 'price' + sanitized_images = 'sanitized_images' + secondary_color = 'secondary_color' + shelter_email = 'shelter_email' + shelter_name = 'shelter_name' + shelter_page_id = 'shelter_page_id' + shelter_phone = 'shelter_phone' + size = 'size' + tertiary_color = 'tertiary_color' + url = 'url' + visibility = 'visibility' + + class ImageFetchStatus: + direct_upload = 'DIRECT_UPLOAD' + fetched = 'FETCHED' + fetch_failed = 'FETCH_FAILED' + no_status = 'NO_STATUS' + outdated = 'OUTDATED' + partial_fetch = 'PARTIAL_FETCH' + + class Visibility: + published = 'PUBLISHED' + staging = 'STAGING' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdoptablePet, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_augmented_realities_metadata(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.dynamicarmetadata import DynamicARMetadata + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/augmented_realities_metadata', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=DynamicARMetadata, + api_type='EDGE', + response_parser=ObjectParser(target_class=DynamicARMetadata, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_channels_to_integrity_status(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.catalogitemchannelstointegritystatus import CatalogItemChannelsToIntegrityStatus + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/channels_to_integrity_status', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CatalogItemChannelsToIntegrityStatus, + api_type='EDGE', + response_parser=ObjectParser(target_class=CatalogItemChannelsToIntegrityStatus, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_videos_metadata(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.dynamicvideometadata import DynamicVideoMetadata + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/videos_metadata', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=DynamicVideoMetadata, + api_type='EDGE', + response_parser=ObjectParser(target_class=DynamicVideoMetadata, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'adoptable_pet_id': 'string', + 'adoption_application_form_url': 'string', + 'age_bucket': 'string', + 'animal_type': 'string', + 'applinks': 'CatalogItemAppLinks', + 'availability': 'string', + 'breed': 'string', + 'category_specific_fields': 'CatalogSubVerticalList', + 'coat_length': 'string', + 'color': 'string', + 'currency': 'string', + 'description': 'string', + 'features': 'list', + 'gender': 'string', + 'id': 'string', + 'image_fetch_status': 'ImageFetchStatus', + 'images': 'list', + 'name': 'string', + 'price': 'string', + 'sanitized_images': 'list', + 'secondary_color': 'string', + 'shelter_email': 'string', + 'shelter_name': 'string', + 'shelter_page_id': 'Page', + 'shelter_phone': 'string', + 'size': 'string', + 'tertiary_color': 'string', + 'url': 'string', + 'visibility': 'Visibility', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ImageFetchStatus'] = AdoptablePet.ImageFetchStatus.__dict__.values() + field_enum_info['Visibility'] = AdoptablePet.Visibility.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/adplacement.py b/facebook_business/adobjects/adplacement.py index 596b8b0db..e232685ac 100644 --- a/facebook_business/adobjects/adplacement.py +++ b/facebook_business/adobjects/adplacement.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/adplacepageset.py b/facebook_business/adobjects/adplacepageset.py index 5e31fdc94..4d52a0e2e 100644 --- a/facebook_business/adobjects/adplacepageset.py +++ b/facebook_business/adobjects/adplacepageset.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/adplacepagesetmetadata.py b/facebook_business/adobjects/adplacepagesetmetadata.py index daea72407..8f51ee67f 100644 --- a/facebook_business/adobjects/adplacepagesetmetadata.py +++ b/facebook_business/adobjects/adplacepagesetmetadata.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adpreview.py b/facebook_business/adobjects/adpreview.py index ebb3dcfa9..db75ff72e 100644 --- a/facebook_business/adobjects/adpreview.py +++ b/facebook_business/adobjects/adpreview.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.helpers.adpreviewmixin import AdPreviewMixin @@ -50,6 +36,9 @@ class AdFormat: audience_network_rewarded_video = 'AUDIENCE_NETWORK_REWARDED_VIDEO' biz_disco_feed_mobile = 'BIZ_DISCO_FEED_MOBILE' desktop_feed_standard = 'DESKTOP_FEED_STANDARD' + facebook_profile_feed_desktop = 'FACEBOOK_PROFILE_FEED_DESKTOP' + facebook_profile_feed_mobile = 'FACEBOOK_PROFILE_FEED_MOBILE' + facebook_profile_reels_mobile = 'FACEBOOK_PROFILE_REELS_MOBILE' facebook_reels_banner = 'FACEBOOK_REELS_BANNER' facebook_reels_banner_desktop = 'FACEBOOK_REELS_BANNER_DESKTOP' facebook_reels_mobile = 'FACEBOOK_REELS_MOBILE' @@ -62,22 +51,28 @@ class AdFormat: instagram_explore_immersive = 'INSTAGRAM_EXPLORE_IMMERSIVE' instagram_feed_web = 'INSTAGRAM_FEED_WEB' instagram_feed_web_m_site = 'INSTAGRAM_FEED_WEB_M_SITE' + instagram_lead_gen_multi_submit_ads = 'INSTAGRAM_LEAD_GEN_MULTI_SUBMIT_ADS' instagram_profile_feed = 'INSTAGRAM_PROFILE_FEED' + instagram_profile_reels = 'INSTAGRAM_PROFILE_REELS' instagram_reels = 'INSTAGRAM_REELS' instagram_reels_overlay = 'INSTAGRAM_REELS_OVERLAY' instagram_search_chain = 'INSTAGRAM_SEARCH_CHAIN' instagram_search_grid = 'INSTAGRAM_SEARCH_GRID' instagram_standard = 'INSTAGRAM_STANDARD' instagram_story = 'INSTAGRAM_STORY' - instagram_story_camera_tray = 'INSTAGRAM_STORY_CAMERA_TRAY' + instagram_story_effect_tray = 'INSTAGRAM_STORY_EFFECT_TRAY' instagram_story_web = 'INSTAGRAM_STORY_WEB' instagram_story_web_m_site = 'INSTAGRAM_STORY_WEB_M_SITE' instant_article_recirculation_ad = 'INSTANT_ARTICLE_RECIRCULATION_AD' instant_article_standard = 'INSTANT_ARTICLE_STANDARD' instream_banner_desktop = 'INSTREAM_BANNER_DESKTOP' + instream_banner_fullscreen_mobile = 'INSTREAM_BANNER_FULLSCREEN_MOBILE' + instream_banner_immersive_mobile = 'INSTREAM_BANNER_IMMERSIVE_MOBILE' instream_banner_mobile = 'INSTREAM_BANNER_MOBILE' instream_video_desktop = 'INSTREAM_VIDEO_DESKTOP' + instream_video_fullscreen_mobile = 'INSTREAM_VIDEO_FULLSCREEN_MOBILE' instream_video_image = 'INSTREAM_VIDEO_IMAGE' + instream_video_immersive_mobile = 'INSTREAM_VIDEO_IMMERSIVE_MOBILE' instream_video_mobile = 'INSTREAM_VIDEO_MOBILE' job_browser_desktop = 'JOB_BROWSER_DESKTOP' job_browser_mobile = 'JOB_BROWSER_MOBILE' @@ -93,12 +88,16 @@ class AdFormat: mobile_native = 'MOBILE_NATIVE' right_column_standard = 'RIGHT_COLUMN_STANDARD' suggested_video_desktop = 'SUGGESTED_VIDEO_DESKTOP' + suggested_video_fullscreen_mobile = 'SUGGESTED_VIDEO_FULLSCREEN_MOBILE' + suggested_video_immersive_mobile = 'SUGGESTED_VIDEO_IMMERSIVE_MOBILE' suggested_video_mobile = 'SUGGESTED_VIDEO_MOBILE' watch_feed_home = 'WATCH_FEED_HOME' watch_feed_mobile = 'WATCH_FEED_MOBILE' class CreativeFeature: + product_metadata_automation = 'product_metadata_automation' profile_card = 'profile_card' + standard_enhancements_catalog = 'standard_enhancements_catalog' class RenderType: fallback = 'FALLBACK' diff --git a/facebook_business/adobjects/adpromotedobject.py b/facebook_business/adobjects/adpromotedobject.py index 457deaf35..e4e70e2ff 100644 --- a/facebook_business/adobjects/adpromotedobject.py +++ b/facebook_business/adobjects/adpromotedobject.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -49,6 +35,7 @@ class Field(AbstractObject.Field): object_store_url = 'object_store_url' offer_id = 'offer_id' offline_conversion_data_set_id = 'offline_conversion_data_set_id' + offsite_conversion_event_id = 'offsite_conversion_event_id' omnichannel_object = 'omnichannel_object' page_id = 'page_id' pixel_aggregation_rule = 'pixel_aggregation_rule' @@ -58,14 +45,17 @@ class Field(AbstractObject.Field): place_page_set_id = 'place_page_set_id' product_catalog_id = 'product_catalog_id' product_item_id = 'product_item_id' + product_set = 'product_set' product_set_id = 'product_set_id' retention_days = 'retention_days' + whatsapp_phone_number = 'whatsapp_phone_number' class CustomEventType: achievement_unlocked = 'ACHIEVEMENT_UNLOCKED' add_payment_info = 'ADD_PAYMENT_INFO' add_to_cart = 'ADD_TO_CART' add_to_wishlist = 'ADD_TO_WISHLIST' + ad_impression = 'AD_IMPRESSION' complete_registration = 'COMPLETE_REGISTRATION' contact = 'CONTACT' content_view = 'CONTENT_VIEW' @@ -103,6 +93,7 @@ class CustomEventType: 'object_store_url': 'string', 'offer_id': 'string', 'offline_conversion_data_set_id': 'string', + 'offsite_conversion_event_id': 'string', 'omnichannel_object': 'Object', 'page_id': 'string', 'pixel_aggregation_rule': 'string', @@ -112,8 +103,10 @@ class CustomEventType: 'place_page_set_id': 'string', 'product_catalog_id': 'string', 'product_item_id': 'string', + 'product_set': 'ProductSet', 'product_set_id': 'string', 'retention_days': 'string', + 'whatsapp_phone_number': 'string', } @classmethod def _get_field_enum_info(cls): diff --git a/facebook_business/adobjects/adproposal.py b/facebook_business/adobjects/adproposal.py new file mode 100644 index 000000000..31da3bac1 --- /dev/null +++ b/facebook_business/adobjects/adproposal.py @@ -0,0 +1,106 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdProposal( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdProposal = True + super(AdProposal, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_proposal_type_name = 'ad_proposal_type_name' + adaccount = 'adaccount' + creation_time = 'creation_time' + creator = 'creator' + delivery_interface = 'delivery_interface' + expiration_time = 'expiration_time' + has_conflict = 'has_conflict' + id = 'id' + kpi_metric = 'kpi_metric' + message = 'message' + name = 'name' + proposal_dts_template = 'proposal_dts_template' + proposal_template_name = 'proposal_template_name' + recommendation = 'recommendation' + review_time = 'review_time' + reviewed_by = 'reviewed_by' + send_time = 'send_time' + status = 'status' + use_testing = 'use_testing' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdProposal, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'ad_proposal_type_name': 'string', + 'adaccount': 'AdAccount', + 'creation_time': 'datetime', + 'creator': 'User', + 'delivery_interface': 'string', + 'expiration_time': 'datetime', + 'has_conflict': 'bool', + 'id': 'string', + 'kpi_metric': 'string', + 'message': 'string', + 'name': 'string', + 'proposal_dts_template': 'string', + 'proposal_template_name': 'string', + 'recommendation': 'string', + 'review_time': 'datetime', + 'reviewed_by': 'User', + 'send_time': 'datetime', + 'status': 'string', + 'use_testing': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adrecommendation.py b/facebook_business/adobjects/adrecommendation.py index 337d61683..0318ce216 100644 --- a/facebook_business/adobjects/adrecommendation.py +++ b/facebook_business/adobjects/adrecommendation.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -45,6 +31,7 @@ class Field(AbstractObject.Field): message = 'message' recommendation_data = 'recommendation_data' title = 'title' + value = 'value' class Confidence: high = 'HIGH' @@ -64,6 +51,7 @@ class Importance: 'message': 'string', 'recommendation_data': 'AdRecommendationData', 'title': 'string', + 'value': 'string', } @classmethod def _get_field_enum_info(cls): diff --git a/facebook_business/adobjects/adrecommendationdata.py b/facebook_business/adobjects/adrecommendationdata.py index 4921390a0..c5caf6c22 100644 --- a/facebook_business/adobjects/adrecommendationdata.py +++ b/facebook_business/adobjects/adrecommendationdata.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adreportrun.py b/facebook_business/adobjects/adreportrun.py index 15336d043..a000c698f 100644 --- a/facebook_business/adobjects/adreportrun.py +++ b/facebook_business/adobjects/adreportrun.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -183,8 +169,8 @@ def get_insights(self, fields=None, params=None, is_async=False, batch=None, suc 'summary': 'list', 'summary_action_breakdowns': 'list', 'time_increment': 'string', - 'time_range': 'Object', - 'time_ranges': 'list', + 'time_range': 'map', + 'time_ranges': 'list', 'use_account_attribution_setting': 'bool', 'use_unified_attribution_setting': 'bool', } diff --git a/facebook_business/adobjects/adrule.py b/facebook_business/adobjects/adrule.py index 01fbbe343..daf180c6c 100644 --- a/facebook_business/adobjects/adrule.py +++ b/facebook_business/adobjects/adrule.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -74,6 +60,8 @@ class UiCreationSource: am_rule_landing_page_banner = 'AM_RULE_LANDING_PAGE_BANNER' am_syd_resolution_flow = 'AM_SYD_RESOLUTION_FLOW' am_syd_resolution_flow_modal = 'AM_SYD_RESOLUTION_FLOW_MODAL' + am_table_delivery_column_popover = 'AM_TABLE_DELIVERY_COLUMN_POPOVER' + am_table_toggle_popover = 'AM_TABLE_TOGGLE_POPOVER' am_toolbar_create_rule_dropdown = 'AM_TOOLBAR_CREATE_RULE_DROPDOWN' pe_campaign_structure_menu = 'PE_CAMPAIGN_STRUCTURE_MENU' pe_editor_card = 'PE_EDITOR_CARD' diff --git a/facebook_business/adobjects/adruleevaluationspec.py b/facebook_business/adobjects/adruleevaluationspec.py index 651de7a1c..c0356a86a 100644 --- a/facebook_business/adobjects/adruleevaluationspec.py +++ b/facebook_business/adobjects/adruleevaluationspec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/adruleexecutionoptions.py b/facebook_business/adobjects/adruleexecutionoptions.py index 37d907382..48bbaeffe 100644 --- a/facebook_business/adobjects/adruleexecutionoptions.py +++ b/facebook_business/adobjects/adruleexecutionoptions.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adruleexecutionspec.py b/facebook_business/adobjects/adruleexecutionspec.py index d7d411c66..be4366be1 100644 --- a/facebook_business/adobjects/adruleexecutionspec.py +++ b/facebook_business/adobjects/adruleexecutionspec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -53,6 +39,7 @@ class ExecutionType: change_bid = 'CHANGE_BID' change_budget = 'CHANGE_BUDGET' change_campaign_budget = 'CHANGE_CAMPAIGN_BUDGET' + dco = 'DCO' increase_radius = 'INCREASE_RADIUS' notification = 'NOTIFICATION' pause = 'PAUSE' diff --git a/facebook_business/adobjects/adrulefilters.py b/facebook_business/adobjects/adrulefilters.py index 808f2323c..7313a8a67 100644 --- a/facebook_business/adobjects/adrulefilters.py +++ b/facebook_business/adobjects/adrulefilters.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adrulehistory.py b/facebook_business/adobjects/adrulehistory.py index d9b215525..c780e3272 100644 --- a/facebook_business/adobjects/adrulehistory.py +++ b/facebook_business/adobjects/adrulehistory.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -52,7 +38,14 @@ class Action: changed_bid = 'CHANGED_BID' changed_budget = 'CHANGED_BUDGET' email = 'EMAIL' + enable_advantage_campaign_budget = 'ENABLE_ADVANTAGE_CAMPAIGN_BUDGET' + enable_advantage_plus_creative = 'ENABLE_ADVANTAGE_PLUS_CREATIVE' + enable_advantage_plus_placements = 'ENABLE_ADVANTAGE_PLUS_PLACEMENTS' enable_autoflow = 'ENABLE_AUTOFLOW' + enable_gen_uncrop = 'ENABLE_GEN_UNCROP' + enable_music = 'ENABLE_MUSIC' + enable_semantic_based_audience_expansion = 'ENABLE_SEMANTIC_BASED_AUDIENCE_EXPANSION' + enable_shops_ads = 'ENABLE_SHOPS_ADS' endpoint_pinged = 'ENDPOINT_PINGED' error = 'ERROR' facebook_notification_sent = 'FACEBOOK_NOTIFICATION_SENT' diff --git a/facebook_business/adobjects/adrulehistoryresult.py b/facebook_business/adobjects/adrulehistoryresult.py index dc3153b56..f18db77e6 100644 --- a/facebook_business/adobjects/adrulehistoryresult.py +++ b/facebook_business/adobjects/adrulehistoryresult.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adrulehistoryresultaction.py b/facebook_business/adobjects/adrulehistoryresultaction.py index 19f353d51..86c3d4d0f 100644 --- a/facebook_business/adobjects/adrulehistoryresultaction.py +++ b/facebook_business/adobjects/adrulehistoryresultaction.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adruleschedule.py b/facebook_business/adobjects/adruleschedule.py index 0a05aa1be..71e6fbff9 100644 --- a/facebook_business/adobjects/adruleschedule.py +++ b/facebook_business/adobjects/adruleschedule.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adruleschedulespec.py b/facebook_business/adobjects/adruleschedulespec.py index 50cd4ff82..6796c2f69 100644 --- a/facebook_business/adobjects/adruleschedulespec.py +++ b/facebook_business/adobjects/adruleschedulespec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adruletrigger.py b/facebook_business/adobjects/adruletrigger.py index e68efcf0c..f1ada1342 100644 --- a/facebook_business/adobjects/adruletrigger.py +++ b/facebook_business/adobjects/adruletrigger.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adsactionstats.py b/facebook_business/adobjects/adsactionstats.py index e9b558446..476acc172 100644 --- a/facebook_business/adobjects/adsactionstats.py +++ b/facebook_business/adobjects/adsactionstats.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -39,11 +25,26 @@ def __init__(self, api=None): class Field(AbstractObject.Field): field_1d_click = '1d_click' + field_1d_click_all_conversions = '1d_click_all_conversions' + field_1d_click_first_conversion = '1d_click_first_conversion' + field_1d_ev = '1d_ev' + field_1d_ev_all_conversions = '1d_ev_all_conversions' + field_1d_ev_first_conversion = '1d_ev_first_conversion' field_1d_view = '1d_view' + field_1d_view_all_conversions = '1d_view_all_conversions' + field_1d_view_first_conversion = '1d_view_first_conversion' field_28d_click = '28d_click' + field_28d_click_all_conversions = '28d_click_all_conversions' + field_28d_click_first_conversion = '28d_click_first_conversion' field_28d_view = '28d_view' + field_28d_view_all_conversions = '28d_view_all_conversions' + field_28d_view_first_conversion = '28d_view_first_conversion' field_7d_click = '7d_click' + field_7d_click_all_conversions = '7d_click_all_conversions' + field_7d_click_first_conversion = '7d_click_first_conversion' field_7d_view = '7d_view' + field_7d_view_all_conversions = '7d_view_all_conversions' + field_7d_view_first_conversion = '7d_view_first_conversion' action_brand = 'action_brand' action_canvas_component_id = 'action_canvas_component_id' action_canvas_component_name = 'action_canvas_component_name' @@ -67,16 +68,35 @@ class Field(AbstractObject.Field): interactive_component_sticker_id = 'interactive_component_sticker_id' interactive_component_sticker_response = 'interactive_component_sticker_response' skan_click = 'skan_click' + skan_click_second_postback = 'skan_click_second_postback' + skan_click_third_postback = 'skan_click_third_postback' skan_view = 'skan_view' + skan_view_second_postback = 'skan_view_second_postback' + skan_view_third_postback = 'skan_view_third_postback' value = 'value' _field_types = { '1d_click': 'string', + '1d_click_all_conversions': 'string', + '1d_click_first_conversion': 'string', + '1d_ev': 'string', + '1d_ev_all_conversions': 'string', + '1d_ev_first_conversion': 'string', '1d_view': 'string', + '1d_view_all_conversions': 'string', + '1d_view_first_conversion': 'string', '28d_click': 'string', + '28d_click_all_conversions': 'string', + '28d_click_first_conversion': 'string', '28d_view': 'string', + '28d_view_all_conversions': 'string', + '28d_view_first_conversion': 'string', '7d_click': 'string', + '7d_click_all_conversions': 'string', + '7d_click_first_conversion': 'string', '7d_view': 'string', + '7d_view_all_conversions': 'string', + '7d_view_first_conversion': 'string', 'action_brand': 'string', 'action_canvas_component_id': 'string', 'action_canvas_component_name': 'string', @@ -100,7 +120,11 @@ class Field(AbstractObject.Field): 'interactive_component_sticker_id': 'string', 'interactive_component_sticker_response': 'string', 'skan_click': 'string', + 'skan_click_second_postback': 'string', + 'skan_click_third_postback': 'string', 'skan_view': 'string', + 'skan_view_second_postback': 'string', + 'skan_view_third_postback': 'string', 'value': 'string', } @classmethod diff --git a/facebook_business/adobjects/adsanomalydetection.py b/facebook_business/adobjects/adsanomalydetection.py new file mode 100644 index 000000000..0a691159f --- /dev/null +++ b/facebook_business/adobjects/adsanomalydetection.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsAnomalyDetection( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsAnomalyDetection, self).__init__() + self._isAdsAnomalyDetection = True + self._api = api + + class Field(AbstractObject.Field): + anomaly_data = 'anomaly_data' + day = 'day' + + _field_types = { + 'anomaly_data': 'list', + 'day': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pagesavedfilter.py b/facebook_business/adobjects/adsavedkeywords.py similarity index 56% rename from facebook_business/adobjects/pagesavedfilter.py rename to facebook_business/adobjects/adsavedkeywords.py index f6f083542..1bbe1180c 100644 --- a/facebook_business/adobjects/pagesavedfilter.py +++ b/facebook_business/adobjects/adsavedkeywords.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -32,20 +18,20 @@ pull request for this class. """ -class PageSavedFilter( +class AdSavedKeywords( AbstractCrudObject, ): def __init__(self, fbid=None, parent_id=None, api=None): - self._isPageSavedFilter = True - super(PageSavedFilter, self).__init__(fbid, parent_id, api) + self._isAdSavedKeywords = True + super(AdSavedKeywords, self).__init__(fbid, parent_id, api) class Field(AbstractObject.Field): - display_name = 'display_name' - filters = 'filters' + account = 'account' id = 'id' - page_id = 'page_id' - section = 'section' + keywords = 'keywords' + name = 'name' + run_status = 'run_status' time_created = 'time_created' time_updated = 'time_updated' @@ -63,7 +49,7 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No endpoint='/', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=PageSavedFilter, + target_class=AdSavedKeywords, api_type='NODE', response_parser=ObjectParser(reuse_object=self), ) @@ -80,13 +66,13 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No return request.execute() _field_types = { - 'display_name': 'string', - 'filters': 'list', + 'account': 'AdAccount', 'id': 'string', - 'page_id': 'string', - 'section': 'string', - 'time_created': 'int', - 'time_updated': 'int', + 'keywords': 'AdKeywords', + 'name': 'string', + 'run_status': 'string', + 'time_created': 'datetime', + 'time_updated': 'datetime', } @classmethod def _get_field_enum_info(cls): diff --git a/facebook_business/adobjects/adsavedlocation.py b/facebook_business/adobjects/adsavedlocation.py new file mode 100644 index 000000000..6369fdd58 --- /dev/null +++ b/facebook_business/adobjects/adsavedlocation.py @@ -0,0 +1,88 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdSavedLocation( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdSavedLocation = True + super(AdSavedLocation, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + cities = 'cities' + countries = 'countries' + country_groups = 'country_groups' + custom_locations = 'custom_locations' + geo_markets = 'geo_markets' + id = 'id' + location_sentences = 'location_sentences' + name = 'name' + regions = 'regions' + zips = 'zips' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdSavedLocation, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'cities': 'list', + 'countries': 'list', + 'country_groups': 'list', + 'custom_locations': 'list', + 'geo_markets': 'list', + 'id': 'string', + 'location_sentences': 'list', + 'name': 'string', + 'regions': 'list', + 'zips': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adsavedreport.py b/facebook_business/adobjects/adsavedreport.py new file mode 100644 index 000000000..3d22e6f4a --- /dev/null +++ b/facebook_business/adobjects/adsavedreport.py @@ -0,0 +1,104 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdSavedReport( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdSavedReport = True + super(AdSavedReport, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + app_owner = 'app_owner' + breakdowns = 'breakdowns' + builtin_column_set = 'builtin_column_set' + creation_source = 'creation_source' + date_interval = 'date_interval' + date_preset = 'date_preset' + format_version = 'format_version' + id = 'id' + insights_section = 'insights_section' + is_shared_unread = 'is_shared_unread' + level = 'level' + name = 'name' + normalized_filter = 'normalized_filter' + sort = 'sort' + user_attribution_windows = 'user_attribution_windows' + user_columns = 'user_columns' + user_filter = 'user_filter' + user_owner = 'user_owner' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdSavedReport, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'app_owner': 'Application', + 'breakdowns': 'list', + 'builtin_column_set': 'string', + 'creation_source': 'string', + 'date_interval': 'Object', + 'date_preset': 'string', + 'format_version': 'int', + 'id': 'string', + 'insights_section': 'Object', + 'is_shared_unread': 'bool', + 'level': 'string', + 'name': 'string', + 'normalized_filter': 'list', + 'sort': 'list', + 'user_attribution_windows': 'list', + 'user_columns': 'list', + 'user_filter': 'list', + 'user_owner': 'User', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adsconversiongoal.py b/facebook_business/adobjects/adsconversiongoal.py new file mode 100644 index 000000000..dc90bb31b --- /dev/null +++ b/facebook_business/adobjects/adsconversiongoal.py @@ -0,0 +1,114 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdsConversionGoal( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdsConversionGoal = True + super(AdsConversionGoal, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_account_id = 'ad_account_id' + conversion_event_value_source = 'conversion_event_value_source' + description = 'description' + goal_creation_method = 'goal_creation_method' + id = 'id' + name = 'name' + performance_goal = 'performance_goal' + update_status = 'update_status' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsConversionGoal, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_conversion_events(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/conversion_events', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'ad_account_id': 'string', + 'conversion_event_value_source': 'string', + 'description': 'string', + 'goal_creation_method': 'string', + 'id': 'string', + 'name': 'string', + 'performance_goal': 'string', + 'update_status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adscreationsavedstate.py b/facebook_business/adobjects/adscreationsavedstate.py new file mode 100644 index 000000000..045764789 --- /dev/null +++ b/facebook_business/adobjects/adscreationsavedstate.py @@ -0,0 +1,78 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdsCreationSavedState( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdsCreationSavedState = True + super(AdsCreationSavedState, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_account = 'ad_account' + id = 'id' + serialized_store_data = 'serialized_store_data' + time_updated = 'time_updated' + user = 'user' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsCreationSavedState, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'ad_account': 'AdAccount', + 'id': 'string', + 'serialized_store_data': 'string', + 'time_updated': 'datetime', + 'user': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adscustompivotspreview.py b/facebook_business/adobjects/adscustompivotspreview.py new file mode 100644 index 000000000..afde379e6 --- /dev/null +++ b/facebook_business/adobjects/adscustompivotspreview.py @@ -0,0 +1,53 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsCustomPivotsPreview( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsCustomPivotsPreview, self).__init__() + self._isAdsCustomPivotsPreview = True + self._api = api + + class Field(AbstractObject.Field): + account_id = 'account_id' + account_name = 'account_name' + ad_id = 'ad_id' + ad_name = 'ad_name' + adset_id = 'adset_id' + adset_name = 'adset_name' + campaign_id = 'campaign_id' + campaign_name = 'campaign_name' + custom_breakdown = 'custom_breakdown' + + _field_types = { + 'account_id': 'string', + 'account_name': 'string', + 'ad_id': 'string', + 'ad_name': 'string', + 'adset_id': 'string', + 'adset_name': 'string', + 'campaign_id': 'string', + 'campaign_name': 'string', + 'custom_breakdown': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adsdatapartner.py b/facebook_business/adobjects/adsdatapartner.py new file mode 100644 index 000000000..fcd499737 --- /dev/null +++ b/facebook_business/adobjects/adsdatapartner.py @@ -0,0 +1,74 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdsDataPartner( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdsDataPartner = True + super(AdsDataPartner, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + name = 'name' + rev_share_policies = 'rev_share_policies' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsDataPartner, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'name': 'string', + 'rev_share_policies': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adsdataset.py b/facebook_business/adobjects/adsdataset.py new file mode 100644 index 000000000..f4301a4b7 --- /dev/null +++ b/facebook_business/adobjects/adsdataset.py @@ -0,0 +1,142 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdsDataset( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdsDataset = True + super(AdsDataset, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + can_proxy = 'can_proxy' + collection_rate = 'collection_rate' + config = 'config' + creation_time = 'creation_time' + creator = 'creator' + dataset_id = 'dataset_id' + description = 'description' + duplicate_entries = 'duplicate_entries' + enable_auto_assign_to_accounts = 'enable_auto_assign_to_accounts' + enable_automatic_events = 'enable_automatic_events' + enable_automatic_matching = 'enable_automatic_matching' + enable_real_time_event_log = 'enable_real_time_event_log' + event_stats = 'event_stats' + event_time_max = 'event_time_max' + event_time_min = 'event_time_min' + first_party_cookie_status = 'first_party_cookie_status' + has_bapi_domains = 'has_bapi_domains' + has_catalog_microdata_activity = 'has_catalog_microdata_activity' + has_ofa_redacted_keys = 'has_ofa_redacted_keys' + has_sent_pii = 'has_sent_pii' + id = 'id' + is_consolidated_container = 'is_consolidated_container' + is_created_by_business = 'is_created_by_business' + is_crm = 'is_crm' + is_eligible_for_sharing_to_ad_account = 'is_eligible_for_sharing_to_ad_account' + is_eligible_for_sharing_to_business = 'is_eligible_for_sharing_to_business' + is_eligible_for_value_optimization = 'is_eligible_for_value_optimization' + is_mta_use = 'is_mta_use' + is_restricted_use = 'is_restricted_use' + is_unavailable = 'is_unavailable' + last_fired_time = 'last_fired_time' + last_upload_app = 'last_upload_app' + last_upload_app_changed_time = 'last_upload_app_changed_time' + last_upload_time = 'last_upload_time' + late_upload_reminder_eligibility = 'late_upload_reminder_eligibility' + match_rate_approx = 'match_rate_approx' + matched_entries = 'matched_entries' + name = 'name' + no_ads_tracked_for_weekly_uploaded_events_reminder_eligibility = 'no_ads_tracked_for_weekly_uploaded_events_reminder_eligibility' + num_active_ad_set_tracked = 'num_active_ad_set_tracked' + num_recent_offline_conversions_uploaded = 'num_recent_offline_conversions_uploaded' + num_uploads = 'num_uploads' + owner_ad_account = 'owner_ad_account' + owner_business = 'owner_business' + percentage_of_late_uploads_in_external_suboptimal_window = 'percentage_of_late_uploads_in_external_suboptimal_window' + permissions = 'permissions' + server_last_fired_time = 'server_last_fired_time' + show_automatic_events = 'show_automatic_events' + upload_rate = 'upload_rate' + upload_reminder_eligibility = 'upload_reminder_eligibility' + usage = 'usage' + valid_entries = 'valid_entries' + + _field_types = { + 'can_proxy': 'bool', + 'collection_rate': 'float', + 'config': 'string', + 'creation_time': 'datetime', + 'creator': 'User', + 'dataset_id': 'string', + 'description': 'string', + 'duplicate_entries': 'int', + 'enable_auto_assign_to_accounts': 'bool', + 'enable_automatic_events': 'bool', + 'enable_automatic_matching': 'bool', + 'enable_real_time_event_log': 'bool', + 'event_stats': 'string', + 'event_time_max': 'int', + 'event_time_min': 'int', + 'first_party_cookie_status': 'string', + 'has_bapi_domains': 'bool', + 'has_catalog_microdata_activity': 'bool', + 'has_ofa_redacted_keys': 'bool', + 'has_sent_pii': 'bool', + 'id': 'string', + 'is_consolidated_container': 'bool', + 'is_created_by_business': 'bool', + 'is_crm': 'bool', + 'is_eligible_for_sharing_to_ad_account': 'bool', + 'is_eligible_for_sharing_to_business': 'bool', + 'is_eligible_for_value_optimization': 'bool', + 'is_mta_use': 'bool', + 'is_restricted_use': 'bool', + 'is_unavailable': 'bool', + 'last_fired_time': 'datetime', + 'last_upload_app': 'string', + 'last_upload_app_changed_time': 'int', + 'last_upload_time': 'int', + 'late_upload_reminder_eligibility': 'bool', + 'match_rate_approx': 'int', + 'matched_entries': 'int', + 'name': 'string', + 'no_ads_tracked_for_weekly_uploaded_events_reminder_eligibility': 'bool', + 'num_active_ad_set_tracked': 'int', + 'num_recent_offline_conversions_uploaded': 'int', + 'num_uploads': 'int', + 'owner_ad_account': 'AdAccount', + 'owner_business': 'Business', + 'percentage_of_late_uploads_in_external_suboptimal_window': 'int', + 'permissions': 'OfflineConversionDataSetPermissions', + 'server_last_fired_time': 'datetime', + 'show_automatic_events': 'bool', + 'upload_rate': 'float', + 'upload_reminder_eligibility': 'bool', + 'usage': 'OfflineConversionDataSetUsage', + 'valid_entries': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adset.py b/facebook_business/adobjects/adset.py index 0ce6aa3b6..207fa364d 100644 --- a/facebook_business/adobjects/adset.py +++ b/facebook_business/adobjects/adset.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -58,6 +44,7 @@ class Field(AbstractObject.Field): billing_event = 'billing_event' budget_remaining = 'budget_remaining' campaign = 'campaign' + campaign_active_time = 'campaign_active_time' campaign_attribution = 'campaign_attribution' campaign_id = 'campaign_id' configured_status = 'configured_status' @@ -76,6 +63,7 @@ class Field(AbstractObject.Field): full_funnel_exploration_mode = 'full_funnel_exploration_mode' id = 'id' instagram_actor_id = 'instagram_actor_id' + is_budget_schedule_enabled = 'is_budget_schedule_enabled' is_dynamic_creative = 'is_dynamic_creative' issues_info = 'issues_info' learning_stage_info = 'learning_stage_info' @@ -91,6 +79,8 @@ class Field(AbstractObject.Field): promoted_object = 'promoted_object' recommendations = 'recommendations' recurring_budget_semantics = 'recurring_budget_semantics' + regional_regulated_categories = 'regional_regulated_categories' + regional_regulation_identities = 'regional_regulation_identities' review_feedback = 'review_feedback' rf_prediction_id = 'rf_prediction_id' source_adset = 'source_adset' @@ -118,6 +108,7 @@ class BidStrategy: cost_cap = 'COST_CAP' lowest_cost_without_cap = 'LOWEST_COST_WITHOUT_CAP' lowest_cost_with_bid_cap = 'LOWEST_COST_WITH_BID_CAP' + lowest_cost_with_min_roas = 'LOWEST_COST_WITH_MIN_ROAS' class BillingEvent: app_installs = 'APP_INSTALLS' @@ -160,15 +151,18 @@ class OptimizationGoal: landing_page_views = 'LANDING_PAGE_VIEWS' lead_generation = 'LEAD_GENERATION' link_clicks = 'LINK_CLICKS' + meaningful_call_attempt = 'MEANINGFUL_CALL_ATTEMPT' messaging_appointment_conversion = 'MESSAGING_APPOINTMENT_CONVERSION' messaging_purchase_conversion = 'MESSAGING_PURCHASE_CONVERSION' none = 'NONE' offsite_conversions = 'OFFSITE_CONVERSIONS' page_likes = 'PAGE_LIKES' post_engagement = 'POST_ENGAGEMENT' + profile_visit = 'PROFILE_VISIT' quality_call = 'QUALITY_CALL' quality_lead = 'QUALITY_LEAD' reach = 'REACH' + reminders_set = 'REMINDERS_SET' subscribers = 'SUBSCRIBERS' thruplay = 'THRUPLAY' value = 'VALUE' @@ -181,34 +175,46 @@ class Status: paused = 'PAUSED' class DatePreset: - data_maximum = 'data_maximum' - last_14d = 'last_14d' - last_28d = 'last_28d' - last_30d = 'last_30d' - last_3d = 'last_3d' - last_7d = 'last_7d' - last_90d = 'last_90d' - last_month = 'last_month' - last_quarter = 'last_quarter' - last_week_mon_sun = 'last_week_mon_sun' - last_week_sun_sat = 'last_week_sun_sat' - last_year = 'last_year' - maximum = 'maximum' - this_month = 'this_month' - this_quarter = 'this_quarter' - this_week_mon_today = 'this_week_mon_today' - this_week_sun_today = 'this_week_sun_today' - this_year = 'this_year' - today = 'today' - yesterday = 'yesterday' + data_maximum = 'DATA_MAXIMUM' + last_14d = 'LAST_14D' + last_28d = 'LAST_28D' + last_30d = 'LAST_30D' + last_3d = 'LAST_3D' + last_7d = 'LAST_7D' + last_90d = 'LAST_90D' + last_month = 'LAST_MONTH' + last_quarter = 'LAST_QUARTER' + last_week_mon_sun = 'LAST_WEEK_MON_SUN' + last_week_sun_sat = 'LAST_WEEK_SUN_SAT' + last_year = 'LAST_YEAR' + maximum = 'MAXIMUM' + this_month = 'THIS_MONTH' + this_quarter = 'THIS_QUARTER' + this_week_mon_today = 'THIS_WEEK_MON_TODAY' + this_week_sun_today = 'THIS_WEEK_SUN_TODAY' + this_year = 'THIS_YEAR' + today = 'TODAY' + yesterday = 'YESTERDAY' class DestinationType: app = 'APP' applinks_automatic = 'APPLINKS_AUTOMATIC' facebook = 'FACEBOOK' + instagram_direct = 'INSTAGRAM_DIRECT' + instagram_profile = 'INSTAGRAM_PROFILE' + messaging_instagram_direct_messenger = 'MESSAGING_INSTAGRAM_DIRECT_MESSENGER' + messaging_instagram_direct_messenger_whatsapp = 'MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP' + messaging_instagram_direct_whatsapp = 'MESSAGING_INSTAGRAM_DIRECT_WHATSAPP' + messaging_messenger_whatsapp = 'MESSAGING_MESSENGER_WHATSAPP' messenger = 'MESSENGER' - undefined = 'UNDEFINED' + on_ad = 'ON_AD' + on_event = 'ON_EVENT' + on_page = 'ON_PAGE' + on_post = 'ON_POST' + on_video = 'ON_VIDEO' + shop_automatic = 'SHOP_AUTOMATIC' website = 'WEBSITE' + whatsapp = 'WHATSAPP' class ExecutionOptions: include_recommendations = 'include_recommendations' @@ -237,6 +243,10 @@ class OptimizationSubEvent: trip_consideration = 'TRIP_CONSIDERATION' video_sound_on = 'VIDEO_SOUND_ON' + class RegionalRegulatedCategories: + value_0 = '0' + value_1 = '1' + class TuneForCategory: credit = 'CREDIT' employment = 'EMPLOYMENT' @@ -302,7 +312,7 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No 'am_call_tags': 'map', 'date_preset': 'date_preset_enum', 'from_adtable': 'bool', - 'time_range': 'Object', + 'time_range': 'map', } enums = { 'date_preset_enum': [ @@ -364,6 +374,7 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure 'bid_constraints': 'map', 'bid_strategy': 'bid_strategy_enum', 'billing_event': 'billing_event_enum', + 'campaign_attribution': 'Object', 'campaign_spec': 'Object', 'creative_sequence': 'list', 'daily_budget': 'unsigned int', @@ -389,6 +400,8 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure 'pacing_type': 'list', 'promoted_object': 'Object', 'rb_prediction_id': 'string', + 'regional_regulated_categories': 'list', + 'regional_regulation_identities': 'map', 'rf_prediction_id': 'string', 'start_time': 'datetime', 'status': 'status_enum', @@ -408,6 +421,7 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure 'multi_optimization_goal_weight_enum': AdSet.MultiOptimizationGoalWeight.__dict__.values(), 'optimization_goal_enum': AdSet.OptimizationGoal.__dict__.values(), 'optimization_sub_event_enum': AdSet.OptimizationSubEvent.__dict__.values(), + 'regional_regulated_categories_enum': AdSet.RegionalRegulatedCategories.__dict__.values(), 'status_enum': AdSet.Status.__dict__.values(), 'tune_for_category_enum': AdSet.TuneForCategory.__dict__.values(), } @@ -640,7 +654,7 @@ def get_ads(self, fields=None, params=None, batch=None, success=None, failure=No param_types = { 'date_preset': 'date_preset_enum', 'effective_status': 'list', - 'time_range': 'Object', + 'time_range': 'map', 'updated_since': 'int', } enums = { @@ -701,6 +715,42 @@ def get_async_ad_requests(self, fields=None, params=None, batch=None, success=No self.assure_call() return request.execute() + def create_budget_schedule(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.highdemandperiod import HighDemandPeriod + param_types = { + 'budget_value': 'unsigned int', + 'budget_value_type': 'budget_value_type_enum', + 'time_end': 'unsigned int', + 'time_start': 'unsigned int', + } + enums = { + 'budget_value_type_enum': HighDemandPeriod.BudgetValueType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/budget_schedules', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=HighDemandPeriod, + api_type='EDGE', + response_parser=ObjectParser(target_class=HighDemandPeriod, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_copies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -709,7 +759,7 @@ def get_copies(self, fields=None, params=None, batch=None, success=None, failure 'date_preset': 'date_preset_enum', 'effective_status': 'list', 'is_completed': 'bool', - 'time_range': 'Object', + 'time_range': 'map', } enums = { 'date_preset_enum': AdSet.DatePreset.__dict__.values(), @@ -835,8 +885,8 @@ def get_insights(self, fields=None, params=None, is_async=False, batch=None, suc 'summary': 'list', 'summary_action_breakdowns': 'list', 'time_increment': 'string', - 'time_range': 'Object', - 'time_ranges': 'list', + 'time_range': 'map', + 'time_ranges': 'list', 'use_account_attribution_setting': 'bool', 'use_unified_attribution_setting': 'bool', } @@ -896,8 +946,8 @@ def get_insights_async(self, fields=None, params=None, batch=None, success=None, 'summary': 'list', 'summary_action_breakdowns': 'list', 'time_increment': 'string', - 'time_range': 'Object', - 'time_ranges': 'list', + 'time_range': 'map', + 'time_ranges': 'list', 'use_account_attribution_setting': 'bool', 'use_unified_attribution_setting': 'bool', } @@ -982,6 +1032,7 @@ def get_targeting_sentence_lines(self, fields=None, params=None, batch=None, suc 'billing_event': 'BillingEvent', 'budget_remaining': 'string', 'campaign': 'Campaign', + 'campaign_active_time': 'string', 'campaign_attribution': 'string', 'campaign_id': 'string', 'configured_status': 'ConfiguredStatus', @@ -1000,6 +1051,7 @@ def get_targeting_sentence_lines(self, fields=None, params=None, batch=None, suc 'full_funnel_exploration_mode': 'string', 'id': 'string', 'instagram_actor_id': 'string', + 'is_budget_schedule_enabled': 'bool', 'is_dynamic_creative': 'bool', 'issues_info': 'list', 'learning_stage_info': 'AdCampaignLearningStageInfo', @@ -1015,6 +1067,8 @@ def get_targeting_sentence_lines(self, fields=None, params=None, batch=None, suc 'promoted_object': 'AdPromotedObject', 'recommendations': 'list', 'recurring_budget_semantics': 'bool', + 'regional_regulated_categories': 'list', + 'regional_regulation_identities': 'RegionalRegulationIdentities', 'review_feedback': 'string', 'rf_prediction_id': 'string', 'source_adset': 'AdSet', @@ -1053,6 +1107,7 @@ def _get_field_enum_info(cls): field_enum_info['FullFunnelExplorationMode'] = AdSet.FullFunnelExplorationMode.__dict__.values() field_enum_info['MultiOptimizationGoalWeight'] = AdSet.MultiOptimizationGoalWeight.__dict__.values() field_enum_info['OptimizationSubEvent'] = AdSet.OptimizationSubEvent.__dict__.values() + field_enum_info['RegionalRegulatedCategories'] = AdSet.RegionalRegulatedCategories.__dict__.values() field_enum_info['TuneForCategory'] = AdSet.TuneForCategory.__dict__.values() field_enum_info['Operator'] = AdSet.Operator.__dict__.values() field_enum_info['StatusOption'] = AdSet.StatusOption.__dict__.values() diff --git a/facebook_business/adobjects/adsguidanceqeexposure.py b/facebook_business/adobjects/adsguidanceqeexposure.py new file mode 100644 index 000000000..a81014de3 --- /dev/null +++ b/facebook_business/adobjects/adsguidanceqeexposure.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsGuidanceQEExposure( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsGuidanceQEExposure, self).__init__() + self._isAdsGuidanceQEExposure = True + self._api = api + + class Field(AbstractObject.Field): + account_exposed = 'account_exposed' + + _field_types = { + 'account_exposed': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adshistogramstats.py b/facebook_business/adobjects/adshistogramstats.py new file mode 100644 index 000000000..6207d3500 --- /dev/null +++ b/facebook_business/adobjects/adshistogramstats.py @@ -0,0 +1,135 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsHistogramStats( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsHistogramStats, self).__init__() + self._isAdsHistogramStats = True + self._api = api + + class Field(AbstractObject.Field): + field_1d_click = '1d_click' + field_1d_click_all_conversions = '1d_click_all_conversions' + field_1d_click_first_conversion = '1d_click_first_conversion' + field_1d_ev = '1d_ev' + field_1d_ev_all_conversions = '1d_ev_all_conversions' + field_1d_ev_first_conversion = '1d_ev_first_conversion' + field_1d_view = '1d_view' + field_1d_view_all_conversions = '1d_view_all_conversions' + field_1d_view_first_conversion = '1d_view_first_conversion' + field_28d_click = '28d_click' + field_28d_click_all_conversions = '28d_click_all_conversions' + field_28d_click_first_conversion = '28d_click_first_conversion' + field_28d_view = '28d_view' + field_28d_view_all_conversions = '28d_view_all_conversions' + field_28d_view_first_conversion = '28d_view_first_conversion' + field_7d_click = '7d_click' + field_7d_click_all_conversions = '7d_click_all_conversions' + field_7d_click_first_conversion = '7d_click_first_conversion' + field_7d_view = '7d_view' + field_7d_view_all_conversions = '7d_view_all_conversions' + field_7d_view_first_conversion = '7d_view_first_conversion' + action_brand = 'action_brand' + action_canvas_component_id = 'action_canvas_component_id' + action_canvas_component_name = 'action_canvas_component_name' + action_carousel_card_id = 'action_carousel_card_id' + action_carousel_card_name = 'action_carousel_card_name' + action_category = 'action_category' + action_converted_product_id = 'action_converted_product_id' + action_destination = 'action_destination' + action_device = 'action_device' + action_event_channel = 'action_event_channel' + action_link_click_destination = 'action_link_click_destination' + action_location_code = 'action_location_code' + action_reaction = 'action_reaction' + action_target_id = 'action_target_id' + action_type = 'action_type' + action_video_asset_id = 'action_video_asset_id' + action_video_sound = 'action_video_sound' + action_video_type = 'action_video_type' + dda = 'dda' + inline = 'inline' + interactive_component_sticker_id = 'interactive_component_sticker_id' + interactive_component_sticker_response = 'interactive_component_sticker_response' + skan_click = 'skan_click' + skan_click_second_postback = 'skan_click_second_postback' + skan_click_third_postback = 'skan_click_third_postback' + skan_view = 'skan_view' + skan_view_second_postback = 'skan_view_second_postback' + skan_view_third_postback = 'skan_view_third_postback' + value = 'value' + + _field_types = { + '1d_click': 'list', + '1d_click_all_conversions': 'list', + '1d_click_first_conversion': 'list', + '1d_ev': 'list', + '1d_ev_all_conversions': 'list', + '1d_ev_first_conversion': 'list', + '1d_view': 'list', + '1d_view_all_conversions': 'list', + '1d_view_first_conversion': 'list', + '28d_click': 'list', + '28d_click_all_conversions': 'list', + '28d_click_first_conversion': 'list', + '28d_view': 'list', + '28d_view_all_conversions': 'list', + '28d_view_first_conversion': 'list', + '7d_click': 'list', + '7d_click_all_conversions': 'list', + '7d_click_first_conversion': 'list', + '7d_view': 'list', + '7d_view_all_conversions': 'list', + '7d_view_first_conversion': 'list', + 'action_brand': 'string', + 'action_canvas_component_id': 'string', + 'action_canvas_component_name': 'string', + 'action_carousel_card_id': 'string', + 'action_carousel_card_name': 'string', + 'action_category': 'string', + 'action_converted_product_id': 'string', + 'action_destination': 'string', + 'action_device': 'string', + 'action_event_channel': 'string', + 'action_link_click_destination': 'string', + 'action_location_code': 'string', + 'action_reaction': 'string', + 'action_target_id': 'string', + 'action_type': 'string', + 'action_video_asset_id': 'string', + 'action_video_sound': 'string', + 'action_video_type': 'string', + 'dda': 'list', + 'inline': 'list', + 'interactive_component_sticker_id': 'string', + 'interactive_component_sticker_response': 'string', + 'skan_click': 'list', + 'skan_click_second_postback': 'list', + 'skan_click_third_postback': 'list', + 'skan_view': 'list', + 'skan_view_second_postback': 'list', + 'skan_view_third_postback': 'list', + 'value': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adsimagecrops.py b/facebook_business/adobjects/adsimagecrops.py index 29e6ef596..d2135fc38 100644 --- a/facebook_business/adobjects/adsimagecrops.py +++ b/facebook_business/adobjects/adsimagecrops.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adsinsights.py b/facebook_business/adobjects/adsinsights.py index af694070a..e8fa2a946 100644 --- a/facebook_business/adobjects/adsinsights.py +++ b/facebook_business/adobjects/adsinsights.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.helpers.adsinsightsmixin import AdsInsightsMixin @@ -49,6 +35,7 @@ class Field(AbstractObject.Field): ad_id = 'ad_id' ad_impression_actions = 'ad_impression_actions' ad_name = 'ad_name' + adjusted_offline_purchase = 'adjusted_offline_purchase' adset_end = 'adset_end' adset_id = 'adset_id' adset_name = 'adset_name' @@ -123,8 +110,13 @@ class Field(AbstractObject.Field): interactive_component_tap = 'interactive_component_tap' labels = 'labels' location = 'location' + marketing_messages_cost_per_delivered = 'marketing_messages_cost_per_delivered' + marketing_messages_cost_per_link_btn_click = 'marketing_messages_cost_per_link_btn_click' + marketing_messages_spend = 'marketing_messages_spend' + marketing_messages_website_purchase_values = 'marketing_messages_website_purchase_values' mobile_app_purchase_roas = 'mobile_app_purchase_roas' objective = 'objective' + onsite_conversion_messaging_detected_purchase_deduped = 'onsite_conversion_messaging_detected_purchase_deduped' optimization_goal = 'optimization_goal' outbound_clicks = 'outbound_clicks' outbound_clicks_ctr = 'outbound_clicks_ctr' @@ -132,10 +124,8 @@ class Field(AbstractObject.Field): purchase_roas = 'purchase_roas' qualifying_question_qualify_answer_rate = 'qualifying_question_qualify_answer_rate' quality_ranking = 'quality_ranking' - quality_score_ectr = 'quality_score_ectr' - quality_score_ecvr = 'quality_score_ecvr' - quality_score_organic = 'quality_score_organic' reach = 'reach' + shops_assisted_purchases = 'shops_assisted_purchases' social_spend = 'social_spend' spend = 'spend' total_postbacks = 'total_postbacks' @@ -175,11 +165,16 @@ class Field(AbstractObject.Field): class ActionAttributionWindows: value_1d_click = '1d_click' + value_1d_ev = '1d_ev' value_1d_view = '1d_view' value_28d_click = '28d_click' value_28d_view = '28d_view' + value_28d_view_all_conversions = '28d_view_all_conversions' + value_28d_view_first_conversion = '28d_view_first_conversion' value_7d_click = '7d_click' value_7d_view = '7d_view' + value_7d_view_all_conversions = '7d_view_all_conversions' + value_7d_view_first_conversion = '7d_view_first_conversion' dda = 'dda' value_default = 'default' skan_click = 'skan_click' @@ -196,6 +191,11 @@ class ActionBreakdowns: action_type = 'action_type' action_video_sound = 'action_video_sound' action_video_type = 'action_video_type' + conversion_destination = 'conversion_destination' + matched_persona_id = 'matched_persona_id' + matched_persona_name = 'matched_persona_name' + signal_source_bucket = 'signal_source_bucket' + standard_event_content_type = 'standard_event_content_type' class ActionReportTime: conversion = 'conversion' @@ -209,6 +209,7 @@ class Breakdowns: body_asset = 'body_asset' call_to_action_asset = 'call_to_action_asset' coarse_conversion_value = 'coarse_conversion_value' + conversion_destination = 'conversion_destination' country = 'country' description_asset = 'description_asset' device_platform = 'device_platform' @@ -222,7 +223,16 @@ class Breakdowns: image_asset = 'image_asset' impression_device = 'impression_device' is_conversion_id_modeled = 'is_conversion_id_modeled' + landing_destination = 'landing_destination' link_url_asset = 'link_url_asset' + marketing_messages_btn_name = 'marketing_messages_btn_name' + mdsa_landing_destination = 'mdsa_landing_destination' + media_asset_url = 'media_asset_url' + media_creator = 'media_creator' + media_destination_url = 'media_destination_url' + media_format = 'media_format' + media_origin_url = 'media_origin_url' + media_text_content = 'media_text_content' mmm = 'mmm' place_page_id = 'place_page_id' platform_position = 'platform_position' @@ -231,9 +241,14 @@ class Breakdowns: publisher_platform = 'publisher_platform' redownload = 'redownload' region = 'region' + signal_source_bucket = 'signal_source_bucket' skan_campaign_id = 'skan_campaign_id' skan_conversion_id = 'skan_conversion_id' + skan_version = 'skan_version' + standard_event_content_type = 'standard_event_content_type' title_asset = 'title_asset' + user_persona_id = 'user_persona_id' + user_persona_name = 'user_persona_name' video_asset = 'video_asset' class DatePreset: @@ -275,6 +290,11 @@ class SummaryActionBreakdowns: action_type = 'action_type' action_video_sound = 'action_video_sound' action_video_type = 'action_video_type' + conversion_destination = 'conversion_destination' + matched_persona_id = 'matched_persona_id' + matched_persona_name = 'matched_persona_name' + signal_source_bucket = 'signal_source_bucket' + standard_event_content_type = 'standard_event_content_type' # @deprecated get_endpoint function is deprecated @classmethod @@ -291,6 +311,7 @@ def get_endpoint(cls): 'ad_id': 'string', 'ad_impression_actions': 'list', 'ad_name': 'string', + 'adjusted_offline_purchase': 'list', 'adset_end': 'string', 'adset_id': 'string', 'adset_name': 'string', @@ -365,8 +386,13 @@ def get_endpoint(cls): 'interactive_component_tap': 'list', 'labels': 'string', 'location': 'string', + 'marketing_messages_cost_per_delivered': 'string', + 'marketing_messages_cost_per_link_btn_click': 'string', + 'marketing_messages_spend': 'string', + 'marketing_messages_website_purchase_values': 'string', 'mobile_app_purchase_roas': 'list', 'objective': 'string', + 'onsite_conversion_messaging_detected_purchase_deduped': 'list', 'optimization_goal': 'string', 'outbound_clicks': 'list', 'outbound_clicks_ctr': 'list', @@ -374,15 +400,13 @@ def get_endpoint(cls): 'purchase_roas': 'list', 'qualifying_question_qualify_answer_rate': 'string', 'quality_ranking': 'string', - 'quality_score_ectr': 'string', - 'quality_score_ecvr': 'string', - 'quality_score_organic': 'string', 'reach': 'string', + 'shops_assisted_purchases': 'string', 'social_spend': 'string', 'spend': 'string', 'total_postbacks': 'string', 'total_postbacks_detailed': 'list', - 'total_postbacks_detailed_v4': 'string', + 'total_postbacks_detailed_v4': 'list', 'unique_actions': 'list', 'unique_clicks': 'string', 'unique_conversions': 'list', @@ -405,10 +429,10 @@ def get_endpoint(cls): 'video_p75_watched_actions': 'list', 'video_p95_watched_actions': 'list', 'video_play_actions': 'list', - 'video_play_curve_actions': 'list', - 'video_play_retention_0_to_15s_actions': 'list', - 'video_play_retention_20_to_60s_actions': 'list', - 'video_play_retention_graph_actions': 'list', + 'video_play_curve_actions': 'list', + 'video_play_retention_0_to_15s_actions': 'list', + 'video_play_retention_20_to_60s_actions': 'list', + 'video_play_retention_graph_actions': 'list', 'video_thruplay_watched_actions': 'list', 'video_time_watched_actions': 'list', 'website_ctr': 'list', diff --git a/facebook_business/adobjects/adsnamingtemplate.py b/facebook_business/adobjects/adsnamingtemplate.py new file mode 100644 index 000000000..e8b735670 --- /dev/null +++ b/facebook_business/adobjects/adsnamingtemplate.py @@ -0,0 +1,97 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdsNamingTemplate( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdsNamingTemplate = True + super(AdsNamingTemplate, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + api_fields = 'api_fields' + api_version = 'api_version' + field_order = 'field_order' + id = 'id' + level = 'level' + separator = 'separator' + template_version = 'template_version' + user_defined_fields = 'user_defined_fields' + value_separator = 'value_separator' + + class Level: + adgroup = 'ADGROUP' + ad_account = 'AD_ACCOUNT' + campaign = 'CAMPAIGN' + campaign_group = 'CAMPAIGN_GROUP' + opportunities = 'OPPORTUNITIES' + privacy_info_center = 'PRIVACY_INFO_CENTER' + topline = 'TOPLINE' + unique_adcreative = 'UNIQUE_ADCREATIVE' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsNamingTemplate, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'api_fields': 'list>>>>', + 'api_version': 'string', + 'field_order': 'list', + 'id': 'string', + 'level': 'Level', + 'separator': 'string', + 'template_version': 'string', + 'user_defined_fields': 'list>>>', + 'value_separator': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Level'] = AdsNamingTemplate.Level.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/adsoptimaldeliverygrowthopportunity.py b/facebook_business/adobjects/adsoptimaldeliverygrowthopportunity.py index 2659bbd63..3c470582c 100644 --- a/facebook_business/adobjects/adsoptimaldeliverygrowthopportunity.py +++ b/facebook_business/adobjects/adsoptimaldeliverygrowthopportunity.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adspaymentcycle.py b/facebook_business/adobjects/adspaymentcycle.py new file mode 100644 index 000000000..29621db0b --- /dev/null +++ b/facebook_business/adobjects/adspaymentcycle.py @@ -0,0 +1,47 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsPaymentCycle( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsPaymentCycle, self).__init__() + self._isAdsPaymentCycle = True + self._api = api + + class Field(AbstractObject.Field): + account_id = 'account_id' + created_time = 'created_time' + multiplier = 'multiplier' + requested_threshold_amount = 'requested_threshold_amount' + threshold_amount = 'threshold_amount' + updated_time = 'updated_time' + + _field_types = { + 'account_id': 'string', + 'created_time': 'datetime', + 'multiplier': 'unsigned int', + 'requested_threshold_amount': 'unsigned int', + 'threshold_amount': 'unsigned int', + 'updated_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/shoporder.py b/facebook_business/adobjects/adspivotrules.py similarity index 62% rename from facebook_business/adobjects/shoporder.py rename to facebook_business/adobjects/adspivotrules.py index c91fdddb3..83278b05d 100644 --- a/facebook_business/adobjects/shoporder.py +++ b/facebook_business/adobjects/adspivotrules.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -32,17 +18,25 @@ pull request for this class. """ -class ShopOrder( +class AdsPivotRules( AbstractCrudObject, ): def __init__(self, fbid=None, parent_id=None, api=None): - self._isShopOrder = True - super(ShopOrder, self).__init__(fbid, parent_id, api) + self._isAdsPivotRules = True + super(AdsPivotRules, self).__init__(fbid, parent_id, api) class Field(AbstractObject.Field): creation_time = 'creation_time' + creator = 'creator' + description = 'description' id = 'id' + name = 'name' + permission = 'permission' + rules = 'rules' + scope = 'scope' + update_by = 'update_by' + update_time = 'update_time' def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils @@ -58,7 +52,7 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No endpoint='/', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=ShopOrder, + target_class=AdsPivotRules, api_type='NODE', response_parser=ObjectParser(reuse_object=self), ) @@ -76,7 +70,15 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No _field_types = { 'creation_time': 'datetime', + 'creator': 'Profile', + 'description': 'string', 'id': 'string', + 'name': 'string', + 'permission': 'string', + 'rules': 'list', + 'scope': 'string', + 'update_by': 'Profile', + 'update_time': 'datetime', } @classmethod def _get_field_enum_info(cls): diff --git a/facebook_business/adobjects/adspixel.py b/facebook_business/adobjects/adspixel.py index a45811b30..9cc2837ee 100644 --- a/facebook_business/adobjects/adspixel.py +++ b/facebook_business/adobjects/adspixel.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -56,6 +42,7 @@ class Field(AbstractObject.Field): event_time_max = 'event_time_max' event_time_min = 'event_time_min' first_party_cookie_status = 'first_party_cookie_status' + has_1p_pixel_event = 'has_1p_pixel_event' id = 'id' is_consolidated_container = 'is_consolidated_container' is_created_by_business = 'is_created_by_business' @@ -72,6 +59,7 @@ class Field(AbstractObject.Field): owner_ad_account = 'owner_ad_account' owner_business = 'owner_business' usage = 'usage' + user_access_expire_time = 'user_access_expire_time' valid_entries = 'valid_entries' class SortBy: @@ -101,6 +89,11 @@ class FirstPartyCookieStatus: first_party_cookie_disabled = 'FIRST_PARTY_COOKIE_DISABLED' first_party_cookie_enabled = 'FIRST_PARTY_COOKIE_ENABLED' + class PermittedTasks: + advertise = 'ADVERTISE' + analyze = 'ANALYZE' + upload = 'UPLOAD' + class Tasks: aa_analyze = 'AA_ANALYZE' advertise = 'ADVERTISE' @@ -219,6 +212,37 @@ def get_ad_accounts(self, fields=None, params=None, batch=None, success=None, fa self.assure_call() return request.execute() + def delete_agencies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'business': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/agencies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_agencies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -250,6 +274,70 @@ def get_agencies(self, fields=None, params=None, batch=None, success=None, failu self.assure_call() return request.execute() + def create_agency(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'business': 'string', + 'permitted_tasks': 'list', + } + enums = { + 'permitted_tasks_enum': AdsPixel.PermittedTasks.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/agencies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsPixel, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdsPixel, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_ahp_config(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'applink_autosetup': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/ahp_configs', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_assigned_users(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -358,6 +446,7 @@ def create_event(self, fields=None, params=None, batch=None, success=None, failu 'namespace_id': 'string', 'partner_agent': 'string', 'platforms': 'list', + 'progress': 'Object', 'test_event_code': 'string', 'trace': 'unsigned int', 'upload_id': 'string', @@ -388,36 +477,6 @@ def create_event(self, fields=None, params=None, batch=None, success=None, failu self.assure_call() return request.execute() - def create_meapitocapiconsolidationhelper(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/meapitocapiconsolidationhelper', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, - api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - def get_offline_event_uploads(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -517,7 +576,7 @@ def create_shadow_traffic_helper(self, fields=None, params=None, batch=None, suc self.assure_call() return request.execute() - def delete_shared_accounts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def delete_share_d_accounts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -549,7 +608,7 @@ def delete_shared_accounts(self, fields=None, params=None, batch=None, success=N self.assure_call() return request.execute() - def get_shared_accounts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_share_d_accounts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -581,7 +640,7 @@ def get_shared_accounts(self, fields=None, params=None, batch=None, success=None self.assure_call() return request.execute() - def create_shared_account(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def create_share_d_account(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -613,7 +672,7 @@ def create_shared_account(self, fields=None, params=None, batch=None, success=No self.assure_call() return request.execute() - def get_shared_agencies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_share_d_agencies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -681,36 +740,6 @@ def get_stats(self, fields=None, params=None, batch=None, success=None, failure= self.assure_call() return request.execute() - def create_telemetry(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/telemetry', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, - api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - _field_types = { 'automatic_matching_fields': 'list', 'can_proxy': 'bool', @@ -727,6 +756,7 @@ def create_telemetry(self, fields=None, params=None, batch=None, success=None, f 'event_time_max': 'int', 'event_time_min': 'int', 'first_party_cookie_status': 'string', + 'has_1p_pixel_event': 'bool', 'id': 'string', 'is_consolidated_container': 'bool', 'is_created_by_business': 'bool', @@ -743,6 +773,7 @@ def create_telemetry(self, fields=None, params=None, batch=None, success=None, f 'owner_ad_account': 'AdAccount', 'owner_business': 'Business', 'usage': 'OfflineConversionDataSetUsage', + 'user_access_expire_time': 'datetime', 'valid_entries': 'int', } @classmethod @@ -752,6 +783,7 @@ def _get_field_enum_info(cls): field_enum_info['AutomaticMatchingFields'] = AdsPixel.AutomaticMatchingFields.__dict__.values() field_enum_info['DataUseSetting'] = AdsPixel.DataUseSetting.__dict__.values() field_enum_info['FirstPartyCookieStatus'] = AdsPixel.FirstPartyCookieStatus.__dict__.values() + field_enum_info['PermittedTasks'] = AdsPixel.PermittedTasks.__dict__.values() field_enum_info['Tasks'] = AdsPixel.Tasks.__dict__.values() return field_enum_info diff --git a/facebook_business/adobjects/destinationcatalogsettings.py b/facebook_business/adobjects/adspixelcapabilityoverride.py similarity index 58% rename from facebook_business/adobjects/destinationcatalogsettings.py rename to facebook_business/adobjects/adspixelcapabilityoverride.py index 84380d6cc..ae77d5e97 100644 --- a/facebook_business/adobjects/destinationcatalogsettings.py +++ b/facebook_business/adobjects/adspixelcapabilityoverride.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -32,17 +18,19 @@ pull request for this class. """ -class DestinationCatalogSettings( +class AdsPixelCapabilityOverride( AbstractCrudObject, ): def __init__(self, fbid=None, parent_id=None, api=None): - self._isDestinationCatalogSettings = True - super(DestinationCatalogSettings, self).__init__(fbid, parent_id, api) + self._isAdsPixelCapabilityOverride = True + super(AdsPixelCapabilityOverride, self).__init__(fbid, parent_id, api) class Field(AbstractObject.Field): - generate_items_from_pages = 'generate_items_from_pages' + capability = 'capability' id = 'id' + override_value = 'override_value' + reason = 'reason' def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils @@ -58,7 +46,7 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No endpoint='/', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=DestinationCatalogSettings, + target_class=AdsPixelCapabilityOverride, api_type='NODE', response_parser=ObjectParser(reuse_object=self), ) @@ -75,8 +63,10 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No return request.execute() _field_types = { - 'generate_items_from_pages': 'bool', + 'capability': 'string', 'id': 'string', + 'override_value': 'string', + 'reason': 'string', } @classmethod def _get_field_enum_info(cls): diff --git a/facebook_business/adobjects/adspixelcapisetupquality.py b/facebook_business/adobjects/adspixelcapisetupquality.py new file mode 100644 index 000000000..0f3b5d3e6 --- /dev/null +++ b/facebook_business/adobjects/adspixelcapisetupquality.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsPixelCAPISetupQuality( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsPixelCAPISetupQuality, self).__init__() + self._isAdsPixelCAPISetupQuality = True + self._api = api + + class Field(AbstractObject.Field): + event_match_quality = 'event_match_quality' + event_name = 'event_name' + + _field_types = { + 'event_match_quality': 'Object', + 'event_name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adspixeldeliveryrecommendations.py b/facebook_business/adobjects/adspixeldeliveryrecommendations.py new file mode 100644 index 000000000..be6b27c6a --- /dev/null +++ b/facebook_business/adobjects/adspixeldeliveryrecommendations.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsPixelDeliveryRecommendations( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsPixelDeliveryRecommendations, self).__init__() + self._isAdsPixelDeliveryRecommendations = True + self._api = api + + class Field(AbstractObject.Field): + custom_event_type = 'custom_event_type' + optimization_goal = 'optimization_goal' + + _field_types = { + 'custom_event_type': 'string', + 'optimization_goal': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adspixeldomaincontrolrule.py b/facebook_business/adobjects/adspixeldomaincontrolrule.py new file mode 100644 index 000000000..142bb72b2 --- /dev/null +++ b/facebook_business/adobjects/adspixeldomaincontrolrule.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsPixelDomainControlRule( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsPixelDomainControlRule, self).__init__() + self._isAdsPixelDomainControlRule = True + self._api = api + + class Field(AbstractObject.Field): + domain_list = 'domain_list' + type = 'type' + + _field_types = { + 'domain_list': 'list', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adspixeldomainlastfiredtime.py b/facebook_business/adobjects/adspixeldomainlastfiredtime.py new file mode 100644 index 000000000..a9b1d4184 --- /dev/null +++ b/facebook_business/adobjects/adspixeldomainlastfiredtime.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsPixelDomainLastFiredTime( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsPixelDomainLastFiredTime, self).__init__() + self._isAdsPixelDomainLastFiredTime = True + self._api = api + + class Field(AbstractObject.Field): + domain_name = 'domain_name' + last_fired_time = 'last_fired_time' + + _field_types = { + 'domain_name': 'string', + 'last_fired_time': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adspixeleventlastfiredtime.py b/facebook_business/adobjects/adspixeleventlastfiredtime.py new file mode 100644 index 000000000..05a0834ca --- /dev/null +++ b/facebook_business/adobjects/adspixeleventlastfiredtime.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsPixelEventLastFiredTime( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsPixelEventLastFiredTime, self).__init__() + self._isAdsPixelEventLastFiredTime = True + self._api = api + + class Field(AbstractObject.Field): + event = 'event' + last_fired_time = 'last_fired_time' + + _field_types = { + 'event': 'string', + 'last_fired_time': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adspixeleventprediction.py b/facebook_business/adobjects/adspixeleventprediction.py new file mode 100644 index 000000000..3cd276485 --- /dev/null +++ b/facebook_business/adobjects/adspixeleventprediction.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsPixelEventPrediction( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsPixelEventPrediction, self).__init__() + self._isAdsPixelEventPrediction = True + self._api = api + + class Field(AbstractObject.Field): + dismissed = 'dismissed' + event_type = 'event_type' + rule = 'rule' + + _field_types = { + 'dismissed': 'bool', + 'event_type': 'string', + 'rule': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adspixeleventsuggestionrule.py b/facebook_business/adobjects/adspixeleventsuggestionrule.py new file mode 100644 index 000000000..0fa275f49 --- /dev/null +++ b/facebook_business/adobjects/adspixeleventsuggestionrule.py @@ -0,0 +1,51 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsPixelEventSuggestionRule( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsPixelEventSuggestionRule, self).__init__() + self._isAdsPixelEventSuggestionRule = True + self._api = api + + class Field(AbstractObject.Field): + field_7d_volume = '7d_volume' + dismissed = 'dismissed' + end_time = 'end_time' + event_type = 'event_type' + rank = 'rank' + rule = 'rule' + sample_urls = 'sample_urls' + start_time = 'start_time' + + _field_types = { + '7d_volume': 'int', + 'dismissed': 'bool', + 'end_time': 'datetime', + 'event_type': 'string', + 'rank': 'int', + 'rule': 'string', + 'sample_urls': 'list', + 'start_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adspixelitemprice.py b/facebook_business/adobjects/adspixelitemprice.py new file mode 100644 index 000000000..c041fdb21 --- /dev/null +++ b/facebook_business/adobjects/adspixelitemprice.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsPixelItemPrice( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsPixelItemPrice, self).__init__() + self._isAdsPixelItemPrice = True + self._api = api + + class Field(AbstractObject.Field): + date = 'date' + item_price_coverage = 'item_price_coverage' + + _field_types = { + 'date': 'string', + 'item_price_coverage': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adspixelmicrodatastats.py b/facebook_business/adobjects/adspixelmicrodatastats.py new file mode 100644 index 000000000..e4b8faf3e --- /dev/null +++ b/facebook_business/adobjects/adspixelmicrodatastats.py @@ -0,0 +1,45 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsPixelMicrodataStats( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsPixelMicrodataStats, self).__init__() + self._isAdsPixelMicrodataStats = True + self._api = api + + class Field(AbstractObject.Field): + allowed_domains = 'allowed_domains' + errors_stats_for_time_ranges = 'errors_stats_for_time_ranges' + has_valid_events = 'has_valid_events' + suggested_allowed_domains_count_max = 'suggested_allowed_domains_count_max' + suggested_trusted_domains = 'suggested_trusted_domains' + + _field_types = { + 'allowed_domains': 'list', + 'errors_stats_for_time_ranges': 'list', + 'has_valid_events': 'bool', + 'suggested_allowed_domains_count_max': 'int', + 'suggested_trusted_domains': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adspixelrawfiresresult.py b/facebook_business/adobjects/adspixelrawfiresresult.py new file mode 100644 index 000000000..205c358ee --- /dev/null +++ b/facebook_business/adobjects/adspixelrawfiresresult.py @@ -0,0 +1,51 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsPixelRawFiresResult( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsPixelRawFiresResult, self).__init__() + self._isAdsPixelRawFiresResult = True + self._api = api + + class Field(AbstractObject.Field): + data_json = 'data_json' + device_type = 'device_type' + event = 'event' + event_detection_method = 'event_detection_method' + event_src = 'event_src' + placed_url = 'placed_url' + timestamp = 'timestamp' + user_pii_keys = 'user_pii_keys' + + _field_types = { + 'data_json': 'string', + 'device_type': 'string', + 'event': 'string', + 'event_detection_method': 'string', + 'event_src': 'string', + 'placed_url': 'string', + 'timestamp': 'datetime', + 'user_pii_keys': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adspixelrealtimeeventlogresult.py b/facebook_business/adobjects/adspixelrealtimeeventlogresult.py new file mode 100644 index 000000000..e2906b124 --- /dev/null +++ b/facebook_business/adobjects/adspixelrealtimeeventlogresult.py @@ -0,0 +1,61 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsPixelRealTimeEventLogResult( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsPixelRealTimeEventLogResult, self).__init__() + self._isAdsPixelRealTimeEventLogResult = True + self._api = api + + class Field(AbstractObject.Field): + data_json = 'data_json' + dedup_data = 'dedup_data' + device_type = 'device_type' + domain_control_rule_rejection = 'domain_control_rule_rejection' + event = 'event' + event_detection_method = 'event_detection_method' + in_iframe = 'in_iframe' + matched_rule_conditions = 'matched_rule_conditions' + resolved_link = 'resolved_link' + source_rule_condition = 'source_rule_condition' + timestamp = 'timestamp' + trace_id = 'trace_id' + url = 'url' + + _field_types = { + 'data_json': 'string', + 'dedup_data': 'string', + 'device_type': 'string', + 'domain_control_rule_rejection': 'string', + 'event': 'string', + 'event_detection_method': 'string', + 'in_iframe': 'bool', + 'matched_rule_conditions': 'string', + 'resolved_link': 'string', + 'source_rule_condition': 'string', + 'timestamp': 'string', + 'trace_id': 'string', + 'url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adspixelrecenteventsresult.py b/facebook_business/adobjects/adspixelrecenteventsresult.py new file mode 100644 index 000000000..4e86a2892 --- /dev/null +++ b/facebook_business/adobjects/adspixelrecenteventsresult.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsPixelRecentEventsResult( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsPixelRecentEventsResult, self).__init__() + self._isAdsPixelRecentEventsResult = True + self._api = api + + class Field(AbstractObject.Field): + count = 'count' + event = 'event' + + _field_types = { + 'count': 'int', + 'event': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adspixelsignalsiwlfeedbacknux.py b/facebook_business/adobjects/adspixelsignalsiwlfeedbacknux.py new file mode 100644 index 000000000..10b8a0831 --- /dev/null +++ b/facebook_business/adobjects/adspixelsignalsiwlfeedbacknux.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsPixelSignalsIWLFeedbackNux( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsPixelSignalsIWLFeedbackNux, self).__init__() + self._isAdsPixelSignalsIWLFeedbackNux = True + self._api = api + + class Field(AbstractObject.Field): + should_ask_to_rate = 'should_ask_to_rate' + + _field_types = { + 'should_ask_to_rate': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adspixelsignalsiwlnux.py b/facebook_business/adobjects/adspixelsignalsiwlnux.py new file mode 100644 index 000000000..efab0a449 --- /dev/null +++ b/facebook_business/adobjects/adspixelsignalsiwlnux.py @@ -0,0 +1,45 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsPixelSignalsIWLNux( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsPixelSignalsIWLNux, self).__init__() + self._isAdsPixelSignalsIWLNux = True + self._api = api + + class Field(AbstractObject.Field): + background_color = 'background_color' + content = 'content' + content_color = 'content_color' + content_size = 'content_size' + img_url = 'img_url' + + _field_types = { + 'background_color': 'string', + 'content': 'string', + 'content_color': 'string', + 'content_size': 'string', + 'img_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adspixelstats.py b/facebook_business/adobjects/adspixelstats.py index 0b6ab0ecc..6d1acf22e 100644 --- a/facebook_business/adobjects/adspixelstats.py +++ b/facebook_business/adobjects/adspixelstats.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adspixelstatsresult.py b/facebook_business/adobjects/adspixelstatsresult.py index e1dcbed77..6e8499aaf 100644 --- a/facebook_business/adobjects/adspixelstatsresult.py +++ b/facebook_business/adobjects/adspixelstatsresult.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/adsreportbuilder.py b/facebook_business/adobjects/adsreportbuilder.py new file mode 100644 index 000000000..2dfd2c22a --- /dev/null +++ b/facebook_business/adobjects/adsreportbuilder.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsReportBuilder( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsReportBuilder, self).__init__() + self._isAdsReportBuilder = True + self._api = api + + class Field(AbstractObject.Field): + headers = 'headers' + rows = 'rows' + skan_readiness_status = 'skan_readiness_status' + + _field_types = { + 'headers': 'Object', + 'rows': 'list', + 'skan_readiness_status': 'list>', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adsreportbuilderexportcore.py b/facebook_business/adobjects/adsreportbuilderexportcore.py new file mode 100644 index 000000000..a2b03152a --- /dev/null +++ b/facebook_business/adobjects/adsreportbuilderexportcore.py @@ -0,0 +1,100 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdsReportBuilderExportCore( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdsReportBuilderExportCore = True + super(AdsReportBuilderExportCore, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + async_percent_completion = 'async_percent_completion' + async_report_url = 'async_report_url' + async_status = 'async_status' + client_creation_value = 'client_creation_value' + expiry_time = 'expiry_time' + export_download_time = 'export_download_time' + export_format = 'export_format' + export_name = 'export_name' + export_type = 'export_type' + has_seen = 'has_seen' + id = 'id' + is_sharing = 'is_sharing' + link_sharing_expiration_time = 'link_sharing_expiration_time' + link_sharing_uri = 'link_sharing_uri' + time_completed = 'time_completed' + time_start = 'time_start' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsReportBuilderExportCore, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'async_percent_completion': 'int', + 'async_report_url': 'string', + 'async_status': 'string', + 'client_creation_value': 'string', + 'expiry_time': 'datetime', + 'export_download_time': 'datetime', + 'export_format': 'string', + 'export_name': 'string', + 'export_type': 'string', + 'has_seen': 'bool', + 'id': 'string', + 'is_sharing': 'bool', + 'link_sharing_expiration_time': 'datetime', + 'link_sharing_uri': 'string', + 'time_completed': 'datetime', + 'time_start': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adsreportbuildermmmreport.py b/facebook_business/adobjects/adsreportbuildermmmreport.py new file mode 100644 index 000000000..bbc71a311 --- /dev/null +++ b/facebook_business/adobjects/adsreportbuildermmmreport.py @@ -0,0 +1,84 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdsReportBuilderMMMReport( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdsReportBuilderMMMReport = True + super(AdsReportBuilderMMMReport, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + async_status = 'async_status' + export_format = 'export_format' + export_name = 'export_name' + export_type = 'export_type' + has_seen = 'has_seen' + id = 'id' + mmm_status = 'mmm_status' + time_start = 'time_start' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsReportBuilderMMMReport, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'async_status': 'string', + 'export_format': 'string', + 'export_name': 'string', + 'export_type': 'string', + 'has_seen': 'bool', + 'id': 'string', + 'mmm_status': 'string', + 'time_start': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adsreportbuildermmmreportscheduler.py b/facebook_business/adobjects/adsreportbuildermmmreportscheduler.py new file mode 100644 index 000000000..7e8794280 --- /dev/null +++ b/facebook_business/adobjects/adsreportbuildermmmreportscheduler.py @@ -0,0 +1,78 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdsReportBuilderMMMReportScheduler( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdsReportBuilderMMMReportScheduler = True + super(AdsReportBuilderMMMReportScheduler, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_account_ids = 'ad_account_ids' + filtering = 'filtering' + id = 'id' + report_name = 'report_name' + schedule_frequency = 'schedule_frequency' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsReportBuilderMMMReportScheduler, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'ad_account_ids': 'list', + 'filtering': 'list', + 'id': 'string', + 'report_name': 'string', + 'schedule_frequency': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adsreportbuildersavedreport.py b/facebook_business/adobjects/adsreportbuildersavedreport.py new file mode 100644 index 000000000..f463ee4a4 --- /dev/null +++ b/facebook_business/adobjects/adsreportbuildersavedreport.py @@ -0,0 +1,146 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdsReportBuilderSavedReport( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdsReportBuilderSavedReport = True + super(AdsReportBuilderSavedReport, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + action_report_time = 'action_report_time' + ad_account_id = 'ad_account_id' + attribution_windows = 'attribution_windows' + comparison_date_interval = 'comparison_date_interval' + creation_source = 'creation_source' + creation_time = 'creation_time' + currency = 'currency' + date_interval = 'date_interval' + date_preset = 'date_preset' + default_attribution_windows = 'default_attribution_windows' + dimension_groups = 'dimension_groups' + dimensions = 'dimensions' + filtering = 'filtering' + formatting = 'formatting' + id = 'id' + last_access_by = 'last_access_by' + last_access_time = 'last_access_time' + last_report_snapshot_id = 'last_report_snapshot_id' + last_report_snapshot_time = 'last_report_snapshot_time' + last_shared_report_expiration = 'last_shared_report_expiration' + limit = 'limit' + locked_dimensions = 'locked_dimensions' + metrics = 'metrics' + report_name = 'report_name' + report_snapshot_async_percent_completion = 'report_snapshot_async_percent_completion' + report_snapshot_async_status = 'report_snapshot_async_status' + schedule_frequency = 'schedule_frequency' + scope = 'scope' + show_deprecate_aw_banner = 'show_deprecate_aw_banner' + sorting = 'sorting' + start_date = 'start_date' + status = 'status' + subscribers = 'subscribers' + update_by = 'update_by' + update_time = 'update_time' + user = 'user' + user_dimensions = 'user_dimensions' + user_metrics = 'user_metrics' + view_type = 'view_type' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsReportBuilderSavedReport, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'action_report_time': 'string', + 'ad_account_id': 'string', + 'attribution_windows': 'list', + 'comparison_date_interval': 'Object', + 'creation_source': 'string', + 'creation_time': 'datetime', + 'currency': 'string', + 'date_interval': 'Object', + 'date_preset': 'string', + 'default_attribution_windows': 'list', + 'dimension_groups': 'list>', + 'dimensions': 'list', + 'filtering': 'list', + 'formatting': 'list>>', + 'id': 'string', + 'last_access_by': 'Profile', + 'last_access_time': 'datetime', + 'last_report_snapshot_id': 'string', + 'last_report_snapshot_time': 'datetime', + 'last_shared_report_expiration': 'datetime', + 'limit': 'int', + 'locked_dimensions': 'int', + 'metrics': 'list', + 'report_name': 'string', + 'report_snapshot_async_percent_completion': 'int', + 'report_snapshot_async_status': 'string', + 'schedule_frequency': 'string', + 'scope': 'string', + 'show_deprecate_aw_banner': 'bool', + 'sorting': 'list', + 'start_date': 'string', + 'status': 'string', + 'subscribers': 'list', + 'update_by': 'Profile', + 'update_time': 'datetime', + 'user': 'Profile', + 'user_dimensions': 'list', + 'user_metrics': 'list', + 'view_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adssegments.py b/facebook_business/adobjects/adssegments.py new file mode 100644 index 000000000..4f1c05512 --- /dev/null +++ b/facebook_business/adobjects/adssegments.py @@ -0,0 +1,56 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdsSegments( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdsSegments = True + super(AdsSegments, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + daily_audience_size = 'daily_audience_size' + daily_impressions = 'daily_impressions' + description = 'description' + id = 'id' + name = 'name' + path = 'path' + popularity = 'popularity' + projected_cpm = 'projected_cpm' + projected_daily_revenue = 'projected_daily_revenue' + + _field_types = { + 'daily_audience_size': 'int', + 'daily_impressions': 'int', + 'description': 'string', + 'id': 'string', + 'name': 'string', + 'path': 'list', + 'popularity': 'float', + 'projected_cpm': 'int', + 'projected_daily_revenue': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adssignaldiagnosticissue.py b/facebook_business/adobjects/adssignaldiagnosticissue.py new file mode 100644 index 000000000..042901cbb --- /dev/null +++ b/facebook_business/adobjects/adssignaldiagnosticissue.py @@ -0,0 +1,47 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsSignalDiagnosticIssue( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsSignalDiagnosticIssue, self).__init__() + self._isAdsSignalDiagnosticIssue = True + self._api = api + + class Field(AbstractObject.Field): + data_source_id = 'data_source_id' + data_source_type = 'data_source_type' + diagnostic_type = 'diagnostic_type' + event_name = 'event_name' + traffic_anomaly_drop_percentage = 'traffic_anomaly_drop_percentage' + traffic_anomaly_drop_timestamp = 'traffic_anomaly_drop_timestamp' + + _field_types = { + 'data_source_id': 'AdsPixel', + 'data_source_type': 'string', + 'diagnostic_type': 'string', + 'event_name': 'string', + 'traffic_anomaly_drop_percentage': 'float', + 'traffic_anomaly_drop_timestamp': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adsstartyourdaywidget.py b/facebook_business/adobjects/adsstartyourdaywidget.py new file mode 100644 index 000000000..d63c14670 --- /dev/null +++ b/facebook_business/adobjects/adsstartyourdaywidget.py @@ -0,0 +1,72 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdsStartYourDayWidget( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdsStartYourDayWidget = True + super(AdsStartYourDayWidget, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + widget_id = 'widget_id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsStartYourDayWidget, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'widget_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adstabular.py b/facebook_business/adobjects/adstabular.py new file mode 100644 index 000000000..b9b349712 --- /dev/null +++ b/facebook_business/adobjects/adstabular.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsTabular( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsTabular, self).__init__() + self._isAdsTabular = True + self._api = api + + class Field(AbstractObject.Field): + rows = 'rows' + + _field_types = { + 'rows': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adstargetinginsights.py b/facebook_business/adobjects/adstargetinginsights.py new file mode 100644 index 000000000..2c1d68264 --- /dev/null +++ b/facebook_business/adobjects/adstargetinginsights.py @@ -0,0 +1,60 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdsTargetingInsights( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdsTargetingInsights = True + super(AdsTargetingInsights, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + audience_size = 'audience_size' + clicks = 'clicks' + conversion_cost = 'conversion_cost' + conversions = 'conversions' + description = 'description' + id = 'id' + impressions = 'impressions' + name = 'name' + revenue = 'revenue' + spend = 'spend' + type = 'type' + + _field_types = { + 'audience_size': 'int', + 'clicks': 'unsigned int', + 'conversion_cost': 'float', + 'conversions': 'unsigned int', + 'description': 'string', + 'id': 'string', + 'impressions': 'string', + 'name': 'string', + 'revenue': 'float', + 'spend': 'float', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adstextsuggestions.py b/facebook_business/adobjects/adstextsuggestions.py new file mode 100644 index 000000000..bb488cf9f --- /dev/null +++ b/facebook_business/adobjects/adstextsuggestions.py @@ -0,0 +1,49 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdsTextSuggestions( + AbstractObject, +): + + def __init__(self, api=None): + super(AdsTextSuggestions, self).__init__() + self._isAdsTextSuggestions = True + self._api = api + + class Field(AbstractObject.Field): + ad_account_id = 'ad_account_id' + bodies = 'bodies' + descriptions = 'descriptions' + inactive_session_tally = 'inactive_session_tally' + long = 'long' + short = 'short' + titles = 'titles' + + _field_types = { + 'ad_account_id': 'string', + 'bodies': 'list', + 'descriptions': 'list', + 'inactive_session_tally': 'int', + 'long': 'list', + 'short': 'list', + 'titles': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adstudy.py b/facebook_business/adobjects/adstudy.py index 7852646c8..ad34f9f6e 100644 --- a/facebook_business/adobjects/adstudy.py +++ b/facebook_business/adobjects/adstudy.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -65,6 +51,7 @@ class Field(AbstractObject.Field): viewers = 'viewers' class Type: + backend_ab_testing = 'BACKEND_AB_TESTING' continuous_lift_config = 'CONTINUOUS_LIFT_CONFIG' geo_lift = 'GEO_LIFT' lift = 'LIFT' diff --git a/facebook_business/adobjects/adstudycell.py b/facebook_business/adobjects/adstudycell.py index cd7320e85..168581040 100644 --- a/facebook_business/adobjects/adstudycell.py +++ b/facebook_business/adobjects/adstudycell.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/adstudyobjective.py b/facebook_business/adobjects/adstudyobjective.py index e66147464..8857560b0 100644 --- a/facebook_business/adobjects/adstudyobjective.py +++ b/facebook_business/adobjects/adstudyobjective.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/adstudyobjectiveid.py b/facebook_business/adobjects/adstudyobjectiveid.py index 45b77f9a2..cccc982fb 100644 --- a/facebook_business/adobjects/adstudyobjectiveid.py +++ b/facebook_business/adobjects/adstudyobjectiveid.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/adstudyobjectiveoffsitedatasets.py b/facebook_business/adobjects/adstudyobjectiveoffsitedatasets.py index edefae199..9ef9ece28 100644 --- a/facebook_business/adobjects/adstudyobjectiveoffsitedatasets.py +++ b/facebook_business/adobjects/adstudyobjectiveoffsitedatasets.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/adsusersettings.py b/facebook_business/adobjects/adsusersettings.py new file mode 100644 index 000000000..12992eb99 --- /dev/null +++ b/facebook_business/adobjects/adsusersettings.py @@ -0,0 +1,178 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdsUserSettings( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdsUserSettings = True + super(AdsUserSettings, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + a_plus_c_survey_seen = 'a_plus_c_survey_seen' + adgroup_name_template = 'adgroup_name_template' + ads_tool_visits = 'ads_tool_visits' + aplusc_carousel_cda_opt_in_status = 'aplusc_carousel_cda_opt_in_status' + aplusc_carousel_inline_comment_opt_in_status = 'aplusc_carousel_inline_comment_opt_in_status' + aplusc_epa_opt_in_status = 'aplusc_epa_opt_in_status' + aplusc_opt_out_friction = 'aplusc_opt_out_friction' + autoflow_lite_opt_in_status = 'autoflow_lite_opt_in_status' + autoflow_lite_should_opt_in = 'autoflow_lite_should_opt_in' + blended_ads_creation_defaulting_opt_in_status = 'blended_ads_creation_defaulting_opt_in_status' + bookmarked_pages = 'bookmarked_pages' + campaign_group_name_template = 'campaign_group_name_template' + campaign_name_template = 'campaign_name_template' + carousel_to_video_opt_in_status = 'carousel_to_video_opt_in_status' + connected_sources_catalog_opt_in_status = 'connected_sources_catalog_opt_in_status' + default_creation_mode = 'default_creation_mode' + export_format_default = 'export_format_default' + focus_mode_default = 'focus_mode_default' + gen_ai_alpha_test_status = 'gen_ai_alpha_test_status' + id = 'id' + image_expansion_opt_in_status = 'image_expansion_opt_in_status' + is_ads_ai_consented = 'is_ads_ai_consented' + is_cbo_default_on = 'is_cbo_default_on' + is_se_removal_guidance_dismissed = 'is_se_removal_guidance_dismissed' + last_used_post_format = 'last_used_post_format' + last_visited_time = 'last_visited_time' + multi_ads_settings = 'multi_ads_settings' + music_on_reels_opt_in = 'music_on_reels_opt_in' + muted_cbo_midflight_education_messages = 'muted_cbo_midflight_education_messages' + onsite_destination_optimization_opt_in = 'onsite_destination_optimization_opt_in' + open_tabs = 'open_tabs' + previously_seen_recommendations = 'previously_seen_recommendations' + product_extensions_opt_in = 'product_extensions_opt_in' + selected_ad_account = 'selected_ad_account' + selected_comparison_timerange = 'selected_comparison_timerange' + selected_metric_cic = 'selected_metric_cic' + selected_metrics_cic = 'selected_metrics_cic' + selected_page = 'selected_page' + selected_page_section = 'selected_page_section' + selected_power_editor_pane = 'selected_power_editor_pane' + selected_stat_range = 'selected_stat_range' + should_export_filter_empty_cols = 'should_export_filter_empty_cols' + should_export_rows_without_unsupported_feature = 'should_export_rows_without_unsupported_feature' + should_not_auto_expand_tree_table = 'should_not_auto_expand_tree_table' + should_not_show_cbo_campaign_toggle_off_confirmation_message = 'should_not_show_cbo_campaign_toggle_off_confirmation_message' + should_not_show_publish_message_on_editor_close = 'should_not_show_publish_message_on_editor_close' + show_original_videos_opt_in = 'show_original_videos_opt_in' + static_ad_product_extensions_opt_in = 'static_ad_product_extensions_opt_in' + sticky_setting_after_default_on = 'sticky_setting_after_default_on' + syd_campaign_trends_metric = 'syd_campaign_trends_metric' + total_coupon_syd_dismissals = 'total_coupon_syd_dismissals' + total_coupon_upsell_dismissals = 'total_coupon_upsell_dismissals' + use_pe_create_flow = 'use_pe_create_flow' + use_stepper_primary_entry = 'use_stepper_primary_entry' + user = 'user' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsUserSettings, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'a_plus_c_survey_seen': 'bool', + 'adgroup_name_template': 'Object', + 'ads_tool_visits': 'list', + 'aplusc_carousel_cda_opt_in_status': 'string', + 'aplusc_carousel_inline_comment_opt_in_status': 'string', + 'aplusc_epa_opt_in_status': 'string', + 'aplusc_opt_out_friction': 'list', + 'autoflow_lite_opt_in_status': 'string', + 'autoflow_lite_should_opt_in': 'bool', + 'blended_ads_creation_defaulting_opt_in_status': 'string', + 'bookmarked_pages': 'list', + 'campaign_group_name_template': 'Object', + 'campaign_name_template': 'Object', + 'carousel_to_video_opt_in_status': 'string', + 'connected_sources_catalog_opt_in_status': 'string', + 'default_creation_mode': 'string', + 'export_format_default': 'string', + 'focus_mode_default': 'string', + 'gen_ai_alpha_test_status': 'int', + 'id': 'string', + 'image_expansion_opt_in_status': 'string', + 'is_ads_ai_consented': 'bool', + 'is_cbo_default_on': 'bool', + 'is_se_removal_guidance_dismissed': 'bool', + 'last_used_post_format': 'string', + 'last_visited_time': 'datetime', + 'multi_ads_settings': 'list>', + 'music_on_reels_opt_in': 'list>', + 'muted_cbo_midflight_education_messages': 'list', + 'onsite_destination_optimization_opt_in': 'string', + 'open_tabs': 'list', + 'previously_seen_recommendations': 'list', + 'product_extensions_opt_in': 'string', + 'selected_ad_account': 'AdAccount', + 'selected_comparison_timerange': 'Object', + 'selected_metric_cic': 'string', + 'selected_metrics_cic': 'list', + 'selected_page': 'Page', + 'selected_page_section': 'string', + 'selected_power_editor_pane': 'string', + 'selected_stat_range': 'Object', + 'should_export_filter_empty_cols': 'string', + 'should_export_rows_without_unsupported_feature': 'string', + 'should_not_auto_expand_tree_table': 'bool', + 'should_not_show_cbo_campaign_toggle_off_confirmation_message': 'bool', + 'should_not_show_publish_message_on_editor_close': 'bool', + 'show_original_videos_opt_in': 'string', + 'static_ad_product_extensions_opt_in': 'string', + 'sticky_setting_after_default_on': 'string', + 'syd_campaign_trends_metric': 'string', + 'total_coupon_syd_dismissals': 'int', + 'total_coupon_upsell_dismissals': 'int', + 'use_pe_create_flow': 'bool', + 'use_stepper_primary_entry': 'bool', + 'user': 'User', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adsvalueadjustmentrule.py b/facebook_business/adobjects/adsvalueadjustmentrule.py new file mode 100644 index 000000000..553425845 --- /dev/null +++ b/facebook_business/adobjects/adsvalueadjustmentrule.py @@ -0,0 +1,102 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdsValueAdjustmentRule( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdsValueAdjustmentRule = True + super(AdsValueAdjustmentRule, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + base_value = 'base_value' + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsValueAdjustmentRule, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_criterias(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/criterias', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'base_value': 'int', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adsvalueadjustmentrulecollection.py b/facebook_business/adobjects/adsvalueadjustmentrulecollection.py new file mode 100644 index 000000000..1e6df1dc8 --- /dev/null +++ b/facebook_business/adobjects/adsvalueadjustmentrulecollection.py @@ -0,0 +1,102 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdsValueAdjustmentRuleCollection( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdsValueAdjustmentRuleCollection = True + super(AdsValueAdjustmentRuleCollection, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + name = 'name' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsValueAdjustmentRuleCollection, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_personas(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/personas', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adtopline.py b/facebook_business/adobjects/adtopline.py new file mode 100644 index 000000000..9fbc4231e --- /dev/null +++ b/facebook_business/adobjects/adtopline.py @@ -0,0 +1,138 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdTopline( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdTopline = True + super(AdTopline, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account_id = 'account_id' + client_approval_date = 'client_approval_date' + created_by = 'created_by' + created_date = 'created_date' + description = 'description' + flight_end_date = 'flight_end_date' + flight_start_date = 'flight_start_date' + func_cap_amount = 'func_cap_amount' + func_cap_amount_with_offset = 'func_cap_amount_with_offset' + func_line_amount = 'func_line_amount' + func_line_amount_with_offset = 'func_line_amount_with_offset' + func_price = 'func_price' + func_price_with_offset = 'func_price_with_offset' + gender = 'gender' + id = 'id' + impressions = 'impressions' + io_number = 'io_number' + is_bonus_line = 'is_bonus_line' + keywords = 'keywords' + last_updated_by = 'last_updated_by' + last_updated_date = 'last_updated_date' + line_number = 'line_number' + line_position = 'line_position' + line_type = 'line_type' + location = 'location' + max_age = 'max_age' + max_budget = 'max_budget' + min_age = 'min_age' + price_per_trp = 'price_per_trp' + product_type = 'product_type' + rev_assurance_approval_date = 'rev_assurance_approval_date' + targets = 'targets' + trp_updated_time = 'trp_updated_time' + trp_value = 'trp_value' + uom = 'uom' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdTopline, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'account_id': 'string', + 'client_approval_date': 'datetime', + 'created_by': 'string', + 'created_date': 'datetime', + 'description': 'string', + 'flight_end_date': 'datetime', + 'flight_start_date': 'datetime', + 'func_cap_amount': 'string', + 'func_cap_amount_with_offset': 'string', + 'func_line_amount': 'string', + 'func_line_amount_with_offset': 'string', + 'func_price': 'string', + 'func_price_with_offset': 'string', + 'gender': 'string', + 'id': 'string', + 'impressions': 'int', + 'io_number': 'int', + 'is_bonus_line': 'int', + 'keywords': 'string', + 'last_updated_by': 'string', + 'last_updated_date': 'datetime', + 'line_number': 'int', + 'line_position': 'int', + 'line_type': 'string', + 'location': 'string', + 'max_age': 'string', + 'max_budget': 'string', + 'min_age': 'string', + 'price_per_trp': 'string', + 'product_type': 'string', + 'rev_assurance_approval_date': 'datetime', + 'targets': 'string', + 'trp_updated_time': 'int', + 'trp_value': 'string', + 'uom': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/adtoplinedetail.py b/facebook_business/adobjects/adtoplinedetail.py new file mode 100644 index 000000000..301b407c7 --- /dev/null +++ b/facebook_business/adobjects/adtoplinedetail.py @@ -0,0 +1,96 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdToplineDetail( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdToplineDetail = True + super(AdToplineDetail, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + active_status = 'active_status' + ad_account_id = 'ad_account_id' + flight_end_date = 'flight_end_date' + flight_start_date = 'flight_start_date' + id = 'id' + io_number = 'io_number' + line_number = 'line_number' + price = 'price' + quantity = 'quantity' + sf_detail_line_id = 'sf_detail_line_id' + subline_id = 'subline_id' + targets = 'targets' + time_created = 'time_created' + time_updated = 'time_updated' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdToplineDetail, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'active_status': 'int', + 'ad_account_id': 'string', + 'flight_end_date': 'datetime', + 'flight_start_date': 'datetime', + 'id': 'string', + 'io_number': 'int', + 'line_number': 'int', + 'price': 'float', + 'quantity': 'float', + 'sf_detail_line_id': 'string', + 'subline_id': 'string', + 'targets': 'string', + 'time_created': 'datetime', + 'time_updated': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/advainstance.py b/facebook_business/adobjects/advainstance.py new file mode 100644 index 000000000..72bf54b95 --- /dev/null +++ b/facebook_business/adobjects/advainstance.py @@ -0,0 +1,76 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AdvAInstance( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAdvAInstance = True + super(AdvAInstance, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + instance_type = 'instance_type' + name = 'name' + owner_business = 'owner_business' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdvAInstance, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'instance_type': 'string', + 'name': 'string', + 'owner_business': 'Business', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/advertiserverificationstatus.py b/facebook_business/adobjects/advertiserverificationstatus.py new file mode 100644 index 000000000..73b128140 --- /dev/null +++ b/facebook_business/adobjects/advertiserverificationstatus.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdvertiserVerificationStatus( + AbstractObject, +): + + def __init__(self, api=None): + super(AdvertiserVerificationStatus, self).__init__() + self._isAdvertiserVerificationStatus = True + self._api = api + + class Field(AbstractObject.Field): + banner_type = 'banner_type' + grace_period_ends_at = 'grace_period_ends_at' + ufac_redirect_uri = 'ufac_redirect_uri' + verification_status = 'verification_status' + + _field_types = { + 'banner_type': 'string', + 'grace_period_ends_at': 'datetime', + 'ufac_redirect_uri': 'string', + 'verification_status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/advideo.py b/facebook_business/adobjects/advideo.py index f18171854..d52fb8f5a 100644 --- a/facebook_business/adobjects/advideo.py +++ b/facebook_business/adobjects/advideo.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -49,6 +35,7 @@ class Field(AbstractObject.Field): content_category = 'content_category' content_tags = 'content_tags' copyright = 'copyright' + copyright_check_information = 'copyright_check_information' copyright_monitoring_status = 'copyright_monitoring_status' created_time = 'created_time' custom_labels = 'custom_labels' @@ -73,6 +60,7 @@ class Field(AbstractObject.Field): permalink_url = 'permalink_url' picture = 'picture' place = 'place' + post_id = 'post_id' post_views = 'post_views' premiere_living_room_status = 'premiere_living_room_status' privacy = 'privacy' @@ -85,7 +73,6 @@ class Field(AbstractObject.Field): universal_video_id = 'universal_video_id' updated_time = 'updated_time' views = 'views' - adaptive_type = 'adaptive_type' animated_effect_id = 'animated_effect_id' application_id = 'application_id' asked_fun_fact_prompt_id = 'asked_fun_fact_prompt_id' @@ -112,7 +99,6 @@ class Field(AbstractObject.Field): fun_fact_toastee_id = 'fun_fact_toastee_id' guide = 'guide' guide_enabled = 'guide_enabled' - has_nickname = 'has_nickname' holiday_card = 'holiday_card' initial_heading = 'initial_heading' initial_pitch = 'initial_pitch' @@ -131,7 +117,6 @@ class Field(AbstractObject.Field): original_fov = 'original_fov' original_projection_type = 'original_projection_type' publish_event_id = 'publish_event_id' - react_mode_metadata = 'react_mode_metadata' referenced_sticker_id = 'referenced_sticker_id' replace_video_id = 'replace_video_id' slideshow_spec = 'slideshow_spec' @@ -151,6 +136,9 @@ class Field(AbstractObject.Field): video_id_original = 'video_id_original' video_start_time_ms = 'video_start_time_ms' waterfall_id = 'waterfall_id' + ad_placements_validation_only = 'ad_placements_validation_only' + creative_folder_id = 'creative_folder_id' + validation_ad_placements = 'validation_ad_placements' filename = 'filename' filepath = 'filepath' @@ -174,7 +162,6 @@ class ContainerType: audio_comment = 'AUDIO_COMMENT' broadcast = 'BROADCAST' bulletin_article_audio = 'BULLETIN_ARTICLE_AUDIO' - candidate_videos_deleted = 'CANDIDATE_VIDEOS_DELETED' canvas = 'CANVAS' cfc_video = 'CFC_VIDEO' cms_media_manager = 'CMS_MEDIA_MANAGER' @@ -182,8 +169,10 @@ class ContainerType: contained_post_audio_broadcast = 'CONTAINED_POST_AUDIO_BROADCAST' contained_post_copyright_reference_broadcast = 'CONTAINED_POST_COPYRIGHT_REFERENCE_BROADCAST' copyright_reference_broadcast = 'COPYRIGHT_REFERENCE_BROADCAST' + copyright_reference_ig_xpost_video = 'COPYRIGHT_REFERENCE_IG_XPOST_VIDEO' copyright_reference_video = 'COPYRIGHT_REFERENCE_VIDEO' creation_ml_precreation = 'CREATION_ML_PRECREATION' + datagenix_video = 'DATAGENIX_VIDEO' dco_ad_asset_feed = 'DCO_AD_ASSET_FEED' dco_autogen_video = 'DCO_AUTOGEN_VIDEO' dco_trimmed_video = 'DCO_TRIMMED_VIDEO' @@ -204,6 +193,7 @@ class ContainerType: fb_shorts_content_remixable = 'FB_SHORTS_CONTENT_REMIXABLE' fb_shorts_cross_meta_post = 'FB_SHORTS_CROSS_META_POST' fb_shorts_group_post = 'FB_SHORTS_GROUP_POST' + fb_shorts_linked_product = 'FB_SHORTS_LINKED_PRODUCT' fb_shorts_pmv_post = 'FB_SHORTS_PMV_POST' fb_shorts_pmv_post_no_newsfeed_nor_timeline = 'FB_SHORTS_PMV_POST_NO_NEWSFEED_NOR_TIMELINE' fb_shorts_post = 'FB_SHORTS_POST' @@ -221,7 +211,6 @@ class ContainerType: group_post = 'GROUP_POST' hack_tv = 'HACK_TV' heuristic_cluster_video = 'HEURISTIC_CLUSTER_VIDEO' - heuristic_preview = 'HEURISTIC_PREVIEW' highlight_clip_video = 'HIGHLIGHT_CLIP_VIDEO' huddle_broadcast = 'HUDDLE_BROADCAST' ig_reels_xpv = 'IG_REELS_XPV' @@ -231,13 +220,13 @@ class ContainerType: instagram_video_copy = 'INSTAGRAM_VIDEO_COPY' instant_application_preview = 'INSTANT_APPLICATION_PREVIEW' instant_article = 'INSTANT_ARTICLE' + instant_games_promo = 'INSTANT_GAMES_PROMO' instant_game_clip = 'INSTANT_GAME_CLIP' issue_module = 'ISSUE_MODULE' jobs_careers = 'JOBS_CAREERS' jobs_visual_intro_entry = 'JOBS_VISUAL_INTRO_ENTRY' job_application_video = 'JOB_APPLICATION_VIDEO' job_opening_video = 'JOB_OPENING_VIDEO' - kototoro = 'KOTOTORO' learn = 'LEARN' legacy = 'LEGACY' legacy_contained_post_broadcast = 'LEGACY_CONTAINED_POST_BROADCAST' @@ -255,6 +244,7 @@ class ContainerType: music_clip_in_audio_digest = 'MUSIC_CLIP_IN_AUDIO_DIGEST' music_clip_in_comment = 'MUSIC_CLIP_IN_COMMENT' music_clip_in_lightweight_status = 'MUSIC_CLIP_IN_LIGHTWEIGHT_STATUS' + music_clip_in_msgr_note = 'MUSIC_CLIP_IN_MSGR_NOTE' music_clip_in_poll_option = 'MUSIC_CLIP_IN_POLL_OPTION' music_clip_on_dating_profile = 'MUSIC_CLIP_ON_DATING_PROFILE' neo_async_game_video = 'NEO_ASYNC_GAME_VIDEO' @@ -293,6 +283,7 @@ class ContainerType: profile_intro_card = 'PROFILE_INTRO_CARD' profile_video = 'PROFILE_VIDEO' proton = 'PROTON' + quick_clip_workplace_post = 'QUICK_CLIP_WORKPLACE_POST' quick_promotion = 'QUICK_PROMOTION' replace_video = 'REPLACE_VIDEO' sales_client_interaction = 'SALES_CLIENT_INTERACTION' @@ -301,11 +292,9 @@ class ContainerType: slideshow_animoto = 'SLIDESHOW_ANIMOTO' slideshow_shakr = 'SLIDESHOW_SHAKR' slideshow_variation_video = 'SLIDESHOW_VARIATION_VIDEO' - sotto_content = 'SOTTO_CONTENT' soundbites_video = 'SOUNDBITES_VIDEO' sound_platform_stream = 'SOUND_PLATFORM_STREAM' srt_attachment = 'SRT_ATTACHMENT' - stages_broadcast = 'STAGES_BROADCAST' stories_video = 'STORIES_VIDEO' stories_wearable = 'STORIES_WEARABLE' storyline = 'STORYLINE' @@ -317,7 +306,6 @@ class ContainerType: temporary_unlisted = 'TEMPORARY_UNLISTED' temp_multimedia_post = 'TEMP_MULTIMEDIA_POST' unlisted = 'UNLISTED' - unlisted_hack_tv = 'UNLISTED_HACK_TV' unlisted_horizon = 'UNLISTED_HORIZON' unlisted_oculus = 'UNLISTED_OCULUS' video_comment = 'VIDEO_COMMENT' @@ -377,6 +365,31 @@ class UploadPhase: start = 'start' transfer = 'transfer' + class ValidationAdPlacements: + audience_network_instream_video = 'AUDIENCE_NETWORK_INSTREAM_VIDEO' + audience_network_instream_video_mobile = 'AUDIENCE_NETWORK_INSTREAM_VIDEO_MOBILE' + audience_network_rewarded_video = 'AUDIENCE_NETWORK_REWARDED_VIDEO' + desktop_feed_standard = 'DESKTOP_FEED_STANDARD' + facebook_story_mobile = 'FACEBOOK_STORY_MOBILE' + facebook_story_sticker_mobile = 'FACEBOOK_STORY_STICKER_MOBILE' + instagram_standard = 'INSTAGRAM_STANDARD' + instagram_story = 'INSTAGRAM_STORY' + instant_article_standard = 'INSTANT_ARTICLE_STANDARD' + instream_banner_desktop = 'INSTREAM_BANNER_DESKTOP' + instream_banner_mobile = 'INSTREAM_BANNER_MOBILE' + instream_video_desktop = 'INSTREAM_VIDEO_DESKTOP' + instream_video_image = 'INSTREAM_VIDEO_IMAGE' + instream_video_mobile = 'INSTREAM_VIDEO_MOBILE' + messenger_mobile_inbox_media = 'MESSENGER_MOBILE_INBOX_MEDIA' + messenger_mobile_story_media = 'MESSENGER_MOBILE_STORY_MEDIA' + mobile_feed_standard = 'MOBILE_FEED_STANDARD' + mobile_fullwidth = 'MOBILE_FULLWIDTH' + mobile_interstitial = 'MOBILE_INTERSTITIAL' + mobile_medium_rectangle = 'MOBILE_MEDIUM_RECTANGLE' + mobile_native = 'MOBILE_NATIVE' + right_column_standard = 'RIGHT_COLUMN_STANDARD' + suggested_video_mobile = 'SUGGESTED_VIDEO_MOBILE' + class Type: tagged = 'tagged' uploaded = 'uploaded' @@ -731,7 +744,7 @@ def create_comment(self, fields=None, params=None, batch=None, success=None, fai self.assure_call() return request.execute() - def get_crosspost_shared_pages(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_crosspost_share_d_pages(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -992,6 +1005,7 @@ def get_tags(self, fields=None, params=None, batch=None, success=None, failure=N from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.taggablesubject import TaggableSubject param_types = { } enums = { @@ -1002,9 +1016,9 @@ def get_tags(self, fields=None, params=None, batch=None, success=None, failure=N endpoint='/tags', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=TaggableSubject, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=TaggableSubject, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -1153,12 +1167,13 @@ def get_video_insights(self, fields=None, params=None, batch=None, success=None, _field_types = { 'ad_breaks': 'list', 'admin_creator': 'User', - 'audio_isrc': 'Object', + 'audio_isrc': 'AudioIsrc', 'backdated_time': 'datetime', 'backdated_time_granularity': 'string', 'content_category': 'string', 'content_tags': 'list', 'copyright': 'VideoCopyright', + 'copyright_check_information': 'Object', 'copyright_monitoring_status': 'string', 'created_time': 'datetime', 'custom_labels': 'list', @@ -1180,9 +1195,10 @@ def get_video_insights(self, fields=None, params=None, batch=None, success=None, 'live_audience_count': 'unsigned int', 'live_status': 'string', 'music_video_copyright': 'MusicVideoCopyright', - 'permalink_url': 'Object', + 'permalink_url': 'string', 'picture': 'string', 'place': 'Place', + 'post_id': 'string', 'post_views': 'unsigned int', 'premiere_living_room_status': 'string', 'privacy': 'Privacy', @@ -1190,12 +1206,11 @@ def get_video_insights(self, fields=None, params=None, batch=None, success=None, 'scheduled_publish_time': 'datetime', 'source': 'string', 'spherical': 'bool', - 'status': 'Object', + 'status': 'VideoStatus', 'title': 'string', 'universal_video_id': 'string', 'updated_time': 'datetime', 'views': 'unsigned int', - 'adaptive_type': 'string', 'animated_effect_id': 'unsigned int', 'application_id': 'string', 'asked_fun_fact_prompt_id': 'unsigned int', @@ -1222,7 +1237,6 @@ def get_video_insights(self, fields=None, params=None, batch=None, success=None, 'fun_fact_toastee_id': 'unsigned int', 'guide': 'list>', 'guide_enabled': 'bool', - 'has_nickname': 'bool', 'holiday_card': 'string', 'initial_heading': 'unsigned int', 'initial_pitch': 'unsigned int', @@ -1241,7 +1255,6 @@ def get_video_insights(self, fields=None, params=None, batch=None, success=None, 'original_fov': 'unsigned int', 'original_projection_type': 'OriginalProjectionType', 'publish_event_id': 'unsigned int', - 'react_mode_metadata': 'string', 'referenced_sticker_id': 'string', 'replace_video_id': 'string', 'slideshow_spec': 'map', @@ -1261,6 +1274,9 @@ def get_video_insights(self, fields=None, params=None, batch=None, success=None, 'video_id_original': 'string', 'video_start_time_ms': 'unsigned int', 'waterfall_id': 'string', + 'ad_placements_validation_only': 'bool', + 'creative_folder_id': 'string', + 'validation_ad_placements': 'list', 'filename': 'file' } @classmethod @@ -1273,6 +1289,7 @@ def _get_field_enum_info(cls): field_enum_info['SwapMode'] = AdVideo.SwapMode.__dict__.values() field_enum_info['UnpublishedContentType'] = AdVideo.UnpublishedContentType.__dict__.values() field_enum_info['UploadPhase'] = AdVideo.UploadPhase.__dict__.values() + field_enum_info['ValidationAdPlacements'] = AdVideo.ValidationAdPlacements.__dict__.values() field_enum_info['Type'] = AdVideo.Type.__dict__.values() field_enum_info['VideoState'] = AdVideo.VideoState.__dict__.values() field_enum_info['BackdatedTimeGranularity'] = AdVideo.BackdatedTimeGranularity.__dict__.values() diff --git a/facebook_business/adobjects/advolume.py b/facebook_business/adobjects/advolume.py new file mode 100644 index 000000000..431eb43df --- /dev/null +++ b/facebook_business/adobjects/advolume.py @@ -0,0 +1,55 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AdVolume( + AbstractObject, +): + + def __init__(self, api=None): + super(AdVolume, self).__init__() + self._isAdVolume = True + self._api = api + + class Field(AbstractObject.Field): + ad_volume_break_down = 'ad_volume_break_down' + ads_running_or_in_review_count = 'ads_running_or_in_review_count' + future_limit_activation_date = 'future_limit_activation_date' + future_limit_on_ads_running_or_in_review = 'future_limit_on_ads_running_or_in_review' + individual_accounts_ad_volume = 'individual_accounts_ad_volume' + is_gpa_page = 'is_gpa_page' + limit_on_ads_running_or_in_review = 'limit_on_ads_running_or_in_review' + owning_business_ad_volume = 'owning_business_ad_volume' + partner_business_ad_volume = 'partner_business_ad_volume' + user_role = 'user_role' + + _field_types = { + 'ad_volume_break_down': 'list', + 'ads_running_or_in_review_count': 'unsigned int', + 'future_limit_activation_date': 'string', + 'future_limit_on_ads_running_or_in_review': 'unsigned int', + 'individual_accounts_ad_volume': 'int', + 'is_gpa_page': 'bool', + 'limit_on_ads_running_or_in_review': 'unsigned int', + 'owning_business_ad_volume': 'int', + 'partner_business_ad_volume': 'int', + 'user_role': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/agencyclientdeclaration.py b/facebook_business/adobjects/agencyclientdeclaration.py index 158d622be..06ff215b6 100644 --- a/facebook_business/adobjects/agencyclientdeclaration.py +++ b/facebook_business/adobjects/agencyclientdeclaration.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/agerange.py b/facebook_business/adobjects/agerange.py index a89dddb18..59dfe8e4b 100644 --- a/facebook_business/adobjects/agerange.py +++ b/facebook_business/adobjects/agerange.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/album.py b/facebook_business/adobjects/album.py index a67d81e1e..f7de684c3 100644 --- a/facebook_business/adobjects/album.py +++ b/facebook_business/adobjects/album.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -318,7 +304,6 @@ def create_photo(self, fields=None, params=None, batch=None, success=None, failu 'proxied_app_id': 'string', 'published': 'bool', 'qn': 'string', - 'scheduled_publish_time': 'unsigned int', 'spherical_metadata': 'map', 'sponsor_id': 'string', 'sponsor_relationship': 'unsigned int', @@ -401,12 +386,12 @@ def get_picture(self, fields=None, params=None, batch=None, success=None, failur 'cover_photo': 'Photo', 'created_time': 'datetime', 'description': 'string', - 'edit_link': 'Object', + 'edit_link': 'string', 'event': 'Event', 'from': 'Object', 'id': 'string', 'is_user_facing': 'bool', - 'link': 'Object', + 'link': 'string', 'location': 'string', 'modified_major': 'datetime', 'name': 'string', diff --git a/facebook_business/adobjects/amoneshopsettings.py b/facebook_business/adobjects/amoneshopsettings.py new file mode 100644 index 000000000..6a973c712 --- /dev/null +++ b/facebook_business/adobjects/amoneshopsettings.py @@ -0,0 +1,36 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AMOneshopSettings( + AbstractObject, +): + + def __init__(self, api=None): + super(AMOneshopSettings, self).__init__() + self._isAMOneshopSettings = True + self._api = api + + class Field(AbstractObject.Field): + pass + + _field_types = { + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/analyticscohortqueryresult.py b/facebook_business/adobjects/analyticscohortqueryresult.py new file mode 100644 index 000000000..a13653b8d --- /dev/null +++ b/facebook_business/adobjects/analyticscohortqueryresult.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AnalyticsCohortQueryResult( + AbstractObject, +): + + def __init__(self, api=None): + super(AnalyticsCohortQueryResult, self).__init__() + self._isAnalyticsCohortQueryResult = True + self._api = api + + class Field(AbstractObject.Field): + data = 'data' + error = 'error' + query_id = 'query_id' + status = 'status' + + _field_types = { + 'data': 'Object', + 'error': 'Object', + 'query_id': 'string', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/analyticsconfig.py b/facebook_business/adobjects/analyticsconfig.py new file mode 100644 index 000000000..b551e9dac --- /dev/null +++ b/facebook_business/adobjects/analyticsconfig.py @@ -0,0 +1,87 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AnalyticsConfig( + AbstractObject, +): + + def __init__(self, api=None): + super(AnalyticsConfig, self).__init__() + self._isAnalyticsConfig = True + self._api = api + + class Field(AbstractObject.Field): + analytics_access_for_authorized_ad_account = 'analytics_access_for_authorized_ad_account' + breakdowns_config = 'breakdowns_config' + builtin_fields_config = 'builtin_fields_config' + deprecated_events_config = 'deprecated_events_config' + events_config = 'events_config' + ios_purchase_validation_secret = 'ios_purchase_validation_secret' + is_any_role_able_to_see_restricted_insights = 'is_any_role_able_to_see_restricted_insights' + is_implicit_purchase_logging_on_android_supported = 'is_implicit_purchase_logging_on_android_supported' + is_implicit_purchase_logging_on_ios_supported = 'is_implicit_purchase_logging_on_ios_supported' + is_track_ios_app_uninstall_supported = 'is_track_ios_app_uninstall_supported' + journey_backfill_status = 'journey_backfill_status' + journey_conversion_events = 'journey_conversion_events' + journey_enabled = 'journey_enabled' + journey_impacting_change_time = 'journey_impacting_change_time' + journey_timeout = 'journey_timeout' + latest_sdk_versions = 'latest_sdk_versions' + log_android_implicit_purchase_events = 'log_android_implicit_purchase_events' + log_automatic_analytics_events = 'log_automatic_analytics_events' + log_implicit_purchase_events = 'log_implicit_purchase_events' + prev_journey_conversion_events = 'prev_journey_conversion_events' + query_approximation_accuracy_level = 'query_approximation_accuracy_level' + query_currency = 'query_currency' + query_timezone = 'query_timezone' + recent_events_update_time = 'recent_events_update_time' + session_timeout_interval = 'session_timeout_interval' + track_ios_app_uninstall = 'track_ios_app_uninstall' + + _field_types = { + 'analytics_access_for_authorized_ad_account': 'bool', + 'breakdowns_config': 'list', + 'builtin_fields_config': 'list', + 'deprecated_events_config': 'list', + 'events_config': 'list', + 'ios_purchase_validation_secret': 'string', + 'is_any_role_able_to_see_restricted_insights': 'bool', + 'is_implicit_purchase_logging_on_android_supported': 'bool', + 'is_implicit_purchase_logging_on_ios_supported': 'bool', + 'is_track_ios_app_uninstall_supported': 'bool', + 'journey_backfill_status': 'string', + 'journey_conversion_events': 'list', + 'journey_enabled': 'bool', + 'journey_impacting_change_time': 'datetime', + 'journey_timeout': 'string', + 'latest_sdk_versions': 'map', + 'log_android_implicit_purchase_events': 'bool', + 'log_automatic_analytics_events': 'bool', + 'log_implicit_purchase_events': 'bool', + 'prev_journey_conversion_events': 'list', + 'query_approximation_accuracy_level': 'string', + 'query_currency': 'string', + 'query_timezone': 'string', + 'recent_events_update_time': 'datetime', + 'session_timeout_interval': 'unsigned int', + 'track_ios_app_uninstall': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/analyticsentityuserconfig.py b/facebook_business/adobjects/analyticsentityuserconfig.py new file mode 100644 index 000000000..edd435c5b --- /dev/null +++ b/facebook_business/adobjects/analyticsentityuserconfig.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AnalyticsEntityUserConfig( + AbstractObject, +): + + def __init__(self, api=None): + super(AnalyticsEntityUserConfig, self).__init__() + self._isAnalyticsEntityUserConfig = True + self._api = api + + class Field(AbstractObject.Field): + dismissed_notices = 'dismissed_notices' + + _field_types = { + 'dismissed_notices': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/analyticsfunnelqueryresult.py b/facebook_business/adobjects/analyticsfunnelqueryresult.py new file mode 100644 index 000000000..c8f64e723 --- /dev/null +++ b/facebook_business/adobjects/analyticsfunnelqueryresult.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AnalyticsFunnelQueryResult( + AbstractObject, +): + + def __init__(self, api=None): + super(AnalyticsFunnelQueryResult, self).__init__() + self._isAnalyticsFunnelQueryResult = True + self._api = api + + class Field(AbstractObject.Field): + data = 'data' + error = 'error' + query_id = 'query_id' + status = 'status' + + _field_types = { + 'data': 'Object', + 'error': 'Object', + 'query_id': 'string', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/analyticsplatformmetricsconfig.py b/facebook_business/adobjects/analyticsplatformmetricsconfig.py new file mode 100644 index 000000000..36443e3fa --- /dev/null +++ b/facebook_business/adobjects/analyticsplatformmetricsconfig.py @@ -0,0 +1,53 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AnalyticsPlatformMetricsConfig( + AbstractObject, +): + + def __init__(self, api=None): + super(AnalyticsPlatformMetricsConfig, self).__init__() + self._isAnalyticsPlatformMetricsConfig = True + self._api = api + + class Field(AbstractObject.Field): + has_a2u = 'has_a2u' + has_api_calls = 'has_api_calls' + has_app_invites = 'has_app_invites' + has_fb_login = 'has_fb_login' + has_game_requests = 'has_game_requests' + has_payments = 'has_payments' + has_referrals = 'has_referrals' + has_stories = 'has_stories' + has_structured_requests = 'has_structured_requests' + + _field_types = { + 'has_a2u': 'bool', + 'has_api_calls': 'bool', + 'has_app_invites': 'bool', + 'has_fb_login': 'bool', + 'has_game_requests': 'bool', + 'has_payments': 'bool', + 'has_referrals': 'bool', + 'has_stories': 'bool', + 'has_structured_requests': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/analyticsqueryresult.py b/facebook_business/adobjects/analyticsqueryresult.py new file mode 100644 index 000000000..c654f4504 --- /dev/null +++ b/facebook_business/adobjects/analyticsqueryresult.py @@ -0,0 +1,45 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AnalyticsQueryResult( + AbstractObject, +): + + def __init__(self, api=None): + super(AnalyticsQueryResult, self).__init__() + self._isAnalyticsQueryResult = True + self._api = api + + class Field(AbstractObject.Field): + columns = 'columns' + datapoints = 'datapoints' + error = 'error' + query_id = 'query_id' + status = 'status' + + _field_types = { + 'columns': 'Object', + 'datapoints': 'list', + 'error': 'Object', + 'query_id': 'string', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/analyticssegment.py b/facebook_business/adobjects/analyticssegment.py new file mode 100644 index 000000000..641c1d7bd --- /dev/null +++ b/facebook_business/adobjects/analyticssegment.py @@ -0,0 +1,105 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AnalyticsSegment( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAnalyticsSegment = True + super(AnalyticsSegment, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + custom_audience_ineligiblity_reasons = 'custom_audience_ineligiblity_reasons' + description = 'description' + estimated_custom_audience_size = 'estimated_custom_audience_size' + event_info_rules = 'event_info_rules' + event_rules = 'event_rules' + filter_set = 'filter_set' + has_demographic_rules = 'has_demographic_rules' + id = 'id' + is_all_user = 'is_all_user' + is_eligible_for_push_campaign = 'is_eligible_for_push_campaign' + is_internal = 'is_internal' + name = 'name' + percentile_rules = 'percentile_rules' + time_last_seen = 'time_last_seen' + time_last_updated = 'time_last_updated' + user_property_rules = 'user_property_rules' + web_param_rules = 'web_param_rules' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'async_task_id': 'string', + 'end_date': 'int', + 'start_date': 'int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AnalyticsSegment, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'custom_audience_ineligiblity_reasons': 'list', + 'description': 'string', + 'estimated_custom_audience_size': 'unsigned int', + 'event_info_rules': 'list', + 'event_rules': 'list', + 'filter_set': 'string', + 'has_demographic_rules': 'bool', + 'id': 'string', + 'is_all_user': 'bool', + 'is_eligible_for_push_campaign': 'bool', + 'is_internal': 'bool', + 'name': 'string', + 'percentile_rules': 'list', + 'time_last_seen': 'unsigned int', + 'time_last_updated': 'unsigned int', + 'user_property_rules': 'list', + 'web_param_rules': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/analyticsuserconfig.py b/facebook_business/adobjects/analyticsuserconfig.py new file mode 100644 index 000000000..85a631f4a --- /dev/null +++ b/facebook_business/adobjects/analyticsuserconfig.py @@ -0,0 +1,74 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AnalyticsUserConfig( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAnalyticsUserConfig = True + super(AnalyticsUserConfig, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + demo_app_nux_config = 'demo_app_nux_config' + flags = 'flags' + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AnalyticsUserConfig, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'demo_app_nux_config': 'Object', + 'flags': 'list>', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/anblockedbicategory.py b/facebook_business/adobjects/anblockedbicategory.py new file mode 100644 index 000000000..ed106d101 --- /dev/null +++ b/facebook_business/adobjects/anblockedbicategory.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ANBlockedBICategory( + AbstractObject, +): + + def __init__(self, api=None): + super(ANBlockedBICategory, self).__init__() + self._isANBlockedBICategory = True + self._api = api + + class Field(AbstractObject.Field): + key = 'key' + + _field_types = { + 'key': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/androidapplink.py b/facebook_business/adobjects/androidapplink.py index 5d5355a27..279a14108 100644 --- a/facebook_business/adobjects/androidapplink.py +++ b/facebook_business/adobjects/androidapplink.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/appeventconfig.py b/facebook_business/adobjects/appeventconfig.py new file mode 100644 index 000000000..858beaa49 --- /dev/null +++ b/facebook_business/adobjects/appeventconfig.py @@ -0,0 +1,123 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AppEventConfig( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAppEventConfig = True + super(AppEventConfig, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + breakdowns_config = 'breakdowns_config' + builtin_fields_config = 'builtin_fields_config' + deprecated_events_config = 'deprecated_events_config' + events_config = 'events_config' + id = 'id' + ios_purchase_validation_secret = 'ios_purchase_validation_secret' + is_any_role_able_to_see_restricted_insights = 'is_any_role_able_to_see_restricted_insights' + is_implicit_purchase_logging_on_android_supported = 'is_implicit_purchase_logging_on_android_supported' + is_implicit_purchase_logging_on_ios_supported = 'is_implicit_purchase_logging_on_ios_supported' + is_track_android_app_uninstall_supported = 'is_track_android_app_uninstall_supported' + is_track_ios_app_uninstall_supported = 'is_track_ios_app_uninstall_supported' + journey_backfill_status = 'journey_backfill_status' + journey_conversion_events = 'journey_conversion_events' + journey_enabled = 'journey_enabled' + journey_timeout = 'journey_timeout' + latest_sdk_versions = 'latest_sdk_versions' + log_android_implicit_purchase_events = 'log_android_implicit_purchase_events' + log_automatic_analytics_events = 'log_automatic_analytics_events' + log_implicit_purchase_events = 'log_implicit_purchase_events' + prev_journey_conversion_events = 'prev_journey_conversion_events' + query_approximation_accuracy_level = 'query_approximation_accuracy_level' + query_currency = 'query_currency' + query_timezone = 'query_timezone' + recent_events_update_time = 'recent_events_update_time' + session_timeout_interval = 'session_timeout_interval' + track_android_app_uninstall = 'track_android_app_uninstall' + track_ios_app_uninstall = 'track_ios_app_uninstall' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'event_name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AppEventConfig, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'breakdowns_config': 'list', + 'builtin_fields_config': 'list', + 'deprecated_events_config': 'list', + 'events_config': 'list', + 'id': 'string', + 'ios_purchase_validation_secret': 'string', + 'is_any_role_able_to_see_restricted_insights': 'bool', + 'is_implicit_purchase_logging_on_android_supported': 'bool', + 'is_implicit_purchase_logging_on_ios_supported': 'bool', + 'is_track_android_app_uninstall_supported': 'bool', + 'is_track_ios_app_uninstall_supported': 'bool', + 'journey_backfill_status': 'string', + 'journey_conversion_events': 'list', + 'journey_enabled': 'bool', + 'journey_timeout': 'string', + 'latest_sdk_versions': 'map', + 'log_android_implicit_purchase_events': 'bool', + 'log_automatic_analytics_events': 'bool', + 'log_implicit_purchase_events': 'bool', + 'prev_journey_conversion_events': 'list', + 'query_approximation_accuracy_level': 'string', + 'query_currency': 'string', + 'query_timezone': 'string', + 'recent_events_update_time': 'datetime', + 'session_timeout_interval': 'unsigned int', + 'track_android_app_uninstall': 'bool', + 'track_ios_app_uninstall': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/application.py b/facebook_business/adobjects/application.py index dce7bda41..02df28371 100644 --- a/facebook_business/adobjects/application.py +++ b/facebook_business/adobjects/application.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -66,6 +52,8 @@ class Field(AbstractObject.Field): auto_event_mapping_android = 'auto_event_mapping_android' auto_event_mapping_ios = 'auto_event_mapping_ios' auto_event_setup_enabled = 'auto_event_setup_enabled' + auto_log_app_events_default = 'auto_log_app_events_default' + auto_log_app_events_enabled = 'auto_log_app_events_enabled' business = 'business' canvas_fluid_height = 'canvas_fluid_height' canvas_fluid_width = 'canvas_fluid_width' @@ -118,6 +106,7 @@ class Field(AbstractObject.Field): privacy_policy_url = 'privacy_policy_url' profile_section_url = 'profile_section_url' property_id = 'property_id' + protected_mode_rules = 'protected_mode_rules' real_time_mode_devices = 'real_time_mode_devices' restrictions = 'restrictions' restrictive_data_filter_params = 'restrictive_data_filter_params' @@ -198,6 +187,30 @@ class LoggingTarget: app_and_page = 'APP_AND_PAGE' page = 'PAGE' + class OwnerPermissions: + develop = 'DEVELOP' + manage = 'MANAGE' + manage_extensions = 'MANAGE_EXTENSIONS' + manage_phone = 'MANAGE_PHONE' + manage_phone_assets = 'MANAGE_PHONE_ASSETS' + manage_templates = 'MANAGE_TEMPLATES' + messaging = 'MESSAGING' + view_cost = 'VIEW_COST' + view_phone_assets = 'VIEW_PHONE_ASSETS' + view_templates = 'VIEW_TEMPLATES' + + class PartnerPermissions: + develop = 'DEVELOP' + manage = 'MANAGE' + manage_extensions = 'MANAGE_EXTENSIONS' + manage_phone = 'MANAGE_PHONE' + manage_phone_assets = 'MANAGE_PHONE_ASSETS' + manage_templates = 'MANAGE_TEMPLATES' + messaging = 'MESSAGING' + view_cost = 'VIEW_COST' + view_phone_assets = 'VIEW_PHONE_ASSETS' + view_templates = 'VIEW_TEMPLATES' + # @deprecated get_endpoint function is deprecated @classmethod def get_endpoint(cls): @@ -446,10 +459,12 @@ def create_activity(self, fields=None, params=None, batch=None, success=None, fa 'page_id': 'unsigned int', 'page_scoped_user_id': 'unsigned int', 'receipt_data': 'string', + 'sdk_version': 'string', 'ud': 'map', 'url_schemes': 'list', 'user_id': 'string', 'user_id_type': 'user_id_type_enum', + 'vendor_id': 'string', 'windows_attribution_id': 'string', } enums = { @@ -801,6 +816,7 @@ def create_aem_skan_readiness(self, fields=None, params=None, batch=None, succes param_types = { 'app_id': 'int', 'is_aem_ready': 'bool', + 'is_app_aem_install_ready': 'bool', 'is_app_aem_ready': 'bool', 'is_skan_ready': 'bool', 'message': 'string', @@ -1347,27 +1363,24 @@ def get_da_checks(self, fields=None, params=None, batch=None, success=None, fail self.assure_call() return request.execute() - def get_events(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def create_domain_report(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.event import Event param_types = { - 'include_canceled': 'bool', - 'type': 'type_enum', + 'tracking_domains': 'list', } enums = { - 'type_enum': Event.Type.__dict__.values(), } request = FacebookRequest( node_id=self['id'], - method='GET', - endpoint='/events', + method='POST', + endpoint='/domain_reports', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=Event, + target_class=AbstractCrudObject, api_type='EDGE', - response_parser=ObjectParser(target_class=Event, api=self._api), + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -1381,18 +1394,19 @@ def get_events(self, fields=None, params=None, batch=None, success=None, failure self.assure_call() return request.execute() - def get_insights_push_schedule(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_iap_purchases(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') param_types = { + 'order_id': 'string', } enums = { } request = FacebookRequest( node_id=self['id'], method='GET', - endpoint='/insights_push_schedule', + endpoint='/iap_purchases', api=self._api, param_checker=TypeChecker(param_types, enums), target_class=AbstractCrudObject, @@ -1445,6 +1459,7 @@ def get_linked_dataset(self, fields=None, params=None, batch=None, success=None, from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adsdataset import AdsDataset param_types = { } enums = { @@ -1455,9 +1470,9 @@ def get_linked_dataset(self, fields=None, params=None, batch=None, success=None, endpoint='/linked_dataset', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=AdsDataset, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=AdsDataset, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -1483,6 +1498,7 @@ def create_mmp_auditing(self, fields=None, params=None, batch=None, success=None 'click_attr_window': 'unsigned int', 'custom_events': 'list', 'decline_reason': 'string', + 'engagement_type': 'string', 'event': 'string', 'event_reported_time': 'unsigned int', 'fb_ad_id': 'unsigned int', @@ -1648,6 +1664,37 @@ def get_object_types(self, fields=None, params=None, batch=None, success=None, f self.assure_call() return request.execute() + def get_objects(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.nullnode import NullNode + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/objects', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=NullNode, + api_type='EDGE', + response_parser=ObjectParser(target_class=NullNode, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def create_occludes_popup(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -1880,6 +1927,36 @@ def get_roles(self, fields=None, params=None, batch=None, success=None, failure= self.assure_call() return request.execute() + def get_server_domain_infos(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/server_domain_infos', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_subscribed_domains(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -2108,6 +2185,77 @@ def create_upload(self, fields=None, params=None, batch=None, success=None, fail self.assure_call() return request.execute() + def create_whats_app_business_solution(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'owner_permissions': 'list', + 'partner_app_id': 'string', + 'partner_permissions': 'list', + 'solution_name': 'string', + } + enums = { + 'owner_permissions_enum': Application.OwnerPermissions.__dict__.values(), + 'partner_permissions_enum': Application.PartnerPermissions.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/whatsapp_business_solution', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Application, + api_type='EDGE', + response_parser=ObjectParser(target_class=Application, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_whats_app_business_solutions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'role': 'role_enum', + } + enums = { + 'role_enum': [ + 'OWNER', + 'PARTNER', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/whatsapp_business_solutions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + _field_types = { 'aam_rules': 'string', 'an_ad_space_limit': 'unsigned int', @@ -2134,6 +2282,8 @@ def create_upload(self, fields=None, params=None, batch=None, success=None, fail 'auto_event_mapping_android': 'list', 'auto_event_mapping_ios': 'list', 'auto_event_setup_enabled': 'bool', + 'auto_log_app_events_default': 'bool', + 'auto_log_app_events_enabled': 'bool', 'business': 'Business', 'canvas_fluid_height': 'bool', 'canvas_fluid_width': 'unsigned int', @@ -2186,6 +2336,7 @@ def create_upload(self, fields=None, params=None, batch=None, success=None, fail 'privacy_policy_url': 'string', 'profile_section_url': 'string', 'property_id': 'string', + 'protected_mode_rules': 'Object', 'real_time_mode_devices': 'list', 'restrictions': 'Object', 'restrictive_data_filter_params': 'string', @@ -2223,6 +2374,8 @@ def _get_field_enum_info(cls): field_enum_info['PostMethod'] = Application.PostMethod.__dict__.values() field_enum_info['LoggingSource'] = Application.LoggingSource.__dict__.values() field_enum_info['LoggingTarget'] = Application.LoggingTarget.__dict__.values() + field_enum_info['OwnerPermissions'] = Application.OwnerPermissions.__dict__.values() + field_enum_info['PartnerPermissions'] = Application.PartnerPermissions.__dict__.values() return field_enum_info diff --git a/facebook_business/adobjects/applinks.py b/facebook_business/adobjects/applinks.py new file mode 100644 index 000000000..ce6d905d7 --- /dev/null +++ b/facebook_business/adobjects/applinks.py @@ -0,0 +1,86 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AppLinks( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAppLinks = True + super(AppLinks, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + android = 'android' + id = 'id' + ios = 'ios' + ipad = 'ipad' + iphone = 'iphone' + web = 'web' + windows = 'windows' + windows_phone = 'windows_phone' + windows_universal = 'windows_universal' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AppLinks, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'android': 'list', + 'id': 'string', + 'ios': 'list', + 'ipad': 'list', + 'iphone': 'list', + 'web': 'WebAppLink', + 'windows': 'list', + 'windows_phone': 'list', + 'windows_universal': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/appoptimizedcustomevents.py b/facebook_business/adobjects/appoptimizedcustomevents.py new file mode 100644 index 000000000..171b5f564 --- /dev/null +++ b/facebook_business/adobjects/appoptimizedcustomevents.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AppOptimizedCustomEvents( + AbstractObject, +): + + def __init__(self, api=None): + super(AppOptimizedCustomEvents, self).__init__() + self._isAppOptimizedCustomEvents = True + self._api = api + + class Field(AbstractObject.Field): + app_id = 'app_id' + app_name = 'app_name' + event_names = 'event_names' + + _field_types = { + 'app_id': 'int', + 'app_name': 'string', + 'event_names': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/apppublisher.py b/facebook_business/adobjects/apppublisher.py new file mode 100644 index 000000000..f4e598eea --- /dev/null +++ b/facebook_business/adobjects/apppublisher.py @@ -0,0 +1,52 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AppPublisher( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAppPublisher = True + super(AppPublisher, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + content_id = 'content_id' + icon_url = 'icon_url' + id = 'id' + name = 'name' + platform = 'platform' + store_name = 'store_name' + store_url = 'store_url' + + _field_types = { + 'content_id': 'string', + 'icon_url': 'string', + 'id': 'string', + 'name': 'string', + 'platform': 'string', + 'store_name': 'string', + 'store_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/apprequest.py b/facebook_business/adobjects/apprequest.py index d993ceda6..810cc61eb 100644 --- a/facebook_business/adobjects/apprequest.py +++ b/facebook_business/adobjects/apprequest.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/apprequestformerrecipient.py b/facebook_business/adobjects/apprequestformerrecipient.py index 614386723..9cabe833b 100644 --- a/facebook_business/adobjects/apprequestformerrecipient.py +++ b/facebook_business/adobjects/apprequestformerrecipient.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/aradsdatacontainer.py b/facebook_business/adobjects/aradsdatacontainer.py new file mode 100644 index 000000000..2e451cb3b --- /dev/null +++ b/facebook_business/adobjects/aradsdatacontainer.py @@ -0,0 +1,82 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ArAdsDataContainer( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isArAdsDataContainer = True + super(ArAdsDataContainer, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + camera_facing_override = 'camera_facing_override' + creation_time = 'creation_time' + effect = 'effect' + id = 'id' + is_published = 'is_published' + last_modified_time = 'last_modified_time' + name = 'name' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ArAdsDataContainer, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'camera_facing_override': 'string', + 'creation_time': 'datetime', + 'effect': 'list', + 'id': 'string', + 'is_published': 'bool', + 'last_modified_time': 'datetime', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/areffect.py b/facebook_business/adobjects/areffect.py new file mode 100644 index 000000000..3b15b2d70 --- /dev/null +++ b/facebook_business/adobjects/areffect.py @@ -0,0 +1,80 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AREffect( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAREffect = True + super(AREffect, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + creation_time = 'creation_time' + id = 'id' + last_modified_time = 'last_modified_time' + name = 'name' + status = 'status' + surfaces = 'surfaces' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AREffect, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'creation_time': 'datetime', + 'id': 'string', + 'last_modified_time': 'datetime', + 'name': 'string', + 'status': 'string', + 'surfaces': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/areffectsbatchstatus.py b/facebook_business/adobjects/areffectsbatchstatus.py deleted file mode 100644 index bfbe0e4d9..000000000 --- a/facebook_business/adobjects/areffectsbatchstatus.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 2014 Facebook, Inc. - -# 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. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -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 AREffectsBatchStatus( - AbstractObject, -): - - def __init__(self, api=None): - super(AREffectsBatchStatus, self).__init__() - self._isAREffectsBatchStatus = True - self._api = api - - class Field(AbstractObject.Field): - errors = 'errors' - product_groups = 'product_groups' - status = 'status' - - _field_types = { - 'errors': 'list', - 'product_groups': 'list', - 'status': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/facebook_business/adobjects/assigneduser.py b/facebook_business/adobjects/assigneduser.py index 7112566e2..04fde57ee 100644 --- a/facebook_business/adobjects/assigneduser.py +++ b/facebook_business/adobjects/assigneduser.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/asyncrequest.py b/facebook_business/adobjects/asyncrequest.py index f69e8de33..1db67e6ef 100644 --- a/facebook_business/adobjects/asyncrequest.py +++ b/facebook_business/adobjects/asyncrequest.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/asyncsession.py b/facebook_business/adobjects/asyncsession.py index 12e7e2392..01c84ebdc 100644 --- a/facebook_business/adobjects/asyncsession.py +++ b/facebook_business/adobjects/asyncsession.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/attributionspec.py b/facebook_business/adobjects/attributionspec.py index e9014b5c3..1d4c4099a 100644 --- a/facebook_business/adobjects/attributionspec.py +++ b/facebook_business/adobjects/attributionspec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/audiencefunnel.py b/facebook_business/adobjects/audiencefunnel.py new file mode 100644 index 000000000..8fc144296 --- /dev/null +++ b/facebook_business/adobjects/audiencefunnel.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AudienceFunnel( + AbstractObject, +): + + def __init__(self, api=None): + super(AudienceFunnel, self).__init__() + self._isAudienceFunnel = True + self._api = api + + class Field(AbstractObject.Field): + audience_type_param_name = 'audience_type_param_name' + audience_type_param_tags = 'audience_type_param_tags' + custom_audience_groups_info = 'custom_audience_groups_info' + + _field_types = { + 'audience_type_param_name': 'string', + 'audience_type_param_tags': 'list>', + 'custom_audience_groups_info': 'list>>', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/audienceoverlap.py b/facebook_business/adobjects/audienceoverlap.py new file mode 100644 index 000000000..ce292a800 --- /dev/null +++ b/facebook_business/adobjects/audienceoverlap.py @@ -0,0 +1,46 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AudienceOverlap( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAudienceOverlap = True + super(AudienceOverlap, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + estimated_reach = 'estimated_reach' + id = 'id' + name = 'name' + overlap = 'overlap' + + _field_types = { + 'estimated_reach': 'int', + 'id': 'string', + 'name': 'string', + 'overlap': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/audiencepermission.py b/facebook_business/adobjects/audiencepermission.py new file mode 100644 index 000000000..bb2879e4e --- /dev/null +++ b/facebook_business/adobjects/audiencepermission.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AudiencePermission( + AbstractObject, +): + + def __init__(self, api=None): + super(AudiencePermission, self).__init__() + self._isAudiencePermission = True + self._api = api + + class Field(AbstractObject.Field): + audience = 'audience' + share_account_id = 'share_account_id' + share_account_name = 'share_account_name' + + _field_types = { + 'audience': 'CustomAudience', + 'share_account_id': 'string', + 'share_account_name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/audiencepermissionforactions.py b/facebook_business/adobjects/audiencepermissionforactions.py index c4f9272aa..93db15373 100644 --- a/facebook_business/adobjects/audiencepermissionforactions.py +++ b/facebook_business/adobjects/audiencepermissionforactions.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/audiencesharingaccountvalid.py b/facebook_business/adobjects/audiencesharingaccountvalid.py new file mode 100644 index 000000000..7c5d61fd6 --- /dev/null +++ b/facebook_business/adobjects/audiencesharingaccountvalid.py @@ -0,0 +1,47 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AudienceSharingAccountValid( + AbstractObject, +): + + def __init__(self, api=None): + super(AudienceSharingAccountValid, self).__init__() + self._isAudienceSharingAccountValid = True + self._api = api + + class Field(AbstractObject.Field): + account_id = 'account_id' + account_type = 'account_type' + business_id = 'business_id' + business_name = 'business_name' + can_ad_account_use_lookalike_container = 'can_ad_account_use_lookalike_container' + sharing_agreement_status = 'sharing_agreement_status' + + _field_types = { + 'account_id': 'string', + 'account_type': 'string', + 'business_id': 'string', + 'business_name': 'string', + 'can_ad_account_use_lookalike_container': 'bool', + 'sharing_agreement_status': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/audiencesharingrecipientaccounts.py b/facebook_business/adobjects/audiencesharingrecipientaccounts.py new file mode 100644 index 000000000..603f7d149 --- /dev/null +++ b/facebook_business/adobjects/audiencesharingrecipientaccounts.py @@ -0,0 +1,49 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AudienceSharingRecipientAccounts( + AbstractObject, +): + + def __init__(self, api=None): + super(AudienceSharingRecipientAccounts, self).__init__() + self._isAudienceSharingRecipientAccounts = True + self._api = api + + class Field(AbstractObject.Field): + account_id = 'account_id' + account_name = 'account_name' + account_type = 'account_type' + business_id = 'business_id' + business_name = 'business_name' + can_ad_account_use_lookalike_container = 'can_ad_account_use_lookalike_container' + sharing_agreement_status = 'sharing_agreement_status' + + _field_types = { + 'account_id': 'string', + 'account_name': 'string', + 'account_type': 'string', + 'business_id': 'string', + 'business_name': 'string', + 'can_ad_account_use_lookalike_container': 'bool', + 'sharing_agreement_status': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/audioasset.py b/facebook_business/adobjects/audioasset.py new file mode 100644 index 000000000..24dda0311 --- /dev/null +++ b/facebook_business/adobjects/audioasset.py @@ -0,0 +1,106 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AudioAsset( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAudioAsset = True + super(AudioAsset, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + all_ddex_featured_artists = 'all_ddex_featured_artists' + all_ddex_main_artists = 'all_ddex_main_artists' + audio_cluster_id = 'audio_cluster_id' + cover_image_source = 'cover_image_source' + display_artist = 'display_artist' + download_hd_url = 'download_hd_url' + download_sd_url = 'download_sd_url' + duration_in_ms = 'duration_in_ms' + freeform_genre = 'freeform_genre' + grid = 'grid' + id = 'id' + is_test = 'is_test' + original_release_date = 'original_release_date' + owner = 'owner' + parental_warning_type = 'parental_warning_type' + subtitle = 'subtitle' + title = 'title' + title_with_featured_artists = 'title_with_featured_artists' + upc = 'upc' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AudioAsset, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'all_ddex_featured_artists': 'string', + 'all_ddex_main_artists': 'string', + 'audio_cluster_id': 'string', + 'cover_image_source': 'string', + 'display_artist': 'string', + 'download_hd_url': 'string', + 'download_sd_url': 'string', + 'duration_in_ms': 'int', + 'freeform_genre': 'string', + 'grid': 'string', + 'id': 'string', + 'is_test': 'bool', + 'original_release_date': 'datetime', + 'owner': 'Page', + 'parental_warning_type': 'string', + 'subtitle': 'string', + 'title': 'string', + 'title_with_featured_artists': 'string', + 'upc': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/audiocopyright.py b/facebook_business/adobjects/audiocopyright.py index ce897c1a8..176d51219 100644 --- a/facebook_business/adobjects/audiocopyright.py +++ b/facebook_business/adobjects/audiocopyright.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -48,6 +34,7 @@ class Field(AbstractObject.Field): isrc = 'isrc' match_rule = 'match_rule' ownership_countries = 'ownership_countries' + ownership_details = 'ownership_details' reference_file_status = 'reference_file_status' ridge_monitoring_status = 'ridge_monitoring_status' tags = 'tags' @@ -89,6 +76,7 @@ def get_update_records(self, fields=None, params=None, batch=None, success=None, from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.mediacopyrightupdaterecord import MediaCopyrightUpdateRecord param_types = { } enums = { @@ -99,9 +87,9 @@ def get_update_records(self, fields=None, params=None, batch=None, success=None, endpoint='/update_records', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=MediaCopyrightUpdateRecord, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=MediaCopyrightUpdateRecord, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -123,6 +111,7 @@ def get_update_records(self, fields=None, params=None, batch=None, success=None, 'isrc': 'string', 'match_rule': 'VideoCopyrightRule', 'ownership_countries': 'list', + 'ownership_details': 'list>', 'reference_file_status': 'string', 'ridge_monitoring_status': 'string', 'tags': 'list', diff --git a/facebook_business/adobjects/audioisrc.py b/facebook_business/adobjects/audioisrc.py new file mode 100644 index 000000000..e81972354 --- /dev/null +++ b/facebook_business/adobjects/audioisrc.py @@ -0,0 +1,86 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AudioIsrc( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAudioIsrc = True + super(AudioIsrc, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + all_kg_featured_artists = 'all_kg_featured_artists' + all_kg_main_artists = 'all_kg_main_artists' + artist_profile_picture_url = 'artist_profile_picture_url' + id = 'id' + isrc = 'isrc' + publishing_rights_data = 'publishing_rights_data' + top_searchable_artist_id = 'top_searchable_artist_id' + top_searchable_artist_name = 'top_searchable_artist_name' + top_searchable_artist_profile_pic_url = 'top_searchable_artist_profile_pic_url' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AudioIsrc, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'all_kg_featured_artists': 'string', + 'all_kg_main_artists': 'string', + 'artist_profile_picture_url': 'string', + 'id': 'string', + 'isrc': 'string', + 'publishing_rights_data': 'Object', + 'top_searchable_artist_id': 'string', + 'top_searchable_artist_name': 'string', + 'top_searchable_artist_profile_pic_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/audiorelease.py b/facebook_business/adobjects/audiorelease.py new file mode 100644 index 000000000..e8f12e31a --- /dev/null +++ b/facebook_business/adobjects/audiorelease.py @@ -0,0 +1,100 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AudioRelease( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAudioRelease = True + super(AudioRelease, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + album_title = 'album_title' + asset_availability_status = 'asset_availability_status' + audio_availability_status = 'audio_availability_status' + audio_release_image_uri = 'audio_release_image_uri' + created_time = 'created_time' + displayed_artist = 'displayed_artist' + ean = 'ean' + genre = 'genre' + grid = 'grid' + id = 'id' + isrc = 'isrc' + label_name = 'label_name' + original_release_date = 'original_release_date' + parental_warning_type = 'parental_warning_type' + proprietary_id = 'proprietary_id' + upc = 'upc' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AudioRelease, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'album_title': 'string', + 'asset_availability_status': 'list>', + 'audio_availability_status': 'string', + 'audio_release_image_uri': 'string', + 'created_time': 'datetime', + 'displayed_artist': 'string', + 'ean': 'string', + 'genre': 'string', + 'grid': 'string', + 'id': 'string', + 'isrc': 'string', + 'label_name': 'string', + 'original_release_date': 'datetime', + 'parental_warning_type': 'string', + 'proprietary_id': 'string', + 'upc': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/audiovisualreferencematch.py b/facebook_business/adobjects/audiovisualreferencematch.py new file mode 100644 index 000000000..c58969c88 --- /dev/null +++ b/facebook_business/adobjects/audiovisualreferencematch.py @@ -0,0 +1,100 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AudioVisualReferenceMatch( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAudioVisualReferenceMatch = True + super(AudioVisualReferenceMatch, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + audio_conflicting_segments = 'audio_conflicting_segments' + audio_current_conflict_resolved_segments = 'audio_current_conflict_resolved_segments' + audio_segment_resolution_history = 'audio_segment_resolution_history' + conflict_type = 'conflict_type' + conflicting_countries = 'conflicting_countries' + country_resolution_history = 'country_resolution_history' + creation_time = 'creation_time' + current_conflict_resolved_countries = 'current_conflict_resolved_countries' + displayed_match_state = 'displayed_match_state' + dispute_form_data_entries_with_translations = 'dispute_form_data_entries_with_translations' + expiration_time = 'expiration_time' + id = 'id' + is_disputable = 'is_disputable' + match_state = 'match_state' + matched_overlap_percentage = 'matched_overlap_percentage' + matched_owner_match_duration_in_sec = 'matched_owner_match_duration_in_sec' + matched_reference_owner = 'matched_reference_owner' + modification_history = 'modification_history' + num_matches_on_matched_side = 'num_matches_on_matched_side' + num_matches_on_ref_side = 'num_matches_on_ref_side' + ref_owner_match_duration_in_sec = 'ref_owner_match_duration_in_sec' + reference_overlap_percentage = 'reference_overlap_percentage' + reference_owner = 'reference_owner' + rejection_form_data_entries_with_translations = 'rejection_form_data_entries_with_translations' + resolution_details = 'resolution_details' + resolution_reason = 'resolution_reason' + update_time = 'update_time' + views_on_matched_side = 'views_on_matched_side' + visual_conflicting_segments = 'visual_conflicting_segments' + visual_current_conflict_resolved_segments = 'visual_current_conflict_resolved_segments' + visual_segment_resolution_history = 'visual_segment_resolution_history' + + _field_types = { + 'audio_conflicting_segments': 'list', + 'audio_current_conflict_resolved_segments': 'list', + 'audio_segment_resolution_history': 'list', + 'conflict_type': 'string', + 'conflicting_countries': 'list', + 'country_resolution_history': 'list>>', + 'creation_time': 'datetime', + 'current_conflict_resolved_countries': 'list>', + 'displayed_match_state': 'string', + 'dispute_form_data_entries_with_translations': 'list', + 'expiration_time': 'datetime', + 'id': 'string', + 'is_disputable': 'bool', + 'match_state': 'string', + 'matched_overlap_percentage': 'float', + 'matched_owner_match_duration_in_sec': 'float', + 'matched_reference_owner': 'Profile', + 'modification_history': 'list', + 'num_matches_on_matched_side': 'unsigned int', + 'num_matches_on_ref_side': 'unsigned int', + 'ref_owner_match_duration_in_sec': 'float', + 'reference_overlap_percentage': 'float', + 'reference_owner': 'Profile', + 'rejection_form_data_entries_with_translations': 'list', + 'resolution_details': 'string', + 'resolution_reason': 'string', + 'update_time': 'datetime', + 'views_on_matched_side': 'unsigned int', + 'visual_conflicting_segments': 'list', + 'visual_current_conflict_resolved_segments': 'list', + 'visual_segment_resolution_history': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/authlink.py b/facebook_business/adobjects/authlink.py new file mode 100644 index 000000000..ff8d53e9c --- /dev/null +++ b/facebook_business/adobjects/authlink.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 AuthLink( + AbstractObject, +): + + def __init__(self, api=None): + super(AuthLink, self).__init__() + self._isAuthLink = True + self._api = api + + class Field(AbstractObject.Field): + link = 'link' + + _field_types = { + 'link': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/automotivemodel.py b/facebook_business/adobjects/automotivemodel.py index 62cf1f1d2..d3ec33cf9 100644 --- a/facebook_business/adobjects/automotivemodel.py +++ b/facebook_business/adobjects/automotivemodel.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -118,6 +104,7 @@ def get_augmented_realities_metadata(self, fields=None, params=None, batch=None, from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.dynamicarmetadata import DynamicARMetadata param_types = { } enums = { @@ -128,9 +115,9 @@ def get_augmented_realities_metadata(self, fields=None, params=None, batch=None, endpoint='/augmented_realities_metadata', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=DynamicARMetadata, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=DynamicARMetadata, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -179,6 +166,7 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.dynamicvideometadata import DynamicVideoMetadata param_types = { } enums = { @@ -189,9 +177,9 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None endpoint='/videos_metadata', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=DynamicVideoMetadata, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=DynamicVideoMetadata, api=self._api), ) request.add_params(params) request.add_fields(fields) diff --git a/facebook_business/adobjects/avatar.py b/facebook_business/adobjects/avatar.py new file mode 100644 index 000000000..fc62b6cc4 --- /dev/null +++ b/facebook_business/adobjects/avatar.py @@ -0,0 +1,107 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 Avatar( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAvatar = True + super(Avatar, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Avatar, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_models(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'client_name': 'string', + 'client_version': 'string', + 'config_id': 'string', + 'force_generate': 'bool', + 'platform': 'string', + 'profile': 'string', + 'sdk_version': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/models', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/avatarprofilepicture.py b/facebook_business/adobjects/avatarprofilepicture.py new file mode 100644 index 000000000..a6b2b9bea --- /dev/null +++ b/facebook_business/adobjects/avatarprofilepicture.py @@ -0,0 +1,72 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 AvatarProfilePicture( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isAvatarProfilePicture = True + super(AvatarProfilePicture, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + url = 'url' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AvatarProfilePicture, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/bapidomain.py b/facebook_business/adobjects/bapidomain.py new file mode 100644 index 000000000..bca155f59 --- /dev/null +++ b/facebook_business/adobjects/bapidomain.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 BAPIDomain( + AbstractObject, +): + + def __init__(self, api=None): + super(BAPIDomain, self).__init__() + self._isBAPIDomain = True + self._api = api + + class Field(AbstractObject.Field): + domain = 'domain' + in_cool_down_until = 'in_cool_down_until' + is_eligible_for_vo = 'is_eligible_for_vo' + is_in_cool_down = 'is_in_cool_down' + + _field_types = { + 'domain': 'string', + 'in_cool_down_until': 'int', + 'is_eligible_for_vo': 'bool', + 'is_in_cool_down': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/bcpcampaign.py b/facebook_business/adobjects/bcpcampaign.py new file mode 100644 index 000000000..a0fbcaeec --- /dev/null +++ b/facebook_business/adobjects/bcpcampaign.py @@ -0,0 +1,102 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BCPCampaign( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBCPCampaign = True + super(BCPCampaign, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ads_permission_required = 'ads_permission_required' + application_deadline = 'application_deadline' + campaign_goal = 'campaign_goal' + campaign_goal_other = 'campaign_goal_other' + content_delivery_deadline = 'content_delivery_deadline' + content_delivery_start_date = 'content_delivery_start_date' + content_requirements = 'content_requirements' + content_requirements_description = 'content_requirements_description' + currency = 'currency' + deal_negotiation_type = 'deal_negotiation_type' + description = 'description' + has_free_product = 'has_free_product' + id = 'id' + name = 'name' + payment_amount_for_ads = 'payment_amount_for_ads' + payment_amount_for_content = 'payment_amount_for_content' + payment_description = 'payment_description' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BCPCampaign, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'ads_permission_required': 'bool', + 'application_deadline': 'string', + 'campaign_goal': 'string', + 'campaign_goal_other': 'string', + 'content_delivery_deadline': 'string', + 'content_delivery_start_date': 'string', + 'content_requirements': 'list>', + 'content_requirements_description': 'string', + 'currency': 'string', + 'deal_negotiation_type': 'string', + 'description': 'string', + 'has_free_product': 'bool', + 'id': 'string', + 'name': 'string', + 'payment_amount_for_ads': 'unsigned int', + 'payment_amount_for_content': 'unsigned int', + 'payment_description': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/bcpcreatoriguser.py b/facebook_business/adobjects/bcpcreatoriguser.py new file mode 100644 index 000000000..7cc9da070 --- /dev/null +++ b/facebook_business/adobjects/bcpcreatoriguser.py @@ -0,0 +1,80 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BCPCreatorIgUser( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBCPCreatorIgUser = True + super(BCPCreatorIgUser, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + email = 'email' + id = 'id' + is_paid_partnership_messages_enabled = 'is_paid_partnership_messages_enabled' + messaging_id = 'messaging_id' + portfolio_url = 'portfolio_url' + username = 'username' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BCPCreatorIgUser, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'email': 'string', + 'id': 'string', + 'is_paid_partnership_messages_enabled': 'bool', + 'messaging_id': 'string', + 'portfolio_url': 'string', + 'username': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/bespokepartnerguidancelaser.py b/facebook_business/adobjects/bespokepartnerguidancelaser.py new file mode 100644 index 000000000..a4e7dcc8b --- /dev/null +++ b/facebook_business/adobjects/bespokepartnerguidancelaser.py @@ -0,0 +1,48 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BespokePartnerGuidanceLaser( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBespokePartnerGuidanceLaser = True + super(BespokePartnerGuidanceLaser, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + business = 'business' + campaign_group = 'campaign_group' + cpa_improvement = 'cpa_improvement' + guidance_type = 'guidance_type' + id = 'id' + + _field_types = { + 'business': 'Business', + 'campaign_group': 'Campaign', + 'cpa_improvement': 'float', + 'guidance_type': 'string', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/bidschedule.py b/facebook_business/adobjects/bidschedule.py new file mode 100644 index 000000000..855b7a667 --- /dev/null +++ b/facebook_business/adobjects/bidschedule.py @@ -0,0 +1,84 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BidSchedule( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBidSchedule = True + super(BidSchedule, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_object_id = 'ad_object_id' + bid_recurrence_type = 'bid_recurrence_type' + bid_timezone = 'bid_timezone' + bid_value = 'bid_value' + id = 'id' + status = 'status' + time_end = 'time_end' + time_start = 'time_start' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BidSchedule, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'ad_object_id': 'string', + 'bid_recurrence_type': 'string', + 'bid_timezone': 'string', + 'bid_value': 'int', + 'id': 'string', + 'status': 'string', + 'time_end': 'datetime', + 'time_start': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/bizinboxoffsiteemailaccount.py b/facebook_business/adobjects/bizinboxoffsiteemailaccount.py new file mode 100644 index 000000000..d24f0a854 --- /dev/null +++ b/facebook_business/adobjects/bizinboxoffsiteemailaccount.py @@ -0,0 +1,103 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BizInboxOffsiteEmailAccount( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBizInboxOffsiteEmailAccount = True + super(BizInboxOffsiteEmailAccount, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + email_address = 'email_address' + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BizInboxOffsiteEmailAccount, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_assigned_users(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.assigneduser import AssignedUser + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/assigned_users', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AssignedUser, + api_type='EDGE', + response_parser=ObjectParser(target_class=AssignedUser, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'email_address': 'string', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/blindpig.py b/facebook_business/adobjects/blindpig.py new file mode 100644 index 000000000..a5c7c3e9a --- /dev/null +++ b/facebook_business/adobjects/blindpig.py @@ -0,0 +1,72 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BlindPig( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBlindPig = True + super(BlindPig, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + name = 'name' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BlindPig, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/blockeduserinfo.py b/facebook_business/adobjects/blockeduserinfo.py new file mode 100644 index 000000000..dc7541084 --- /dev/null +++ b/facebook_business/adobjects/blockeduserinfo.py @@ -0,0 +1,45 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 BlockedUserInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(BlockedUserInfo, self).__init__() + self._isBlockedUserInfo = True + self._api = api + + class Field(AbstractObject.Field): + block_time = 'block_time' + block_type = 'block_type' + fbid = 'fbid' + name = 'name' + username = 'username' + + _field_types = { + 'block_time': 'datetime', + 'block_type': 'string', + 'fbid': 'string', + 'name': 'string', + 'username': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/brandedcontentaderror.py b/facebook_business/adobjects/brandedcontentaderror.py new file mode 100644 index 000000000..db1781f61 --- /dev/null +++ b/facebook_business/adobjects/brandedcontentaderror.py @@ -0,0 +1,49 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 BrandedContentAdError( + AbstractObject, +): + + def __init__(self, api=None): + super(BrandedContentAdError, self).__init__() + self._isBrandedContentAdError = True + self._api = api + + class Field(AbstractObject.Field): + blame_field_spec = 'blame_field_spec' + error_code = 'error_code' + error_description = 'error_description' + error_message = 'error_message' + error_placement = 'error_placement' + error_severity = 'error_severity' + help_center_id = 'help_center_id' + + _field_types = { + 'blame_field_spec': 'list', + 'error_code': 'int', + 'error_description': 'string', + 'error_message': 'string', + 'error_placement': 'string', + 'error_severity': 'string', + 'help_center_id': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/brandedcontenteligiblesponsorids.py b/facebook_business/adobjects/brandedcontenteligiblesponsorids.py new file mode 100644 index 000000000..f5d26a761 --- /dev/null +++ b/facebook_business/adobjects/brandedcontenteligiblesponsorids.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 BrandedContentEligibleSponsorIDs( + AbstractObject, +): + + def __init__(self, api=None): + super(BrandedContentEligibleSponsorIDs, self).__init__() + self._isBrandedContentEligibleSponsorIDs = True + self._api = api + + class Field(AbstractObject.Field): + fb_page = 'fb_page' + ig_account_v2 = 'ig_account_v2' + ig_approval_needed = 'ig_approval_needed' + + _field_types = { + 'fb_page': 'Page', + 'ig_account_v2': 'IGUser', + 'ig_approval_needed': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/brandedcontentshadowigmediaid.py b/facebook_business/adobjects/brandedcontentshadowigmediaid.py new file mode 100644 index 000000000..6b616de6e --- /dev/null +++ b/facebook_business/adobjects/brandedcontentshadowigmediaid.py @@ -0,0 +1,48 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BrandedContentShadowIGMediaID( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBrandedContentShadowIGMediaID = True + super(BrandedContentShadowIGMediaID, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + eligibility_errors = 'eligibility_errors' + has_permission_for_partnership_ad = 'has_permission_for_partnership_ad' + id = 'id' + owner_id = 'owner_id' + permalink = 'permalink' + + _field_types = { + 'eligibility_errors': 'list', + 'has_permission_for_partnership_ad': 'bool', + 'id': 'string', + 'owner_id': 'string', + 'permalink': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/brandedcontentshadowiguserid.py b/facebook_business/adobjects/brandedcontentshadowiguserid.py new file mode 100644 index 000000000..8373a7677 --- /dev/null +++ b/facebook_business/adobjects/brandedcontentshadowiguserid.py @@ -0,0 +1,40 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BrandedContentShadowIGUserID( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBrandedContentShadowIGUserID = True + super(BrandedContentShadowIGUserID, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + + _field_types = { + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/brandrequest.py b/facebook_business/adobjects/brandrequest.py index 9a120e2dd..d6e22990b 100644 --- a/facebook_business/adobjects/brandrequest.py +++ b/facebook_business/adobjects/brandrequest.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/brandsafetyblocklistusage.py b/facebook_business/adobjects/brandsafetyblocklistusage.py index 55c7a680c..fef0d7230 100644 --- a/facebook_business/adobjects/brandsafetyblocklistusage.py +++ b/facebook_business/adobjects/brandsafetyblocklistusage.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/brandsafetydownloadable.py b/facebook_business/adobjects/brandsafetydownloadable.py new file mode 100644 index 000000000..6ef1af85c --- /dev/null +++ b/facebook_business/adobjects/brandsafetydownloadable.py @@ -0,0 +1,82 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BrandSafetyDownloadable( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBrandSafetyDownloadable = True + super(BrandSafetyDownloadable, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account_context_id = 'account_context_id' + async_job_percent_complete = 'async_job_percent_complete' + async_job_status = 'async_job_status' + file_name = 'file_name' + id = 'id' + request_surface = 'request_surface' + url = 'url' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BrandSafetyDownloadable, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'account_context_id': 'string', + 'async_job_percent_complete': 'int', + 'async_job_status': 'string', + 'file_name': 'string', + 'id': 'string', + 'request_surface': 'string', + 'url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/broadtargetingcategories.py b/facebook_business/adobjects/broadtargetingcategories.py index f3597b462..aa1b1aae1 100644 --- a/facebook_business/adobjects/broadtargetingcategories.py +++ b/facebook_business/adobjects/broadtargetingcategories.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/business.py b/facebook_business/adobjects/business.py index e86221fbf..bfaba05e1 100644 --- a/facebook_business/adobjects/business.py +++ b/facebook_business/adobjects/business.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -61,6 +47,7 @@ class Field(AbstractObject.Field): two_factor_type = 'two_factor_type' updated_by = 'updated_by' updated_time = 'updated_time' + user_access_expire_time = 'user_access_expire_time' verification_status = 'verification_status' vertical = 'vertical' vertical_id = 'vertical_id' @@ -85,6 +72,7 @@ class Vertical: luxury = 'LUXURY' marketing = 'MARKETING' non_profit = 'NON_PROFIT' + not_set = 'NOT_SET' organizations_and_associations = 'ORGANIZATIONS_AND_ASSOCIATIONS' other = 'OTHER' professional_services = 'PROFESSIONAL_SERVICES' @@ -127,6 +115,489 @@ class SurveyBusinessType: app_developer = 'APP_DEVELOPER' publisher = 'PUBLISHER' + class TimezoneId: + value_0 = '0' + value_1 = '1' + value_2 = '2' + value_3 = '3' + value_4 = '4' + value_5 = '5' + value_6 = '6' + value_7 = '7' + value_8 = '8' + value_9 = '9' + value_10 = '10' + value_11 = '11' + value_12 = '12' + value_13 = '13' + value_14 = '14' + value_15 = '15' + value_16 = '16' + value_17 = '17' + value_18 = '18' + value_19 = '19' + value_20 = '20' + value_21 = '21' + value_22 = '22' + value_23 = '23' + value_24 = '24' + value_25 = '25' + value_26 = '26' + value_27 = '27' + value_28 = '28' + value_29 = '29' + value_30 = '30' + value_31 = '31' + value_32 = '32' + value_33 = '33' + value_34 = '34' + value_35 = '35' + value_36 = '36' + value_37 = '37' + value_38 = '38' + value_39 = '39' + value_40 = '40' + value_41 = '41' + value_42 = '42' + value_43 = '43' + value_44 = '44' + value_45 = '45' + value_46 = '46' + value_47 = '47' + value_48 = '48' + value_49 = '49' + value_50 = '50' + value_51 = '51' + value_52 = '52' + value_53 = '53' + value_54 = '54' + value_55 = '55' + value_56 = '56' + value_57 = '57' + value_58 = '58' + value_59 = '59' + value_60 = '60' + value_61 = '61' + value_62 = '62' + value_63 = '63' + value_64 = '64' + value_65 = '65' + value_66 = '66' + value_67 = '67' + value_68 = '68' + value_69 = '69' + value_70 = '70' + value_71 = '71' + value_72 = '72' + value_73 = '73' + value_74 = '74' + value_75 = '75' + value_76 = '76' + value_77 = '77' + value_78 = '78' + value_79 = '79' + value_80 = '80' + value_81 = '81' + value_82 = '82' + value_83 = '83' + value_84 = '84' + value_85 = '85' + value_86 = '86' + value_87 = '87' + value_88 = '88' + value_89 = '89' + value_90 = '90' + value_91 = '91' + value_92 = '92' + value_93 = '93' + value_94 = '94' + value_95 = '95' + value_96 = '96' + value_97 = '97' + value_98 = '98' + value_99 = '99' + value_100 = '100' + value_101 = '101' + value_102 = '102' + value_103 = '103' + value_104 = '104' + value_105 = '105' + value_106 = '106' + value_107 = '107' + value_108 = '108' + value_109 = '109' + value_110 = '110' + value_111 = '111' + value_112 = '112' + value_113 = '113' + value_114 = '114' + value_115 = '115' + value_116 = '116' + value_117 = '117' + value_118 = '118' + value_119 = '119' + value_120 = '120' + value_121 = '121' + value_122 = '122' + value_123 = '123' + value_124 = '124' + value_125 = '125' + value_126 = '126' + value_127 = '127' + value_128 = '128' + value_129 = '129' + value_130 = '130' + value_131 = '131' + value_132 = '132' + value_133 = '133' + value_134 = '134' + value_135 = '135' + value_136 = '136' + value_137 = '137' + value_138 = '138' + value_139 = '139' + value_140 = '140' + value_141 = '141' + value_142 = '142' + value_143 = '143' + value_144 = '144' + value_145 = '145' + value_146 = '146' + value_147 = '147' + value_148 = '148' + value_149 = '149' + value_150 = '150' + value_151 = '151' + value_152 = '152' + value_153 = '153' + value_154 = '154' + value_155 = '155' + value_156 = '156' + value_157 = '157' + value_158 = '158' + value_159 = '159' + value_160 = '160' + value_161 = '161' + value_162 = '162' + value_163 = '163' + value_164 = '164' + value_165 = '165' + value_166 = '166' + value_167 = '167' + value_168 = '168' + value_169 = '169' + value_170 = '170' + value_171 = '171' + value_172 = '172' + value_173 = '173' + value_174 = '174' + value_175 = '175' + value_176 = '176' + value_177 = '177' + value_178 = '178' + value_179 = '179' + value_180 = '180' + value_181 = '181' + value_182 = '182' + value_183 = '183' + value_184 = '184' + value_185 = '185' + value_186 = '186' + value_187 = '187' + value_188 = '188' + value_189 = '189' + value_190 = '190' + value_191 = '191' + value_192 = '192' + value_193 = '193' + value_194 = '194' + value_195 = '195' + value_196 = '196' + value_197 = '197' + value_198 = '198' + value_199 = '199' + value_200 = '200' + value_201 = '201' + value_202 = '202' + value_203 = '203' + value_204 = '204' + value_205 = '205' + value_206 = '206' + value_207 = '207' + value_208 = '208' + value_209 = '209' + value_210 = '210' + value_211 = '211' + value_212 = '212' + value_213 = '213' + value_214 = '214' + value_215 = '215' + value_216 = '216' + value_217 = '217' + value_218 = '218' + value_219 = '219' + value_220 = '220' + value_221 = '221' + value_222 = '222' + value_223 = '223' + value_224 = '224' + value_225 = '225' + value_226 = '226' + value_227 = '227' + value_228 = '228' + value_229 = '229' + value_230 = '230' + value_231 = '231' + value_232 = '232' + value_233 = '233' + value_234 = '234' + value_235 = '235' + value_236 = '236' + value_237 = '237' + value_238 = '238' + value_239 = '239' + value_240 = '240' + value_241 = '241' + value_242 = '242' + value_243 = '243' + value_244 = '244' + value_245 = '245' + value_246 = '246' + value_247 = '247' + value_248 = '248' + value_249 = '249' + value_250 = '250' + value_251 = '251' + value_252 = '252' + value_253 = '253' + value_254 = '254' + value_255 = '255' + value_256 = '256' + value_257 = '257' + value_258 = '258' + value_259 = '259' + value_260 = '260' + value_261 = '261' + value_262 = '262' + value_263 = '263' + value_264 = '264' + value_265 = '265' + value_266 = '266' + value_267 = '267' + value_268 = '268' + value_269 = '269' + value_270 = '270' + value_271 = '271' + value_272 = '272' + value_273 = '273' + value_274 = '274' + value_275 = '275' + value_276 = '276' + value_277 = '277' + value_278 = '278' + value_279 = '279' + value_280 = '280' + value_281 = '281' + value_282 = '282' + value_283 = '283' + value_284 = '284' + value_285 = '285' + value_286 = '286' + value_287 = '287' + value_288 = '288' + value_289 = '289' + value_290 = '290' + value_291 = '291' + value_292 = '292' + value_293 = '293' + value_294 = '294' + value_295 = '295' + value_296 = '296' + value_297 = '297' + value_298 = '298' + value_299 = '299' + value_300 = '300' + value_301 = '301' + value_302 = '302' + value_303 = '303' + value_304 = '304' + value_305 = '305' + value_306 = '306' + value_307 = '307' + value_308 = '308' + value_309 = '309' + value_310 = '310' + value_311 = '311' + value_312 = '312' + value_313 = '313' + value_314 = '314' + value_315 = '315' + value_316 = '316' + value_317 = '317' + value_318 = '318' + value_319 = '319' + value_320 = '320' + value_321 = '321' + value_322 = '322' + value_323 = '323' + value_324 = '324' + value_325 = '325' + value_326 = '326' + value_327 = '327' + value_328 = '328' + value_329 = '329' + value_330 = '330' + value_331 = '331' + value_332 = '332' + value_333 = '333' + value_334 = '334' + value_335 = '335' + value_336 = '336' + value_337 = '337' + value_338 = '338' + value_339 = '339' + value_340 = '340' + value_341 = '341' + value_342 = '342' + value_343 = '343' + value_344 = '344' + value_345 = '345' + value_346 = '346' + value_347 = '347' + value_348 = '348' + value_349 = '349' + value_350 = '350' + value_351 = '351' + value_352 = '352' + value_353 = '353' + value_354 = '354' + value_355 = '355' + value_356 = '356' + value_357 = '357' + value_358 = '358' + value_359 = '359' + value_360 = '360' + value_361 = '361' + value_362 = '362' + value_363 = '363' + value_364 = '364' + value_365 = '365' + value_366 = '366' + value_367 = '367' + value_368 = '368' + value_369 = '369' + value_370 = '370' + value_371 = '371' + value_372 = '372' + value_373 = '373' + value_374 = '374' + value_375 = '375' + value_376 = '376' + value_377 = '377' + value_378 = '378' + value_379 = '379' + value_380 = '380' + value_381 = '381' + value_382 = '382' + value_383 = '383' + value_384 = '384' + value_385 = '385' + value_386 = '386' + value_387 = '387' + value_388 = '388' + value_389 = '389' + value_390 = '390' + value_391 = '391' + value_392 = '392' + value_393 = '393' + value_394 = '394' + value_395 = '395' + value_396 = '396' + value_397 = '397' + value_398 = '398' + value_399 = '399' + value_400 = '400' + value_401 = '401' + value_402 = '402' + value_403 = '403' + value_404 = '404' + value_405 = '405' + value_406 = '406' + value_407 = '407' + value_408 = '408' + value_409 = '409' + value_410 = '410' + value_411 = '411' + value_412 = '412' + value_413 = '413' + value_414 = '414' + value_415 = '415' + value_416 = '416' + value_417 = '417' + value_418 = '418' + value_419 = '419' + value_420 = '420' + value_421 = '421' + value_422 = '422' + value_423 = '423' + value_424 = '424' + value_425 = '425' + value_426 = '426' + value_427 = '427' + value_428 = '428' + value_429 = '429' + value_430 = '430' + value_431 = '431' + value_432 = '432' + value_433 = '433' + value_434 = '434' + value_435 = '435' + value_436 = '436' + value_437 = '437' + value_438 = '438' + value_439 = '439' + value_440 = '440' + value_441 = '441' + value_442 = '442' + value_443 = '443' + value_444 = '444' + value_445 = '445' + value_446 = '446' + value_447 = '447' + value_448 = '448' + value_449 = '449' + value_450 = '450' + value_451 = '451' + value_452 = '452' + value_453 = '453' + value_454 = '454' + value_455 = '455' + value_456 = '456' + value_457 = '457' + value_458 = '458' + value_459 = '459' + value_460 = '460' + value_461 = '461' + value_462 = '462' + value_463 = '463' + value_464 = '464' + value_465 = '465' + value_466 = '466' + value_467 = '467' + value_468 = '468' + value_469 = '469' + value_470 = '470' + value_471 = '471' + value_472 = '472' + value_473 = '473' + value_474 = '474' + value_475 = '475' + value_476 = '476' + value_477 = '477' + value_478 = '478' + value_479 = '479' + value_480 = '480' + class PagePermittedTasks: advertise = 'ADVERTISE' analyze = 'ANALYZE' @@ -391,6 +862,7 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') param_types = { + 'entry_point': 'string', 'name': 'string', 'primary_page': 'string', 'timezone_id': 'unsigned int', @@ -796,6 +1268,7 @@ def get_ads_reporting_mmm_reports(self, fields=None, params=None, batch=None, su from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adsreportbuildermmmreport import AdsReportBuilderMMMReport param_types = { 'filtering': 'list', } @@ -807,9 +1280,9 @@ def get_ads_reporting_mmm_reports(self, fields=None, params=None, batch=None, su endpoint='/ads_reporting_mmm_reports', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=AdsReportBuilderMMMReport, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=AdsReportBuilderMMMReport, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -827,6 +1300,7 @@ def get_ads_reporting_mmm_schedulers(self, fields=None, params=None, batch=None, from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adsreportbuildermmmreportscheduler import AdsReportBuilderMMMReportScheduler param_types = { } enums = { @@ -837,9 +1311,9 @@ def get_ads_reporting_mmm_schedulers(self, fields=None, params=None, batch=None, endpoint='/ads_reporting_mmm_schedulers', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=AdsReportBuilderMMMReportScheduler, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=AdsReportBuilderMMMReportScheduler, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -1183,6 +1657,7 @@ def get_business_projects(self, fields=None, params=None, batch=None, success=No from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.businessproject import BusinessProject param_types = { } enums = { @@ -1193,9 +1668,9 @@ def get_business_projects(self, fields=None, params=None, batch=None, success=No endpoint='/businessprojects', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=BusinessProject, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=BusinessProject, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -1339,6 +1814,7 @@ def get_client_offsite_signal_container_business_objects(self, fields=None, para from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.offsitesignalcontainerbusinessobject import OffsiteSignalContainerBusinessObject param_types = { } enums = { @@ -1349,9 +1825,9 @@ def get_client_offsite_signal_container_business_objects(self, fields=None, para endpoint='/client_offsite_signal_container_business_objects', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=OffsiteSignalContainerBusinessObject, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=OffsiteSignalContainerBusinessObject, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -1814,6 +2290,40 @@ def get_cpas_merchant_config(self, fields=None, params=None, batch=None, success self.assure_call() return request.execute() + def create_creative_folder(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.businesscreativefolder import BusinessCreativeFolder + param_types = { + 'description': 'string', + 'name': 'string', + 'parent_folder_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/creative_folders', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessCreativeFolder, + api_type='EDGE', + response_parser=ObjectParser(target_class=BusinessCreativeFolder, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_credit_cards(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -1851,6 +2361,7 @@ def create_custom_conversion(self, fields=None, params=None, batch=None, success api_utils.warning('`success` and `failure` callback only work for batch call.') from facebook_business.adobjects.customconversion import CustomConversion param_types = { + 'action_source_type': 'action_source_type_enum', 'advanced_rule': 'string', 'custom_event_type': 'custom_event_type_enum', 'default_conversion_value': 'float', @@ -1860,6 +2371,7 @@ def create_custom_conversion(self, fields=None, params=None, batch=None, success 'rule': 'string', } enums = { + 'action_source_type_enum': CustomConversion.ActionSourceType.__dict__.values(), 'custom_event_type_enum': CustomConversion.CustomEventType.__dict__.values(), } request = FacebookRequest( @@ -1983,6 +2495,7 @@ def get_extended_credit_applications(self, fields=None, params=None, batch=None, from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.extendedcreditapplication import ExtendedCreditApplication param_types = { 'only_show_pending': 'bool', } @@ -1994,9 +2507,9 @@ def get_extended_credit_applications(self, fields=None, params=None, batch=None, endpoint='/extendedcreditapplications', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=ExtendedCreditApplication, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=ExtendedCreditApplication, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -2042,6 +2555,43 @@ def get_extended_credits(self, fields=None, params=None, batch=None, success=Non self.assure_call() return request.execute() + def create_image(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.businessimage import BusinessImage + param_types = { + 'ad_placements_validation_only': 'bool', + 'bytes': 'string', + 'creative_folder_id': 'string', + 'name': 'string', + 'validation_ad_placements': 'list', + } + enums = { + 'validation_ad_placements_enum': BusinessImage.ValidationAdPlacements.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/images', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessImage, + api_type='EDGE', + response_parser=ObjectParser(target_class=BusinessImage, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_initiated_audience_sharing_requests(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -2169,7 +2719,7 @@ def get_instagram_business_accounts(self, fields=None, params=None, batch=None, self.assure_call() return request.execute() - def delete_managed_businesses(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def delete_m_an_age_d_businesses(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -2200,7 +2750,7 @@ def delete_managed_businesses(self, fields=None, params=None, batch=None, succes self.assure_call() return request.execute() - def create_managed_business(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def create_m_an_age_d_business(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -2212,11 +2762,12 @@ def create_managed_business(self, fields=None, params=None, batch=None, success= 'survey_business_type': 'survey_business_type_enum', 'survey_num_assets': 'unsigned int', 'survey_num_people': 'unsigned int', - 'timezone_id': 'unsigned int', + 'timezone_id': 'timezone_id_enum', 'vertical': 'vertical_enum', } enums = { 'survey_business_type_enum': Business.SurveyBusinessType.__dict__.values(), + 'timezone_id_enum': Business.TimezoneId.__dict__.values(), 'vertical_enum': Business.Vertical.__dict__.values(), } request = FacebookRequest( @@ -2241,7 +2792,7 @@ def create_managed_business(self, fields=None, params=None, batch=None, success= self.assure_call() return request.execute() - def create_managed_partner_business_setup(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def create_m_an_age_d_partner_business_setup(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -2278,7 +2829,7 @@ def create_managed_partner_business_setup(self, fields=None, params=None, batch= self.assure_call() return request.execute() - def delete_managed_partner_businesses(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def delete_m_an_age_d_partner_businesses(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -2310,7 +2861,7 @@ def delete_managed_partner_businesses(self, fields=None, params=None, batch=None self.assure_call() return request.execute() - def create_managed_partner_business(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def create_m_an_age_d_partner_business(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -2324,24 +2875,514 @@ def create_managed_partner_business(self, fields=None, params=None, batch=None, 'no_ad_account': 'bool', 'page_name': 'string', 'page_profile_image_url': 'string', + 'partition_type': 'partition_type_enum', 'partner_facebook_page_url': 'string', 'partner_registration_countries': 'list', 'sales_rep_email': 'string', 'seller_external_website_url': 'string', 'seller_targeting_countries': 'list', + 'skip_partner_page_creation': 'bool', 'survey_business_type': 'survey_business_type_enum', 'survey_num_assets': 'unsigned int', 'survey_num_people': 'unsigned int', - 'timezone_id': 'unsigned int', + 'timezone_id': 'timezone_id_enum', 'vertical': 'vertical_enum', } enums = { + 'partition_type_enum': [ + 'AUTH', + 'FIXED', + 'FIXED_WITHOUT_PARTITION', + ], 'survey_business_type_enum': [ 'ADVERTISER', 'AGENCY', 'APP_DEVELOPER', 'PUBLISHER', ], + 'timezone_id_enum': [ + '0', + '1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9', + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + '28', + '29', + '30', + '31', + '32', + '33', + '34', + '35', + '36', + '37', + '38', + '39', + '40', + '41', + '42', + '43', + '44', + '45', + '46', + '47', + '48', + '49', + '50', + '51', + '52', + '53', + '54', + '55', + '56', + '57', + '58', + '59', + '60', + '61', + '62', + '63', + '64', + '65', + '66', + '67', + '68', + '69', + '70', + '71', + '72', + '73', + '74', + '75', + '76', + '77', + '78', + '79', + '80', + '81', + '82', + '83', + '84', + '85', + '86', + '87', + '88', + '89', + '90', + '91', + '92', + '93', + '94', + '95', + '96', + '97', + '98', + '99', + '100', + '101', + '102', + '103', + '104', + '105', + '106', + '107', + '108', + '109', + '110', + '111', + '112', + '113', + '114', + '115', + '116', + '117', + '118', + '119', + '120', + '121', + '122', + '123', + '124', + '125', + '126', + '127', + '128', + '129', + '130', + '131', + '132', + '133', + '134', + '135', + '136', + '137', + '138', + '139', + '140', + '141', + '142', + '143', + '144', + '145', + '146', + '147', + '148', + '149', + '150', + '151', + '152', + '153', + '154', + '155', + '156', + '157', + '158', + '159', + '160', + '161', + '162', + '163', + '164', + '165', + '166', + '167', + '168', + '169', + '170', + '171', + '172', + '173', + '174', + '175', + '176', + '177', + '178', + '179', + '180', + '181', + '182', + '183', + '184', + '185', + '186', + '187', + '188', + '189', + '190', + '191', + '192', + '193', + '194', + '195', + '196', + '197', + '198', + '199', + '200', + '201', + '202', + '203', + '204', + '205', + '206', + '207', + '208', + '209', + '210', + '211', + '212', + '213', + '214', + '215', + '216', + '217', + '218', + '219', + '220', + '221', + '222', + '223', + '224', + '225', + '226', + '227', + '228', + '229', + '230', + '231', + '232', + '233', + '234', + '235', + '236', + '237', + '238', + '239', + '240', + '241', + '242', + '243', + '244', + '245', + '246', + '247', + '248', + '249', + '250', + '251', + '252', + '253', + '254', + '255', + '256', + '257', + '258', + '259', + '260', + '261', + '262', + '263', + '264', + '265', + '266', + '267', + '268', + '269', + '270', + '271', + '272', + '273', + '274', + '275', + '276', + '277', + '278', + '279', + '280', + '281', + '282', + '283', + '284', + '285', + '286', + '287', + '288', + '289', + '290', + '291', + '292', + '293', + '294', + '295', + '296', + '297', + '298', + '299', + '300', + '301', + '302', + '303', + '304', + '305', + '306', + '307', + '308', + '309', + '310', + '311', + '312', + '313', + '314', + '315', + '316', + '317', + '318', + '319', + '320', + '321', + '322', + '323', + '324', + '325', + '326', + '327', + '328', + '329', + '330', + '331', + '332', + '333', + '334', + '335', + '336', + '337', + '338', + '339', + '340', + '341', + '342', + '343', + '344', + '345', + '346', + '347', + '348', + '349', + '350', + '351', + '352', + '353', + '354', + '355', + '356', + '357', + '358', + '359', + '360', + '361', + '362', + '363', + '364', + '365', + '366', + '367', + '368', + '369', + '370', + '371', + '372', + '373', + '374', + '375', + '376', + '377', + '378', + '379', + '380', + '381', + '382', + '383', + '384', + '385', + '386', + '387', + '388', + '389', + '390', + '391', + '392', + '393', + '394', + '395', + '396', + '397', + '398', + '399', + '400', + '401', + '402', + '403', + '404', + '405', + '406', + '407', + '408', + '409', + '410', + '411', + '412', + '413', + '414', + '415', + '416', + '417', + '418', + '419', + '420', + '421', + '422', + '423', + '424', + '425', + '426', + '427', + '428', + '429', + '430', + '431', + '432', + '433', + '434', + '435', + '436', + '437', + '438', + '439', + '440', + '441', + '442', + '443', + '444', + '445', + '446', + '447', + '448', + '449', + '450', + '451', + '452', + '453', + '454', + '455', + '456', + '457', + '458', + '459', + '460', + '461', + '462', + '463', + '464', + '465', + '466', + '467', + '468', + '469', + '470', + '471', + '472', + '473', + '474', + '475', + '476', + '477', + '478', + '479', + '480', + ], 'vertical_enum': [ 'ADVERTISING', 'AUTOMOTIVE', @@ -2357,6 +3398,7 @@ def create_managed_partner_business(self, fields=None, params=None, batch=None, 'LUXURY', 'MARKETING', 'NON_PROFIT', + 'NOT_SET', 'ORGANIZATIONS_AND_ASSOCIATIONS', 'OTHER', 'PROFESSIONAL_SERVICES', @@ -2393,6 +3435,7 @@ def get_negative_keyword_lists(self, fields=None, params=None, batch=None, succe from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.negativekeywordlist import NegativeKeywordList param_types = { } enums = { @@ -2403,76 +3446,9 @@ def get_negative_keyword_lists(self, fields=None, params=None, batch=None, succe endpoint='/negative_keyword_lists', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=NegativeKeywordList, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - - def get_offline_conversion_data_sets(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.offlineconversiondataset import OfflineConversionDataSet - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/offline_conversion_data_sets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=OfflineConversionDataSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=OfflineConversionDataSet, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - - def create_offline_conversion_data_set(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.offlineconversiondataset import OfflineConversionDataSet - param_types = { - 'auto_assign_to_new_accounts_only': 'bool', - 'description': 'string', - 'enable_auto_assign_to_accounts': 'bool', - 'is_mta_use': 'bool', - 'name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/offline_conversion_data_sets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=OfflineConversionDataSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=OfflineConversionDataSet, api=self._api), + response_parser=ObjectParser(target_class=NegativeKeywordList, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -2523,11 +3499,13 @@ def create_open_bridge_configuration(self, fields=None, params=None, batch=None, api_utils.warning('`success` and `failure` callback only work for batch call.') from facebook_business.adobjects.openbridgeconfiguration import OpenBridgeConfiguration param_types = { - 'access_key': 'string', 'active': 'bool', 'endpoint': 'string', + 'fallback_domain': 'string', + 'fallback_domain_enabled': 'bool', 'host_business_id': 'unsigned int', 'host_external_id': 'string', + 'instance_id': 'string', 'pixel_id': 'unsigned int', } enums = { @@ -2752,15 +3730,17 @@ def create_owned_business(self, fields=None, params=None, batch=None, success=No 'page_permitted_tasks': 'list', 'sales_rep_email': 'string', 'shared_page_id': 'string', + 'should_generate_name': 'bool', 'survey_business_type': 'survey_business_type_enum', 'survey_num_assets': 'unsigned int', 'survey_num_people': 'unsigned int', - 'timezone_id': 'unsigned int', + 'timezone_id': 'timezone_id_enum', 'vertical': 'vertical_enum', } enums = { 'page_permitted_tasks_enum': Business.PagePermittedTasks.__dict__.values(), 'survey_business_type_enum': Business.SurveyBusinessType.__dict__.values(), + 'timezone_id_enum': Business.TimezoneId.__dict__.values(), 'vertical_enum': Business.Vertical.__dict__.values(), } request = FacebookRequest( @@ -2820,6 +3800,7 @@ def get_owned_offsite_signal_container_business_objects(self, fields=None, param from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.offsitesignalcontainerbusinessobject import OffsiteSignalContainerBusinessObject param_types = { } enums = { @@ -2830,9 +3811,9 @@ def get_owned_offsite_signal_container_business_objects(self, fields=None, param endpoint='/owned_offsite_signal_container_business_objects', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=OffsiteSignalContainerBusinessObject, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=OffsiteSignalContainerBusinessObject, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -2883,6 +3864,7 @@ def create_owned_page(self, fields=None, params=None, batch=None, success=None, api_utils.warning('`success` and `failure` callback only work for batch call.') param_types = { 'code': 'string', + 'entry_point': 'string', 'page_id': 'int', } enums = { @@ -2977,6 +3959,7 @@ def create_owned_product_catalog(self, fields=None, params=None, batch=None, suc api_utils.warning('`success` and `failure` callback only work for batch call.') from facebook_business.adobjects.productcatalog import ProductCatalog param_types = { + 'additional_vertical_option': 'additional_vertical_option_enum', 'catalog_segment_filter': 'Object', 'catalog_segment_product_set_id': 'string', 'da_display_settings': 'Object', @@ -2989,6 +3972,7 @@ def create_owned_product_catalog(self, fields=None, params=None, batch=None, suc 'vertical': 'vertical_enum', } enums = { + 'additional_vertical_option_enum': ProductCatalog.AdditionalVerticalOption.__dict__.values(), 'vertical_enum': ProductCatalog.Vertical.__dict__.values(), } request = FacebookRequest( @@ -3075,6 +4059,37 @@ def delete_pages(self, fields=None, params=None, batch=None, success=None, failu self.assure_call() return request.execute() + def get_partner_account_linking(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.partneraccountlinking import PartnerAccountLinking + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/partner_account_linking', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PartnerAccountLinking, + api_type='EDGE', + response_parser=ObjectParser(target_class=PartnerAccountLinking, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def create_partner_premium_option(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -3266,10 +4281,11 @@ def get_pending_owned_pages(self, fields=None, params=None, batch=None, success= self.assure_call() return request.execute() - def get_pending_shared_offsite_signal_container_business_objects(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_pending_share_d_offsite_signal_container_business_objects(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.offsitesignalcontainerbusinessobject import OffsiteSignalContainerBusinessObject param_types = { } enums = { @@ -3280,9 +4296,9 @@ def get_pending_shared_offsite_signal_container_business_objects(self, fields=No endpoint='/pending_shared_offsite_signal_container_business_objects', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=OffsiteSignalContainerBusinessObject, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=OffsiteSignalContainerBusinessObject, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -3334,14 +4350,12 @@ def get_picture(self, fields=None, params=None, batch=None, success=None, failur api_utils.warning('`success` and `failure` callback only work for batch call.') from facebook_business.adobjects.profilepicturesource import ProfilePictureSource param_types = { - 'breaking_change': 'breaking_change_enum', 'height': 'int', 'redirect': 'bool', 'type': 'type_enum', 'width': 'int', } enums = { - 'breaking_change_enum': ProfilePictureSource.BreakingChange.__dict__.values(), 'type_enum': ProfilePictureSource.Type.__dict__.values(), } request = FacebookRequest( @@ -3464,7 +4478,70 @@ def get_received_audience_sharing_requests(self, fields=None, params=None, batch self.assure_call() return request.execute() - def create_setup_managed_partner_ad_account(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_reseller_guidances(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.resellerguidance import ResellerGuidance + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/reseller_guidances', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ResellerGuidance, + api_type='EDGE', + response_parser=ObjectParser(target_class=ResellerGuidance, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_self_certified_whatsapp_business_submissions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.whatsappbusinesspartnerclientverificationsubmission import WhatsAppBusinessPartnerClientVerificationSubmission + param_types = { + 'end_business_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/self_certified_whatsapp_business_submissions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=WhatsAppBusinessPartnerClientVerificationSubmission, + api_type='EDGE', + response_parser=ObjectParser(target_class=WhatsAppBusinessPartnerClientVerificationSubmission, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_setup_m_an_age_d_partner_ad_account(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -3501,6 +4578,105 @@ def create_setup_managed_partner_ad_account(self, fields=None, params=None, batc self.assure_call() return request.execute() + def delete_share_pre_verified_numbers(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'partner_business_id': 'string', + 'preverified_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/share_preverified_numbers', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_share_pre_verified_number(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'partner_business_id': 'string', + 'preverified_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/share_preverified_numbers', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Business, + api_type='EDGE', + response_parser=ObjectParser(target_class=Business, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_system_user_access_token(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'asset': 'list', + 'fetch_only': 'bool', + 'scope': 'list', + 'set_token_expires_in_60_days': 'bool', + 'system_user_id': 'unsigned int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/system_user_access_tokens', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Business, + api_type='EDGE', + response_parser=ObjectParser(target_class=Business, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_system_users(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -3571,6 +4747,7 @@ def get_third_party_measurement_report_dataset(self, fields=None, params=None, b from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.thirdpartymeasurementreportdataset import ThirdPartyMeasurementReportDataset param_types = { } enums = { @@ -3581,9 +4758,119 @@ def get_third_party_measurement_report_dataset(self, fields=None, params=None, b endpoint='/third_party_measurement_report_dataset', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=ThirdPartyMeasurementReportDataset, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=ThirdPartyMeasurementReportDataset, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_video(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.advideo import AdVideo + param_types = { + 'ad_placements_validation_only': 'bool', + 'animated_effect_id': 'unsigned int', + 'application_id': 'string', + 'asked_fun_fact_prompt_id': 'unsigned int', + 'audio_story_wave_animation_handle': 'string', + 'chunk_session_id': 'string', + 'composer_entry_picker': 'string', + 'composer_entry_point': 'string', + 'composer_entry_time': 'unsigned int', + 'composer_session_events_log': 'string', + 'composer_session_id': 'string', + 'composer_source_surface': 'string', + 'composer_type': 'string', + 'container_type': 'container_type_enum', + 'content_category': 'content_category_enum', + 'creative_folder_id': 'string', + 'creative_tools': 'string', + 'description': 'string', + 'embeddable': 'bool', + 'end_offset': 'unsigned int', + 'fbuploader_video_file_chunk': 'string', + 'file_size': 'unsigned int', + 'file_url': 'string', + 'fisheye_video_cropped': 'bool', + 'formatting': 'formatting_enum', + 'fov': 'unsigned int', + 'front_z_rotation': 'float', + 'fun_fact_prompt_id': 'unsigned int', + 'fun_fact_toastee_id': 'unsigned int', + 'guide': 'list>', + 'guide_enabled': 'bool', + 'holiday_card': 'string', + 'initial_heading': 'unsigned int', + 'initial_pitch': 'unsigned int', + 'instant_game_entry_point_data': 'string', + 'is_boost_intended': 'bool', + 'is_group_linking_post': 'bool', + 'is_voice_clip': 'bool', + 'location_source_id': 'string', + 'offer_like_post_id': 'unsigned int', + 'og_action_type_id': 'string', + 'og_icon_id': 'string', + 'og_object_id': 'string', + 'og_phrase': 'string', + 'og_suggestion_mechanism': 'string', + 'original_fov': 'unsigned int', + 'original_projection_type': 'original_projection_type_enum', + 'publish_event_id': 'unsigned int', + 'referenced_sticker_id': 'string', + 'replace_video_id': 'string', + 'slideshow_spec': 'map', + 'source': 'string', + 'source_instagram_media_id': 'string', + 'spherical': 'bool', + 'start_offset': 'unsigned int', + 'swap_mode': 'swap_mode_enum', + 'text_format_metadata': 'string', + 'throwback_camera_roll_media': 'string', + 'thumb': 'file', + 'time_since_original_post': 'unsigned int', + 'title': 'string', + 'transcode_setting_properties': 'string', + 'unpublished_content_type': 'unpublished_content_type_enum', + 'upload_phase': 'upload_phase_enum', + 'upload_session_id': 'string', + 'upload_setting_properties': 'string', + 'validation_ad_placements': 'list', + 'video_file_chunk': 'string', + 'video_id_original': 'string', + 'video_start_time_ms': 'unsigned int', + 'waterfall_id': 'string', + } + enums = { + 'container_type_enum': AdVideo.ContainerType.__dict__.values(), + 'content_category_enum': AdVideo.ContentCategory.__dict__.values(), + 'formatting_enum': AdVideo.Formatting.__dict__.values(), + 'original_projection_type_enum': AdVideo.OriginalProjectionType.__dict__.values(), + 'swap_mode_enum': AdVideo.SwapMode.__dict__.values(), + 'unpublished_content_type_enum': AdVideo.UnpublishedContentType.__dict__.values(), + 'upload_phase_enum': AdVideo.UploadPhase.__dict__.values(), + 'validation_ad_placements_enum': AdVideo.ValidationAdPlacements.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/videos', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdVideo, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdVideo, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -3616,6 +4903,7 @@ def get_third_party_measurement_report_dataset(self, fields=None, params=None, b 'two_factor_type': 'string', 'updated_by': 'Object', 'updated_time': 'datetime', + 'user_access_expire_time': 'datetime', 'verification_status': 'string', 'vertical': 'string', 'vertical_id': 'unsigned int', @@ -3627,6 +4915,7 @@ def _get_field_enum_info(cls): field_enum_info['Vertical'] = Business.Vertical.__dict__.values() field_enum_info['PermittedTasks'] = Business.PermittedTasks.__dict__.values() field_enum_info['SurveyBusinessType'] = Business.SurveyBusinessType.__dict__.values() + field_enum_info['TimezoneId'] = Business.TimezoneId.__dict__.values() field_enum_info['PagePermittedTasks'] = Business.PagePermittedTasks.__dict__.values() field_enum_info['SubverticalV2'] = Business.SubverticalV2.__dict__.values() field_enum_info['VerticalV2'] = Business.VerticalV2.__dict__.values() diff --git a/facebook_business/adobjects/businessadaccountrequest.py b/facebook_business/adobjects/businessadaccountrequest.py index 519d3a6ce..bf9551124 100644 --- a/facebook_business/adobjects/businessadaccountrequest.py +++ b/facebook_business/adobjects/businessadaccountrequest.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/businessadsreportingreportspecs.py b/facebook_business/adobjects/businessadsreportingreportspecs.py new file mode 100644 index 000000000..8e5a3ed7a --- /dev/null +++ b/facebook_business/adobjects/businessadsreportingreportspecs.py @@ -0,0 +1,116 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BusinessAdsReportingReportSpecs( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessAdsReportingReportSpecs = True + super(BusinessAdsReportingReportSpecs, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + action_report_time = 'action_report_time' + ad_account_id = 'ad_account_id' + ad_account_ids = 'ad_account_ids' + ad_accounts = 'ad_accounts' + attribution_windows = 'attribution_windows' + business = 'business' + business_asset_group = 'business_asset_group' + comparison_date_interval = 'comparison_date_interval' + creation_source = 'creation_source' + creation_time = 'creation_time' + currency = 'currency' + date_preset = 'date_preset' + default_attribution_windows = 'default_attribution_windows' + filtering = 'filtering' + formatting = 'formatting' + id = 'id' + last_access_by = 'last_access_by' + last_access_time = 'last_access_time' + last_report_snapshot_id = 'last_report_snapshot_id' + last_report_snapshot_time = 'last_report_snapshot_time' + last_shared_report_expiration = 'last_shared_report_expiration' + limit = 'limit' + locked_dimensions = 'locked_dimensions' + report_name = 'report_name' + report_snapshot_async_percent_completion = 'report_snapshot_async_percent_completion' + report_snapshot_async_status = 'report_snapshot_async_status' + schedule_frequency = 'schedule_frequency' + scope = 'scope' + show_deprecate_aw_banner = 'show_deprecate_aw_banner' + sorting = 'sorting' + start_date = 'start_date' + status = 'status' + subscribers = 'subscribers' + update_by = 'update_by' + update_time = 'update_time' + user = 'user' + user_dimensions = 'user_dimensions' + user_metrics = 'user_metrics' + view_type = 'view_type' + + _field_types = { + 'action_report_time': 'string', + 'ad_account_id': 'string', + 'ad_account_ids': 'list', + 'ad_accounts': 'list', + 'attribution_windows': 'list', + 'business': 'Business', + 'business_asset_group': 'BusinessAssetGroup', + 'comparison_date_interval': 'Object', + 'creation_source': 'string', + 'creation_time': 'datetime', + 'currency': 'string', + 'date_preset': 'string', + 'default_attribution_windows': 'list', + 'filtering': 'list', + 'formatting': 'list>>', + 'id': 'string', + 'last_access_by': 'Profile', + 'last_access_time': 'datetime', + 'last_report_snapshot_id': 'string', + 'last_report_snapshot_time': 'datetime', + 'last_shared_report_expiration': 'datetime', + 'limit': 'int', + 'locked_dimensions': 'int', + 'report_name': 'string', + 'report_snapshot_async_percent_completion': 'int', + 'report_snapshot_async_status': 'string', + 'schedule_frequency': 'string', + 'scope': 'string', + 'show_deprecate_aw_banner': 'bool', + 'sorting': 'list', + 'start_date': 'string', + 'status': 'string', + 'subscribers': 'list', + 'update_by': 'Profile', + 'update_time': 'datetime', + 'user': 'Profile', + 'user_dimensions': 'list', + 'user_metrics': 'list', + 'view_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/businessadvertisableapplicationsresult.py b/facebook_business/adobjects/businessadvertisableapplicationsresult.py new file mode 100644 index 000000000..f7c90d137 --- /dev/null +++ b/facebook_business/adobjects/businessadvertisableapplicationsresult.py @@ -0,0 +1,50 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BusinessAdvertisableApplicationsResult( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessAdvertisableApplicationsResult = True + super(BusinessAdvertisableApplicationsResult, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + are_app_events_unavailable = 'are_app_events_unavailable' + business = 'business' + has_insight_permission = 'has_insight_permission' + id = 'id' + name = 'name' + photo_url = 'photo_url' + + _field_types = { + 'are_app_events_unavailable': 'bool', + 'business': 'Business', + 'has_insight_permission': 'bool', + 'id': 'string', + 'name': 'string', + 'photo_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/businessagreement.py b/facebook_business/adobjects/businessagreement.py new file mode 100644 index 000000000..9a6936718 --- /dev/null +++ b/facebook_business/adobjects/businessagreement.py @@ -0,0 +1,115 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BusinessAgreement( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessAgreement = True + super(BusinessAgreement, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + request_status = 'request_status' + + class RequestStatus: + approve = 'APPROVE' + decline = 'DECLINE' + expired = 'EXPIRED' + in_progress = 'IN_PROGRESS' + pending = 'PENDING' + pending_email_verification = 'PENDING_EMAIL_VERIFICATION' + pending_integrity_review = 'PENDING_INTEGRITY_REVIEW' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessAgreement, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def api_update(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'asset_id': 'unsigned int', + 'request_status': 'request_status_enum', + } + enums = { + 'request_status_enum': BusinessAgreement.RequestStatus.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessAgreement, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'request_status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['RequestStatus'] = BusinessAgreement.RequestStatus.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/businessapplicationrequest.py b/facebook_business/adobjects/businessapplicationrequest.py index 34f7c85d3..ffa916d54 100644 --- a/facebook_business/adobjects/businessapplicationrequest.py +++ b/facebook_business/adobjects/businessapplicationrequest.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/businessassetgroup.py b/facebook_business/adobjects/businessassetgroup.py index ad987857f..b0381f461 100644 --- a/facebook_business/adobjects/businessassetgroup.py +++ b/facebook_business/adobjects/businessassetgroup.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -628,99 +614,6 @@ def create_contained_instagram_account(self, fields=None, params=None, batch=Non self.assure_call() return request.execute() - def delete_contained_offline_conversion_data_sets(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'asset_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/contained_offline_conversion_data_sets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, - api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - - def get_contained_offline_conversion_data_sets(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.offlineconversiondataset import OfflineConversionDataSet - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/contained_offline_conversion_data_sets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=OfflineConversionDataSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=OfflineConversionDataSet, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - - def create_contained_offline_conversion_data_set(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'asset_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/contained_offline_conversion_data_sets', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=BusinessAssetGroup, - api_type='EDGE', - response_parser=ObjectParser(target_class=BusinessAssetGroup, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - def delete_contained_pages(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): diff --git a/facebook_business/adobjects/businessassetsharingagreement.py b/facebook_business/adobjects/businessassetsharingagreement.py index 24fa035df..6381f7fd1 100644 --- a/facebook_business/adobjects/businessassetsharingagreement.py +++ b/facebook_business/adobjects/businessassetsharingagreement.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/businesscreative.py b/facebook_business/adobjects/businesscreative.py new file mode 100644 index 000000000..3e8ae3a8a --- /dev/null +++ b/facebook_business/adobjects/businesscreative.py @@ -0,0 +1,60 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BusinessCreative( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessCreative = True + super(BusinessCreative, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + creation_time = 'creation_time' + duration = 'duration' + hash = 'hash' + height = 'height' + id = 'id' + name = 'name' + thumbnail = 'thumbnail' + type = 'type' + url = 'url' + video_id = 'video_id' + width = 'width' + + _field_types = { + 'creation_time': 'datetime', + 'duration': 'int', + 'hash': 'string', + 'height': 'int', + 'id': 'string', + 'name': 'string', + 'thumbnail': 'string', + 'type': 'string', + 'url': 'string', + 'video_id': 'string', + 'width': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/businesscreativefolder.py b/facebook_business/adobjects/businesscreativefolder.py new file mode 100644 index 000000000..d17d76ced --- /dev/null +++ b/facebook_business/adobjects/businesscreativefolder.py @@ -0,0 +1,96 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BusinessCreativeFolder( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessCreativeFolder = True + super(BusinessCreativeFolder, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + business = 'business' + creation_time = 'creation_time' + creative_insight_permissions = 'creative_insight_permissions' + description = 'description' + id = 'id' + media_library_url = 'media_library_url' + name = 'name' + owner_business = 'owner_business' + parent_folder_id = 'parent_folder_id' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'creative_folders' + + # @deprecated api_create is being deprecated + def api_create(self, parent_id, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.adobjects.business import Business + return Business(api=self._api, fbid=parent_id).create_creative_folder(fields, params, batch, success, failure, pending) + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessCreativeFolder, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'business': 'Business', + 'creation_time': 'datetime', + 'creative_insight_permissions': 'list>', + 'description': 'string', + 'id': 'string', + 'media_library_url': 'string', + 'name': 'string', + 'owner_business': 'Business', + 'parent_folder_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/businesscreativeinsights.py b/facebook_business/adobjects/businesscreativeinsights.py new file mode 100644 index 000000000..36d364954 --- /dev/null +++ b/facebook_business/adobjects/businesscreativeinsights.py @@ -0,0 +1,67 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 BusinessCreativeInsights( + AbstractObject, +): + + def __init__(self, api=None): + super(BusinessCreativeInsights, self).__init__() + self._isBusinessCreativeInsights = True + self._api = api + + class Field(AbstractObject.Field): + actions = 'actions' + age = 'age' + country = 'country' + date_end = 'date_end' + date_start = 'date_start' + device_platform = 'device_platform' + gender = 'gender' + impressions = 'impressions' + inline_link_clicks = 'inline_link_clicks' + objective = 'objective' + optimization_goal = 'optimization_goal' + platform_position = 'platform_position' + publisher_platform = 'publisher_platform' + quality_ranking = 'quality_ranking' + video_play_actions = 'video_play_actions' + video_thruplay_watched_actions = 'video_thruplay_watched_actions' + + _field_types = { + 'actions': 'list', + 'age': 'string', + 'country': 'string', + 'date_end': 'string', + 'date_start': 'string', + 'device_platform': 'string', + 'gender': 'string', + 'impressions': 'int', + 'inline_link_clicks': 'int', + 'objective': 'string', + 'optimization_goal': 'string', + 'platform_position': 'string', + 'publisher_platform': 'string', + 'quality_ranking': 'string', + 'video_play_actions': 'list', + 'video_thruplay_watched_actions': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/businessfranchiseconfig.py b/facebook_business/adobjects/businessfranchiseconfig.py new file mode 100644 index 000000000..1bbfefb24 --- /dev/null +++ b/facebook_business/adobjects/businessfranchiseconfig.py @@ -0,0 +1,94 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BusinessFranchiseConfig( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessFranchiseConfig = True + super(BusinessFranchiseConfig, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + active_partner_count = 'active_partner_count' + agency_business = 'agency_business' + agency_business_asset_group = 'agency_business_asset_group' + brand_name = 'brand_name' + business = 'business' + business_vertical = 'business_vertical' + id = 'id' + partner_count = 'partner_count' + pending_agency_business = 'pending_agency_business' + program_count = 'program_count' + shared_business_asset_group = 'shared_business_asset_group' + shared_creative_folder_count = 'shared_creative_folder_count' + shared_custom_audience_count = 'shared_custom_audience_count' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessFranchiseConfig, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'active_partner_count': 'int', + 'agency_business': 'Business', + 'agency_business_asset_group': 'BusinessAssetGroup', + 'brand_name': 'string', + 'business': 'Business', + 'business_vertical': 'string', + 'id': 'string', + 'partner_count': 'int', + 'pending_agency_business': 'string', + 'program_count': 'int', + 'shared_business_asset_group': 'BusinessAssetGroup', + 'shared_creative_folder_count': 'int', + 'shared_custom_audience_count': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/businessimage.py b/facebook_business/adobjects/businessimage.py index c408165e2..6885113b1 100644 --- a/facebook_business/adobjects/businessimage.py +++ b/facebook_business/adobjects/businessimage.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -51,6 +37,45 @@ class Field(AbstractObject.Field): url = 'url' url_128 = 'url_128' width = 'width' + ad_placements_validation_only = 'ad_placements_validation_only' + bytes = 'bytes' + creative_folder_id = 'creative_folder_id' + validation_ad_placements = 'validation_ad_placements' + + class ValidationAdPlacements: + audience_network_instream_video = 'AUDIENCE_NETWORK_INSTREAM_VIDEO' + audience_network_instream_video_mobile = 'AUDIENCE_NETWORK_INSTREAM_VIDEO_MOBILE' + audience_network_rewarded_video = 'AUDIENCE_NETWORK_REWARDED_VIDEO' + desktop_feed_standard = 'DESKTOP_FEED_STANDARD' + facebook_story_mobile = 'FACEBOOK_STORY_MOBILE' + facebook_story_sticker_mobile = 'FACEBOOK_STORY_STICKER_MOBILE' + instagram_standard = 'INSTAGRAM_STANDARD' + instagram_story = 'INSTAGRAM_STORY' + instant_article_standard = 'INSTANT_ARTICLE_STANDARD' + instream_banner_desktop = 'INSTREAM_BANNER_DESKTOP' + instream_banner_mobile = 'INSTREAM_BANNER_MOBILE' + instream_video_desktop = 'INSTREAM_VIDEO_DESKTOP' + instream_video_image = 'INSTREAM_VIDEO_IMAGE' + instream_video_mobile = 'INSTREAM_VIDEO_MOBILE' + messenger_mobile_inbox_media = 'MESSENGER_MOBILE_INBOX_MEDIA' + messenger_mobile_story_media = 'MESSENGER_MOBILE_STORY_MEDIA' + mobile_feed_standard = 'MOBILE_FEED_STANDARD' + mobile_fullwidth = 'MOBILE_FULLWIDTH' + mobile_interstitial = 'MOBILE_INTERSTITIAL' + mobile_medium_rectangle = 'MOBILE_MEDIUM_RECTANGLE' + mobile_native = 'MOBILE_NATIVE' + right_column_standard = 'RIGHT_COLUMN_STANDARD' + suggested_video_mobile = 'SUGGESTED_VIDEO_MOBILE' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'images' + + # @deprecated api_create is being deprecated + def api_create(self, parent_id, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.adobjects.business import Business + return Business(api=self._api, fbid=parent_id).create_image(fields, params, batch, success, failure, pending) def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils @@ -93,10 +118,15 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No 'url': 'string', 'url_128': 'string', 'width': 'int', + 'ad_placements_validation_only': 'bool', + 'bytes': 'string', + 'creative_folder_id': 'string', + 'validation_ad_placements': 'list', } @classmethod def _get_field_enum_info(cls): field_enum_info = {} + field_enum_info['ValidationAdPlacements'] = BusinessImage.ValidationAdPlacements.__dict__.values() return field_enum_info diff --git a/facebook_business/adobjects/businessimagetbusinessfolderpathitem.py b/facebook_business/adobjects/businessimagetbusinessfolderpathitem.py new file mode 100644 index 000000000..c28b59284 --- /dev/null +++ b/facebook_business/adobjects/businessimagetbusinessfolderpathitem.py @@ -0,0 +1,44 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BusinessImageTBusinessFolderPathItem( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessImageTBusinessFolderPathItem = True + super(BusinessImageTBusinessFolderPathItem, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + parent_folder_id = 'parent_folder_id' + type = 'type' + + _field_types = { + 'id': 'string', + 'parent_folder_id': 'string', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/businessmanagedpartnereligibility.py b/facebook_business/adobjects/businessmanagedpartnereligibility.py index eef56a70a..f51971c5a 100644 --- a/facebook_business/adobjects/businessmanagedpartnereligibility.py +++ b/facebook_business/adobjects/businessmanagedpartnereligibility.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/businessmediaadplacementvalidationresult.py b/facebook_business/adobjects/businessmediaadplacementvalidationresult.py new file mode 100644 index 000000000..4855bfa4f --- /dev/null +++ b/facebook_business/adobjects/businessmediaadplacementvalidationresult.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 BusinessMediaAdPlacementValidationResult( + AbstractObject, +): + + def __init__(self, api=None): + super(BusinessMediaAdPlacementValidationResult, self).__init__() + self._isBusinessMediaAdPlacementValidationResult = True + self._api = api + + class Field(AbstractObject.Field): + ad_placement = 'ad_placement' + ad_placement_label = 'ad_placement_label' + error_messages = 'error_messages' + is_valid = 'is_valid' + + _field_types = { + 'ad_placement': 'string', + 'ad_placement_label': 'string', + 'error_messages': 'list', + 'is_valid': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/businessobject.py b/facebook_business/adobjects/businessobject.py new file mode 100644 index 000000000..a7a7e20fa --- /dev/null +++ b/facebook_business/adobjects/businessobject.py @@ -0,0 +1,48 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BusinessObject( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessObject = True + super(BusinessObject, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + asset = 'asset' + asset_type = 'asset_type' + id = 'id' + name = 'name' + picture = 'picture' + + _field_types = { + 'asset': 'Object', + 'asset_type': 'string', + 'id': 'string', + 'name': 'string', + 'picture': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/businessobjecttransferownershipagreement.py b/facebook_business/adobjects/businessobjecttransferownershipagreement.py new file mode 100644 index 000000000..8931e46ef --- /dev/null +++ b/facebook_business/adobjects/businessobjecttransferownershipagreement.py @@ -0,0 +1,76 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BusinessObjectTransferOwnershipAgreement( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessObjectTransferOwnershipAgreement = True + super(BusinessObjectTransferOwnershipAgreement, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + receiving_business = 'receiving_business' + requesting_business = 'requesting_business' + status = 'status' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessObjectTransferOwnershipAgreement, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'receiving_business': 'Business', + 'requesting_business': 'Business', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/businessownedobjectonbehalfofrequest.py b/facebook_business/adobjects/businessownedobjectonbehalfofrequest.py index 484ac0244..bd7b22ffc 100644 --- a/facebook_business/adobjects/businessownedobjectonbehalfofrequest.py +++ b/facebook_business/adobjects/businessownedobjectonbehalfofrequest.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/businesspagerequest.py b/facebook_business/adobjects/businesspagerequest.py index 1b4c4c1ee..4d8774142 100644 --- a/facebook_business/adobjects/businesspagerequest.py +++ b/facebook_business/adobjects/businesspagerequest.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/businesspartnerpremiumoptions.py b/facebook_business/adobjects/businesspartnerpremiumoptions.py index 6a084a9f8..f64ff8e7a 100644 --- a/facebook_business/adobjects/businesspartnerpremiumoptions.py +++ b/facebook_business/adobjects/businesspartnerpremiumoptions.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/businessproductcatalogtos.py b/facebook_business/adobjects/businessproductcatalogtos.py new file mode 100644 index 000000000..d293ab53e --- /dev/null +++ b/facebook_business/adobjects/businessproductcatalogtos.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 BusinessProductCatalogTOS( + AbstractObject, +): + + def __init__(self, api=None): + super(BusinessProductCatalogTOS, self).__init__() + self._isBusinessProductCatalogTOS = True + self._api = api + + class Field(AbstractObject.Field): + accepted = 'accepted' + content = 'content' + + _field_types = { + 'accepted': 'bool', + 'content': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/businessproject.py b/facebook_business/adobjects/businessproject.py new file mode 100644 index 000000000..623aa6496 --- /dev/null +++ b/facebook_business/adobjects/businessproject.py @@ -0,0 +1,78 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BusinessProject( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessProject = True + super(BusinessProject, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + business = 'business' + created_time = 'created_time' + creator = 'creator' + id = 'id' + name = 'name' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessProject, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'business': 'Business', + 'created_time': 'datetime', + 'creator': 'Object', + 'id': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/businessrequest.py b/facebook_business/adobjects/businessrequest.py new file mode 100644 index 000000000..403798432 --- /dev/null +++ b/facebook_business/adobjects/businessrequest.py @@ -0,0 +1,86 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BusinessRequest( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessRequest = True + super(BusinessRequest, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + accessor = 'accessor' + creation_time = 'creation_time' + id = 'id' + object_id = 'object_id' + object_type = 'object_type' + permitted_tasks = 'permitted_tasks' + request_status = 'request_status' + request_type = 'request_type' + requestor = 'requestor' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessRequest, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'accessor': 'Business', + 'creation_time': 'datetime', + 'id': 'string', + 'object_id': 'string', + 'object_type': 'string', + 'permitted_tasks': 'list', + 'request_status': 'string', + 'request_type': 'string', + 'requestor': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/businessrolerequest.py b/facebook_business/adobjects/businessrolerequest.py index c67d17055..249111fba 100644 --- a/facebook_business/adobjects/businessrolerequest.py +++ b/facebook_business/adobjects/businessrolerequest.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/businesssettinglogsdata.py b/facebook_business/adobjects/businesssettinglogsdata.py new file mode 100644 index 000000000..c4a19a3a4 --- /dev/null +++ b/facebook_business/adobjects/businesssettinglogsdata.py @@ -0,0 +1,45 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 BusinessSettingLogsData( + AbstractObject, +): + + def __init__(self, api=None): + super(BusinessSettingLogsData, self).__init__() + self._isBusinessSettingLogsData = True + self._api = api + + class Field(AbstractObject.Field): + actor = 'actor' + event_object = 'event_object' + event_time = 'event_time' + event_type = 'event_type' + extra_data = 'extra_data' + + _field_types = { + 'actor': 'Object', + 'event_object': 'Object', + 'event_time': 'string', + 'event_type': 'string', + 'extra_data': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/businesstag.py b/facebook_business/adobjects/businesstag.py new file mode 100644 index 000000000..aaefce3ce --- /dev/null +++ b/facebook_business/adobjects/businesstag.py @@ -0,0 +1,72 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BusinessTag( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessTag = True + super(BusinessTag, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + name = 'name' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessTag, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/businesstrafficanalysisreport.py b/facebook_business/adobjects/businesstrafficanalysisreport.py new file mode 100644 index 000000000..89c7a864b --- /dev/null +++ b/facebook_business/adobjects/businesstrafficanalysisreport.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 BusinessTrafficAnalysisReport( + AbstractObject, +): + + def __init__(self, api=None): + super(BusinessTrafficAnalysisReport, self).__init__() + self._isBusinessTrafficAnalysisReport = True + self._api = api + + class Field(AbstractObject.Field): + audience_location = 'audience_location' + event_category = 'event_category' + traffic_analysis_impressions = 'traffic_analysis_impressions' + + _field_types = { + 'audience_location': 'list', + 'event_category': 'list', + 'traffic_analysis_impressions': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/businessuser.py b/facebook_business/adobjects/businessuser.py index 318772563..fd302ecba 100644 --- a/facebook_business/adobjects/businessuser.py +++ b/facebook_business/adobjects/businessuser.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -154,6 +140,7 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure 'last_name': 'string', 'pending_email': 'string', 'role': 'role_enum', + 'skip_verification_email': 'bool', 'title': 'string', } enums = { diff --git a/facebook_business/adobjects/businessvideo.py b/facebook_business/adobjects/businessvideo.py new file mode 100644 index 000000000..29c4c3737 --- /dev/null +++ b/facebook_business/adobjects/businessvideo.py @@ -0,0 +1,78 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BusinessVideo( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessVideo = True + super(BusinessVideo, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + business = 'business' + id = 'id' + media_library_url = 'media_library_url' + name = 'name' + video = 'video' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BusinessVideo, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'business': 'Business', + 'id': 'string', + 'media_library_url': 'string', + 'name': 'string', + 'video': 'AdVideo', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/businessvideotbusinessfolderpathitem.py b/facebook_business/adobjects/businessvideotbusinessfolderpathitem.py new file mode 100644 index 000000000..7a71c8819 --- /dev/null +++ b/facebook_business/adobjects/businessvideotbusinessfolderpathitem.py @@ -0,0 +1,44 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 BusinessVideoTBusinessFolderPathItem( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isBusinessVideoTBusinessFolderPathItem = True + super(BusinessVideoTBusinessFolderPathItem, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + parent_folder_id = 'parent_folder_id' + type = 'type' + + _field_types = { + 'id': 'string', + 'parent_folder_id': 'string', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/calibratorexistingrule.py b/facebook_business/adobjects/calibratorexistingrule.py new file mode 100644 index 000000000..380ce5339 --- /dev/null +++ b/facebook_business/adobjects/calibratorexistingrule.py @@ -0,0 +1,90 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 CalibratorExistingRule( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCalibratorExistingRule = True + super(CalibratorExistingRule, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + field_7d_volume = '7d_volume' + creation_source = 'creation_source' + creation_time = 'creation_time' + creator = 'creator' + event_type = 'event_type' + id = 'id' + rule = 'rule' + rule_type = 'rule_type' + sample_urls = 'sample_urls' + status = 'status' + transforms = 'transforms' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CalibratorExistingRule, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + '7d_volume': 'int', + 'creation_source': 'string', + 'creation_time': 'datetime', + 'creator': 'string', + 'event_type': 'string', + 'id': 'string', + 'rule': 'string', + 'rule_type': 'string', + 'sample_urls': 'list', + 'status': 'string', + 'transforms': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/calladsphonedata.py b/facebook_business/adobjects/calladsphonedata.py new file mode 100644 index 000000000..69417affc --- /dev/null +++ b/facebook_business/adobjects/calladsphonedata.py @@ -0,0 +1,80 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 CallAdsPhoneData( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCallAdsPhoneData = True + super(CallAdsPhoneData, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + call_ads_phone_data_use_case = 'call_ads_phone_data_use_case' + callback_variant = 'callback_variant' + destination_website_url = 'destination_website_url' + id = 'id' + page = 'page' + phone_number = 'phone_number' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CallAdsPhoneData, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'call_ads_phone_data_use_case': 'string', + 'callback_variant': 'string', + 'destination_website_url': 'string', + 'id': 'string', + 'page': 'Page', + 'phone_number': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/campaign.py b/facebook_business/adobjects/campaign.py index 3fd2978bf..ca568779f 100644 --- a/facebook_business/adobjects/campaign.py +++ b/facebook_business/adobjects/campaign.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -53,6 +39,7 @@ class Field(AbstractObject.Field): budget_rebalance_flag = 'budget_rebalance_flag' budget_remaining = 'budget_remaining' buying_type = 'buying_type' + campaign_group_active_time = 'campaign_group_active_time' can_create_brand_lift_study = 'can_create_brand_lift_study' can_use_spend_cap = 'can_use_spend_cap' configured_status = 'configured_status' @@ -61,6 +48,7 @@ class Field(AbstractObject.Field): effective_status = 'effective_status' has_secondary_skadnetwork_reporting = 'has_secondary_skadnetwork_reporting' id = 'id' + is_budget_schedule_enabled = 'is_budget_schedule_enabled' is_skadnetwork_attribution = 'is_skadnetwork_attribution' issues_info = 'issues_info' last_budget_toggling_time = 'last_budget_toggling_time' @@ -91,6 +79,7 @@ class BidStrategy: cost_cap = 'COST_CAP' lowest_cost_without_cap = 'LOWEST_COST_WITHOUT_CAP' lowest_cost_with_bid_cap = 'LOWEST_COST_WITH_BID_CAP' + lowest_cost_with_min_roas = 'LOWEST_COST_WITH_MIN_ROAS' class ConfiguredStatus: active = 'ACTIVE' @@ -491,7 +480,7 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No 'am_call_tags': 'map', 'date_preset': 'date_preset_enum', 'from_adtable': 'bool', - 'time_range': 'Object', + 'time_range': 'map', } enums = { 'date_preset_enum': [ @@ -703,7 +692,7 @@ def get_ads(self, fields=None, params=None, batch=None, success=None, failure=No param_types = { 'date_preset': 'date_preset_enum', 'effective_status': 'list', - 'time_range': 'Object', + 'time_range': 'map', 'updated_since': 'int', } enums = { @@ -740,7 +729,7 @@ def get_ad_sets(self, fields=None, params=None, batch=None, success=None, failur 'date_preset': 'date_preset_enum', 'effective_status': 'list', 'is_completed': 'bool', - 'time_range': 'Object', + 'time_range': 'map', } enums = { 'date_preset_enum': AdSet.DatePreset.__dict__.values(), @@ -768,6 +757,42 @@ def get_ad_sets(self, fields=None, params=None, batch=None, success=None, failur self.assure_call() return request.execute() + def create_budget_schedule(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.highdemandperiod import HighDemandPeriod + param_types = { + 'budget_value': 'unsigned int', + 'budget_value_type': 'budget_value_type_enum', + 'time_end': 'unsigned int', + 'time_start': 'unsigned int', + } + enums = { + 'budget_value_type_enum': HighDemandPeriod.BudgetValueType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/budget_schedules', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=HighDemandPeriod, + api_type='EDGE', + response_parser=ObjectParser(target_class=HighDemandPeriod, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_copies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -776,7 +801,7 @@ def get_copies(self, fields=None, params=None, batch=None, success=None, failure 'date_preset': 'date_preset_enum', 'effective_status': 'list', 'is_completed': 'bool', - 'time_range': 'Object', + 'time_range': 'map', } enums = { 'date_preset_enum': Campaign.DatePreset.__dict__.values(), @@ -865,8 +890,8 @@ def get_insights(self, fields=None, params=None, is_async=False, batch=None, suc 'summary': 'list', 'summary_action_breakdowns': 'list', 'time_increment': 'string', - 'time_range': 'Object', - 'time_ranges': 'list', + 'time_range': 'map', + 'time_ranges': 'list', 'use_account_attribution_setting': 'bool', 'use_unified_attribution_setting': 'bool', } @@ -926,8 +951,8 @@ def get_insights_async(self, fields=None, params=None, batch=None, success=None, 'summary': 'list', 'summary_action_breakdowns': 'list', 'time_increment': 'string', - 'time_range': 'Object', - 'time_ranges': 'list', + 'time_range': 'map', + 'time_ranges': 'list', 'use_account_attribution_setting': 'bool', 'use_unified_attribution_setting': 'bool', } @@ -976,6 +1001,7 @@ def get_insights_async(self, fields=None, params=None, batch=None, success=None, 'budget_rebalance_flag': 'bool', 'budget_remaining': 'string', 'buying_type': 'string', + 'campaign_group_active_time': 'string', 'can_create_brand_lift_study': 'bool', 'can_use_spend_cap': 'bool', 'configured_status': 'ConfiguredStatus', @@ -984,6 +1010,7 @@ def get_insights_async(self, fields=None, params=None, batch=None, success=None, 'effective_status': 'EffectiveStatus', 'has_secondary_skadnetwork_reporting': 'bool', 'id': 'string', + 'is_budget_schedule_enabled': 'bool', 'is_skadnetwork_attribution': 'bool', 'issues_info': 'list', 'last_budget_toggling_time': 'datetime', diff --git a/facebook_business/adobjects/campaignactionsdata.py b/facebook_business/adobjects/campaignactionsdata.py new file mode 100644 index 000000000..5d2eea368 --- /dev/null +++ b/facebook_business/adobjects/campaignactionsdata.py @@ -0,0 +1,36 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 CampaignActionsData( + AbstractObject, +): + + def __init__(self, api=None): + super(CampaignActionsData, self).__init__() + self._isCampaignActionsData = True + self._api = api + + class Field(AbstractObject.Field): + pass + + _field_types = { + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/campaigngroupbrandconfiguration.py b/facebook_business/adobjects/campaigngroupbrandconfiguration.py index 69c83f8d7..1222b373e 100644 --- a/facebook_business/adobjects/campaigngroupbrandconfiguration.py +++ b/facebook_business/adobjects/campaigngroupbrandconfiguration.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/campaigngroupcollaborativeadspartnerinfo.py b/facebook_business/adobjects/campaigngroupcollaborativeadspartnerinfo.py index 10b4d670f..581014796 100644 --- a/facebook_business/adobjects/campaigngroupcollaborativeadspartnerinfo.py +++ b/facebook_business/adobjects/campaigngroupcollaborativeadspartnerinfo.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/canvas.py b/facebook_business/adobjects/canvas.py index 55449cfaf..b7e608f58 100644 --- a/facebook_business/adobjects/canvas.py +++ b/facebook_business/adobjects/canvas.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -136,6 +122,37 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure self.assure_call() return request.execute() + def get_preview(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.canvaspreview import CanvasPreview + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/preview', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CanvasPreview, + api_type='EDGE', + response_parser=ObjectParser(target_class=CanvasPreview, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_previews(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -188,7 +205,7 @@ def get_previews(self, fields=None, params=None, batch=None, success=None, failu 'name': 'string', 'owner': 'Page', 'property_list': 'list', - 'source_template': 'Object', + 'source_template': 'CanvasTemplate', 'store_url': 'string', 'style_list': 'list', 'tags': 'list', diff --git a/facebook_business/adobjects/canvasadsettings.py b/facebook_business/adobjects/canvasadsettings.py index 631c22b4a..75ad36850 100644 --- a/facebook_business/adobjects/canvasadsettings.py +++ b/facebook_business/adobjects/canvasadsettings.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/canvasbodyelement.py b/facebook_business/adobjects/canvasbodyelement.py index b488a272c..66c146605 100644 --- a/facebook_business/adobjects/canvasbodyelement.py +++ b/facebook_business/adobjects/canvasbodyelement.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/canvascollectionthumbnail.py b/facebook_business/adobjects/canvascollectionthumbnail.py index e0af76abb..25b6be74b 100644 --- a/facebook_business/adobjects/canvascollectionthumbnail.py +++ b/facebook_business/adobjects/canvascollectionthumbnail.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/canvasdynamicsetting.py b/facebook_business/adobjects/canvasdynamicsetting.py index 50635e42a..791b9d644 100644 --- a/facebook_business/adobjects/canvasdynamicsetting.py +++ b/facebook_business/adobjects/canvasdynamicsetting.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/canvaspreview.py b/facebook_business/adobjects/canvaspreview.py new file mode 100644 index 000000000..2ddfe45f1 --- /dev/null +++ b/facebook_business/adobjects/canvaspreview.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 CanvasPreview( + AbstractObject, +): + + def __init__(self, api=None): + super(CanvasPreview, self).__init__() + self._isCanvasPreview = True + self._api = api + + class Field(AbstractObject.Field): + body = 'body' + + _field_types = { + 'body': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/canvastemplate.py b/facebook_business/adobjects/canvastemplate.py new file mode 100644 index 000000000..ffb2bc84f --- /dev/null +++ b/facebook_business/adobjects/canvastemplate.py @@ -0,0 +1,96 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 CanvasTemplate( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCanvasTemplate = True + super(CanvasTemplate, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + channels = 'channels' + description = 'description' + document = 'document' + id = 'id' + is_multi_tab_supportable = 'is_multi_tab_supportable' + is_new = 'is_new' + name = 'name' + objectives = 'objectives' + owner_id = 'owner_id' + required_capabilities = 'required_capabilities' + snapshot_photo = 'snapshot_photo' + status = 'status' + sub_verticals = 'sub_verticals' + verticals = 'verticals' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CanvasTemplate, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'channels': 'list>>>', + 'description': 'string', + 'document': 'Canvas', + 'id': 'string', + 'is_multi_tab_supportable': 'bool', + 'is_new': 'bool', + 'name': 'string', + 'objectives': 'list>', + 'owner_id': 'User', + 'required_capabilities': 'list', + 'snapshot_photo': 'Photo', + 'status': 'string', + 'sub_verticals': 'list', + 'verticals': 'list>', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/casssetupofflineeventsetprogress.py b/facebook_business/adobjects/casssetupofflineeventsetprogress.py new file mode 100644 index 000000000..a6f2d1ad8 --- /dev/null +++ b/facebook_business/adobjects/casssetupofflineeventsetprogress.py @@ -0,0 +1,36 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 CASSSetupOfflineEventSetProgress( + AbstractObject, +): + + def __init__(self, api=None): + super(CASSSetupOfflineEventSetProgress, self).__init__() + self._isCASSSetupOfflineEventSetProgress = True + self._api = api + + class Field(AbstractObject.Field): + pass + + _field_types = { + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/catalogbasedtargeting.py b/facebook_business/adobjects/catalogbasedtargeting.py index 484e120c8..043f7103c 100644 --- a/facebook_business/adobjects/catalogbasedtargeting.py +++ b/facebook_business/adobjects/catalogbasedtargeting.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/catalogitemappealstatus.py b/facebook_business/adobjects/catalogitemappealstatus.py index 68be66e79..6f67a4274 100644 --- a/facebook_business/adobjects/catalogitemappealstatus.py +++ b/facebook_business/adobjects/catalogitemappealstatus.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -46,8 +32,8 @@ class Field(AbstractObject.Field): class Status: this_item_cannot_be_appealed_as_it_is_either_approved_or_already_has_an_appeal = 'This item cannot be appealed as it is either approved or already has an appeal' this_item_is_not_rejected_for_any_of_channels = 'This item is not rejected for any of channels' - weve_encountered_unexpected_error_while_processing_this_request_please_try_again_later_ = 'Weve encountered unexpected error while processing this request. Please try again later !' - youve_reached_the_maximum_number_of_item_requests_you_can_make_this_week_youll_be_able_to_request_item_reviews_again_within_the_next_7_days_ = 'Youve reached the maximum number of item requests you can make this week. Youll be able to request item reviews again within the next 7 days.' + we_ve_encountered_unexpected_error_while_processing_this_request_please_try_again_later_ = 'We\'ve encountered unexpected error while processing this request. Please try again later !' + you_ve_reached_the_maximum_number_of_item_requests_you_can_make_this_week_you_ll_be_able_to_request_item_reviews_again_within_the_next_7_days_ = 'You\'ve reached the maximum number of item requests you can make this week. You\'ll be able to request item reviews again within the next 7 days.' your_request_was_received_see_information_below_to_learn_more_ = 'Your request was received. See information below to learn more.' _field_types = { diff --git a/facebook_business/adobjects/catalogitemapplinks.py b/facebook_business/adobjects/catalogitemapplinks.py index 89a0e5d6f..8be06f4c1 100644 --- a/facebook_business/adobjects/catalogitemapplinks.py +++ b/facebook_business/adobjects/catalogitemapplinks.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/catalogitemchannelstointegritystatus.py b/facebook_business/adobjects/catalogitemchannelstointegritystatus.py index a180dcae6..4f436adb3 100644 --- a/facebook_business/adobjects/catalogitemchannelstointegritystatus.py +++ b/facebook_business/adobjects/catalogitemchannelstointegritystatus.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/catalogitemoverride.py b/facebook_business/adobjects/catalogitemoverride.py new file mode 100644 index 000000000..1c64dae14 --- /dev/null +++ b/facebook_business/adobjects/catalogitemoverride.py @@ -0,0 +1,76 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 CatalogItemOverride( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCatalogItemOverride = True + super(CatalogItemOverride, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + local_info = 'local_info' + override_type = 'override_type' + override_value = 'override_value' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CatalogItemOverride, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'local_info': 'ProductItemLocalInfo', + 'override_type': 'string', + 'override_value': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/catalogitemrejectionreasons.py b/facebook_business/adobjects/catalogitemrejectionreasons.py new file mode 100644 index 000000000..1f92dc265 --- /dev/null +++ b/facebook_business/adobjects/catalogitemrejectionreasons.py @@ -0,0 +1,47 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 CatalogItemRejectionReasons( + AbstractObject, +): + + def __init__(self, api=None): + super(CatalogItemRejectionReasons, self).__init__() + self._isCatalogItemRejectionReasons = True + self._api = api + + class Field(AbstractObject.Field): + capability = 'capability' + rejection_information = 'rejection_information' + + class Capability: + business_inbox_in_messenger = 'business_inbox_in_messenger' + shops = 'shops' + test_capability = 'test_capability' + universal_checkout = 'universal_checkout' + us_marketplace = 'us_marketplace' + + _field_types = { + 'capability': 'Capability', + 'rejection_information': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Capability'] = CatalogItemRejectionReasons.Capability.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/catalogitemvalidationerrorlist.py b/facebook_business/adobjects/catalogitemvalidationerrorlist.py new file mode 100644 index 000000000..c5a489228 --- /dev/null +++ b/facebook_business/adobjects/catalogitemvalidationerrorlist.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 CatalogItemValidationErrorList( + AbstractObject, +): + + def __init__(self, api=None): + super(CatalogItemValidationErrorList, self).__init__() + self._isCatalogItemValidationErrorList = True + self._api = api + + class Field(AbstractObject.Field): + errors = 'errors' + + _field_types = { + 'errors': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/catalogsegmentallmatchcountlaser.py b/facebook_business/adobjects/catalogsegmentallmatchcountlaser.py deleted file mode 100644 index 5d7ee0fed..000000000 --- a/facebook_business/adobjects/catalogsegmentallmatchcountlaser.py +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 2014 Facebook, Inc. - -# 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. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -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 CatalogSegmentAllMatchCountLaser( - AbstractObject, -): - - def __init__(self, api=None): - super(CatalogSegmentAllMatchCountLaser, self).__init__() - self._isCatalogSegmentAllMatchCountLaser = True - self._api = api - - class Field(AbstractObject.Field): - date_start = 'date_start' - date_stop = 'date_stop' - event = 'event' - source = 'source' - total_matched_content_ids = 'total_matched_content_ids' - unique_matched_content_ids = 'unique_matched_content_ids' - - _field_types = { - 'date_start': 'string', - 'date_stop': 'string', - 'event': 'string', - 'source': 'ExternalEventSource', - 'total_matched_content_ids': 'int', - 'unique_matched_content_ids': 'int', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/facebook_business/adobjects/catalogsmartpixelsettings.py b/facebook_business/adobjects/catalogsmartpixelsettings.py new file mode 100644 index 000000000..aae6bceb3 --- /dev/null +++ b/facebook_business/adobjects/catalogsmartpixelsettings.py @@ -0,0 +1,106 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 CatalogSmartPixelSettings( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCatalogSmartPixelSettings = True + super(CatalogSmartPixelSettings, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + allowed_domains = 'allowed_domains' + available_property_filters = 'available_property_filters' + catalog = 'catalog' + cbb_custom_override_filters = 'cbb_custom_override_filters' + cbb_default_filter = 'cbb_default_filter' + cbb_default_filter_crawl_params = 'cbb_default_filter_crawl_params' + cbb_override_type_field_mapping = 'cbb_override_type_field_mapping' + defaults = 'defaults' + filters = 'filters' + id = 'id' + is_cbb_enabled = 'is_cbb_enabled' + is_create_enabled = 'is_create_enabled' + is_delete_enabled = 'is_delete_enabled' + is_update_enabled = 'is_update_enabled' + microdata_format_precedence = 'microdata_format_precedence' + pixel = 'pixel' + property_filter = 'property_filter' + retention_time_sec = 'retention_time_sec' + trusted_domains = 'trusted_domains' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CatalogSmartPixelSettings, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'allowed_domains': 'list', + 'available_property_filters': 'list', + 'catalog': 'ProductCatalog', + 'cbb_custom_override_filters': 'list', + 'cbb_default_filter': 'list>>', + 'cbb_default_filter_crawl_params': 'string', + 'cbb_override_type_field_mapping': 'list>>', + 'defaults': 'list>', + 'filters': 'list>>', + 'id': 'string', + 'is_cbb_enabled': 'bool', + 'is_create_enabled': 'bool', + 'is_delete_enabled': 'bool', + 'is_update_enabled': 'bool', + 'microdata_format_precedence': 'list', + 'pixel': 'AdsPixel', + 'property_filter': 'list', + 'retention_time_sec': 'int', + 'trusted_domains': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/catalogsubverticallist.py b/facebook_business/adobjects/catalogsubverticallist.py index 56d5c28a1..04b78ac7c 100644 --- a/facebook_business/adobjects/catalogsubverticallist.py +++ b/facebook_business/adobjects/catalogsubverticallist.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -67,7 +53,6 @@ class Field(AbstractObject.Field): local_service_business_item = 'local_service_business_item' local_service_business_restaurant = 'local_service_business_restaurant' loyalty_offer = 'loyalty_offer' - meetup_space = 'meetup_space' nursery = 'nursery' printers_and_scanners = 'printers_and_scanners' printers_scanners_and_fax_machines = 'printers_scanners_and_fax_machines' @@ -123,7 +108,6 @@ class Field(AbstractObject.Field): 'local_service_business_item': 'Object', 'local_service_business_restaurant': 'Object', 'loyalty_offer': 'Object', - 'meetup_space': 'Object', 'nursery': 'Object', 'printers_and_scanners': 'Object', 'printers_scanners_and_fax_machines': 'Object', diff --git a/facebook_business/adobjects/catalogwebsiteonboardingsettings.py b/facebook_business/adobjects/catalogwebsiteonboardingsettings.py new file mode 100644 index 000000000..500b8eb1a --- /dev/null +++ b/facebook_business/adobjects/catalogwebsiteonboardingsettings.py @@ -0,0 +1,72 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 CatalogWebsiteOnboardingSettings( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCatalogWebsiteOnboardingSettings = True + super(CatalogWebsiteOnboardingSettings, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + status = 'status' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CatalogWebsiteOnboardingSettings, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/catalogwebsitesettings.py b/facebook_business/adobjects/catalogwebsitesettings.py new file mode 100644 index 000000000..24cbcf7b3 --- /dev/null +++ b/facebook_business/adobjects/catalogwebsitesettings.py @@ -0,0 +1,72 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 CatalogWebsiteSettings( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCatalogWebsiteSettings = True + super(CatalogWebsiteSettings, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + is_allowed_to_crawl = 'is_allowed_to_crawl' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CatalogWebsiteSettings, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'is_allowed_to_crawl': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/chatplugin.py b/facebook_business/adobjects/chatplugin.py index db198fc26..dc28f7441 100644 --- a/facebook_business/adobjects/chatplugin.py +++ b/facebook_business/adobjects/chatplugin.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/checkbatchrequeststatus.py b/facebook_business/adobjects/checkbatchrequeststatus.py index a72fd56ad..a9c62c6c9 100644 --- a/facebook_business/adobjects/checkbatchrequeststatus.py +++ b/facebook_business/adobjects/checkbatchrequeststatus.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/childevent.py b/facebook_business/adobjects/childevent.py index ad8742236..fc7a6719b 100644 --- a/facebook_business/adobjects/childevent.py +++ b/facebook_business/adobjects/childevent.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/chinabusinessonboardingvettingrequest.py b/facebook_business/adobjects/chinabusinessonboardingvettingrequest.py new file mode 100644 index 000000000..1736f4d57 --- /dev/null +++ b/facebook_business/adobjects/chinabusinessonboardingvettingrequest.py @@ -0,0 +1,152 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ChinaBusinessOnboardingVettingRequest( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isChinaBusinessOnboardingVettingRequest = True + super(ChinaBusinessOnboardingVettingRequest, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_account_creation_request_status = 'ad_account_creation_request_status' + ad_account_limit = 'ad_account_limit' + ad_account_number = 'ad_account_number' + ad_accounts_info = 'ad_accounts_info' + business_manager_id = 'business_manager_id' + business_registration = 'business_registration' + business_registration_id = 'business_registration_id' + chinese_address = 'chinese_address' + chinese_legal_entity_name = 'chinese_legal_entity_name' + city = 'city' + contact = 'contact' + coupon_code = 'coupon_code' + disapprove_reason = 'disapprove_reason' + english_business_name = 'english_business_name' + id = 'id' + official_website_url = 'official_website_url' + org_ad_account_count = 'org_ad_account_count' + payment_type = 'payment_type' + planning_agency_id = 'planning_agency_id' + planning_agency_name = 'planning_agency_name' + promotable_app_ids = 'promotable_app_ids' + promotable_page_ids = 'promotable_page_ids' + promotable_pages = 'promotable_pages' + promotable_urls = 'promotable_urls' + request_changes_reason = 'request_changes_reason' + reviewed_user = 'reviewed_user' + spend_limit = 'spend_limit' + status = 'status' + subvertical = 'subvertical' + subvertical_v2 = 'subvertical_v2' + supporting_document = 'supporting_document' + time_changes_requested = 'time_changes_requested' + time_created = 'time_created' + time_updated = 'time_updated' + time_zone = 'time_zone' + used_reseller_link = 'used_reseller_link' + user_id = 'user_id' + user_name = 'user_name' + vertical = 'vertical' + vertical_v2 = 'vertical_v2' + viewed_by_reseller = 'viewed_by_reseller' + zip_code = 'zip_code' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ChinaBusinessOnboardingVettingRequest, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'ad_account_creation_request_status': 'string', + 'ad_account_limit': 'int', + 'ad_account_number': 'string', + 'ad_accounts_info': 'list', + 'business_manager_id': 'string', + 'business_registration': 'string', + 'business_registration_id': 'string', + 'chinese_address': 'string', + 'chinese_legal_entity_name': 'string', + 'city': 'string', + 'contact': 'string', + 'coupon_code': 'string', + 'disapprove_reason': 'string', + 'english_business_name': 'string', + 'id': 'string', + 'official_website_url': 'string', + 'org_ad_account_count': 'int', + 'payment_type': 'string', + 'planning_agency_id': 'string', + 'planning_agency_name': 'string', + 'promotable_app_ids': 'list', + 'promotable_page_ids': 'list', + 'promotable_pages': 'list', + 'promotable_urls': 'list', + 'request_changes_reason': 'string', + 'reviewed_user': 'string', + 'spend_limit': 'int', + 'status': 'string', + 'subvertical': 'string', + 'subvertical_v2': 'string', + 'supporting_document': 'string', + 'time_changes_requested': 'datetime', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'time_zone': 'string', + 'used_reseller_link': 'bool', + 'user_id': 'string', + 'user_name': 'string', + 'vertical': 'string', + 'vertical_v2': 'string', + 'viewed_by_reseller': 'bool', + 'zip_code': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/clicktrackingtag.py b/facebook_business/adobjects/clicktrackingtag.py index 839345684..666012381 100644 --- a/facebook_business/adobjects/clicktrackingtag.py +++ b/facebook_business/adobjects/clicktrackingtag.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/cloudbridgedatasetstatus.py b/facebook_business/adobjects/cloudbridgedatasetstatus.py new file mode 100644 index 000000000..9810b988b --- /dev/null +++ b/facebook_business/adobjects/cloudbridgedatasetstatus.py @@ -0,0 +1,47 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 CloudbridgeDatasetStatus( + AbstractObject, +): + + def __init__(self, api=None): + super(CloudbridgeDatasetStatus, self).__init__() + self._isCloudbridgeDatasetStatus = True + self._api = api + + class Field(AbstractObject.Field): + app_redacted_event = 'app_redacted_event' + app_sensitive_params = 'app_sensitive_params' + app_unverified_event = 'app_unverified_event' + has_app_associated = 'has_app_associated' + is_app_prohibited = 'is_app_prohibited' + is_dataset = 'is_dataset' + + _field_types = { + 'app_redacted_event': 'list', + 'app_sensitive_params': 'list>>', + 'app_unverified_event': 'list', + 'has_app_associated': 'bool', + 'is_app_prohibited': 'bool', + 'is_dataset': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/cloudgame.py b/facebook_business/adobjects/cloudgame.py index d7941c96d..35d2abff3 100644 --- a/facebook_business/adobjects/cloudgame.py +++ b/facebook_business/adobjects/cloudgame.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/collaborativeadspartnerbusinesses.py b/facebook_business/adobjects/collaborativeadspartnerbusinesses.py new file mode 100644 index 000000000..7224f18ff --- /dev/null +++ b/facebook_business/adobjects/collaborativeadspartnerbusinesses.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 CollaborativeAdsPartnerBusinesses( + AbstractObject, +): + + def __init__(self, api=None): + super(CollaborativeAdsPartnerBusinesses, self).__init__() + self._isCollaborativeAdsPartnerBusinesses = True + self._api = api + + class Field(AbstractObject.Field): + collaborative_ads_partner_businesses_info = 'collaborative_ads_partner_businesses_info' + dedicated_partner_business_info = 'dedicated_partner_business_info' + + _field_types = { + 'collaborative_ads_partner_businesses_info': 'list', + 'dedicated_partner_business_info': 'Business', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/collaborativeadspartnerinfolistitem.py b/facebook_business/adobjects/collaborativeadspartnerinfolistitem.py index 71b9e0ffe..bd207010d 100644 --- a/facebook_business/adobjects/collaborativeadspartnerinfolistitem.py +++ b/facebook_business/adobjects/collaborativeadspartnerinfolistitem.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/collaborativeadssharesettings.py b/facebook_business/adobjects/collaborativeadssharesettings.py index 4af16ed44..7f3172dac 100644 --- a/facebook_business/adobjects/collaborativeadssharesettings.py +++ b/facebook_business/adobjects/collaborativeadssharesettings.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/columnsuggestions.py b/facebook_business/adobjects/columnsuggestions.py new file mode 100644 index 000000000..45d5a5a86 --- /dev/null +++ b/facebook_business/adobjects/columnsuggestions.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ColumnSuggestions( + AbstractObject, +): + + def __init__(self, api=None): + super(ColumnSuggestions, self).__init__() + self._isColumnSuggestions = True + self._api = api + + class Field(AbstractObject.Field): + explanations = 'explanations' + format = 'format' + objective = 'objective' + optimization_goals = 'optimization_goals' + + _field_types = { + 'explanations': 'Object', + 'format': 'list', + 'objective': 'list', + 'optimization_goals': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/comment.py b/facebook_business/adobjects/comment.py index c8024e1b6..153d4c38c 100644 --- a/facebook_business/adobjects/comment.py +++ b/facebook_business/adobjects/comment.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -65,6 +51,10 @@ class Field(AbstractObject.Field): private_reply_conversation = 'private_reply_conversation' user_likes = 'user_likes' + class Order: + chronological = 'chronological' + reverse_chronological = 'reverse_chronological' + class CommentPrivacyValue: declined_by_admin_assistant = 'DECLINED_BY_ADMIN_ASSISTANT' default_privacy = 'DEFAULT_PRIVACY' @@ -86,10 +76,6 @@ class LiveFilter: filter_low_quality = 'filter_low_quality' no_filter = 'no_filter' - class Order: - chronological = 'chronological' - reverse_chronological = 'reverse_chronological' - def api_delete(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -417,17 +403,17 @@ def get_reactions(self, fields=None, params=None, batch=None, success=None, fail 'message_tags': 'list', 'object': 'Object', 'parent': 'Comment', - 'permalink_url': 'Object', + 'permalink_url': 'string', 'private_reply_conversation': 'Object', 'user_likes': 'bool', } @classmethod def _get_field_enum_info(cls): field_enum_info = {} + field_enum_info['Order'] = Comment.Order.__dict__.values() field_enum_info['CommentPrivacyValue'] = Comment.CommentPrivacyValue.__dict__.values() field_enum_info['Filter'] = Comment.Filter.__dict__.values() field_enum_info['LiveFilter'] = Comment.LiveFilter.__dict__.values() - field_enum_info['Order'] = Comment.Order.__dict__.values() return field_enum_info diff --git a/facebook_business/adobjects/commercemerchantsettings.py b/facebook_business/adobjects/commercemerchantsettings.py index bfa1dc719..014aeebf2 100644 --- a/facebook_business/adobjects/commercemerchantsettings.py +++ b/facebook_business/adobjects/commercemerchantsettings.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -41,32 +27,20 @@ def __init__(self, fbid=None, parent_id=None, api=None): super(CommerceMerchantSettings, self).__init__(fbid, parent_id, api) class Field(AbstractObject.Field): - braintree_merchant_id = 'braintree_merchant_id' checkout_message = 'checkout_message' - commerce_store = 'commerce_store' contact_email = 'contact_email' cta = 'cta' - disable_checkout_urls = 'disable_checkout_urls' display_name = 'display_name' - external_merchant_id = 'external_merchant_id' facebook_channel = 'facebook_channel' - feature_eligibility = 'feature_eligibility' - has_discount_code = 'has_discount_code' - has_onsite_intent = 'has_onsite_intent' id = 'id' instagram_channel = 'instagram_channel' - merchant_alert_email = 'merchant_alert_email' merchant_page = 'merchant_page' merchant_status = 'merchant_status' onsite_commerce_merchant = 'onsite_commerce_merchant' payment_provider = 'payment_provider' - privacy_url_by_locale = 'privacy_url_by_locale' review_rejection_messages = 'review_rejection_messages' review_rejection_reasons = 'review_rejection_reasons' - supported_card_types = 'supported_card_types' terms = 'terms' - terms_url_by_locale = 'terms_url_by_locale' - whatsapp_channel = 'whatsapp_channel' def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils @@ -234,39 +208,7 @@ def get_commerce_transactions(self, fields=None, params=None, batch=None, succes self.assure_call() return request.execute() - def get_onsite_conversion_events(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'created_after': 'datetime', - 'created_before': 'datetime', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/onsite_conversion_events', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, - api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - - def get_order_management_apps(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_order_m_an_age_m_ent_apps(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -297,7 +239,7 @@ def get_order_management_apps(self, fields=None, params=None, batch=None, succes self.assure_call() return request.execute() - def create_order_management_app(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def create_order_m_an_age_m_ent_app(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -399,36 +341,6 @@ def get_returns(self, fields=None, params=None, batch=None, success=None, failur self.assure_call() return request.execute() - def get_seller_issues(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/seller_issues', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, - api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - def get_setup_status(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -588,69 +500,21 @@ def get_tax_settings(self, fields=None, params=None, batch=None, success=None, f self.assure_call() return request.execute() - def create_whatsapp_channel(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'op': 'op_enum', - 'whatsapp_business_accounts': 'list', - } - enums = { - 'op_enum': [ - 'ADD', - 'REMOVE', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/whatsapp_channel', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, - api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - _field_types = { - 'braintree_merchant_id': 'string', 'checkout_message': 'string', - 'commerce_store': 'Object', 'contact_email': 'string', 'cta': 'string', - 'disable_checkout_urls': 'bool', 'display_name': 'string', - 'external_merchant_id': 'string', 'facebook_channel': 'Object', - 'feature_eligibility': 'Object', - 'has_discount_code': 'bool', - 'has_onsite_intent': 'bool', 'id': 'string', 'instagram_channel': 'Object', - 'merchant_alert_email': 'string', 'merchant_page': 'Profile', 'merchant_status': 'string', 'onsite_commerce_merchant': 'Object', 'payment_provider': 'string', - 'privacy_url_by_locale': 'list>', 'review_rejection_messages': 'list', 'review_rejection_reasons': 'list', - 'supported_card_types': 'list', 'terms': 'string', - 'terms_url_by_locale': 'list>', - 'whatsapp_channel': 'Object', } @classmethod def _get_field_enum_info(cls): diff --git a/facebook_business/adobjects/commercemerchantsettingssetupstatus.py b/facebook_business/adobjects/commercemerchantsettingssetupstatus.py index 0e5d41f7d..99e4209b7 100644 --- a/facebook_business/adobjects/commercemerchantsettingssetupstatus.py +++ b/facebook_business/adobjects/commercemerchantsettingssetupstatus.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/commerceorder.py b/facebook_business/adobjects/commerceorder.py index 6104986da..6e77f15b2 100644 --- a/facebook_business/adobjects/commerceorder.py +++ b/facebook_business/adobjects/commerceorder.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -43,6 +29,7 @@ def __init__(self, fbid=None, parent_id=None, api=None): class Field(AbstractObject.Field): buyer_details = 'buyer_details' channel = 'channel' + contains_bopis_items = 'contains_bopis_items' created = 'created' estimated_payment_details = 'estimated_payment_details' id = 'id' @@ -119,7 +106,6 @@ def create_acknowledge_order(self, fields=None, params=None, batch=None, success param_types = { 'idempotency_key': 'string', 'merchant_order_reference': 'string', - 'return_error_response': 'bool', } enums = { } @@ -175,7 +161,7 @@ def get_cancellations(self, fields=None, params=None, batch=None, success=None, self.assure_call() return request.execute() - def create_cancellation(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def create_can_cell_a_t_i_on(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -209,20 +195,20 @@ def create_cancellation(self, fields=None, params=None, batch=None, success=None self.assure_call() return request.execute() - def create_fulfill_order(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def create_item_update(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') param_types = { - 'idempotency_key': 'string', 'items': 'list', + 'merchant_order_reference': 'string', } enums = { } request = FacebookRequest( node_id=self['id'], method='POST', - endpoint='/fulfill_order', + endpoint='/item_updates', api=self._api, param_checker=TypeChecker(param_types, enums), target_class=CommerceOrder, @@ -331,7 +317,7 @@ def get_promotion_details(self, fields=None, params=None, batch=None, success=No self.assure_call() return request.execute() - def get_promotions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_promo_t_i_ons(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -396,6 +382,7 @@ def create_refund(self, fields=None, params=None, batch=None, success=None, fail if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') param_types = { + 'adjustment_amount': 'map', 'deductions': 'list', 'idempotency_key': 'string', 'items': 'list', @@ -607,9 +594,45 @@ def create_update_shipment(self, fields=None, params=None, batch=None, success=N self.assure_call() return request.execute() + def create_update(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'cancel_amount': 'map', + 'fulfill_amount': 'map', + 'merchant_order_reference': 'string', + 'refund_amount': 'map', + 'total_amount': 'map', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/updates', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CommerceOrder, + api_type='EDGE', + response_parser=ObjectParser(target_class=CommerceOrder, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + _field_types = { 'buyer_details': 'Object', 'channel': 'string', + 'contains_bopis_items': 'bool', 'created': 'string', 'estimated_payment_details': 'Object', 'id': 'string', diff --git a/facebook_business/adobjects/commerceordertransactiondetail.py b/facebook_business/adobjects/commerceordertransactiondetail.py index 57fd1e205..b17949618 100644 --- a/facebook_business/adobjects/commerceordertransactiondetail.py +++ b/facebook_business/adobjects/commerceordertransactiondetail.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/commercepayout.py b/facebook_business/adobjects/commercepayout.py index 89e9c265f..e55bd759b 100644 --- a/facebook_business/adobjects/commercepayout.py +++ b/facebook_business/adobjects/commercepayout.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/commercesettings.py b/facebook_business/adobjects/commercesettings.py index 2b10f49f1..88727d83e 100644 --- a/facebook_business/adobjects/commercesettings.py +++ b/facebook_business/adobjects/commercesettings.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/connectionstargeting.py b/facebook_business/adobjects/connectionstargeting.py index 4098265be..cc3b9ca5b 100644 --- a/facebook_business/adobjects/connectionstargeting.py +++ b/facebook_business/adobjects/connectionstargeting.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/contactsmessengersyncconfig.py b/facebook_business/adobjects/contactsmessengersyncconfig.py new file mode 100644 index 000000000..49f3abac7 --- /dev/null +++ b/facebook_business/adobjects/contactsmessengersyncconfig.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ContactsMessengerSyncConfig( + AbstractObject, +): + + def __init__(self, api=None): + super(ContactsMessengerSyncConfig, self).__init__() + self._isContactsMessengerSyncConfig = True + self._api = api + + class Field(AbstractObject.Field): + enabled = 'enabled' + + _field_types = { + 'enabled': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/contentdeliveryreport.py b/facebook_business/adobjects/contentdeliveryreport.py new file mode 100644 index 000000000..dceca18cc --- /dev/null +++ b/facebook_business/adobjects/contentdeliveryreport.py @@ -0,0 +1,45 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ContentDeliveryReport( + AbstractObject, +): + + def __init__(self, api=None): + super(ContentDeliveryReport, self).__init__() + self._isContentDeliveryReport = True + self._api = api + + class Field(AbstractObject.Field): + content_name = 'content_name' + content_url = 'content_url' + creator_name = 'creator_name' + creator_url = 'creator_url' + estimated_impressions = 'estimated_impressions' + + _field_types = { + 'content_name': 'string', + 'content_url': 'string', + 'creator_name': 'string', + 'creator_url': 'string', + 'estimated_impressions': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/contentpublishinglimitresponse.py b/facebook_business/adobjects/contentpublishinglimitresponse.py new file mode 100644 index 000000000..bdcabfe0a --- /dev/null +++ b/facebook_business/adobjects/contentpublishinglimitresponse.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ContentPublishingLimitResponse( + AbstractObject, +): + + def __init__(self, api=None): + super(ContentPublishingLimitResponse, self).__init__() + self._isContentPublishingLimitResponse = True + self._api = api + + class Field(AbstractObject.Field): + config = 'config' + quota_usage = 'quota_usage' + + _field_types = { + 'config': 'Object', + 'quota_usage': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/contextualbundlingspec.py b/facebook_business/adobjects/contextualbundlingspec.py index 0c2de47ae..a52ab3d59 100644 --- a/facebook_business/adobjects/contextualbundlingspec.py +++ b/facebook_business/adobjects/contextualbundlingspec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/conversionactionquery.py b/facebook_business/adobjects/conversionactionquery.py index 7c3f06e52..20860838e 100644 --- a/facebook_business/adobjects/conversionactionquery.py +++ b/facebook_business/adobjects/conversionactionquery.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/conversionhealthkpi.py b/facebook_business/adobjects/conversionhealthkpi.py new file mode 100644 index 000000000..04c086909 --- /dev/null +++ b/facebook_business/adobjects/conversionhealthkpi.py @@ -0,0 +1,53 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ConversionHealthKPI( + AbstractObject, +): + + def __init__(self, api=None): + super(ConversionHealthKPI, self).__init__() + self._isConversionHealthKPI = True + self._api = api + + class Field(AbstractObject.Field): + health_indicator = 'health_indicator' + impacted_browsers_match_rate = 'impacted_browsers_match_rate' + impacted_browsers_match_rate_mom_trend = 'impacted_browsers_match_rate_mom_trend' + impacted_browsers_traffic_share = 'impacted_browsers_traffic_share' + impacted_browsers_traffic_share_mom_trend = 'impacted_browsers_traffic_share_mom_trend' + match_rate = 'match_rate' + match_rate_mom_trend = 'match_rate_mom_trend' + match_rate_vertical_benchmark = 'match_rate_vertical_benchmark' + match_rate_vs_benchmark_mom_trend = 'match_rate_vs_benchmark_mom_trend' + + _field_types = { + 'health_indicator': 'string', + 'impacted_browsers_match_rate': 'float', + 'impacted_browsers_match_rate_mom_trend': 'float', + 'impacted_browsers_traffic_share': 'float', + 'impacted_browsers_traffic_share_mom_trend': 'float', + 'match_rate': 'float', + 'match_rate_mom_trend': 'float', + 'match_rate_vertical_benchmark': 'float', + 'match_rate_vs_benchmark_mom_trend': 'float', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/copyrightattributioninsights.py b/facebook_business/adobjects/copyrightattributioninsights.py new file mode 100644 index 000000000..a6bb74e7e --- /dev/null +++ b/facebook_business/adobjects/copyrightattributioninsights.py @@ -0,0 +1,45 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 CopyrightAttributionInsights( + AbstractObject, +): + + def __init__(self, api=None): + super(CopyrightAttributionInsights, self).__init__() + self._isCopyrightAttributionInsights = True + self._api = api + + class Field(AbstractObject.Field): + l7_attribution_page_view = 'l7_attribution_page_view' + l7_attribution_page_view_delta = 'l7_attribution_page_view_delta' + l7_attribution_video_view = 'l7_attribution_video_view' + l7_attribution_video_view_delta = 'l7_attribution_video_view_delta' + metrics_ending_date = 'metrics_ending_date' + + _field_types = { + 'l7_attribution_page_view': 'int', + 'l7_attribution_page_view_delta': 'float', + 'l7_attribution_video_view': 'int', + 'l7_attribution_video_view_delta': 'float', + 'metrics_ending_date': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/copyrightaudioasset.py b/facebook_business/adobjects/copyrightaudioasset.py new file mode 100644 index 000000000..4b6375472 --- /dev/null +++ b/facebook_business/adobjects/copyrightaudioasset.py @@ -0,0 +1,52 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 CopyrightAudioAsset( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCopyrightAudioAsset = True + super(CopyrightAudioAsset, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + audio_availability_status = 'audio_availability_status' + audio_library_policy = 'audio_library_policy' + creation_time = 'creation_time' + id = 'id' + reference_files = 'reference_files' + title = 'title' + update_time = 'update_time' + + _field_types = { + 'audio_availability_status': 'string', + 'audio_library_policy': 'list>>>', + 'creation_time': 'datetime', + 'id': 'string', + 'reference_files': 'list', + 'title': 'string', + 'update_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/copyrightmediamisuse.py b/facebook_business/adobjects/copyrightmediamisuse.py new file mode 100644 index 000000000..4c761aa6b --- /dev/null +++ b/facebook_business/adobjects/copyrightmediamisuse.py @@ -0,0 +1,102 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 CopyrightMediaMisuse( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCopyrightMediaMisuse = True + super(CopyrightMediaMisuse, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + audio_segments = 'audio_segments' + creation_time = 'creation_time' + disabled_audio_segments = 'disabled_audio_segments' + disabled_video_segments = 'disabled_video_segments' + entire_file_issue = 'entire_file_issue' + entire_file_issue_reasons = 'entire_file_issue_reasons' + expiration_time = 'expiration_time' + id = 'id' + media_asset_id = 'media_asset_id' + reasons = 'reasons' + requested_audio_segments = 'requested_audio_segments' + requested_video_segments = 'requested_video_segments' + resolution_type = 'resolution_type' + status = 'status' + update_time = 'update_time' + video_copyright = 'video_copyright' + video_segments = 'video_segments' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CopyrightMediaMisuse, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'audio_segments': 'list', + 'creation_time': 'datetime', + 'disabled_audio_segments': 'list', + 'disabled_video_segments': 'list', + 'entire_file_issue': 'bool', + 'entire_file_issue_reasons': 'list', + 'expiration_time': 'datetime', + 'id': 'string', + 'media_asset_id': 'string', + 'reasons': 'list', + 'requested_audio_segments': 'list', + 'requested_video_segments': 'list', + 'resolution_type': 'string', + 'status': 'string', + 'update_time': 'datetime', + 'video_copyright': 'VideoCopyright', + 'video_segments': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/copyrightreferencecontainer.py b/facebook_business/adobjects/copyrightreferencecontainer.py index 83ee380b2..6b2b1582e 100644 --- a/facebook_business/adobjects/copyrightreferencecontainer.py +++ b/facebook_business/adobjects/copyrightreferencecontainer.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/coverphoto.py b/facebook_business/adobjects/coverphoto.py index 559d5435e..bb2e0c039 100644 --- a/facebook_business/adobjects/coverphoto.py +++ b/facebook_business/adobjects/coverphoto.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/cpasadcreationtemplate.py b/facebook_business/adobjects/cpasadcreationtemplate.py new file mode 100644 index 000000000..39fa58223 --- /dev/null +++ b/facebook_business/adobjects/cpasadcreationtemplate.py @@ -0,0 +1,82 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 CPASAdCreationTemplate( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCPASAdCreationTemplate = True + super(CPASAdCreationTemplate, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + description = 'description' + id = 'id' + is_unused_template = 'is_unused_template' + name = 'name' + optimization_goal = 'optimization_goal' + targeting_type = 'targeting_type' + template_type = 'template_type' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CPASAdCreationTemplate, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'description': 'string', + 'id': 'string', + 'is_unused_template': 'bool', + 'name': 'string', + 'optimization_goal': 'string', + 'targeting_type': 'string', + 'template_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/cpasadvertiserpartnershiprecommendation.py b/facebook_business/adobjects/cpasadvertiserpartnershiprecommendation.py index e9efe7d4d..5013dafe7 100644 --- a/facebook_business/adobjects/cpasadvertiserpartnershiprecommendation.py +++ b/facebook_business/adobjects/cpasadvertiserpartnershiprecommendation.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/cpasbusinesssetupconfig.py b/facebook_business/adobjects/cpasbusinesssetupconfig.py index 8b3490e8d..6f71ddce4 100644 --- a/facebook_business/adobjects/cpasbusinesssetupconfig.py +++ b/facebook_business/adobjects/cpasbusinesssetupconfig.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/cpascollaborationrequest.py b/facebook_business/adobjects/cpascollaborationrequest.py index 2436ac2d4..463a3d1e8 100644 --- a/facebook_business/adobjects/cpascollaborationrequest.py +++ b/facebook_business/adobjects/cpascollaborationrequest.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/cpaslsbimagebank.py b/facebook_business/adobjects/cpaslsbimagebank.py new file mode 100644 index 000000000..40baa64ad --- /dev/null +++ b/facebook_business/adobjects/cpaslsbimagebank.py @@ -0,0 +1,150 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 CPASLsbImageBank( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCPASLsbImageBank = True + super(CPASLsbImageBank, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_group_id = 'ad_group_id' + catalog_segment_proxy_id = 'catalog_segment_proxy_id' + id = 'id' + agency_business_id = 'agency_business_id' + backup_image_urls = 'backup_image_urls' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'cpas_lsb_image_bank' + + # @deprecated api_create is being deprecated + def api_create(self, parent_id, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.adobjects.productcatalog import ProductCatalog + return ProductCatalog(api=self._api, fbid=parent_id).create_cpas_lsb_image_bank(fields, params, batch, success, failure, pending) + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CPASLsbImageBank, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def api_update(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'backup_image_urls': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CPASLsbImageBank, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_backup_images(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.productimage import ProductImage + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/backup_images', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductImage, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductImage, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'ad_group_id': 'string', + 'catalog_segment_proxy_id': 'string', + 'id': 'string', + 'agency_business_id': 'unsigned int', + 'backup_image_urls': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/cpasmerchantconfig.py b/facebook_business/adobjects/cpasmerchantconfig.py index e253a1204..2f171f578 100644 --- a/facebook_business/adobjects/cpasmerchantconfig.py +++ b/facebook_business/adobjects/cpasmerchantconfig.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/cpasparentcatalogsettings.py b/facebook_business/adobjects/cpasparentcatalogsettings.py new file mode 100644 index 000000000..08ba661bf --- /dev/null +++ b/facebook_business/adobjects/cpasparentcatalogsettings.py @@ -0,0 +1,76 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 CPASParentCatalogSettings( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCPASParentCatalogSettings = True + super(CPASParentCatalogSettings, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + attribution_windows = 'attribution_windows' + default_currency = 'default_currency' + disable_use_as_parent_catalog = 'disable_use_as_parent_catalog' + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CPASParentCatalogSettings, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'attribution_windows': 'list', + 'default_currency': 'string', + 'disable_use_as_parent_catalog': 'bool', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/cpassetup.py b/facebook_business/adobjects/cpassetup.py new file mode 100644 index 000000000..5dba0bde9 --- /dev/null +++ b/facebook_business/adobjects/cpassetup.py @@ -0,0 +1,36 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 CPASSetup( + AbstractObject, +): + + def __init__(self, api=None): + super(CPASSetup, self).__init__() + self._isCPASSetup = True + self._api = api + + class Field(AbstractObject.Field): + pass + + _field_types = { + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/cpassetupcatalogprogress.py b/facebook_business/adobjects/cpassetupcatalogprogress.py new file mode 100644 index 000000000..2a73f79c4 --- /dev/null +++ b/facebook_business/adobjects/cpassetupcatalogprogress.py @@ -0,0 +1,48 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 CPASSetupCatalogProgress( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCPASSetupCatalogProgress = True + super(CPASSetupCatalogProgress, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + child_catalog_count = 'child_catalog_count' + child_catalog_issues = 'child_catalog_issues' + id = 'id' + issues = 'issues' + name = 'name' + + _field_types = { + 'child_catalog_count': 'int', + 'child_catalog_issues': 'list', + 'id': 'string', + 'issues': 'list', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/cpassetuppagestructureprogress.py b/facebook_business/adobjects/cpassetuppagestructureprogress.py new file mode 100644 index 000000000..cdfd751d4 --- /dev/null +++ b/facebook_business/adobjects/cpassetuppagestructureprogress.py @@ -0,0 +1,44 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 CPASSetupPageStructureProgress( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCPASSetupPageStructureProgress = True + super(CPASSetupPageStructureProgress, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + issues = 'issues' + name = 'name' + + _field_types = { + 'id': 'string', + 'issues': 'list', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/creativeassettag.py b/facebook_business/adobjects/creativeassettag.py new file mode 100644 index 000000000..5432e2309 --- /dev/null +++ b/facebook_business/adobjects/creativeassettag.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 CreativeAssetTag( + AbstractObject, +): + + def __init__(self, api=None): + super(CreativeAssetTag, self).__init__() + self._isCreativeAssetTag = True + self._api = api + + class Field(AbstractObject.Field): + name = 'name' + + _field_types = { + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/creativehistory.py b/facebook_business/adobjects/creativehistory.py index 6ebb6a7da..b49d6e9db 100644 --- a/facebook_business/adobjects/creativehistory.py +++ b/facebook_business/adobjects/creativehistory.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/creatorassetcreative.py b/facebook_business/adobjects/creatorassetcreative.py new file mode 100644 index 000000000..01031a1bf --- /dev/null +++ b/facebook_business/adobjects/creatorassetcreative.py @@ -0,0 +1,92 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 CreatorAssetCreative( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCreatorAssetCreative = True + super(CreatorAssetCreative, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + image_url = 'image_url' + moderation_status = 'moderation_status' + product_item_retailer_id = 'product_item_retailer_id' + product_url = 'product_url' + retailer_id = 'retailer_id' + video_url = 'video_url' + + class ModerationStatus: + archived = 'ARCHIVED' + eligible = 'ELIGIBLE' + expired = 'EXPIRED' + ineligible = 'INELIGIBLE' + in_review = 'IN_REVIEW' + paused = 'PAUSED' + unknown = 'UNKNOWN' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CreatorAssetCreative, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'image_url': 'string', + 'moderation_status': 'string', + 'product_item_retailer_id': 'string', + 'product_url': 'string', + 'retailer_id': 'string', + 'video_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ModerationStatus'] = CreatorAssetCreative.ModerationStatus.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/creditcard.py b/facebook_business/adobjects/creditcard.py index 48014d459..78ad74eaf 100644 --- a/facebook_business/adobjects/creditcard.py +++ b/facebook_business/adobjects/creditcard.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/creditpartitionactionoptions.py b/facebook_business/adobjects/creditpartitionactionoptions.py index 05f044be7..93433d935 100644 --- a/facebook_business/adobjects/creditpartitionactionoptions.py +++ b/facebook_business/adobjects/creditpartitionactionoptions.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/crmaddress.py b/facebook_business/adobjects/crmaddress.py index 01b846f22..5dbf23cfa 100644 --- a/facebook_business/adobjects/crmaddress.py +++ b/facebook_business/adobjects/crmaddress.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/ctwawhatsappnumbersinfo.py b/facebook_business/adobjects/ctwawhatsappnumbersinfo.py new file mode 100644 index 000000000..486ccb582 --- /dev/null +++ b/facebook_business/adobjects/ctwawhatsappnumbersinfo.py @@ -0,0 +1,47 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 CTWAWhatsAppNumbersInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(CTWAWhatsAppNumbersInfo, self).__init__() + self._isCTWAWhatsAppNumbersInfo = True + self._api = api + + class Field(AbstractObject.Field): + can_manage_wa_flows = 'can_manage_wa_flows' + formatted_whatsapp_number = 'formatted_whatsapp_number' + is_business_number = 'is_business_number' + page_whatsapp_number_id = 'page_whatsapp_number_id' + whatsapp_number = 'whatsapp_number' + whatsapp_smb_device = 'whatsapp_smb_device' + + _field_types = { + 'can_manage_wa_flows': 'bool', + 'formatted_whatsapp_number': 'string', + 'is_business_number': 'bool', + 'page_whatsapp_number_id': 'string', + 'whatsapp_number': 'string', + 'whatsapp_smb_device': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/ctxoptimizationeligibility.py b/facebook_business/adobjects/ctxoptimizationeligibility.py new file mode 100644 index 000000000..35c5cbfcd --- /dev/null +++ b/facebook_business/adobjects/ctxoptimizationeligibility.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 CTXOptimizationEligibility( + AbstractObject, +): + + def __init__(self, api=None): + super(CTXOptimizationEligibility, self).__init__() + self._isCTXOptimizationEligibility = True + self._api = api + + class Field(AbstractObject.Field): + ctm = 'ctm' + + _field_types = { + 'ctm': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/ctxpartnerappwelcomemessageflow.py b/facebook_business/adobjects/ctxpartnerappwelcomemessageflow.py new file mode 100644 index 000000000..581d04cdd --- /dev/null +++ b/facebook_business/adobjects/ctxpartnerappwelcomemessageflow.py @@ -0,0 +1,82 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isCTXPartnerAppWelcomeMessageFlow = True + super(CTXPartnerAppWelcomeMessageFlow, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + compatible_platforms = 'compatible_platforms' + eligible_platforms = 'eligible_platforms' + id = 'id' + is_used_in_ad = 'is_used_in_ad' + last_update_time = 'last_update_time' + name = 'name' + welcome_message_flow = 'welcome_message_flow' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CTXPartnerAppWelcomeMessageFlow, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'compatible_platforms': 'list', + 'eligible_platforms': 'list', + 'id': 'string', + 'is_used_in_ad': 'bool', + 'last_update_time': 'datetime', + 'name': 'string', + 'welcome_message_flow': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/currency.py b/facebook_business/adobjects/currency.py index 525d3184d..ba6070c18 100644 --- a/facebook_business/adobjects/currency.py +++ b/facebook_business/adobjects/currency.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/currencyamount.py b/facebook_business/adobjects/currencyamount.py index c22246acf..5fdb4b6c3 100644 --- a/facebook_business/adobjects/currencyamount.py +++ b/facebook_business/adobjects/currencyamount.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/customaudience.py b/facebook_business/adobjects/customaudience.py index 0efa269de..ae1a39e2a 100644 --- a/facebook_business/adobjects/customaudience.py +++ b/facebook_business/adobjects/customaudience.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -102,6 +88,7 @@ class Field(AbstractObject.Field): product_set_id = 'product_set_id' use_in_campaigns = 'use_in_campaigns' video_group_ids = 'video_group_ids' + whats_app_business_phone_number_id = 'whats_app_business_phone_number_id' class ClaimObjective: automotive_model = 'AUTOMOTIVE_MODEL' @@ -117,11 +104,11 @@ class ContentType: automotive_model = 'AUTOMOTIVE_MODEL' destination = 'DESTINATION' flight = 'FLIGHT' + generic = 'GENERIC' home_listing = 'HOME_LISTING' hotel = 'HOTEL' job = 'JOB' local_service_business = 'LOCAL_SERVICE_BUSINESS' - location_based_item = 'LOCATION_BASED_ITEM' media_title = 'MEDIA_TITLE' offline_product = 'OFFLINE_PRODUCT' product = 'PRODUCT' @@ -140,6 +127,7 @@ class Subtype: claim = 'CLAIM' custom = 'CUSTOM' engagement = 'ENGAGEMENT' + exclusion = 'EXCLUSION' fox = 'FOX' lookalike = 'LOOKALIKE' managed = 'MANAGED' @@ -149,6 +137,7 @@ class Subtype: primary = 'PRIMARY' regulated_categories_audience = 'REGULATED_CATEGORIES_AUDIENCE' study_rule_audience = 'STUDY_RULE_AUDIENCE' + subscriber_segment = 'SUBSCRIBER_SEGMENT' video = 'VIDEO' website = 'WEBSITE' @@ -413,6 +402,71 @@ def get_ads(self, fields=None, params=None, batch=None, success=None, failure=No self.assure_call() return request.execute() + def get_salts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.customaudiencesalts import CustomAudienceSalts + param_types = { + 'params': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/salts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CustomAudienceSalts, + api_type='EDGE', + response_parser=ObjectParser(target_class=CustomAudienceSalts, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_salt(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'salt': 'string', + 'valid_from': 'datetime', + 'valid_to': 'datetime', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/salts', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CustomAudience, + api_type='EDGE', + response_parser=ObjectParser(target_class=CustomAudience, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_sessions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -445,7 +499,7 @@ def get_sessions(self, fields=None, params=None, batch=None, success=None, failu self.assure_call() return request.execute() - def get_shared_account_info(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_share_d_account_info(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -635,6 +689,7 @@ def create_users_replace(self, fields=None, params=None, batch=None, success=Non 'product_set_id': 'string', 'use_in_campaigns': 'bool', 'video_group_ids': 'list', + 'whats_app_business_phone_number_id': 'string', } @classmethod def _get_field_enum_info(cls): diff --git a/facebook_business/adobjects/customaudienceadaccount.py b/facebook_business/adobjects/customaudienceadaccount.py index 2f6f1f028..ab10e9995 100644 --- a/facebook_business/adobjects/customaudienceadaccount.py +++ b/facebook_business/adobjects/customaudienceadaccount.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/customaudiencecapabilities.py b/facebook_business/adobjects/customaudiencecapabilities.py new file mode 100644 index 000000000..bb292d36d --- /dev/null +++ b/facebook_business/adobjects/customaudiencecapabilities.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 CustomAudienceCapabilities( + AbstractObject, +): + + def __init__(self, api=None): + super(CustomAudienceCapabilities, self).__init__() + self._isCustomAudienceCapabilities = True + self._api = api + + class Field(AbstractObject.Field): + capabilities = 'capabilities' + + _field_types = { + 'capabilities': 'map', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/customaudiencedatasource.py b/facebook_business/adobjects/customaudiencedatasource.py index afcc7f5d6..188de0bdb 100644 --- a/facebook_business/adobjects/customaudiencedatasource.py +++ b/facebook_business/adobjects/customaudiencedatasource.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -43,6 +29,7 @@ class Field(AbstractObject.Field): type = 'type' class SubType: + ad_campaign = 'AD_CAMPAIGN' anything = 'ANYTHING' app_users = 'APP_USERS' ar_effects_events = 'AR_EFFECTS_EVENTS' @@ -64,6 +51,7 @@ class SubType: facebook_wifi_events = 'FACEBOOK_WIFI_EVENTS' fb_event_signals = 'FB_EVENT_SIGNALS' fb_pixel_hits = 'FB_PIXEL_HITS' + group_events = 'GROUP_EVENTS' hashes = 'HASHES' hashes_or_user_ids = 'HASHES_OR_USER_IDS' household_expansion = 'HOUSEHOLD_EXPANSION' @@ -72,6 +60,8 @@ class SubType: instant_article_events = 'INSTANT_ARTICLE_EVENTS' lookalike_platform = 'LOOKALIKE_PLATFORM' mail_chimp_email_hashes = 'MAIL_CHIMP_EMAIL_HASHES' + marketplace_listings = 'MARKETPLACE_LISTINGS' + messenger_onsite_subscription = 'MESSENGER_ONSITE_SUBSCRIPTION' mobile_advertiser_ids = 'MOBILE_ADVERTISER_IDS' mobile_app_combination_events = 'MOBILE_APP_COMBINATION_EVENTS' mobile_app_custom_audience_users = 'MOBILE_APP_CUSTOM_AUDIENCE_USERS' @@ -101,6 +91,7 @@ class SubType: web_pixel_combination_events = 'WEB_PIXEL_COMBINATION_EVENTS' web_pixel_hits = 'WEB_PIXEL_HITS' web_pixel_hits_custom_audience_users = 'WEB_PIXEL_HITS_CUSTOM_AUDIENCE_USERS' + whatsapp_subscriber_pool = 'WHATSAPP_SUBSCRIBER_POOL' class Type: contact_importer = 'CONTACT_IMPORTER' diff --git a/facebook_business/adobjects/customaudiencegroup.py b/facebook_business/adobjects/customaudiencegroup.py index 0d4bbda11..5f36692f8 100644 --- a/facebook_business/adobjects/customaudiencegroup.py +++ b/facebook_business/adobjects/customaudiencegroup.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/customaudiencesalts.py b/facebook_business/adobjects/customaudiencesalts.py new file mode 100644 index 000000000..7d4b6bbbc --- /dev/null +++ b/facebook_business/adobjects/customaudiencesalts.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 CustomAudienceSalts( + AbstractObject, +): + + def __init__(self, api=None): + super(CustomAudienceSalts, self).__init__() + self._isCustomAudienceSalts = True + self._api = api + + class Field(AbstractObject.Field): + app_id = 'app_id' + public_key = 'public_key' + + _field_types = { + 'app_id': 'int', + 'public_key': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/customaudiencesession.py b/facebook_business/adobjects/customaudiencesession.py index 25d1cbb30..3b7198e3b 100644 --- a/facebook_business/adobjects/customaudiencesession.py +++ b/facebook_business/adobjects/customaudiencesession.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/customaudiencesharedaccountcampaigninfo.py b/facebook_business/adobjects/customaudiencesharedaccountcampaigninfo.py new file mode 100644 index 000000000..9e8b11071 --- /dev/null +++ b/facebook_business/adobjects/customaudiencesharedaccountcampaigninfo.py @@ -0,0 +1,51 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 CustomAudienceSharedAccountCampaignInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(CustomAudienceSharedAccountCampaignInfo, self).__init__() + self._isCustomAudienceSharedAccountCampaignInfo = True + self._api = api + + class Field(AbstractObject.Field): + account_id = 'account_id' + account_name = 'account_name' + adset_excluding_count = 'adset_excluding_count' + adset_including_count = 'adset_including_count' + campaign_delivery_status = 'campaign_delivery_status' + campaign_objective = 'campaign_objective' + campaign_pages = 'campaign_pages' + campaign_schedule = 'campaign_schedule' + + _field_types = { + 'account_id': 'string', + 'account_name': 'string', + 'adset_excluding_count': 'unsigned int', + 'adset_including_count': 'unsigned int', + 'campaign_delivery_status': 'string', + 'campaign_objective': 'string', + 'campaign_pages': 'list', + 'campaign_schedule': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/customaudiencesharedaccountinfo.py b/facebook_business/adobjects/customaudiencesharedaccountinfo.py index 6a8f8d2d2..221e91939 100644 --- a/facebook_business/adobjects/customaudiencesharedaccountinfo.py +++ b/facebook_business/adobjects/customaudiencesharedaccountinfo.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/customaudiencesharingstatus.py b/facebook_business/adobjects/customaudiencesharingstatus.py index 8938fce6d..b6f9cb476 100644 --- a/facebook_business/adobjects/customaudiencesharingstatus.py +++ b/facebook_business/adobjects/customaudiencesharingstatus.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/customaudiencestatus.py b/facebook_business/adobjects/customaudiencestatus.py index 05c4c0cb3..2408ab355 100644 --- a/facebook_business/adobjects/customaudiencestatus.py +++ b/facebook_business/adobjects/customaudiencestatus.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/customaudiencestos.py b/facebook_business/adobjects/customaudiencestos.py index d359d79ee..a70f4fa4c 100644 --- a/facebook_business/adobjects/customaudiencestos.py +++ b/facebook_business/adobjects/customaudiencestos.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/customconversion.py b/facebook_business/adobjects/customconversion.py index bbd544f9a..754eb1bc7 100644 --- a/facebook_business/adobjects/customconversion.py +++ b/facebook_business/adobjects/customconversion.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -60,6 +46,7 @@ class Field(AbstractObject.Field): pixel = 'pixel' retention_days = 'retention_days' rule = 'rule' + action_source_type = 'action_source_type' advanced_rule = 'advanced_rule' event_source_id = 'event_source_id' custom_conversion_id = 'custom_conversion_id' @@ -86,6 +73,17 @@ class CustomEventType: submit_application = 'SUBMIT_APPLICATION' subscribe = 'SUBSCRIBE' + class ActionSourceType: + app = 'app' + business_messaging = 'business_messaging' + chat = 'chat' + email = 'email' + other = 'other' + phone_call = 'phone_call' + physical_store = 'physical_store' + system_generated = 'system_generated' + website = 'website' + # @deprecated get_endpoint function is deprecated @classmethod def get_endpoint(cls): @@ -244,6 +242,7 @@ def get_stats(self, fields=None, params=None, batch=None, success=None, failure= 'pixel': 'AdsPixel', 'retention_days': 'unsigned int', 'rule': 'string', + 'action_source_type': 'ActionSourceType', 'advanced_rule': 'string', 'event_source_id': 'string', 'custom_conversion_id': 'string', @@ -252,6 +251,7 @@ def get_stats(self, fields=None, params=None, batch=None, success=None, failure= def _get_field_enum_info(cls): field_enum_info = {} field_enum_info['CustomEventType'] = CustomConversion.CustomEventType.__dict__.values() + field_enum_info['ActionSourceType'] = CustomConversion.ActionSourceType.__dict__.values() return field_enum_info diff --git a/facebook_business/adobjects/customconversionactivities.py b/facebook_business/adobjects/customconversionactivities.py new file mode 100644 index 000000000..febf5130d --- /dev/null +++ b/facebook_business/adobjects/customconversionactivities.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 CustomConversionActivities( + AbstractObject, +): + + def __init__(self, api=None): + super(CustomConversionActivities, self).__init__() + self._isCustomConversionActivities = True + self._api = api + + class Field(AbstractObject.Field): + app_id = 'app_id' + data = 'data' + event_type = 'event_type' + timestamp = 'timestamp' + + _field_types = { + 'app_id': 'unsigned int', + 'data': 'string', + 'event_type': 'string', + 'timestamp': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/customconversionstatsresult.py b/facebook_business/adobjects/customconversionstatsresult.py index 390c02252..585b693fd 100644 --- a/facebook_business/adobjects/customconversionstatsresult.py +++ b/facebook_business/adobjects/customconversionstatsresult.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/customusersettings.py b/facebook_business/adobjects/customusersettings.py index 4e8430149..4c40e9817 100644 --- a/facebook_business/adobjects/customusersettings.py +++ b/facebook_business/adobjects/customusersettings.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/dacheck.py b/facebook_business/adobjects/dacheck.py index c836f9b7e..665bb3aae 100644 --- a/facebook_business/adobjects/dacheck.py +++ b/facebook_business/adobjects/dacheck.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/daypart.py b/facebook_business/adobjects/daypart.py index 737f5b17a..8ed18244f 100644 --- a/facebook_business/adobjects/daypart.py +++ b/facebook_business/adobjects/daypart.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/deliverycheck.py b/facebook_business/adobjects/deliverycheck.py index 21102dc37..637cefc48 100644 --- a/facebook_business/adobjects/deliverycheck.py +++ b/facebook_business/adobjects/deliverycheck.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/deliverycheckextrainfo.py b/facebook_business/adobjects/deliverycheckextrainfo.py index 3f4762972..bcfa04033 100644 --- a/facebook_business/adobjects/deliverycheckextrainfo.py +++ b/facebook_business/adobjects/deliverycheckextrainfo.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/deliveryinfo.py b/facebook_business/adobjects/deliveryinfo.py new file mode 100644 index 000000000..458ba01cb --- /dev/null +++ b/facebook_business/adobjects/deliveryinfo.py @@ -0,0 +1,119 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 DeliveryInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(DeliveryInfo, self).__init__() + self._isDeliveryInfo = True + self._api = api + + class Field(AbstractObject.Field): + active_accelerated_campaign_count = 'active_accelerated_campaign_count' + active_day_parted_campaign_count = 'active_day_parted_campaign_count' + ad_penalty_map = 'ad_penalty_map' + are_all_daily_budgets_spent = 'are_all_daily_budgets_spent' + credit_needed_ads_count = 'credit_needed_ads_count' + eligible_for_delivery_insights = 'eligible_for_delivery_insights' + end_time = 'end_time' + has_account_hit_spend_limit = 'has_account_hit_spend_limit' + has_campaign_group_hit_spend_limit = 'has_campaign_group_hit_spend_limit' + has_no_active_ads = 'has_no_active_ads' + has_no_ads = 'has_no_ads' + inactive_ads_count = 'inactive_ads_count' + inactive_campaign_count = 'inactive_campaign_count' + is_account_closed = 'is_account_closed' + is_account_disabled = 'is_account_disabled' + is_ad_uneconomical = 'is_ad_uneconomical' + is_adfarm_penalized = 'is_adfarm_penalized' + is_adgroup_partially_rejected = 'is_adgroup_partially_rejected' + is_campaign_accelerated = 'is_campaign_accelerated' + is_campaign_completed = 'is_campaign_completed' + is_campaign_day_parted = 'is_campaign_day_parted' + is_campaign_disabled = 'is_campaign_disabled' + is_campaign_group_disabled = 'is_campaign_group_disabled' + is_clickbait_penalized = 'is_clickbait_penalized' + is_daily_budget_spent = 'is_daily_budget_spent' + is_engagement_bait_penalized = 'is_engagement_bait_penalized' + is_lqwe_penalized = 'is_lqwe_penalized' + is_reach_and_frequency_misconfigured = 'is_reach_and_frequency_misconfigured' + is_sensationalism_penalized = 'is_sensationalism_penalized' + is_split_test_active = 'is_split_test_active' + is_split_test_valid = 'is_split_test_valid' + lift_study_time_period = 'lift_study_time_period' + needs_credit = 'needs_credit' + needs_tax_number = 'needs_tax_number' + non_deleted_ads_count = 'non_deleted_ads_count' + not_delivering_campaign_count = 'not_delivering_campaign_count' + pending_ads_count = 'pending_ads_count' + reach_frequency_campaign_underdelivery_reason = 'reach_frequency_campaign_underdelivery_reason' + rejected_ads_count = 'rejected_ads_count' + start_time = 'start_time' + status = 'status' + text_penalty_level = 'text_penalty_level' + + _field_types = { + 'active_accelerated_campaign_count': 'int', + 'active_day_parted_campaign_count': 'int', + 'ad_penalty_map': 'list>', + 'are_all_daily_budgets_spent': 'bool', + 'credit_needed_ads_count': 'int', + 'eligible_for_delivery_insights': 'bool', + 'end_time': 'datetime', + 'has_account_hit_spend_limit': 'bool', + 'has_campaign_group_hit_spend_limit': 'bool', + 'has_no_active_ads': 'bool', + 'has_no_ads': 'bool', + 'inactive_ads_count': 'int', + 'inactive_campaign_count': 'int', + 'is_account_closed': 'bool', + 'is_account_disabled': 'bool', + 'is_ad_uneconomical': 'bool', + 'is_adfarm_penalized': 'bool', + 'is_adgroup_partially_rejected': 'bool', + 'is_campaign_accelerated': 'bool', + 'is_campaign_completed': 'bool', + 'is_campaign_day_parted': 'bool', + 'is_campaign_disabled': 'bool', + 'is_campaign_group_disabled': 'bool', + 'is_clickbait_penalized': 'bool', + 'is_daily_budget_spent': 'bool', + 'is_engagement_bait_penalized': 'bool', + 'is_lqwe_penalized': 'bool', + 'is_reach_and_frequency_misconfigured': 'bool', + 'is_sensationalism_penalized': 'bool', + 'is_split_test_active': 'bool', + 'is_split_test_valid': 'bool', + 'lift_study_time_period': 'string', + 'needs_credit': 'bool', + 'needs_tax_number': 'bool', + 'non_deleted_ads_count': 'int', + 'not_delivering_campaign_count': 'int', + 'pending_ads_count': 'int', + 'reach_frequency_campaign_underdelivery_reason': 'string', + 'rejected_ads_count': 'int', + 'start_time': 'datetime', + 'status': 'string', + 'text_penalty_level': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/deliverystatus.py b/facebook_business/adobjects/deliverystatus.py new file mode 100644 index 000000000..7a6d5786e --- /dev/null +++ b/facebook_business/adobjects/deliverystatus.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 DeliveryStatus( + AbstractObject, +): + + def __init__(self, api=None): + super(DeliveryStatus, self).__init__() + self._isDeliveryStatus = True + self._api = api + + class Field(AbstractObject.Field): + status = 'status' + substatuses = 'substatuses' + + _field_types = { + 'status': 'string', + 'substatuses': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/deliverywindow.py b/facebook_business/adobjects/deliverywindow.py index 85a70699d..f6d854267 100644 --- a/facebook_business/adobjects/deliverywindow.py +++ b/facebook_business/adobjects/deliverywindow.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/destination.py b/facebook_business/adobjects/destination.py index 3a19bbd16..4b803c625 100644 --- a/facebook_business/adobjects/destination.py +++ b/facebook_business/adobjects/destination.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -54,6 +40,7 @@ class Field(AbstractObject.Field): price = 'price' price_change = 'price_change' sanitized_images = 'sanitized_images' + tags = 'tags' types = 'types' unit_price = 'unit_price' url = 'url' @@ -105,6 +92,7 @@ def get_augmented_realities_metadata(self, fields=None, params=None, batch=None, from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.dynamicarmetadata import DynamicARMetadata param_types = { } enums = { @@ -115,9 +103,9 @@ def get_augmented_realities_metadata(self, fields=None, params=None, batch=None, endpoint='/augmented_realities_metadata', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=DynamicARMetadata, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=DynamicARMetadata, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -166,6 +154,7 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.dynamicvideometadata import DynamicVideoMetadata param_types = { } enums = { @@ -176,9 +165,9 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None endpoint='/videos_metadata', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=DynamicVideoMetadata, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=DynamicVideoMetadata, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -206,6 +195,7 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None 'price': 'string', 'price_change': 'string', 'sanitized_images': 'list', + 'tags': 'list', 'types': 'list', 'unit_price': 'Object', 'url': 'string', diff --git a/facebook_business/adobjects/directdebit.py b/facebook_business/adobjects/directdebit.py new file mode 100644 index 000000000..e424ffc67 --- /dev/null +++ b/facebook_business/adobjects/directdebit.py @@ -0,0 +1,58 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 DirectDebit( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isDirectDebit = True + super(DirectDebit, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + bank_account_last_4 = 'bank_account_last_4' + bank_code_last_4 = 'bank_code_last_4' + bank_name = 'bank_name' + default_receiving_method_products = 'default_receiving_method_products' + display_string = 'display_string' + id = 'id' + last_four_digits = 'last_four_digits' + onboarding_url = 'onboarding_url' + owner_name = 'owner_name' + status = 'status' + + _field_types = { + 'bank_account_last_4': 'string', + 'bank_code_last_4': 'string', + 'bank_name': 'string', + 'default_receiving_method_products': 'list', + 'display_string': 'string', + 'id': 'string', + 'last_four_digits': 'string', + 'onboarding_url': 'string', + 'owner_name': 'string', + 'status': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/dognotificationsettings.py b/facebook_business/adobjects/dognotificationsettings.py new file mode 100644 index 000000000..85b258f33 --- /dev/null +++ b/facebook_business/adobjects/dognotificationsettings.py @@ -0,0 +1,74 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 DogNotificationSettings( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isDogNotificationSettings = True + super(DogNotificationSettings, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + dog_check_key = 'dog_check_key' + id = 'id' + subscription_status_per_channel = 'subscription_status_per_channel' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=DogNotificationSettings, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'dog_check_key': 'string', + 'id': 'string', + 'subscription_status_per_channel': 'list>', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/domain.py b/facebook_business/adobjects/domain.py new file mode 100644 index 000000000..d2f3ec4a8 --- /dev/null +++ b/facebook_business/adobjects/domain.py @@ -0,0 +1,74 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 Domain( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isDomain = True + super(Domain, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + name = 'name' + url = 'url' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Domain, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'name': 'string', + 'url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/draftpost.py b/facebook_business/adobjects/draftpost.py new file mode 100644 index 000000000..b973331f8 --- /dev/null +++ b/facebook_business/adobjects/draftpost.py @@ -0,0 +1,72 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 DraftPost( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isDraftPost = True + super(DraftPost, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + admin_creator = 'admin_creator' + creation_time = 'creation_time' + feed_audience_description = 'feed_audience_description' + feed_targeting = 'feed_targeting' + id = 'id' + is_post_in_good_state = 'is_post_in_good_state' + message = 'message' + modified_time = 'modified_time' + og_action_summary = 'og_action_summary' + permalink_url = 'permalink_url' + place = 'place' + privacy_description = 'privacy_description' + scheduled_failure_notice = 'scheduled_failure_notice' + scheduled_publish_time = 'scheduled_publish_time' + story_token = 'story_token' + thumbnail = 'thumbnail' + video_id = 'video_id' + + _field_types = { + 'admin_creator': 'User', + 'creation_time': 'datetime', + 'feed_audience_description': 'string', + 'feed_targeting': 'Targeting', + 'id': 'string', + 'is_post_in_good_state': 'bool', + 'message': 'string', + 'modified_time': 'datetime', + 'og_action_summary': 'string', + 'permalink_url': 'string', + 'place': 'Place', + 'privacy_description': 'string', + 'scheduled_failure_notice': 'string', + 'scheduled_publish_time': 'datetime', + 'story_token': 'string', + 'thumbnail': 'string', + 'video_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/dynamicarmetadata.py b/facebook_business/adobjects/dynamicarmetadata.py new file mode 100644 index 000000000..02fbd1e1f --- /dev/null +++ b/facebook_business/adobjects/dynamicarmetadata.py @@ -0,0 +1,92 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 DynamicARMetadata( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isDynamicARMetadata = True + super(DynamicARMetadata, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + anchor_point = 'anchor_point' + container_effect_enum = 'container_effect_enum' + effect_icon_url = 'effect_icon_url' + effect_id = 'effect_id' + id = 'id' + platforms = 'platforms' + scale_factor = 'scale_factor' + shadow_texture_url = 'shadow_texture_url' + source_url = 'source_url' + state = 'state' + tags = 'tags' + variant_picker_url = 'variant_picker_url' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=DynamicARMetadata, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'anchor_point': 'list', + 'container_effect_enum': 'int', + 'effect_icon_url': 'string', + 'effect_id': 'string', + 'id': 'string', + 'platforms': 'list', + 'scale_factor': 'list', + 'shadow_texture_url': 'string', + 'source_url': 'string', + 'state': 'string', + 'tags': 'list', + 'variant_picker_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/dynamiccontentset.py b/facebook_business/adobjects/dynamiccontentset.py new file mode 100644 index 000000000..4eff8909f --- /dev/null +++ b/facebook_business/adobjects/dynamiccontentset.py @@ -0,0 +1,74 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 DynamicContentSet( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isDynamicContentSet = True + super(DynamicContentSet, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + business_id = 'business_id' + id = 'id' + name = 'name' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=DynamicContentSet, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'business_id': 'string', + 'id': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/dynamicitemdisplaybundle.py b/facebook_business/adobjects/dynamicitemdisplaybundle.py new file mode 100644 index 000000000..24b7299cd --- /dev/null +++ b/facebook_business/adobjects/dynamicitemdisplaybundle.py @@ -0,0 +1,82 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 DynamicItemDisplayBundle( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isDynamicItemDisplayBundle = True + super(DynamicItemDisplayBundle, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + additional_urls = 'additional_urls' + description = 'description' + id = 'id' + name = 'name' + product_set = 'product_set' + text_tokens = 'text_tokens' + url = 'url' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=DynamicItemDisplayBundle, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'additional_urls': 'list>', + 'description': 'string', + 'id': 'string', + 'name': 'string', + 'product_set': 'ProductSet', + 'text_tokens': 'list>', + 'url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/dynamicitemdisplaybundlefolder.py b/facebook_business/adobjects/dynamicitemdisplaybundlefolder.py new file mode 100644 index 000000000..831939a4f --- /dev/null +++ b/facebook_business/adobjects/dynamicitemdisplaybundlefolder.py @@ -0,0 +1,80 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 DynamicItemDisplayBundleFolder( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isDynamicItemDisplayBundleFolder = True + super(DynamicItemDisplayBundleFolder, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + categorization_criteria = 'categorization_criteria' + id = 'id' + name = 'name' + product_catalog = 'product_catalog' + product_set = 'product_set' + valid_labels = 'valid_labels' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=DynamicItemDisplayBundleFolder, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'categorization_criteria': 'string', + 'id': 'string', + 'name': 'string', + 'product_catalog': 'ProductCatalog', + 'product_set': 'ProductSet', + 'valid_labels': 'list>>', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/dynamicpostchildattachment.py b/facebook_business/adobjects/dynamicpostchildattachment.py index 258e1fa95..cfd34b946 100644 --- a/facebook_business/adobjects/dynamicpostchildattachment.py +++ b/facebook_business/adobjects/dynamicpostchildattachment.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/dynamicpriceconfigbydate.py b/facebook_business/adobjects/dynamicpriceconfigbydate.py index 78eba8c10..694b982d8 100644 --- a/facebook_business/adobjects/dynamicpriceconfigbydate.py +++ b/facebook_business/adobjects/dynamicpriceconfigbydate.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/dynamicvideometadata.py b/facebook_business/adobjects/dynamicvideometadata.py new file mode 100644 index 000000000..849ccb25f --- /dev/null +++ b/facebook_business/adobjects/dynamicvideometadata.py @@ -0,0 +1,76 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 DynamicVideoMetadata( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isDynamicVideoMetadata = True + super(DynamicVideoMetadata, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + tags = 'tags' + url = 'url' + video = 'video' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=DynamicVideoMetadata, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'tags': 'list', + 'url': 'string', + 'video': 'AdVideo', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/educationexperience.py b/facebook_business/adobjects/educationexperience.py new file mode 100644 index 000000000..59bec8230 --- /dev/null +++ b/facebook_business/adobjects/educationexperience.py @@ -0,0 +1,84 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 EducationExperience( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isEducationExperience = True + super(EducationExperience, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + classes = 'classes' + concentration = 'concentration' + degree = 'degree' + id = 'id' + school = 'school' + type = 'type' + field_with = 'with' + year = 'year' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=EducationExperience, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'classes': 'list', + 'concentration': 'list', + 'degree': 'Page', + 'id': 'string', + 'school': 'Page', + 'type': 'string', + 'with': 'list', + 'year': 'Page', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/emailimport.py b/facebook_business/adobjects/emailimport.py new file mode 100644 index 000000000..a39262108 --- /dev/null +++ b/facebook_business/adobjects/emailimport.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 EmailImport( + AbstractObject, +): + + def __init__(self, api=None): + super(EmailImport, self).__init__() + self._isEmailImport = True + self._api = api + + class Field(AbstractObject.Field): + lists = 'lists' + total = 'total' + + _field_types = { + 'lists': 'list', + 'total': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/endstudycriteria.py b/facebook_business/adobjects/endstudycriteria.py new file mode 100644 index 000000000..4365e14d4 --- /dev/null +++ b/facebook_business/adobjects/endstudycriteria.py @@ -0,0 +1,36 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 EndStudyCriteria( + AbstractObject, +): + + def __init__(self, api=None): + super(EndStudyCriteria, self).__init__() + self._isEndStudyCriteria = True + self._api = api + + class Field(AbstractObject.Field): + pass + + _field_types = { + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/engagement.py b/facebook_business/adobjects/engagement.py index 31f738433..e96347e1e 100644 --- a/facebook_business/adobjects/engagement.py +++ b/facebook_business/adobjects/engagement.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/entityattextrange.py b/facebook_business/adobjects/entityattextrange.py index 36b6cbbd9..0b2700e04 100644 --- a/facebook_business/adobjects/entityattextrange.py +++ b/facebook_business/adobjects/entityattextrange.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/entwithsponsor.py b/facebook_business/adobjects/entwithsponsor.py new file mode 100644 index 000000000..bb3ea63ac --- /dev/null +++ b/facebook_business/adobjects/entwithsponsor.py @@ -0,0 +1,48 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 EntWithSponsor( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isEntWithSponsor = True + super(EntWithSponsor, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + owner_linked_instagram_user_v1_id = 'owner_linked_instagram_user_v1_id' + owner_picture = 'owner_picture' + post_id = 'post_id' + post_info = 'post_info' + + _field_types = { + 'id': 'string', + 'owner_linked_instagram_user_v1_id': 'string', + 'owner_picture': 'string', + 'post_id': 'string', + 'post_info': 'Post', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/event.py b/facebook_business/adobjects/event.py index 6dacc635e..5e6b48d3c 100644 --- a/facebook_business/adobjects/event.py +++ b/facebook_business/adobjects/event.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -434,6 +420,7 @@ def get_ticket_tiers(self, fields=None, params=None, batch=None, success=None, f from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.eventtickettier import EventTicketTier param_types = { } enums = { @@ -444,9 +431,9 @@ def get_ticket_tiers(self, fields=None, params=None, batch=None, success=None, f endpoint='/ticket_tiers', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=EventTicketTier, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=EventTicketTier, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -517,10 +504,10 @@ def get_videos(self, fields=None, params=None, batch=None, success=None, failure 'owner': 'Object', 'parent_group': 'Group', 'place': 'Place', - 'registration_setting': 'Object', + 'registration_setting': 'EventRegistrationSetting', 'scheduled_publish_time': 'string', 'start_time': 'string', - 'ticket_setting': 'Object', + 'ticket_setting': 'EventTicketSetting', 'ticket_uri': 'string', 'ticket_uri_start_sales_time': 'string', 'ticketing_privacy_uri': 'string', diff --git a/facebook_business/adobjects/eventexternalticketinfo.py b/facebook_business/adobjects/eventexternalticketinfo.py new file mode 100644 index 000000000..82920f28b --- /dev/null +++ b/facebook_business/adobjects/eventexternalticketinfo.py @@ -0,0 +1,76 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 EventExternalTicketInfo( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isEventExternalTicketInfo = True + super(EventExternalTicketInfo, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + max_sales_price = 'max_sales_price' + min_sales_price = 'min_sales_price' + sales_status = 'sales_status' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=EventExternalTicketInfo, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'max_sales_price': 'CurrencyAmount', + 'min_sales_price': 'CurrencyAmount', + 'sales_status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/eventregistrationsetting.py b/facebook_business/adobjects/eventregistrationsetting.py new file mode 100644 index 000000000..66f682709 --- /dev/null +++ b/facebook_business/adobjects/eventregistrationsetting.py @@ -0,0 +1,76 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 EventRegistrationSetting( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isEventRegistrationSetting = True + super(EventRegistrationSetting, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + questions = 'questions' + target_type = 'target_type' + ticket_tier_ids = 'ticket_tier_ids' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=EventRegistrationSetting, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'questions': 'string', + 'target_type': 'string', + 'ticket_tier_ids': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/eventsourcegroup.py b/facebook_business/adobjects/eventsourcegroup.py index aded57f56..3951382f5 100644 --- a/facebook_business/adobjects/eventsourcegroup.py +++ b/facebook_business/adobjects/eventsourcegroup.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -119,7 +105,7 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure self.assure_call() return request.execute() - def get_shared_accounts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_share_d_accounts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -150,7 +136,7 @@ def get_shared_accounts(self, fields=None, params=None, batch=None, success=None self.assure_call() return request.execute() - def create_shared_account(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def create_share_d_account(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') diff --git a/facebook_business/adobjects/eventticketsetting.py b/facebook_business/adobjects/eventticketsetting.py new file mode 100644 index 000000000..024cd5afc --- /dev/null +++ b/facebook_business/adobjects/eventticketsetting.py @@ -0,0 +1,72 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 EventTicketSetting( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isEventTicketSetting = True + super(EventTicketSetting, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + ticket_delivery_type = 'ticket_delivery_type' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=EventTicketSetting, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'ticket_delivery_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/eventtickettier.py b/facebook_business/adobjects/eventtickettier.py new file mode 100644 index 000000000..d92f64e59 --- /dev/null +++ b/facebook_business/adobjects/eventtickettier.py @@ -0,0 +1,104 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 EventTicketTier( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isEventTicketTier = True + super(EventTicketTier, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + currency = 'currency' + description = 'description' + end_sales_time = 'end_sales_time' + end_show_time = 'end_show_time' + fee_settings = 'fee_settings' + id = 'id' + maximum_quantity = 'maximum_quantity' + metadata = 'metadata' + minimum_quantity = 'minimum_quantity' + name = 'name' + price = 'price' + priority = 'priority' + retailer_id = 'retailer_id' + seating_map_image_url = 'seating_map_image_url' + start_sales_time = 'start_sales_time' + start_show_time = 'start_show_time' + status = 'status' + total_quantity = 'total_quantity' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=EventTicketTier, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'currency': 'string', + 'description': 'string', + 'end_sales_time': 'datetime', + 'end_show_time': 'datetime', + 'fee_settings': 'string', + 'id': 'string', + 'maximum_quantity': 'int', + 'metadata': 'string', + 'minimum_quantity': 'int', + 'name': 'string', + 'price': 'int', + 'priority': 'int', + 'retailer_id': 'string', + 'seating_map_image_url': 'string', + 'start_sales_time': 'datetime', + 'start_show_time': 'datetime', + 'status': 'string', + 'total_quantity': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/eventtour.py b/facebook_business/adobjects/eventtour.py new file mode 100644 index 000000000..c4a448ba9 --- /dev/null +++ b/facebook_business/adobjects/eventtour.py @@ -0,0 +1,94 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 EventTour( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isEventTour = True + super(EventTour, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + description = 'description' + dominant_color = 'dominant_color' + end_time = 'end_time' + id = 'id' + is_past = 'is_past' + last_event_timestamp = 'last_event_timestamp' + name = 'name' + num_events = 'num_events' + photo = 'photo' + scheduled_publish_timestamp = 'scheduled_publish_timestamp' + start_time = 'start_time' + ticketing_uri = 'ticketing_uri' + video = 'video' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=EventTour, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'description': 'string', + 'dominant_color': 'string', + 'end_time': 'string', + 'id': 'string', + 'is_past': 'bool', + 'last_event_timestamp': 'int', + 'name': 'string', + 'num_events': 'int', + 'photo': 'Photo', + 'scheduled_publish_timestamp': 'int', + 'start_time': 'string', + 'ticketing_uri': 'string', + 'video': 'AdVideo', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/experience.py b/facebook_business/adobjects/experience.py index 574c2a47b..872d6e97b 100644 --- a/facebook_business/adobjects/experience.py +++ b/facebook_business/adobjects/experience.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/expirablepost.py b/facebook_business/adobjects/expirablepost.py new file mode 100644 index 000000000..364070fd0 --- /dev/null +++ b/facebook_business/adobjects/expirablepost.py @@ -0,0 +1,78 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ExpirablePost( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isExpirablePost = True + super(ExpirablePost, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + admin_creator = 'admin_creator' + can_republish = 'can_republish' + content_type = 'content_type' + creation_time = 'creation_time' + expiration = 'expiration' + feed_audience_description = 'feed_audience_description' + feed_targeting = 'feed_targeting' + id = 'id' + is_post_in_good_state = 'is_post_in_good_state' + message = 'message' + modified_time = 'modified_time' + og_action_summary = 'og_action_summary' + permalink_url = 'permalink_url' + place = 'place' + privacy_description = 'privacy_description' + scheduled_failure_notice = 'scheduled_failure_notice' + scheduled_publish_time = 'scheduled_publish_time' + story_token = 'story_token' + thumbnail = 'thumbnail' + video_id = 'video_id' + + _field_types = { + 'admin_creator': 'User', + 'can_republish': 'bool', + 'content_type': 'string', + 'creation_time': 'datetime', + 'expiration': 'Object', + 'feed_audience_description': 'string', + 'feed_targeting': 'Targeting', + 'id': 'string', + 'is_post_in_good_state': 'bool', + 'message': 'string', + 'modified_time': 'datetime', + 'og_action_summary': 'string', + 'permalink_url': 'string', + 'place': 'Place', + 'privacy_description': 'string', + 'scheduled_failure_notice': 'string', + 'scheduled_publish_time': 'datetime', + 'story_token': 'string', + 'thumbnail': 'string', + 'video_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/extendedcredit.py b/facebook_business/adobjects/extendedcredit.py index 4280d5873..eb2b9cb09 100644 --- a/facebook_business/adobjects/extendedcredit.py +++ b/facebook_business/adobjects/extendedcredit.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -226,7 +212,7 @@ def create_owning_credit_allocation_config(self, fields=None, params=None, batch self.assure_call() return request.execute() - def create_whatsapp_credit_sharing_and_attach(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def create_whats_app_credit_sharing_an_d_attach(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') diff --git a/facebook_business/adobjects/extendedcreditallocationconfig.py b/facebook_business/adobjects/extendedcreditallocationconfig.py index f39e29d6e..e640bd062 100644 --- a/facebook_business/adobjects/extendedcreditallocationconfig.py +++ b/facebook_business/adobjects/extendedcreditallocationconfig.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -60,6 +46,7 @@ class LiabilityType: class PartitionType: auth = 'AUTH' fixed = 'FIXED' + fixed_without_partition = 'FIXED_WITHOUT_PARTITION' class SendBillTo: advertiser = 'Advertiser' diff --git a/facebook_business/adobjects/extendedcreditapplication.py b/facebook_business/adobjects/extendedcreditapplication.py new file mode 100644 index 000000000..ae4bf963c --- /dev/null +++ b/facebook_business/adobjects/extendedcreditapplication.py @@ -0,0 +1,118 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ExtendedCreditApplication( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isExtendedCreditApplication = True + super(ExtendedCreditApplication, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + billing_country = 'billing_country' + city = 'city' + cnpj = 'cnpj' + country = 'country' + display_currency = 'display_currency' + duns_number = 'duns_number' + id = 'id' + invoice_email_address = 'invoice_email_address' + is_umi = 'is_umi' + legal_entity_name = 'legal_entity_name' + original_online_limit = 'original_online_limit' + phone_number = 'phone_number' + postal_code = 'postal_code' + product_types = 'product_types' + proposed_credit_limit = 'proposed_credit_limit' + registration_number = 'registration_number' + run_id = 'run_id' + state = 'state' + status = 'status' + street1 = 'street1' + street2 = 'street2' + submitter = 'submitter' + tax_exempt_status = 'tax_exempt_status' + tax_id = 'tax_id' + terms = 'terms' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ExtendedCreditApplication, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'billing_country': 'string', + 'city': 'string', + 'cnpj': 'string', + 'country': 'string', + 'display_currency': 'string', + 'duns_number': 'string', + 'id': 'string', + 'invoice_email_address': 'string', + 'is_umi': 'bool', + 'legal_entity_name': 'string', + 'original_online_limit': 'CurrencyAmount', + 'phone_number': 'string', + 'postal_code': 'string', + 'product_types': 'list', + 'proposed_credit_limit': 'CurrencyAmount', + 'registration_number': 'string', + 'run_id': 'string', + 'state': 'string', + 'status': 'string', + 'street1': 'string', + 'street2': 'string', + 'submitter': 'User', + 'tax_exempt_status': 'string', + 'tax_id': 'string', + 'terms': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/extendedcreditemail.py b/facebook_business/adobjects/extendedcreditemail.py new file mode 100644 index 000000000..78e522ca5 --- /dev/null +++ b/facebook_business/adobjects/extendedcreditemail.py @@ -0,0 +1,42 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ExtendedCreditEmail( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isExtendedCreditEmail = True + super(ExtendedCreditEmail, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + email = 'email' + id = 'id' + + _field_types = { + 'email': 'string', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/extendedcreditinfo.py b/facebook_business/adobjects/extendedcreditinfo.py new file mode 100644 index 000000000..dc4ebe8ab --- /dev/null +++ b/facebook_business/adobjects/extendedcreditinfo.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ExtendedCreditInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(ExtendedCreditInfo, self).__init__() + self._isExtendedCreditInfo = True + self._api = api + + class Field(AbstractObject.Field): + credit_left = 'credit_left' + credit_revoked = 'credit_revoked' + credit_used = 'credit_used' + using_biz_ec = 'using_biz_ec' + + _field_types = { + 'credit_left': 'string', + 'credit_revoked': 'bool', + 'credit_used': 'string', + 'using_biz_ec': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/extendedcreditinvoicegroup.py b/facebook_business/adobjects/extendedcreditinvoicegroup.py index a325f57cb..f43532db0 100644 --- a/facebook_business/adobjects/extendedcreditinvoicegroup.py +++ b/facebook_business/adobjects/extendedcreditinvoicegroup.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -241,7 +227,7 @@ def create_ad_account(self, fields=None, params=None, batch=None, success=None, 'auto_enroll': 'bool', 'bill_to_address': 'CRMAddress', 'customer_po_number': 'string', - 'email': 'Object', + 'email': 'ExtendedCreditEmail', 'emails': 'list', 'id': 'string', 'liable_address': 'CRMAddress', diff --git a/facebook_business/adobjects/externaleventsource.py b/facebook_business/adobjects/externaleventsource.py index f2117f193..ca0c9847b 100644 --- a/facebook_business/adobjects/externaleventsource.py +++ b/facebook_business/adobjects/externaleventsource.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/externaleventsourcecpaseventsdebugging.py b/facebook_business/adobjects/externaleventsourcecpaseventsdebugging.py new file mode 100644 index 000000000..e5c648331 --- /dev/null +++ b/facebook_business/adobjects/externaleventsourcecpaseventsdebugging.py @@ -0,0 +1,53 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ExternalEventSourceCPASEventsDebugging( + AbstractObject, +): + + def __init__(self, api=None): + super(ExternalEventSourceCPASEventsDebugging, self).__init__() + self._isExternalEventSourceCPASEventsDebugging = True + self._api = api + + class Field(AbstractObject.Field): + actual_event_time = 'actual_event_time' + app_version = 'app_version' + content_url = 'content_url' + device_os = 'device_os' + diagnostic = 'diagnostic' + event_name = 'event_name' + event_time = 'event_time' + missing_ids = 'missing_ids' + severity = 'severity' + + _field_types = { + 'actual_event_time': 'int', + 'app_version': 'string', + 'content_url': 'string', + 'device_os': 'string', + 'diagnostic': 'string', + 'event_name': 'string', + 'event_time': 'int', + 'missing_ids': 'string', + 'severity': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/externaleventsourcecpaseventsdebugginginfo.py b/facebook_business/adobjects/externaleventsourcecpaseventsdebugginginfo.py new file mode 100644 index 000000000..224345b7d --- /dev/null +++ b/facebook_business/adobjects/externaleventsourcecpaseventsdebugginginfo.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ExternalEventSourceCPASEventsDebuggingInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(ExternalEventSourceCPASEventsDebuggingInfo, self).__init__() + self._isExternalEventSourceCPASEventsDebuggingInfo = True + self._api = api + + class Field(AbstractObject.Field): + counts = 'counts' + diagnostic = 'diagnostic' + event_name = 'event_name' + + _field_types = { + 'counts': 'int', + 'diagnostic': 'string', + 'event_name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/externaleventsourcedastatsresult.py b/facebook_business/adobjects/externaleventsourcedastatsresult.py new file mode 100644 index 000000000..2b8b71b2e --- /dev/null +++ b/facebook_business/adobjects/externaleventsourcedastatsresult.py @@ -0,0 +1,47 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ExternalEventSourceDAStatsResult( + AbstractObject, +): + + def __init__(self, api=None): + super(ExternalEventSourceDAStatsResult, self).__init__() + self._isExternalEventSourceDAStatsResult = True + self._api = api + + class Field(AbstractObject.Field): + count_content_ids = 'count_content_ids' + count_content_ids_match_any_catalog = 'count_content_ids_match_any_catalog' + count_fires = 'count_fires' + count_fires_match_any_catalog = 'count_fires_match_any_catalog' + date = 'date' + percentage_missed_users = 'percentage_missed_users' + + _field_types = { + 'count_content_ids': 'unsigned int', + 'count_content_ids_match_any_catalog': 'unsigned int', + 'count_fires': 'unsigned int', + 'count_fires_match_any_catalog': 'unsigned int', + 'date': 'string', + 'percentage_missed_users': 'float', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/externalmerchantsettings.py b/facebook_business/adobjects/externalmerchantsettings.py new file mode 100644 index 000000000..4d8b4e2f4 --- /dev/null +++ b/facebook_business/adobjects/externalmerchantsettings.py @@ -0,0 +1,74 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ExternalMerchantSettings( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isExternalMerchantSettings = True + super(ExternalMerchantSettings, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + connect_woo = 'connect_woo' + external_platform = 'external_platform' + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ExternalMerchantSettings, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'connect_woo': 'string', + 'external_platform': 'string', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/fameexportconfig.py b/facebook_business/adobjects/fameexportconfig.py deleted file mode 100644 index a16537be9..000000000 --- a/facebook_business/adobjects/fameexportconfig.py +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 2014 Facebook, Inc. - -# 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. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -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 FAMEExportConfig( - AbstractObject, -): - - def __init__(self, api=None): - super(FAMEExportConfig, self).__init__() - self._isFAMEExportConfig = True - self._api = api - - class Field(AbstractObject.Field): - can_edit = 'can_edit' - column_id = 'column_id' - display_name = 'display_name' - format = 'format' - - _field_types = { - 'can_edit': 'bool', - 'column_id': 'string', - 'display_name': 'string', - 'format': 'string', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/facebook_business/adobjects/famekumo.py b/facebook_business/adobjects/famekumo.py new file mode 100644 index 000000000..84c3d16d5 --- /dev/null +++ b/facebook_business/adobjects/famekumo.py @@ -0,0 +1,70 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 FAMEKumo( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isFAMEKumo = True + super(FAMEKumo, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=FAMEKumo, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/fantasygame.py b/facebook_business/adobjects/fantasygame.py new file mode 100644 index 000000000..9ea78e9fd --- /dev/null +++ b/facebook_business/adobjects/fantasygame.py @@ -0,0 +1,72 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 FantasyGame( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isFantasyGame = True + super(FantasyGame, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + name = 'name' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=FantasyGame, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/favoritecatalog.py b/facebook_business/adobjects/favoritecatalog.py new file mode 100644 index 000000000..309b83161 --- /dev/null +++ b/facebook_business/adobjects/favoritecatalog.py @@ -0,0 +1,72 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 FavoriteCatalog( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isFavoriteCatalog = True + super(FavoriteCatalog, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + catalog = 'catalog' + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=FavoriteCatalog, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'catalog': 'ProductCatalog', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/fbimagecopyrightmatch.py b/facebook_business/adobjects/fbimagecopyrightmatch.py new file mode 100644 index 000000000..c6d6744c5 --- /dev/null +++ b/facebook_business/adobjects/fbimagecopyrightmatch.py @@ -0,0 +1,94 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 FBImageCopyrightMatch( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isFBImageCopyrightMatch = True + super(FBImageCopyrightMatch, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + added_to_dashboard_time = 'added_to_dashboard_time' + applied_actions = 'applied_actions' + audit_log = 'audit_log' + available_ui_actions = 'available_ui_actions' + expiration_days = 'expiration_days' + id = 'id' + is_business_page_match = 'is_business_page_match' + last_modified_time = 'last_modified_time' + match_data = 'match_data' + match_status = 'match_status' + ownership_countries = 'ownership_countries' + reference_owner = 'reference_owner' + time_to_appeal = 'time_to_appeal' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=FBImageCopyrightMatch, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'added_to_dashboard_time': 'datetime', + 'applied_actions': 'list>', + 'audit_log': 'list', + 'available_ui_actions': 'list', + 'expiration_days': 'int', + 'id': 'string', + 'is_business_page_match': 'bool', + 'last_modified_time': 'datetime', + 'match_data': 'list', + 'match_status': 'string', + 'ownership_countries': 'VideoCopyrightGeoGate', + 'reference_owner': 'Profile', + 'time_to_appeal': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/fblitetonttransitions.py b/facebook_business/adobjects/fblitetonttransitions.py new file mode 100644 index 000000000..759073b72 --- /dev/null +++ b/facebook_business/adobjects/fblitetonttransitions.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 FBLiteToNTTransitions( + AbstractObject, +): + + def __init__(self, api=None): + super(FBLiteToNTTransitions, self).__init__() + self._isFBLiteToNTTransitions = True + self._api = api + + class Field(AbstractObject.Field): + transition = 'transition' + + _field_types = { + 'transition': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/fbpageandinstagramaccount.py b/facebook_business/adobjects/fbpageandinstagramaccount.py new file mode 100644 index 000000000..79ccc57ec --- /dev/null +++ b/facebook_business/adobjects/fbpageandinstagramaccount.py @@ -0,0 +1,45 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 FBPageAndInstagramAccount( + AbstractObject, +): + + def __init__(self, api=None): + super(FBPageAndInstagramAccount, self).__init__() + self._isFBPageAndInstagramAccount = True + self._api = api + + class Field(AbstractObject.Field): + ad_permissions = 'ad_permissions' + bc_permission_status = 'bc_permission_status' + bc_permissions = 'bc_permissions' + is_managed = 'is_managed' + matched_by = 'matched_by' + + _field_types = { + 'ad_permissions': 'list', + 'bc_permission_status': 'string', + 'bc_permissions': 'list>', + 'is_managed': 'bool', + 'matched_by': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/fbpaybuttonlogin.py b/facebook_business/adobjects/fbpaybuttonlogin.py new file mode 100644 index 000000000..434e6f186 --- /dev/null +++ b/facebook_business/adobjects/fbpaybuttonlogin.py @@ -0,0 +1,36 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 FBPayButtonLogin( + AbstractObject, +): + + def __init__(self, api=None): + super(FBPayButtonLogin, self).__init__() + self._isFBPayButtonLogin = True + self._api = api + + class Field(AbstractObject.Field): + pass + + _field_types = { + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/financeobject.py b/facebook_business/adobjects/financeobject.py new file mode 100644 index 000000000..49821d4a5 --- /dev/null +++ b/facebook_business/adobjects/financeobject.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 FinanceObject( + AbstractObject, +): + + def __init__(self, api=None): + super(FinanceObject, self).__init__() + self._isFinanceObject = True + self._api = api + + class Field(AbstractObject.Field): + finance_permission = 'finance_permission' + user = 'user' + + _field_types = { + 'finance_permission': 'string', + 'user': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/flexibletargeting.py b/facebook_business/adobjects/flexibletargeting.py index f5a51fe8a..89cb6801c 100644 --- a/facebook_business/adobjects/flexibletargeting.py +++ b/facebook_business/adobjects/flexibletargeting.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/flight.py b/facebook_business/adobjects/flight.py index b55c5f06c..209d11a8c 100644 --- a/facebook_business/adobjects/flight.py +++ b/facebook_business/adobjects/flight.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -57,6 +43,7 @@ class Field(AbstractObject.Field): origin_city = 'origin_city' price = 'price' sanitized_images = 'sanitized_images' + tags = 'tags' unit_price = 'unit_price' url = 'url' visibility = 'visibility' @@ -146,6 +133,7 @@ def get_augmented_realities_metadata(self, fields=None, params=None, batch=None, from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.dynamicarmetadata import DynamicARMetadata param_types = { } enums = { @@ -156,9 +144,9 @@ def get_augmented_realities_metadata(self, fields=None, params=None, batch=None, endpoint='/augmented_realities_metadata', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=DynamicARMetadata, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=DynamicARMetadata, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -207,6 +195,7 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.dynamicvideometadata import DynamicVideoMetadata param_types = { } enums = { @@ -217,9 +206,9 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None endpoint='/videos_metadata', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=DynamicVideoMetadata, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=DynamicVideoMetadata, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -250,6 +239,7 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None 'origin_city': 'string', 'price': 'string', 'sanitized_images': 'list', + 'tags': 'list', 'unit_price': 'Object', 'url': 'string', 'visibility': 'Visibility', diff --git a/facebook_business/adobjects/franchiseprogram.py b/facebook_business/adobjects/franchiseprogram.py new file mode 100644 index 000000000..cd650e811 --- /dev/null +++ b/facebook_business/adobjects/franchiseprogram.py @@ -0,0 +1,92 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 FranchiseProgram( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isFranchiseProgram = True + super(FranchiseProgram, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + business_asset_group = 'business_asset_group' + creator_business = 'creator_business' + description = 'description' + end_date = 'end_date' + id = 'id' + name = 'name' + program_access_type = 'program_access_type' + program_approval_type = 'program_approval_type' + program_image_link = 'program_image_link' + program_url = 'program_url' + shared_custom_audience = 'shared_custom_audience' + start_date = 'start_date' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=FranchiseProgram, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'business_asset_group': 'BusinessAssetGroup', + 'creator_business': 'Business', + 'description': 'string', + 'end_date': 'datetime', + 'id': 'string', + 'name': 'string', + 'program_access_type': 'string', + 'program_approval_type': 'string', + 'program_image_link': 'string', + 'program_url': 'string', + 'shared_custom_audience': 'CustomAudience', + 'start_date': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/franchiseprogrammember.py b/facebook_business/adobjects/franchiseprogrammember.py new file mode 100644 index 000000000..a227ae3bc --- /dev/null +++ b/facebook_business/adobjects/franchiseprogrammember.py @@ -0,0 +1,84 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 FranchiseProgramMember( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isFranchiseProgramMember = True + super(FranchiseProgramMember, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + business = 'business' + end_date = 'end_date' + id = 'id' + join_date = 'join_date' + member_ad_account = 'member_ad_account' + member_user = 'member_user' + membership_status = 'membership_status' + page = 'page' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=FranchiseProgramMember, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'business': 'Business', + 'end_date': 'datetime', + 'id': 'string', + 'join_date': 'datetime', + 'member_ad_account': 'AdAccount', + 'member_user': 'User', + 'membership_status': 'string', + 'page': 'Page', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/fundingsourcedetails.py b/facebook_business/adobjects/fundingsourcedetails.py index 219444d3d..8509f023f 100644 --- a/facebook_business/adobjects/fundingsourcedetails.py +++ b/facebook_business/adobjects/fundingsourcedetails.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -42,12 +28,14 @@ def __init__(self, fbid=None, parent_id=None, api=None): class Field(AbstractObject.Field): coupon = 'coupon' + coupons = 'coupons' display_string = 'display_string' id = 'id' type = 'type' _field_types = { 'coupon': 'FundingSourceDetailsCoupon', + 'coupons': 'list', 'display_string': 'string', 'id': 'string', 'type': 'int', diff --git a/facebook_business/adobjects/fundingsourcedetailscoupon.py b/facebook_business/adobjects/fundingsourcedetailscoupon.py index 5dac1bafb..fc189268b 100644 --- a/facebook_business/adobjects/fundingsourcedetailscoupon.py +++ b/facebook_business/adobjects/fundingsourcedetailscoupon.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject @@ -39,12 +25,14 @@ def __init__(self, api=None): class Field(AbstractObject.Field): amount = 'amount' + campaign_ids = 'campaign_ids' currency = 'currency' display_amount = 'display_amount' expiration = 'expiration' _field_types = { 'amount': 'int', + 'campaign_ids': 'list', 'currency': 'string', 'display_amount': 'string', 'expiration': 'datetime', diff --git a/facebook_business/adobjects/fundraiserpersontocharity.py b/facebook_business/adobjects/fundraiserpersontocharity.py index 368d65c88..5c56fde78 100644 --- a/facebook_business/adobjects/fundraiserpersontocharity.py +++ b/facebook_business/adobjects/fundraiserpersontocharity.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/genericvideoasset.py b/facebook_business/adobjects/genericvideoasset.py new file mode 100644 index 000000000..1edf50bd4 --- /dev/null +++ b/facebook_business/adobjects/genericvideoasset.py @@ -0,0 +1,130 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 GenericVideoAsset( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isGenericVideoAsset = True + super(GenericVideoAsset, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + broadcast_id = 'broadcast_id' + broadcast_planned_start_time = 'broadcast_planned_start_time' + can_viewer_edit = 'can_viewer_edit' + copyright_monitoring_status = 'copyright_monitoring_status' + created_time = 'created_time' + creator = 'creator' + description = 'description' + download_hd_url = 'download_hd_url' + download_sd_url = 'download_sd_url' + embeddable = 'embeddable' + expiration = 'expiration' + feed_type = 'feed_type' + id = 'id' + is_crossposting_eligible = 'is_crossposting_eligible' + is_crossposting_within_bm_eligible = 'is_crossposting_within_bm_eligible' + is_crossposting_within_bm_enabled = 'is_crossposting_within_bm_enabled' + is_episode = 'is_episode' + is_featured = 'is_featured' + is_live_premiere = 'is_live_premiere' + is_video_asset = 'is_video_asset' + last_added_time = 'last_added_time' + latest_creator = 'latest_creator' + latest_owned_description = 'latest_owned_description' + latest_owned_title = 'latest_owned_title' + length = 'length' + live_status = 'live_status' + no_story = 'no_story' + owner_name = 'owner_name' + owner_picture = 'owner_picture' + owner_post_state = 'owner_post_state' + permalink_url = 'permalink_url' + picture = 'picture' + posts_count = 'posts_count' + posts_ids = 'posts_ids' + posts_status = 'posts_status' + premiere_living_room_status = 'premiere_living_room_status' + published = 'published' + scheduled_publish_time = 'scheduled_publish_time' + secret = 'secret' + secure_stream_url = 'secure_stream_url' + social_actions = 'social_actions' + status = 'status' + stream_url = 'stream_url' + thumbnail_while_encoding = 'thumbnail_while_encoding' + title = 'title' + views = 'views' + + _field_types = { + 'broadcast_id': 'string', + 'broadcast_planned_start_time': 'datetime', + 'can_viewer_edit': 'bool', + 'copyright_monitoring_status': 'string', + 'created_time': 'datetime', + 'creator': 'User', + 'description': 'string', + 'download_hd_url': 'string', + 'download_sd_url': 'string', + 'embeddable': 'bool', + 'expiration': 'Object', + 'feed_type': 'string', + 'id': 'string', + 'is_crossposting_eligible': 'bool', + 'is_crossposting_within_bm_eligible': 'bool', + 'is_crossposting_within_bm_enabled': 'bool', + 'is_episode': 'bool', + 'is_featured': 'bool', + 'is_live_premiere': 'bool', + 'is_video_asset': 'bool', + 'last_added_time': 'datetime', + 'latest_creator': 'User', + 'latest_owned_description': 'string', + 'latest_owned_title': 'string', + 'length': 'float', + 'live_status': 'string', + 'no_story': 'bool', + 'owner_name': 'string', + 'owner_picture': 'string', + 'owner_post_state': 'string', + 'permalink_url': 'string', + 'picture': 'string', + 'posts_count': 'unsigned int', + 'posts_ids': 'list', + 'posts_status': 'Object', + 'premiere_living_room_status': 'string', + 'published': 'bool', + 'scheduled_publish_time': 'datetime', + 'secret': 'bool', + 'secure_stream_url': 'string', + 'social_actions': 'bool', + 'status': 'VideoStatus', + 'stream_url': 'string', + 'thumbnail_while_encoding': 'string', + 'title': 'string', + 'views': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/geogatingpolicy.py b/facebook_business/adobjects/geogatingpolicy.py new file mode 100644 index 000000000..e4f7556c4 --- /dev/null +++ b/facebook_business/adobjects/geogatingpolicy.py @@ -0,0 +1,82 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 GeoGatingPolicy( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isGeoGatingPolicy = True + super(GeoGatingPolicy, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + after_schedule = 'after_schedule' + exclude_country = 'exclude_country' + id = 'id' + include_country = 'include_country' + name = 'name' + valid_from = 'valid_from' + valid_until = 'valid_until' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=GeoGatingPolicy, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'after_schedule': 'string', + 'exclude_country': 'list', + 'id': 'string', + 'include_country': 'list', + 'name': 'string', + 'valid_from': 'datetime', + 'valid_until': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/group.py b/facebook_business/adobjects/group.py index 1b3de2dc0..f0a5d390e 100644 --- a/facebook_business/adobjects/group.py +++ b/facebook_business/adobjects/group.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -67,9 +53,9 @@ class JoinSetting: none = 'NONE' class PostPermissions: - value_0 = '0' - value_1 = '1' - value_2 = '2' + admin_only = 'ADMIN_ONLY' + anyone = 'ANYONE' + none = 'NONE' class Purpose: casual = 'CASUAL' @@ -217,7 +203,7 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure self.assure_call() return request.execute() - def delete_admins(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def delete_ad_m_ins(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -248,7 +234,7 @@ def delete_admins(self, fields=None, params=None, batch=None, success=None, fail self.assure_call() return request.execute() - def create_admin(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def create_ad_m_in(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -325,6 +311,7 @@ def create_album(self, fields=None, params=None, batch=None, success=None, failu 'name': 'string', 'place': 'Object', 'privacy': 'string', + 'session_id': 'string', 'tags': 'list', 'visible': 'string', } @@ -352,67 +339,6 @@ def create_album(self, fields=None, params=None, batch=None, success=None, failu self.assure_call() return request.execute() - def get_attachment_surfaces(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/attachment_surfaces', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, - api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - - def create_attachment_surface(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'title': 'map', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/attachment_surfaces', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, - api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - def get_docs(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -518,7 +444,6 @@ def create_feed(self, fields=None, params=None, batch=None, success=None, failur from facebook_business.adobjects.post import Post param_types = { 'actions': 'Object', - 'adaptive_type': 'string', 'album_id': 'string', 'android_key_hash': 'string', 'animated_effect_id': 'unsigned int', @@ -531,9 +456,10 @@ def create_feed(self, fields=None, params=None, batch=None, success=None, failur 'audience_exp': 'bool', 'backdated_time': 'datetime', 'backdated_time_granularity': 'backdated_time_granularity_enum', + 'breaking_news': 'bool', + 'breaking_news_expiration': 'unsigned int', 'call_to_action': 'Object', 'caption': 'string', - 'checkin_entry_point': 'checkin_entry_point_enum', 'child_attachments': 'list', 'client_mutation_id': 'string', 'composer_entry_picker': 'string', @@ -556,7 +482,6 @@ def create_feed(self, fields=None, params=None, batch=None, success=None, failur 'formatting': 'formatting_enum', 'fun_fact_prompt_id': 'unsigned int', 'fun_fact_toastee_id': 'unsigned int', - 'has_nickname': 'bool', 'height': 'unsigned int', 'holiday_card': 'string', 'home_checkin_city_id': 'Object', @@ -603,7 +528,6 @@ def create_feed(self, fields=None, params=None, batch=None, success=None, failur 'publish_event_id': 'unsigned int', 'published': 'bool', 'quote': 'string', - 'react_mode_metadata': 'string', 'ref': 'list', 'referenceable_image_ids': 'list', 'referral_id': 'string', @@ -631,7 +555,6 @@ def create_feed(self, fields=None, params=None, batch=None, success=None, failur } enums = { 'backdated_time_granularity_enum': Post.BackdatedTimeGranularity.__dict__.values(), - 'checkin_entry_point_enum': Post.CheckinEntryPoint.__dict__.values(), 'formatting_enum': Post.Formatting.__dict__.values(), 'place_attachment_setting_enum': Post.PlaceAttachmentSetting.__dict__.values(), 'post_surfaces_blacklist_enum': Post.PostSurfacesBlacklist.__dict__.values(), @@ -728,11 +651,11 @@ def create_group(self, fields=None, params=None, batch=None, success=None, failu param_types = { 'admin': 'int', 'description': 'string', - 'group_icon_id': 'Object', + 'group_icon_id': 'string', 'group_type': 'group_type_enum', 'join_setting': 'join_setting_enum', 'name': 'string', - 'parent_id': 'Object', + 'parent_id': 'string', 'post_permissions': 'post_permissions_enum', 'post_requires_admin_approval': 'bool', 'privacy': 'string', @@ -998,7 +921,6 @@ def create_photo(self, fields=None, params=None, batch=None, success=None, failu 'proxied_app_id': 'string', 'published': 'bool', 'qn': 'string', - 'scheduled_publish_time': 'unsigned int', 'spherical_metadata': 'map', 'sponsor_id': 'string', 'sponsor_relationship': 'unsigned int', @@ -1044,14 +966,12 @@ def get_picture(self, fields=None, params=None, batch=None, success=None, failur api_utils.warning('`success` and `failure` callback only work for batch call.') from facebook_business.adobjects.profilepicturesource import ProfilePictureSource param_types = { - 'breaking_change': 'breaking_change_enum', 'height': 'int', 'redirect': 'bool', 'type': 'type_enum', 'width': 'int', } enums = { - 'breaking_change_enum': ProfilePictureSource.BreakingChange.__dict__.values(), 'type_enum': ProfilePictureSource.Type.__dict__.values(), } request = FacebookRequest( @@ -1115,7 +1035,6 @@ def create_video(self, fields=None, params=None, batch=None, success=None, failu api_utils.warning('`success` and `failure` callback only work for batch call.') from facebook_business.adobjects.advideo import AdVideo param_types = { - 'adaptive_type': 'string', 'animated_effect_id': 'unsigned int', 'application_id': 'string', 'asked_fun_fact_prompt_id': 'unsigned int', @@ -1144,7 +1063,6 @@ def create_video(self, fields=None, params=None, batch=None, success=None, failu 'fun_fact_toastee_id': 'unsigned int', 'guide': 'list>', 'guide_enabled': 'bool', - 'has_nickname': 'bool', 'holiday_card': 'string', 'initial_heading': 'unsigned int', 'initial_pitch': 'unsigned int', @@ -1165,7 +1083,6 @@ def create_video(self, fields=None, params=None, batch=None, success=None, failu 'original_projection_type': 'original_projection_type_enum', 'publish_event_id': 'unsigned int', 'published': 'bool', - 'react_mode_metadata': 'string', 'referenced_sticker_id': 'string', 'replace_video_id': 'string', 'scheduled_publish_time': 'unsigned int', diff --git a/facebook_business/adobjects/hasleadaccess.py b/facebook_business/adobjects/hasleadaccess.py new file mode 100644 index 000000000..5d8a6c4db --- /dev/null +++ b/facebook_business/adobjects/hasleadaccess.py @@ -0,0 +1,53 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 HasLeadAccess( + AbstractObject, +): + + def __init__(self, api=None): + super(HasLeadAccess, self).__init__() + self._isHasLeadAccess = True + self._api = api + + class Field(AbstractObject.Field): + app_has_leads_permission = 'app_has_leads_permission' + can_access_lead = 'can_access_lead' + enabled_lead_access_manager = 'enabled_lead_access_manager' + failure_reason = 'failure_reason' + failure_resolution = 'failure_resolution' + is_page_admin = 'is_page_admin' + page_id = 'page_id' + user_has_leads_permission = 'user_has_leads_permission' + user_id = 'user_id' + + _field_types = { + 'app_has_leads_permission': 'bool', + 'can_access_lead': 'bool', + 'enabled_lead_access_manager': 'bool', + 'failure_reason': 'string', + 'failure_resolution': 'string', + 'is_page_admin': 'bool', + 'page_id': 'string', + 'user_has_leads_permission': 'bool', + 'user_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/helpers/__init__.py b/facebook_business/adobjects/helpers/__init__.py index dfc80ec50..e69de29bb 100644 --- a/facebook_business/adobjects/helpers/__init__.py +++ b/facebook_business/adobjects/helpers/__init__.py @@ -1,19 +0,0 @@ -# Copyright 2014 Facebook, Inc. - -# 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. diff --git a/facebook_business/adobjects/helpers/adaccountmixin.py b/facebook_business/adobjects/helpers/adaccountmixin.py index 758d83ddd..f89146524 100644 --- a/facebook_business/adobjects/helpers/adaccountmixin.py +++ b/facebook_business/adobjects/helpers/adaccountmixin.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects import agencyclientdeclaration @@ -54,9 +40,7 @@ def get_my_account(cls, api=None): me = AdAccountUser(fbid='me', api=api) # Get first account connected to the user - my_account = me.edge_object(cls) - - return my_account + return me.edge_object(cls) def opt_out_user_from_targeting(self, schema, diff --git a/facebook_business/adobjects/helpers/adaccountusermixin.py b/facebook_business/adobjects/helpers/adaccountusermixin.py index 88de4feb3..6021ded85 100644 --- a/facebook_business/adobjects/helpers/adaccountusermixin.py +++ b/facebook_business/adobjects/helpers/adaccountusermixin.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.adaccount import AdAccount from facebook_business.adobjects.page import Page diff --git a/facebook_business/adobjects/helpers/adimagemixin.py b/facebook_business/adobjects/helpers/adimagemixin.py index 264b65942..64fcf7de9 100644 --- a/facebook_business/adobjects/helpers/adimagemixin.py +++ b/facebook_business/adobjects/helpers/adimagemixin.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.adaccount import AdAccount from facebook_business.api import FacebookAdsApi @@ -27,14 +13,12 @@ class AdImageMixin: @classmethod def remote_create_from_zip(cls, filename, parent_id, api=None): api = api or FacebookAdsApi.get_default_api() - open_file = open(filename, 'rb') - response = api.call( - 'POST', - (parent_id, cls.get_endpoint()), - files={filename: open_file}, - ) - open_file.close() - + with open(filename, 'rb') as open_file: + response = api.call( + 'POST', + (parent_id, cls.get_endpoint()), + files={filename: open_file}, + ) data = response.json() objs = [] @@ -87,23 +71,23 @@ def _set_data(self, data): } """ - if 'images' in data: - _, data = data['images'].popitem() + if 'images' not in data: + return AbstractCrudObject._set_data(self, data) - for key in map(str, data): - self._data[key] = data[key] + _, data = data['images'].popitem() - # clear history due to the update - self._changes.pop(key, None) + for key in map(str, data): + self._data[key] = data[key] - self._data[self.Field.id] = '%s:%s' % ( - self.get_parent_id_assured()[4:], - self[self.Field.hash], - ) + # clear history due to the update + self._changes.pop(key, None) - return self - else: - return AbstractCrudObject._set_data(self, data) + self._data[self.Field.id] = '%s:%s' % ( + self.get_parent_id_assured()[4:], + self[self.Field.hash], + ) + + return self def remote_create( self, diff --git a/facebook_business/adobjects/helpers/adpreviewmixin.py b/facebook_business/adobjects/helpers/adpreviewmixin.py index a22148352..b292d1f74 100644 --- a/facebook_business/adobjects/helpers/adpreviewmixin.py +++ b/facebook_business/adobjects/helpers/adpreviewmixin.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. class AdPreviewMixin: def get_html(self): diff --git a/facebook_business/adobjects/helpers/adreportrunmixin.py b/facebook_business/adobjects/helpers/adreportrunmixin.py index 55e3071b9..c9a70abb8 100644 --- a/facebook_business/adobjects/helpers/adreportrunmixin.py +++ b/facebook_business/adobjects/helpers/adreportrunmixin.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. class AdReportRunMixin: diff --git a/facebook_business/adobjects/helpers/adsinsightsmixin.py b/facebook_business/adobjects/helpers/adsinsightsmixin.py index edd5e48ed..2eab92301 100644 --- a/facebook_business/adobjects/helpers/adsinsightsmixin.py +++ b/facebook_business/adobjects/helpers/adsinsightsmixin.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. class AdsInsightsMixin: diff --git a/facebook_business/adobjects/helpers/businessmixin.py b/facebook_business/adobjects/helpers/businessmixin.py index dc5abd154..bd2bc9370 100644 --- a/facebook_business/adobjects/helpers/businessmixin.py +++ b/facebook_business/adobjects/helpers/businessmixin.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.adsinsights import AdsInsights diff --git a/facebook_business/adobjects/helpers/customaudiencemixin.py b/facebook_business/adobjects/helpers/customaudiencemixin.py index 28f927502..b34946bc8 100644 --- a/facebook_business/adobjects/helpers/customaudiencemixin.py +++ b/facebook_business/adobjects/helpers/customaudiencemixin.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.exceptions import FacebookBadObjectError diff --git a/facebook_business/adobjects/helpers/productcatalogmixin.py b/facebook_business/adobjects/helpers/productcatalogmixin.py index 058a430d4..77f7f584c 100644 --- a/facebook_business/adobjects/helpers/productcatalogmixin.py +++ b/facebook_business/adobjects/helpers/productcatalogmixin.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. import base64 from facebook_business.api import FacebookAdsApi diff --git a/facebook_business/adobjects/helpers/reachfrequencypredictionmixin.py b/facebook_business/adobjects/helpers/reachfrequencypredictionmixin.py index 8b98b7db9..b73c0f89b 100644 --- a/facebook_business/adobjects/helpers/reachfrequencypredictionmixin.py +++ b/facebook_business/adobjects/helpers/reachfrequencypredictionmixin.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. class ReachFrequencyPredictionMixin: def reserve( @@ -35,7 +21,7 @@ def reserve( self.Field.action: self.Action.reserve, } # Filter out None values. - params = dict((k, v) for k, v in params.items() if v is not None) + params = {k: v for k, v in params.items() if v is not None} response = self.get_api_assured().call( 'POST', diff --git a/facebook_business/adobjects/highdemandperiod.py b/facebook_business/adobjects/highdemandperiod.py new file mode 100644 index 000000000..e4c4e8f76 --- /dev/null +++ b/facebook_business/adobjects/highdemandperiod.py @@ -0,0 +1,154 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 HighDemandPeriod( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isHighDemandPeriod = True + super(HighDemandPeriod, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_object_id = 'ad_object_id' + budget_value = 'budget_value' + budget_value_type = 'budget_value_type' + id = 'id' + recurrence_type = 'recurrence_type' + time_end = 'time_end' + time_start = 'time_start' + weekly_schedule = 'weekly_schedule' + + class BudgetValueType: + absolute = 'ABSOLUTE' + multiplier = 'MULTIPLIER' + + def api_delete(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=HighDemandPeriod, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def api_update(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'budget_value': 'unsigned int', + 'budget_value_type': 'budget_value_type_enum', + 'time_end': 'unsigned int', + 'time_start': 'unsigned int', + } + enums = { + 'budget_value_type_enum': HighDemandPeriod.BudgetValueType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=HighDemandPeriod, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'ad_object_id': 'string', + 'budget_value': 'int', + 'budget_value_type': 'string', + 'id': 'string', + 'recurrence_type': 'string', + 'time_end': 'datetime', + 'time_start': 'datetime', + 'weekly_schedule': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['BudgetValueType'] = HighDemandPeriod.BudgetValueType.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/highdemandperiodtimesuggestionweeklysegment.py b/facebook_business/adobjects/highdemandperiodtimesuggestionweeklysegment.py new file mode 100644 index 000000000..369b1dc48 --- /dev/null +++ b/facebook_business/adobjects/highdemandperiodtimesuggestionweeklysegment.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 HighDemandPeriodTimeSuggestionWeeklySegment( + AbstractObject, +): + + def __init__(self, api=None): + super(HighDemandPeriodTimeSuggestionWeeklySegment, self).__init__() + self._isHighDemandPeriodTimeSuggestionWeeklySegment = True + self._api = api + + class Field(AbstractObject.Field): + days = 'days' + end_minute = 'end_minute' + start_minute = 'start_minute' + timezone_type = 'timezone_type' + + _field_types = { + 'days': 'list', + 'end_minute': 'int', + 'start_minute': 'int', + 'timezone_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/homelisting.py b/facebook_business/adobjects/homelisting.py index 8e80e062d..43c051899 100644 --- a/facebook_business/adobjects/homelisting.py +++ b/facebook_business/adobjects/homelisting.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -218,6 +204,7 @@ def get_augmented_realities_metadata(self, fields=None, params=None, batch=None, from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.dynamicarmetadata import DynamicARMetadata param_types = { } enums = { @@ -228,9 +215,9 @@ def get_augmented_realities_metadata(self, fields=None, params=None, batch=None, endpoint='/augmented_realities_metadata', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=DynamicARMetadata, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=DynamicARMetadata, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -279,6 +266,7 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.dynamicvideometadata import DynamicVideoMetadata param_types = { } enums = { @@ -289,9 +277,9 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None endpoint='/videos_metadata', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=DynamicVideoMetadata, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=DynamicVideoMetadata, api=self._api), ) request.add_params(params) request.add_fields(fields) diff --git a/facebook_business/adobjects/hotel.py b/facebook_business/adobjects/hotel.py index 941697395..880888d46 100644 --- a/facebook_business/adobjects/hotel.py +++ b/facebook_business/adobjects/hotel.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -61,6 +47,7 @@ class Field(AbstractObject.Field): sale_price = 'sale_price' sanitized_images = 'sanitized_images' star_rating = 'star_rating' + tags = 'tags' unit_price = 'unit_price' url = 'url' visibility = 'visibility' @@ -194,6 +181,7 @@ def get_augmented_realities_metadata(self, fields=None, params=None, batch=None, from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.dynamicarmetadata import DynamicARMetadata param_types = { } enums = { @@ -204,9 +192,9 @@ def get_augmented_realities_metadata(self, fields=None, params=None, batch=None, endpoint='/augmented_realities_metadata', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=DynamicARMetadata, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=DynamicARMetadata, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -286,6 +274,7 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.dynamicvideometadata import DynamicVideoMetadata param_types = { } enums = { @@ -296,9 +285,9 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None endpoint='/videos_metadata', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=DynamicVideoMetadata, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=DynamicVideoMetadata, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -333,6 +322,7 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None 'sale_price': 'string', 'sanitized_images': 'list', 'star_rating': 'float', + 'tags': 'list', 'unit_price': 'Object', 'url': 'string', 'visibility': 'Visibility', diff --git a/facebook_business/adobjects/hotelroom.py b/facebook_business/adobjects/hotelroom.py index 26aeedcea..976e6277e 100644 --- a/facebook_business/adobjects/hotelroom.py +++ b/facebook_business/adobjects/hotelroom.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/hours.py b/facebook_business/adobjects/hours.py new file mode 100644 index 000000000..6aafd1ed0 --- /dev/null +++ b/facebook_business/adobjects/hours.py @@ -0,0 +1,72 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 Hours( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isHours = True + super(Hours, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + permanent_status = 'permanent_status' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Hours, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'permanent_status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/idname.py b/facebook_business/adobjects/idname.py index d20366f68..050ec096c 100644 --- a/facebook_business/adobjects/idname.py +++ b/facebook_business/adobjects/idname.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/igaccesstokenforigonlyapi.py b/facebook_business/adobjects/igaccesstokenforigonlyapi.py new file mode 100644 index 000000000..ee7674958 --- /dev/null +++ b/facebook_business/adobjects/igaccesstokenforigonlyapi.py @@ -0,0 +1,79 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 IGAccessTokenForIGOnlyAPI( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isIGAccessTokenForIGOnlyAPI = True + super(IGAccessTokenForIGOnlyAPI, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + access_token = 'access_token' + expires_in = 'expires_in' + token_type = 'token_type' + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'access_token': 'string', + 'client_secret': 'string', + 'grant_type': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGAccessTokenForIGOnlyAPI, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'access_token': 'string', + 'expires_in': 'int', + 'token_type': 'string', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/igbcadspermission.py b/facebook_business/adobjects/igbcadspermission.py index 504bfab21..2a6a50221 100644 --- a/facebook_business/adobjects/igbcadspermission.py +++ b/facebook_business/adobjects/igbcadspermission.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/igboostmediaad.py b/facebook_business/adobjects/igboostmediaad.py new file mode 100644 index 000000000..3b552ec8f --- /dev/null +++ b/facebook_business/adobjects/igboostmediaad.py @@ -0,0 +1,74 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 IGBoostMediaAd( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isIGBoostMediaAd = True + super(IGBoostMediaAd, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_id = 'ad_id' + ad_status = 'ad_status' + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGBoostMediaAd, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'ad_id': 'string', + 'ad_status': 'string', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/igcomment.py b/facebook_business/adobjects/igcomment.py index 2d5083b30..04f46fe30 100644 --- a/facebook_business/adobjects/igcomment.py +++ b/facebook_business/adobjects/igcomment.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -205,7 +191,7 @@ def create_reply(self, fields=None, params=None, batch=None, success=None, failu return request.execute() _field_types = { - 'from': 'Object', + 'from': 'IGCommentFromUser', 'hidden': 'bool', 'id': 'string', 'like_count': 'int', diff --git a/facebook_business/adobjects/igcommentfromuser.py b/facebook_business/adobjects/igcommentfromuser.py new file mode 100644 index 000000000..e6ff45ce6 --- /dev/null +++ b/facebook_business/adobjects/igcommentfromuser.py @@ -0,0 +1,42 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 IGCommentFromUser( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isIGCommentFromUser = True + super(IGCommentFromUser, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + username = 'username' + + _field_types = { + 'id': 'string', + 'username': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/igmedia.py b/facebook_business/adobjects/igmedia.py index 03c47b11e..690b3fa5a 100644 --- a/facebook_business/adobjects/igmedia.py +++ b/facebook_business/adobjects/igmedia.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -41,8 +27,10 @@ def __init__(self, fbid=None, parent_id=None, api=None): super(IGMedia, self).__init__(fbid, parent_id, api) class Field(AbstractObject.Field): + boost_eligibility_info = 'boost_eligibility_info' caption = 'caption' comments_count = 'comments_count' + copyright_check_information = 'copyright_check_information' id = 'id' ig_id = 'ig_id' is_comment_enabled = 'is_comment_enabled' @@ -63,6 +51,10 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') param_types = { + 'primary_fb_page_id': 'string', + 'primary_ig_user_id': 'string', + 'secondary_fb_page_id': 'string', + 'secondary_ig_user_id': 'string', } enums = { } @@ -119,6 +111,101 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure self.assure_call() return request.execute() + def get_boost_ads_list(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.igboostmediaad import IGBoostMediaAd + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/boost_ads_list', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGBoostMediaAd, + api_type='EDGE', + response_parser=ObjectParser(target_class=IGBoostMediaAd, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_branded_content_partner_promote(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.brandedcontentshadowiguserid import BrandedContentShadowIGUserID + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/branded_content_partner_promote', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BrandedContentShadowIGUserID, + api_type='EDGE', + response_parser=ObjectParser(target_class=BrandedContentShadowIGUserID, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_branded_content_partner_promote(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.brandedcontentshadowiguserid import BrandedContentShadowIGUserID + param_types = { + 'permission': 'bool', + 'sponsor_id': 'unsigned int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/branded_content_partner_promote', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BrandedContentShadowIGUserID, + api_type='EDGE', + response_parser=ObjectParser(target_class=BrandedContentShadowIGUserID, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_children(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -149,6 +236,37 @@ def get_children(self, fields=None, params=None, batch=None, success=None, failu self.assure_call() return request.execute() + def get_collaborators(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.shadowigmediacollaborators import ShadowIGMediaCollaborators + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/collaborators', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ShadowIGMediaCollaborators, + api_type='EDGE', + response_parser=ObjectParser(target_class=ShadowIGMediaCollaborators, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_comments(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -349,8 +467,10 @@ def create_product_tag(self, fields=None, params=None, batch=None, success=None, return request.execute() _field_types = { + 'boost_eligibility_info': 'IGMediaBoostEligibilityInfo', 'caption': 'string', 'comments_count': 'int', + 'copyright_check_information': 'IGVideoCopyrightCheckMatchesInformation', 'id': 'string', 'ig_id': 'string', 'is_comment_enabled': 'bool', diff --git a/facebook_business/adobjects/igmediaboosteligibilityinfo.py b/facebook_business/adobjects/igmediaboosteligibilityinfo.py new file mode 100644 index 000000000..04eb7529b --- /dev/null +++ b/facebook_business/adobjects/igmediaboosteligibilityinfo.py @@ -0,0 +1,74 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 IGMediaBoostEligibilityInfo( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isIGMediaBoostEligibilityInfo = True + super(IGMediaBoostEligibilityInfo, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + boost_ineligible_reason = 'boost_ineligible_reason' + eligible_to_boost = 'eligible_to_boost' + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGMediaBoostEligibilityInfo, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'boost_ineligible_reason': 'string', + 'eligible_to_boost': 'bool', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/igmediaforigonlyapi.py b/facebook_business/adobjects/igmediaforigonlyapi.py new file mode 100644 index 000000000..95fb2dc12 --- /dev/null +++ b/facebook_business/adobjects/igmediaforigonlyapi.py @@ -0,0 +1,124 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 IGMediaForIGOnlyAPI( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isIGMediaForIGOnlyAPI = True + super(IGMediaForIGOnlyAPI, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + caption = 'caption' + id = 'id' + is_shared_to_feed = 'is_shared_to_feed' + like_count = 'like_count' + media_product_type = 'media_product_type' + media_type = 'media_type' + media_url = 'media_url' + owner = 'owner' + permalink = 'permalink' + shortcode = 'shortcode' + thumbnail_url = 'thumbnail_url' + timestamp = 'timestamp' + username = 'username' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGMediaForIGOnlyAPI, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_children(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/children', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'caption': 'string', + 'id': 'string', + 'is_shared_to_feed': 'bool', + 'like_count': 'int', + 'media_product_type': 'string', + 'media_type': 'string', + 'media_url': 'string', + 'owner': 'User', + 'permalink': 'string', + 'shortcode': 'string', + 'thumbnail_url': 'string', + 'timestamp': 'datetime', + 'username': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/igproducttagginginvalidationerror.py b/facebook_business/adobjects/igproducttagginginvalidationerror.py new file mode 100644 index 000000000..85df0becf --- /dev/null +++ b/facebook_business/adobjects/igproducttagginginvalidationerror.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 IGProductTaggingInvalidationError( + AbstractObject, +): + + def __init__(self, api=None): + super(IGProductTaggingInvalidationError, self).__init__() + self._isIGProductTaggingInvalidationError = True + self._api = api + + class Field(AbstractObject.Field): + description = 'description' + taggability_state = 'taggability_state' + title = 'title' + + _field_types = { + 'description': 'string', + 'taggability_state': 'string', + 'title': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/igrefreshaccesstokenforigonlyapi.py b/facebook_business/adobjects/igrefreshaccesstokenforigonlyapi.py new file mode 100644 index 000000000..d2620ee7e --- /dev/null +++ b/facebook_business/adobjects/igrefreshaccesstokenforigonlyapi.py @@ -0,0 +1,78 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 IGRefreshAccessTokenForIGOnlyAPI( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isIGRefreshAccessTokenForIGOnlyAPI = True + super(IGRefreshAccessTokenForIGOnlyAPI, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + access_token = 'access_token' + expires_in = 'expires_in' + token_type = 'token_type' + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'access_token': 'string', + 'grant_type': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGRefreshAccessTokenForIGOnlyAPI, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'access_token': 'string', + 'expires_in': 'int', + 'token_type': 'string', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/igresumablevideouploadstatus.py b/facebook_business/adobjects/igresumablevideouploadstatus.py new file mode 100644 index 000000000..2d7f701d1 --- /dev/null +++ b/facebook_business/adobjects/igresumablevideouploadstatus.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 IGResumableVideoUploadStatus( + AbstractObject, +): + + def __init__(self, api=None): + super(IGResumableVideoUploadStatus, self).__init__() + self._isIGResumableVideoUploadStatus = True + self._api = api + + class Field(AbstractObject.Field): + processing_phase = 'processing_phase' + uploading_phase = 'uploading_phase' + + _field_types = { + 'processing_phase': 'VideoStatusProcessingPhase', + 'uploading_phase': 'VideoStatusUploadingPhase', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/igshoppingproductappeal.py b/facebook_business/adobjects/igshoppingproductappeal.py new file mode 100644 index 000000000..12f187837 --- /dev/null +++ b/facebook_business/adobjects/igshoppingproductappeal.py @@ -0,0 +1,45 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 IGShoppingProductAppeal( + AbstractObject, +): + + def __init__(self, api=None): + super(IGShoppingProductAppeal, self).__init__() + self._isIGShoppingProductAppeal = True + self._api = api + + class Field(AbstractObject.Field): + eligible_for_appeal = 'eligible_for_appeal' + product_appeal_status = 'product_appeal_status' + product_id = 'product_id' + rejection_reasons = 'rejection_reasons' + review_status = 'review_status' + + _field_types = { + 'eligible_for_appeal': 'bool', + 'product_appeal_status': 'string', + 'product_id': 'int', + 'rejection_reasons': 'list', + 'review_status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/igshoppingreviewstatus.py b/facebook_business/adobjects/igshoppingreviewstatus.py new file mode 100644 index 000000000..c311e6626 --- /dev/null +++ b/facebook_business/adobjects/igshoppingreviewstatus.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 IGShoppingReviewStatus( + AbstractObject, +): + + def __init__(self, api=None): + super(IGShoppingReviewStatus, self).__init__() + self._isIGShoppingReviewStatus = True + self._api = api + + class Field(AbstractObject.Field): + onsite_eligibility = 'onsite_eligibility' + reasons = 'reasons' + status = 'status' + + _field_types = { + 'onsite_eligibility': 'IGShoppingReviewStatusOnsiteEligibility', + 'reasons': 'list', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/igshoppingreviewstatusonsiteeligibility.py b/facebook_business/adobjects/igshoppingreviewstatusonsiteeligibility.py new file mode 100644 index 000000000..d8acdd625 --- /dev/null +++ b/facebook_business/adobjects/igshoppingreviewstatusonsiteeligibility.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 IGShoppingReviewStatusOnsiteEligibility( + AbstractObject, +): + + def __init__(self, api=None): + super(IGShoppingReviewStatusOnsiteEligibility, self).__init__() + self._isIGShoppingReviewStatusOnsiteEligibility = True + self._api = api + + class Field(AbstractObject.Field): + is_eligible = 'is_eligible' + reasons = 'reasons' + + _field_types = { + 'is_eligible': 'bool', + 'reasons': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/igshoppingreviewstatusreasonwithhelpmessage.py b/facebook_business/adobjects/igshoppingreviewstatusreasonwithhelpmessage.py new file mode 100644 index 000000000..ba780e245 --- /dev/null +++ b/facebook_business/adobjects/igshoppingreviewstatusreasonwithhelpmessage.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 IGShoppingReviewStatusReasonWithHelpMessage( + AbstractObject, +): + + def __init__(self, api=None): + super(IGShoppingReviewStatusReasonWithHelpMessage, self).__init__() + self._isIGShoppingReviewStatusReasonWithHelpMessage = True + self._api = api + + class Field(AbstractObject.Field): + code = 'code' + help_url = 'help_url' + message = 'message' + + _field_types = { + 'code': 'string', + 'help_url': 'string', + 'message': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/igupcomingevent.py b/facebook_business/adobjects/igupcomingevent.py new file mode 100644 index 000000000..c6d332cc8 --- /dev/null +++ b/facebook_business/adobjects/igupcomingevent.py @@ -0,0 +1,109 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 IGUpcomingEvent( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isIGUpcomingEvent = True + super(IGUpcomingEvent, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + end_time = 'end_time' + id = 'id' + start_time = 'start_time' + title = 'title' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGUpcomingEvent, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def api_update(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'end_time': 'datetime', + 'start_time': 'datetime', + 'title': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGUpcomingEvent, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'end_time': 'datetime', + 'id': 'string', + 'start_time': 'datetime', + 'title': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/iguser.py b/facebook_business/adobjects/iguser.py index 1f3e80d01..20cb77997 100644 --- a/facebook_business/adobjects/iguser.py +++ b/facebook_business/adobjects/iguser.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -93,6 +79,7 @@ def get_available_catalogs(self, fields=None, params=None, batch=None, success=N from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.useravailablecatalogs import UserAvailableCatalogs param_types = { } enums = { @@ -103,6 +90,136 @@ def get_available_catalogs(self, fields=None, params=None, batch=None, success=N endpoint='/available_catalogs', api=self._api, param_checker=TypeChecker(param_types, enums), + target_class=UserAvailableCatalogs, + api_type='EDGE', + response_parser=ObjectParser(target_class=UserAvailableCatalogs, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_branded_content_ad_permissions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.igbcadspermission import IGBCAdsPermission + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/branded_content_ad_permissions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGBCAdsPermission, + api_type='EDGE', + response_parser=ObjectParser(target_class=IGBCAdsPermission, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_branded_content_ad_permission(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.igbcadspermission import IGBCAdsPermission + param_types = { + 'creator_instagram_account': 'string', + 'creator_instagram_username': 'string', + 'revoke': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/branded_content_ad_permissions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGBCAdsPermission, + api_type='EDGE', + response_parser=ObjectParser(target_class=IGBCAdsPermission, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_branded_content_advertisable_medias(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.brandedcontentshadowigmediaid import BrandedContentShadowIGMediaID + param_types = { + 'creator_username': 'string', + 'only_fetch_allowlisted': 'bool', + 'permalinks': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/branded_content_advertisable_medias', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BrandedContentShadowIGMediaID, + api_type='EDGE', + response_parser=ObjectParser(target_class=BrandedContentShadowIGMediaID, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def delete_branded_content_tag_approval(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'user_ids': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/branded_content_tag_approval', + api=self._api, + param_checker=TypeChecker(param_types, enums), target_class=AbstractCrudObject, api_type='EDGE', response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), @@ -119,10 +236,75 @@ def get_available_catalogs(self, fields=None, params=None, batch=None, success=N self.assure_call() return request.execute() + def get_branded_content_tag_approval(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.brandedcontentshadowiguserid import BrandedContentShadowIGUserID + param_types = { + 'user_ids': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/branded_content_tag_approval', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BrandedContentShadowIGUserID, + api_type='EDGE', + response_parser=ObjectParser(target_class=BrandedContentShadowIGUserID, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_branded_content_tag_approval(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.brandedcontentshadowiguserid import BrandedContentShadowIGUserID + param_types = { + 'user_ids': 'list', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/branded_content_tag_approval', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=BrandedContentShadowIGUserID, + api_type='EDGE', + response_parser=ObjectParser(target_class=BrandedContentShadowIGUserID, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_catalog_product_search(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.shadowigusercatalogproductsearch import ShadowIGUserCatalogProductSearch param_types = { 'catalog_id': 'string', 'q': 'string', @@ -135,9 +317,9 @@ def get_catalog_product_search(self, fields=None, params=None, batch=None, succe endpoint='/catalog_product_search', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=ShadowIGUserCatalogProductSearch, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=ShadowIGUserCatalogProductSearch, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -155,6 +337,7 @@ def get_content_publishing_limit(self, fields=None, params=None, batch=None, suc from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.contentpublishinglimitresponse import ContentPublishingLimitResponse param_types = { 'since': 'datetime', } @@ -166,9 +349,71 @@ def get_content_publishing_limit(self, fields=None, params=None, batch=None, suc endpoint='/content_publishing_limit', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=ContentPublishingLimitResponse, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=ContentPublishingLimitResponse, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_data_set(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adspixel import AdsPixel + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/dataset', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsPixel, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdsPixel, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_data_set(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adspixel import AdsPixel + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/dataset', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsPixel, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdsPixel, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -303,6 +548,7 @@ def create_media(self, fields=None, params=None, batch=None, success=None, failu 'audio_name': 'string', 'caption': 'string', 'children': 'list', + 'collaborators': 'list', 'cover_url': 'string', 'image_url': 'string', 'is_carousel_item': 'bool', @@ -311,6 +557,7 @@ def create_media(self, fields=None, params=None, batch=None, success=None, failu 'product_tags': 'list', 'share_to_feed': 'bool', 'thumb_offset': 'string', + 'upload_type': 'string', 'user_tags': 'list', 'video_url': 'string', } @@ -438,6 +685,7 @@ def get_product_appeal(self, fields=None, params=None, batch=None, success=None, from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.igshoppingproductappeal import IGShoppingProductAppeal param_types = { 'product_id': 'string', } @@ -449,9 +697,9 @@ def get_product_appeal(self, fields=None, params=None, batch=None, success=None, endpoint='/product_appeal', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=IGShoppingProductAppeal, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=IGShoppingProductAppeal, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -469,6 +717,7 @@ def create_product_appeal(self, fields=None, params=None, batch=None, success=No from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.igshoppingproductappeal import IGShoppingProductAppeal param_types = { 'appeal_reason': 'string', 'product_id': 'string', @@ -481,9 +730,9 @@ def create_product_appeal(self, fields=None, params=None, batch=None, success=No endpoint='/product_appeal', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=IGShoppingProductAppeal, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=IGShoppingProductAppeal, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -501,6 +750,7 @@ def get_recently_searched_hashtags(self, fields=None, params=None, batch=None, s from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.shadowighashtag import ShadowIGHashtag param_types = { } enums = { @@ -511,9 +761,9 @@ def get_recently_searched_hashtags(self, fields=None, params=None, batch=None, s endpoint='/recently_searched_hashtags', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=ShadowIGHashtag, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=ShadowIGHashtag, api=self._api), ) request.add_params(params) request.add_fields(fields) diff --git a/facebook_business/adobjects/iguserforigonlyapi.py b/facebook_business/adobjects/iguserforigonlyapi.py new file mode 100644 index 000000000..60c28fc12 --- /dev/null +++ b/facebook_business/adobjects/iguserforigonlyapi.py @@ -0,0 +1,168 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 IGUserForIGOnlyAPI( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isIGUserForIGOnlyAPI = True + super(IGUserForIGOnlyAPI, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account_type = 'account_type' + id = 'id' + media_count = 'media_count' + username = 'username' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGUserForIGOnlyAPI, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_live_media(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/live_media', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_media(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'since': 'datetime', + 'until': 'datetime', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/media', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_stories(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/stories', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'account_type': 'string', + 'id': 'string', + 'media_count': 'int', + 'username': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/igvideocopyrightcheckmatchesinformation.py b/facebook_business/adobjects/igvideocopyrightcheckmatchesinformation.py new file mode 100644 index 000000000..64c478e06 --- /dev/null +++ b/facebook_business/adobjects/igvideocopyrightcheckmatchesinformation.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 IGVideoCopyrightCheckMatchesInformation( + AbstractObject, +): + + def __init__(self, api=None): + super(IGVideoCopyrightCheckMatchesInformation, self).__init__() + self._isIGVideoCopyrightCheckMatchesInformation = True + self._api = api + + class Field(AbstractObject.Field): + copyright_matches = 'copyright_matches' + status = 'status' + + _field_types = { + 'copyright_matches': 'list', + 'status': 'IGVideoCopyrightCheckStatus', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/igvideocopyrightcheckstatus.py b/facebook_business/adobjects/igvideocopyrightcheckstatus.py new file mode 100644 index 000000000..a40f635f7 --- /dev/null +++ b/facebook_business/adobjects/igvideocopyrightcheckstatus.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 IGVideoCopyrightCheckStatus( + AbstractObject, +): + + def __init__(self, api=None): + super(IGVideoCopyrightCheckStatus, self).__init__() + self._isIGVideoCopyrightCheckStatus = True + self._api = api + + class Field(AbstractObject.Field): + matches_found = 'matches_found' + status = 'status' + + _field_types = { + 'matches_found': 'bool', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/imagecopyright.py b/facebook_business/adobjects/imagecopyright.py index 41de60937..f0399114d 100644 --- a/facebook_business/adobjects/imagecopyright.py +++ b/facebook_business/adobjects/imagecopyright.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/imagecopyrightdispute.py b/facebook_business/adobjects/imagecopyrightdispute.py new file mode 100644 index 000000000..72f9eb750 --- /dev/null +++ b/facebook_business/adobjects/imagecopyrightdispute.py @@ -0,0 +1,86 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ImageCopyrightDispute( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isImageCopyrightDispute = True + super(ImageCopyrightDispute, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + appeal_form_data = 'appeal_form_data' + dispute_form_data = 'dispute_form_data' + expiration_time = 'expiration_time' + id = 'id' + match_id = 'match_id' + status = 'status' + time_appealed = 'time_appealed' + time_created = 'time_created' + time_updated = 'time_updated' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ImageCopyrightDispute, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'appeal_form_data': 'string', + 'dispute_form_data': 'string', + 'expiration_time': 'datetime', + 'id': 'string', + 'match_id': 'string', + 'status': 'string', + 'time_appealed': 'datetime', + 'time_created': 'datetime', + 'time_updated': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/imagereferencematch.py b/facebook_business/adobjects/imagereferencematch.py new file mode 100644 index 000000000..602e17f56 --- /dev/null +++ b/facebook_business/adobjects/imagereferencematch.py @@ -0,0 +1,102 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ImageReferenceMatch( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isImageReferenceMatch = True + super(ImageReferenceMatch, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + conflicting_countries = 'conflicting_countries' + country_resolution_history = 'country_resolution_history' + creation_time = 'creation_time' + current_conflict_resolved_countries = 'current_conflict_resolved_countries' + displayed_match_state = 'displayed_match_state' + dispute_form_data_entries_with_translations = 'dispute_form_data_entries_with_translations' + expiration_time = 'expiration_time' + id = 'id' + match_state = 'match_state' + matched_reference_copyright = 'matched_reference_copyright' + matched_reference_owner = 'matched_reference_owner' + modification_history = 'modification_history' + reference_copyright = 'reference_copyright' + reference_owner = 'reference_owner' + rejection_form_data_entries_with_translations = 'rejection_form_data_entries_with_translations' + resolution_reason = 'resolution_reason' + update_time = 'update_time' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ImageReferenceMatch, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'conflicting_countries': 'list', + 'country_resolution_history': 'list>>', + 'creation_time': 'datetime', + 'current_conflict_resolved_countries': 'list>', + 'displayed_match_state': 'string', + 'dispute_form_data_entries_with_translations': 'list', + 'expiration_time': 'datetime', + 'id': 'string', + 'match_state': 'string', + 'matched_reference_copyright': 'ImageCopyright', + 'matched_reference_owner': 'Profile', + 'modification_history': 'list', + 'reference_copyright': 'ImageCopyright', + 'reference_owner': 'Profile', + 'rejection_form_data_entries_with_translations': 'list', + 'resolution_reason': 'string', + 'update_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/insightsresult.py b/facebook_business/adobjects/insightsresult.py index fe14d2047..291110c5f 100644 --- a/facebook_business/adobjects/insightsresult.py +++ b/facebook_business/adobjects/insightsresult.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -79,6 +65,198 @@ class Period: total_over_range = 'total_over_range' week = 'week' + class Metric: + blue_reels_play_count = 'blue_reels_play_count' + creator_monetization_qualified_views = 'creator_monetization_qualified_views' + fb_media_matching_copyright_comment_count = 'fb_media_matching_copyright_comment_count' + fb_media_matching_copyright_daily_comment_count = 'fb_media_matching_copyright_daily_comment_count' + fb_media_matching_copyright_daily_like_count = 'fb_media_matching_copyright_daily_like_count' + fb_media_matching_copyright_daily_post_impressions = 'fb_media_matching_copyright_daily_post_impressions' + fb_media_matching_copyright_daily_post_impressions_by_age_bucket_and_gender = 'fb_media_matching_copyright_daily_post_impressions_by_age_bucket_and_gender' + fb_media_matching_copyright_daily_post_impressions_by_country = 'fb_media_matching_copyright_daily_post_impressions_by_country' + fb_media_matching_copyright_daily_post_impressions_by_locale = 'fb_media_matching_copyright_daily_post_impressions_by_locale' + fb_media_matching_copyright_daily_post_impressions_by_matching_post_id = 'fb_media_matching_copyright_daily_post_impressions_by_matching_post_id' + fb_media_matching_copyright_daily_post_impressions_by_matching_post_owner_id = 'fb_media_matching_copyright_daily_post_impressions_by_matching_post_owner_id' + fb_media_matching_copyright_daily_post_reactions_anger_count = 'fb_media_matching_copyright_daily_post_reactions_anger_count' + fb_media_matching_copyright_daily_post_reactions_haha_count = 'fb_media_matching_copyright_daily_post_reactions_haha_count' + fb_media_matching_copyright_daily_post_reactions_like_count = 'fb_media_matching_copyright_daily_post_reactions_like_count' + fb_media_matching_copyright_daily_post_reactions_love_count = 'fb_media_matching_copyright_daily_post_reactions_love_count' + fb_media_matching_copyright_daily_post_reactions_sorry_count = 'fb_media_matching_copyright_daily_post_reactions_sorry_count' + fb_media_matching_copyright_daily_post_reactions_wow_count = 'fb_media_matching_copyright_daily_post_reactions_wow_count' + fb_media_matching_copyright_daily_post_share_count = 'fb_media_matching_copyright_daily_post_share_count' + fb_media_matching_copyright_like_count = 'fb_media_matching_copyright_like_count' + fb_media_matching_copyright_post_impressions = 'fb_media_matching_copyright_post_impressions' + fb_media_matching_copyright_post_impressions_by_age_bucket_and_gender = 'fb_media_matching_copyright_post_impressions_by_age_bucket_and_gender' + fb_media_matching_copyright_post_impressions_by_country = 'fb_media_matching_copyright_post_impressions_by_country' + fb_media_matching_copyright_post_impressions_by_locale = 'fb_media_matching_copyright_post_impressions_by_locale' + fb_media_matching_copyright_post_impressions_by_matching_post_id = 'fb_media_matching_copyright_post_impressions_by_matching_post_id' + fb_media_matching_copyright_post_impressions_by_matching_post_owner_id = 'fb_media_matching_copyright_post_impressions_by_matching_post_owner_id' + fb_media_matching_copyright_post_reactions_anger_count = 'fb_media_matching_copyright_post_reactions_anger_count' + fb_media_matching_copyright_post_reactions_haha_count = 'fb_media_matching_copyright_post_reactions_haha_count' + fb_media_matching_copyright_post_reactions_like_count = 'fb_media_matching_copyright_post_reactions_like_count' + fb_media_matching_copyright_post_reactions_love_count = 'fb_media_matching_copyright_post_reactions_love_count' + fb_media_matching_copyright_post_reactions_sorry_count = 'fb_media_matching_copyright_post_reactions_sorry_count' + fb_media_matching_copyright_post_reactions_wow_count = 'fb_media_matching_copyright_post_reactions_wow_count' + fb_media_matching_copyright_post_share_count = 'fb_media_matching_copyright_post_share_count' + fb_reels_replay_count = 'fb_reels_replay_count' + fb_reels_total_plays = 'fb_reels_total_plays' + has_total_video_views_by_publisher_platform_type = 'has_total_video_views_by_publisher_platform_type' + post_impressions_unique = 'post_impressions_unique' + post_video_avg_time_watched = 'post_video_avg_time_watched' + post_video_followers = 'post_video_followers' + post_video_likes_by_reaction_type = 'post_video_likes_by_reaction_type' + post_video_retention_graph = 'post_video_retention_graph' + post_video_social_actions = 'post_video_social_actions' + post_video_view_time = 'post_video_view_time' + rights_manager_matching_copyright_matching_page_or_profile_view_count = 'rights_manager_matching_copyright_matching_page_or_profile_view_count' + rights_manager_matching_copyright_matching_video_view_count = 'rights_manager_matching_copyright_matching_video_view_count' + rights_manager_matching_copyright_video_view_count = 'rights_manager_matching_copyright_video_view_count' + rights_manager_matching_copyright_video_view_count_60s = 'rights_manager_matching_copyright_video_view_count_60s' + rights_manager_matching_copyright_video_view_count_60s_by_age_bucket_and_gender = 'rights_manager_matching_copyright_video_view_count_60s_by_age_bucket_and_gender' + rights_manager_matching_copyright_video_view_count_60s_by_country_id = 'rights_manager_matching_copyright_video_view_count_60s_by_country_id' + rights_manager_matching_copyright_video_view_count_60s_by_locale = 'rights_manager_matching_copyright_video_view_count_60s_by_locale' + total_audio_only_product_listen_count = 'total_audio_only_product_listen_count' + total_video_10s_views = 'total_video_10s_views' + total_video_10s_views_auto_played = 'total_video_10s_views_auto_played' + total_video_10s_views_clicked_to_play = 'total_video_10s_views_clicked_to_play' + total_video_10s_views_organic = 'total_video_10s_views_organic' + total_video_10s_views_paid = 'total_video_10s_views_paid' + total_video_10s_views_sound_on = 'total_video_10s_views_sound_on' + total_video_10s_views_unique = 'total_video_10s_views_unique' + total_video_15s_views = 'total_video_15s_views' + total_video_30s_views = 'total_video_30s_views' + total_video_30s_views_auto_played = 'total_video_30s_views_auto_played' + total_video_30s_views_clicked_to_play = 'total_video_30s_views_clicked_to_play' + total_video_30s_views_organic = 'total_video_30s_views_organic' + total_video_30s_views_paid = 'total_video_30s_views_paid' + total_video_30s_views_unique = 'total_video_30s_views_unique' + total_video_60s_excludes_shorter_views = 'total_video_60s_excludes_shorter_views' + total_video_60s_excludes_shorter_views_by_age_bucket_and_gender = 'total_video_60s_excludes_shorter_views_by_age_bucket_and_gender' + total_video_60s_excludes_shorter_views_by_distribution_source = 'total_video_60s_excludes_shorter_views_by_distribution_source' + total_video_60s_excludes_shorter_views_by_growth_accounting_bucket = 'total_video_60s_excludes_shorter_views_by_growth_accounting_bucket' + total_video_60s_excludes_shorter_views_by_growth_accounting_bucket_and_time_since_creation_bucket = 'total_video_60s_excludes_shorter_views_by_growth_accounting_bucket_and_time_since_creation_bucket' + total_video_60s_excludes_shorter_views_by_is_60s_returning_viewer = 'total_video_60s_excludes_shorter_views_by_is_60s_returning_viewer' + total_video_60s_excludes_shorter_views_by_is_60s_returning_viewer_and_time_since_creation_bucket = 'total_video_60s_excludes_shorter_views_by_is_60s_returning_viewer_and_time_since_creation_bucket' + total_video_60s_excludes_shorter_views_live = 'total_video_60s_excludes_shorter_views_live' + total_video_60s_excludes_shorter_views_unique = 'total_video_60s_excludes_shorter_views_unique' + total_video_60s_excludes_shorter_views_unique_by_age_bucket_and_gender = 'total_video_60s_excludes_shorter_views_unique_by_age_bucket_and_gender' + total_video_60s_excludes_shorter_views_unique_by_growth_accounting_bucket = 'total_video_60s_excludes_shorter_views_unique_by_growth_accounting_bucket' + total_video_60s_excludes_shorter_views_unique_by_growth_accounting_bucket_and_time_since_creation_bucket = 'total_video_60s_excludes_shorter_views_unique_by_growth_accounting_bucket_and_time_since_creation_bucket' + total_video_60s_excludes_shorter_views_unique_by_is_60s_returning_viewer = 'total_video_60s_excludes_shorter_views_unique_by_is_60s_returning_viewer' + total_video_60s_excludes_shorter_views_unique_by_is_60s_returning_viewer_and_time_since_creation_bucket = 'total_video_60s_excludes_shorter_views_unique_by_is_60s_returning_viewer_and_time_since_creation_bucket' + total_video_ad_break_ad_cpm = 'total_video_ad_break_ad_cpm' + total_video_ad_break_ad_impressions = 'total_video_ad_break_ad_impressions' + total_video_ad_break_earnings = 'total_video_ad_break_earnings' + total_video_ad_break_earnings_with_subsidy = 'total_video_ad_break_earnings_with_subsidy' + total_video_ad_impressions_by_monetization_type = 'total_video_ad_impressions_by_monetization_type' + total_video_avg_time_watched = 'total_video_avg_time_watched' + total_video_avg_time_watched_by_distribution_source = 'total_video_avg_time_watched_by_distribution_source' + total_video_avg_time_watched_by_is_60s_returning_viewer = 'total_video_avg_time_watched_by_is_60s_returning_viewer' + total_video_avg_time_watched_by_time_since_creation_bucket = 'total_video_avg_time_watched_by_time_since_creation_bucket' + total_video_avg_time_watched_followers = 'total_video_avg_time_watched_followers' + total_video_avg_time_watched_live = 'total_video_avg_time_watched_live' + total_video_comment_sentiment = 'total_video_comment_sentiment' + total_video_comment_sentiment_by_factors = 'total_video_comment_sentiment_by_factors' + total_video_complete_views = 'total_video_complete_views' + total_video_complete_views_auto_played = 'total_video_complete_views_auto_played' + total_video_complete_views_clicked_to_play = 'total_video_complete_views_clicked_to_play' + total_video_complete_views_organic = 'total_video_complete_views_organic' + total_video_complete_views_organic_unique = 'total_video_complete_views_organic_unique' + total_video_complete_views_paid = 'total_video_complete_views_paid' + total_video_complete_views_paid_unique = 'total_video_complete_views_paid_unique' + total_video_complete_views_unique = 'total_video_complete_views_unique' + total_video_consumption_rate = 'total_video_consumption_rate' + total_video_followers_unique = 'total_video_followers_unique' + total_video_growth_score = 'total_video_growth_score' + total_video_growth_score_by_factors = 'total_video_growth_score_by_factors' + total_video_impressions = 'total_video_impressions' + total_video_impressions_fan = 'total_video_impressions_fan' + total_video_impressions_fan_paid = 'total_video_impressions_fan_paid' + total_video_impressions_fan_paid_unique = 'total_video_impressions_fan_paid_unique' + total_video_impressions_fan_unique = 'total_video_impressions_fan_unique' + total_video_impressions_organic = 'total_video_impressions_organic' + total_video_impressions_organic_unique = 'total_video_impressions_organic_unique' + total_video_impressions_paid = 'total_video_impressions_paid' + total_video_impressions_paid_unique = 'total_video_impressions_paid_unique' + total_video_impressions_unique = 'total_video_impressions_unique' + total_video_impressions_viral = 'total_video_impressions_viral' + total_video_impressions_viral_unique = 'total_video_impressions_viral_unique' + total_video_imps_count_unique_by_age_bucket = 'total_video_imps_count_unique_by_age_bucket' + total_video_imps_count_unique_by_age_bucket_and_gender = 'total_video_imps_count_unique_by_age_bucket_and_gender' + total_video_imps_count_unique_by_gender = 'total_video_imps_count_unique_by_gender' + total_video_likes_by_reaction_type = 'total_video_likes_by_reaction_type' + total_video_negative_feedback = 'total_video_negative_feedback' + total_video_net_followers = 'total_video_net_followers' + total_video_net_followers_unique = 'total_video_net_followers_unique' + total_video_net_followers_unique_by_time_since_creation_bucket = 'total_video_net_followers_unique_by_time_since_creation_bucket' + total_video_play_count = 'total_video_play_count' + total_video_play_count_by_is_60s_returning_viewer_and_time_since_creation_bucket = 'total_video_play_count_by_is_60s_returning_viewer_and_time_since_creation_bucket' + total_video_play_count_by_time_since_creation_bucket = 'total_video_play_count_by_time_since_creation_bucket' + total_video_reactions_by_type_total = 'total_video_reactions_by_type_total' + total_video_relative_retention_graph = 'total_video_relative_retention_graph' + total_video_retention_graph = 'total_video_retention_graph' + total_video_retention_graph_15s = 'total_video_retention_graph_15s' + total_video_retention_graph_15s_followers = 'total_video_retention_graph_15s_followers' + total_video_retention_graph_15s_newsfeed = 'total_video_retention_graph_15s_newsfeed' + total_video_retention_graph_15s_recommended = 'total_video_retention_graph_15s_recommended' + total_video_retention_graph_15s_shares = 'total_video_retention_graph_15s_shares' + total_video_retention_graph_15s_watch = 'total_video_retention_graph_15s_watch' + total_video_retention_graph_autoplayed = 'total_video_retention_graph_autoplayed' + total_video_retention_graph_clicked_to_play = 'total_video_retention_graph_clicked_to_play' + total_video_retention_graph_gender_female = 'total_video_retention_graph_gender_female' + total_video_retention_graph_gender_male = 'total_video_retention_graph_gender_male' + total_video_social_actions = 'total_video_social_actions' + total_video_social_actions_comment_by_distribution_type = 'total_video_social_actions_comment_by_distribution_type' + total_video_social_actions_count_unique = 'total_video_social_actions_count_unique' + total_video_social_actions_count_unique_by_age_bucket = 'total_video_social_actions_count_unique_by_age_bucket' + total_video_social_actions_count_unique_by_age_bucket_and_gender = 'total_video_social_actions_count_unique_by_age_bucket_and_gender' + total_video_social_actions_count_unique_by_gender = 'total_video_social_actions_count_unique_by_gender' + total_video_social_actions_reaction_by_distribution_type = 'total_video_social_actions_reaction_by_distribution_type' + total_video_stories_by_action_type = 'total_video_stories_by_action_type' + total_video_unfollowers = 'total_video_unfollowers' + total_video_unfollowers_unique = 'total_video_unfollowers_unique' + total_video_view_count_unique_by_age_bucket = 'total_video_view_count_unique_by_age_bucket' + total_video_view_count_unique_by_age_bucket_and_gender = 'total_video_view_count_unique_by_age_bucket_and_gender' + total_video_view_count_unique_by_gender = 'total_video_view_count_unique_by_gender' + total_video_view_time_by_age_bucket_and_gender = 'total_video_view_time_by_age_bucket_and_gender' + total_video_view_time_by_country_id = 'total_video_view_time_by_country_id' + total_video_view_time_by_distribution_source = 'total_video_view_time_by_distribution_source' + total_video_view_time_by_distribution_type = 'total_video_view_time_by_distribution_type' + total_video_view_time_by_is_60s_returning_viewer_and_time_since_creation_bucket = 'total_video_view_time_by_is_60s_returning_viewer_and_time_since_creation_bucket' + total_video_view_time_by_region_id = 'total_video_view_time_by_region_id' + total_video_view_time_by_time_since_creation_bucket = 'total_video_view_time_by_time_since_creation_bucket' + total_video_view_total_time = 'total_video_view_total_time' + total_video_view_total_time_by_is_60s_returning_viewer = 'total_video_view_total_time_by_is_60s_returning_viewer' + total_video_view_total_time_by_paid_non_paid = 'total_video_view_total_time_by_paid_non_paid' + total_video_view_total_time_live = 'total_video_view_total_time_live' + total_video_view_total_time_organic = 'total_video_view_total_time_organic' + total_video_view_total_time_paid = 'total_video_view_total_time_paid' + total_video_view_total_time_vod = 'total_video_view_total_time_vod' + total_video_views = 'total_video_views' + total_video_views_autoplayed = 'total_video_views_autoplayed' + total_video_views_by_age_bucket_and_gender = 'total_video_views_by_age_bucket_and_gender' + total_video_views_by_country_id = 'total_video_views_by_country_id' + total_video_views_by_distribution_type = 'total_video_views_by_distribution_type' + total_video_views_by_paid_non_paid = 'total_video_views_by_paid_non_paid' + total_video_views_by_region_id = 'total_video_views_by_region_id' + total_video_views_by_region_id_proper = 'total_video_views_by_region_id_proper' + total_video_views_clicked_to_play = 'total_video_views_clicked_to_play' + total_video_views_gender_female = 'total_video_views_gender_female' + total_video_views_gender_female_live = 'total_video_views_gender_female_live' + total_video_views_gender_male = 'total_video_views_gender_male' + total_video_views_gender_male_live = 'total_video_views_gender_male_live' + total_video_views_live = 'total_video_views_live' + total_video_views_live_autoplayed = 'total_video_views_live_autoplayed' + total_video_views_live_clicked_to_play = 'total_video_views_live_clicked_to_play' + total_video_views_organic = 'total_video_views_organic' + total_video_views_organic_unique = 'total_video_views_organic_unique' + total_video_views_paid = 'total_video_views_paid' + total_video_views_paid_unique = 'total_video_views_paid_unique' + total_video_views_sound_on = 'total_video_views_sound_on' + total_video_views_unique = 'total_video_views_unique' + total_video_views_vod = 'total_video_views_vod' + video_asset_60s_video_view_total_count_by_is_monetizable = 'video_asset_60s_video_view_total_count_by_is_monetizable' + _field_types = { 'description': 'string', 'description_from_api_doc': 'string', @@ -86,13 +264,14 @@ class Period: 'name': 'string', 'period': 'string', 'title': 'string', - 'values': 'list', + 'values': 'list', } @classmethod def _get_field_enum_info(cls): field_enum_info = {} field_enum_info['DatePreset'] = InsightsResult.DatePreset.__dict__.values() field_enum_info['Period'] = InsightsResult.Period.__dict__.values() + field_enum_info['Metric'] = InsightsResult.Metric.__dict__.values() return field_enum_info diff --git a/facebook_business/adobjects/insightsvalue.py b/facebook_business/adobjects/insightsvalue.py new file mode 100644 index 000000000..5b280435a --- /dev/null +++ b/facebook_business/adobjects/insightsvalue.py @@ -0,0 +1,55 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 InsightsValue( + AbstractObject, +): + + def __init__(self, api=None): + super(InsightsValue, self).__init__() + self._isInsightsValue = True + self._api = api + + class Field(AbstractObject.Field): + campaign_id = 'campaign_id' + end_time = 'end_time' + engagement_source = 'engagement_source' + message_type = 'message_type' + messaging_channel = 'messaging_channel' + recurring_notifications_entry_point = 'recurring_notifications_entry_point' + recurring_notifications_frequency = 'recurring_notifications_frequency' + recurring_notifications_topic = 'recurring_notifications_topic' + start_time = 'start_time' + value = 'value' + + _field_types = { + 'campaign_id': 'string', + 'end_time': 'datetime', + 'engagement_source': 'string', + 'message_type': 'string', + 'messaging_channel': 'string', + 'recurring_notifications_entry_point': 'string', + 'recurring_notifications_frequency': 'string', + 'recurring_notifications_topic': 'string', + 'start_time': 'datetime', + 'value': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/instagramboostablemediaforaccesstoken.py b/facebook_business/adobjects/instagramboostablemediaforaccesstoken.py new file mode 100644 index 000000000..912ab809a --- /dev/null +++ b/facebook_business/adobjects/instagramboostablemediaforaccesstoken.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 InstagramBoostableMediaForAccessToken( + AbstractObject, +): + + def __init__(self, api=None): + super(InstagramBoostableMediaForAccessToken, self).__init__() + self._isInstagramBoostableMediaForAccessToken = True + self._api = api + + class Field(AbstractObject.Field): + has_product_tags = 'has_product_tags' + media = 'media' + + _field_types = { + 'has_product_tags': 'bool', + 'media': 'IGMedia', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/instagramcarousel.py b/facebook_business/adobjects/instagramcarousel.py new file mode 100644 index 000000000..62b89abc3 --- /dev/null +++ b/facebook_business/adobjects/instagramcarousel.py @@ -0,0 +1,152 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 InstagramCarousel( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isInstagramCarousel = True + super(InstagramCarousel, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + caption_text = 'caption_text' + comment_count = 'comment_count' + content_type = 'content_type' + display_url = 'display_url' + id = 'id' + like_count = 'like_count' + owner_instagram_user = 'owner_instagram_user' + permalink = 'permalink' + taken_at = 'taken_at' + video_url = 'video_url' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=InstagramCarousel, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_comments(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.instagramcomment import InstagramComment + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/comments', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=InstagramComment, + api_type='EDGE', + response_parser=ObjectParser(target_class=InstagramComment, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_comment(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.instagramcomment import InstagramComment + param_types = { + 'ad_id': 'string', + 'message': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/comments', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=InstagramComment, + api_type='EDGE', + response_parser=ObjectParser(target_class=InstagramComment, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'caption_text': 'string', + 'comment_count': 'int', + 'content_type': 'int', + 'display_url': 'string', + 'id': 'string', + 'like_count': 'int', + 'owner_instagram_user': 'InstagramUser', + 'permalink': 'string', + 'taken_at': 'datetime', + 'video_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/instagramcomment.py b/facebook_business/adobjects/instagramcomment.py new file mode 100644 index 000000000..035d9732f --- /dev/null +++ b/facebook_business/adobjects/instagramcomment.py @@ -0,0 +1,209 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 InstagramComment( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isInstagramComment = True + super(InstagramComment, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + comment_type = 'comment_type' + created_at = 'created_at' + id = 'id' + instagram_comment_id = 'instagram_comment_id' + instagram_user = 'instagram_user' + mentioned_instagram_users = 'mentioned_instagram_users' + message = 'message' + username = 'username' + + def api_delete(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'ad_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=InstagramComment, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def api_update(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'ad_id': 'string', + 'hide': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=InstagramComment, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_replies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/replies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=InstagramComment, + api_type='EDGE', + response_parser=ObjectParser(target_class=InstagramComment, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_reply(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'ad_id': 'string', + 'message': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/replies', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=InstagramComment, + api_type='EDGE', + response_parser=ObjectParser(target_class=InstagramComment, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'comment_type': 'string', + 'created_at': 'datetime', + 'id': 'string', + 'instagram_comment_id': 'string', + 'instagram_user': 'InstagramUser', + 'mentioned_instagram_users': 'list', + 'message': 'string', + 'username': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/instagraminsightsresult.py b/facebook_business/adobjects/instagraminsightsresult.py index 950d8d101..0796ec1f6 100644 --- a/facebook_business/adobjects/instagraminsightsresult.py +++ b/facebook_business/adobjects/instagraminsightsresult.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -56,15 +42,12 @@ class Breakdown: surface_type = 'surface_type' class Metric: - carousel_album_engagement = 'carousel_album_engagement' - carousel_album_impressions = 'carousel_album_impressions' - carousel_album_reach = 'carousel_album_reach' - carousel_album_saved = 'carousel_album_saved' - carousel_album_video_views = 'carousel_album_video_views' + clips_replays_count = 'clips_replays_count' comments = 'comments' - engagement = 'engagement' - exits = 'exits' follows = 'follows' + ig_reels_aggregated_all_plays_count = 'ig_reels_aggregated_all_plays_count' + ig_reels_avg_watch_time = 'ig_reels_avg_watch_time' + ig_reels_video_view_total_time = 'ig_reels_video_view_total_time' impressions = 'impressions' likes = 'likes' navigation = 'navigation' @@ -75,8 +58,6 @@ class Metric: replies = 'replies' saved = 'saved' shares = 'shares' - taps_back = 'taps_back' - taps_forward = 'taps_forward' total_interactions = 'total_interactions' video_views = 'video_views' diff --git a/facebook_business/adobjects/instagraminsightsvalue.py b/facebook_business/adobjects/instagraminsightsvalue.py index fb9baf32e..b066b8af7 100644 --- a/facebook_business/adobjects/instagraminsightsvalue.py +++ b/facebook_business/adobjects/instagraminsightsvalue.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/instagrammedia.py b/facebook_business/adobjects/instagrammedia.py new file mode 100644 index 000000000..e8b8e5ea6 --- /dev/null +++ b/facebook_business/adobjects/instagrammedia.py @@ -0,0 +1,162 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 InstagramMedia( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isInstagramMedia = True + super(InstagramMedia, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + caption_text = 'caption_text' + comment_count = 'comment_count' + content_type = 'content_type' + display_url = 'display_url' + filter_name = 'filter_name' + id = 'id' + latitude = 'latitude' + like_count = 'like_count' + location = 'location' + location_name = 'location_name' + longitude = 'longitude' + owner_instagram_user = 'owner_instagram_user' + permalink = 'permalink' + taken_at = 'taken_at' + video_url = 'video_url' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=InstagramMedia, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_comments(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.instagramcomment import InstagramComment + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/comments', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=InstagramComment, + api_type='EDGE', + response_parser=ObjectParser(target_class=InstagramComment, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_comment(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.instagramcomment import InstagramComment + param_types = { + 'ad_id': 'string', + 'message': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/comments', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=InstagramComment, + api_type='EDGE', + response_parser=ObjectParser(target_class=InstagramComment, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'caption_text': 'string', + 'comment_count': 'int', + 'content_type': 'int', + 'display_url': 'string', + 'filter_name': 'string', + 'id': 'string', + 'latitude': 'float', + 'like_count': 'int', + 'location': 'Location', + 'location_name': 'string', + 'longitude': 'float', + 'owner_instagram_user': 'InstagramUser', + 'permalink': 'string', + 'taken_at': 'datetime', + 'video_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/instagramrelatedproducttags.py b/facebook_business/adobjects/instagramrelatedproducttags.py new file mode 100644 index 000000000..0f633d443 --- /dev/null +++ b/facebook_business/adobjects/instagramrelatedproducttags.py @@ -0,0 +1,50 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 InstagramRelatedProductTags( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isInstagramRelatedProductTags = True + super(InstagramRelatedProductTags, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + checkout_setting = 'checkout_setting' + id = 'id' + image_uri = 'image_uri' + name = 'name' + price_label = 'price_label' + sale_price_label = 'sale_price_label' + + _field_types = { + 'checkout_setting': 'string', + 'id': 'int', + 'image_uri': 'string', + 'name': 'string', + 'price_label': 'string', + 'sale_price_label': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/instagramshoppingmerchantreviewmessage.py b/facebook_business/adobjects/instagramshoppingmerchantreviewmessage.py new file mode 100644 index 000000000..6bd83e637 --- /dev/null +++ b/facebook_business/adobjects/instagramshoppingmerchantreviewmessage.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 InstagramShoppingMerchantReviewMessage( + AbstractObject, +): + + def __init__(self, api=None): + super(InstagramShoppingMerchantReviewMessage, self).__init__() + self._isInstagramShoppingMerchantReviewMessage = True + self._api = api + + class Field(AbstractObject.Field): + help_url = 'help_url' + message = 'message' + + _field_types = { + 'help_url': 'string', + 'message': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/instagramuser.py b/facebook_business/adobjects/instagramuser.py index 64454072f..de2330aeb 100644 --- a/facebook_business/adobjects/instagramuser.py +++ b/facebook_business/adobjects/instagramuser.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -115,6 +101,37 @@ def get_agencies(self, fields=None, params=None, batch=None, success=None, failu self.assure_call() return request.execute() + def get_ar_effects(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.areffect import AREffect + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ar_effects', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AREffect, + api_type='EDGE', + response_parser=ObjectParser(target_class=AREffect, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_authorized_ad_accounts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -179,6 +196,71 @@ def create_authorized_ad_account(self, fields=None, params=None, batch=None, suc self.assure_call() return request.execute() + def get_upcoming_events(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.igupcomingevent import IGUpcomingEvent + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/upcoming_events', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGUpcomingEvent, + api_type='EDGE', + response_parser=ObjectParser(target_class=IGUpcomingEvent, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_upcoming_event(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.igupcomingevent import IGUpcomingEvent + param_types = { + 'end_time': 'datetime', + 'start_time': 'datetime', + 'title': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/upcoming_events', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGUpcomingEvent, + api_type='EDGE', + response_parser=ObjectParser(target_class=IGUpcomingEvent, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + _field_types = { 'follow_count': 'int', 'followed_by_count': 'int', diff --git a/facebook_business/adobjects/instagramvideometadata.py b/facebook_business/adobjects/instagramvideometadata.py new file mode 100644 index 000000000..7c6b3930f --- /dev/null +++ b/facebook_business/adobjects/instagramvideometadata.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 InstagramVideoMetadata( + AbstractObject, +): + + def __init__(self, api=None): + super(InstagramVideoMetadata, self).__init__() + self._isInstagramVideoMetadata = True + self._api = api + + class Field(AbstractObject.Field): + duration = 'duration' + height = 'height' + width = 'width' + + _field_types = { + 'duration': 'float', + 'height': 'float', + 'width': 'float', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/instantarticlecta.py b/facebook_business/adobjects/instantarticlecta.py new file mode 100644 index 000000000..04f192feb --- /dev/null +++ b/facebook_business/adobjects/instantarticlecta.py @@ -0,0 +1,48 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 InstantArticleCTA( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isInstantArticleCTA = True + super(InstantArticleCTA, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + is_enabled = 'is_enabled' + publisher_defined_value = 'publisher_defined_value' + type = 'type' + update_time = 'update_time' + + _field_types = { + 'id': 'string', + 'is_enabled': 'bool', + 'publisher_defined_value': 'float', + 'type': 'string', + 'update_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/instantarticleinsightsqueryresult.py b/facebook_business/adobjects/instantarticleinsightsqueryresult.py new file mode 100644 index 000000000..d4f6fec4c --- /dev/null +++ b/facebook_business/adobjects/instantarticleinsightsqueryresult.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 InstantArticleInsightsQueryResult( + AbstractObject, +): + + def __init__(self, api=None): + super(InstantArticleInsightsQueryResult, self).__init__() + self._isInstantArticleInsightsQueryResult = True + self._api = api + + class Field(AbstractObject.Field): + breakdowns = 'breakdowns' + name = 'name' + time = 'time' + value = 'value' + + _field_types = { + 'breakdowns': 'map', + 'name': 'string', + 'time': 'datetime', + 'value': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/instantarticlesstats.py b/facebook_business/adobjects/instantarticlesstats.py deleted file mode 100644 index 364000a83..000000000 --- a/facebook_business/adobjects/instantarticlesstats.py +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 2014 Facebook, Inc. - -# 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. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -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 InstantArticlesStats( - AbstractObject, -): - - def __init__(self, api=None): - super(InstantArticlesStats, self).__init__() - self._isInstantArticlesStats = True - self._api = api - - class Field(AbstractObject.Field): - error = 'error' - metadata = 'metadata' - metric = 'metric' - totals = 'totals' - x_axis_breakdown = 'x_axis_breakdown' - - _field_types = { - 'error': 'string', - 'metadata': 'list>', - 'metric': 'Object', - 'totals': 'list>', - 'x_axis_breakdown': 'list>>', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info - - diff --git a/facebook_business/adobjects/iosapplink.py b/facebook_business/adobjects/iosapplink.py index 5d9fcba9e..d1276ce85 100644 --- a/facebook_business/adobjects/iosapplink.py +++ b/facebook_business/adobjects/iosapplink.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/ipobject.py b/facebook_business/adobjects/ipobject.py new file mode 100644 index 000000000..bb079d62b --- /dev/null +++ b/facebook_business/adobjects/ipobject.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 IPObject( + AbstractObject, +): + + def __init__(self, api=None): + super(IPObject, self).__init__() + self._isIPObject = True + self._api = api + + class Field(AbstractObject.Field): + ip_permission = 'ip_permission' + user = 'user' + + _field_types = { + 'ip_permission': 'string', + 'user': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/jobopening.py b/facebook_business/adobjects/jobopening.py index d1205b27d..b364d59ee 100644 --- a/facebook_business/adobjects/jobopening.py +++ b/facebook_business/adobjects/jobopening.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/keyvalue.py b/facebook_business/adobjects/keyvalue.py index b411fb01d..18e49903b 100644 --- a/facebook_business/adobjects/keyvalue.py +++ b/facebook_business/adobjects/keyvalue.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/keyworddeliveryreport.py b/facebook_business/adobjects/keyworddeliveryreport.py new file mode 100644 index 000000000..c0be1c69e --- /dev/null +++ b/facebook_business/adobjects/keyworddeliveryreport.py @@ -0,0 +1,53 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 KeywordDeliveryReport( + AbstractObject, +): + + def __init__(self, api=None): + super(KeywordDeliveryReport, self).__init__() + self._isKeywordDeliveryReport = True + self._api = api + + class Field(AbstractObject.Field): + estimated_clicks = 'estimated_clicks' + estimated_conversions = 'estimated_conversions' + estimated_cost = 'estimated_cost' + estimated_cpc = 'estimated_cpc' + estimated_ctr = 'estimated_ctr' + estimated_cvr = 'estimated_cvr' + estimated_impressions = 'estimated_impressions' + estimated_returns = 'estimated_returns' + keyword = 'keyword' + + _field_types = { + 'estimated_clicks': 'unsigned int', + 'estimated_conversions': 'unsigned int', + 'estimated_cost': 'float', + 'estimated_cpc': 'float', + 'estimated_ctr': 'float', + 'estimated_cvr': 'float', + 'estimated_impressions': 'unsigned int', + 'estimated_returns': 'float', + 'keyword': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/lead.py b/facebook_business/adobjects/lead.py index 501d948b6..546d1229d 100644 --- a/facebook_business/adobjects/lead.py +++ b/facebook_business/adobjects/lead.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/leadgenappointmentbookinginfo.py b/facebook_business/adobjects/leadgenappointmentbookinginfo.py index 6d19718cd..714bfd4bb 100644 --- a/facebook_business/adobjects/leadgenappointmentbookinginfo.py +++ b/facebook_business/adobjects/leadgenappointmentbookinginfo.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject @@ -45,7 +31,7 @@ class Field(AbstractObject.Field): _field_types = { 'advertiser_timezone_offset': 'string', 'appointment_durations': 'list', - 'appointment_slots_by_day': 'list', + 'appointment_slots_by_day': 'list', } @classmethod def _get_field_enum_info(cls): diff --git a/facebook_business/adobjects/leadgenappointmentslotsbyday.py b/facebook_business/adobjects/leadgenappointmentslotsbyday.py new file mode 100644 index 000000000..59b0f6dc3 --- /dev/null +++ b/facebook_business/adobjects/leadgenappointmentslotsbyday.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 LeadGenAppointmentSlotsByDay( + AbstractObject, +): + + def __init__(self, api=None): + super(LeadGenAppointmentSlotsByDay, self).__init__() + self._isLeadGenAppointmentSlotsByDay = True + self._api = api + + class Field(AbstractObject.Field): + appointment_slots = 'appointment_slots' + day = 'day' + + _field_types = { + 'appointment_slots': 'list', + 'day': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/leadgenappointmenttimeslot.py b/facebook_business/adobjects/leadgenappointmenttimeslot.py new file mode 100644 index 000000000..20272489b --- /dev/null +++ b/facebook_business/adobjects/leadgenappointmenttimeslot.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 LeadGenAppointmentTimeSlot( + AbstractObject, +): + + def __init__(self, api=None): + super(LeadGenAppointmentTimeSlot, self).__init__() + self._isLeadGenAppointmentTimeSlot = True + self._api = api + + class Field(AbstractObject.Field): + end_time = 'end_time' + start_time = 'start_time' + + _field_types = { + 'end_time': 'unsigned int', + 'start_time': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/leadgenconditionalquestionsgroupchoices.py b/facebook_business/adobjects/leadgenconditionalquestionsgroupchoices.py index 9210a688f..6c268433d 100644 --- a/facebook_business/adobjects/leadgenconditionalquestionsgroupchoices.py +++ b/facebook_business/adobjects/leadgenconditionalquestionsgroupchoices.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/leadgenconditionalquestionsgroupquestions.py b/facebook_business/adobjects/leadgenconditionalquestionsgroupquestions.py index a6f12fce1..0013477e9 100644 --- a/facebook_business/adobjects/leadgenconditionalquestionsgroupquestions.py +++ b/facebook_business/adobjects/leadgenconditionalquestionsgroupquestions.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/leadgencontextcard.py b/facebook_business/adobjects/leadgencontextcard.py new file mode 100644 index 000000000..0ee3d8fd6 --- /dev/null +++ b/facebook_business/adobjects/leadgencontextcard.py @@ -0,0 +1,50 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 LeadGenContextCard( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isLeadGenContextCard = True + super(LeadGenContextCard, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + button_text = 'button_text' + content = 'content' + cover_photo = 'cover_photo' + id = 'id' + style = 'style' + title = 'title' + + _field_types = { + 'button_text': 'string', + 'content': 'list', + 'cover_photo': 'Photo', + 'id': 'string', + 'style': 'string', + 'title': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/leadgencustomdisclaimer.py b/facebook_business/adobjects/leadgencustomdisclaimer.py new file mode 100644 index 000000000..6632f1584 --- /dev/null +++ b/facebook_business/adobjects/leadgencustomdisclaimer.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 LeadGenCustomDisclaimer( + AbstractObject, +): + + def __init__(self, api=None): + super(LeadGenCustomDisclaimer, self).__init__() + self._isLeadGenCustomDisclaimer = True + self._api = api + + class Field(AbstractObject.Field): + body = 'body' + checkboxes = 'checkboxes' + title = 'title' + + _field_types = { + 'body': 'LeadGenCustomDisclaimerBody', + 'checkboxes': 'list', + 'title': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/leadgencustomdisclaimerbody.py b/facebook_business/adobjects/leadgencustomdisclaimerbody.py new file mode 100644 index 000000000..53c2e85d5 --- /dev/null +++ b/facebook_business/adobjects/leadgencustomdisclaimerbody.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 LeadGenCustomDisclaimerBody( + AbstractObject, +): + + def __init__(self, api=None): + super(LeadGenCustomDisclaimerBody, self).__init__() + self._isLeadGenCustomDisclaimerBody = True + self._api = api + + class Field(AbstractObject.Field): + text = 'text' + url_entities = 'url_entities' + + _field_types = { + 'text': 'string', + 'url_entities': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/leadgendatadraft.py b/facebook_business/adobjects/leadgendatadraft.py new file mode 100644 index 000000000..594b9f5f9 --- /dev/null +++ b/facebook_business/adobjects/leadgendatadraft.py @@ -0,0 +1,98 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 LeadGenDataDraft( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isLeadGenDataDraft = True + super(LeadGenDataDraft, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + block_display_for_non_targeted_viewer = 'block_display_for_non_targeted_viewer' + created_time = 'created_time' + disqualified_end_component = 'disqualified_end_component' + follow_up_action_url = 'follow_up_action_url' + id = 'id' + is_optimized_for_quality = 'is_optimized_for_quality' + legal_content = 'legal_content' + locale = 'locale' + name = 'name' + page = 'page' + question_page_custom_headline = 'question_page_custom_headline' + questions = 'questions' + status = 'status' + thank_you_page = 'thank_you_page' + tracking_parameters = 'tracking_parameters' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=LeadGenDataDraft, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'block_display_for_non_targeted_viewer': 'bool', + 'created_time': 'datetime', + 'disqualified_end_component': 'Object', + 'follow_up_action_url': 'string', + 'id': 'string', + 'is_optimized_for_quality': 'bool', + 'legal_content': 'Object', + 'locale': 'string', + 'name': 'string', + 'page': 'Page', + 'question_page_custom_headline': 'string', + 'questions': 'list', + 'status': 'string', + 'thank_you_page': 'Object', + 'tracking_parameters': 'list>', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/leadgendirectcrmintegrationconfig.py b/facebook_business/adobjects/leadgendirectcrmintegrationconfig.py new file mode 100644 index 000000000..431a84dfd --- /dev/null +++ b/facebook_business/adobjects/leadgendirectcrmintegrationconfig.py @@ -0,0 +1,84 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 LeadGenDirectCRMIntegrationConfig( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isLeadGenDirectCRMIntegrationConfig = True + super(LeadGenDirectCRMIntegrationConfig, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + auth_id = 'auth_id' + creation_time = 'creation_time' + id = 'id' + lead_gen_data = 'lead_gen_data' + matched_fields = 'matched_fields' + matched_fields_labels = 'matched_fields_labels' + resources = 'resources' + third_party_app_id = 'third_party_app_id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=LeadGenDirectCRMIntegrationConfig, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'auth_id': 'string', + 'creation_time': 'datetime', + 'id': 'string', + 'lead_gen_data': 'LeadgenForm', + 'matched_fields': 'list>', + 'matched_fields_labels': 'list>', + 'resources': 'list>', + 'third_party_app_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/leadgendraftquestion.py b/facebook_business/adobjects/leadgendraftquestion.py index 94ef868d4..dca6f0ec9 100644 --- a/facebook_business/adobjects/leadgendraftquestion.py +++ b/facebook_business/adobjects/leadgendraftquestion.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/leadgenform.py b/facebook_business/adobjects/leadgenform.py index 849dea0d2..4b3c22c1b 100644 --- a/facebook_business/adobjects/leadgenform.py +++ b/facebook_business/adobjects/leadgenform.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -270,7 +256,7 @@ def create_test_lead(self, fields=None, params=None, batch=None, success=None, f _field_types = { 'allow_organic_lead': 'bool', 'block_display_for_non_targeted_viewer': 'bool', - 'context_card': 'Object', + 'context_card': 'LeadGenContextCard', 'created_time': 'datetime', 'creator': 'User', 'expired_leads_count': 'unsigned int', @@ -279,7 +265,7 @@ def create_test_lead(self, fields=None, params=None, batch=None, success=None, f 'id': 'string', 'is_optimized_for_quality': 'bool', 'leads_count': 'unsigned int', - 'legal_content': 'Object', + 'legal_content': 'LeadGenLegalContent', 'locale': 'string', 'name': 'string', 'organic_leads_count': 'unsigned int', @@ -289,8 +275,8 @@ def create_test_lead(self, fields=None, params=None, batch=None, success=None, f 'question_page_custom_headline': 'string', 'questions': 'list', 'status': 'string', - 'thank_you_page': 'Object', - 'tracking_parameters': 'list>', + 'thank_you_page': 'LeadGenThankYouPage', + 'tracking_parameters': 'list', } @classmethod def _get_field_enum_info(cls): diff --git a/facebook_business/adobjects/leadgenformpreviewdetails.py b/facebook_business/adobjects/leadgenformpreviewdetails.py new file mode 100644 index 000000000..bca78c616 --- /dev/null +++ b/facebook_business/adobjects/leadgenformpreviewdetails.py @@ -0,0 +1,101 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 LeadGenFormPreviewDetails( + AbstractObject, +): + + def __init__(self, api=None): + super(LeadGenFormPreviewDetails, self).__init__() + self._isLeadGenFormPreviewDetails = True + self._api = api + + class Field(AbstractObject.Field): + call_to_action_title = 'call_to_action_title' + contact_information_text = 'contact_information_text' + creatives_overview_default_text = 'creatives_overview_default_text' + data_privacy_policy_setting_description = 'data_privacy_policy_setting_description' + default_appointment_scheduling_inline_context = 'default_appointment_scheduling_inline_context' + default_disqualified_end_component = 'default_disqualified_end_component' + default_thank_you_page = 'default_thank_you_page' + disqualified_thank_you_card_transparency_info_text = 'disqualified_thank_you_card_transparency_info_text' + edit_text = 'edit_text' + email_inline_context_text = 'email_inline_context_text' + email_messenger_push_opt_in_disclaimer = 'email_messenger_push_opt_in_disclaimer' + email_messenger_push_opt_in_transparency_text = 'email_messenger_push_opt_in_transparency_text' + form_clarity_description_content = 'form_clarity_description_content' + form_clarity_description_title = 'form_clarity_description_title' + form_clarity_headline = 'form_clarity_headline' + gated_content_locked_description = 'gated_content_locked_description' + gated_content_locked_headline = 'gated_content_locked_headline' + gated_content_unlocked_description = 'gated_content_unlocked_description' + gated_content_unlocked_headline = 'gated_content_unlocked_headline' + how_it_works_section_headers = 'how_it_works_section_headers' + next_button_text = 'next_button_text' + optional_question_text = 'optional_question_text' + personal_info_text = 'personal_info_text' + phone_number_inline_context_text = 'phone_number_inline_context_text' + privacy_policy_title_section_title_text = 'privacy_policy_title_section_title_text' + privacy_setting_description = 'privacy_setting_description' + products_section_headers = 'products_section_headers' + qualified_thank_you_card_transparency_info_text = 'qualified_thank_you_card_transparency_info_text' + review_your_info_text = 'review_your_info_text' + secure_sharing_text = 'secure_sharing_text' + slide_to_submit_text = 'slide_to_submit_text' + social_proof_section_headers = 'social_proof_section_headers' + submit_button_text = 'submit_button_text' + + _field_types = { + 'call_to_action_title': 'string', + 'contact_information_text': 'string', + 'creatives_overview_default_text': 'string', + 'data_privacy_policy_setting_description': 'string', + 'default_appointment_scheduling_inline_context': 'string', + 'default_disqualified_end_component': 'Object', + 'default_thank_you_page': 'Object', + 'disqualified_thank_you_card_transparency_info_text': 'string', + 'edit_text': 'string', + 'email_inline_context_text': 'string', + 'email_messenger_push_opt_in_disclaimer': 'string', + 'email_messenger_push_opt_in_transparency_text': 'string', + 'form_clarity_description_content': 'string', + 'form_clarity_description_title': 'string', + 'form_clarity_headline': 'string', + 'gated_content_locked_description': 'string', + 'gated_content_locked_headline': 'string', + 'gated_content_unlocked_description': 'string', + 'gated_content_unlocked_headline': 'string', + 'how_it_works_section_headers': 'list>', + 'next_button_text': 'string', + 'optional_question_text': 'string', + 'personal_info_text': 'string', + 'phone_number_inline_context_text': 'string', + 'privacy_policy_title_section_title_text': 'string', + 'privacy_setting_description': 'string', + 'products_section_headers': 'list>', + 'qualified_thank_you_card_transparency_info_text': 'string', + 'review_your_info_text': 'string', + 'secure_sharing_text': 'string', + 'slide_to_submit_text': 'string', + 'social_proof_section_headers': 'list>', + 'submit_button_text': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/leadgenlegalcontent.py b/facebook_business/adobjects/leadgenlegalcontent.py new file mode 100644 index 000000000..1ca4bec71 --- /dev/null +++ b/facebook_business/adobjects/leadgenlegalcontent.py @@ -0,0 +1,44 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 LeadGenLegalContent( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isLeadGenLegalContent = True + super(LeadGenLegalContent, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + custom_disclaimer = 'custom_disclaimer' + id = 'id' + privacy_policy = 'privacy_policy' + + _field_types = { + 'custom_disclaimer': 'LeadGenCustomDisclaimer', + 'id': 'string', + 'privacy_policy': 'LeadGenPrivacyPolicy', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/leadgenlegalcontentcheckbox.py b/facebook_business/adobjects/leadgenlegalcontentcheckbox.py new file mode 100644 index 000000000..1b41e6927 --- /dev/null +++ b/facebook_business/adobjects/leadgenlegalcontentcheckbox.py @@ -0,0 +1,48 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 LeadGenLegalContentCheckbox( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isLeadGenLegalContentCheckbox = True + super(LeadGenLegalContentCheckbox, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + is_checked_by_default = 'is_checked_by_default' + is_required = 'is_required' + key = 'key' + text = 'text' + + _field_types = { + 'id': 'string', + 'is_checked_by_default': 'bool', + 'is_required': 'bool', + 'key': 'string', + 'text': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/leadgenpostsubmissioncheckresult.py b/facebook_business/adobjects/leadgenpostsubmissioncheckresult.py index ed14cdb5e..e2f850cde 100644 --- a/facebook_business/adobjects/leadgenpostsubmissioncheckresult.py +++ b/facebook_business/adobjects/leadgenpostsubmissioncheckresult.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/leadgenprivacypolicy.py b/facebook_business/adobjects/leadgenprivacypolicy.py new file mode 100644 index 000000000..2a8ad4aa8 --- /dev/null +++ b/facebook_business/adobjects/leadgenprivacypolicy.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 LeadGenPrivacyPolicy( + AbstractObject, +): + + def __init__(self, api=None): + super(LeadGenPrivacyPolicy, self).__init__() + self._isLeadGenPrivacyPolicy = True + self._api = api + + class Field(AbstractObject.Field): + link_text = 'link_text' + url = 'url' + + _field_types = { + 'link_text': 'string', + 'url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/leadgenquestion.py b/facebook_business/adobjects/leadgenquestion.py index e7beaf6b2..ea55476d7 100644 --- a/facebook_business/adobjects/leadgenquestion.py +++ b/facebook_business/adobjects/leadgenquestion.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/leadgenquestionoption.py b/facebook_business/adobjects/leadgenquestionoption.py index d15670f0a..913295de3 100644 --- a/facebook_business/adobjects/leadgenquestionoption.py +++ b/facebook_business/adobjects/leadgenquestionoption.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/leadgenthankyoupage.py b/facebook_business/adobjects/leadgenthankyoupage.py new file mode 100644 index 000000000..8598d02cb --- /dev/null +++ b/facebook_business/adobjects/leadgenthankyoupage.py @@ -0,0 +1,60 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 LeadGenThankYouPage( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isLeadGenThankYouPage = True + super(LeadGenThankYouPage, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + body = 'body' + business_phone_number = 'business_phone_number' + button_text = 'button_text' + button_type = 'button_type' + country_code = 'country_code' + enable_messenger = 'enable_messenger' + id = 'id' + lead_gen_use_case = 'lead_gen_use_case' + status = 'status' + title = 'title' + website_url = 'website_url' + + _field_types = { + 'body': 'string', + 'business_phone_number': 'string', + 'button_text': 'string', + 'button_type': 'string', + 'country_code': 'string', + 'enable_messenger': 'bool', + 'id': 'string', + 'lead_gen_use_case': 'string', + 'status': 'string', + 'title': 'string', + 'website_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/leadgenthankyoupagegatedfile.py b/facebook_business/adobjects/leadgenthankyoupagegatedfile.py new file mode 100644 index 000000000..faca8faec --- /dev/null +++ b/facebook_business/adobjects/leadgenthankyoupagegatedfile.py @@ -0,0 +1,46 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 LeadGenThankYouPageGatedFile( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isLeadGenThankYouPageGatedFile = True + super(LeadGenThankYouPageGatedFile, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + file_cdn_url = 'file_cdn_url' + file_name = 'file_name' + file_size_bytes = 'file_size_bytes' + id = 'id' + + _field_types = { + 'file_cdn_url': 'string', + 'file_name': 'string', + 'file_size_bytes': 'int', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/leadgenthankyoupagegatedpromo.py b/facebook_business/adobjects/leadgenthankyoupagegatedpromo.py new file mode 100644 index 000000000..3343295ef --- /dev/null +++ b/facebook_business/adobjects/leadgenthankyoupagegatedpromo.py @@ -0,0 +1,44 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 LeadGenThankYouPageGatedPromo( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isLeadGenThankYouPageGatedPromo = True + super(LeadGenThankYouPageGatedPromo, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + online_offer_url = 'online_offer_url' + online_promo_code = 'online_promo_code' + + _field_types = { + 'id': 'string', + 'online_offer_url': 'string', + 'online_promo_code': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/leadgenurlentityatranges.py b/facebook_business/adobjects/leadgenurlentityatranges.py new file mode 100644 index 000000000..b9e1efc49 --- /dev/null +++ b/facebook_business/adobjects/leadgenurlentityatranges.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 LeadGenURLEntityAtRanges( + AbstractObject, +): + + def __init__(self, api=None): + super(LeadGenURLEntityAtRanges, self).__init__() + self._isLeadGenURLEntityAtRanges = True + self._api = api + + class Field(AbstractObject.Field): + length = 'length' + offset = 'offset' + url = 'url' + + _field_types = { + 'length': 'unsigned int', + 'offset': 'unsigned int', + 'url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/lifeevent.py b/facebook_business/adobjects/lifeevent.py index 5560aa197..397158a30 100644 --- a/facebook_business/adobjects/lifeevent.py +++ b/facebook_business/adobjects/lifeevent.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/link.py b/facebook_business/adobjects/link.py index ad2bdc4dd..46dbe5cc8 100644 --- a/facebook_business/adobjects/link.py +++ b/facebook_business/adobjects/link.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/linkedinstagramaccountdata.py b/facebook_business/adobjects/linkedinstagramaccountdata.py new file mode 100644 index 000000000..fcab894ff --- /dev/null +++ b/facebook_business/adobjects/linkedinstagramaccountdata.py @@ -0,0 +1,47 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 LinkedInstagramAccountData( + AbstractObject, +): + + def __init__(self, api=None): + super(LinkedInstagramAccountData, self).__init__() + self._isLinkedInstagramAccountData = True + self._api = api + + class Field(AbstractObject.Field): + access_token = 'access_token' + analytics_claim = 'analytics_claim' + full_name = 'full_name' + profile_picture_url = 'profile_picture_url' + user_id = 'user_id' + user_name = 'user_name' + + _field_types = { + 'access_token': 'string', + 'analytics_claim': 'string', + 'full_name': 'string', + 'profile_picture_url': 'string', + 'user_id': 'string', + 'user_name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/livevideo.py b/facebook_business/adobjects/livevideo.py index 7b89cc58f..30efbcccf 100644 --- a/facebook_business/adobjects/livevideo.py +++ b/facebook_business/adobjects/livevideo.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -256,7 +242,7 @@ def get_blocked_users(self, fields=None, params=None, batch=None, success=None, api_utils.warning('`success` and `failure` callback only work for batch call.') from facebook_business.adobjects.user import User param_types = { - 'uid': 'Object', + 'uid': 'string', } enums = { } @@ -320,7 +306,7 @@ def get_comments(self, fields=None, params=None, batch=None, success=None, failu self.assure_call() return request.execute() - def get_crosspost_shared_pages(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_crosspost_share_d_pages(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -562,7 +548,7 @@ def get_reactions(self, fields=None, params=None, batch=None, success=None, fail 'is_reference_only': 'bool', 'live_views': 'unsigned int', 'overlay_url': 'string', - 'permalink_url': 'Object', + 'permalink_url': 'string', 'planned_start_time': 'datetime', 'recommended_encoder_settings': 'LiveVideoRecommendedEncoderSettings', 'seconds_left': 'int', diff --git a/facebook_business/adobjects/livevideoadbreakconfig.py b/facebook_business/adobjects/livevideoadbreakconfig.py index 93d53ed38..01893bbe9 100644 --- a/facebook_business/adobjects/livevideoadbreakconfig.py +++ b/facebook_business/adobjects/livevideoadbreakconfig.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/livevideoerror.py b/facebook_business/adobjects/livevideoerror.py index f0b5a4675..aa053bf9a 100644 --- a/facebook_business/adobjects/livevideoerror.py +++ b/facebook_business/adobjects/livevideoerror.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/livevideoinputstream.py b/facebook_business/adobjects/livevideoinputstream.py index 4d0c1d8ff..64c8f984a 100644 --- a/facebook_business/adobjects/livevideoinputstream.py +++ b/facebook_business/adobjects/livevideoinputstream.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/livevideorecommendedencodersettings.py b/facebook_business/adobjects/livevideorecommendedencodersettings.py index 16fdae617..fa7d490b8 100644 --- a/facebook_business/adobjects/livevideorecommendedencodersettings.py +++ b/facebook_business/adobjects/livevideorecommendedencodersettings.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/livevideotargeting.py b/facebook_business/adobjects/livevideotargeting.py index 06dd7a81b..5df48e7d4 100644 --- a/facebook_business/adobjects/livevideotargeting.py +++ b/facebook_business/adobjects/livevideotargeting.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/localservicebusiness.py b/facebook_business/adobjects/localservicebusiness.py index 3d2c2bc3f..c688a7b70 100644 --- a/facebook_business/adobjects/localservicebusiness.py +++ b/facebook_business/adobjects/localservicebusiness.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -66,13 +52,16 @@ class Field(AbstractObject.Field): id = 'id' image_fetch_status = 'image_fetch_status' images = 'images' + local_info = 'local_info' local_service_business_id = 'local_service_business_id' + main_local_info = 'main_local_info' phone = 'phone' price = 'price' price_range = 'price_range' retailer_category = 'retailer_category' sanitized_images = 'sanitized_images' size = 'size' + tags = 'tags' title = 'title' unit_price = 'unit_price' url = 'url' @@ -83,6 +72,7 @@ class Availability: available_for_order = 'AVAILABLE_FOR_ORDER' discontinued = 'DISCONTINUED' in_stock = 'IN_STOCK' + mark_as_sold = 'MARK_AS_SOLD' out_of_stock = 'OUT_OF_STOCK' pending = 'PENDING' preorder = 'PREORDER' @@ -196,13 +186,16 @@ def get_channels_to_integrity_status(self, fields=None, params=None, batch=None, 'id': 'string', 'image_fetch_status': 'ImageFetchStatus', 'images': 'list', + 'local_info': 'ProductItemLocalInfo', 'local_service_business_id': 'string', + 'main_local_info': 'ProductItemLocalInfo', 'phone': 'string', 'price': 'string', 'price_range': 'string', 'retailer_category': 'string', 'sanitized_images': 'list', 'size': 'string', + 'tags': 'list', 'title': 'string', 'unit_price': 'Object', 'url': 'string', diff --git a/facebook_business/adobjects/location.py b/facebook_business/adobjects/location.py index d8ceaf3d0..fe4a46163 100644 --- a/facebook_business/adobjects/location.py +++ b/facebook_business/adobjects/location.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/locationbaseditem.py b/facebook_business/adobjects/locationbaseditem.py new file mode 100644 index 000000000..7bcc3b7ca --- /dev/null +++ b/facebook_business/adobjects/locationbaseditem.py @@ -0,0 +1,139 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 LocationBasedItem( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isLocationBasedItem = True + super(LocationBasedItem, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + applinks = 'applinks' + category_specific_fields = 'category_specific_fields' + currency = 'currency' + description = 'description' + id = 'id' + image_fetch_status = 'image_fetch_status' + images = 'images' + location_based_item_id = 'location_based_item_id' + name = 'name' + price = 'price' + sanitized_images = 'sanitized_images' + url = 'url' + visibility = 'visibility' + + class ImageFetchStatus: + direct_upload = 'DIRECT_UPLOAD' + fetched = 'FETCHED' + fetch_failed = 'FETCH_FAILED' + no_status = 'NO_STATUS' + outdated = 'OUTDATED' + partial_fetch = 'PARTIAL_FETCH' + + class Visibility: + published = 'PUBLISHED' + staging = 'STAGING' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=LocationBasedItem, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_channels_to_integrity_status(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.catalogitemchannelstointegritystatus import CatalogItemChannelsToIntegrityStatus + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/channels_to_integrity_status', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CatalogItemChannelsToIntegrityStatus, + api_type='EDGE', + response_parser=ObjectParser(target_class=CatalogItemChannelsToIntegrityStatus, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'applinks': 'CatalogItemAppLinks', + 'category_specific_fields': 'CatalogSubVerticalList', + 'currency': 'string', + 'description': 'string', + 'id': 'string', + 'image_fetch_status': 'ImageFetchStatus', + 'images': 'list', + 'location_based_item_id': 'string', + 'name': 'string', + 'price': 'string', + 'sanitized_images': 'list', + 'url': 'string', + 'visibility': 'Visibility', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ImageFetchStatus'] = LocationBasedItem.ImageFetchStatus.__dict__.values() + field_enum_info['Visibility'] = LocationBasedItem.Visibility.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/lookalikespec.py b/facebook_business/adobjects/lookalikespec.py index f730fa84e..9e6b8a6e0 100644 --- a/facebook_business/adobjects/lookalikespec.py +++ b/facebook_business/adobjects/lookalikespec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/loomconfig.py b/facebook_business/adobjects/loomconfig.py new file mode 100644 index 000000000..b3efbf7d0 --- /dev/null +++ b/facebook_business/adobjects/loomconfig.py @@ -0,0 +1,40 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 LoomConfig( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isLoomConfig = True + super(LoomConfig, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + + _field_types = { + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/mailingaddress.py b/facebook_business/adobjects/mailingaddress.py index 9918177d8..d6c00b2c0 100644 --- a/facebook_business/adobjects/mailingaddress.py +++ b/facebook_business/adobjects/mailingaddress.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/managedpartnerbusiness.py b/facebook_business/adobjects/managedpartnerbusiness.py index 1322704b8..19bea08bc 100644 --- a/facebook_business/adobjects/managedpartnerbusiness.py +++ b/facebook_business/adobjects/managedpartnerbusiness.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject @@ -49,7 +35,7 @@ class Field(AbstractObject.Field): _field_types = { 'ad_account': 'AdAccount', 'catalog_segment': 'ProductCatalog', - 'extended_credit': 'ExtendedCredit', + 'extended_credit': 'ManagedPartnerExtendedCredit', 'page': 'Page', 'seller_business_info': 'Object', 'seller_business_status': 'string', diff --git a/facebook_business/adobjects/managedpartnerextendedcredit.py b/facebook_business/adobjects/managedpartnerextendedcredit.py new file mode 100644 index 000000000..ddbaf7bc2 --- /dev/null +++ b/facebook_business/adobjects/managedpartnerextendedcredit.py @@ -0,0 +1,44 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ManagedPartnerExtendedCredit( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isManagedPartnerExtendedCredit = True + super(ManagedPartnerExtendedCredit, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + max_balance = 'max_balance' + receiving_credit_allocation_config = 'receiving_credit_allocation_config' + + _field_types = { + 'id': 'string', + 'max_balance': 'CurrencyAmount', + 'receiving_credit_allocation_config': 'ExtendedCreditAllocationConfig', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/marketingmessagetargeting.py b/facebook_business/adobjects/marketingmessagetargeting.py new file mode 100644 index 000000000..854ca2d2f --- /dev/null +++ b/facebook_business/adobjects/marketingmessagetargeting.py @@ -0,0 +1,45 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 MarketingMessageTargeting( + AbstractObject, +): + + def __init__(self, api=None): + super(MarketingMessageTargeting, self).__init__() + self._isMarketingMessageTargeting = True + self._api = api + + class Field(AbstractObject.Field): + automation_type = 'automation_type' + delay_send_time_second = 'delay_send_time_second' + delay_send_time_unit = 'delay_send_time_unit' + subscriber_lists = 'subscriber_lists' + targeting_rules = 'targeting_rules' + + _field_types = { + 'automation_type': 'string', + 'delay_send_time_second': 'unsigned int', + 'delay_send_time_unit': 'string', + 'subscriber_lists': 'list', + 'targeting_rules': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/mcexperienceconfigforapi.py b/facebook_business/adobjects/mcexperienceconfigforapi.py new file mode 100644 index 000000000..af010d7af --- /dev/null +++ b/facebook_business/adobjects/mcexperienceconfigforapi.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 MCExperienceConfigForApi( + AbstractObject, +): + + def __init__(self, api=None): + super(MCExperienceConfigForApi, self).__init__() + self._isMCExperienceConfigForApi = True + self._api = api + + class Field(AbstractObject.Field): + is_campaign_enabled = 'is_campaign_enabled' + is_terms_signed = 'is_terms_signed' + merchant_type = 'merchant_type' + + _field_types = { + 'is_campaign_enabled': 'bool', + 'is_terms_signed': 'bool', + 'merchant_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/mcominvoicebankaccount.py b/facebook_business/adobjects/mcominvoicebankaccount.py new file mode 100644 index 000000000..71b27bad3 --- /dev/null +++ b/facebook_business/adobjects/mcominvoicebankaccount.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 McomInvoiceBankAccount( + AbstractObject, +): + + def __init__(self, api=None): + super(McomInvoiceBankAccount, self).__init__() + self._isMcomInvoiceBankAccount = True + self._api = api + + class Field(AbstractObject.Field): + num_pending_verification_accounts = 'num_pending_verification_accounts' + num_verified_accounts = 'num_verified_accounts' + pending_verification_accounts = 'pending_verification_accounts' + verified_accounts = 'verified_accounts' + + _field_types = { + 'num_pending_verification_accounts': 'int', + 'num_verified_accounts': 'int', + 'pending_verification_accounts': 'list', + 'verified_accounts': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/mcominvoicedetails.py b/facebook_business/adobjects/mcominvoicedetails.py new file mode 100644 index 000000000..053f46e9e --- /dev/null +++ b/facebook_business/adobjects/mcominvoicedetails.py @@ -0,0 +1,73 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 McomInvoiceDetails( + AbstractObject, +): + + def __init__(self, api=None): + super(McomInvoiceDetails, self).__init__() + self._isMcomInvoiceDetails = True + self._api = api + + class Field(AbstractObject.Field): + additional_amounts = 'additional_amounts' + buyer_notes = 'buyer_notes' + currency_amount = 'currency_amount' + external_invoice_id = 'external_invoice_id' + features = 'features' + invoice_created = 'invoice_created' + invoice_id = 'invoice_id' + invoice_instructions = 'invoice_instructions' + invoice_instructions_image_url = 'invoice_instructions_image_url' + invoice_updated = 'invoice_updated' + outstanding_amount = 'outstanding_amount' + paid_amount = 'paid_amount' + payments = 'payments' + platform_logo_url = 'platform_logo_url' + platform_name = 'platform_name' + product_items = 'product_items' + shipping_address = 'shipping_address' + status = 'status' + tracking_info = 'tracking_info' + + _field_types = { + 'additional_amounts': 'list', + 'buyer_notes': 'string', + 'currency_amount': 'Object', + 'external_invoice_id': 'string', + 'features': 'Object', + 'invoice_created': 'int', + 'invoice_id': 'string', + 'invoice_instructions': 'string', + 'invoice_instructions_image_url': 'string', + 'invoice_updated': 'int', + 'outstanding_amount': 'Object', + 'paid_amount': 'Object', + 'payments': 'list', + 'platform_logo_url': 'string', + 'platform_name': 'string', + 'product_items': 'list', + 'shipping_address': 'Object', + 'status': 'string', + 'tracking_info': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/mcominvoicelists.py b/facebook_business/adobjects/mcominvoicelists.py new file mode 100644 index 000000000..96d4bfcbe --- /dev/null +++ b/facebook_business/adobjects/mcominvoicelists.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 McomInvoiceLists( + AbstractObject, +): + + def __init__(self, api=None): + super(McomInvoiceLists, self).__init__() + self._isMcomInvoiceLists = True + self._api = api + + class Field(AbstractObject.Field): + invoice_details = 'invoice_details' + invoice_ids = 'invoice_ids' + page_id = 'page_id' + + _field_types = { + 'invoice_details': 'list', + 'invoice_ids': 'list', + 'page_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/mcominvoicestatus.py b/facebook_business/adobjects/mcominvoicestatus.py new file mode 100644 index 000000000..48dfe0c67 --- /dev/null +++ b/facebook_business/adobjects/mcominvoicestatus.py @@ -0,0 +1,59 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 McomInvoiceStatus( + AbstractObject, +): + + def __init__(self, api=None): + super(McomInvoiceStatus, self).__init__() + self._isMcomInvoiceStatus = True + self._api = api + + class Field(AbstractObject.Field): + bank_account_number = 'bank_account_number' + bank_code = 'bank_code' + invoice_id = 'invoice_id' + invoice_status = 'invoice_status' + page_id = 'page_id' + payment_method = 'payment_method' + payment_type = 'payment_type' + payout_amount = 'payout_amount' + slip_verification_error = 'slip_verification_error' + slip_verification_status = 'slip_verification_status' + transaction_fee = 'transaction_fee' + transfer_slip = 'transfer_slip' + + _field_types = { + 'bank_account_number': 'string', + 'bank_code': 'string', + 'invoice_id': 'string', + 'invoice_status': 'string', + 'page_id': 'string', + 'payment_method': 'string', + 'payment_type': 'string', + 'payout_amount': 'Object', + 'slip_verification_error': 'string', + 'slip_verification_status': 'string', + 'transaction_fee': 'Object', + 'transfer_slip': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/mcomonboardingstatus.py b/facebook_business/adobjects/mcomonboardingstatus.py new file mode 100644 index 000000000..465c79051 --- /dev/null +++ b/facebook_business/adobjects/mcomonboardingstatus.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 McomOnboardingStatus( + AbstractObject, +): + + def __init__(self, api=None): + super(McomOnboardingStatus, self).__init__() + self._isMcomOnboardingStatus = True + self._api = api + + class Field(AbstractObject.Field): + onboarding_status = 'onboarding_status' + page_id = 'page_id' + + _field_types = { + 'onboarding_status': 'string', + 'page_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/mcompayouts.py b/facebook_business/adobjects/mcompayouts.py new file mode 100644 index 000000000..82a38ff78 --- /dev/null +++ b/facebook_business/adobjects/mcompayouts.py @@ -0,0 +1,49 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 McomPayouts( + AbstractObject, +): + + def __init__(self, api=None): + super(McomPayouts, self).__init__() + self._isMcomPayouts = True + self._api = api + + class Field(AbstractObject.Field): + number_of_orders = 'number_of_orders' + order_ids = 'order_ids' + payout_amount = 'payout_amount' + payout_provider_reference_id = 'payout_provider_reference_id' + payout_status = 'payout_status' + payout_time = 'payout_time' + provider = 'provider' + + _field_types = { + 'number_of_orders': 'int', + 'order_ids': 'list', + 'payout_amount': 'Object', + 'payout_provider_reference_id': 'string', + 'payout_status': 'string', + 'payout_time': 'int', + 'provider': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/measurementreport.py b/facebook_business/adobjects/measurementreport.py new file mode 100644 index 000000000..41a6dd540 --- /dev/null +++ b/facebook_business/adobjects/measurementreport.py @@ -0,0 +1,78 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 MeasurementReport( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isMeasurementReport = True + super(MeasurementReport, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + download_urls = 'download_urls' + id = 'id' + metadata = 'metadata' + report_type = 'report_type' + status = 'status' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=MeasurementReport, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'download_urls': 'list', + 'id': 'string', + 'metadata': 'map', + 'report_type': 'string', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/gameitem.py b/facebook_business/adobjects/mediacopyrightattribution.py similarity index 54% rename from facebook_business/adobjects/gameitem.py rename to facebook_business/adobjects/mediacopyrightattribution.py index 36a2ef4f8..0961d9dd5 100644 --- a/facebook_business/adobjects/gameitem.py +++ b/facebook_business/adobjects/mediacopyrightattribution.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -32,28 +18,31 @@ pull request for this class. """ -class GameItem( +class MediaCopyrightAttribution( AbstractCrudObject, ): def __init__(self, fbid=None, parent_id=None, api=None): - self._isGameItem = True - super(GameItem, self).__init__(fbid, parent_id, api) + self._isMediaCopyrightAttribution = True + super(MediaCopyrightAttribution, self).__init__(fbid, parent_id, api) class Field(AbstractObject.Field): - count = 'count' - created = 'created' - ext_id = 'ext_id' + attribution_ig_target_id = 'attribution_ig_target_id' + attribution_target_email_address = 'attribution_target_email_address' + attribution_target_id = 'attribution_target_id' + attribution_target_name = 'attribution_target_name' + attribution_type = 'attribution_type' + attribution_uri = 'attribution_uri' + copyright_count = 'copyright_count' + creation_time = 'creation_time' + creator = 'creator' id = 'id' - item_def = 'item_def' + is_enabled = 'is_enabled' + link_title = 'link_title' + match_count = 'match_count' owner = 'owner' status = 'status' - updated = 'updated' - - class Action: - consume = 'CONSUME' - drop = 'DROP' - mark = 'MARK' + title = 'title' def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils @@ -69,7 +58,7 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No endpoint='/', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=GameItem, + target_class=MediaCopyrightAttribution, api_type='NODE', response_parser=ObjectParser(reuse_object=self), ) @@ -86,19 +75,26 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No return request.execute() _field_types = { - 'count': 'int', - 'created': 'datetime', - 'ext_id': 'string', + 'attribution_ig_target_id': 'string', + 'attribution_target_email_address': 'string', + 'attribution_target_id': 'string', + 'attribution_target_name': 'string', + 'attribution_type': 'string', + 'attribution_uri': 'string', + 'copyright_count': 'int', + 'creation_time': 'datetime', + 'creator': 'Profile', 'id': 'string', - 'item_def': 'string', - 'owner': 'User', + 'is_enabled': 'bool', + 'link_title': 'string', + 'match_count': 'int', + 'owner': 'Page', 'status': 'string', - 'updated': 'datetime', + 'title': 'string', } @classmethod def _get_field_enum_info(cls): field_enum_info = {} - field_enum_info['Action'] = GameItem.Action.__dict__.values() return field_enum_info diff --git a/facebook_business/adobjects/mediacopyrightupdaterecord.py b/facebook_business/adobjects/mediacopyrightupdaterecord.py new file mode 100644 index 000000000..b3db2d7fa --- /dev/null +++ b/facebook_business/adobjects/mediacopyrightupdaterecord.py @@ -0,0 +1,82 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 MediaCopyrightUpdateRecord( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isMediaCopyrightUpdateRecord = True + super(MediaCopyrightUpdateRecord, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + action_types = 'action_types' + actor = 'actor' + actor_type = 'actor_type' + creation_time = 'creation_time' + id = 'id' + ownership_countries = 'ownership_countries' + whitelisted_accounts = 'whitelisted_accounts' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=MediaCopyrightUpdateRecord, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'action_types': 'list', + 'actor': 'User', + 'actor_type': 'string', + 'creation_time': 'datetime', + 'id': 'string', + 'ownership_countries': 'list', + 'whitelisted_accounts': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/mediafingerprint.py b/facebook_business/adobjects/mediafingerprint.py index 61b72e739..eca48c245 100644 --- a/facebook_business/adobjects/mediafingerprint.py +++ b/facebook_business/adobjects/mediafingerprint.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/mediatitle.py b/facebook_business/adobjects/mediatitle.py index 24c8c3fcb..007f348d9 100644 --- a/facebook_business/adobjects/mediatitle.py +++ b/facebook_business/adobjects/mediatitle.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -187,6 +173,7 @@ def get_augmented_realities_metadata(self, fields=None, params=None, batch=None, from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.dynamicarmetadata import DynamicARMetadata param_types = { } enums = { @@ -197,9 +184,9 @@ def get_augmented_realities_metadata(self, fields=None, params=None, batch=None, endpoint='/augmented_realities_metadata', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=DynamicARMetadata, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=DynamicARMetadata, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -248,6 +235,7 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.dynamicvideometadata import DynamicVideoMetadata param_types = { } enums = { @@ -258,9 +246,9 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None endpoint='/videos_metadata', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=DynamicVideoMetadata, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=DynamicVideoMetadata, api=self._api), ) request.add_params(params) request.add_fields(fields) diff --git a/facebook_business/adobjects/merchantcompliance.py b/facebook_business/adobjects/merchantcompliance.py new file mode 100644 index 000000000..8ab4b5d53 --- /dev/null +++ b/facebook_business/adobjects/merchantcompliance.py @@ -0,0 +1,45 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 MerchantCompliance( + AbstractObject, +): + + def __init__(self, api=None): + super(MerchantCompliance, self).__init__() + self._isMerchantCompliance = True + self._api = api + + class Field(AbstractObject.Field): + active_campaigns = 'active_campaigns' + compliance_status = 'compliance_status' + count_down_start_time = 'count_down_start_time' + purchase = 'purchase' + purchase_conversion_value = 'purchase_conversion_value' + + _field_types = { + 'active_campaigns': 'int', + 'compliance_status': 'string', + 'count_down_start_time': 'int', + 'purchase': 'int', + 'purchase_conversion_value': 'float', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/merchantreport.py b/facebook_business/adobjects/merchantreport.py new file mode 100644 index 000000000..d9a4d383a --- /dev/null +++ b/facebook_business/adobjects/merchantreport.py @@ -0,0 +1,65 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 MerchantReport( + AbstractObject, +): + + def __init__(self, api=None): + super(MerchantReport, self).__init__() + self._isMerchantReport = True + self._api = api + + class Field(AbstractObject.Field): + add_to_cart = 'add_to_cart' + brand = 'brand' + catalog_segment_id = 'catalog_segment_id' + catalog_segment_purchase_value = 'catalog_segment_purchase_value' + category = 'category' + date = 'date' + latest_date = 'latest_date' + link_clicks = 'link_clicks' + merchant_currency = 'merchant_currency' + page_id = 'page_id' + product_id = 'product_id' + product_quantity = 'product_quantity' + product_total_value = 'product_total_value' + purchase = 'purchase' + purchase_value = 'purchase_value' + + _field_types = { + 'add_to_cart': 'int', + 'brand': 'string', + 'catalog_segment_id': 'string', + 'catalog_segment_purchase_value': 'float', + 'category': 'string', + 'date': 'string', + 'latest_date': 'string', + 'link_clicks': 'int', + 'merchant_currency': 'string', + 'page_id': 'string', + 'product_id': 'string', + 'product_quantity': 'int', + 'product_total_value': 'float', + 'purchase': 'int', + 'purchase_value': 'float', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/messagingappsinfo.py b/facebook_business/adobjects/messagingappsinfo.py new file mode 100644 index 000000000..eb35ffdde --- /dev/null +++ b/facebook_business/adobjects/messagingappsinfo.py @@ -0,0 +1,46 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 MessagingAppsInfo( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isMessagingAppsInfo = True + super(MessagingAppsInfo, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + has_instagram_messaging_permission = 'has_instagram_messaging_permission' + has_messenger_messaging_permission = 'has_messenger_messaging_permission' + id = 'id' + name = 'name' + + _field_types = { + 'has_instagram_messaging_permission': 'bool', + 'has_messenger_messaging_permission': 'bool', + 'id': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/messagingfeaturereview.py b/facebook_business/adobjects/messagingfeaturereview.py index 5595028f3..98895916c 100644 --- a/facebook_business/adobjects/messagingfeaturereview.py +++ b/facebook_business/adobjects/messagingfeaturereview.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/messagingfeaturestatus.py b/facebook_business/adobjects/messagingfeaturestatus.py index 2e8ccd853..195627b30 100644 --- a/facebook_business/adobjects/messagingfeaturestatus.py +++ b/facebook_business/adobjects/messagingfeaturestatus.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject @@ -39,9 +25,13 @@ def __init__(self, api=None): class Field(AbstractObject.Field): hop_v2 = 'hop_v2' + ig_multi_app = 'ig_multi_app' + msgr_multi_app = 'msgr_multi_app' _field_types = { 'hop_v2': 'bool', + 'ig_multi_app': 'bool', + 'msgr_multi_app': 'bool', } @classmethod def _get_field_enum_info(cls): diff --git a/facebook_business/adobjects/messengeradspartialautomatedsteplist.py b/facebook_business/adobjects/messengeradspartialautomatedsteplist.py new file mode 100644 index 000000000..80cfe1243 --- /dev/null +++ b/facebook_business/adobjects/messengeradspartialautomatedsteplist.py @@ -0,0 +1,112 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 MessengerAdsPartialAutomatedStepList( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isMessengerAdsPartialAutomatedStepList = True + super(MessengerAdsPartialAutomatedStepList, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + fblead_form = 'fblead_form' + first_step_id = 'first_step_id' + id = 'id' + page = 'page' + privacy_url = 'privacy_url' + reminder_text = 'reminder_text' + stop_question_message = 'stop_question_message' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=MessengerAdsPartialAutomatedStepList, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_steps(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/steps', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'fblead_form': 'LeadgenForm', + 'first_step_id': 'string', + 'id': 'string', + 'page': 'Page', + 'privacy_url': 'string', + 'reminder_text': 'string', + 'stop_question_message': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/messengercallsettings.py b/facebook_business/adobjects/messengercallsettings.py new file mode 100644 index 000000000..2b5def61e --- /dev/null +++ b/facebook_business/adobjects/messengercallsettings.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 MessengerCallSettings( + AbstractObject, +): + + def __init__(self, api=None): + super(MessengerCallSettings, self).__init__() + self._isMessengerCallSettings = True + self._api = api + + class Field(AbstractObject.Field): + audio_enabled = 'audio_enabled' + + _field_types = { + 'audio_enabled': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/messengerdestinationpagewelcomemessage.py b/facebook_business/adobjects/messengerdestinationpagewelcomemessage.py index e4cb61242..2e4553124 100644 --- a/facebook_business/adobjects/messengerdestinationpagewelcomemessage.py +++ b/facebook_business/adobjects/messengerdestinationpagewelcomemessage.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/messengerprofile.py b/facebook_business/adobjects/messengerprofile.py index fff75d611..b38bb264b 100644 --- a/facebook_business/adobjects/messengerprofile.py +++ b/facebook_business/adobjects/messengerprofile.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -39,6 +25,7 @@ def __init__(self, api=None): class Field(AbstractObject.Field): account_linking_url = 'account_linking_url' + commands = 'commands' get_started = 'get_started' greeting = 'greeting' ice_breakers = 'ice_breakers' @@ -50,6 +37,7 @@ class Field(AbstractObject.Field): _field_types = { 'account_linking_url': 'string', + 'commands': 'list', 'get_started': 'Object', 'greeting': 'list', 'ice_breakers': 'list', diff --git a/facebook_business/adobjects/minimumbudget.py b/facebook_business/adobjects/minimumbudget.py index 37abd7eec..accd5ae76 100644 --- a/facebook_business/adobjects/minimumbudget.py +++ b/facebook_business/adobjects/minimumbudget.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/mixinsightsresult.py b/facebook_business/adobjects/mixinsightsresult.py new file mode 100644 index 000000000..bf1012893 --- /dev/null +++ b/facebook_business/adobjects/mixinsightsresult.py @@ -0,0 +1,77 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 MIXInsightsResult( + AbstractObject, +): + + def __init__(self, api=None): + super(MIXInsightsResult, self).__init__() + self._isMIXInsightsResult = True + self._api = api + + class Field(AbstractObject.Field): + daily_age_gender_breakdown = 'daily_age_gender_breakdown' + daily_audio_library_values = 'daily_audio_library_values' + daily_ugc_values = 'daily_ugc_values' + daily_values = 'daily_values' + metric = 'metric' + monthly_audio_library_values = 'monthly_audio_library_values' + monthly_ugc_values = 'monthly_ugc_values' + monthly_values = 'monthly_values' + percent_growth = 'percent_growth' + shielded_fields = 'shielded_fields' + total_age_gender_breakdown = 'total_age_gender_breakdown' + total_audio_library_value = 'total_audio_library_value' + total_country_breakdown = 'total_country_breakdown' + total_locale_breakdown = 'total_locale_breakdown' + total_product_breakdown = 'total_product_breakdown' + total_ugc_value = 'total_ugc_value' + total_value = 'total_value' + trending_age = 'trending_age' + trending_gender = 'trending_gender' + trending_interest = 'trending_interest' + trending_territory = 'trending_territory' + + _field_types = { + 'daily_age_gender_breakdown': 'list>>>', + 'daily_audio_library_values': 'list>', + 'daily_ugc_values': 'list>', + 'daily_values': 'list>', + 'metric': 'string', + 'monthly_audio_library_values': 'list>', + 'monthly_ugc_values': 'list>', + 'monthly_values': 'list>', + 'percent_growth': 'float', + 'shielded_fields': 'list>>>', + 'total_age_gender_breakdown': 'list>', + 'total_audio_library_value': 'int', + 'total_country_breakdown': 'list>', + 'total_locale_breakdown': 'list>', + 'total_product_breakdown': 'list>', + 'total_ugc_value': 'int', + 'total_value': 'int', + 'trending_age': 'list>>>', + 'trending_gender': 'list>>>', + 'trending_interest': 'list>>>', + 'trending_territory': 'list>>>', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/musicvideocopyright.py b/facebook_business/adobjects/musicvideocopyright.py index b5d551162..07f2bbd93 100644 --- a/facebook_business/adobjects/musicvideocopyright.py +++ b/facebook_business/adobjects/musicvideocopyright.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/musicworkcopyright.py b/facebook_business/adobjects/musicworkcopyright.py new file mode 100644 index 000000000..62105fd5e --- /dev/null +++ b/facebook_business/adobjects/musicworkcopyright.py @@ -0,0 +1,90 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 MusicWorkCopyright( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isMusicWorkCopyright = True + super(MusicWorkCopyright, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + available_ui_actions = 'available_ui_actions' + claim_status = 'claim_status' + creation_time = 'creation_time' + displayed_fb_matches_count = 'displayed_fb_matches_count' + displayed_ig_matches_count = 'displayed_ig_matches_count' + displayed_matches_count = 'displayed_matches_count' + id = 'id' + match_rule = 'match_rule' + status = 'status' + tags = 'tags' + update_time = 'update_time' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=MusicWorkCopyright, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'available_ui_actions': 'list', + 'claim_status': 'string', + 'creation_time': 'datetime', + 'displayed_fb_matches_count': 'int', + 'displayed_ig_matches_count': 'int', + 'displayed_matches_count': 'int', + 'id': 'string', + 'match_rule': 'VideoCopyrightRule', + 'status': 'string', + 'tags': 'list', + 'update_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/negativekeywordlist.py b/facebook_business/adobjects/negativekeywordlist.py new file mode 100644 index 000000000..2d4ac920f --- /dev/null +++ b/facebook_business/adobjects/negativekeywordlist.py @@ -0,0 +1,124 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 NegativeKeywordList( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isNegativeKeywordList = True + super(NegativeKeywordList, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + applied_active_ad_campaign_groups = 'applied_active_ad_campaign_groups' + applied_inactive_ad_campaign_groups = 'applied_inactive_ad_campaign_groups' + creator_id = 'creator_id' + id = 'id' + is_fully_reviewed = 'is_fully_reviewed' + last_update_time = 'last_update_time' + last_update_user_id = 'last_update_user_id' + list_name = 'list_name' + total_approved_keyword_count = 'total_approved_keyword_count' + total_declined_keyword_count = 'total_declined_keyword_count' + total_negative_keyword_count = 'total_negative_keyword_count' + total_validated_keyword_count = 'total_validated_keyword_count' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=NegativeKeywordList, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def api_update(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'business_id': 'unsigned int', + 'list_name': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=NegativeKeywordList, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'applied_active_ad_campaign_groups': 'list>', + 'applied_inactive_ad_campaign_groups': 'list>', + 'creator_id': 'string', + 'id': 'string', + 'is_fully_reviewed': 'bool', + 'last_update_time': 'datetime', + 'last_update_user_id': 'string', + 'list_name': 'string', + 'total_approved_keyword_count': 'int', + 'total_declined_keyword_count': 'int', + 'total_negative_keyword_count': 'int', + 'total_validated_keyword_count': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/nullnode.py b/facebook_business/adobjects/nullnode.py index 94b1f8535..93662daf7 100644 --- a/facebook_business/adobjects/nullnode.py +++ b/facebook_business/adobjects/nullnode.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/objectparser.py b/facebook_business/adobjects/objectparser.py index 692031621..d8466f5a8 100644 --- a/facebook_business/adobjects/objectparser.py +++ b/facebook_business/adobjects/objectparser.py @@ -1,28 +1,15 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.exceptions import ( FacebookBadObjectError, ) from facebook_business.adobjects.abstractobject import AbstractObject + class ObjectParser: """ Parser for API response @@ -36,7 +23,7 @@ def __init__( custom_parse_method=None, ): """ Initialize an ObjectParser. - To Initialize, you need to provide either a resuse_object, target_class, + To Initialize, you need to provide either a reuse_object, target_class, or an custom_parse_method. Args: api: FacebookAdsApi object. @@ -53,30 +40,48 @@ def __init__( self._custom_parse_method = custom_parse_method self._api = api - def parse_single(self, response): + def parse_single(self, response, override_target_class=None): if self._custom_parse_method is not None: return self._custom_parse_method(response, self._api) + from .ad import Ad + from .adpreview import AdPreview + from .adset import AdSet + from .campaign import Campaign + data = response if 'data' in response and isinstance(response['data'], dict): data = response['data'] elif 'images' in response and not isinstance(data['images'], list): _, data = data['images'].popitem() - if 'campaigns' in data: - _, data = data['campaigns'].popitem() - elif 'adsets' in data: - _, data = data['adsets'].popitem() - elif 'ads' in data: - _, data = data['ads'].popitem() + + subfields = ( + ('campaigns', Campaign), + ('adsets', AdSet), + ('ads', Ad), + ('previews', AdPreview), + ) + for subfield, _class in subfields: + if subfield not in data: + continue + + data[subfield] = [ + self.parse_single( + item, override_target_class=_class + ) for item in data[subfield]['data'] + ] + if 'success' in data: del data['success'] + target_class = override_target_class or self._target_class + if self._reuse_object is not None: self._reuse_object._set_data(data) return self._reuse_object elif self._target_class is not None: return AbstractObject.create_object(self._api, data, - self._target_class) + target_class) else: raise FacebookBadObjectError( 'Must specify either target class calling object' + diff --git a/facebook_business/adobjects/offlineconversiondataset.py b/facebook_business/adobjects/offlineconversiondataset.py index 2a2575da6..9e926c29b 100644 --- a/facebook_business/adobjects/offlineconversiondataset.py +++ b/facebook_business/adobjects/offlineconversiondataset.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -73,59 +59,6 @@ class Field(AbstractObject.Field): owner_business = 'owner_business' usage = 'usage' valid_entries = 'valid_entries' - auto_assign_to_new_accounts_only = 'auto_assign_to_new_accounts_only' - - class PermittedRoles: - admin = 'ADMIN' - advertiser = 'ADVERTISER' - uploader = 'UPLOADER' - - class RelationshipType: - ad_manager = 'AD_MANAGER' - agency = 'AGENCY' - aggregator = 'AGGREGATOR' - audience_manager = 'AUDIENCE_MANAGER' - other = 'OTHER' - - # @deprecated get_endpoint function is deprecated - @classmethod - def get_endpoint(cls): - return 'offline_conversion_data_sets' - - # @deprecated api_create is being deprecated - def api_create(self, parent_id, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.adobjects.business import Business - return Business(api=self._api, fbid=parent_id).create_offline_conversion_data_set(fields, params, batch, success, failure, pending) - - def api_delete(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='DELETE', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, - api_type='NODE', - response_parser=ObjectParser(reuse_object=self), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils @@ -157,40 +90,6 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No self.assure_call() return request.execute() - def api_update(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'auto_assign_to_new_accounts_only': 'bool', - 'description': 'string', - 'enable_auto_assign_to_accounts': 'bool', - 'name': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=OfflineConversionDataSet, - api_type='NODE', - response_parser=ObjectParser(reuse_object=self), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - def get_ad_accounts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -223,39 +122,6 @@ def get_ad_accounts(self, fields=None, params=None, batch=None, success=None, fa self.assure_call() return request.execute() - def create_ad_account(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'account_id': 'string', - 'auto_track_for_ads': 'bool', - 'business': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/adaccounts', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=OfflineConversionDataSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=OfflineConversionDataSet, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - def get_agencies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -287,42 +153,6 @@ def get_agencies(self, fields=None, params=None, batch=None, success=None, failu self.assure_call() return request.execute() - def create_agency(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'business': 'string', - 'other_relationship': 'string', - 'permitted_roles': 'list', - 'relationship_type': 'list', - } - enums = { - 'permitted_roles_enum': OfflineConversionDataSet.PermittedRoles.__dict__.values(), - 'relationship_type_enum': OfflineConversionDataSet.RelationshipType.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/agencies', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=OfflineConversionDataSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=OfflineConversionDataSet, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - def get_audiences(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -420,7 +250,7 @@ def get_server_events_permitted_business(self, fields=None, params=None, batch=N self.assure_call() return request.execute() - def get_shared_accounts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_share_d_accounts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -454,7 +284,7 @@ def get_shared_accounts(self, fields=None, params=None, batch=None, success=None self.assure_call() return request.execute() - def get_shared_agencies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_share_d_agencies(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -570,70 +400,6 @@ def get_uploads(self, fields=None, params=None, batch=None, success=None, failur self.assure_call() return request.execute() - def create_upload(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.offlineconversiondatasetupload import OfflineConversionDataSetUpload - param_types = { - 'upload_tag': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/uploads', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=OfflineConversionDataSetUpload, - api_type='EDGE', - response_parser=ObjectParser(target_class=OfflineConversionDataSetUpload, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - - def create_validate(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'data': 'list', - 'namespace_id': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/validate', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=OfflineConversionDataSet, - api_type='EDGE', - response_parser=ObjectParser(target_class=OfflineConversionDataSet, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - _field_types = { 'automatic_matching_fields': 'list', 'business': 'Business', @@ -667,13 +433,10 @@ def create_validate(self, fields=None, params=None, batch=None, success=None, fa 'owner_business': 'Business', 'usage': 'OfflineConversionDataSetUsage', 'valid_entries': 'int', - 'auto_assign_to_new_accounts_only': 'bool', } @classmethod def _get_field_enum_info(cls): field_enum_info = {} - field_enum_info['PermittedRoles'] = OfflineConversionDataSet.PermittedRoles.__dict__.values() - field_enum_info['RelationshipType'] = OfflineConversionDataSet.RelationshipType.__dict__.values() return field_enum_info diff --git a/facebook_business/adobjects/offlineconversiondatasetactivities.py b/facebook_business/adobjects/offlineconversiondatasetactivities.py new file mode 100644 index 000000000..9b348650a --- /dev/null +++ b/facebook_business/adobjects/offlineconversiondatasetactivities.py @@ -0,0 +1,53 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 OfflineConversionDataSetActivities( + AbstractObject, +): + + def __init__(self, api=None): + super(OfflineConversionDataSetActivities, self).__init__() + self._isOfflineConversionDataSetActivities = True + self._api = api + + class Field(AbstractObject.Field): + actor_id = 'actor_id' + actor_name = 'actor_name' + adaccount_id = 'adaccount_id' + adaccount_name = 'adaccount_name' + event_time = 'event_time' + event_type = 'event_type' + extra_data = 'extra_data' + object_id = 'object_id' + object_name = 'object_name' + + _field_types = { + 'actor_id': 'int', + 'actor_name': 'string', + 'adaccount_id': 'int', + 'adaccount_name': 'string', + 'event_time': 'datetime', + 'event_type': 'string', + 'extra_data': 'string', + 'object_id': 'int', + 'object_name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/offlineconversiondatasetoptimizationstatus.py b/facebook_business/adobjects/offlineconversiondatasetoptimizationstatus.py new file mode 100644 index 000000000..f6f2a67fb --- /dev/null +++ b/facebook_business/adobjects/offlineconversiondatasetoptimizationstatus.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 OfflineConversionDataSetOptimizationStatus( + AbstractObject, +): + + def __init__(self, api=None): + super(OfflineConversionDataSetOptimizationStatus, self).__init__() + self._isOfflineConversionDataSetOptimizationStatus = True + self._api = api + + class Field(AbstractObject.Field): + event = 'event' + last_changed_time = 'last_changed_time' + last_detected_time = 'last_detected_time' + status = 'status' + + _field_types = { + 'event': 'string', + 'last_changed_time': 'int', + 'last_detected_time': 'int', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/offlineconversiondatasetpermissions.py b/facebook_business/adobjects/offlineconversiondatasetpermissions.py index 0e348ec08..0463f5659 100644 --- a/facebook_business/adobjects/offlineconversiondatasetpermissions.py +++ b/facebook_business/adobjects/offlineconversiondatasetpermissions.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/offlineconversiondatasetupload.py b/facebook_business/adobjects/offlineconversiondatasetupload.py index 93f5a1ded..57132d31c 100644 --- a/facebook_business/adobjects/offlineconversiondatasetupload.py +++ b/facebook_business/adobjects/offlineconversiondatasetupload.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/offlineconversiondatasetusage.py b/facebook_business/adobjects/offlineconversiondatasetusage.py index 2f516cfd2..ee0f4839d 100644 --- a/facebook_business/adobjects/offlineconversiondatasetusage.py +++ b/facebook_business/adobjects/offlineconversiondatasetusage.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/offlineproductitem.py b/facebook_business/adobjects/offlineproductitem.py new file mode 100644 index 000000000..a1ae9d808 --- /dev/null +++ b/facebook_business/adobjects/offlineproductitem.py @@ -0,0 +1,145 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 OfflineProductItem( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isOfflineProductItem = True + super(OfflineProductItem, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + applinks = 'applinks' + brand = 'brand' + category = 'category' + category_specific_fields = 'category_specific_fields' + currency = 'currency' + description = 'description' + id = 'id' + image_fetch_status = 'image_fetch_status' + image_url = 'image_url' + images = 'images' + name = 'name' + offline_product_item_id = 'offline_product_item_id' + price = 'price' + sanitized_images = 'sanitized_images' + url = 'url' + visibility = 'visibility' + + class ImageFetchStatus: + direct_upload = 'DIRECT_UPLOAD' + fetched = 'FETCHED' + fetch_failed = 'FETCH_FAILED' + no_status = 'NO_STATUS' + outdated = 'OUTDATED' + partial_fetch = 'PARTIAL_FETCH' + + class Visibility: + published = 'PUBLISHED' + staging = 'STAGING' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=OfflineProductItem, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_channels_to_integrity_status(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.catalogitemchannelstointegritystatus import CatalogItemChannelsToIntegrityStatus + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/channels_to_integrity_status', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CatalogItemChannelsToIntegrityStatus, + api_type='EDGE', + response_parser=ObjectParser(target_class=CatalogItemChannelsToIntegrityStatus, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'applinks': 'CatalogItemAppLinks', + 'brand': 'string', + 'category': 'string', + 'category_specific_fields': 'CatalogSubVerticalList', + 'currency': 'string', + 'description': 'string', + 'id': 'string', + 'image_fetch_status': 'ImageFetchStatus', + 'image_url': 'string', + 'images': 'list', + 'name': 'string', + 'offline_product_item_id': 'string', + 'price': 'string', + 'sanitized_images': 'list', + 'url': 'string', + 'visibility': 'Visibility', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ImageFetchStatus'] = OfflineProductItem.ImageFetchStatus.__dict__.values() + field_enum_info['Visibility'] = OfflineProductItem.Visibility.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/offlinetermsofservice.py b/facebook_business/adobjects/offlinetermsofservice.py new file mode 100644 index 000000000..762b0d22e --- /dev/null +++ b/facebook_business/adobjects/offlinetermsofservice.py @@ -0,0 +1,74 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 OfflineTermsOfService( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isOfflineTermsOfService = True + super(OfflineTermsOfService, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + accept_time = 'accept_time' + id = 'id' + signed_by_user = 'signed_by_user' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=OfflineTermsOfService, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'accept_time': 'int', + 'id': 'string', + 'signed_by_user': 'User', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/offsitepixel.py b/facebook_business/adobjects/offsitepixel.py index 042864e43..89e80308f 100644 --- a/facebook_business/adobjects/offsitepixel.py +++ b/facebook_business/adobjects/offsitepixel.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/offsitesignalcontainerbusinessobject.py b/facebook_business/adobjects/offsitesignalcontainerbusinessobject.py new file mode 100644 index 000000000..529603d66 --- /dev/null +++ b/facebook_business/adobjects/offsitesignalcontainerbusinessobject.py @@ -0,0 +1,144 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 OffsiteSignalContainerBusinessObject( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isOffsiteSignalContainerBusinessObject = True + super(OffsiteSignalContainerBusinessObject, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + business = 'business' + id = 'id' + is_eligible_for_sharing_to_ad_account = 'is_eligible_for_sharing_to_ad_account' + is_eligible_for_sharing_to_business = 'is_eligible_for_sharing_to_business' + is_unavailable = 'is_unavailable' + name = 'name' + primary_container_id = 'primary_container_id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=OffsiteSignalContainerBusinessObject, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_linked_application(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adsdataset import AdsDataset + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/linked_application', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsDataset, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdsDataset, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_linked_page(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.page import Page + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/linked_page', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Page, + api_type='EDGE', + response_parser=ObjectParser(target_class=Page, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'business': 'Business', + 'id': 'string', + 'is_eligible_for_sharing_to_ad_account': 'bool', + 'is_eligible_for_sharing_to_business': 'bool', + 'is_unavailable': 'bool', + 'name': 'string', + 'primary_container_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/omegacustomertrx.py b/facebook_business/adobjects/omegacustomertrx.py index 1aca73b91..a91c7de59 100644 --- a/facebook_business/adobjects/omegacustomertrx.py +++ b/facebook_business/adobjects/omegacustomertrx.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/openbridgeconfiguration.py b/facebook_business/adobjects/openbridgeconfiguration.py index 58fe7db8f..6b9291c60 100644 --- a/facebook_business/adobjects/openbridgeconfiguration.py +++ b/facebook_business/adobjects/openbridgeconfiguration.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -41,12 +27,14 @@ def __init__(self, fbid=None, parent_id=None, api=None): super(OpenBridgeConfiguration, self).__init__(fbid, parent_id, api) class Field(AbstractObject.Field): - access_key = 'access_key' active = 'active' endpoint = 'endpoint' + fallback_domain = 'fallback_domain' + fallback_domain_enabled = 'fallback_domain_enabled' host_business_id = 'host_business_id' host_external_id = 'host_external_id' id = 'id' + instance_id = 'instance_id' pixel_id = 'pixel_id' # @deprecated get_endpoint function is deprecated @@ -124,11 +112,13 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') param_types = { - 'access_key': 'string', 'active': 'bool', 'endpoint': 'string', + 'fallback_domain': 'string', + 'fallback_domain_enabled': 'bool', 'host_business_id': 'unsigned int', 'host_external_id': 'string', + 'instance_id': 'string', } enums = { } @@ -155,12 +145,14 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure return request.execute() _field_types = { - 'access_key': 'string', 'active': 'bool', 'endpoint': 'string', + 'fallback_domain': 'string', + 'fallback_domain_enabled': 'bool', 'host_business_id': 'string', 'host_external_id': 'string', 'id': 'string', + 'instance_id': 'string', 'pixel_id': 'string', } @classmethod diff --git a/facebook_business/adobjects/opengraphcontext.py b/facebook_business/adobjects/opengraphcontext.py index 974ffaffc..f864f217e 100644 --- a/facebook_business/adobjects/opengraphcontext.py +++ b/facebook_business/adobjects/opengraphcontext.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/orderidattributions.py b/facebook_business/adobjects/orderidattributions.py new file mode 100644 index 000000000..ccaa3d55f --- /dev/null +++ b/facebook_business/adobjects/orderidattributions.py @@ -0,0 +1,53 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 OrderIDAttributions( + AbstractObject, +): + + def __init__(self, api=None): + super(OrderIDAttributions, self).__init__() + self._isOrderIDAttributions = True + self._api = api + + class Field(AbstractObject.Field): + app_id = 'app_id' + attribution_type = 'attribution_type' + attributions = 'attributions' + conversion_device = 'conversion_device' + dataset_id = 'dataset_id' + holdout_status = 'holdout_status' + order_id = 'order_id' + order_timestamp = 'order_timestamp' + pixel_id = 'pixel_id' + + _field_types = { + 'app_id': 'string', + 'attribution_type': 'string', + 'attributions': 'list', + 'conversion_device': 'string', + 'dataset_id': 'string', + 'holdout_status': 'list', + 'order_id': 'string', + 'order_timestamp': 'datetime', + 'pixel_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/organization.py b/facebook_business/adobjects/organization.py new file mode 100644 index 000000000..d621d098e --- /dev/null +++ b/facebook_business/adobjects/organization.py @@ -0,0 +1,78 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 Organization( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isOrganization = True + super(Organization, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + hq_country = 'hq_country' + id = 'id' + legal_entity_name = 'legal_entity_name' + master_bm_id = 'master_bm_id' + owner_business = 'owner_business' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Organization, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'hq_country': 'string', + 'id': 'string', + 'legal_entity_name': 'string', + 'master_bm_id': 'string', + 'owner_business': 'Business', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/outcomepredictionpoint.py b/facebook_business/adobjects/outcomepredictionpoint.py index f6bd7d5c8..f47f6fc69 100644 --- a/facebook_business/adobjects/outcomepredictionpoint.py +++ b/facebook_business/adobjects/outcomepredictionpoint.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/owneddomain.py b/facebook_business/adobjects/owneddomain.py new file mode 100644 index 000000000..0db6f6fb9 --- /dev/null +++ b/facebook_business/adobjects/owneddomain.py @@ -0,0 +1,78 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 OwnedDomain( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isOwnedDomain = True + super(OwnedDomain, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + domain_name = 'domain_name' + id = 'id' + owner_business = 'owner_business' + status = 'status' + verification_code = 'verification_code' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=OwnedDomain, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'domain_name': 'string', + 'id': 'string', + 'owner_business': 'Business', + 'status': 'string', + 'verification_code': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/p2minvoicepayments.py b/facebook_business/adobjects/p2minvoicepayments.py new file mode 100644 index 000000000..7373896b5 --- /dev/null +++ b/facebook_business/adobjects/p2minvoicepayments.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 P2MInvoicePayments( + AbstractObject, +): + + def __init__(self, api=None): + super(P2MInvoicePayments, self).__init__() + self._isP2MInvoicePayments = True + self._api = api + + class Field(AbstractObject.Field): + page_id = 'page_id' + payments = 'payments' + + _field_types = { + 'page_id': 'string', + 'payments': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/page.py b/facebook_business/adobjects/page.py index 5c17896bd..c3b65b0ea 100644 --- a/facebook_business/adobjects/page.py +++ b/facebook_business/adobjects/page.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -48,6 +34,7 @@ class Field(AbstractObject.Field): app_id = 'app_id' artists_we_like = 'artists_we_like' attire = 'attire' + available_promo_offer_ids = 'available_promo_offer_ids' awards = 'awards' band_interests = 'band_interests' band_members = 'band_members' @@ -55,6 +42,7 @@ class Field(AbstractObject.Field): bio = 'bio' birthday = 'birthday' booking_agent = 'booking_agent' + breaking_news_usage = 'breaking_news_usage' built = 'built' business = 'business' can_checkin = 'can_checkin' @@ -78,6 +66,7 @@ class Field(AbstractObject.Field): directed_by = 'directed_by' display_subtext = 'display_subtext' displayed_message_response_time = 'displayed_message_response_time' + does_viewer_have_page_permission_link_ig = 'does_viewer_have_page_permission_link_ig' emails = 'emails' engagement = 'engagement' fan_count = 'fan_count' @@ -92,6 +81,7 @@ class Field(AbstractObject.Field): global_brand_page_name = 'global_brand_page_name' global_brand_root_id = 'global_brand_root_id' has_added_app = 'has_added_app' + has_lead_access = 'has_lead_access' has_transitioned_to_new_page_experience = 'has_transitioned_to_new_page_experience' has_whatsapp_business_number = 'has_whatsapp_business_number' has_whatsapp_number = 'has_whatsapp_number' @@ -102,9 +92,11 @@ class Field(AbstractObject.Field): influences = 'influences' instagram_business_account = 'instagram_business_account' is_always_open = 'is_always_open' + is_calling_eligible = 'is_calling_eligible' is_chain = 'is_chain' is_community_page = 'is_community_page' is_eligible_for_branded_content = 'is_eligible_for_branded_content' + 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' is_messenger_bot_get_started_enabled = 'is_messenger_bot_get_started_enabled' is_messenger_platform_bot = 'is_messenger_platform_bot' is_owned = 'is_owned' @@ -124,7 +116,6 @@ class Field(AbstractObject.Field): merchant_review_status = 'merchant_review_status' messaging_feature_status = 'messaging_feature_status' messenger_ads_default_icebreakers = 'messenger_ads_default_icebreakers' - messenger_ads_default_page_welcome_message = 'messenger_ads_default_page_welcome_message' messenger_ads_default_quick_replies = 'messenger_ads_default_quick_replies' messenger_ads_quick_replies_type = 'messenger_ads_quick_replies_type' mini_shop_storefront = 'mini_shop_storefront' @@ -179,6 +170,7 @@ class Field(AbstractObject.Field): unread_message_count = 'unread_message_count' unread_notif_count = 'unread_notif_count' unseen_message_count = 'unseen_message_count' + user_access_expire_time = 'user_access_expire_time' username = 'username' verification_status = 'verification_status' voip_info = 'voip_info' @@ -353,12 +345,6 @@ class BackdatedTimeGranularity: none = 'none' year = 'year' - class CheckinEntryPoint: - branding_checkin = 'BRANDING_CHECKIN' - branding_other = 'BRANDING_OTHER' - branding_photo = 'BRANDING_PHOTO' - branding_status = 'BRANDING_STATUS' - class Formatting: markdown = 'MARKDOWN' plaintext = 'PLAINTEXT' @@ -444,7 +430,6 @@ class Model: class DeveloperAction: enable_followup_message = 'ENABLE_FOLLOWUP_MESSAGE' - send_re_optin = 'SEND_RE_OPTIN' class SubscribedFields: affiliation = 'affiliation' @@ -452,6 +437,7 @@ class SubscribedFields: awards = 'awards' bio = 'bio' birthday = 'birthday' + calls = 'calls' category = 'category' checkins = 'checkins' company_overview = 'company_overview' @@ -468,8 +454,8 @@ class SubscribedFields: group_feed = 'group_feed' hometown = 'hometown' hours = 'hours' - in_thread_lead_form_submit = 'in_thread_lead_form_submit' inbox_labels = 'inbox_labels' + invalid_topic_placeholder = 'invalid_topic_placeholder' invoice_access_bank_slip_events = 'invoice_access_bank_slip_events' invoice_access_invoice_change = 'invoice_access_invoice_change' invoice_access_invoice_draft_change = 'invoice_access_invoice_draft_change' @@ -486,6 +472,7 @@ class SubscribedFields: message_context = 'message_context' message_deliveries = 'message_deliveries' message_echoes = 'message_echoes' + message_edits = 'message_edits' message_mention = 'message_mention' message_reactions = 'message_reactions' message_reads = 'message_reads' @@ -499,6 +486,7 @@ class SubscribedFields: messaging_feedback = 'messaging_feedback' messaging_game_plays = 'messaging_game_plays' messaging_handovers = 'messaging_handovers' + messaging_in_thread_lead_form_submit = 'messaging_in_thread_lead_form_submit' messaging_optins = 'messaging_optins' messaging_optouts = 'messaging_optouts' messaging_payments = 'messaging_payments' @@ -508,11 +496,13 @@ class SubscribedFields: messaging_referrals = 'messaging_referrals' mission = 'mission' name = 'name' + otp_verification = 'otp_verification' page_about_story = 'page_about_story' page_change_proposal = 'page_change_proposal' page_upcoming_change = 'page_upcoming_change' parking = 'parking' payment_options = 'payment_options' + payment_request_update = 'payment_request_update' personal_info = 'personal_info' personal_interests = 'personal_interests' phone = 'phone' @@ -524,6 +514,7 @@ class SubscribedFields: publisher_subscriptions = 'publisher_subscriptions' ratings = 'ratings' registration = 'registration' + response_feedback = 'response_feedback' send_cart = 'send_cart' standby = 'standby' user_action = 'user_action' @@ -531,6 +522,12 @@ class SubscribedFields: videos = 'videos' website = 'website' + class Action: + spam = 'SPAM' + + class ActionType: + report_thread = 'REPORT_THREAD' + # @deprecated get_endpoint function is deprecated @classmethod def get_endpoint(cls): @@ -656,6 +653,76 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure self.assure_call() return request.execute() + def get_ab_tests(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.pagepostexperiment import PagePostExperiment + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/ab_tests', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PagePostExperiment, + api_type='EDGE', + response_parser=ObjectParser(target_class=PagePostExperiment, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_ab_test(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.pagepostexperiment import PagePostExperiment + param_types = { + 'control_video_id': 'string', + 'description': 'string', + 'duration': 'unsigned int', + 'experiment_video_ids': 'list', + 'name': 'string', + 'optimization_goal': 'optimization_goal_enum', + 'scheduled_experiment_timestamp': 'unsigned int', + } + enums = { + 'optimization_goal_enum': PagePostExperiment.OptimizationGoal.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/ab_tests', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PagePostExperiment, + api_type='EDGE', + response_parser=ObjectParser(target_class=PagePostExperiment, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def create_acknowledge_order(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -853,6 +920,7 @@ def get_ar_experience(self, fields=None, params=None, batch=None, success=None, from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.aradsdatacontainer import ArAdsDataContainer param_types = { } enums = { @@ -863,9 +931,9 @@ def get_ar_experience(self, fields=None, params=None, batch=None, success=None, endpoint='/ar_experience', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=ArAdsDataContainer, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=ArAdsDataContainer, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -1047,10 +1115,10 @@ def create_blocked(self, fields=None, params=None, batch=None, success=None, fai if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') param_types = { - 'asid': 'list', + 'asid': 'list', 'psid': 'list', - 'uid': 'list', - 'user': 'list', + 'uid': 'list', + 'user': 'list', } enums = { } @@ -1113,6 +1181,7 @@ def get_business_projects(self, fields=None, params=None, batch=None, success=No from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.businessproject import BusinessProject param_types = { 'business': 'string', } @@ -1124,9 +1193,9 @@ def get_business_projects(self, fields=None, params=None, batch=None, success=No endpoint='/businessprojects', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=BusinessProject, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=BusinessProject, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -1171,6 +1240,50 @@ def get_call_to_actions(self, fields=None, params=None, batch=None, success=None self.assure_call() return request.execute() + def create_call(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'action': 'action_enum', + 'call_id': 'string', + 'platform': 'platform_enum', + 'session': 'map', + 'to': 'string', + } + enums = { + 'action_enum': [ + 'ACCEPT', + 'REJECT', + 'TERMINATE', + ], + 'platform_enum': [ + 'INSTAGRAM', + 'MESSENGER', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/calls', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_canvas_elements(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -1395,37 +1508,6 @@ def create_chat_plugin(self, fields=None, params=None, batch=None, success=None, self.assure_call() return request.execute() - def get_commerce_eligibility(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.pagecommerceeligibility import PageCommerceEligibility - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/commerce_eligibility', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=PageCommerceEligibility, - api_type='EDGE', - response_parser=ObjectParser(target_class=PageCommerceEligibility, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - def get_commerce_merchant_settings(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -1601,6 +1683,7 @@ def create_copyright_manual_claim(self, fields=None, params=None, batch=None, su from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.videocopyrightmatch import VideoCopyrightMatch param_types = { 'action': 'action_enum', 'action_reason': 'action_reason_enum', @@ -1608,30 +1691,12 @@ def create_copyright_manual_claim(self, fields=None, params=None, batch=None, su 'match_content_type': 'match_content_type_enum', 'matched_asset_id': 'string', 'reference_asset_id': 'string', + 'selected_segments': 'list', } enums = { - 'action_enum': [ - 'BLOCK', - 'CLAIM_AD_EARNINGS', - 'MANUAL_REVIEW', - 'MONITOR', - 'REQUEST_TAKEDOWN', - ], - 'action_reason_enum': [ - 'ARTICLE_17_PREFLAGGING', - 'ARTIST_OBJECTION', - 'OBJECTIONABLE_CONTENT', - 'PREMIUM_MUSIC_VIDEO', - 'PRERELEASE_CONTENT', - 'PRODUCT_PARAMETERS', - 'RESTRICTED_CONTENT', - 'UNAUTHORIZED_COMMERCIAL_USE', - ], - 'match_content_type_enum': [ - 'AUDIO_ONLY', - 'VIDEO_AND_AUDIO', - 'VIDEO_ONLY', - ], + 'action_enum': VideoCopyrightMatch.Action.__dict__.values(), + 'action_reason_enum': VideoCopyrightMatch.ActionReason.__dict__.values(), + 'match_content_type_enum': VideoCopyrightMatch.MatchContentType.__dict__.values(), } request = FacebookRequest( node_id=self['id'], @@ -1639,9 +1704,9 @@ def create_copyright_manual_claim(self, fields=None, params=None, batch=None, su endpoint='/copyright_manual_claims', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=VideoCopyrightMatch, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=VideoCopyrightMatch, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -1848,6 +1913,68 @@ def create_custom_user_setting(self, fields=None, params=None, batch=None, succe self.assure_call() return request.execute() + def get_data_set(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adspixel import AdsPixel + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/dataset', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsPixel, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdsPixel, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_data_set(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.adspixel import AdsPixel + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/dataset', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AdsPixel, + api_type='EDGE', + response_parser=ObjectParser(target_class=AdsPixel, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_events(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -1922,6 +2049,7 @@ def get_fantasy_games(self, fields=None, params=None, batch=None, success=None, from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.fantasygame import FantasyGame param_types = { } enums = { @@ -1932,9 +2060,9 @@ def get_fantasy_games(self, fields=None, params=None, batch=None, success=None, endpoint='/fantasy_games', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=FantasyGame, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=FantasyGame, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -1990,7 +2118,6 @@ def create_feed(self, fields=None, params=None, batch=None, success=None, failur api_utils.warning('`success` and `failure` callback only work for batch call.') param_types = { 'actions': 'Object', - 'adaptive_type': 'string', 'album_id': 'string', 'android_key_hash': 'string', 'animated_effect_id': 'unsigned int', @@ -2003,9 +2130,10 @@ def create_feed(self, fields=None, params=None, batch=None, success=None, failur 'audience_exp': 'bool', 'backdated_time': 'datetime', 'backdated_time_granularity': 'backdated_time_granularity_enum', + 'breaking_news': 'bool', + 'breaking_news_expiration': 'unsigned int', 'call_to_action': 'Object', 'caption': 'string', - 'checkin_entry_point': 'checkin_entry_point_enum', 'child_attachments': 'list', 'client_mutation_id': 'string', 'composer_entry_picker': 'string', @@ -2029,7 +2157,6 @@ def create_feed(self, fields=None, params=None, batch=None, success=None, failur 'formatting': 'formatting_enum', 'fun_fact_prompt_id': 'unsigned int', 'fun_fact_toastee_id': 'unsigned int', - 'has_nickname': 'bool', 'height': 'unsigned int', 'holiday_card': 'string', 'home_checkin_city_id': 'Object', @@ -2076,7 +2203,6 @@ def create_feed(self, fields=None, params=None, batch=None, success=None, failur 'publish_event_id': 'unsigned int', 'published': 'bool', 'quote': 'string', - 'react_mode_metadata': 'string', 'ref': 'list', 'referenceable_image_ids': 'list', 'referral_id': 'string', @@ -2104,7 +2230,6 @@ def create_feed(self, fields=None, params=None, batch=None, success=None, failur } enums = { 'backdated_time_granularity_enum': Page.BackdatedTimeGranularity.__dict__.values(), - 'checkin_entry_point_enum': Page.CheckinEntryPoint.__dict__.values(), 'formatting_enum': Page.Formatting.__dict__.values(), 'place_attachment_setting_enum': Page.PlaceAttachmentSetting.__dict__.values(), 'post_surfaces_blacklist_enum': Page.PostSurfacesBlacklist.__dict__.values(), @@ -2235,6 +2360,7 @@ def create_image_copyright(self, fields=None, params=None, batch=None, success=N from facebook_business.adobjects.imagecopyright import ImageCopyright param_types = { 'artist': 'string', + 'attribution_link': 'string', 'creator': 'string', 'custom_id': 'string', 'description': 'string', @@ -2374,71 +2500,6 @@ def get_instagram_accounts(self, fields=None, params=None, batch=None, success=N self.assure_call() return request.execute() - def get_instant_articles_stats(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.instantarticlesstats import InstantArticlesStats - param_types = { - 'metrics_list': 'list', - 'page_list': 'list', - 'since': 'datetime', - 'until': 'datetime', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/instant_articles_stats', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=InstantArticlesStats, - api_type='EDGE', - response_parser=ObjectParser(target_class=InstantArticlesStats, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - - def get_invoice_access_bank_account(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/invoice_access_bank_account', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, - api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - def get_lead_gen_forms(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -2648,8 +2709,8 @@ def delete_locations(self, fields=None, params=None, batch=None, success=None, f if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') param_types = { - 'location_page_id': 'string', - 'store_number': 'unsigned int', + 'location_page_ids': 'list', + 'store_numbers': 'list', } enums = { } @@ -2826,7 +2887,7 @@ def create_media_fingerprint(self, fields=None, params=None, batch=None, success self.assure_call() return request.execute() - def create_message_attachment(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def create_message_attach_m_ent(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -2937,26 +2998,163 @@ def get_messaging_feature_review(self, fields=None, params=None, batch=None, suc self.assure_call() return request.execute() - def delete_messenger_profile(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_messenger_call_settings(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.messengercallsettings import MessengerCallSettings param_types = { - 'fields': 'list', - 'platform': 'platform_enum', } enums = { - 'fields_enum': [ - 'ACCOUNT_LINKING_URL', - 'GET_STARTED', - 'GREETING', - 'HOME_URL', - 'ICE_BREAKERS', - 'PAYMENT_SETTINGS', - 'PERSISTENT_MENU', - 'PLATFORM', - 'SUBJECT_TO_NEW_EU_PRIVACY_RULES', + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/messenger_call_settings', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=MessengerCallSettings, + api_type='EDGE', + response_parser=ObjectParser(target_class=MessengerCallSettings, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_messenger_call_setting(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'audio_enabled': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/messenger_call_settings', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Page, + api_type='EDGE', + response_parser=ObjectParser(target_class=Page, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_messenger_lead_for_ms(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.messengeradspartialautomatedsteplist import MessengerAdsPartialAutomatedStepList + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/messenger_lead_forms', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=MessengerAdsPartialAutomatedStepList, + api_type='EDGE', + response_parser=ObjectParser(target_class=MessengerAdsPartialAutomatedStepList, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_messenger_lead_for_m(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'account_id': 'unsigned int', + 'block_send_api': 'bool', + 'exit_keyphrases': 'string', + 'handover_app_id': 'unsigned int', + 'handover_summary': 'bool', + 'privacy_url': 'string', + 'reminder_text': 'string', + 'step_list': 'list', + 'stop_question_message': 'string', + 'template_name': 'string', + 'tracking_parameters': 'map', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/messenger_lead_forms', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Page, + api_type='EDGE', + response_parser=ObjectParser(target_class=Page, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def delete_messenger_profile(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'fields': 'list', + 'platform': 'platform_enum', + } + enums = { + 'fields_enum': [ + 'ACCOUNT_LINKING_URL', + 'COMMANDS', + 'DESCRIPTION', + 'GET_STARTED', + 'GREETING', + 'HOME_URL', + 'ICE_BREAKERS', + 'PAYMENT_SETTINGS', + 'PERSISTENT_MENU', + 'PLATFORM', + 'SUBJECT_TO_NEW_EU_PRIVACY_RULES', 'TARGET_AUDIENCE', + 'TITLE', 'WHITELISTED_DOMAINS', ], 'platform_enum': Page.Platform.__dict__.values(), @@ -3022,6 +3220,8 @@ def create_messenger_profile(self, fields=None, params=None, batch=None, success api_utils.warning('`success` and `failure` callback only work for batch call.') param_types = { 'account_linking_url': 'string', + 'commands': 'list', + 'description': 'list', 'get_started': 'Object', 'greeting': 'list', 'ice_breakers': 'list', @@ -3029,6 +3229,7 @@ def create_messenger_profile(self, fields=None, params=None, batch=None, success 'persistent_menu': 'list', 'platform': 'platform_enum', 'target_audience': 'Object', + 'title': 'list', 'whitelisted_domains': 'list', } enums = { @@ -3220,7 +3421,7 @@ def create_page_backed_instagram_account(self, fields=None, params=None, batch=N self.assure_call() return request.execute() - def create_page_whatsapp_number_verification(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def create_page_whats_app_number_verification(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -3382,6 +3583,37 @@ def create_persona(self, fields=None, params=None, batch=None, success=None, fai self.assure_call() return request.execute() + def create_photo_story(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'photo_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/photo_stories', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Page, + api_type='EDGE', + response_parser=ObjectParser(target_class=Page, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_photos(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -3511,14 +3743,12 @@ def get_picture(self, fields=None, params=None, batch=None, success=None, failur api_utils.warning('`success` and `failure` callback only work for batch call.') from facebook_business.adobjects.profilepicturesource import ProfilePictureSource param_types = { - 'breaking_change': 'breaking_change_enum', 'height': 'int', 'redirect': 'bool', 'type': 'type_enum', 'width': 'int', } enums = { - 'breaking_change_enum': ProfilePictureSource.BreakingChange.__dict__.values(), 'type_enum': ProfilePictureSource.Type.__dict__.values(), } request = FacebookRequest( @@ -3862,7 +4092,7 @@ def get_rtb_dynamic_posts(self, fields=None, params=None, batch=None, success=No self.assure_call() return request.execute() - def get_scheduled_posts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_schedule_d_posts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -4019,6 +4249,41 @@ def get_shop_setup_status(self, fields=None, params=None, batch=None, success=No self.assure_call() return request.execute() + def get_stories(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.stories import Stories + param_types = { + 'since': 'datetime', + 'status': 'list', + 'until': 'datetime', + } + enums = { + 'status_enum': Stories.Status.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/stories', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Stories, + api_type='EDGE', + response_parser=ObjectParser(target_class=Stories, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def delete_subscribed_apps(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -4207,6 +4472,41 @@ def create_take_thread_control(self, fields=None, params=None, batch=None, succe self.assure_call() return request.execute() + def create_thread_action(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'action': 'action_enum', + 'action_type': 'action_type_enum', + 'user_id': 'map', + } + enums = { + 'action_enum': Page.Action.__dict__.values(), + 'action_type_enum': Page.ActionType.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/thread_action', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Page, + api_type='EDGE', + response_parser=ObjectParser(target_class=Page, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_thread_owner(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -4246,10 +4546,12 @@ def get_threads(self, fields=None, params=None, batch=None, success=None, failur from facebook_business.adobjects.unifiedthread import UnifiedThread param_types = { 'folder': 'string', + 'platform': 'platform_enum', 'tags': 'list', 'user_id': 'string', } enums = { + 'platform_enum': UnifiedThread.Platform.__dict__.values(), } request = FacebookRequest( node_id=self['id'], @@ -4489,11 +4791,12 @@ def create_video_reel(self, fields=None, params=None, batch=None, success=None, param_types = { 'description': 'string', 'feed_targeting': 'Object', + 'place': 'string', 'scheduled_publish_time': 'datetime', 'targeting': 'Object', 'title': 'string', 'upload_phase': 'upload_phase_enum', - 'video_id': 'Object', + 'video_id': 'string', 'video_state': 'video_state_enum', } enums = { @@ -4522,6 +4825,54 @@ def create_video_reel(self, fields=None, params=None, batch=None, success=None, self.assure_call() return request.execute() + def create_video_story(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'description': 'string', + 'feed_targeting': 'Object', + 'place': 'string', + 'scheduled_publish_time': 'datetime', + 'targeting': 'Object', + 'title': 'string', + 'upload_phase': 'upload_phase_enum', + 'video_id': 'string', + 'video_state': 'video_state_enum', + } + enums = { + 'upload_phase_enum': [ + 'FINISH', + 'START', + ], + 'video_state_enum': [ + 'DRAFT', + 'PUBLISHED', + 'SCHEDULED', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/video_stories', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_videos(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -4562,7 +4913,6 @@ def create_video(self, fields=None, params=None, batch=None, success=None, failu from facebook_business.adobjects.advideo import AdVideo param_types = { 'ad_breaks': 'list', - 'adaptive_type': 'string', 'animated_effect_id': 'unsigned int', 'application_id': 'string', 'asked_fun_fact_prompt_id': 'unsigned int', @@ -4599,7 +4949,6 @@ def create_video(self, fields=None, params=None, batch=None, success=None, failu 'fun_fact_toastee_id': 'unsigned int', 'guide': 'list>', 'guide_enabled': 'bool', - 'has_nickname': 'bool', 'holiday_card': 'string', 'initial_heading': 'unsigned int', 'initial_pitch': 'unsigned int', @@ -4622,7 +4971,6 @@ def create_video(self, fields=None, params=None, batch=None, success=None, failu 'original_projection_type': 'original_projection_type_enum', 'publish_event_id': 'unsigned int', 'published': 'bool', - 'react_mode_metadata': 'string', 'reference_only': 'bool', 'referenced_sticker_id': 'string', 'replace_video_id': 'string', @@ -4723,11 +5071,44 @@ def get_visitor_posts(self, fields=None, params=None, batch=None, success=None, self.assure_call() return request.execute() + def delete_welcome_message_flows(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'flow_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/welcome_message_flows', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_welcome_message_flows(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.ctxpartnerappwelcomemessageflow import CTXPartnerAppWelcomeMessageFlow param_types = { + 'app_id': 'string', 'flow_id': 'string', } enums = { @@ -4738,6 +5119,44 @@ def get_welcome_message_flows(self, fields=None, params=None, batch=None, succes endpoint='/welcome_message_flows', api=self._api, param_checker=TypeChecker(param_types, enums), + target_class=CTXPartnerAppWelcomeMessageFlow, + api_type='EDGE', + response_parser=ObjectParser(target_class=CTXPartnerAppWelcomeMessageFlow, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_welcome_message_flow(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'eligible_platforms': 'list', + 'flow_id': 'string', + 'name': 'string', + 'welcome_message_flow': 'list', + } + enums = { + 'eligible_platforms_enum': [ + 'INSTAGRAM', + 'MESSENGER', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/welcome_message_flows', + api=self._api, + param_checker=TypeChecker(param_types, enums), target_class=AbstractCrudObject, api_type='EDGE', response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), @@ -4762,6 +5181,7 @@ def get_welcome_message_flows(self, fields=None, params=None, batch=None, succes 'app_id': 'string', 'artists_we_like': 'string', 'attire': 'string', + 'available_promo_offer_ids': 'list>>>', 'awards': 'string', 'band_interests': 'string', 'band_members': 'string', @@ -4769,6 +5189,7 @@ def get_welcome_message_flows(self, fields=None, params=None, batch=None, succes 'bio': 'string', 'birthday': 'string', 'booking_agent': 'string', + 'breaking_news_usage': 'Object', 'built': 'string', 'business': 'Object', 'can_checkin': 'bool', @@ -4792,6 +5213,7 @@ def get_welcome_message_flows(self, fields=None, params=None, batch=None, succes 'directed_by': 'string', 'display_subtext': 'string', 'displayed_message_response_time': 'string', + 'does_viewer_have_page_permission_link_ig': 'bool', 'emails': 'list', 'engagement': 'Engagement', 'fan_count': 'unsigned int', @@ -4806,6 +5228,7 @@ def get_welcome_message_flows(self, fields=None, params=None, batch=None, succes 'global_brand_page_name': 'string', 'global_brand_root_id': 'string', 'has_added_app': 'bool', + 'has_lead_access': 'HasLeadAccess', 'has_transitioned_to_new_page_experience': 'bool', 'has_whatsapp_business_number': 'bool', 'has_whatsapp_number': 'bool', @@ -4816,9 +5239,11 @@ def get_welcome_message_flows(self, fields=None, params=None, batch=None, succes 'influences': 'string', 'instagram_business_account': 'IGUser', 'is_always_open': 'bool', + 'is_calling_eligible': 'bool', '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', @@ -4838,7 +5263,6 @@ def get_welcome_message_flows(self, fields=None, params=None, batch=None, succes 'merchant_review_status': 'string', 'messaging_feature_status': 'MessagingFeatureStatus', 'messenger_ads_default_icebreakers': 'list', - 'messenger_ads_default_page_welcome_message': 'MessengerDestinationPageWelcomeMessage', 'messenger_ads_default_quick_replies': 'list', 'messenger_ads_quick_replies_type': 'string', 'mini_shop_storefront': 'Shop', @@ -4893,6 +5317,7 @@ def get_welcome_message_flows(self, fields=None, params=None, batch=None, succes 'unread_message_count': 'unsigned int', 'unread_notif_count': 'unsigned int', 'unseen_message_count': 'unsigned int', + 'user_access_expire_time': 'datetime', 'username': 'string', 'verification_status': 'string', 'voip_info': 'VoipInfo', @@ -4917,7 +5342,6 @@ def _get_field_enum_info(cls): field_enum_info['GuestChatMode'] = Page.GuestChatMode.__dict__.values() field_enum_info['MobileChatDisplay'] = Page.MobileChatDisplay.__dict__.values() field_enum_info['BackdatedTimeGranularity'] = Page.BackdatedTimeGranularity.__dict__.values() - field_enum_info['CheckinEntryPoint'] = Page.CheckinEntryPoint.__dict__.values() field_enum_info['Formatting'] = Page.Formatting.__dict__.values() field_enum_info['PlaceAttachmentSetting'] = Page.PlaceAttachmentSetting.__dict__.values() field_enum_info['PostSurfacesBlacklist'] = Page.PostSurfacesBlacklist.__dict__.values() @@ -4932,6 +5356,8 @@ def _get_field_enum_info(cls): field_enum_info['Model'] = Page.Model.__dict__.values() field_enum_info['DeveloperAction'] = Page.DeveloperAction.__dict__.values() field_enum_info['SubscribedFields'] = Page.SubscribedFields.__dict__.values() + field_enum_info['Action'] = Page.Action.__dict__.values() + field_enum_info['ActionType'] = Page.ActionType.__dict__.values() return field_enum_info diff --git a/facebook_business/adobjects/pageaboutstorycomposedblock.py b/facebook_business/adobjects/pageaboutstorycomposedblock.py new file mode 100644 index 000000000..1f4006479 --- /dev/null +++ b/facebook_business/adobjects/pageaboutstorycomposedblock.py @@ -0,0 +1,45 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 PageAboutStoryComposedBlock( + AbstractObject, +): + + def __init__(self, api=None): + super(PageAboutStoryComposedBlock, self).__init__() + self._isPageAboutStoryComposedBlock = True + self._api = api + + class Field(AbstractObject.Field): + depth = 'depth' + entity_ranges = 'entity_ranges' + inline_style_ranges = 'inline_style_ranges' + text = 'text' + type = 'type' + + _field_types = { + 'depth': 'int', + 'entity_ranges': 'list', + 'inline_style_ranges': 'list', + 'text': 'string', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pageaboutstorycomposedblockentityranges.py b/facebook_business/adobjects/pageaboutstorycomposedblockentityranges.py new file mode 100644 index 000000000..f75f61a73 --- /dev/null +++ b/facebook_business/adobjects/pageaboutstorycomposedblockentityranges.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 PageAboutStoryComposedBlockEntityRanges( + AbstractObject, +): + + def __init__(self, api=None): + super(PageAboutStoryComposedBlockEntityRanges, self).__init__() + self._isPageAboutStoryComposedBlockEntityRanges = True + self._api = api + + class Field(AbstractObject.Field): + key = 'key' + length = 'length' + offset = 'offset' + + _field_types = { + 'key': 'string', + 'length': 'int', + 'offset': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pageaboutstorycomposedblockinlinestyle.py b/facebook_business/adobjects/pageaboutstorycomposedblockinlinestyle.py new file mode 100644 index 000000000..a0dcf3f38 --- /dev/null +++ b/facebook_business/adobjects/pageaboutstorycomposedblockinlinestyle.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 PageAboutStoryComposedBlockInlineStyle( + AbstractObject, +): + + def __init__(self, api=None): + super(PageAboutStoryComposedBlockInlineStyle, self).__init__() + self._isPageAboutStoryComposedBlockInlineStyle = True + self._api = api + + class Field(AbstractObject.Field): + length = 'length' + offset = 'offset' + style = 'style' + + _field_types = { + 'length': 'int', + 'offset': 'int', + 'style': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pageappwithleadsaccess.py b/facebook_business/adobjects/pageappwithleadsaccess.py new file mode 100644 index 000000000..5248c5209 --- /dev/null +++ b/facebook_business/adobjects/pageappwithleadsaccess.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 PageAppWithLeadsAccess( + AbstractObject, +): + + def __init__(self, api=None): + super(PageAppWithLeadsAccess, self).__init__() + self._isPageAppWithLeadsAccess = True + self._api = api + + class Field(AbstractObject.Field): + can_access_leads = 'can_access_leads' + type = 'type' + + _field_types = { + 'can_access_leads': 'bool', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pagebroadcast.py b/facebook_business/adobjects/pagebroadcast.py new file mode 100644 index 000000000..fe6c64c45 --- /dev/null +++ b/facebook_business/adobjects/pagebroadcast.py @@ -0,0 +1,74 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 PageBroadcast( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPageBroadcast = True + super(PageBroadcast, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + scheduled_time = 'scheduled_time' + status = 'status' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PageBroadcast, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'scheduled_time': 'string', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pagecalltoaction.py b/facebook_business/adobjects/pagecalltoaction.py index 787656435..bf4816270 100644 --- a/facebook_business/adobjects/pagecalltoaction.py +++ b/facebook_business/adobjects/pagecalltoaction.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -99,6 +85,7 @@ class Type: buy_tickets = 'BUY_TICKETS' call_now = 'CALL_NOW' charity_donate = 'CHARITY_DONATE' + check_in = 'CHECK_IN' contact_us = 'CONTACT_US' donate_now = 'DONATE_NOW' email = 'EMAIL' diff --git a/facebook_business/adobjects/pagecategory.py b/facebook_business/adobjects/pagecategory.py index 264e0c5c8..5c884f238 100644 --- a/facebook_business/adobjects/pagecategory.py +++ b/facebook_business/adobjects/pagecategory.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/pagechangeproposal.py b/facebook_business/adobjects/pagechangeproposal.py index 061d873a1..dd3df5199 100644 --- a/facebook_business/adobjects/pagechangeproposal.py +++ b/facebook_business/adobjects/pagechangeproposal.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/pagecrmswithleadsaccess.py b/facebook_business/adobjects/pagecrmswithleadsaccess.py new file mode 100644 index 000000000..56c6bbd29 --- /dev/null +++ b/facebook_business/adobjects/pagecrmswithleadsaccess.py @@ -0,0 +1,46 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 PageCrmsWithLeadsAccess( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPageCrmsWithLeadsAccess = True + super(PageCrmsWithLeadsAccess, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + can_access_leads = 'can_access_leads' + id = 'id' + integration_type = 'integration_type' + name = 'name' + + _field_types = { + 'can_access_leads': 'bool', + 'id': 'string', + 'integration_type': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pagectstopic.py b/facebook_business/adobjects/pagectstopic.py new file mode 100644 index 000000000..9993346cf --- /dev/null +++ b/facebook_business/adobjects/pagectstopic.py @@ -0,0 +1,47 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 PageCTSTopic( + AbstractObject, +): + + def __init__(self, api=None): + super(PageCTSTopic, self).__init__() + self._isPageCTSTopic = True + self._api = api + + class Field(AbstractObject.Field): + app_id = 'app_id' + frequency = 'frequency' + image_hash = 'image_hash' + image_url = 'image_url' + subscriber = 'subscriber' + title = 'title' + + _field_types = { + 'app_id': 'string', + 'frequency': 'string', + 'image_hash': 'string', + 'image_url': 'string', + 'subscriber': 'int', + 'title': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pagectxbudgetsimilaradvertiserbudgetrecommendation.py b/facebook_business/adobjects/pagectxbudgetsimilaradvertiserbudgetrecommendation.py new file mode 100644 index 000000000..d640b7939 --- /dev/null +++ b/facebook_business/adobjects/pagectxbudgetsimilaradvertiserbudgetrecommendation.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 PageCTXBudgetSimilarAdvertiserBudgetRecommendation( + AbstractObject, +): + + def __init__(self, api=None): + super(PageCTXBudgetSimilarAdvertiserBudgetRecommendation, self).__init__() + self._isPageCTXBudgetSimilarAdvertiserBudgetRecommendation = True + self._api = api + + class Field(AbstractObject.Field): + budget = 'budget' + reported_conversion = 'reported_conversion' + + _field_types = { + 'budget': 'string', + 'reported_conversion': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pagectxdefaultgreetingtext.py b/facebook_business/adobjects/pagectxdefaultgreetingtext.py new file mode 100644 index 000000000..1faf83101 --- /dev/null +++ b/facebook_business/adobjects/pagectxdefaultgreetingtext.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 PageCTXDefaultGreetingText( + AbstractObject, +): + + def __init__(self, api=None): + super(PageCTXDefaultGreetingText, self).__init__() + self._isPageCTXDefaultGreetingText = True + self._api = api + + class Field(AbstractObject.Field): + ctd = 'ctd' + ctm = 'ctm' + ctwa = 'ctwa' + + _field_types = { + 'ctd': 'string', + 'ctm': 'string', + 'ctwa': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pagedirectintegrationcrmwithleadsaccess.py b/facebook_business/adobjects/pagedirectintegrationcrmwithleadsaccess.py new file mode 100644 index 000000000..94eef7a3a --- /dev/null +++ b/facebook_business/adobjects/pagedirectintegrationcrmwithleadsaccess.py @@ -0,0 +1,44 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 PageDirectIntegrationCrmWithLeadsAccess( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPageDirectIntegrationCrmWithLeadsAccess = True + super(PageDirectIntegrationCrmWithLeadsAccess, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + can_access_leads = 'can_access_leads' + id = 'id' + name = 'name' + + _field_types = { + 'can_access_leads': 'bool', + 'id': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pagegamebotquotainformation.py b/facebook_business/adobjects/pagegamebotquotainformation.py new file mode 100644 index 000000000..3e278153b --- /dev/null +++ b/facebook_business/adobjects/pagegamebotquotainformation.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 PageGameBotQuotaInformation( + AbstractObject, +): + + def __init__(self, api=None): + super(PageGameBotQuotaInformation, self).__init__() + self._isPageGameBotQuotaInformation = True + self._api = api + + class Field(AbstractObject.Field): + count = 'count' + time_window = 'time_window' + + _field_types = { + 'count': 'int', + 'time_window': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pagegetstartednullstate.py b/facebook_business/adobjects/pagegetstartednullstate.py new file mode 100644 index 000000000..0c8f37fec --- /dev/null +++ b/facebook_business/adobjects/pagegetstartednullstate.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 PageGetStartedNullstate( + AbstractObject, +): + + def __init__(self, api=None): + super(PageGetStartedNullstate, self).__init__() + self._isPageGetStartedNullstate = True + self._api = api + + class Field(AbstractObject.Field): + cta_title = 'cta_title' + processed_greeting = 'processed_greeting' + responsiveness = 'responsiveness' + + _field_types = { + 'cta_title': 'string', + 'processed_greeting': 'string', + 'responsiveness': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pageinsightsasyncexportrun.py b/facebook_business/adobjects/pageinsightsasyncexportrun.py new file mode 100644 index 000000000..f0675c06a --- /dev/null +++ b/facebook_business/adobjects/pageinsightsasyncexportrun.py @@ -0,0 +1,86 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 PageInsightsAsyncExportRun( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPageInsightsAsyncExportRun = True + super(PageInsightsAsyncExportRun, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + data_level = 'data_level' + filters = 'filters' + format = 'format' + gen_report_date = 'gen_report_date' + id = 'id' + report_end_date = 'report_end_date' + report_start_date = 'report_start_date' + sorters = 'sorters' + status = 'status' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PageInsightsAsyncExportRun, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'data_level': 'string', + 'filters': 'list', + 'format': 'string', + 'gen_report_date': 'int', + 'id': 'string', + 'report_end_date': 'int', + 'report_start_date': 'int', + 'sorters': 'list', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pageleadsaccessconfig.py b/facebook_business/adobjects/pageleadsaccessconfig.py new file mode 100644 index 000000000..96466d6d4 --- /dev/null +++ b/facebook_business/adobjects/pageleadsaccessconfig.py @@ -0,0 +1,72 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 PageLeadsAccessConfig( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPageLeadsAccessConfig = True + super(PageLeadsAccessConfig, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + page = 'page' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PageLeadsAccessConfig, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'page': 'Page', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pagelocationsbreakdown.py b/facebook_business/adobjects/pagelocationsbreakdown.py new file mode 100644 index 000000000..a98b233bb --- /dev/null +++ b/facebook_business/adobjects/pagelocationsbreakdown.py @@ -0,0 +1,53 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 PageLocationsBreakdown( + AbstractObject, +): + + def __init__(self, api=None): + super(PageLocationsBreakdown, self).__init__() + self._isPageLocationsBreakdown = True + self._api = api + + class Field(AbstractObject.Field): + location_id = 'location_id' + location_name = 'location_name' + location_type = 'location_type' + num_pages = 'num_pages' + num_pages_eligible_for_store_visit_reporting = 'num_pages_eligible_for_store_visit_reporting' + num_unpublished_or_closed_pages = 'num_unpublished_or_closed_pages' + parent_country_code = 'parent_country_code' + parent_region_id = 'parent_region_id' + parent_region_name = 'parent_region_name' + + _field_types = { + 'location_id': 'string', + 'location_name': 'string', + 'location_type': 'string', + 'num_pages': 'int', + 'num_pages_eligible_for_store_visit_reporting': 'int', + 'num_unpublished_or_closed_pages': 'int', + 'parent_country_code': 'string', + 'parent_region_id': 'int', + 'parent_region_name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pagemessageresponsivenessmetrics.py b/facebook_business/adobjects/pagemessageresponsivenessmetrics.py new file mode 100644 index 000000000..4e416dcf1 --- /dev/null +++ b/facebook_business/adobjects/pagemessageresponsivenessmetrics.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 PageMessageResponsivenessMetrics( + AbstractObject, +): + + def __init__(self, api=None): + super(PageMessageResponsivenessMetrics, self).__init__() + self._isPageMessageResponsivenessMetrics = True + self._api = api + + class Field(AbstractObject.Field): + is_very_responsive = 'is_very_responsive' + response_rate = 'response_rate' + response_time = 'response_time' + + _field_types = { + 'is_very_responsive': 'bool', + 'response_rate': 'float', + 'response_time': 'float', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pageparking.py b/facebook_business/adobjects/pageparking.py index ae640a1ce..625a75b30 100644 --- a/facebook_business/adobjects/pageparking.py +++ b/facebook_business/adobjects/pageparking.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/pagepartnerwithleadsaccess.py b/facebook_business/adobjects/pagepartnerwithleadsaccess.py new file mode 100644 index 000000000..98c6c84f4 --- /dev/null +++ b/facebook_business/adobjects/pagepartnerwithleadsaccess.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 PagePartnerWithLeadsAccess( + AbstractObject, +): + + def __init__(self, api=None): + super(PagePartnerWithLeadsAccess, self).__init__() + self._isPagePartnerWithLeadsAccess = True + self._api = api + + class Field(AbstractObject.Field): + can_access_leads = 'can_access_leads' + partner_business = 'partner_business' + permitted_tasks = 'permitted_tasks' + + _field_types = { + 'can_access_leads': 'bool', + 'partner_business': 'Business', + 'permitted_tasks': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pagepaymentoptions.py b/facebook_business/adobjects/pagepaymentoptions.py index 7ad9e49ca..46a4738a4 100644 --- a/facebook_business/adobjects/pagepaymentoptions.py +++ b/facebook_business/adobjects/pagepaymentoptions.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/pagepost.py b/facebook_business/adobjects/pagepost.py index 130dad779..e9e73b368 100644 --- a/facebook_business/adobjects/pagepost.py +++ b/facebook_business/adobjects/pagepost.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -152,6 +138,8 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') param_types = { + 'primary_fb_page_id': 'string', + 'primary_ig_user_id': 'string', } enums = { } @@ -241,7 +229,7 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure self.assure_call() return request.execute() - def get_attachments(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_attach_m_ents(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -553,7 +541,7 @@ def get_reactions(self, fields=None, params=None, batch=None, success=None, fail self.assure_call() return request.execute() - def get_shared_posts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_share_d_posts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -682,7 +670,7 @@ def get_to(self, fields=None, params=None, batch=None, success=None, failure=Non 'multi_share_end_card': 'bool', 'multi_share_optimized': 'bool', 'parent_id': 'string', - 'permalink_url': 'Object', + 'permalink_url': 'string', 'picture': 'string', 'place': 'Place', 'privacy': 'Privacy', diff --git a/facebook_business/adobjects/pagepostexperiment.py b/facebook_business/adobjects/pagepostexperiment.py index 26d6d53a4..efff1bac2 100644 --- a/facebook_business/adobjects/pagepostexperiment.py +++ b/facebook_business/adobjects/pagepostexperiment.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -42,10 +28,13 @@ def __init__(self, fbid=None, parent_id=None, api=None): class Field(AbstractObject.Field): auto_resolve_settings = 'auto_resolve_settings' + control_video_id = 'control_video_id' creation_time = 'creation_time' creator = 'creator' declared_winning_time = 'declared_winning_time' + declared_winning_video_id = 'declared_winning_video_id' description = 'description' + experiment_video_ids = 'experiment_video_ids' id = 'id' insight_snapshots = 'insight_snapshots' name = 'name' @@ -55,6 +44,49 @@ class Field(AbstractObject.Field): scheduled_experiment_timestamp = 'scheduled_experiment_timestamp' updated_time = 'updated_time' + class OptimizationGoal: + auto_resolve_to_control = 'AUTO_RESOLVE_TO_CONTROL' + avg_time_watched = 'AVG_TIME_WATCHED' + comments = 'COMMENTS' + impressions = 'IMPRESSIONS' + impressions_unique = 'IMPRESSIONS_UNIQUE' + link_clicks = 'LINK_CLICKS' + other = 'OTHER' + reactions = 'REACTIONS' + reels_plays = 'REELS_PLAYS' + shares = 'SHARES' + video_views_60s = 'VIDEO_VIEWS_60S' + + def api_delete(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='DELETE', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -85,12 +117,45 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No self.assure_call() return request.execute() + def get_video_insights(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/video_insights', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + _field_types = { 'auto_resolve_settings': 'Object', + 'control_video_id': 'string', 'creation_time': 'datetime', 'creator': 'User', 'declared_winning_time': 'datetime', + 'declared_winning_video_id': 'string', 'description': 'string', + 'experiment_video_ids': 'list', 'id': 'string', 'insight_snapshots': 'list>>>', 'name': 'string', @@ -103,6 +168,7 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No @classmethod def _get_field_enum_info(cls): field_enum_info = {} + field_enum_info['OptimizationGoal'] = PagePostExperiment.OptimizationGoal.__dict__.values() return field_enum_info diff --git a/facebook_business/adobjects/pagepublisher.py b/facebook_business/adobjects/pagepublisher.py new file mode 100644 index 000000000..6186877ad --- /dev/null +++ b/facebook_business/adobjects/pagepublisher.py @@ -0,0 +1,48 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 PagePublisher( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPagePublisher = True + super(PagePublisher, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + global_parent_id = 'global_parent_id' + icon = 'icon' + id = 'id' + name = 'name' + url = 'url' + + _field_types = { + 'global_parent_id': 'string', + 'icon': 'string', + 'id': 'string', + 'name': 'string', + 'url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pagerestaurantservices.py b/facebook_business/adobjects/pagerestaurantservices.py index 131a62259..28cd05b61 100644 --- a/facebook_business/adobjects/pagerestaurantservices.py +++ b/facebook_business/adobjects/pagerestaurantservices.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/pagerestaurantspecialties.py b/facebook_business/adobjects/pagerestaurantspecialties.py index 4297769ae..9fd4536e9 100644 --- a/facebook_business/adobjects/pagerestaurantspecialties.py +++ b/facebook_business/adobjects/pagerestaurantspecialties.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/pagesettings.py b/facebook_business/adobjects/pagesettings.py index 703c77685..16fdc0edd 100644 --- a/facebook_business/adobjects/pagesettings.py +++ b/facebook_business/adobjects/pagesettings.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/pagestartinfo.py b/facebook_business/adobjects/pagestartinfo.py index 18840ae2b..327af91ca 100644 --- a/facebook_business/adobjects/pagestartinfo.py +++ b/facebook_business/adobjects/pagestartinfo.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/pagethreadowner.py b/facebook_business/adobjects/pagethreadowner.py index 15e8457cc..6ccb7709c 100644 --- a/facebook_business/adobjects/pagethreadowner.py +++ b/facebook_business/adobjects/pagethreadowner.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/pageupcomingchange.py b/facebook_business/adobjects/pageupcomingchange.py index 0a3877353..12291943d 100644 --- a/facebook_business/adobjects/pageupcomingchange.py +++ b/facebook_business/adobjects/pageupcomingchange.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/pageusermessagethreadlabel.py b/facebook_business/adobjects/pageusermessagethreadlabel.py index 142ecbf0c..a05391be3 100644 --- a/facebook_business/adobjects/pageusermessagethreadlabel.py +++ b/facebook_business/adobjects/pageusermessagethreadlabel.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/pageuserpermissions.py b/facebook_business/adobjects/pageuserpermissions.py new file mode 100644 index 000000000..254ec1782 --- /dev/null +++ b/facebook_business/adobjects/pageuserpermissions.py @@ -0,0 +1,55 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 PageUserPermissions( + AbstractObject, +): + + def __init__(self, api=None): + super(PageUserPermissions, self).__init__() + self._isPageUserPermissions = True + self._api = api + + class Field(AbstractObject.Field): + business = 'business' + business_persona = 'business_persona' + created_by = 'created_by' + created_time = 'created_time' + email = 'email' + status = 'status' + tasks = 'tasks' + updated_by = 'updated_by' + updated_time = 'updated_time' + user = 'user' + + _field_types = { + 'business': 'Business', + 'business_persona': 'string', + 'created_by': 'Profile', + 'created_time': 'datetime', + 'email': 'string', + 'status': 'string', + 'tasks': 'list', + 'updated_by': 'Profile', + 'updated_time': 'datetime', + 'user': 'Profile', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pageuserwithleadsaccess.py b/facebook_business/adobjects/pageuserwithleadsaccess.py new file mode 100644 index 000000000..ad178d470 --- /dev/null +++ b/facebook_business/adobjects/pageuserwithleadsaccess.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 PageUserWithLeadsAccess( + AbstractObject, +): + + def __init__(self, api=None): + super(PageUserWithLeadsAccess, self).__init__() + self._isPageUserWithLeadsAccess = True + self._api = api + + class Field(AbstractObject.Field): + active_on_business = 'active_on_business' + business_role = 'business_role' + can_access_leads = 'can_access_leads' + page_role = 'page_role' + + _field_types = { + 'active_on_business': 'bool', + 'business_role': 'string', + 'can_access_leads': 'bool', + 'page_role': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/pagevideosyoucanuse.py b/facebook_business/adobjects/pagevideosyoucanuse.py new file mode 100644 index 000000000..f826a9709 --- /dev/null +++ b/facebook_business/adobjects/pagevideosyoucanuse.py @@ -0,0 +1,44 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 PageVideosYouCanUse( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPageVideosYouCanUse = True + super(PageVideosYouCanUse, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + description = 'description' + id = 'id' + title = 'title' + + _field_types = { + 'description': 'string', + 'id': 'string', + 'title': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/panelapireport.py b/facebook_business/adobjects/panelapireport.py new file mode 100644 index 000000000..762649d72 --- /dev/null +++ b/facebook_business/adobjects/panelapireport.py @@ -0,0 +1,88 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 PanelAPIReport( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPanelAPIReport = True + super(PanelAPIReport, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + checksum = 'checksum' + download_url = 'download_url' + end_date = 'end_date' + export_file_type = 'export_file_type' + id = 'id' + index = 'index' + name = 'name' + number_of_chunks = 'number_of_chunks' + start_date = 'start_date' + upload_date = 'upload_date' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PanelAPIReport, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'checksum': 'string', + 'download_url': 'string', + 'end_date': 'datetime', + 'export_file_type': 'string', + 'id': 'string', + 'index': 'int', + 'name': 'string', + 'number_of_chunks': 'int', + 'start_date': 'datetime', + 'upload_date': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/parentcatalogreport.py b/facebook_business/adobjects/parentcatalogreport.py new file mode 100644 index 000000000..809c70159 --- /dev/null +++ b/facebook_business/adobjects/parentcatalogreport.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ParentCatalogReport( + AbstractObject, +): + + def __init__(self, api=None): + super(ParentCatalogReport, self).__init__() + self._isParentCatalogReport = True + self._api = api + + class Field(AbstractObject.Field): + purchase_conversion_value = 'purchase_conversion_value' + purchases = 'purchases' + + _field_types = { + 'purchase_conversion_value': 'float', + 'purchases': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/partneraccountlinking.py b/facebook_business/adobjects/partneraccountlinking.py new file mode 100644 index 000000000..178c93eee --- /dev/null +++ b/facebook_business/adobjects/partneraccountlinking.py @@ -0,0 +1,84 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 PartnerAccountLinking( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPartnerAccountLinking = True + super(PartnerAccountLinking, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + adaccount = 'adaccount' + app = 'app' + business = 'business' + externalidentifier = 'externalidentifier' + externalidentifieruri = 'externalidentifieruri' + id = 'id' + partnername = 'partnername' + pixel = 'pixel' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PartnerAccountLinking, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'adaccount': 'AdAccount', + 'app': 'Application', + 'business': 'Business', + 'externalidentifier': 'string', + 'externalidentifieruri': 'string', + 'id': 'string', + 'partnername': 'string', + 'pixel': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/partnercategory.py b/facebook_business/adobjects/partnercategory.py new file mode 100644 index 000000000..3b2d90901 --- /dev/null +++ b/facebook_business/adobjects/partnercategory.py @@ -0,0 +1,65 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 PartnerCategory( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPartnerCategory = True + super(PartnerCategory, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + approximate_count = 'approximate_count' + country = 'country' + description = 'description' + details = 'details' + id = 'id' + is_private = 'is_private' + name = 'name' + parent_category = 'parent_category' + source = 'source' + status = 'status' + targeting_type = 'targeting_type' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'partnercategories' + + _field_types = { + 'approximate_count': 'int', + 'country': 'string', + 'description': 'string', + 'details': 'string', + 'id': 'string', + 'is_private': 'bool', + 'name': 'string', + 'parent_category': 'string', + 'source': 'string', + 'status': 'string', + 'targeting_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/partnerintegrationlinked.py b/facebook_business/adobjects/partnerintegrationlinked.py new file mode 100644 index 000000000..f1efeca76 --- /dev/null +++ b/facebook_business/adobjects/partnerintegrationlinked.py @@ -0,0 +1,100 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 PartnerIntegrationLinked( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPartnerIntegrationLinked = True + super(PartnerIntegrationLinked, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ads_pixel = 'ads_pixel' + application = 'application' + completed_integration_types = 'completed_integration_types' + external_business_connection_id = 'external_business_connection_id' + external_id = 'external_id' + has_oauth_token = 'has_oauth_token' + id = 'id' + mbe_app_id = 'mbe_app_id' + mbe_asset_id = 'mbe_asset_id' + mbe_external_business_id = 'mbe_external_business_id' + name = 'name' + offline_conversion_data_set = 'offline_conversion_data_set' + page = 'page' + partner = 'partner' + product_catalog = 'product_catalog' + setup_status = 'setup_status' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PartnerIntegrationLinked, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'ads_pixel': 'AdsPixel', + 'application': 'Application', + 'completed_integration_types': 'list', + 'external_business_connection_id': 'string', + 'external_id': 'string', + 'has_oauth_token': 'bool', + 'id': 'string', + 'mbe_app_id': 'string', + 'mbe_asset_id': 'string', + 'mbe_external_business_id': 'string', + 'name': 'string', + 'offline_conversion_data_set': 'OfflineConversionDataSet', + 'page': 'Page', + 'partner': 'string', + 'product_catalog': 'ProductCatalog', + 'setup_status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/partnershipadcontentsearchmedia.py b/facebook_business/adobjects/partnershipadcontentsearchmedia.py new file mode 100644 index 000000000..506ac28af --- /dev/null +++ b/facebook_business/adobjects/partnershipadcontentsearchmedia.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 PartnershipAdContentSearchMedia( + AbstractObject, +): + + def __init__(self, api=None): + super(PartnershipAdContentSearchMedia, self).__init__() + self._isPartnershipAdContentSearchMedia = True + self._api = api + + class Field(AbstractObject.Field): + ig_media = 'ig_media' + ig_media_has_product_tags = 'ig_media_has_product_tags' + is_ad_code_entry = 'is_ad_code_entry' + + _field_types = { + 'ig_media': 'IGMedia', + 'ig_media_has_product_tags': 'bool', + 'is_ad_code_entry': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/partnershipadsidentity.py b/facebook_business/adobjects/partnershipadsidentity.py new file mode 100644 index 000000000..b89e0b395 --- /dev/null +++ b/facebook_business/adobjects/partnershipadsidentity.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 PartnershipAdsIdentity( + AbstractObject, +): + + def __init__(self, api=None): + super(PartnershipAdsIdentity, self).__init__() + self._isPartnershipAdsIdentity = True + self._api = api + + class Field(AbstractObject.Field): + post_types = 'post_types' + secondary_identities = 'secondary_identities' + + _field_types = { + 'post_types': 'list', + 'secondary_identities': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/partnerstudy.py b/facebook_business/adobjects/partnerstudy.py index 69814e446..1397142e8 100644 --- a/facebook_business/adobjects/partnerstudy.py +++ b/facebook_business/adobjects/partnerstudy.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/paymentenginepayment.py b/facebook_business/adobjects/paymentenginepayment.py index 3eb74defc..d698e4384 100644 --- a/facebook_business/adobjects/paymentenginepayment.py +++ b/facebook_business/adobjects/paymentenginepayment.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/paymentpricepoints.py b/facebook_business/adobjects/paymentpricepoints.py index 59b1b71a1..0ebfce98d 100644 --- a/facebook_business/adobjects/paymentpricepoints.py +++ b/facebook_business/adobjects/paymentpricepoints.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/paymentrequestdetails.py b/facebook_business/adobjects/paymentrequestdetails.py new file mode 100644 index 000000000..f85680105 --- /dev/null +++ b/facebook_business/adobjects/paymentrequestdetails.py @@ -0,0 +1,53 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 PaymentRequestDetails( + AbstractObject, +): + + def __init__(self, api=None): + super(PaymentRequestDetails, self).__init__() + self._isPaymentRequestDetails = True + self._api = api + + class Field(AbstractObject.Field): + amount = 'amount' + creation_time = 'creation_time' + note = 'note' + payment_request_id = 'payment_request_id' + receiver_id = 'receiver_id' + reference_number = 'reference_number' + sender_id = 'sender_id' + status = 'status' + transaction_time = 'transaction_time' + + _field_types = { + 'amount': 'Object', + 'creation_time': 'int', + 'note': 'string', + 'payment_request_id': 'string', + 'receiver_id': 'string', + 'reference_number': 'string', + 'sender_id': 'string', + 'status': 'string', + 'transaction_time': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/paymentsubscription.py b/facebook_business/adobjects/paymentsubscription.py index 33ec84665..a2a72ec00 100644 --- a/facebook_business/adobjects/paymentsubscription.py +++ b/facebook_business/adobjects/paymentsubscription.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/permission.py b/facebook_business/adobjects/permission.py index e6eb700b0..867bfd71e 100644 --- a/facebook_business/adobjects/permission.py +++ b/facebook_business/adobjects/permission.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/persona.py b/facebook_business/adobjects/persona.py index 7a254b289..6cbf5f453 100644 --- a/facebook_business/adobjects/persona.py +++ b/facebook_business/adobjects/persona.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/personaladspersona.py b/facebook_business/adobjects/personaladspersona.py new file mode 100644 index 000000000..515fdc868 --- /dev/null +++ b/facebook_business/adobjects/personaladspersona.py @@ -0,0 +1,78 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 PersonalAdsPersona( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPersonalAdsPersona = True + super(PersonalAdsPersona, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + email = 'email' + first_name = 'first_name' + id = 'id' + last_name = 'last_name' + pending_email = 'pending_email' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PersonalAdsPersona, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'email': 'string', + 'first_name': 'string', + 'id': 'string', + 'last_name': 'string', + 'pending_email': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/photo.py b/facebook_business/adobjects/photo.py index 2253e440c..c09cb35c7 100644 --- a/facebook_business/adobjects/photo.py +++ b/facebook_business/adobjects/photo.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/photometadata.py b/facebook_business/adobjects/photometadata.py new file mode 100644 index 000000000..0abef1ed7 --- /dev/null +++ b/facebook_business/adobjects/photometadata.py @@ -0,0 +1,59 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 PhotoMetadata( + AbstractObject, +): + + def __init__(self, api=None): + super(PhotoMetadata, self).__init__() + self._isPhotoMetadata = True + self._api = api + + class Field(AbstractObject.Field): + camera_make = 'camera_make' + camera_model = 'camera_model' + datetime_modified = 'datetime_modified' + datetime_taken = 'datetime_taken' + exposure = 'exposure' + focal_length = 'focal_length' + fstop = 'fstop' + iso_speed = 'iso_speed' + offline_id = 'offline_id' + orientation = 'orientation' + original_height = 'original_height' + original_width = 'original_width' + + _field_types = { + 'camera_make': 'string', + 'camera_model': 'string', + 'datetime_modified': 'datetime', + 'datetime_taken': 'datetime', + 'exposure': 'string', + 'focal_length': 'string', + 'fstop': 'string', + 'iso_speed': 'int', + 'offline_id': 'string', + 'orientation': 'string', + 'original_height': 'string', + 'original_width': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/place.py b/facebook_business/adobjects/place.py index dda8ca34a..1ba9ca8df 100644 --- a/facebook_business/adobjects/place.py +++ b/facebook_business/adobjects/place.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/placetag.py b/facebook_business/adobjects/placetag.py new file mode 100644 index 000000000..560a401da --- /dev/null +++ b/facebook_business/adobjects/placetag.py @@ -0,0 +1,74 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 PlaceTag( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPlaceTag = True + super(PlaceTag, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + created_time = 'created_time' + id = 'id' + place = 'place' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PlaceTag, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'created_time': 'datetime', + 'id': 'string', + 'place': 'Page', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/placetopic.py b/facebook_business/adobjects/placetopic.py index 38b1def1d..1023cd90d 100644 --- a/facebook_business/adobjects/placetopic.py +++ b/facebook_business/adobjects/placetopic.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/platformimagesource.py b/facebook_business/adobjects/platformimagesource.py index 3915c2fef..3198891b8 100644 --- a/facebook_business/adobjects/platformimagesource.py +++ b/facebook_business/adobjects/platformimagesource.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/platformsessionkey.py b/facebook_business/adobjects/platformsessionkey.py new file mode 100644 index 000000000..055cea618 --- /dev/null +++ b/facebook_business/adobjects/platformsessionkey.py @@ -0,0 +1,40 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 PlatformSessionKey( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPlatformSessionKey = True + super(PlatformSessionKey, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + + _field_types = { + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/playablecontent.py b/facebook_business/adobjects/playablecontent.py index d52cb6281..2ec60a96d 100644 --- a/facebook_business/adobjects/playablecontent.py +++ b/facebook_business/adobjects/playablecontent.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/post.py b/facebook_business/adobjects/post.py index 74f058d44..eaf5f0220 100644 --- a/facebook_business/adobjects/post.py +++ b/facebook_business/adobjects/post.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -112,12 +98,6 @@ class BackdatedTimeGranularity: none = 'none' year = 'year' - class CheckinEntryPoint: - branding_checkin = 'BRANDING_CHECKIN' - branding_other = 'BRANDING_OTHER' - branding_photo = 'BRANDING_PHOTO' - branding_status = 'BRANDING_STATUS' - class Formatting: markdown = 'MARKDOWN' plaintext = 'PLAINTEXT' @@ -194,6 +174,8 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') param_types = { + 'primary_fb_page_id': 'string', + 'primary_ig_user_id': 'string', } enums = { } @@ -283,7 +265,7 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure self.assure_call() return request.execute() - def get_attachments(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_attach_m_ents(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -564,7 +546,7 @@ def get_reactions(self, fields=None, params=None, batch=None, success=None, fail self.assure_call() return request.execute() - def get_shared_posts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_share_d_posts(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -689,7 +671,7 @@ def get_to(self, fields=None, params=None, batch=None, success=None, failure=Non 'is_popular': 'bool', 'is_published': 'bool', 'is_spherical': 'bool', - 'link': 'Object', + 'link': 'string', 'message': 'string', 'message_tags': 'list', 'multi_share_end_card': 'bool', @@ -697,7 +679,7 @@ def get_to(self, fields=None, params=None, batch=None, success=None, failure=Non 'name': 'string', 'object_id': 'string', 'parent_id': 'string', - 'permalink_url': 'Object', + 'permalink_url': 'string', 'picture': 'string', 'place': 'Place', 'privacy': 'Privacy', @@ -724,7 +706,6 @@ def get_to(self, fields=None, params=None, batch=None, success=None, failure=Non def _get_field_enum_info(cls): field_enum_info = {} field_enum_info['BackdatedTimeGranularity'] = Post.BackdatedTimeGranularity.__dict__.values() - field_enum_info['CheckinEntryPoint'] = Post.CheckinEntryPoint.__dict__.values() field_enum_info['Formatting'] = Post.Formatting.__dict__.values() field_enum_info['PlaceAttachmentSetting'] = Post.PlaceAttachmentSetting.__dict__.values() field_enum_info['PostSurfacesBlacklist'] = Post.PostSurfacesBlacklist.__dict__.values() diff --git a/facebook_business/adobjects/preapprovalreview.py b/facebook_business/adobjects/preapprovalreview.py new file mode 100644 index 000000000..cdbf6577e --- /dev/null +++ b/facebook_business/adobjects/preapprovalreview.py @@ -0,0 +1,45 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 PreapprovalReview( + AbstractObject, +): + + def __init__(self, api=None): + super(PreapprovalReview, self).__init__() + self._isPreapprovalReview = True + self._api = api + + class Field(AbstractObject.Field): + comp_type = 'comp_type' + crow_component_id = 'crow_component_id' + is_human_reviewed = 'is_human_reviewed' + is_reviewed = 'is_reviewed' + policy_info = 'policy_info' + + _field_types = { + 'comp_type': 'string', + 'crow_component_id': 'int', + 'is_human_reviewed': 'bool', + 'is_reviewed': 'bool', + 'policy_info': 'list>', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/premiummusicvideo.py b/facebook_business/adobjects/premiummusicvideo.py new file mode 100644 index 000000000..dd267cfa3 --- /dev/null +++ b/facebook_business/adobjects/premiummusicvideo.py @@ -0,0 +1,54 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 PremiumMusicVideo( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPremiumMusicVideo = True + super(PremiumMusicVideo, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + creation_time = 'creation_time' + cross_post_videos = 'cross_post_videos' + eligible_cross_post_pages = 'eligible_cross_post_pages' + id = 'id' + preferred_video_thumbnail_image_uri = 'preferred_video_thumbnail_image_uri' + premium_music_video_metadata = 'premium_music_video_metadata' + scheduled_publish_time = 'scheduled_publish_time' + title = 'title' + + _field_types = { + 'creation_time': 'string', + 'cross_post_videos': 'list', + 'eligible_cross_post_pages': 'list', + 'id': 'string', + 'preferred_video_thumbnail_image_uri': 'string', + 'premium_music_video_metadata': 'Object', + 'scheduled_publish_time': 'int', + 'title': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/privacy.py b/facebook_business/adobjects/privacy.py index 82861ae46..8c49c506e 100644 --- a/facebook_business/adobjects/privacy.py +++ b/facebook_business/adobjects/privacy.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/privacyoption.py b/facebook_business/adobjects/privacyoption.py new file mode 100644 index 000000000..6f0f2569a --- /dev/null +++ b/facebook_business/adobjects/privacyoption.py @@ -0,0 +1,50 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 PrivacyOption( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPrivacyOption = True + super(PrivacyOption, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + description = 'description' + icon_src = 'icon_src' + id = 'id' + is_currently_selected = 'is_currently_selected' + type = 'type' + user_id = 'user_id' + + _field_types = { + 'description': 'string', + 'icon_src': 'string', + 'id': 'string', + 'is_currently_selected': 'bool', + 'type': 'string', + 'user_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/privatecomputationenvironment.py b/facebook_business/adobjects/privatecomputationenvironment.py new file mode 100644 index 000000000..8b740846c --- /dev/null +++ b/facebook_business/adobjects/privatecomputationenvironment.py @@ -0,0 +1,80 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 PrivateComputationEnvironment( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPrivateComputationEnvironment = True + super(PrivateComputationEnvironment, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + publisher_account_id = 'publisher_account_id' + publisher_pce_deployment_status = 'publisher_pce_deployment_status' + publisher_pce_id = 'publisher_pce_id' + publisher_region = 'publisher_region' + publisher_vpc_id = 'publisher_vpc_id' + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PrivateComputationEnvironment, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'publisher_account_id': 'string', + 'publisher_pce_deployment_status': 'int', + 'publisher_pce_id': 'string', + 'publisher_region': 'string', + 'publisher_vpc_id': 'string', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/privateliftstudyinstance.py b/facebook_business/adobjects/privateliftstudyinstance.py index 6a9823a1c..ddc80b809 100644 --- a/facebook_business/adobjects/privateliftstudyinstance.py +++ b/facebook_business/adobjects/privateliftstudyinstance.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/productcatalog.py b/facebook_business/adobjects/productcatalog.py index d2c41ac38..fab625b30 100644 --- a/facebook_business/adobjects/productcatalog.py +++ b/facebook_business/adobjects/productcatalog.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -55,11 +41,14 @@ class Field(AbstractObject.Field): feed_count = 'feed_count' id = 'id' is_catalog_segment = 'is_catalog_segment' + is_local_catalog = 'is_local_catalog' name = 'name' owner_business = 'owner_business' product_count = 'product_count' store_catalog_settings = 'store_catalog_settings' + user_access_expire_time = 'user_access_expire_time' vertical = 'vertical' + additional_vertical_option = 'additional_vertical_option' catalog_segment_filter = 'catalog_segment_filter' catalog_segment_product_set_id = 'catalog_segment_product_set_id' destination_catalog_settings = 'destination_catalog_settings' @@ -67,20 +56,22 @@ class Field(AbstractObject.Field): parent_catalog_id = 'parent_catalog_id' partner_integration = 'partner_integration' + class AdditionalVerticalOption: + local_da_catalog = 'LOCAL_DA_CATALOG' + local_products = 'LOCAL_PRODUCTS' + class Vertical: adoptable_pets = 'adoptable_pets' - bookable = 'bookable' commerce = 'commerce' destinations = 'destinations' flights = 'flights' + generic = 'generic' home_listings = 'home_listings' hotels = 'hotels' jobs = 'jobs' - local_delivery_shipping_profiles = 'local_delivery_shipping_profiles' local_service_businesses = 'local_service_businesses' offer_items = 'offer_items' offline_commerce = 'offline_commerce' - ticketed_experiences = 'ticketed_experiences' transactable_items = 'transactable_items' vehicles = 'vehicles' @@ -89,11 +80,13 @@ class PermittedRoles: advertiser = 'ADVERTISER' class PermittedTasks: + aa_analyze = 'AA_ANALYZE' advertise = 'ADVERTISE' manage = 'MANAGE' manage_ar = 'MANAGE_AR' class Tasks: + aa_analyze = 'AA_ANALYZE' advertise = 'ADVERTISE' manage = 'MANAGE' manage_ar = 'MANAGE_AR' @@ -220,6 +213,7 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') param_types = { + 'additional_vertical_option': 'additional_vertical_option_enum', 'da_display_settings': 'Object', 'default_image_url': 'string', 'destination_catalog_settings': 'map', @@ -230,6 +224,7 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure 'store_catalog_settings': 'map', } enums = { + 'additional_vertical_option_enum': ProductCatalog.AdditionalVerticalOption.__dict__.values(), } request = FacebookRequest( node_id=self['id'], @@ -323,6 +318,7 @@ def create_agency(self, fields=None, params=None, batch=None, success=None, fail 'business': 'string', 'permitted_roles': 'list', 'permitted_tasks': 'list', + 'skip_default_utms': 'bool', 'utm_settings': 'map', } enums = { @@ -351,38 +347,6 @@ def create_agency(self, fields=None, params=None, batch=None, success=None, fail self.assure_call() return request.execute() - def get_ar_effects_batch_status(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.areffectsbatchstatus import AREffectsBatchStatus - param_types = { - 'handle': 'string', - } - enums = { - } - request = FacebookRequest( - node_id=self['id'], - method='GET', - endpoint='/ar_effects_batch_status', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AREffectsBatchStatus, - api_type='EDGE', - response_parser=ObjectParser(target_class=AREffectsBatchStatus, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - def delete_assigned_users(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -552,7 +516,7 @@ def create_catalog_store(self, fields=None, params=None, batch=None, success=Non api_utils.warning('`success` and `failure` callback only work for batch call.') from facebook_business.adobjects.storecatalogsettings import StoreCatalogSettings param_types = { - 'page': 'int', + 'page': 'string', } enums = { } @@ -679,11 +643,11 @@ def get_check_batch_request_status(self, fields=None, params=None, batch=None, s self.assure_call() return request.execute() - def get_collaborative_ads_event_stats(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_collaborative_ads_lsb_image_bank(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.catalogsegmentallmatchcountlaser import CatalogSegmentAllMatchCountLaser + from facebook_business.adobjects.cpaslsbimagebank import CPASLsbImageBank param_types = { } enums = { @@ -691,12 +655,12 @@ def get_collaborative_ads_event_stats(self, fields=None, params=None, batch=None request = FacebookRequest( node_id=self['id'], method='GET', - endpoint='/collaborative_ads_event_stats', + endpoint='/collaborative_ads_lsb_image_bank', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=CatalogSegmentAllMatchCountLaser, + target_class=CPASLsbImageBank, api_type='EDGE', - response_parser=ObjectParser(target_class=CatalogSegmentAllMatchCountLaser, api=self._api), + response_parser=ObjectParser(target_class=CPASLsbImageBank, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -710,10 +674,11 @@ def get_collaborative_ads_event_stats(self, fields=None, params=None, batch=None self.assure_call() return request.execute() - def get_collaborative_ads_lsb_image_bank(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_collaborative_ads_share_settings(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.collaborativeadssharesettings import CollaborativeAdsShareSettings param_types = { } enums = { @@ -721,12 +686,12 @@ def get_collaborative_ads_lsb_image_bank(self, fields=None, params=None, batch=N request = FacebookRequest( node_id=self['id'], method='GET', - endpoint='/collaborative_ads_lsb_image_bank', + endpoint='/collaborative_ads_share_settings', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=CollaborativeAdsShareSettings, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=CollaborativeAdsShareSettings, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -740,24 +705,27 @@ def get_collaborative_ads_lsb_image_bank(self, fields=None, params=None, batch=N self.assure_call() return request.execute() - def get_collaborative_ads_share_settings(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def create_cpas_lsb_image_bank(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.collaborativeadssharesettings import CollaborativeAdsShareSettings + from facebook_business.adobjects.cpaslsbimagebank import CPASLsbImageBank param_types = { + 'ad_group_id': 'unsigned int', + 'agency_business_id': 'unsigned int', + 'backup_image_urls': 'list', } enums = { } request = FacebookRequest( node_id=self['id'], - method='GET', - endpoint='/collaborative_ads_share_settings', + method='POST', + endpoint='/cpas_lsb_image_bank', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=CollaborativeAdsShareSettings, + target_class=CPASLsbImageBank, api_type='EDGE', - response_parser=ObjectParser(target_class=CollaborativeAdsShareSettings, api=self._api), + response_parser=ObjectParser(target_class=CPASLsbImageBank, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -771,26 +739,26 @@ def get_collaborative_ads_share_settings(self, fields=None, params=None, batch=N self.assure_call() return request.execute() - def create_cpas_lsb_image_bank(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_creator_asset_creatives(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.creatorassetcreative import CreatorAssetCreative param_types = { - 'ad_group_id': 'unsigned int', - 'agency_business_id': 'unsigned int', - 'backup_image_urls': 'list', + 'moderation_status': 'moderation_status_enum', } enums = { + 'moderation_status_enum': CreatorAssetCreative.ModerationStatus.__dict__.values(), } request = FacebookRequest( node_id=self['id'], - method='POST', - endpoint='/cpas_lsb_image_bank', + method='GET', + endpoint='/creator_asset_creatives', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=CreatorAssetCreative, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=CreatorAssetCreative, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -1786,9 +1754,6 @@ def create_product(self, fields=None, params=None, batch=None, success=None, fai 'material': 'string', 'mobile_link': 'string', 'name': 'string', - 'offer_price_amount': 'unsigned int', - 'offer_price_end_date': 'datetime', - 'offer_price_start_date': 'datetime', 'ordering_index': 'unsigned int', 'origin_country': 'origin_country_enum', 'pattern': 'string', @@ -1978,6 +1943,41 @@ def create_vehicle(self, fields=None, params=None, batch=None, success=None, fai self.assure_call() return request.execute() + def create_version_items_batch(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'allow_upsert': 'bool', + 'item_type': 'string', + 'item_version': 'string', + 'requests': 'map', + 'version': 'unsigned int', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/version_items_batch', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductCatalog, + api_type='EDGE', + response_parser=ObjectParser(target_class=ProductCatalog, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + _field_types = { 'ad_account_to_collaborative_ads_share_settings': 'CollaborativeAdsShareSettings', 'agency_collaborative_ads_share_settings': 'CollaborativeAdsShareSettings', @@ -1991,11 +1991,14 @@ def create_vehicle(self, fields=None, params=None, batch=None, success=None, fai 'feed_count': 'int', 'id': 'string', 'is_catalog_segment': 'bool', + 'is_local_catalog': 'bool', 'name': 'string', 'owner_business': 'Business', 'product_count': 'int', 'store_catalog_settings': 'StoreCatalogSettings', + 'user_access_expire_time': 'datetime', 'vertical': 'string', + 'additional_vertical_option': 'AdditionalVerticalOption', 'catalog_segment_filter': 'Object', 'catalog_segment_product_set_id': 'string', 'destination_catalog_settings': 'map', @@ -2006,6 +2009,7 @@ def create_vehicle(self, fields=None, params=None, batch=None, success=None, fai @classmethod def _get_field_enum_info(cls): field_enum_info = {} + field_enum_info['AdditionalVerticalOption'] = ProductCatalog.AdditionalVerticalOption.__dict__.values() field_enum_info['Vertical'] = ProductCatalog.Vertical.__dict__.values() field_enum_info['PermittedRoles'] = ProductCatalog.PermittedRoles.__dict__.values() field_enum_info['PermittedTasks'] = ProductCatalog.PermittedTasks.__dict__.values() diff --git a/facebook_business/adobjects/productcatalogcategory.py b/facebook_business/adobjects/productcatalogcategory.py index e2271587d..301b0e6e0 100644 --- a/facebook_business/adobjects/productcatalogcategory.py +++ b/facebook_business/adobjects/productcatalogcategory.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/productcatalogdatasource.py b/facebook_business/adobjects/productcatalogdatasource.py index 0e3ba9c89..2b0b30729 100644 --- a/facebook_business/adobjects/productcatalogdatasource.py +++ b/facebook_business/adobjects/productcatalogdatasource.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/productcatalogdiagnosticgroup.py b/facebook_business/adobjects/productcatalogdiagnosticgroup.py index 3e06164a5..f2ffac58e 100644 --- a/facebook_business/adobjects/productcatalogdiagnosticgroup.py +++ b/facebook_business/adobjects/productcatalogdiagnosticgroup.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject @@ -51,14 +37,24 @@ class Field(AbstractObject.Field): type = 'type' class AffectedChannels: - business_inbox_in_messenger = 'business_inbox_in_messenger' + b2c_marketplace = 'b2c_marketplace' + c2c_marketplace = 'c2c_marketplace' + da = 'da' + daily_deals = 'daily_deals' + daily_deals_legacy = 'daily_deals_legacy' + ig_product_tagging = 'ig_product_tagging' + marketplace = 'marketplace' + marketplace_ads_deprecated = 'marketplace_ads_deprecated' + marketplace_shops = 'marketplace_shops' + mini_shops = 'mini_shops' + offline_conversions = 'offline_conversions' shops = 'shops' - test_capability = 'test_capability' universal_checkout = 'universal_checkout' - us_marketplace = 'us_marketplace' + whatsapp = 'whatsapp' class AffectedEntity: product_catalog = 'product_catalog' + product_event = 'product_event' product_item = 'product_item' product_set = 'product_set' @@ -76,6 +72,8 @@ class Type: attributes_missing = 'ATTRIBUTES_MISSING' category = 'CATEGORY' checkout = 'CHECKOUT' + da_visibility_issues = 'DA_VISIBILITY_ISSUES' + event_source_issues = 'EVENT_SOURCE_ISSUES' image_quality = 'IMAGE_QUALITY' low_quality_title_and_description = 'LOW_QUALITY_TITLE_AND_DESCRIPTION' policy_violation = 'POLICY_VIOLATION' @@ -83,6 +81,7 @@ class Type: class AffectedEntities: product_catalog = 'product_catalog' + product_event = 'product_event' product_item = 'product_item' product_set = 'product_set' @@ -96,6 +95,8 @@ class Types: attributes_missing = 'ATTRIBUTES_MISSING' category = 'CATEGORY' checkout = 'CHECKOUT' + da_visibility_issues = 'DA_VISIBILITY_ISSUES' + event_source_issues = 'EVENT_SOURCE_ISSUES' image_quality = 'IMAGE_QUALITY' low_quality_title_and_description = 'LOW_QUALITY_TITLE_AND_DESCRIPTION' policy_violation = 'POLICY_VIOLATION' diff --git a/facebook_business/adobjects/productcatalogexamplefeed.py b/facebook_business/adobjects/productcatalogexamplefeed.py new file mode 100644 index 000000000..f6598136f --- /dev/null +++ b/facebook_business/adobjects/productcatalogexamplefeed.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ProductCatalogExampleFeed( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductCatalogExampleFeed, self).__init__() + self._isProductCatalogExampleFeed = True + self._api = api + + class Field(AbstractObject.Field): + example_feed = 'example_feed' + + _field_types = { + 'example_feed': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/productcatalogfacets.py b/facebook_business/adobjects/productcatalogfacets.py new file mode 100644 index 000000000..16b16445b --- /dev/null +++ b/facebook_business/adobjects/productcatalogfacets.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ProductCatalogFacets( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductCatalogFacets, self).__init__() + self._isProductCatalogFacets = True + self._api = api + + class Field(AbstractObject.Field): + facets = 'facets' + item_count = 'item_count' + + _field_types = { + 'facets': 'list>>', + 'item_count': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/productcataloghotelroomsbatch.py b/facebook_business/adobjects/productcataloghotelroomsbatch.py index 43b03a5ee..2c1a5b8e5 100644 --- a/facebook_business/adobjects/productcataloghotelroomsbatch.py +++ b/facebook_business/adobjects/productcataloghotelroomsbatch.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/productcatalogimagesettings.py b/facebook_business/adobjects/productcatalogimagesettings.py index 7d78f8d0c..df420d4a1 100644 --- a/facebook_business/adobjects/productcatalogimagesettings.py +++ b/facebook_business/adobjects/productcatalogimagesettings.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/productcatalogimagesettingsinternal.py b/facebook_business/adobjects/productcatalogimagesettingsinternal.py new file mode 100644 index 000000000..bb2027abd --- /dev/null +++ b/facebook_business/adobjects/productcatalogimagesettingsinternal.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ProductCatalogImageSettingsInternal( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductCatalogImageSettingsInternal, self).__init__() + self._isProductCatalogImageSettingsInternal = True + self._api = api + + class Field(AbstractObject.Field): + carousel_ad = 'carousel_ad' + shops_pdp = 'shops_pdp' + single_ad = 'single_ad' + + _field_types = { + 'carousel_ad': 'ProductCatalogImageSettingsOperation', + 'shops_pdp': 'ProductCatalogImageSettingsOperation', + 'single_ad': 'ProductCatalogImageSettingsOperation', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/productcatalogimagesettingsoperation.py b/facebook_business/adobjects/productcatalogimagesettingsoperation.py index 8ea671d3c..1aacbfa76 100644 --- a/facebook_business/adobjects/productcatalogimagesettingsoperation.py +++ b/facebook_business/adobjects/productcatalogimagesettingsoperation.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/productcataloglocalizationsettings.py b/facebook_business/adobjects/productcataloglocalizationsettings.py new file mode 100644 index 000000000..0ef1908b6 --- /dev/null +++ b/facebook_business/adobjects/productcataloglocalizationsettings.py @@ -0,0 +1,74 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ProductCatalogLocalizationSettings( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isProductCatalogLocalizationSettings = True + super(ProductCatalogLocalizationSettings, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + default_country = 'default_country' + default_language = 'default_language' + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductCatalogLocalizationSettings, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'default_country': 'string', + 'default_language': 'string', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/productcatalogmicrodatastatspixelinfo.py b/facebook_business/adobjects/productcatalogmicrodatastatspixelinfo.py new file mode 100644 index 000000000..e85816721 --- /dev/null +++ b/facebook_business/adobjects/productcatalogmicrodatastatspixelinfo.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ProductCatalogMicrodataStatsPixelInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductCatalogMicrodataStatsPixelInfo, self).__init__() + self._isProductCatalogMicrodataStatsPixelInfo = True + self._api = api + + class Field(AbstractObject.Field): + is_already_connected = 'is_already_connected' + pixel_id = 'pixel_id' + + _field_types = { + 'is_already_connected': 'bool', + 'pixel_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/productcatalogpricingvariablesbatch.py b/facebook_business/adobjects/productcatalogpricingvariablesbatch.py index 1cc66a02d..baff08e77 100644 --- a/facebook_business/adobjects/productcatalogpricingvariablesbatch.py +++ b/facebook_business/adobjects/productcatalogpricingvariablesbatch.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/productcatalogproductsetsbatch.py b/facebook_business/adobjects/productcatalogproductsetsbatch.py index bc548ebf2..3e01a68a0 100644 --- a/facebook_business/adobjects/productcatalogproductsetsbatch.py +++ b/facebook_business/adobjects/productcatalogproductsetsbatch.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/productcataloguseractions.py b/facebook_business/adobjects/productcataloguseractions.py new file mode 100644 index 000000000..9514b3d21 --- /dev/null +++ b/facebook_business/adobjects/productcataloguseractions.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ProductCatalogUserActions( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductCatalogUserActions, self).__init__() + self._isProductCatalogUserActions = True + self._api = api + + class Field(AbstractObject.Field): + actions = 'actions' + + _field_types = { + 'actions': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/productcataloguserpermissions.py b/facebook_business/adobjects/productcataloguserpermissions.py new file mode 100644 index 000000000..a627d24a1 --- /dev/null +++ b/facebook_business/adobjects/productcataloguserpermissions.py @@ -0,0 +1,55 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ProductCatalogUserPermissions( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductCatalogUserPermissions, self).__init__() + self._isProductCatalogUserPermissions = True + self._api = api + + class Field(AbstractObject.Field): + business = 'business' + business_persona = 'business_persona' + created_by = 'created_by' + created_time = 'created_time' + email = 'email' + role = 'role' + status = 'status' + updated_by = 'updated_by' + updated_time = 'updated_time' + user = 'user' + + _field_types = { + 'business': 'Business', + 'business_persona': 'Object', + 'created_by': 'User', + 'created_time': 'datetime', + 'email': 'string', + 'role': 'string', + 'status': 'string', + 'updated_by': 'User', + 'updated_time': 'datetime', + 'user': 'User', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/productcatalogusertasks.py b/facebook_business/adobjects/productcatalogusertasks.py new file mode 100644 index 000000000..d657ba8da --- /dev/null +++ b/facebook_business/adobjects/productcatalogusertasks.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ProductCatalogUserTasks( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductCatalogUserTasks, self).__init__() + self._isProductCatalogUserTasks = True + self._api = api + + class Field(AbstractObject.Field): + business = 'business' + tasks = 'tasks' + + _field_types = { + 'business': 'Business', + 'tasks': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/productdaeventsamplesbatch.py b/facebook_business/adobjects/productdaeventsamplesbatch.py new file mode 100644 index 000000000..51616c59a --- /dev/null +++ b/facebook_business/adobjects/productdaeventsamplesbatch.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ProductDaEventSamplesBatch( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductDaEventSamplesBatch, self).__init__() + self._isProductDaEventSamplesBatch = True + self._api = api + + class Field(AbstractObject.Field): + samples = 'samples' + time_start = 'time_start' + time_stop = 'time_stop' + + _field_types = { + 'samples': 'list', + 'time_start': 'unsigned int', + 'time_stop': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/producteventstat.py b/facebook_business/adobjects/producteventstat.py index a4b077549..bc7d170af 100644 --- a/facebook_business/adobjects/producteventstat.py +++ b/facebook_business/adobjects/producteventstat.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/productfeed.py b/facebook_business/adobjects/productfeed.py index 30f41ce17..3b60ec585 100644 --- a/facebook_business/adobjects/productfeed.py +++ b/facebook_business/adobjects/productfeed.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -143,6 +129,8 @@ class OverrideType: language = 'LANGUAGE' language_and_country = 'LANGUAGE_AND_COUNTRY' local = 'LOCAL' + smart_pixel_language_or_country = 'SMART_PIXEL_LANGUAGE_OR_COUNTRY' + version = 'VERSION' # @deprecated get_endpoint function is deprecated @classmethod diff --git a/facebook_business/adobjects/productfeedmissingfeeditemreplacement.py b/facebook_business/adobjects/productfeedmissingfeeditemreplacement.py index 3ad508d5e..ed6bbca52 100644 --- a/facebook_business/adobjects/productfeedmissingfeeditemreplacement.py +++ b/facebook_business/adobjects/productfeedmissingfeeditemreplacement.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/productfeedrule.py b/facebook_business/adobjects/productfeedrule.py index 7bde5459f..340d2c1f4 100644 --- a/facebook_business/adobjects/productfeedrule.py +++ b/facebook_business/adobjects/productfeedrule.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/productfeedrulepreviewsample.py b/facebook_business/adobjects/productfeedrulepreviewsample.py new file mode 100644 index 000000000..2f0ed3f9b --- /dev/null +++ b/facebook_business/adobjects/productfeedrulepreviewsample.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ProductFeedRulePreviewSample( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductFeedRulePreviewSample, self).__init__() + self._isProductFeedRulePreviewSample = True + self._api = api + + class Field(AbstractObject.Field): + properties_after = 'properties_after' + properties_before = 'properties_before' + + _field_types = { + 'properties_after': 'list>', + 'properties_before': 'list>', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/productfeedrulesuggestion.py b/facebook_business/adobjects/productfeedrulesuggestion.py index 9a5cbd8cc..509824bbd 100644 --- a/facebook_business/adobjects/productfeedrulesuggestion.py +++ b/facebook_business/adobjects/productfeedrulesuggestion.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/productfeedschedule.py b/facebook_business/adobjects/productfeedschedule.py index c646d4b25..4ffde4f8b 100644 --- a/facebook_business/adobjects/productfeedschedule.py +++ b/facebook_business/adobjects/productfeedschedule.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/productfeedupload.py b/facebook_business/adobjects/productfeedupload.py index 377ddad70..c62ab1189 100644 --- a/facebook_business/adobjects/productfeedupload.py +++ b/facebook_business/adobjects/productfeedupload.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/productfeeduploaderror.py b/facebook_business/adobjects/productfeeduploaderror.py index 26ec274d5..5e051b9f0 100644 --- a/facebook_business/adobjects/productfeeduploaderror.py +++ b/facebook_business/adobjects/productfeeduploaderror.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/productfeeduploaderrorreport.py b/facebook_business/adobjects/productfeeduploaderrorreport.py index 69581e82e..2c9773f1b 100644 --- a/facebook_business/adobjects/productfeeduploaderrorreport.py +++ b/facebook_business/adobjects/productfeeduploaderrorreport.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/productfeeduploaderrorsample.py b/facebook_business/adobjects/productfeeduploaderrorsample.py index 28c07efd3..1c7720ce9 100644 --- a/facebook_business/adobjects/productfeeduploaderrorsample.py +++ b/facebook_business/adobjects/productfeeduploaderrorsample.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/productfeeduploadprogress.py b/facebook_business/adobjects/productfeeduploadprogress.py new file mode 100644 index 000000000..59cc3c597 --- /dev/null +++ b/facebook_business/adobjects/productfeeduploadprogress.py @@ -0,0 +1,45 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ProductFeedUploadProgress( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductFeedUploadProgress, self).__init__() + self._isProductFeedUploadProgress = True + self._api = api + + class Field(AbstractObject.Field): + pos = 'pos' + size = 'size' + step = 'step' + unit = 'unit' + updated_time = 'updated_time' + + _field_types = { + 'pos': 'int', + 'size': 'int', + 'step': 'string', + 'unit': 'string', + 'updated_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/productgroup.py b/facebook_business/adobjects/productgroup.py index 407efac34..3ca88e66f 100644 --- a/facebook_business/adobjects/productgroup.py +++ b/facebook_business/adobjects/productgroup.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -237,9 +223,6 @@ def create_product(self, fields=None, params=None, batch=None, success=None, fai 'material': 'string', 'mobile_link': 'string', 'name': 'string', - 'offer_price_amount': 'unsigned int', - 'offer_price_end_date': 'datetime', - 'offer_price_start_date': 'datetime', 'ordering_index': 'unsigned int', 'pattern': 'string', 'price': 'unsigned int', diff --git a/facebook_business/adobjects/productimage.py b/facebook_business/adobjects/productimage.py index 816cdd380..8c2c28ab8 100644 --- a/facebook_business/adobjects/productimage.py +++ b/facebook_business/adobjects/productimage.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -41,8 +27,10 @@ def __init__(self, fbid=None, parent_id=None, api=None): super(ProductImage, self).__init__(fbid, parent_id, api) class Field(AbstractObject.Field): + height = 'height' id = 'id' image_url = 'image_url' + width = 'width' def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils @@ -75,8 +63,10 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No return request.execute() _field_types = { + 'height': 'int', 'id': 'string', 'image_url': 'string', + 'width': 'int', } @classmethod def _get_field_enum_info(cls): diff --git a/facebook_business/adobjects/productitem.py b/facebook_business/adobjects/productitem.py index 24b27d3ec..9b435e053 100644 --- a/facebook_business/adobjects/productitem.py +++ b/facebook_business/adobjects/productitem.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -46,7 +32,6 @@ class Field(AbstractObject.Field): additional_variant_attributes = 'additional_variant_attributes' age_group = 'age_group' applinks = 'applinks' - ar_data = 'ar_data' availability = 'availability' brand = 'brand' capability_to_review_status = 'capability_to_review_status' @@ -97,6 +82,7 @@ class Field(AbstractObject.Field): product_catalog = 'product_catalog' product_feed = 'product_feed' product_group = 'product_group' + product_local_info = 'product_local_info' product_type = 'product_type' quantity_to_sell_on_facebook = 'quantity_to_sell_on_facebook' retailer_id = 'retailer_id' @@ -111,7 +97,9 @@ class Field(AbstractObject.Field): short_description = 'short_description' size = 'size' start_date = 'start_date' + tags = 'tags' url = 'url' + video_fetch_status = 'video_fetch_status' visibility = 'visibility' wa_compliance_category = 'wa_compliance_category' additional_uploaded_image_ids = 'additional_uploaded_image_ids' @@ -131,9 +119,6 @@ class Field(AbstractObject.Field): iphone_app_store_id = 'iphone_app_store_id' iphone_url = 'iphone_url' launch_date = 'launch_date' - offer_price_amount = 'offer_price_amount' - offer_price_end_date = 'offer_price_end_date' - offer_price_start_date = 'offer_price_start_date' return_policy_days = 'return_policy_days' windows_phone_app_id = 'windows_phone_app_id' windows_phone_app_name = 'windows_phone_app_name' @@ -152,6 +137,7 @@ class Availability: available_for_order = 'available for order' discontinued = 'discontinued' in_stock = 'in stock' + mark_as_sold = 'mark_as_sold' out_of_stock = 'out of stock' pending = 'pending' preorder = 'preorder' @@ -191,6 +177,14 @@ class ShippingWeightUnit: lb = 'lb' oz = 'oz' + class VideoFetchStatus: + direct_upload = 'DIRECT_UPLOAD' + fetched = 'FETCHED' + fetch_failed = 'FETCH_FAILED' + no_status = 'NO_STATUS' + outdated = 'OUTDATED' + partial_fetch = 'PARTIAL_FETCH' + class Visibility: published = 'published' staging = 'staging' @@ -408,18 +402,40 @@ class ErrorPriority: medium = 'MEDIUM' class ErrorType: + address_blocklisted_in_market = 'ADDRESS_BLOCKLISTED_IN_MARKET' + aggregated_localization_issues = 'AGGREGATED_LOCALIZATION_ISSUES' + app_has_no_aem_setup = 'APP_HAS_NO_AEM_SETUP' ar_deleted_due_to_update = 'AR_DELETED_DUE_TO_UPDATE' ar_policy_violated = 'AR_POLICY_VIOLATED' available = 'AVAILABLE' bad_quality_image = 'BAD_QUALITY_IMAGE' + big_catalog_with_all_items_in_stock = 'BIG_CATALOG_WITH_ALL_ITEMS_IN_STOCK' + biz_msg_ai_agent_disabled_by_user = 'BIZ_MSG_AI_AGENT_DISABLED_BY_USER' cannot_edit_subscription_products = 'CANNOT_EDIT_SUBSCRIPTION_PRODUCTS' + catalog_not_connected_to_event_source = 'CATALOG_NOT_CONNECTED_TO_EVENT_SOURCE' + checkout_disabled_by_user = 'CHECKOUT_DISABLED_BY_USER' + commerce_account_legal_address_invalid = 'COMMERCE_ACCOUNT_LEGAL_ADDRESS_INVALID' + commerce_account_not_legally_compliant = 'COMMERCE_ACCOUNT_NOT_LEGALLY_COMPLIANT' crawled_availability_mismatch = 'CRAWLED_AVAILABILITY_MISMATCH' + da_disabled_by_user = 'DA_DISABLED_BY_USER' + da_policy_violation = 'DA_POLICY_VIOLATION' + deleted_item = 'DELETED_ITEM' digital_goods_not_available_for_checkout = 'DIGITAL_GOODS_NOT_AVAILABLE_FOR_CHECKOUT' duplicate_images = 'DUPLICATE_IMAGES' duplicate_title_and_description = 'DUPLICATE_TITLE_AND_DESCRIPTION' + empty_availability = 'EMPTY_AVAILABILITY' + empty_condition = 'EMPTY_CONDITION' empty_description = 'EMPTY_DESCRIPTION' + empty_image_url = 'EMPTY_IMAGE_URL' + empty_price = 'EMPTY_PRICE' + empty_product_url = 'EMPTY_PRODUCT_URL' + empty_seller_description = 'EMPTY_SELLER_DESCRIPTION' + empty_title = 'EMPTY_TITLE' + external_merchant_id_mismatch = 'EXTERNAL_MERCHANT_ID_MISMATCH' generic_invalid_field = 'GENERIC_INVALID_FIELD' + groups_disabled_by_user = 'GROUPS_DISABLED_BY_USER' hidden_until_product_launch = 'HIDDEN_UNTIL_PRODUCT_LAUNCH' + illegal_product_category = 'ILLEGAL_PRODUCT_CATEGORY' image_fetch_failed = 'IMAGE_FETCH_FAILED' image_fetch_failed_bad_gateway = 'IMAGE_FETCH_FAILED_BAD_GATEWAY' image_fetch_failed_file_size_exceeded = 'IMAGE_FETCH_FAILED_FILE_SIZE_EXCEEDED' @@ -429,33 +445,61 @@ class ErrorType: image_resolution_low = 'IMAGE_RESOLUTION_LOW' inactive_shopify_product = 'INACTIVE_SHOPIFY_PRODUCT' invalid_commerce_tax_category = 'INVALID_COMMERCE_TAX_CATEGORY' + invalid_consolidated_locality_information = 'INVALID_CONSOLIDATED_LOCALITY_INFORMATION' + invalid_content_id = 'INVALID_CONTENT_ID' + invalid_dealer_communication_parameters = 'INVALID_DEALER_COMMUNICATION_PARAMETERS' + invalid_dma_codes = 'INVALID_DMA_CODES' + invalid_fb_page_id = 'INVALID_FB_PAGE_ID' invalid_images = 'INVALID_IMAGES' invalid_monetizer_return_policy = 'INVALID_MONETIZER_RETURN_POLICY' + invalid_offer_disclaimer_url = 'INVALID_OFFER_DISCLAIMER_URL' + invalid_offer_end_date = 'INVALID_OFFER_END_DATE' invalid_pre_order_params = 'INVALID_PRE_ORDER_PARAMS' + invalid_range_for_area_size = 'INVALID_RANGE_FOR_AREA_SIZE' + invalid_range_for_built_up_area_size = 'INVALID_RANGE_FOR_BUILT_UP_AREA_SIZE' + invalid_range_for_num_of_baths = 'INVALID_RANGE_FOR_NUM_OF_BATHS' + invalid_range_for_num_of_beds = 'INVALID_RANGE_FOR_NUM_OF_BEDS' + invalid_range_for_num_of_rooms = 'INVALID_RANGE_FOR_NUM_OF_ROOMS' + invalid_range_for_parking_spaces = 'INVALID_RANGE_FOR_PARKING_SPACES' + invalid_shelter_page_id = 'INVALID_SHELTER_PAGE_ID' invalid_shipping_profile_params = 'INVALID_SHIPPING_PROFILE_PARAMS' invalid_subscription_disable_params = 'INVALID_SUBSCRIPTION_DISABLE_PARAMS' invalid_subscription_enable_params = 'INVALID_SUBSCRIPTION_ENABLE_PARAMS' invalid_subscription_params = 'INVALID_SUBSCRIPTION_PARAMS' + invalid_vehicle_state = 'INVALID_VEHICLE_STATE' + invalid_virtual_tour_url_domain = 'INVALID_VIRTUAL_TOUR_URL_DOMAIN' inventory_zero_availability_in_stock = 'INVENTORY_ZERO_AVAILABILITY_IN_STOCK' in_another_product_launch = 'IN_ANOTHER_PRODUCT_LAUNCH' item_group_not_specified = 'ITEM_GROUP_NOT_SPECIFIED' item_not_shippable_for_sca_shop = 'ITEM_NOT_SHIPPABLE_FOR_SCA_SHOP' + item_override_empty_availability = 'ITEM_OVERRIDE_EMPTY_AVAILABILITY' + item_override_empty_price = 'ITEM_OVERRIDE_EMPTY_PRICE' item_override_not_visible = 'ITEM_OVERRIDE_NOT_VISIBLE' + item_price_not_positive = 'ITEM_PRICE_NOT_POSITIVE' item_stale_out_of_stock = 'ITEM_STALE_OUT_OF_STOCK' + marketplace_disabled_by_user = 'MARKETPLACE_DISABLED_BY_USER' mini_shops_disabled_by_user = 'MINI_SHOPS_DISABLED_BY_USER' missing_checkout = 'MISSING_CHECKOUT' missing_checkout_currency = 'MISSING_CHECKOUT_CURRENCY' missing_color = 'MISSING_COLOR' missing_country_override_in_shipping_profile = 'MISSING_COUNTRY_OVERRIDE_IN_SHIPPING_PROFILE' + missing_event = 'MISSING_EVENT' missing_india_compliance_fields = 'MISSING_INDIA_COMPLIANCE_FIELDS' missing_shipping_profile = 'MISSING_SHIPPING_PROFILE' missing_size = 'MISSING_SIZE' missing_tax_category = 'MISSING_TAX_CATEGORY' negative_community_feedback = 'NEGATIVE_COMMUNITY_FEEDBACK' + negative_price = 'NEGATIVE_PRICE' not_enough_images = 'NOT_ENOUGH_IMAGES' + not_enough_unique_products = 'NOT_ENOUGH_UNIQUE_PRODUCTS' + no_content_id = 'NO_CONTENT_ID' + overlay_disclaimer_exceeded_max_length = 'OVERLAY_DISCLAIMER_EXCEEDED_MAX_LENGTH' part_of_product_launch = 'PART_OF_PRODUCT_LAUNCH' + passing_multiple_content_ids = 'PASSING_MULTIPLE_CONTENT_IDS' + product_dominant_currency_mismatch = 'PRODUCT_DOMINANT_CURRENCY_MISMATCH' product_expired = 'PRODUCT_EXPIRED' product_item_hidden_from_all_shops = 'PRODUCT_ITEM_HIDDEN_FROM_ALL_SHOPS' + product_item_invalid_partner_tokens = 'PRODUCT_ITEM_INVALID_PARTNER_TOKENS' product_item_not_included_in_any_shop = 'PRODUCT_ITEM_NOT_INCLUDED_IN_ANY_SHOP' product_item_not_visible = 'PRODUCT_ITEM_NOT_VISIBLE' product_not_approved = 'PRODUCT_NOT_APPROVED' @@ -465,6 +509,7 @@ class ErrorType: property_price_currency_not_supported = 'PROPERTY_PRICE_CURRENCY_NOT_SUPPORTED' property_price_too_high = 'PROPERTY_PRICE_TOO_HIGH' property_price_too_low = 'PROPERTY_PRICE_TOO_LOW' + property_unit_price_currency_mismatch_item_price_currency = 'PROPERTY_UNIT_PRICE_CURRENCY_MISMATCH_ITEM_PRICE_CURRENCY' property_value_contains_html_tags = 'PROPERTY_VALUE_CONTAINS_HTML_TAGS' property_value_description_contains_off_platform_link = 'PROPERTY_VALUE_DESCRIPTION_CONTAINS_OFF_PLATFORM_LINK' property_value_format = 'PROPERTY_VALUE_FORMAT' @@ -473,16 +518,32 @@ class ErrorType: property_value_non_positive = 'PROPERTY_VALUE_NON_POSITIVE' property_value_string_exceeds_length = 'PROPERTY_VALUE_STRING_EXCEEDS_LENGTH' property_value_string_too_short = 'PROPERTY_VALUE_STRING_TOO_SHORT' + property_value_uppercase = 'PROPERTY_VALUE_UPPERCASE' property_value_uppercase_warning = 'PROPERTY_VALUE_UPPERCASE_WARNING' + purchase_rate_below_addtocart = 'PURCHASE_RATE_BELOW_ADDTOCART' + purchase_rate_below_viewcontent = 'PURCHASE_RATE_BELOW_VIEWCONTENT' quality_duplicated_description = 'QUALITY_DUPLICATED_DESCRIPTION' quality_item_link_broken = 'QUALITY_ITEM_LINK_BROKEN' quality_item_link_redirecting = 'QUALITY_ITEM_LINK_REDIRECTING' retailer_id_not_provided = 'RETAILER_ID_NOT_PROVIDED' + shopify_invalid_retailer_id = 'SHOPIFY_INVALID_RETAILER_ID' shopify_item_missing_shipping_profile = 'SHOPIFY_ITEM_MISSING_SHIPPING_PROFILE' + shops_policy_violation = 'SHOPS_POLICY_VIOLATION' subscription_info_not_enabled_for_feed = 'SUBSCRIPTION_INFO_NOT_ENABLED_FOR_FEED' tax_category_not_supported_in_uk = 'TAX_CATEGORY_NOT_SUPPORTED_IN_UK' + unique_product_identifier_missing = 'UNIQUE_PRODUCT_IDENTIFIER_MISSING' + unmatched_events = 'UNMATCHED_EVENTS' unsupported_product_category = 'UNSUPPORTED_PRODUCT_CATEGORY' variant_attribute_issue = 'VARIANT_ATTRIBUTE_ISSUE' + video_fetch_failed = 'VIDEO_FETCH_FAILED' + video_fetch_failed_bad_gateway = 'VIDEO_FETCH_FAILED_BAD_GATEWAY' + video_fetch_failed_file_size_exceeded = 'VIDEO_FETCH_FAILED_FILE_SIZE_EXCEEDED' + video_fetch_failed_forbidden = 'VIDEO_FETCH_FAILED_FORBIDDEN' + video_fetch_failed_link_broken = 'VIDEO_FETCH_FAILED_LINK_BROKEN' + video_fetch_failed_timed_out = 'VIDEO_FETCH_FAILED_TIMED_OUT' + video_not_downloadable = 'VIDEO_NOT_DOWNLOADABLE' + whatsapp_disabled_by_user = 'WHATSAPP_DISABLED_BY_USER' + whatsapp_policy_violation = 'WHATSAPP_POLICY_VIOLATION' class MarkedForProductLaunch: value_default = 'default' @@ -878,9 +939,6 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure 'material': 'string', 'mobile_link': 'string', 'name': 'string', - 'offer_price_amount': 'unsigned int', - 'offer_price_end_date': 'datetime', - 'offer_price_start_date': 'datetime', 'ordering_index': 'unsigned int', 'origin_country': 'origin_country_enum', 'pattern': 'string', @@ -1000,6 +1058,7 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.dynamicvideometadata import DynamicVideoMetadata param_types = { } enums = { @@ -1010,9 +1069,9 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None endpoint='/videos_metadata', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=DynamicVideoMetadata, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=DynamicVideoMetadata, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -1032,7 +1091,6 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None 'additional_variant_attributes': 'list>', 'age_group': 'AgeGroup', 'applinks': 'CatalogItemAppLinks', - 'ar_data': 'ProductItemARData', 'availability': 'Availability', 'brand': 'string', 'capability_to_review_status': 'list>', @@ -1066,7 +1124,7 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None 'images': 'list', 'importer_address': 'ProductItemImporterAddress', 'importer_name': 'string', - 'invalidation_errors': 'list', + 'invalidation_errors': 'list', 'inventory': 'int', 'manufacturer_info': 'string', 'manufacturer_part_number': 'string', @@ -1083,6 +1141,7 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None 'product_catalog': 'ProductCatalog', 'product_feed': 'ProductFeed', 'product_group': 'ProductGroup', + 'product_local_info': 'ProductItemLocalInfo', 'product_type': 'string', 'quantity_to_sell_on_facebook': 'int', 'retailer_id': 'string', @@ -1097,7 +1156,9 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None 'short_description': 'string', 'size': 'string', 'start_date': 'string', + 'tags': 'list', 'url': 'string', + 'video_fetch_status': 'VideoFetchStatus', 'visibility': 'Visibility', 'wa_compliance_category': 'string', 'additional_uploaded_image_ids': 'list', @@ -1117,9 +1178,6 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None 'iphone_app_store_id': 'unsigned int', 'iphone_url': 'string', 'launch_date': 'string', - 'offer_price_amount': 'unsigned int', - 'offer_price_end_date': 'datetime', - 'offer_price_start_date': 'datetime', 'return_policy_days': 'unsigned int', 'windows_phone_app_id': 'string', 'windows_phone_app_name': 'string', @@ -1135,6 +1193,7 @@ def _get_field_enum_info(cls): field_enum_info['ImageFetchStatus'] = ProductItem.ImageFetchStatus.__dict__.values() field_enum_info['ReviewStatus'] = ProductItem.ReviewStatus.__dict__.values() field_enum_info['ShippingWeightUnit'] = ProductItem.ShippingWeightUnit.__dict__.values() + field_enum_info['VideoFetchStatus'] = ProductItem.VideoFetchStatus.__dict__.values() field_enum_info['Visibility'] = ProductItem.Visibility.__dict__.values() field_enum_info['CommerceTaxCategory'] = ProductItem.CommerceTaxCategory.__dict__.values() field_enum_info['ErrorPriority'] = ProductItem.ErrorPriority.__dict__.values() diff --git a/facebook_business/adobjects/productitemardata.py b/facebook_business/adobjects/productitemardata.py deleted file mode 100644 index db6e82f7f..000000000 --- a/facebook_business/adobjects/productitemardata.py +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright 2014 Facebook, Inc. - -# 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. - -from facebook_business.adobjects.abstractobject import AbstractObject - -""" -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 ProductItemARData( - AbstractObject, -): - - def __init__(self, api=None): - super(ProductItemARData, self).__init__() - self._isProductItemARData = True - self._api = api - - class Field(AbstractObject.Field): - container_effect = 'container_effect' - effect_icon = 'effect_icon' - effect_parameters = 'effect_parameters' - picker_icon = 'picker_icon' - product_ar_link = 'product_ar_link' - state = 'state' - surfaces = 'surfaces' - - class Surfaces: - b2c_marketplace = 'B2C_MARKETPLACE' - c2c_marketplace = 'C2C_MARKETPLACE' - da = 'DA' - daily_deals = 'DAILY_DEALS' - daily_deals_legacy = 'DAILY_DEALS_LEGACY' - ig_product_tagging = 'IG_PRODUCT_TAGGING' - marketplace = 'MARKETPLACE' - marketplace_ads_deprecated = 'MARKETPLACE_ADS_DEPRECATED' - marketplace_shops = 'MARKETPLACE_SHOPS' - mini_shops = 'MINI_SHOPS' - offline_conversions = 'OFFLINE_CONVERSIONS' - shops = 'SHOPS' - universal_checkout = 'UNIVERSAL_CHECKOUT' - whatsapp = 'WHATSAPP' - - _field_types = { - 'container_effect': 'string', - 'effect_icon': 'string', - 'effect_parameters': 'Object', - 'picker_icon': 'string', - 'product_ar_link': 'Object', - 'state': 'string', - 'surfaces': 'list', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - field_enum_info['Surfaces'] = ProductItemARData.Surfaces.__dict__.values() - return field_enum_info - - diff --git a/facebook_business/adobjects/productitemcommerceinsights.py b/facebook_business/adobjects/productitemcommerceinsights.py index 48809f460..0f15e1609 100644 --- a/facebook_business/adobjects/productitemcommerceinsights.py +++ b/facebook_business/adobjects/productitemcommerceinsights.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/productitemerror.py b/facebook_business/adobjects/productitemerror.py index 1837a692a..9e0b5f852 100644 --- a/facebook_business/adobjects/productitemerror.py +++ b/facebook_business/adobjects/productitemerror.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/productitemimporteraddress.py b/facebook_business/adobjects/productitemimporteraddress.py index 59f01a353..1b1ae8881 100644 --- a/facebook_business/adobjects/productitemimporteraddress.py +++ b/facebook_business/adobjects/productitemimporteraddress.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/productiteminsights.py b/facebook_business/adobjects/productiteminsights.py new file mode 100644 index 000000000..e3a22933b --- /dev/null +++ b/facebook_business/adobjects/productiteminsights.py @@ -0,0 +1,45 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ProductItemInsights( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductItemInsights, self).__init__() + self._isProductItemInsights = True + self._api = api + + class Field(AbstractObject.Field): + ad_click_count = 'ad_click_count' + ad_impression_count = 'ad_impression_count' + add_to_cart_count = 'add_to_cart_count' + purchase_count = 'purchase_count' + view_content_count = 'view_content_count' + + _field_types = { + 'ad_click_count': 'int', + 'ad_impression_count': 'int', + 'add_to_cart_count': 'int', + 'purchase_count': 'int', + 'view_content_count': 'int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/productiteminvalidationerror.py b/facebook_business/adobjects/productiteminvalidationerror.py new file mode 100644 index 000000000..746f92fe0 --- /dev/null +++ b/facebook_business/adobjects/productiteminvalidationerror.py @@ -0,0 +1,36 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ProductItemInvalidationError( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductItemInvalidationError, self).__init__() + self._isProductItemInvalidationError = True + self._api = api + + class Field(AbstractObject.Field): + pass + + _field_types = { + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/productitemlandingpagedata.py b/facebook_business/adobjects/productitemlandingpagedata.py new file mode 100644 index 000000000..43cc6a611 --- /dev/null +++ b/facebook_business/adobjects/productitemlandingpagedata.py @@ -0,0 +1,47 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ProductItemLandingPageData( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductItemLandingPageData, self).__init__() + self._isProductItemLandingPageData = True + self._api = api + + class Field(AbstractObject.Field): + availability = 'availability' + + class Availability: + available_for_order = 'available for order' + discontinued = 'discontinued' + in_stock = 'in stock' + mark_as_sold = 'mark_as_sold' + out_of_stock = 'out of stock' + pending = 'pending' + preorder = 'preorder' + + _field_types = { + 'availability': 'Availability', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Availability'] = ProductItemLandingPageData.Availability.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/productitemlocalinfo.py b/facebook_business/adobjects/productitemlocalinfo.py new file mode 100644 index 000000000..d8b2bf270 --- /dev/null +++ b/facebook_business/adobjects/productitemlocalinfo.py @@ -0,0 +1,86 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ProductItemLocalInfo( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isProductItemLocalInfo = True + super(ProductItemLocalInfo, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + availability_circle_origin = 'availability_circle_origin' + availability_circle_radius = 'availability_circle_radius' + availability_circle_radius_unit = 'availability_circle_radius_unit' + availability_polygon_coordinates = 'availability_polygon_coordinates' + availability_postal_codes = 'availability_postal_codes' + availability_source = 'availability_source' + id = 'id' + inferred_circle_origin = 'inferred_circle_origin' + inferred_circle_radius = 'inferred_circle_radius' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductItemLocalInfo, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'availability_circle_origin': 'ProductItemLocalInfoLatLongShape', + 'availability_circle_radius': 'float', + 'availability_circle_radius_unit': 'string', + 'availability_polygon_coordinates': 'list', + 'availability_postal_codes': 'list', + 'availability_source': 'string', + 'id': 'string', + 'inferred_circle_origin': 'ProductItemLocalInfoLatLongShape', + 'inferred_circle_radius': 'float', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/productitemlocalinfolatlongshape.py b/facebook_business/adobjects/productitemlocalinfolatlongshape.py new file mode 100644 index 000000000..c4e5d5ada --- /dev/null +++ b/facebook_business/adobjects/productitemlocalinfolatlongshape.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ProductItemLocalInfoLatLongShape( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductItemLocalInfoLatLongShape, self).__init__() + self._isProductItemLocalInfoLatLongShape = True + self._api = api + + class Field(AbstractObject.Field): + latitude = 'latitude' + longitude = 'longitude' + + _field_types = { + 'latitude': 'float', + 'longitude': 'float', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/productitemoffer.py b/facebook_business/adobjects/productitemoffer.py new file mode 100644 index 000000000..cf68321f2 --- /dev/null +++ b/facebook_business/adobjects/productitemoffer.py @@ -0,0 +1,74 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ProductItemOffer( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isProductItemOffer = True + super(ProductItemOffer, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + availability_area = 'availability_area' + availability_radius = 'availability_radius' + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductItemOffer, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'availability_area': 'list', + 'availability_radius': 'float', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/productitemshipping.py b/facebook_business/adobjects/productitemshipping.py new file mode 100644 index 000000000..bcd365e47 --- /dev/null +++ b/facebook_business/adobjects/productitemshipping.py @@ -0,0 +1,45 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ProductItemShipping( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductItemShipping, self).__init__() + self._isProductItemShipping = True + self._api = api + + class Field(AbstractObject.Field): + shipping_country = 'shipping_country' + shipping_price_currency = 'shipping_price_currency' + shipping_price_value = 'shipping_price_value' + shipping_region = 'shipping_region' + shipping_service = 'shipping_service' + + _field_types = { + 'shipping_country': 'string', + 'shipping_price_currency': 'string', + 'shipping_price_value': 'float', + 'shipping_region': 'string', + 'shipping_service': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/productitemsubscriptioninfo.py b/facebook_business/adobjects/productitemsubscriptioninfo.py new file mode 100644 index 000000000..a53a108e7 --- /dev/null +++ b/facebook_business/adobjects/productitemsubscriptioninfo.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ProductItemSubscriptionInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductItemSubscriptionInfo, self).__init__() + self._isProductItemSubscriptionInfo = True + self._api = api + + class Field(AbstractObject.Field): + is_subscribable = 'is_subscribable' + subscription_billing_period = 'subscription_billing_period' + subscription_billing_type = 'subscription_billing_type' + + _field_types = { + 'is_subscribable': 'bool', + 'subscription_billing_period': 'unsigned int', + 'subscription_billing_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/productitemunitprice.py b/facebook_business/adobjects/productitemunitprice.py new file mode 100644 index 000000000..356d648e0 --- /dev/null +++ b/facebook_business/adobjects/productitemunitprice.py @@ -0,0 +1,36 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ProductItemUnitPrice( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductItemUnitPrice, self).__init__() + self._isProductItemUnitPrice = True + self._api = api + + class Field(AbstractObject.Field): + pass + + _field_types = { + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/productset.py b/facebook_business/adobjects/productset.py index 842874928..ed8e7917f 100644 --- a/facebook_business/adobjects/productset.py +++ b/facebook_business/adobjects/productset.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/productsetmetadata.py b/facebook_business/adobjects/productsetmetadata.py index c11c8a17f..9a3977f57 100644 --- a/facebook_business/adobjects/productsetmetadata.py +++ b/facebook_business/adobjects/productsetmetadata.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/productsettaxoncategory.py b/facebook_business/adobjects/productsettaxoncategory.py new file mode 100644 index 000000000..8b8a0cdf6 --- /dev/null +++ b/facebook_business/adobjects/productsettaxoncategory.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ProductSetTaxonCategory( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductSetTaxonCategory, self).__init__() + self._isProductSetTaxonCategory = True + self._api = api + + class Field(AbstractObject.Field): + category_id = 'category_id' + category_name = 'category_name' + image_url = 'image_url' + + _field_types = { + 'category_id': 'int', + 'category_name': 'string', + 'image_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/productsetusage.py b/facebook_business/adobjects/productsetusage.py new file mode 100644 index 000000000..d78f4117d --- /dev/null +++ b/facebook_business/adobjects/productsetusage.py @@ -0,0 +1,74 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ProductSetUsage( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isProductSetUsage = True + super(ProductSetUsage, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + product_set = 'product_set' + usage_type = 'usage_type' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ProductSetUsage, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'product_set': 'ProductSet', + 'usage_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/productvariant.py b/facebook_business/adobjects/productvariant.py index 27c473d07..e20ec914e 100644 --- a/facebook_business/adobjects/productvariant.py +++ b/facebook_business/adobjects/productvariant.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/productvisualvariant.py b/facebook_business/adobjects/productvisualvariant.py new file mode 100644 index 000000000..9ea5baff7 --- /dev/null +++ b/facebook_business/adobjects/productvisualvariant.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ProductVisualVariant( + AbstractObject, +): + + def __init__(self, api=None): + super(ProductVisualVariant, self).__init__() + self._isProductVisualVariant = True + self._api = api + + class Field(AbstractObject.Field): + items = 'items' + unique_key = 'unique_key' + + _field_types = { + 'items': 'list', + 'unique_key': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/profile.py b/facebook_business/adobjects/profile.py index b0e510e20..db55e7391 100644 --- a/facebook_business/adobjects/profile.py +++ b/facebook_business/adobjects/profile.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -110,14 +96,12 @@ def get_picture(self, fields=None, params=None, batch=None, success=None, failur api_utils.warning('`success` and `failure` callback only work for batch call.') from facebook_business.adobjects.profilepicturesource import ProfilePictureSource param_types = { - 'breaking_change': 'breaking_change_enum', 'height': 'int', 'redirect': 'bool', 'type': 'type_enum', 'width': 'int', } enums = { - 'breaking_change_enum': ProfilePictureSource.BreakingChange.__dict__.values(), 'type_enum': ProfilePictureSource.Type.__dict__.values(), } request = FacebookRequest( diff --git a/facebook_business/adobjects/profilepicturesource.py b/facebook_business/adobjects/profilepicturesource.py index f3395861c..e46a1c4e9 100644 --- a/facebook_business/adobjects/profilepicturesource.py +++ b/facebook_business/adobjects/profilepicturesource.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -53,9 +39,6 @@ class Type: small = 'small' thumbnail = 'thumbnail' - class BreakingChange: - profile_picture = 'PROFILE_PICTURE' - _field_types = { 'bottom': 'unsigned int', 'cache_key': 'string', @@ -71,7 +54,6 @@ class BreakingChange: def _get_field_enum_info(cls): field_enum_info = {} field_enum_info['Type'] = ProfilePictureSource.Type.__dict__.values() - field_enum_info['BreakingChange'] = ProfilePictureSource.BreakingChange.__dict__.values() return field_enum_info diff --git a/facebook_business/adobjects/publisherblocklist.py b/facebook_business/adobjects/publisherblocklist.py index 073ba3849..db7d7edb0 100644 --- a/facebook_business/adobjects/publisherblocklist.py +++ b/facebook_business/adobjects/publisherblocklist.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -156,7 +142,7 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure self.assure_call() return request.execute() - def create_app_end_publisher_url(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def create_append_publisher_url(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -191,6 +177,7 @@ def get_paged_web_publishers(self, fields=None, params=None, batch=None, success from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.webpublisher import WebPublisher param_types = { 'draft_id': 'string', } @@ -202,9 +189,9 @@ def get_paged_web_publishers(self, fields=None, params=None, batch=None, success endpoint='/paged_web_publishers', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=WebPublisher, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=WebPublisher, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -219,7 +206,7 @@ def get_paged_web_publishers(self, fields=None, params=None, batch=None, success return request.execute() _field_types = { - 'app_publishers': 'list', + 'app_publishers': 'list', 'business_owner_id': 'string', 'id': 'string', 'is_auto_blocking_on': 'bool', @@ -228,7 +215,7 @@ def get_paged_web_publishers(self, fields=None, params=None, batch=None, success 'last_update_user': 'string', 'name': 'string', 'owner_ad_account_id': 'string', - 'web_publishers': 'list', + 'web_publishers': 'list', } @classmethod def _get_field_enum_info(cls): diff --git a/facebook_business/adobjects/publisherdeliveryreport.py b/facebook_business/adobjects/publisherdeliveryreport.py new file mode 100644 index 000000000..22a77b0b1 --- /dev/null +++ b/facebook_business/adobjects/publisherdeliveryreport.py @@ -0,0 +1,45 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 PublisherDeliveryReport( + AbstractObject, +): + + def __init__(self, api=None): + super(PublisherDeliveryReport, self).__init__() + self._isPublisherDeliveryReport = True + self._api = api + + class Field(AbstractObject.Field): + content_types = 'content_types' + estimated_impressions = 'estimated_impressions' + name = 'name' + status = 'status' + url = 'url' + + _field_types = { + 'content_types': 'list', + 'estimated_impressions': 'unsigned int', + 'name': 'string', + 'status': 'string', + 'url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/publisherwhitelist.py b/facebook_business/adobjects/publisherwhitelist.py new file mode 100644 index 000000000..bd9f9450e --- /dev/null +++ b/facebook_business/adobjects/publisherwhitelist.py @@ -0,0 +1,80 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 PublisherWhiteList( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isPublisherWhiteList = True + super(PublisherWhiteList, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + business_owner_id = 'business_owner_id' + id = 'id' + last_updated_time = 'last_updated_time' + last_updated_user = 'last_updated_user' + name = 'name' + placement_type = 'placement_type' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=PublisherWhiteList, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'business_owner_id': 'string', + 'id': 'string', + 'last_updated_time': 'datetime', + 'last_updated_user': 'string', + 'name': 'string', + 'placement_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/rawcustomaudience.py b/facebook_business/adobjects/rawcustomaudience.py index f58a893ff..ea2bc1a14 100644 --- a/facebook_business/adobjects/rawcustomaudience.py +++ b/facebook_business/adobjects/rawcustomaudience.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/reachfrequencyactivity.py b/facebook_business/adobjects/reachfrequencyactivity.py index 3223b8a62..05782fb34 100644 --- a/facebook_business/adobjects/reachfrequencyactivity.py +++ b/facebook_business/adobjects/reachfrequencyactivity.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/reachfrequencyadformat.py b/facebook_business/adobjects/reachfrequencyadformat.py index 4a21cf9e9..2be4db09f 100644 --- a/facebook_business/adobjects/reachfrequencyadformat.py +++ b/facebook_business/adobjects/reachfrequencyadformat.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/reachfrequencycurvelowerconfidencerange.py b/facebook_business/adobjects/reachfrequencycurvelowerconfidencerange.py index 61e890ca8..8aa49e7db 100644 --- a/facebook_business/adobjects/reachfrequencycurvelowerconfidencerange.py +++ b/facebook_business/adobjects/reachfrequencycurvelowerconfidencerange.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/reachfrequencycurveupperconfidencerange.py b/facebook_business/adobjects/reachfrequencycurveupperconfidencerange.py index bb78722f3..d2868f9d9 100644 --- a/facebook_business/adobjects/reachfrequencycurveupperconfidencerange.py +++ b/facebook_business/adobjects/reachfrequencycurveupperconfidencerange.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/reachfrequencydaypart.py b/facebook_business/adobjects/reachfrequencydaypart.py index d60a23ca2..b59493de1 100644 --- a/facebook_business/adobjects/reachfrequencydaypart.py +++ b/facebook_business/adobjects/reachfrequencydaypart.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/reachfrequencyestimatescurve.py b/facebook_business/adobjects/reachfrequencyestimatescurve.py index 8da0150ff..cca3c2d34 100644 --- a/facebook_business/adobjects/reachfrequencyestimatescurve.py +++ b/facebook_business/adobjects/reachfrequencyestimatescurve.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/reachfrequencyestimatesplacementbreakdown.py b/facebook_business/adobjects/reachfrequencyestimatesplacementbreakdown.py index 1d229c7cb..898c1aa0a 100644 --- a/facebook_business/adobjects/reachfrequencyestimatesplacementbreakdown.py +++ b/facebook_business/adobjects/reachfrequencyestimatesplacementbreakdown.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/reachfrequencyprediction.py b/facebook_business/adobjects/reachfrequencyprediction.py index 4a1e55808..cdfd5082c 100644 --- a/facebook_business/adobjects/reachfrequencyprediction.py +++ b/facebook_business/adobjects/reachfrequencyprediction.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -137,6 +123,7 @@ class Field(AbstractObject.Field): existing_campaign_id = 'existing_campaign_id' grp_buying = 'grp_buying' impression = 'impression' + is_balanced_frequency = 'is_balanced_frequency' is_full_view = 'is_full_view' is_reach_and_frequency_io_buying = 'is_reach_and_frequency_io_buying' num_curve_points = 'num_curve_points' @@ -145,6 +132,8 @@ class Field(AbstractObject.Field): rf_prediction_id_to_release = 'rf_prediction_id_to_release' rf_prediction_id_to_share = 'rf_prediction_id_to_share' stop_time = 'stop_time' + target_frequency = 'target_frequency' + target_frequency_reset_period = 'target_frequency_reset_period' class Action: cancel = 'cancel' @@ -311,6 +300,7 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No 'existing_campaign_id': 'string', 'grp_buying': 'bool', 'impression': 'unsigned int', + 'is_balanced_frequency': 'bool', 'is_full_view': 'bool', 'is_reach_and_frequency_io_buying': 'bool', 'num_curve_points': 'unsigned int', @@ -319,6 +309,8 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No 'rf_prediction_id_to_release': 'string', 'rf_prediction_id_to_share': 'string', 'stop_time': 'unsigned int', + 'target_frequency': 'unsigned int', + 'target_frequency_reset_period': 'unsigned int', } @classmethod def _get_field_enum_info(cls): diff --git a/facebook_business/adobjects/reachfrequencyspec.py b/facebook_business/adobjects/reachfrequencyspec.py index 997f73008..7618e6ddc 100644 --- a/facebook_business/adobjects/reachfrequencyspec.py +++ b/facebook_business/adobjects/reachfrequencyspec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/recommendation.py b/facebook_business/adobjects/recommendation.py index 75e3acc6c..371e8179e 100644 --- a/facebook_business/adobjects/recommendation.py +++ b/facebook_business/adobjects/recommendation.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/recommendedigmedia.py b/facebook_business/adobjects/recommendedigmedia.py new file mode 100644 index 000000000..985a5f01e --- /dev/null +++ b/facebook_business/adobjects/recommendedigmedia.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 RecommendedIGMedia( + AbstractObject, +): + + def __init__(self, api=None): + super(RecommendedIGMedia, self).__init__() + self._isRecommendedIGMedia = True + self._api = api + + class Field(AbstractObject.Field): + intent_score = 'intent_score' + media = 'media' + + _field_types = { + 'intent_score': 'float', + 'media': 'InstagramMedia', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/recommendedpagepost.py b/facebook_business/adobjects/recommendedpagepost.py new file mode 100644 index 000000000..85ab6e38a --- /dev/null +++ b/facebook_business/adobjects/recommendedpagepost.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 RecommendedPagePost( + AbstractObject, +): + + def __init__(self, api=None): + super(RecommendedPagePost, self).__init__() + self._isRecommendedPagePost = True + self._api = api + + class Field(AbstractObject.Field): + intent_score = 'intent_score' + is_ig_media = 'is_ig_media' + post_id = 'post_id' + + _field_types = { + 'intent_score': 'float', + 'is_ig_media': 'bool', + 'post_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/regionalregulationidentities.py b/facebook_business/adobjects/regionalregulationidentities.py new file mode 100644 index 000000000..e8ea37da6 --- /dev/null +++ b/facebook_business/adobjects/regionalregulationidentities.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 RegionalRegulationIdentities( + AbstractObject, +): + + def __init__(self, api=None): + super(RegionalRegulationIdentities, self).__init__() + self._isRegionalRegulationIdentities = True + self._api = api + + class Field(AbstractObject.Field): + taiwan_finserv_beneficiary = 'taiwan_finserv_beneficiary' + taiwan_finserv_payer = 'taiwan_finserv_payer' + + _field_types = { + 'taiwan_finserv_beneficiary': 'string', + 'taiwan_finserv_payer': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/reportingaudience.py b/facebook_business/adobjects/reportingaudience.py new file mode 100644 index 000000000..ca061ed62 --- /dev/null +++ b/facebook_business/adobjects/reportingaudience.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ReportingAudience( + AbstractObject, +): + + def __init__(self, api=None): + super(ReportingAudience, self).__init__() + self._isReportingAudience = True + self._api = api + + class Field(AbstractObject.Field): + custom_audiences = 'custom_audiences' + custom_audiences_url_param_name = 'custom_audiences_url_param_name' + custom_audiences_url_param_type = 'custom_audiences_url_param_type' + + _field_types = { + 'custom_audiences': 'list', + 'custom_audiences_url_param_name': 'string', + 'custom_audiences_url_param_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/researchpollstudy.py b/facebook_business/adobjects/researchpollstudy.py new file mode 100644 index 000000000..516b3730c --- /dev/null +++ b/facebook_business/adobjects/researchpollstudy.py @@ -0,0 +1,74 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ResearchPollStudy( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isResearchPollStudy = True + super(ResearchPollStudy, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account = 'account' + id = 'id' + name = 'name' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ResearchPollStudy, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'account': 'AdAccount', + 'id': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/resellerguidance.py b/facebook_business/adobjects/resellerguidance.py new file mode 100644 index 000000000..83353b73d --- /dev/null +++ b/facebook_business/adobjects/resellerguidance.py @@ -0,0 +1,69 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ResellerGuidance( + AbstractObject, +): + + def __init__(self, api=None): + super(ResellerGuidance, self).__init__() + self._isResellerGuidance = True + self._api = api + + class Field(AbstractObject.Field): + ad_account_first_spend_date = 'ad_account_first_spend_date' + ad_account_id = 'ad_account_id' + adopted_guidance_l7d = 'adopted_guidance_l7d' + advertiser_name = 'advertiser_name' + attributed_to_reseller_l7d = 'attributed_to_reseller_l7d' + available_guidance = 'available_guidance' + benchmark_report_link = 'benchmark_report_link' + guidance_adoption_rate_l7d = 'guidance_adoption_rate_l7d' + no_adsets_gte_benchmark = 'no_adsets_gte_benchmark' + no_adsets_lt_benchmark = 'no_adsets_lt_benchmark' + nurtured_by_reseller_l7d = 'nurtured_by_reseller_l7d' + planning_agency_name = 'planning_agency_name' + recommendation_time = 'recommendation_time' + reporting_ds = 'reporting_ds' + reseller = 'reseller' + revenue_l30d = 'revenue_l30d' + ultimate_advertiser_name = 'ultimate_advertiser_name' + + _field_types = { + 'ad_account_first_spend_date': 'string', + 'ad_account_id': 'string', + 'adopted_guidance_l7d': 'list', + 'advertiser_name': 'string', + 'attributed_to_reseller_l7d': 'bool', + 'available_guidance': 'list', + 'benchmark_report_link': 'string', + 'guidance_adoption_rate_l7d': 'float', + 'no_adsets_gte_benchmark': 'int', + 'no_adsets_lt_benchmark': 'int', + 'nurtured_by_reseller_l7d': 'bool', + 'planning_agency_name': 'string', + 'recommendation_time': 'datetime', + 'reporting_ds': 'string', + 'reseller': 'Business', + 'revenue_l30d': 'float', + 'ultimate_advertiser_name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/revsharepolicy.py b/facebook_business/adobjects/revsharepolicy.py index 9a55ecb11..7b0dddd71 100644 --- a/facebook_business/adobjects/revsharepolicy.py +++ b/facebook_business/adobjects/revsharepolicy.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/richmediaelement.py b/facebook_business/adobjects/richmediaelement.py index 5fbf77ab0..a47cb2c0a 100644 --- a/facebook_business/adobjects/richmediaelement.py +++ b/facebook_business/adobjects/richmediaelement.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/rightsmanagerdataexport.py b/facebook_business/adobjects/rightsmanagerdataexport.py new file mode 100644 index 000000000..f0f8212ca --- /dev/null +++ b/facebook_business/adobjects/rightsmanagerdataexport.py @@ -0,0 +1,82 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 RightsManagerDataExport( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isRightsManagerDataExport = True + super(RightsManagerDataExport, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + download_uri = 'download_uri' + export_scope = 'export_scope' + id = 'id' + name = 'name' + record_type = 'record_type' + time_range_end = 'time_range_end' + time_range_start = 'time_range_start' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=RightsManagerDataExport, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'download_uri': 'string', + 'export_scope': 'string', + 'id': 'string', + 'name': 'string', + 'record_type': 'string', + 'time_range_end': 'datetime', + 'time_range_start': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/rightsmanagerinsights.py b/facebook_business/adobjects/rightsmanagerinsights.py new file mode 100644 index 000000000..6aefad3a2 --- /dev/null +++ b/facebook_business/adobjects/rightsmanagerinsights.py @@ -0,0 +1,45 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 RightsManagerInsights( + AbstractObject, +): + + def __init__(self, api=None): + super(RightsManagerInsights, self).__init__() + self._isRightsManagerInsights = True + self._api = api + + class Field(AbstractObject.Field): + error = 'error' + error_message = 'error_message' + metadata = 'metadata' + totals = 'totals' + x_axis_breakdown = 'x_axis_breakdown' + + _field_types = { + 'error': 'string', + 'error_message': 'string', + 'metadata': 'list>', + 'totals': 'list>', + 'x_axis_breakdown': 'list>>', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/robot.py b/facebook_business/adobjects/robot.py new file mode 100644 index 000000000..9aff3cab3 --- /dev/null +++ b/facebook_business/adobjects/robot.py @@ -0,0 +1,92 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 Robot( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isRobot = True + super(Robot, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + bringup_vars = 'bringup_vars' + configurations = 'configurations' + data_center = 'data_center' + id = 'id' + init_pos = 'init_pos' + last_pos = 'last_pos' + meetup_link_hash = 'meetup_link_hash' + suite = 'suite' + target_map_image_uri = 'target_map_image_uri' + target_os_image_uri = 'target_os_image_uri' + target_sw_image_uri = 'target_sw_image_uri' + user = 'user' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Robot, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'bringup_vars': 'list>', + 'configurations': 'list>', + 'data_center': 'string', + 'id': 'string', + 'init_pos': 'list>', + 'last_pos': 'list>', + 'meetup_link_hash': 'string', + 'suite': 'string', + 'target_map_image_uri': 'string', + 'target_os_image_uri': 'string', + 'target_sw_image_uri': 'string', + 'user': 'User', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/rtbdynamicpost.py b/facebook_business/adobjects/rtbdynamicpost.py index 5ba4ece6a..c563aee57 100644 --- a/facebook_business/adobjects/rtbdynamicpost.py +++ b/facebook_business/adobjects/rtbdynamicpost.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/salesrightsinventorymanagement.py b/facebook_business/adobjects/salesrightsinventorymanagement.py new file mode 100644 index 000000000..92cea7a9b --- /dev/null +++ b/facebook_business/adobjects/salesrightsinventorymanagement.py @@ -0,0 +1,49 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 SalesRightsInventoryManagement( + AbstractObject, +): + + def __init__(self, api=None): + super(SalesRightsInventoryManagement, self).__init__() + self._isSalesRightsInventoryManagement = True + self._api = api + + class Field(AbstractObject.Field): + available_impressions = 'available_impressions' + booked_impressions = 'booked_impressions' + overbooked_impressions = 'overbooked_impressions' + supported_countries = 'supported_countries' + total_impressions = 'total_impressions' + unavailable_impressions = 'unavailable_impressions' + warning_messages = 'warning_messages' + + _field_types = { + 'available_impressions': 'int', + 'booked_impressions': 'int', + 'overbooked_impressions': 'int', + 'supported_countries': 'list', + 'total_impressions': 'int', + 'unavailable_impressions': 'int', + 'warning_messages': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/savedaudience.py b/facebook_business/adobjects/savedaudience.py index 6b5866843..b2278928d 100644 --- a/facebook_business/adobjects/savedaudience.py +++ b/facebook_business/adobjects/savedaudience.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/savedmessageresponse.py b/facebook_business/adobjects/savedmessageresponse.py index 7d18a002a..212334ab8 100644 --- a/facebook_business/adobjects/savedmessageresponse.py +++ b/facebook_business/adobjects/savedmessageresponse.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/scheduledpost.py b/facebook_business/adobjects/scheduledpost.py new file mode 100644 index 000000000..089537e12 --- /dev/null +++ b/facebook_business/adobjects/scheduledpost.py @@ -0,0 +1,72 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ScheduledPost( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isScheduledPost = True + super(ScheduledPost, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + admin_creator = 'admin_creator' + creation_time = 'creation_time' + feed_audience_description = 'feed_audience_description' + feed_targeting = 'feed_targeting' + id = 'id' + is_post_in_good_state = 'is_post_in_good_state' + message = 'message' + modified_time = 'modified_time' + og_action_summary = 'og_action_summary' + permalink_url = 'permalink_url' + place = 'place' + privacy_description = 'privacy_description' + scheduled_failure_notice = 'scheduled_failure_notice' + scheduled_publish_time = 'scheduled_publish_time' + story_token = 'story_token' + thumbnail = 'thumbnail' + video_id = 'video_id' + + _field_types = { + 'admin_creator': 'User', + 'creation_time': 'datetime', + 'feed_audience_description': 'string', + 'feed_targeting': 'Targeting', + 'id': 'string', + 'is_post_in_good_state': 'bool', + 'message': 'string', + 'modified_time': 'datetime', + 'og_action_summary': 'string', + 'permalink_url': 'string', + 'place': 'Place', + 'privacy_description': 'string', + 'scheduled_failure_notice': 'string', + 'scheduled_publish_time': 'datetime', + 'story_token': 'string', + 'thumbnail': 'string', + 'video_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/scimcompanyuserphonenumber.py b/facebook_business/adobjects/scimcompanyuserphonenumber.py new file mode 100644 index 000000000..69be4c43f --- /dev/null +++ b/facebook_business/adobjects/scimcompanyuserphonenumber.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ScimCompanyUserPhoneNumber( + AbstractObject, +): + + def __init__(self, api=None): + super(ScimCompanyUserPhoneNumber, self).__init__() + self._isScimCompanyUserPhoneNumber = True + self._api = api + + class Field(AbstractObject.Field): + number = 'number' + primary = 'primary' + type = 'type' + + _field_types = { + 'number': 'string', + 'primary': 'bool', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/securitysettings.py b/facebook_business/adobjects/securitysettings.py index 57ddc7d65..cb136608b 100644 --- a/facebook_business/adobjects/securitysettings.py +++ b/facebook_business/adobjects/securitysettings.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/serverside/action_source.py b/facebook_business/adobjects/serverside/action_source.py index e3c8e2289..6610c3c9a 100644 --- a/facebook_business/adobjects/serverside/action_source.py +++ b/facebook_business/adobjects/serverside/action_source.py @@ -60,6 +60,11 @@ class ActionSource(Enum): """ SYSTEM_GENERATED = 'system_generated' + """ + Conversion happened through a business messaging channel, such as WhatsApp or Instagram Direct. + """ + BUSINESS_MESSAGING = 'business_messaging' + """ Conversion happened in a way that is not listed. """ diff --git a/facebook_business/adobjects/serverside/app_data.py b/facebook_business/adobjects/serverside/app_data.py index 61551844c..90d24e69b 100644 --- a/facebook_business/adobjects/serverside/app_data.py +++ b/facebook_business/adobjects/serverside/app_data.py @@ -23,7 +23,6 @@ class AppData(object): param_types = { 'application_tracking_enabled': 'bool', 'advertiser_tracking_enabled': 'bool', - 'app_user_id': 'str', 'campaign_ids': 'str', 'consider_views': 'bool', 'extinfo': 'ExtendedDeviceInfo', @@ -40,7 +39,6 @@ def __init__( self, application_tracking_enabled=None, advertiser_tracking_enabled=None, - app_user_id=None, campaign_ids=None, consider_views=None, extinfo=None, @@ -57,7 +55,6 @@ def __init__( """AppData which contains app data and device information for events happening from an app""" self._application_tracking_enabled = None self._advertiser_tracking_enabled = None - self._app_user_id = None self._campaign_ids = None self._consider_views = None self._extinfo = None @@ -71,8 +68,6 @@ def __init__( if application_tracking_enabled is not None: self.application_tracking_enabled = application_tracking_enabled - if app_user_id is not None: - self.app_user_id = app_user_id if campaign_ids is not None: self.campaign_ids = campaign_ids if consider_views is not None: @@ -110,14 +105,6 @@ def advertiser_tracking_enabled(self): def advertiser_tracking_enabled(self, advertiser_tracking_enabled): self._advertiser_tracking_enabled = advertiser_tracking_enabled - @property - def app_user_id(self): - return self._app_user_id - - @app_user_id.setter - def app_user_id(self, app_user_id): - self._app_user_id = app_user_id - @property def campaign_ids(self): return self._campaign_ids @@ -199,9 +186,25 @@ def windows_attribution_id(self, windows_attribution_id): self._windows_attribution_id = windows_attribution_id def normalize(self): - extended_device_info_array = [] + normalized_payload = { + 'application_tracking_enabled': self.application_tracking_enabled, + 'advertiser_tracking_enabled': self.advertiser_tracking_enabled, + 'campaign_ids': self.campaign_ids, + 'consider_views': self.consider_views, + 'include_dwell_data': self.include_dwell_data, + 'include_video_data': self.include_video_data, + 'install_referrer': self.install_referrer, + 'installer_package': self.installer_package, + 'receipt_data': self.receipt_data, + 'url_schemes': self.url_schemes, + 'windows_attribution_id': self.windows_attribution_id + } + if self.extinfo is not None: + normalized_payload['extinfo'] = self.extinfo.normalize() + + normalized_payload = {k: v for k, v in normalized_payload.items() if v is not None} + return normalized_payload - return extended_device_info_array def to_dict(self): """Returns the model properties as a dict""" @@ -224,7 +227,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(Event, dict): + if issubclass(AppData, dict): for key, value in self.items(): result[key] = value @@ -240,7 +243,7 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, Event): + if not isinstance(other, AppData): return False return self.__dict__ == other.__dict__ diff --git a/facebook_business/adobjects/serverside/event.py b/facebook_business/adobjects/serverside/event.py index 5cf30a9d9..20ef8b795 100644 --- a/facebook_business/adobjects/serverside/event.py +++ b/facebook_business/adobjects/serverside/event.py @@ -24,6 +24,8 @@ from facebook_business.adobjects.serverside.action_source import ActionSource from facebook_business.adobjects.serverside.custom_data import CustomData from facebook_business.adobjects.serverside.user_data import UserData +from facebook_business.adobjects.serverside.app_data import AppData +from facebook_business.adobjects.serverside.messaging_channel import MessagingChannel class Event(object): @@ -35,18 +37,20 @@ class Event(object): 'event_id': 'str', 'user_data': 'UserData', 'custom_data': 'CustomData', + 'app_data': 'AppData', 'data_processing_options': 'list[str]', 'data_processing_options_country': 'int', 'data_processing_options_state': 'int', 'action_source': 'ActionSource', 'advanced_measurement_table': 'str', + 'messaging_channel': 'MessagingChannel', } def __init__(self, event_name = None, event_time = None, event_source_url = None, opt_out = None, event_id = None, user_data = None, custom_data = None, - data_processing_options = None, data_processing_options_country = None, - data_processing_options_state = None, action_source = None, advanced_measurement_table = None): - # type: (str, int, str, bool, str, UserData, CustomData, list[str], int, int, ActionSource, str) -> None + app_data = None, data_processing_options = None, data_processing_options_country = None, + data_processing_options_state = None, action_source = None, advanced_measurement_table = None, messaging_channel = None): + # type: (str, int, str, bool, str, UserData, CustomData, AppData, list[str], int, int, ActionSource, str) -> None """Conversions API Event""" self._event_name = None @@ -56,6 +60,7 @@ def __init__(self, event_name = None, event_time = None, event_source_url = None self._event_id = None self._user_data = None self._custom_data = None + self._app_data = None self._data_processing_options = None self._data_processing_options_country = None self._data_processing_options_state = None @@ -63,6 +68,7 @@ def __init__(self, event_name = None, event_time = None, event_source_url = None self._advanced_measurement_table = None self.event_name = event_name self.event_time = event_time + self._messaging_channel = None if event_source_url is not None: self.event_source_url = event_source_url if opt_out is not None: @@ -73,6 +79,8 @@ def __init__(self, event_name = None, event_time = None, event_source_url = None self.user_data = user_data if custom_data is not None: self.custom_data = custom_data + if app_data is not None: + self.app_data = app_data if data_processing_options is not None: self.data_processing_options = data_processing_options if data_processing_options_country is not None: @@ -83,6 +91,8 @@ def __init__(self, event_name = None, event_time = None, event_source_url = None self.action_source = action_source if advanced_measurement_table is not None: self.advanced_measurement_table = advanced_measurement_table + if messaging_channel is not None: + self.messaging_channel = messaging_channel @property def event_name(self): @@ -265,6 +275,27 @@ def custom_data(self, custom_data): self._custom_data = custom_data + @property + def app_data(self): + """Gets the app_data of this Event. + + :return: The app_data of this Event. + :rtype: AppData + """ + return self._app_data + + @app_data.setter + def app_data(self, app_data): + """Sets the app_data of this Event. + + :param app_data: The app_data of this Event. + :type: AppData + """ + if not isinstance(app_data, AppData): + raise TypeError('Event.app_data must be of type AppData') + + self._app_data = app_data + @property def data_processing_options(self): """Gets the data_processing_options of this Event. @@ -376,6 +407,28 @@ def advanced_measurement_table(self, advanced_measurement_table): """ self._advanced_measurement_table = advanced_measurement_table + @property + def messaging_channel(self): + """Gets the messaging_channel. + + Return the messaging channel of the event. + + :return: The messaging_channel. + :rtype: str + """ + return self._messaging_channel + + @messaging_channel.setter + def messaging_channel(self, messaging_channel): + """Sets the advanced_measurement_table. + + Allow you to specify the messaging channel of the event. + + :param messaging_channel: The messaging_channel. + :type: str + """ + self._messaging_channel = messaging_channel + def normalize(self): normalized_payload = {'event_name': self.event_name, 'event_time': self.event_time, 'event_source_url': self.event_source_url, 'opt_out': self.opt_out, @@ -390,10 +443,17 @@ def normalize(self): if self.custom_data is not None: normalized_payload['custom_data'] = self.custom_data.normalize() + if self.app_data is not None: + normalized_payload['app_data'] = self.app_data.normalize() + if self.action_source is not None: self.validate_action_source(self.action_source) normalized_payload['action_source'] = self.action_source.value + if self.messaging_channel is not None: + self.validate_messaging_channel(self.messaging_channel) + normalized_payload['messaging_channel'] = self.messaging_channel.value + normalized_payload = {k: v for k, v in normalized_payload.items() if v is not None} return normalized_payload @@ -403,6 +463,13 @@ def validate_action_source(self, action_source): 'action_source must be an ActionSource. TypeError on value: %s' % action_source ) + def validate_messaging_channel(self, messaging_channel): + if not type(messaging_channel) == MessagingChannel: + raise TypeError( + 'messaging_channel must be an messaging_channel. TypeError on value: %s' % messaging_channel + ) + + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/facebook_business/adobjects/serverside/event_request.py b/facebook_business/adobjects/serverside/event_request.py index 905aba7d9..b100f9731 100644 --- a/facebook_business/adobjects/serverside/event_request.py +++ b/facebook_business/adobjects/serverside/event_request.py @@ -282,10 +282,9 @@ def execute(self): fields=[], params=params, ) - event_response = EventResponse(events_received=response['events_received'], + return EventResponse(events_received=response['events_received'], fbtrace_id=response['fbtrace_id'], messages=response['messages']) - return event_response def execute_with_client(self, params): url = '/'.join([ diff --git a/facebook_business/adobjects/serverside/extended_device_info.py b/facebook_business/adobjects/serverside/extended_device_info.py index 7ed60b7d1..f9a4c1b8a 100644 --- a/facebook_business/adobjects/serverside/extended_device_info.py +++ b/facebook_business/adobjects/serverside/extended_device_info.py @@ -297,7 +297,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(Event, dict): + if issubclass(ExtendedDeviceInfo, dict): for key, value in self.items(): result[key] = value diff --git a/facebook_business/adobjects/pagecommerceeligibility.py b/facebook_business/adobjects/serverside/messaging_channel.py similarity index 56% rename from facebook_business/adobjects/pagecommerceeligibility.py rename to facebook_business/adobjects/serverside/messaging_channel.py index c39698985..ce0572c5d 100644 --- a/facebook_business/adobjects/pagecommerceeligibility.py +++ b/facebook_business/adobjects/serverside/messaging_channel.py @@ -18,36 +18,15 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. -from facebook_business.adobjects.abstractobject import AbstractObject +from enum import Enum -""" -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 PageCommerceEligibility( - AbstractObject, -): - - def __init__(self, api=None): - super(PageCommerceEligibility, self).__init__() - self._isPageCommerceEligibility = True - self._api = api - - class Field(AbstractObject.Field): - offsite = 'offsite' - onsite = 'onsite' - - _field_types = { - 'offsite': 'Object', - 'onsite': 'Object', - } - @classmethod - def _get_field_enum_info(cls): - field_enum_info = {} - return field_enum_info +# Used to specify which messaging channel was used. +# See https://developers.facebook.com/docs/marketing-api/conversions-api/business-messaging +class MessagingChannel(Enum): + """ + Conversion happened on WhatsApp. + """ + WHATSAPP = 'whatsapp' diff --git a/facebook_business/adobjects/serverside/tests/event_test.py b/facebook_business/adobjects/serverside/tests/event_test.py index 9042b0aed..140ace9ed 100644 --- a/facebook_business/adobjects/serverside/tests/event_test.py +++ b/facebook_business/adobjects/serverside/tests/event_test.py @@ -59,11 +59,9 @@ def test_constructor(self): app_data = AppData( application_tracking_enabled = True, advertiser_tracking_enabled = True, - app_user_id = '999999', - campaign_ids = ['100001', '100002'], + campaign_ids = "100001,100002", consider_views = True, - device_token = 'xyz', - extinfo = ext_device_info.normalize(), + extinfo = ext_device_info, include_dwell_data = True, include_video_data = True, install_referrer = 'xyz', @@ -88,6 +86,7 @@ def test_constructor(self): data_processing_options_country=data_processing_options_country, data_processing_options_state=data_processing_options_state, action_source=action_source, + app_data=app_data, ) expected_params = { 'event_name': event_name, @@ -101,8 +100,8 @@ def test_constructor(self): 'data_processing_options_country': data_processing_options_country, 'data_processing_options_state': data_processing_options_state, 'action_source': action_source.value, + 'app_data': app_data.normalize(), } - self.assertEqual(event.normalize(), expected_params) def test_action_source_validation(self): diff --git a/facebook_business/adobjects/serverside/user_data.py b/facebook_business/adobjects/serverside/user_data.py index 0325209ae..8c7598d4d 100644 --- a/facebook_business/adobjects/serverside/user_data.py +++ b/facebook_business/adobjects/serverside/user_data.py @@ -55,6 +55,8 @@ class UserData(object): 'doby': 'str', 'madid': 'str', 'anon_id': 'str', + 'ctwa_clid': 'ctwa_clid', + 'page_id': 'page_id', } def __init__( @@ -96,8 +98,10 @@ def __init__( external_ids=None, madid=None, anon_id=None, + ctwa_clid=None, + page_id=None, ): - # type: (str, str, Gender, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, list[str], list[str], list[Gender], list[str], list[str], list[str], list[str], list[str], list[str], list[str], list[str], str, str) -> None + # type: (str, str, Gender, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, str, list[str], list[str], list[Gender], list[str], list[str], list[str], list[str], list[str], list[str], list[str], list[str], str, str, str, str) -> None """UserData is a set of identifiers Facebook can use for targeted attribution""" self._emails = None @@ -126,6 +130,8 @@ def __init__( self._doby = None self._madid = None self._anon_id = None + self._ctwa_clid = None + self._page_id = None if email is not None and emails is not None: raise ValueError(UserData.multi_value_constructor_err.format('email', 'emails')) @@ -225,6 +231,10 @@ def __init__( self.madid = madid if anon_id is not None: self.anon_id = anon_id + if ctwa_clid is not None: + self.ctwa_clid = ctwa_clid + if page_id is not None: + self.page_id = page_id @property def email(self): @@ -1079,6 +1089,22 @@ def anon_id(self): def anon_id(self, anon_id): self._anon_id = anon_id + @property + def ctwa_clid(self): + return self._ctwa_clid + + @ctwa_clid.setter + def ctwa_clid(self, ctwa_clid): + self._ctwa_clid = ctwa_clid + + @property + def page_id(self): + return self._page_id + + @page_id.setter + def page_id(self, page_id): + self._page_id = page_id + def normalize(self): normalized_payload = {'em': self.__normalize_list('em', self.emails), 'ph': self.__normalize_list('ph', self.phones), @@ -1105,6 +1131,8 @@ def normalize(self): 'doby': Normalize.normalize_field('doby', self.doby), 'madid': self.madid, 'anon_id': self.anon_id, + 'ctwa_clid': self.ctwa_clid, + 'page_id': self.page_id, } if self.genders: normalized_payload['ge'] = self.__normalize_list('ge', list(map(lambda g: g.value, self.genders))) diff --git a/facebook_business/adobjects/shadowighashtag.py b/facebook_business/adobjects/shadowighashtag.py new file mode 100644 index 000000000..52be31dcf --- /dev/null +++ b/facebook_business/adobjects/shadowighashtag.py @@ -0,0 +1,136 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ShadowIGHashtag( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isShadowIGHashtag = True + super(ShadowIGHashtag, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + name = 'name' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ShadowIGHashtag, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_recent_media(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.igmedia import IGMedia + param_types = { + 'user_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/recent_media', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGMedia, + api_type='EDGE', + response_parser=ObjectParser(target_class=IGMedia, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_top_media(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.igmedia import IGMedia + param_types = { + 'user_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/top_media', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=IGMedia, + api_type='EDGE', + response_parser=ObjectParser(target_class=IGMedia, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/shadowigmediaboostedinsightsresult.py b/facebook_business/adobjects/shadowigmediaboostedinsightsresult.py new file mode 100644 index 000000000..e3a8166a4 --- /dev/null +++ b/facebook_business/adobjects/shadowigmediaboostedinsightsresult.py @@ -0,0 +1,47 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ShadowIGMediaBoostedInsightsResult( + AbstractObject, +): + + def __init__(self, api=None): + super(ShadowIGMediaBoostedInsightsResult, self).__init__() + self._isShadowIGMediaBoostedInsightsResult = True + self._api = api + + class Field(AbstractObject.Field): + description = 'description' + name = 'name' + organic_media_id = 'organic_media_id' + source_type = 'source_type' + title = 'title' + values = 'values' + + _field_types = { + 'description': 'string', + 'name': 'string', + 'organic_media_id': 'string', + 'source_type': 'string', + 'title': 'string', + 'values': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/shadowigmediabuilder.py b/facebook_business/adobjects/shadowigmediabuilder.py new file mode 100644 index 000000000..543f49b3f --- /dev/null +++ b/facebook_business/adobjects/shadowigmediabuilder.py @@ -0,0 +1,78 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ShadowIGMediaBuilder( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isShadowIGMediaBuilder = True + super(ShadowIGMediaBuilder, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + copyright_check_status = 'copyright_check_status' + id = 'id' + status = 'status' + status_code = 'status_code' + video_status = 'video_status' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ShadowIGMediaBuilder, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'copyright_check_status': 'IGVideoCopyrightCheckStatus', + 'id': 'string', + 'status': 'string', + 'status_code': 'string', + 'video_status': 'IGResumableVideoUploadStatus', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/shadowigmediacollaborators.py b/facebook_business/adobjects/shadowigmediacollaborators.py new file mode 100644 index 000000000..8099781d0 --- /dev/null +++ b/facebook_business/adobjects/shadowigmediacollaborators.py @@ -0,0 +1,44 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ShadowIGMediaCollaborators( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isShadowIGMediaCollaborators = True + super(ShadowIGMediaCollaborators, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + invite_status = 'invite_status' + username = 'username' + + _field_types = { + 'id': 'string', + 'invite_status': 'string', + 'username': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/shadowigmediaproducttags.py b/facebook_business/adobjects/shadowigmediaproducttags.py index 8dc131e7f..a73a19d18 100644 --- a/facebook_business/adobjects/shadowigmediaproducttags.py +++ b/facebook_business/adobjects/shadowigmediaproducttags.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/shadowigusercatalogproductsearch.py b/facebook_business/adobjects/shadowigusercatalogproductsearch.py new file mode 100644 index 000000000..5aacd8f8e --- /dev/null +++ b/facebook_business/adobjects/shadowigusercatalogproductsearch.py @@ -0,0 +1,51 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ShadowIGUserCatalogProductSearch( + AbstractObject, +): + + def __init__(self, api=None): + super(ShadowIGUserCatalogProductSearch, self).__init__() + self._isShadowIGUserCatalogProductSearch = True + self._api = api + + class Field(AbstractObject.Field): + image_url = 'image_url' + is_checkout_flow = 'is_checkout_flow' + merchant_id = 'merchant_id' + product_id = 'product_id' + product_name = 'product_name' + product_variants = 'product_variants' + retailer_id = 'retailer_id' + review_status = 'review_status' + + _field_types = { + 'image_url': 'string', + 'is_checkout_flow': 'bool', + 'merchant_id': 'int', + 'product_id': 'int', + 'product_name': 'string', + 'product_variants': 'list', + 'retailer_id': 'string', + 'review_status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/shadowigusercatalogproductvariant.py b/facebook_business/adobjects/shadowigusercatalogproductvariant.py new file mode 100644 index 000000000..d65d778bc --- /dev/null +++ b/facebook_business/adobjects/shadowigusercatalogproductvariant.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 ShadowIGUserCatalogProductVariant( + AbstractObject, +): + + def __init__(self, api=None): + super(ShadowIGUserCatalogProductVariant, self).__init__() + self._isShadowIGUserCatalogProductVariant = True + self._api = api + + class Field(AbstractObject.Field): + product_id = 'product_id' + variant_name = 'variant_name' + + _field_types = { + 'product_id': 'int', + 'variant_name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/shop.py b/facebook_business/adobjects/shop.py index 501478a48..b01e7fb71 100644 --- a/facebook_business/adobjects/shop.py +++ b/facebook_business/adobjects/shop.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -41,9 +27,12 @@ def __init__(self, fbid=None, parent_id=None, api=None): super(Shop, self).__init__(fbid, parent_id, api) class Field(AbstractObject.Field): + commerce_merchant_settings = 'commerce_merchant_settings' fb_sales_channel = 'fb_sales_channel' id = 'id' ig_sales_channel = 'ig_sales_channel' + is_onsite_enabled = 'is_onsite_enabled' + shop_status = 'shop_status' workspace = 'workspace' def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): @@ -77,9 +66,12 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No return request.execute() _field_types = { + 'commerce_merchant_settings': 'CommerceMerchantSettings', 'fb_sales_channel': 'Object', 'id': 'string', 'ig_sales_channel': 'Object', + 'is_onsite_enabled': 'bool', + 'shop_status': 'string', 'workspace': 'Object', } @classmethod diff --git a/facebook_business/adobjects/signalsiwlextractor.py b/facebook_business/adobjects/signalsiwlextractor.py new file mode 100644 index 000000000..8fba08ada --- /dev/null +++ b/facebook_business/adobjects/signalsiwlextractor.py @@ -0,0 +1,76 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 SignalsIWLExtractor( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isSignalsIWLExtractor = True + super(SignalsIWLExtractor, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + domain_uri = 'domain_uri' + event_type = 'event_type' + extractor_type = 'extractor_type' + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=SignalsIWLExtractor, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'domain_uri': 'string', + 'event_type': 'string', + 'extractor_type': 'string', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/singleowneradditionalprofile.py b/facebook_business/adobjects/singleowneradditionalprofile.py new file mode 100644 index 000000000..6131dfea1 --- /dev/null +++ b/facebook_business/adobjects/singleowneradditionalprofile.py @@ -0,0 +1,44 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 SingleOwnerAdditionalProfile( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isSingleOwnerAdditionalProfile = True + super(SingleOwnerAdditionalProfile, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + name = 'name' + user_name = 'user_name' + + _field_types = { + 'id': 'string', + 'name': 'string', + 'user_name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/sitelink.py b/facebook_business/adobjects/sitelink.py new file mode 100644 index 000000000..7993407e0 --- /dev/null +++ b/facebook_business/adobjects/sitelink.py @@ -0,0 +1,78 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 SiteLink( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isSiteLink = True + super(SiteLink, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + link_image_hash = 'link_image_hash' + link_title = 'link_title' + link_type = 'link_type' + link_url = 'link_url' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=SiteLink, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'link_image_hash': 'string', + 'link_title': 'string', + 'link_type': 'string', + 'link_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/slicedeventsourcegroup.py b/facebook_business/adobjects/slicedeventsourcegroup.py new file mode 100644 index 000000000..2fa0bbcb3 --- /dev/null +++ b/facebook_business/adobjects/slicedeventsourcegroup.py @@ -0,0 +1,76 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 SlicedEventSourceGroup( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isSlicedEventSourceGroup = True + super(SlicedEventSourceGroup, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + event_source_group = 'event_source_group' + filter = 'filter' + id = 'id' + name = 'name' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=SlicedEventSourceGroup, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'event_source_group': 'EventSourceGroup', + 'filter': 'string', + 'id': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/smartpixelinsights.py b/facebook_business/adobjects/smartpixelinsights.py new file mode 100644 index 000000000..587058e23 --- /dev/null +++ b/facebook_business/adobjects/smartpixelinsights.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 SmartPixelInsights( + AbstractObject, +): + + def __init__(self, api=None): + super(SmartPixelInsights, self).__init__() + self._isSmartPixelInsights = True + self._api = api + + class Field(AbstractObject.Field): + source = 'source' + stats = 'stats' + + _field_types = { + 'source': 'string', + 'stats': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/socialwifisite.py b/facebook_business/adobjects/socialwifisite.py new file mode 100644 index 000000000..6e79529e4 --- /dev/null +++ b/facebook_business/adobjects/socialwifisite.py @@ -0,0 +1,40 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 SocialWifiSite( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isSocialWifiSite = True + super(SocialWifiSite, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + + _field_types = { + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/splittestconfig.py b/facebook_business/adobjects/splittestconfig.py new file mode 100644 index 000000000..5584118d9 --- /dev/null +++ b/facebook_business/adobjects/splittestconfig.py @@ -0,0 +1,82 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 SplitTestConfig( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isSplitTestConfig = True + super(SplitTestConfig, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + budget = 'budget' + early_winner_declaration_enabled = 'early_winner_declaration_enabled' + end_time = 'end_time' + splits = 'splits' + start_time = 'start_time' + test_variable = 'test_variable' + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=SplitTestConfig, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'budget': 'int', + 'early_winner_declaration_enabled': 'bool', + 'end_time': 'datetime', + 'splits': 'list', + 'start_time': 'datetime', + 'test_variable': 'string', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/splittestwinner.py b/facebook_business/adobjects/splittestwinner.py index 5c10e473c..6bcb12d70 100644 --- a/facebook_business/adobjects/splittestwinner.py +++ b/facebook_business/adobjects/splittestwinner.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/status.py b/facebook_business/adobjects/status.py new file mode 100644 index 000000000..bc9af3fe7 --- /dev/null +++ b/facebook_business/adobjects/status.py @@ -0,0 +1,114 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 Status( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isStatus = True + super(Status, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + event = 'event' + field_from = 'from' + id = 'id' + message = 'message' + place = 'place' + updated_time = 'updated_time' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Status, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_like(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'feedback_source': 'string', + 'nectar_module': 'string', + 'notify': 'bool', + 'tracking': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/likes', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Status, + api_type='EDGE', + response_parser=ObjectParser(target_class=Status, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'event': 'Event', + 'from': 'Object', + 'id': 'string', + 'message': 'string', + 'place': 'Place', + 'updated_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/storecatalogsettings.py b/facebook_business/adobjects/storecatalogsettings.py index a4a5433fc..bfdaa1293 100644 --- a/facebook_business/adobjects/storecatalogsettings.py +++ b/facebook_business/adobjects/storecatalogsettings.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/stories.py b/facebook_business/adobjects/stories.py new file mode 100644 index 000000000..d77d22a08 --- /dev/null +++ b/facebook_business/adobjects/stories.py @@ -0,0 +1,52 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 Stories( + AbstractObject, +): + + def __init__(self, api=None): + super(Stories, self).__init__() + self._isStories = True + self._api = api + + class Field(AbstractObject.Field): + creation_time = 'creation_time' + media_id = 'media_id' + media_type = 'media_type' + post_id = 'post_id' + status = 'status' + url = 'url' + + class Status: + archived = 'ARCHIVED' + published = 'PUBLISHED' + + _field_types = { + 'creation_time': 'string', + 'media_id': 'string', + 'media_type': 'string', + 'post_id': 'string', + 'status': 'string', + 'url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Status'] = Stories.Status.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/streamfilter.py b/facebook_business/adobjects/streamfilter.py new file mode 100644 index 000000000..e0db3a08b --- /dev/null +++ b/facebook_business/adobjects/streamfilter.py @@ -0,0 +1,41 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 StreamFilter( + AbstractObject, +): + + def __init__(self, api=None): + super(StreamFilter, self).__init__() + self._isStreamFilter = True + self._api = api + + class Field(AbstractObject.Field): + filter_key = 'filter_key' + name = 'name' + type = 'type' + + _field_types = { + 'filter_key': 'string', + 'name': 'string', + 'type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/systemuser.py b/facebook_business/adobjects/systemuser.py index 6f9bcff43..87a0a57e1 100644 --- a/facebook_business/adobjects/systemuser.py +++ b/facebook_business/adobjects/systemuser.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/tab.py b/facebook_business/adobjects/tab.py index 51f02809a..e65cc3718 100644 --- a/facebook_business/adobjects/tab.py +++ b/facebook_business/adobjects/tab.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/taggablesubject.py b/facebook_business/adobjects/taggablesubject.py new file mode 100644 index 000000000..400fcdc8e --- /dev/null +++ b/facebook_business/adobjects/taggablesubject.py @@ -0,0 +1,42 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 TaggableSubject( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isTaggableSubject = True + super(TaggableSubject, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + name = 'name' + + _field_types = { + 'id': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/targeting.py b/facebook_business/adobjects/targeting.py index f49177d2e..eba803e4f 100644 --- a/facebook_business/adobjects/targeting.py +++ b/facebook_business/adobjects/targeting.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -41,6 +27,7 @@ class Field(AbstractObject.Field): adgroup_id = 'adgroup_id' age_max = 'age_max' age_min = 'age_min' + age_range = 'age_range' alternate_auto_targeting_option = 'alternate_auto_targeting_option' app_install_state = 'app_install_state' audience_network_positions = 'audience_network_positions' @@ -118,6 +105,7 @@ class Field(AbstractObject.Field): regions = 'regions' relationship_statuses = 'relationship_statuses' site_category = 'site_category' + targeting_automation = 'targeting_automation' targeting_optimization = 'targeting_optimization' targeting_relaxation_types = 'targeting_relaxation_types' user_adclusters = 'user_adclusters' @@ -141,6 +129,7 @@ class EffectiveDevicePlatforms: 'adgroup_id': 'string', 'age_max': 'unsigned int', 'age_min': 'unsigned int', + 'age_range': 'list', 'alternate_auto_targeting_option': 'string', 'app_install_state': 'string', 'audience_network_positions': 'list', @@ -218,6 +207,7 @@ class EffectiveDevicePlatforms: 'regions': 'list', 'relationship_statuses': 'list', 'site_category': 'list', + 'targeting_automation': 'TargetingAutomation', 'targeting_optimization': 'string', 'targeting_relaxation_types': 'TargetingRelaxation', 'user_adclusters': 'list', diff --git a/facebook_business/adobjects/targetingautomation.py b/facebook_business/adobjects/targetingautomation.py new file mode 100644 index 000000000..33367ac2b --- /dev/null +++ b/facebook_business/adobjects/targetingautomation.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 TargetingAutomation( + AbstractObject, +): + + def __init__(self, api=None): + super(TargetingAutomation, self).__init__() + self._isTargetingAutomation = True + self._api = api + + class Field(AbstractObject.Field): + advantage_audience = 'advantage_audience' + individual_setting = 'individual_setting' + shared_audiences = 'shared_audiences' + value_expression = 'value_expression' + + _field_types = { + 'advantage_audience': 'unsigned int', + 'individual_setting': 'Object', + 'shared_audiences': 'unsigned int', + 'value_expression': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/targetingdynamicrule.py b/facebook_business/adobjects/targetingdynamicrule.py index 215c6fd1a..354900b42 100644 --- a/facebook_business/adobjects/targetingdynamicrule.py +++ b/facebook_business/adobjects/targetingdynamicrule.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/targetinggeolocation.py b/facebook_business/adobjects/targetinggeolocation.py index d9cb3e90a..31af787c9 100644 --- a/facebook_business/adobjects/targetinggeolocation.py +++ b/facebook_business/adobjects/targetinggeolocation.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject @@ -46,7 +32,6 @@ class Field(AbstractObject.Field): geo_markets = 'geo_markets' large_geo_areas = 'large_geo_areas' location_cluster_ids = 'location_cluster_ids' - location_expansion = 'location_expansion' location_types = 'location_types' medium_geo_areas = 'medium_geo_areas' metro_areas = 'metro_areas' @@ -68,7 +53,6 @@ class Field(AbstractObject.Field): '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/facebook_business/adobjects/targetinggeolocationcity.py b/facebook_business/adobjects/targetinggeolocationcity.py index 56cfca5f0..48fdb363b 100644 --- a/facebook_business/adobjects/targetinggeolocationcity.py +++ b/facebook_business/adobjects/targetinggeolocationcity.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/targetinggeolocationcustomlocation.py b/facebook_business/adobjects/targetinggeolocationcustomlocation.py index 9f9913d40..d9e51eeda 100644 --- a/facebook_business/adobjects/targetinggeolocationcustomlocation.py +++ b/facebook_business/adobjects/targetinggeolocationcustomlocation.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/targetinggeolocationelectoraldistrict.py b/facebook_business/adobjects/targetinggeolocationelectoraldistrict.py index 873aab2c8..f3d2e2f70 100644 --- a/facebook_business/adobjects/targetinggeolocationelectoraldistrict.py +++ b/facebook_business/adobjects/targetinggeolocationelectoraldistrict.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/targetinggeolocationgeoentities.py b/facebook_business/adobjects/targetinggeolocationgeoentities.py index 84fbbad50..5776e2150 100644 --- a/facebook_business/adobjects/targetinggeolocationgeoentities.py +++ b/facebook_business/adobjects/targetinggeolocationgeoentities.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/targetinggeolocationlocationcluster.py b/facebook_business/adobjects/targetinggeolocationlocationcluster.py index d1c71c5cf..7ca227a78 100644 --- a/facebook_business/adobjects/targetinggeolocationlocationcluster.py +++ b/facebook_business/adobjects/targetinggeolocationlocationcluster.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/targetinggeolocationlocationexpansion.py b/facebook_business/adobjects/targetinggeolocationlocationexpansion.py index 896b81495..e5f25ce5f 100644 --- a/facebook_business/adobjects/targetinggeolocationlocationexpansion.py +++ b/facebook_business/adobjects/targetinggeolocationlocationexpansion.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject @@ -39,9 +25,11 @@ def __init__(self, api=None): class Field(AbstractObject.Field): allowed = 'allowed' + intent = 'intent' _field_types = { 'allowed': 'bool', + 'intent': 'string', } @classmethod def _get_field_enum_info(cls): diff --git a/facebook_business/adobjects/targetinggeolocationmarket.py b/facebook_business/adobjects/targetinggeolocationmarket.py index d3f2a0552..3446ab0bf 100644 --- a/facebook_business/adobjects/targetinggeolocationmarket.py +++ b/facebook_business/adobjects/targetinggeolocationmarket.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/targetinggeolocationplace.py b/facebook_business/adobjects/targetinggeolocationplace.py index 9a03f19ce..67f0892a9 100644 --- a/facebook_business/adobjects/targetinggeolocationplace.py +++ b/facebook_business/adobjects/targetinggeolocationplace.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/targetinggeolocationpoliticaldistrict.py b/facebook_business/adobjects/targetinggeolocationpoliticaldistrict.py index 340eca77e..b95c67185 100644 --- a/facebook_business/adobjects/targetinggeolocationpoliticaldistrict.py +++ b/facebook_business/adobjects/targetinggeolocationpoliticaldistrict.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/targetinggeolocationregion.py b/facebook_business/adobjects/targetinggeolocationregion.py index 0ae5b47e8..8471a1989 100644 --- a/facebook_business/adobjects/targetinggeolocationregion.py +++ b/facebook_business/adobjects/targetinggeolocationregion.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/targetinggeolocationzip.py b/facebook_business/adobjects/targetinggeolocationzip.py index 00788a1b5..d0d10d5fb 100644 --- a/facebook_business/adobjects/targetinggeolocationzip.py +++ b/facebook_business/adobjects/targetinggeolocationzip.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/targetingmarketingmessagechannels.py b/facebook_business/adobjects/targetingmarketingmessagechannels.py new file mode 100644 index 000000000..cc37b0f8a --- /dev/null +++ b/facebook_business/adobjects/targetingmarketingmessagechannels.py @@ -0,0 +1,37 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 TargetingMarketingMessageChannels( + AbstractObject, +): + + def __init__(self, api=None): + super(TargetingMarketingMessageChannels, self).__init__() + self._isTargetingMarketingMessageChannels = True + self._api = api + + class Field(AbstractObject.Field): + whatsapp = 'whatsapp' + + _field_types = { + 'whatsapp': 'IDName', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/targetingproductaudiencespec.py b/facebook_business/adobjects/targetingproductaudiencespec.py index 94516abad..a4c206731 100644 --- a/facebook_business/adobjects/targetingproductaudiencespec.py +++ b/facebook_business/adobjects/targetingproductaudiencespec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/targetingproductaudiencesubspec.py b/facebook_business/adobjects/targetingproductaudiencesubspec.py index d3363e5f7..3bd43ef66 100644 --- a/facebook_business/adobjects/targetingproductaudiencesubspec.py +++ b/facebook_business/adobjects/targetingproductaudiencesubspec.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/targetingprospectingaudience.py b/facebook_business/adobjects/targetingprospectingaudience.py index e53524517..1a2a9cfea 100644 --- a/facebook_business/adobjects/targetingprospectingaudience.py +++ b/facebook_business/adobjects/targetingprospectingaudience.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/targetingrelaxation.py b/facebook_business/adobjects/targetingrelaxation.py index 0da26585c..2c1111471 100644 --- a/facebook_business/adobjects/targetingrelaxation.py +++ b/facebook_business/adobjects/targetingrelaxation.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/targetingsearch.py b/facebook_business/adobjects/targetingsearch.py index 57db81fd0..87c4e48b7 100644 --- a/facebook_business/adobjects/targetingsearch.py +++ b/facebook_business/adobjects/targetingsearch.py @@ -1,23 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.api import FacebookAdsApi diff --git a/facebook_business/adobjects/targetingsentenceline.py b/facebook_business/adobjects/targetingsentenceline.py index 11363c109..47becafce 100644 --- a/facebook_business/adobjects/targetingsentenceline.py +++ b/facebook_business/adobjects/targetingsentenceline.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/textwithentities.py b/facebook_business/adobjects/textwithentities.py index 367c867e1..cad92c0ee 100644 --- a/facebook_business/adobjects/textwithentities.py +++ b/facebook_business/adobjects/textwithentities.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/thirdpartymeasurementreportdataset.py b/facebook_business/adobjects/thirdpartymeasurementreportdataset.py new file mode 100644 index 000000000..5effee56c --- /dev/null +++ b/facebook_business/adobjects/thirdpartymeasurementreportdataset.py @@ -0,0 +1,78 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ThirdPartyMeasurementReportDataset( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isThirdPartyMeasurementReportDataset = True + super(ThirdPartyMeasurementReportDataset, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + category = 'category' + id = 'id' + partner = 'partner' + product = 'product' + schema = 'schema' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ThirdPartyMeasurementReportDataset, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'category': 'string', + 'id': 'string', + 'partner': 'Business', + 'product': 'string', + 'schema': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/thirdpartypartnerliftrequest.py b/facebook_business/adobjects/thirdpartypartnerliftrequest.py new file mode 100644 index 000000000..683e12e6b --- /dev/null +++ b/facebook_business/adobjects/thirdpartypartnerliftrequest.py @@ -0,0 +1,102 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ThirdPartyPartnerLiftRequest( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isThirdPartyPartnerLiftRequest = True + super(ThirdPartyPartnerLiftRequest, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_entities = 'ad_entities' + country = 'country' + created_time = 'created_time' + description = 'description' + holdout_size = 'holdout_size' + id = 'id' + modified_time = 'modified_time' + owner_instance_id = 'owner_instance_id' + region = 'region' + status = 'status' + study_cells = 'study_cells' + study_end_time = 'study_end_time' + study_start_time = 'study_start_time' + + class Status: + created = 'CREATED' + failure = 'FAILURE' + in_progress = 'IN_PROGRESS' + scheduled = 'SCHEDULED' + success = 'SUCCESS' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ThirdPartyPartnerLiftRequest, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'ad_entities': 'list', + 'country': 'string', + 'created_time': 'datetime', + 'description': 'string', + 'holdout_size': 'float', + 'id': 'string', + 'modified_time': 'datetime', + 'owner_instance_id': 'string', + 'region': 'string', + 'status': 'Status', + 'study_cells': 'list', + 'study_end_time': 'datetime', + 'study_start_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Status'] = ThirdPartyPartnerLiftRequest.Status.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/thirdpartypartnerpanelrequest.py b/facebook_business/adobjects/thirdpartypartnerpanelrequest.py new file mode 100644 index 000000000..60abe031c --- /dev/null +++ b/facebook_business/adobjects/thirdpartypartnerpanelrequest.py @@ -0,0 +1,108 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ThirdPartyPartnerPanelRequest( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isThirdPartyPartnerPanelRequest = True + super(ThirdPartyPartnerPanelRequest, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + adentities_ids = 'adentities_ids' + country = 'country' + created_time = 'created_time' + description = 'description' + id = 'id' + modified_time = 'modified_time' + owner_instance_id = 'owner_instance_id' + owner_panel_id = 'owner_panel_id' + owner_panel_name = 'owner_panel_name' + status = 'status' + study_end_time = 'study_end_time' + study_start_time = 'study_start_time' + study_type = 'study_type' + + class Status: + created = 'CREATED' + failure = 'FAILURE' + in_progress = 'IN_PROGRESS' + scheduled = 'SCHEDULED' + success = 'SUCCESS' + + class StudyType: + brand_lift = 'BRAND_LIFT' + panel_sales_attribution = 'PANEL_SALES_ATTRIBUTION' + reach = 'REACH' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ThirdPartyPartnerPanelRequest, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'adentities_ids': 'list', + 'country': 'string', + 'created_time': 'datetime', + 'description': 'string', + 'id': 'string', + 'modified_time': 'datetime', + 'owner_instance_id': 'string', + 'owner_panel_id': 'string', + 'owner_panel_name': 'string', + 'status': 'Status', + 'study_end_time': 'datetime', + 'study_start_time': 'datetime', + 'study_type': 'StudyType', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Status'] = ThirdPartyPartnerPanelRequest.Status.__dict__.values() + field_enum_info['StudyType'] = ThirdPartyPartnerPanelRequest.StudyType.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/thirdpartypartnerpanelscheduled.py b/facebook_business/adobjects/thirdpartypartnerpanelscheduled.py new file mode 100644 index 000000000..326f4a90a --- /dev/null +++ b/facebook_business/adobjects/thirdpartypartnerpanelscheduled.py @@ -0,0 +1,109 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ThirdPartyPartnerPanelScheduled( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isThirdPartyPartnerPanelScheduled = True + super(ThirdPartyPartnerPanelScheduled, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + adentities_ids = 'adentities_ids' + cadence = 'cadence' + country = 'country' + created_time = 'created_time' + description = 'description' + end_time = 'end_time' + id = 'id' + modified_time = 'modified_time' + owner_instance_id = 'owner_instance_id' + owner_panel_id = 'owner_panel_id' + owner_panel_name = 'owner_panel_name' + start_time = 'start_time' + status = 'status' + study_type = 'study_type' + + class Status: + cancelled = 'CANCELLED' + created = 'CREATED' + finished = 'FINISHED' + ongoing = 'ONGOING' + + class StudyType: + brand_lift = 'BRAND_LIFT' + panel_sales_attribution = 'PANEL_SALES_ATTRIBUTION' + reach = 'REACH' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ThirdPartyPartnerPanelScheduled, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'adentities_ids': 'list', + 'cadence': 'string', + 'country': 'string', + 'created_time': 'datetime', + 'description': 'string', + 'end_time': 'datetime', + 'id': 'string', + 'modified_time': 'datetime', + 'owner_instance_id': 'string', + 'owner_panel_id': 'string', + 'owner_panel_name': 'string', + 'start_time': 'datetime', + 'status': 'Status', + 'study_type': 'StudyType', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Status'] = ThirdPartyPartnerPanelScheduled.Status.__dict__.values() + field_enum_info['StudyType'] = ThirdPartyPartnerPanelScheduled.StudyType.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/thirdpartypartnerviewabilityrequest.py b/facebook_business/adobjects/thirdpartypartnerviewabilityrequest.py new file mode 100644 index 000000000..445400d16 --- /dev/null +++ b/facebook_business/adobjects/thirdpartypartnerviewabilityrequest.py @@ -0,0 +1,96 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 ThirdPartyPartnerViewabilityRequest( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isThirdPartyPartnerViewabilityRequest = True + super(ThirdPartyPartnerViewabilityRequest, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + created_time = 'created_time' + description = 'description' + hour = 'hour' + id = 'id' + metric = 'metric' + modified_time = 'modified_time' + owner_instance_id = 'owner_instance_id' + platform = 'platform' + status = 'status' + total_file_count = 'total_file_count' + + class Status: + created = 'CREATED' + failure = 'FAILURE' + in_progress = 'IN_PROGRESS' + scheduled = 'SCHEDULED' + success = 'SUCCESS' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=ThirdPartyPartnerViewabilityRequest, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'created_time': 'datetime', + 'description': 'string', + 'hour': 'datetime', + 'id': 'string', + 'metric': 'string', + 'modified_time': 'datetime', + 'owner_instance_id': 'string', + 'platform': 'string', + 'status': 'Status', + 'total_file_count': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Status'] = ThirdPartyPartnerViewabilityRequest.Status.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/timesuggestion.py b/facebook_business/adobjects/timesuggestion.py new file mode 100644 index 000000000..85272ab5b --- /dev/null +++ b/facebook_business/adobjects/timesuggestion.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 TimeSuggestion( + AbstractObject, +): + + def __init__(self, api=None): + super(TimeSuggestion, self).__init__() + self._isTimeSuggestion = True + self._api = api + + class Field(AbstractObject.Field): + high_demand_periods = 'high_demand_periods' + is_enabled = 'is_enabled' + + _field_types = { + 'high_demand_periods': 'list', + 'is_enabled': 'bool', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/timezoneoffset.py b/facebook_business/adobjects/timezoneoffset.py new file mode 100644 index 000000000..5e7329523 --- /dev/null +++ b/facebook_business/adobjects/timezoneoffset.py @@ -0,0 +1,45 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 TimezoneOffset( + AbstractObject, +): + + def __init__(self, api=None): + super(TimezoneOffset, self).__init__() + self._isTimezoneOffset = True + self._api = api + + class Field(AbstractObject.Field): + abbr = 'abbr' + isdst = 'isdst' + offset = 'offset' + time = 'time' + ts = 'ts' + + _field_types = { + 'abbr': 'string', + 'isdst': 'bool', + 'offset': 'int', + 'time': 'string', + 'ts': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/trackingandconversionwithdefaults.py b/facebook_business/adobjects/trackingandconversionwithdefaults.py index 940e0a562..3ef66a404 100644 --- a/facebook_business/adobjects/trackingandconversionwithdefaults.py +++ b/facebook_business/adobjects/trackingandconversionwithdefaults.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/transactableitem.py b/facebook_business/adobjects/transactableitem.py new file mode 100644 index 000000000..bcdcf4aa5 --- /dev/null +++ b/facebook_business/adobjects/transactableitem.py @@ -0,0 +1,153 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 TransactableItem( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isTransactableItem = True + super(TransactableItem, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + action_title = 'action_title' + applinks = 'applinks' + category_specific_fields = 'category_specific_fields' + currency = 'currency' + description = 'description' + duration_time = 'duration_time' + duration_type = 'duration_type' + id = 'id' + image_fetch_status = 'image_fetch_status' + images = 'images' + order_index = 'order_index' + price = 'price' + price_type = 'price_type' + sanitized_images = 'sanitized_images' + session_type = 'session_type' + time_padding_after_end = 'time_padding_after_end' + title = 'title' + transactable_item_id = 'transactable_item_id' + url = 'url' + visibility = 'visibility' + + class ImageFetchStatus: + direct_upload = 'DIRECT_UPLOAD' + fetched = 'FETCHED' + fetch_failed = 'FETCH_FAILED' + no_status = 'NO_STATUS' + outdated = 'OUTDATED' + partial_fetch = 'PARTIAL_FETCH' + + class Visibility: + published = 'PUBLISHED' + staging = 'STAGING' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=TransactableItem, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_channels_to_integrity_status(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.catalogitemchannelstointegritystatus import CatalogItemChannelsToIntegrityStatus + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/channels_to_integrity_status', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=CatalogItemChannelsToIntegrityStatus, + api_type='EDGE', + response_parser=ObjectParser(target_class=CatalogItemChannelsToIntegrityStatus, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'action_title': 'string', + 'applinks': 'CatalogItemAppLinks', + 'category_specific_fields': 'CatalogSubVerticalList', + 'currency': 'string', + 'description': 'string', + 'duration_time': 'unsigned int', + 'duration_type': 'string', + 'id': 'string', + 'image_fetch_status': 'ImageFetchStatus', + 'images': 'list', + 'order_index': 'unsigned int', + 'price': 'string', + 'price_type': 'string', + 'sanitized_images': 'list', + 'session_type': 'string', + 'time_padding_after_end': 'unsigned int', + 'title': 'string', + 'transactable_item_id': 'string', + 'url': 'string', + 'visibility': 'Visibility', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ImageFetchStatus'] = TransactableItem.ImageFetchStatus.__dict__.values() + field_enum_info['Visibility'] = TransactableItem.Visibility.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/transaction.py b/facebook_business/adobjects/transaction.py new file mode 100644 index 000000000..207ce2942 --- /dev/null +++ b/facebook_business/adobjects/transaction.py @@ -0,0 +1,95 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 Transaction( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isTransaction = True + super(Transaction, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + account_id = 'account_id' + app_amount = 'app_amount' + billing_end_time = 'billing_end_time' + billing_reason = 'billing_reason' + billing_start_time = 'billing_start_time' + card_charge_mode = 'card_charge_mode' + charge_type = 'charge_type' + checkout_campaign_group_id = 'checkout_campaign_group_id' + credential_id = 'credential_id' + fatura_id = 'fatura_id' + id = 'id' + is_business_ec_charge = 'is_business_ec_charge' + is_funding_event = 'is_funding_event' + payment_option = 'payment_option' + product_type = 'product_type' + provider_amount = 'provider_amount' + status = 'status' + time = 'time' + tracking_id = 'tracking_id' + transaction_type = 'transaction_type' + tx_type = 'tx_type' + vat_invoice_id = 'vat_invoice_id' + + class ProductType: + cp_return_label = 'cp_return_label' + facebook_ad = 'facebook_ad' + ig_ad = 'ig_ad' + whatsapp = 'whatsapp' + workplace = 'workplace' + + # @deprecated get_endpoint function is deprecated + @classmethod + def get_endpoint(cls): + return 'transactions' + + _field_types = { + 'account_id': 'string', + 'app_amount': 'Object', + 'billing_end_time': 'unsigned int', + 'billing_reason': 'string', + 'billing_start_time': 'unsigned int', + 'card_charge_mode': 'unsigned int', + 'charge_type': 'string', + 'checkout_campaign_group_id': 'string', + 'credential_id': 'string', + 'fatura_id': 'unsigned int', + 'id': 'string', + 'is_business_ec_charge': 'bool', + 'is_funding_event': 'bool', + 'payment_option': 'string', + 'product_type': 'ProductType', + 'provider_amount': 'Object', + 'status': 'string', + 'time': 'unsigned int', + 'tracking_id': 'string', + 'transaction_type': 'string', + 'tx_type': 'unsigned int', + 'vat_invoice_id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['ProductType'] = Transaction.ProductType.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/unifiedthread.py b/facebook_business/adobjects/unifiedthread.py index a108ed83f..72a0dbcde 100644 --- a/facebook_business/adobjects/unifiedthread.py +++ b/facebook_business/adobjects/unifiedthread.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/uniqueadcreative.py b/facebook_business/adobjects/uniqueadcreative.py new file mode 100644 index 000000000..0ef1e3600 --- /dev/null +++ b/facebook_business/adobjects/uniqueadcreative.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 UniqueAdCreative( + AbstractObject, +): + + def __init__(self, api=None): + super(UniqueAdCreative, self).__init__() + self._isUniqueAdCreative = True + self._api = api + + class Field(AbstractObject.Field): + sample_creative = 'sample_creative' + visual_hash = 'visual_hash' + + _field_types = { + 'sample_creative': 'AdCreative', + 'visual_hash': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/url.py b/facebook_business/adobjects/url.py index 451a4340a..590e5c0e8 100644 --- a/facebook_business/adobjects/url.py +++ b/facebook_business/adobjects/url.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -89,7 +75,7 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure 'blacklist': 'bool', 'denylist': 'bool', 'hmac': 'string', - 'locale': 'list', + 'locale': 'list', 'scopes': 'list', 'ts': 'datetime', } diff --git a/facebook_business/adobjects/user.py b/facebook_business/adobjects/user.py index 61ad0de4e..75f59c4b4 100644 --- a/facebook_business/adobjects/user.py +++ b/facebook_business/adobjects/user.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -43,6 +29,7 @@ def __init__(self, fbid=None, parent_id=None, api=None): class Field(AbstractObject.Field): about = 'about' age_range = 'age_range' + avatar_2d_profile_picture = 'avatar_2d_profile_picture' birthday = 'birthday' community = 'community' cover = 'cover' @@ -60,6 +47,7 @@ class Field(AbstractObject.Field): install_type = 'install_type' installed = 'installed' is_guest_user = 'is_guest_user' + is_work_account = 'is_work_account' languages = 'languages' last_name = 'last_name' link = 'link' @@ -609,6 +597,37 @@ def get_assigned_ad_accounts(self, fields=None, params=None, batch=None, success self.assure_call() return request.execute() + def get_assigned_applications(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.application import Application + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/assigned_applications', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Application, + api_type='EDGE', + response_parser=ObjectParser(target_class=Application, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_assigned_business_asset_groups(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -708,6 +727,7 @@ def get_avatars(self, fields=None, params=None, batch=None, success=None, failur from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.avatar import Avatar param_types = { } enums = { @@ -718,9 +738,9 @@ def get_avatars(self, fields=None, params=None, batch=None, success=None, failur endpoint='/avatars', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=Avatar, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=Avatar, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -841,11 +861,12 @@ def create_business(self, fields=None, params=None, batch=None, success=None, fa 'survey_business_type': 'survey_business_type_enum', 'survey_num_assets': 'unsigned int', 'survey_num_people': 'unsigned int', - 'timezone_id': 'unsigned int', + 'timezone_id': 'timezone_id_enum', 'vertical': 'vertical_enum', } enums = { 'survey_business_type_enum': Business.SurveyBusinessType.__dict__.values(), + 'timezone_id_enum': Business.TimezoneId.__dict__.values(), 'vertical_enum': Business.Vertical.__dict__.values(), } request = FacebookRequest( @@ -877,10 +898,12 @@ def get_conversations(self, fields=None, params=None, batch=None, success=None, from facebook_business.adobjects.unifiedthread import UnifiedThread param_types = { 'folder': 'string', + 'platform': 'platform_enum', 'tags': 'list', 'user_id': 'string', } enums = { + 'platform_enum': UnifiedThread.Platform.__dict__.values(), } request = FacebookRequest( node_id=self['id'], @@ -1013,7 +1036,6 @@ def create_feed(self, fields=None, params=None, batch=None, success=None, failur from facebook_business.adobjects.post import Post param_types = { 'actions': 'Object', - 'adaptive_type': 'string', 'album_id': 'string', 'android_key_hash': 'string', 'animated_effect_id': 'unsigned int', @@ -1026,9 +1048,10 @@ def create_feed(self, fields=None, params=None, batch=None, success=None, failur 'audience_exp': 'bool', 'backdated_time': 'datetime', 'backdated_time_granularity': 'backdated_time_granularity_enum', + 'breaking_news': 'bool', + 'breaking_news_expiration': 'unsigned int', 'call_to_action': 'Object', 'caption': 'string', - 'checkin_entry_point': 'checkin_entry_point_enum', 'child_attachments': 'list', 'client_mutation_id': 'string', 'composer_entry_picker': 'string', @@ -1051,7 +1074,6 @@ def create_feed(self, fields=None, params=None, batch=None, success=None, failur 'formatting': 'formatting_enum', 'fun_fact_prompt_id': 'unsigned int', 'fun_fact_toastee_id': 'unsigned int', - 'has_nickname': 'bool', 'height': 'unsigned int', 'holiday_card': 'string', 'home_checkin_city_id': 'Object', @@ -1098,7 +1120,6 @@ def create_feed(self, fields=None, params=None, batch=None, success=None, failur 'publish_event_id': 'unsigned int', 'published': 'bool', 'quote': 'string', - 'react_mode_metadata': 'string', 'ref': 'list', 'referenceable_image_ids': 'list', 'referral_id': 'string', @@ -1126,7 +1147,6 @@ def create_feed(self, fields=None, params=None, batch=None, success=None, failur } enums = { 'backdated_time_granularity_enum': Post.BackdatedTimeGranularity.__dict__.values(), - 'checkin_entry_point_enum': Post.CheckinEntryPoint.__dict__.values(), 'formatting_enum': Post.Formatting.__dict__.values(), 'place_attachment_setting_enum': Post.PlaceAttachmentSetting.__dict__.values(), 'post_surfaces_blacklist_enum': Post.PostSurfacesBlacklist.__dict__.values(), @@ -1264,80 +1284,6 @@ def create_fundraiser(self, fields=None, params=None, batch=None, success=None, self.assure_call() return request.execute() - def create_game_item(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - from facebook_business.adobjects.gameitem import GameItem - param_types = { - 'action': 'action_enum', - 'app_id': 'string', - 'drop_table_id': 'string', - 'ext_id': 'string', - 'item_id': 'string', - 'quantity': 'unsigned int', - } - enums = { - 'action_enum': GameItem.Action.__dict__.values(), - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/game_items', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=GameItem, - api_type='EDGE', - response_parser=ObjectParser(target_class=GameItem, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - - def create_game_time(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): - from facebook_business.utils import api_utils - if batch is None and (success is not None or failure is not None): - api_utils.warning('`success` and `failure` callback only work for batch call.') - param_types = { - 'action': 'action_enum', - } - enums = { - 'action_enum': [ - 'END', - 'HEARTBEAT', - 'START', - ], - } - request = FacebookRequest( - node_id=self['id'], - method='POST', - endpoint='/game_times', - api=self._api, - param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, - api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), - ) - request.add_params(params) - request.add_fields(fields) - - if batch is not None: - request.add_to_batch(batch, success=success, failure=failure) - return request - elif pending: - return request - else: - self.assure_call() - return request.execute() - def get_groups(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -1901,7 +1847,6 @@ def create_photo(self, fields=None, params=None, batch=None, success=None, failu 'proxied_app_id': 'string', 'published': 'bool', 'qn': 'string', - 'scheduled_publish_time': 'unsigned int', 'spherical_metadata': 'map', 'sponsor_id': 'string', 'sponsor_relationship': 'unsigned int', @@ -1947,14 +1892,12 @@ def get_picture(self, fields=None, params=None, batch=None, success=None, failur api_utils.warning('`success` and `failure` callback only work for batch call.') from facebook_business.adobjects.profilepicturesource import ProfilePictureSource param_types = { - 'breaking_change': 'breaking_change_enum', 'height': 'int', 'redirect': 'bool', 'type': 'type_enum', 'width': 'int', } enums = { - 'breaking_change_enum': ProfilePictureSource.BreakingChange.__dict__.values(), 'type_enum': ProfilePictureSource.Type.__dict__.values(), } request = FacebookRequest( @@ -2118,7 +2061,6 @@ def create_video(self, fields=None, params=None, batch=None, success=None, failu api_utils.warning('`success` and `failure` callback only work for batch call.') from facebook_business.adobjects.advideo import AdVideo param_types = { - 'adaptive_type': 'string', 'animated_effect_id': 'unsigned int', 'application_id': 'string', 'asked_fun_fact_prompt_id': 'unsigned int', @@ -2148,7 +2090,6 @@ def create_video(self, fields=None, params=None, batch=None, success=None, failu 'fun_fact_toastee_id': 'unsigned int', 'guide': 'list>', 'guide_enabled': 'bool', - 'has_nickname': 'bool', 'holiday_card': 'string', 'initial_heading': 'unsigned int', 'initial_pitch': 'unsigned int', @@ -2170,7 +2111,6 @@ def create_video(self, fields=None, params=None, batch=None, success=None, failu 'original_projection_type': 'original_projection_type_enum', 'privacy': 'string', 'publish_event_id': 'unsigned int', - 'react_mode_metadata': 'string', 'referenced_sticker_id': 'string', 'replace_video_id': 'string', 'slideshow_spec': 'map', @@ -2229,11 +2169,12 @@ def create_video(self, fields=None, params=None, batch=None, success=None, failu _field_types = { 'about': 'string', 'age_range': 'AgeRange', + 'avatar_2d_profile_picture': 'AvatarProfilePicture', 'birthday': 'string', 'community': 'Group', 'cover': 'UserCoverPhoto', 'currency': 'Currency', - 'education': 'list', + 'education': 'list', 'email': 'string', 'favorite_athletes': 'list', 'favorite_teams': 'list', @@ -2246,6 +2187,7 @@ def create_video(self, fields=None, params=None, batch=None, success=None, failu 'install_type': 'string', 'installed': 'bool', 'is_guest_user': 'bool', + 'is_work_account': 'bool', 'languages': 'list', 'last_name': 'string', 'link': 'string', @@ -2262,7 +2204,7 @@ def create_video(self, fields=None, params=None, batch=None, success=None, failu 'profile_pic': 'string', 'quotes': 'string', 'relationship_status': 'string', - 'shared_login_upgrade_required_by': 'Object', + 'shared_login_upgrade_required_by': 'datetime', 'short_name': 'string', 'significant_other': 'User', 'sports': 'list', diff --git a/facebook_business/adobjects/useravailablecatalogs.py b/facebook_business/adobjects/useravailablecatalogs.py new file mode 100644 index 000000000..a89e692c9 --- /dev/null +++ b/facebook_business/adobjects/useravailablecatalogs.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 UserAvailableCatalogs( + AbstractObject, +): + + def __init__(self, api=None): + super(UserAvailableCatalogs, self).__init__() + self._isUserAvailableCatalogs = True + self._api = api + + class Field(AbstractObject.Field): + catalog_id = 'catalog_id' + catalog_name = 'catalog_name' + product_count = 'product_count' + shop_name = 'shop_name' + + _field_types = { + 'catalog_id': 'string', + 'catalog_name': 'string', + 'product_count': 'int', + 'shop_name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/usercontext.py b/facebook_business/adobjects/usercontext.py new file mode 100644 index 000000000..40b8544fb --- /dev/null +++ b/facebook_business/adobjects/usercontext.py @@ -0,0 +1,70 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 UserContext( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isUserContext = True + super(UserContext, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=UserContext, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/usercoverphoto.py b/facebook_business/adobjects/usercoverphoto.py index da6f270a8..d6884c84b 100644 --- a/facebook_business/adobjects/usercoverphoto.py +++ b/facebook_business/adobjects/usercoverphoto.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/userdevice.py b/facebook_business/adobjects/userdevice.py index f4ef029c0..621c15e61 100644 --- a/facebook_business/adobjects/userdevice.py +++ b/facebook_business/adobjects/userdevice.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/useridforapp.py b/facebook_business/adobjects/useridforapp.py index 0a0ee27b6..b21e64576 100644 --- a/facebook_business/adobjects/useridforapp.py +++ b/facebook_business/adobjects/useridforapp.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/useridforpage.py b/facebook_business/adobjects/useridforpage.py index 85dfd0146..1892ce85d 100644 --- a/facebook_business/adobjects/useridforpage.py +++ b/facebook_business/adobjects/useridforpage.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/userleadgendisclaimerresponse.py b/facebook_business/adobjects/userleadgendisclaimerresponse.py index 7be9c891c..88d97b7dd 100644 --- a/facebook_business/adobjects/userleadgendisclaimerresponse.py +++ b/facebook_business/adobjects/userleadgendisclaimerresponse.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/userleadgenfielddata.py b/facebook_business/adobjects/userleadgenfielddata.py index 933024b72..b1e966c4e 100644 --- a/facebook_business/adobjects/userleadgenfielddata.py +++ b/facebook_business/adobjects/userleadgenfielddata.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/usermobileconfig.py b/facebook_business/adobjects/usermobileconfig.py new file mode 100644 index 000000000..c14c72548 --- /dev/null +++ b/facebook_business/adobjects/usermobileconfig.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 UserMobileConfig( + AbstractObject, +): + + def __init__(self, api=None): + super(UserMobileConfig, self).__init__() + self._isUserMobileConfig = True + self._api = api + + class Field(AbstractObject.Field): + section_name = 'section_name' + value = 'value' + + _field_types = { + 'section_name': 'string', + 'value': 'Object', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/usernotificationseenstatedata.py b/facebook_business/adobjects/usernotificationseenstatedata.py new file mode 100644 index 000000000..5aa1af125 --- /dev/null +++ b/facebook_business/adobjects/usernotificationseenstatedata.py @@ -0,0 +1,42 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 UserNotificationSeenStateData( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isUserNotificationSeenStateData = True + super(UserNotificationSeenStateData, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + seen_state = 'seen_state' + + _field_types = { + 'id': 'string', + 'seen_state': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/userpageonetimeoptintokensettings.py b/facebook_business/adobjects/userpageonetimeoptintokensettings.py index 16f292e10..8da635234 100644 --- a/facebook_business/adobjects/userpageonetimeoptintokensettings.py +++ b/facebook_business/adobjects/userpageonetimeoptintokensettings.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/userpaymentmethodsinfo.py b/facebook_business/adobjects/userpaymentmethodsinfo.py new file mode 100644 index 000000000..9549a5774 --- /dev/null +++ b/facebook_business/adobjects/userpaymentmethodsinfo.py @@ -0,0 +1,49 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 UserPaymentMethodsInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(UserPaymentMethodsInfo, self).__init__() + self._isUserPaymentMethodsInfo = True + self._api = api + + class Field(AbstractObject.Field): + account_id = 'account_id' + available_card_types = 'available_card_types' + available_payment_methods = 'available_payment_methods' + available_payment_methods_details = 'available_payment_methods_details' + country = 'country' + currency = 'currency' + existing_payment_methods = 'existing_payment_methods' + + _field_types = { + 'account_id': 'string', + 'available_card_types': 'list', + 'available_payment_methods': 'list', + 'available_payment_methods_details': 'list', + 'country': 'string', + 'currency': 'string', + 'existing_payment_methods': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/userpaymentmobilepricepoints.py b/facebook_business/adobjects/userpaymentmobilepricepoints.py index b90a45de6..a05b380f0 100644 --- a/facebook_business/adobjects/userpaymentmobilepricepoints.py +++ b/facebook_business/adobjects/userpaymentmobilepricepoints.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/userpaymentmodulesoptions.py b/facebook_business/adobjects/userpaymentmodulesoptions.py new file mode 100644 index 000000000..3d888e604 --- /dev/null +++ b/facebook_business/adobjects/userpaymentmodulesoptions.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 UserPaymentModulesOptions( + AbstractObject, +): + + def __init__(self, api=None): + super(UserPaymentModulesOptions, self).__init__() + self._isUserPaymentModulesOptions = True + self._api = api + + class Field(AbstractObject.Field): + account_id = 'account_id' + available_payment_options = 'available_payment_options' + country = 'country' + currency = 'currency' + + _field_types = { + 'account_id': 'string', + 'available_payment_options': 'list', + 'country': 'string', + 'currency': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/usersetreportingroot.py b/facebook_business/adobjects/usersetreportingroot.py new file mode 100644 index 000000000..8bbf51358 --- /dev/null +++ b/facebook_business/adobjects/usersetreportingroot.py @@ -0,0 +1,74 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 UserSetReportingRoot( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isUserSetReportingRoot = True + super(UserSetReportingRoot, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + creation_time = 'creation_time' + id = 'id' + last_modified_time = 'last_modified_time' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=UserSetReportingRoot, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'creation_time': 'datetime', + 'id': 'string', + 'last_modified_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/valuebasedeligiblesource.py b/facebook_business/adobjects/valuebasedeligiblesource.py index f005b8ff6..b0d8826b4 100644 --- a/facebook_business/adobjects/valuebasedeligiblesource.py +++ b/facebook_business/adobjects/valuebasedeligiblesource.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/vehicle.py b/facebook_business/adobjects/vehicle.py index 1a5e0ada4..1b2202fc0 100644 --- a/facebook_business/adobjects/vehicle.py +++ b/facebook_business/adobjects/vehicle.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -293,6 +279,7 @@ def get_augmented_realities_metadata(self, fields=None, params=None, batch=None, from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.dynamicarmetadata import DynamicARMetadata param_types = { } enums = { @@ -303,9 +290,9 @@ def get_augmented_realities_metadata(self, fields=None, params=None, batch=None, endpoint='/augmented_realities_metadata', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=DynamicARMetadata, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=DynamicARMetadata, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -354,6 +341,7 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.dynamicvideometadata import DynamicVideoMetadata param_types = { } enums = { @@ -364,9 +352,9 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None endpoint='/videos_metadata', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=DynamicVideoMetadata, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=DynamicVideoMetadata, api=self._api), ) request.add_params(params) request.add_fields(fields) diff --git a/facebook_business/adobjects/vehicleoffer.py b/facebook_business/adobjects/vehicleoffer.py index 116150952..037185253 100644 --- a/facebook_business/adobjects/vehicleoffer.py +++ b/facebook_business/adobjects/vehicleoffer.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -133,6 +119,7 @@ def get_augmented_realities_metadata(self, fields=None, params=None, batch=None, from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.dynamicarmetadata import DynamicARMetadata param_types = { } enums = { @@ -143,9 +130,9 @@ def get_augmented_realities_metadata(self, fields=None, params=None, batch=None, endpoint='/augmented_realities_metadata', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=DynamicARMetadata, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=DynamicARMetadata, api=self._api), ) request.add_params(params) request.add_fields(fields) @@ -194,6 +181,7 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.dynamicvideometadata import DynamicVideoMetadata param_types = { } enums = { @@ -204,9 +192,9 @@ def get_videos_metadata(self, fields=None, params=None, batch=None, success=None endpoint='/videos_metadata', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=DynamicVideoMetadata, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=DynamicVideoMetadata, api=self._api), ) request.add_params(params) request.add_fields(fields) diff --git a/facebook_business/adobjects/videoasset.py b/facebook_business/adobjects/videoasset.py new file mode 100644 index 000000000..6ef160ead --- /dev/null +++ b/facebook_business/adobjects/videoasset.py @@ -0,0 +1,198 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 VideoAsset( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isVideoAsset = True + super(VideoAsset, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + broadcast_id = 'broadcast_id' + broadcast_planned_start_time = 'broadcast_planned_start_time' + can_viewer_edit = 'can_viewer_edit' + copyright_monitoring_status = 'copyright_monitoring_status' + created_time = 'created_time' + creator = 'creator' + description = 'description' + download_hd_url = 'download_hd_url' + download_sd_url = 'download_sd_url' + embeddable = 'embeddable' + expiration = 'expiration' + feed_type = 'feed_type' + id = 'id' + is_crossposting_eligible = 'is_crossposting_eligible' + is_crossposting_within_bm_eligible = 'is_crossposting_within_bm_eligible' + is_crossposting_within_bm_enabled = 'is_crossposting_within_bm_enabled' + is_episode = 'is_episode' + is_featured = 'is_featured' + is_live_premiere = 'is_live_premiere' + is_video_asset = 'is_video_asset' + last_added_time = 'last_added_time' + latest_creator = 'latest_creator' + latest_owned_description = 'latest_owned_description' + latest_owned_title = 'latest_owned_title' + length = 'length' + live_status = 'live_status' + no_story = 'no_story' + owner_name = 'owner_name' + owner_picture = 'owner_picture' + owner_post_state = 'owner_post_state' + permalink_url = 'permalink_url' + picture = 'picture' + posts_count = 'posts_count' + posts_ids = 'posts_ids' + posts_status = 'posts_status' + premiere_living_room_status = 'premiere_living_room_status' + published = 'published' + scheduled_publish_time = 'scheduled_publish_time' + secret = 'secret' + secure_stream_url = 'secure_stream_url' + social_actions = 'social_actions' + status = 'status' + stream_url = 'stream_url' + thumbnail_while_encoding = 'thumbnail_while_encoding' + title = 'title' + views = 'views' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=VideoAsset, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_insights(self, fields=None, params=None, is_async=False, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.insightsresult import InsightsResult + if is_async: + return self.get_insights_async(fields, params, batch, success, failure, pending) + param_types = { + 'metric': 'list', + 'period': 'period_enum', + } + enums = { + 'metric_enum': InsightsResult.Metric.__dict__.values(), + 'period_enum': InsightsResult.Period.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/insights', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=InsightsResult, + api_type='EDGE', + response_parser=ObjectParser(target_class=InsightsResult, api=self._api), + include_summary=False, + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'broadcast_id': 'string', + 'broadcast_planned_start_time': 'datetime', + 'can_viewer_edit': 'bool', + 'copyright_monitoring_status': 'string', + 'created_time': 'datetime', + 'creator': 'User', + 'description': 'string', + 'download_hd_url': 'string', + 'download_sd_url': 'string', + 'embeddable': 'bool', + 'expiration': 'Object', + 'feed_type': 'string', + 'id': 'string', + 'is_crossposting_eligible': 'bool', + 'is_crossposting_within_bm_eligible': 'bool', + 'is_crossposting_within_bm_enabled': 'bool', + 'is_episode': 'bool', + 'is_featured': 'bool', + 'is_live_premiere': 'bool', + 'is_video_asset': 'bool', + 'last_added_time': 'datetime', + 'latest_creator': 'User', + 'latest_owned_description': 'string', + 'latest_owned_title': 'string', + 'length': 'float', + 'live_status': 'string', + 'no_story': 'bool', + 'owner_name': 'string', + 'owner_picture': 'string', + 'owner_post_state': 'string', + 'permalink_url': 'string', + 'picture': 'string', + 'posts_count': 'unsigned int', + 'posts_ids': 'list', + 'posts_status': 'Object', + 'premiere_living_room_status': 'string', + 'published': 'bool', + 'scheduled_publish_time': 'datetime', + 'secret': 'bool', + 'secure_stream_url': 'string', + 'social_actions': 'bool', + 'status': 'VideoStatus', + 'stream_url': 'string', + 'thumbnail_while_encoding': 'string', + 'title': 'string', + 'views': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/videocopyright.py b/facebook_business/adobjects/videocopyright.py index 0723e3481..985c982ed 100644 --- a/facebook_business/adobjects/videocopyright.py +++ b/facebook_business/adobjects/videocopyright.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -145,6 +131,7 @@ def get_update_records(self, fields=None, params=None, batch=None, success=None, from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.mediacopyrightupdaterecord import MediaCopyrightUpdateRecord param_types = { } enums = { @@ -155,9 +142,9 @@ def get_update_records(self, fields=None, params=None, batch=None, success=None, endpoint='/update_records', api=self._api, param_checker=TypeChecker(param_types, enums), - target_class=AbstractCrudObject, + target_class=MediaCopyrightUpdateRecord, api_type='EDGE', - response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + response_parser=ObjectParser(target_class=MediaCopyrightUpdateRecord, api=self._api), ) request.add_params(params) request.add_fields(fields) diff --git a/facebook_business/adobjects/videocopyrightcheckstatus.py b/facebook_business/adobjects/videocopyrightcheckstatus.py new file mode 100644 index 000000000..50e47827d --- /dev/null +++ b/facebook_business/adobjects/videocopyrightcheckstatus.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 VideoCopyrightCheckStatus( + AbstractObject, +): + + def __init__(self, api=None): + super(VideoCopyrightCheckStatus, self).__init__() + self._isVideoCopyrightCheckStatus = True + self._api = api + + class Field(AbstractObject.Field): + matches_found = 'matches_found' + status = 'status' + + _field_types = { + 'matches_found': 'bool', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/videocopyrightconditiongroup.py b/facebook_business/adobjects/videocopyrightconditiongroup.py index b5f7671c0..d171a093e 100644 --- a/facebook_business/adobjects/videocopyrightconditiongroup.py +++ b/facebook_business/adobjects/videocopyrightconditiongroup.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/videocopyrightgeogate.py b/facebook_business/adobjects/videocopyrightgeogate.py index bac810e6e..4001eedc3 100644 --- a/facebook_business/adobjects/videocopyrightgeogate.py +++ b/facebook_business/adobjects/videocopyrightgeogate.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/videocopyrightmatch.py b/facebook_business/adobjects/videocopyrightmatch.py new file mode 100644 index 000000000..8976ac835 --- /dev/null +++ b/facebook_business/adobjects/videocopyrightmatch.py @@ -0,0 +1,107 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 VideoCopyrightMatch( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isVideoCopyrightMatch = True + super(VideoCopyrightMatch, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + created_date = 'created_date' + id = 'id' + last_modified_user = 'last_modified_user' + match_data = 'match_data' + match_status = 'match_status' + notes = 'notes' + permalink = 'permalink' + + class Action: + block = 'BLOCK' + claim_ad_earnings = 'CLAIM_AD_EARNINGS' + manual_review = 'MANUAL_REVIEW' + monitor = 'MONITOR' + request_takedown = 'REQUEST_TAKEDOWN' + + class ActionReason: + article_17_preflagging = 'ARTICLE_17_PREFLAGGING' + artist_objection = 'ARTIST_OBJECTION' + objectionable_content = 'OBJECTIONABLE_CONTENT' + premium_music_video = 'PREMIUM_MUSIC_VIDEO' + prerelease_content = 'PRERELEASE_CONTENT' + product_parameters = 'PRODUCT_PARAMETERS' + restricted_content = 'RESTRICTED_CONTENT' + unauthorized_commercial_use = 'UNAUTHORIZED_COMMERCIAL_USE' + + class MatchContentType: + audio_only = 'AUDIO_ONLY' + video_and_audio = 'VIDEO_AND_AUDIO' + video_only = 'VIDEO_ONLY' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=VideoCopyrightMatch, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'created_date': 'datetime', + 'id': 'string', + 'last_modified_user': 'User', + 'match_data': 'list', + 'match_status': 'string', + 'notes': 'string', + 'permalink': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['Action'] = VideoCopyrightMatch.Action.__dict__.values() + field_enum_info['ActionReason'] = VideoCopyrightMatch.ActionReason.__dict__.values() + field_enum_info['MatchContentType'] = VideoCopyrightMatch.MatchContentType.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/videocopyrightrule.py b/facebook_business/adobjects/videocopyrightrule.py index ce64ae360..a670434a4 100644 --- a/facebook_business/adobjects/videocopyrightrule.py +++ b/facebook_business/adobjects/videocopyrightrule.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/videocopyrightsegment.py b/facebook_business/adobjects/videocopyrightsegment.py index 4a070314e..426a7d03b 100644 --- a/facebook_business/adobjects/videocopyrightsegment.py +++ b/facebook_business/adobjects/videocopyrightsegment.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/videogroup.py b/facebook_business/adobjects/videogroup.py new file mode 100644 index 000000000..007350f90 --- /dev/null +++ b/facebook_business/adobjects/videogroup.py @@ -0,0 +1,72 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 VideoGroup( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isVideoGroup = True + super(VideoGroup, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + created_time = 'created_time' + description = 'description' + disable_reason = 'disable_reason' + id = 'id' + ig_profile_ids = 'ig_profile_ids' + is_disabled = 'is_disabled' + is_fb_video_group = 'is_fb_video_group' + last_used_time = 'last_used_time' + length = 'length' + name = 'name' + page_id = 'page_id' + page_ids = 'page_ids' + picture = 'picture' + placements = 'placements' + video_group_types = 'video_group_types' + videos = 'videos' + views = 'views' + + _field_types = { + 'created_time': 'string', + 'description': 'string', + 'disable_reason': 'string', + 'id': 'string', + 'ig_profile_ids': 'list', + 'is_disabled': 'bool', + 'is_fb_video_group': 'bool', + 'last_used_time': 'string', + 'length': 'float', + 'name': 'string', + 'page_id': 'string', + 'page_ids': 'list', + 'picture': 'string', + 'placements': 'list', + 'video_group_types': 'list', + 'videos': 'list', + 'views': 'unsigned int', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/videolist.py b/facebook_business/adobjects/videolist.py index 5e041229b..4b9f023b7 100644 --- a/facebook_business/adobjects/videolist.py +++ b/facebook_business/adobjects/videolist.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/videometricsreport.py b/facebook_business/adobjects/videometricsreport.py new file mode 100644 index 000000000..ebac17896 --- /dev/null +++ b/facebook_business/adobjects/videometricsreport.py @@ -0,0 +1,90 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 VideoMetricsReport( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isVideoMetricsReport = True + super(VideoMetricsReport, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + checksum = 'checksum' + chunks = 'chunks' + end_date = 'end_date' + id = 'id' + index = 'index' + name = 'name' + platform = 'platform' + start_date = 'start_date' + type = 'type' + upload_date = 'upload_date' + url = 'url' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=VideoMetricsReport, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'checksum': 'string', + 'chunks': 'int', + 'end_date': 'datetime', + 'id': 'string', + 'index': 'int', + 'name': 'string', + 'platform': 'string', + 'start_date': 'datetime', + 'type': 'string', + 'upload_date': 'datetime', + 'url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/videopoll.py b/facebook_business/adobjects/videopoll.py index 95205e652..778d75dcf 100644 --- a/facebook_business/adobjects/videopoll.py +++ b/facebook_business/adobjects/videopoll.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/videostats.py b/facebook_business/adobjects/videostats.py new file mode 100644 index 000000000..819f00506 --- /dev/null +++ b/facebook_business/adobjects/videostats.py @@ -0,0 +1,47 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 VideoStats( + AbstractObject, +): + + def __init__(self, api=None): + super(VideoStats, self).__init__() + self._isVideoStats = True + self._api = api + + class Field(AbstractObject.Field): + aggregate = 'aggregate' + error = 'error' + metadata = 'metadata' + time_series = 'time_series' + totals = 'totals' + x_axis_breakdown = 'x_axis_breakdown' + + _field_types = { + 'aggregate': 'list>', + 'error': 'string', + 'metadata': 'list>', + 'time_series': 'list>>', + 'totals': 'list>', + 'x_axis_breakdown': 'list>>', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/videostatus.py b/facebook_business/adobjects/videostatus.py new file mode 100644 index 000000000..35042ca38 --- /dev/null +++ b/facebook_business/adobjects/videostatus.py @@ -0,0 +1,47 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 VideoStatus( + AbstractObject, +): + + def __init__(self, api=None): + super(VideoStatus, self).__init__() + self._isVideoStatus = True + self._api = api + + class Field(AbstractObject.Field): + copyright_check_status = 'copyright_check_status' + processing_phase = 'processing_phase' + processing_progress = 'processing_progress' + publishing_phase = 'publishing_phase' + uploading_phase = 'uploading_phase' + video_status = 'video_status' + + _field_types = { + 'copyright_check_status': 'VideoCopyrightCheckStatus', + 'processing_phase': 'VideoStatusProcessingPhase', + 'processing_progress': 'unsigned int', + 'publishing_phase': 'VideoStatusPublishingPhase', + 'uploading_phase': 'VideoStatusUploadingPhase', + 'video_status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/videostatuserror.py b/facebook_business/adobjects/videostatuserror.py new file mode 100644 index 000000000..8e2bc1367 --- /dev/null +++ b/facebook_business/adobjects/videostatuserror.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 VideoStatusError( + AbstractObject, +): + + def __init__(self, api=None): + super(VideoStatusError, self).__init__() + self._isVideoStatusError = True + self._api = api + + class Field(AbstractObject.Field): + code = 'code' + message = 'message' + + _field_types = { + 'code': 'int', + 'message': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/videostatusprocessingphase.py b/facebook_business/adobjects/videostatusprocessingphase.py new file mode 100644 index 000000000..cf599ce79 --- /dev/null +++ b/facebook_business/adobjects/videostatusprocessingphase.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 VideoStatusProcessingPhase( + AbstractObject, +): + + def __init__(self, api=None): + super(VideoStatusProcessingPhase, self).__init__() + self._isVideoStatusProcessingPhase = True + self._api = api + + class Field(AbstractObject.Field): + errors = 'errors' + status = 'status' + + _field_types = { + 'errors': 'list', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/videostatuspublishingphase.py b/facebook_business/adobjects/videostatuspublishingphase.py new file mode 100644 index 000000000..6943fe36d --- /dev/null +++ b/facebook_business/adobjects/videostatuspublishingphase.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 VideoStatusPublishingPhase( + AbstractObject, +): + + def __init__(self, api=None): + super(VideoStatusPublishingPhase, self).__init__() + self._isVideoStatusPublishingPhase = True + self._api = api + + class Field(AbstractObject.Field): + errors = 'errors' + publish_status = 'publish_status' + publish_time = 'publish_time' + status = 'status' + + _field_types = { + 'errors': 'list', + 'publish_status': 'string', + 'publish_time': 'datetime', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/videostatusuploadingphase.py b/facebook_business/adobjects/videostatusuploadingphase.py new file mode 100644 index 000000000..52c23c50f --- /dev/null +++ b/facebook_business/adobjects/videostatusuploadingphase.py @@ -0,0 +1,43 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 VideoStatusUploadingPhase( + AbstractObject, +): + + def __init__(self, api=None): + super(VideoStatusUploadingPhase, self).__init__() + self._isVideoStatusUploadingPhase = True + self._api = api + + class Field(AbstractObject.Field): + bytes_transferred = 'bytes_transferred' + errors = 'errors' + source_file_size = 'source_file_size' + status = 'status' + + _field_types = { + 'bytes_transferred': 'unsigned int', + 'errors': 'list', + 'source_file_size': 'unsigned int', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/videotextquestion.py b/facebook_business/adobjects/videotextquestion.py new file mode 100644 index 000000000..a43616941 --- /dev/null +++ b/facebook_business/adobjects/videotextquestion.py @@ -0,0 +1,76 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 VideoTextQuestion( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isVideoTextQuestion = True + super(VideoTextQuestion, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + question_target_id = 'question_target_id' + question_text = 'question_text' + status = 'status' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=VideoTextQuestion, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'question_target_id': 'string', + 'question_text': 'string', + 'status': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/videothumbnail.py b/facebook_business/adobjects/videothumbnail.py index 6d0bde38e..736cda709 100644 --- a/facebook_business/adobjects/videothumbnail.py +++ b/facebook_business/adobjects/videothumbnail.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/videouploadlimits.py b/facebook_business/adobjects/videouploadlimits.py index 774f4af85..7ecf8ead7 100644 --- a/facebook_business/adobjects/videouploadlimits.py +++ b/facebook_business/adobjects/videouploadlimits.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/vidwallabroadcast.py b/facebook_business/adobjects/vidwallabroadcast.py new file mode 100644 index 000000000..2d38367a1 --- /dev/null +++ b/facebook_business/adobjects/vidwallabroadcast.py @@ -0,0 +1,72 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 VidwallaBroadcast( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isVidwallaBroadcast = True + super(VidwallaBroadcast, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + overlay_url = 'overlay_url' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=VidwallaBroadcast, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'overlay_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/voipinfo.py b/facebook_business/adobjects/voipinfo.py index f88edd10e..09a336581 100644 --- a/facebook_business/adobjects/voipinfo.py +++ b/facebook_business/adobjects/voipinfo.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/wearabledevicepublickey.py b/facebook_business/adobjects/wearabledevicepublickey.py new file mode 100644 index 000000000..892f9cadf --- /dev/null +++ b/facebook_business/adobjects/wearabledevicepublickey.py @@ -0,0 +1,84 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 WearableDevicePublicKey( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isWearableDevicePublicKey = True + super(WearableDevicePublicKey, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + base64_encoded_public_key = 'base64_encoded_public_key' + creation_time_on_device = 'creation_time_on_device' + device_uuid = 'device_uuid' + id = 'id' + key_type = 'key_type' + owner_id = 'owner_id' + product_use_case = 'product_use_case' + version = 'version' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=WearableDevicePublicKey, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'base64_encoded_public_key': 'string', + 'creation_time_on_device': 'datetime', + 'device_uuid': 'string', + 'id': 'string', + 'key_type': 'string', + 'owner_id': 'string', + 'product_use_case': 'string', + 'version': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/webapplink.py b/facebook_business/adobjects/webapplink.py index c3540935b..77de118e3 100644 --- a/facebook_business/adobjects/webapplink.py +++ b/facebook_business/adobjects/webapplink.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/webpublisher.py b/facebook_business/adobjects/webpublisher.py new file mode 100644 index 000000000..5ff128eac --- /dev/null +++ b/facebook_business/adobjects/webpublisher.py @@ -0,0 +1,44 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 WebPublisher( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isWebPublisher = True + super(WebPublisher, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + domain_url = 'domain_url' + id = 'id' + publisher_name = 'publisher_name' + + _field_types = { + 'domain_url': 'string', + 'id': 'string', + 'publisher_name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/websitecreativeassetsource.py b/facebook_business/adobjects/websitecreativeassetsource.py new file mode 100644 index 000000000..13fc2fc41 --- /dev/null +++ b/facebook_business/adobjects/websitecreativeassetsource.py @@ -0,0 +1,72 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 WebsiteCreativeAssetSource( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isWebsiteCreativeAssetSource = True + super(WebsiteCreativeAssetSource, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + source_url = 'source_url' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=WebsiteCreativeAssetSource, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'source_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/websitecreativeassetsuggestions.py b/facebook_business/adobjects/websitecreativeassetsuggestions.py new file mode 100644 index 000000000..18f68e388 --- /dev/null +++ b/facebook_business/adobjects/websitecreativeassetsuggestions.py @@ -0,0 +1,76 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 WebsiteCreativeAssetSuggestions( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isWebsiteCreativeAssetSuggestions = True + super(WebsiteCreativeAssetSuggestions, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + ad_account_id = 'ad_account_id' + extraction_status = 'extraction_status' + id = 'id' + link_url = 'link_url' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=WebsiteCreativeAssetSuggestions, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'ad_account_id': 'string', + 'extraction_status': 'string', + 'id': 'string', + 'link_url': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/whatsappbusinessaccount.py b/facebook_business/adobjects/whatsappbusinessaccount.py index 32a9a896a..a1cd58a17 100644 --- a/facebook_business/adobjects/whatsappbusinessaccount.py +++ b/facebook_business/adobjects/whatsappbusinessaccount.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -43,17 +29,22 @@ def __init__(self, fbid=None, parent_id=None, api=None): class Field(AbstractObject.Field): account_review_status = 'account_review_status' analytics = 'analytics' + auth_international_rate_eligibility = 'auth_international_rate_eligibility' business_verification_status = 'business_verification_status' country = 'country' creation_time = 'creation_time' currency = 'currency' + health_status = 'health_status' id = 'id' + is_enabled_for_insights = 'is_enabled_for_insights' + linked_commerce_account = 'linked_commerce_account' message_template_namespace = 'message_template_namespace' name = 'name' on_behalf_of_business_info = 'on_behalf_of_business_info' owner_business = 'owner_business' owner_business_info = 'owner_business_info' ownership_type = 'ownership_type' + primary_business_location = 'primary_business_location' primary_funding_id = 'primary_funding_id' purchase_order_number = 'purchase_order_number' status = 'status' @@ -61,7 +52,6 @@ class Field(AbstractObject.Field): class Tasks: develop = 'DEVELOP' - full_control = 'FULL_CONTROL' manage = 'MANAGE' manage_extensions = 'MANAGE_EXTENSIONS' manage_phone = 'MANAGE_PHONE' @@ -77,6 +67,13 @@ class Category: marketing = 'MARKETING' utility = 'UTILITY' + class DisplayFormat: + order_details = 'ORDER_DETAILS' + + class SubCategory: + order_details = 'ORDER_DETAILS' + order_status = 'ORDER_STATUS' + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -107,6 +104,37 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No self.assure_call() return request.execute() + def api_update(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'is_enabled_for_insights': 'bool', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=WhatsAppBusinessAccount, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def delete_assigned_users(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -252,10 +280,13 @@ def get_conversation_analytics(self, fields=None, params=None, batch=None, succe enums = { 'conversation_categories_enum': [ 'AUTHENTICATION', + 'AUTHENTICATION_INTERNATIONAL', 'MARKETING', + 'MARKETING_OPTIMIZED_DELIVERY', 'SERVICE', 'UNKNOWN', 'UTILITY', + 'UTILITY_FIXED_TEMPLATE', ], 'conversation_directions_enum': [ 'BUSINESS_INITIATED', @@ -309,7 +340,7 @@ def get_conversation_analytics(self, fields=None, params=None, batch=None, succe self.assure_call() return request.execute() - def get_extensions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + def get_dcc_config(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') @@ -320,7 +351,81 @@ def get_extensions(self, fields=None, params=None, batch=None, success=None, fai request = FacebookRequest( node_id=self['id'], method='GET', - endpoint='/extensions', + endpoint='/dcc_config', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_flows(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/flows', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def create_flow(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'categories': 'list', + 'clone_flow_id': 'string', + 'endpoint_uri': 'string', + 'name': 'string', + } + enums = { + 'categories_enum': [ + 'APPOINTMENT_BOOKING', + 'CONTACT_US', + 'CUSTOMER_SUPPORT', + 'LEAD_GENERATION', + 'OTHER', + 'SIGN_IN', + 'SIGN_UP', + 'SURVEY', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/flows', api=self._api, param_checker=TypeChecker(param_types, enums), target_class=AbstractCrudObject, @@ -369,6 +474,47 @@ def get_message_campaigns(self, fields=None, params=None, batch=None, success=No self.assure_call() return request.execute() + def get_message_template_previews(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'add_security_recommendation': 'bool', + 'button_types': 'list', + 'category': 'category_enum', + 'code_expiration_minutes': 'unsigned int', + 'languages': 'list', + } + enums = { + 'button_types_enum': [ + 'OTP', + ], + 'category_enum': [ + 'AUTHENTICATION', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/message_template_previews', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def delete_message_templates(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -424,6 +570,7 @@ def get_message_templates(self, fields=None, params=None, batch=None, success=No ], 'status_enum': [ 'APPROVED', + 'ARCHIVED', 'DELETED', 'DISABLED', 'IN_APPEAL', @@ -465,11 +612,18 @@ def create_message_template(self, fields=None, params=None, batch=None, success= 'category': 'category_enum', 'components': 'list', 'cta_url_link_tracking_opted_out': 'bool', + 'display_format': 'display_format_enum', 'language': 'string', + 'library_template_button_inputs': 'list', + 'library_template_name': 'string', + 'message_send_ttl_seconds': 'unsigned int', 'name': 'string', + 'sub_category': 'sub_category_enum', } enums = { 'category_enum': WhatsAppBusinessAccount.Category.__dict__.values(), + 'display_format_enum': WhatsAppBusinessAccount.DisplayFormat.__dict__.values(), + 'sub_category_enum': WhatsAppBusinessAccount.SubCategory.__dict__.values(), } request = FacebookRequest( node_id=self['id'], @@ -493,6 +647,38 @@ def create_message_template(self, fields=None, params=None, batch=None, success= self.assure_call() return request.execute() + def create_migrate_message_template(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'page_number': 'unsigned int', + 'source_waba_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/migrate_message_templates', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=WhatsAppBusinessAccount, + api_type='EDGE', + response_parser=ObjectParser(target_class=WhatsAppBusinessAccount, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_phone_numbers(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -531,6 +717,7 @@ def create_phone_number(self, fields=None, params=None, batch=None, success=None 'cc': 'string', 'migrate_phone_number': 'bool', 'phone_number': 'string', + 'preverified_id': 'string', 'verified_name': 'string', } enums = { @@ -681,6 +868,67 @@ def get_schedules(self, fields=None, params=None, batch=None, success=None, fail self.assure_call() return request.execute() + def create_set_obo_mobility_intent(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'solution_id': 'string', + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/set_obo_mobility_intent', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_solutions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/solutions', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def delete_subscribed_apps(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -773,6 +1021,51 @@ def create_subscribed_app(self, fields=None, params=None, batch=None, success=No self.assure_call() return request.execute() + def get_template_analytics(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'end': 'datetime', + 'granularity': 'granularity_enum', + 'metric_types': 'list', + 'start': 'datetime', + 'template_ids': 'list', + } + enums = { + 'granularity_enum': [ + 'DAILY', + ], + 'metric_types_enum': [ + 'CLICKED', + 'COST', + 'DELIVERED', + 'READ', + 'SENT', + ], + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/template_analytics', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=AbstractCrudObject, + api_type='EDGE', + response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def get_template_performance_metrics(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): @@ -805,20 +1098,61 @@ def get_template_performance_metrics(self, fields=None, params=None, batch=None, self.assure_call() return request.execute() + def create_upsert_message_template(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + 'category': 'category_enum', + 'components': 'list', + 'languages': 'list', + 'message_send_ttl_seconds': 'unsigned int', + 'name': 'string', + } + enums = { + 'category_enum': WhatsAppBusinessAccount.Category.__dict__.values(), + } + request = FacebookRequest( + node_id=self['id'], + method='POST', + endpoint='/upsert_message_templates', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=WhatsAppBusinessAccount, + api_type='EDGE', + response_parser=ObjectParser(target_class=WhatsAppBusinessAccount, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + _field_types = { 'account_review_status': 'string', 'analytics': 'Object', + 'auth_international_rate_eligibility': 'Object', 'business_verification_status': 'string', 'country': 'string', 'creation_time': 'int', 'currency': 'string', + 'health_status': 'WhatsAppBusinessHealthStatusForMessageSend', 'id': 'string', + 'is_enabled_for_insights': 'bool', + 'linked_commerce_account': 'CommerceMerchantSettings', 'message_template_namespace': 'string', 'name': 'string', 'on_behalf_of_business_info': 'Object', 'owner_business': 'Business', 'owner_business_info': 'Object', 'ownership_type': 'string', + 'primary_business_location': 'string', 'primary_funding_id': 'string', 'purchase_order_number': 'string', 'status': 'string', @@ -829,6 +1163,8 @@ def _get_field_enum_info(cls): field_enum_info = {} field_enum_info['Tasks'] = WhatsAppBusinessAccount.Tasks.__dict__.values() field_enum_info['Category'] = WhatsAppBusinessAccount.Category.__dict__.values() + field_enum_info['DisplayFormat'] = WhatsAppBusinessAccount.DisplayFormat.__dict__.values() + field_enum_info['SubCategory'] = WhatsAppBusinessAccount.SubCategory.__dict__.values() return field_enum_info diff --git a/facebook_business/adobjects/whatsappbusinesshealthstatus.py b/facebook_business/adobjects/whatsappbusinesshealthstatus.py new file mode 100644 index 000000000..653d438a2 --- /dev/null +++ b/facebook_business/adobjects/whatsappbusinesshealthstatus.py @@ -0,0 +1,48 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 WhatsAppBusinessHealthStatus( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isWhatsAppBusinessHealthStatus = True + super(WhatsAppBusinessHealthStatus, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + additional_info = 'additional_info' + can_send_message = 'can_send_message' + entity_type = 'entity_type' + errors = 'errors' + id = 'id' + + _field_types = { + 'additional_info': 'list', + 'can_send_message': 'string', + 'entity_type': 'string', + 'errors': 'list', + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/whatsappbusinesshealthstatusformessagesend.py b/facebook_business/adobjects/whatsappbusinesshealthstatusformessagesend.py new file mode 100644 index 000000000..b395ee5ee --- /dev/null +++ b/facebook_business/adobjects/whatsappbusinesshealthstatusformessagesend.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 WhatsAppBusinessHealthStatusForMessageSend( + AbstractObject, +): + + def __init__(self, api=None): + super(WhatsAppBusinessHealthStatusForMessageSend, self).__init__() + self._isWhatsAppBusinessHealthStatusForMessageSend = True + self._api = api + + class Field(AbstractObject.Field): + can_send_message = 'can_send_message' + entities = 'entities' + + _field_types = { + 'can_send_message': 'string', + 'entities': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/whatsappbusinesspartnerclientverificationsubmission.py b/facebook_business/adobjects/whatsappbusinesspartnerclientverificationsubmission.py new file mode 100644 index 000000000..cd858e3a8 --- /dev/null +++ b/facebook_business/adobjects/whatsappbusinesspartnerclientverificationsubmission.py @@ -0,0 +1,66 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 WhatsAppBusinessPartnerClientVerificationSubmission( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isWhatsAppBusinessPartnerClientVerificationSubmission = True + super(WhatsAppBusinessPartnerClientVerificationSubmission, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + client_business_id = 'client_business_id' + id = 'id' + rejection_reasons = 'rejection_reasons' + submitted_info = 'submitted_info' + submitted_time = 'submitted_time' + update_time = 'update_time' + verification_status = 'verification_status' + + class RejectionReasons: + address_not_matching = 'ADDRESS_NOT_MATCHING' + legal_name_not_matching = 'LEGAL_NAME_NOT_MATCHING' + none = 'NONE' + website_not_matching = 'WEBSITE_NOT_MATCHING' + + class VerificationStatus: + approved = 'APPROVED' + failed = 'FAILED' + pending = 'PENDING' + revoked = 'REVOKED' + + _field_types = { + 'client_business_id': 'string', + 'id': 'string', + 'rejection_reasons': 'list', + 'submitted_info': 'Object', + 'submitted_time': 'datetime', + 'update_time': 'datetime', + 'verification_status': 'VerificationStatus', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + field_enum_info['RejectionReasons'] = WhatsAppBusinessPartnerClientVerificationSubmission.RejectionReasons.__dict__.values() + field_enum_info['VerificationStatus'] = WhatsAppBusinessPartnerClientVerificationSubmission.VerificationStatus.__dict__.values() + return field_enum_info + + diff --git a/facebook_business/adobjects/whatsappbusinesspreverifiedphonenumber.py b/facebook_business/adobjects/whatsappbusinesspreverifiedphonenumber.py index d36e0ec93..a56abb9e7 100644 --- a/facebook_business/adobjects/whatsappbusinesspreverifiedphonenumber.py +++ b/facebook_business/adobjects/whatsappbusinesspreverifiedphonenumber.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject @@ -44,6 +30,7 @@ class Field(AbstractObject.Field): code_verification_status = 'code_verification_status' code_verification_time = 'code_verification_time' id = 'id' + owner_business = 'owner_business' phone_number = 'phone_number' verification_expiry_time = 'verification_expiry_time' @@ -112,13 +99,44 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No self.assure_call() return request.execute() + def get_partners(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.business import Business + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/partners', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=Business, + api_type='EDGE', + response_parser=ObjectParser(target_class=Business, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + def create_request_code(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): from facebook_business.utils import api_utils if batch is None and (success is not None or failure is not None): api_utils.warning('`success` and `failure` callback only work for batch call.') param_types = { 'code_method': 'code_method_enum', - 'language': 'Object', + 'language': 'string', } enums = { 'code_method_enum': [ @@ -183,6 +201,7 @@ def create_verify_code(self, fields=None, params=None, batch=None, success=None, 'code_verification_status': 'string', 'code_verification_time': 'datetime', 'id': 'string', + 'owner_business': 'Business', 'phone_number': 'string', 'verification_expiry_time': 'datetime', } diff --git a/facebook_business/adobjects/whatsappbusinessprofile.py b/facebook_business/adobjects/whatsappbusinessprofile.py index 96321c90a..a82d9dc4c 100644 --- a/facebook_business/adobjects/whatsappbusinessprofile.py +++ b/facebook_business/adobjects/whatsappbusinessprofile.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/whatsapppaymentcapabilities.py b/facebook_business/adobjects/whatsapppaymentcapabilities.py new file mode 100644 index 000000000..9497f2ca4 --- /dev/null +++ b/facebook_business/adobjects/whatsapppaymentcapabilities.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 WhatsAppPaymentCapabilities( + AbstractObject, +): + + def __init__(self, api=None): + super(WhatsAppPaymentCapabilities, self).__init__() + self._isWhatsAppPaymentCapabilities = True + self._api = api + + class Field(AbstractObject.Field): + is_enabled = 'is_enabled' + payment_capability_details = 'payment_capability_details' + + _field_types = { + 'is_enabled': 'bool', + 'payment_capability_details': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/whatsappsubscribedappsinfo.py b/facebook_business/adobjects/whatsappsubscribedappsinfo.py new file mode 100644 index 000000000..c6e772448 --- /dev/null +++ b/facebook_business/adobjects/whatsappsubscribedappsinfo.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 WhatsappSubscribedAppsInfo( + AbstractObject, +): + + def __init__(self, api=None): + super(WhatsappSubscribedAppsInfo, self).__init__() + self._isWhatsappSubscribedAppsInfo = True + self._api = api + + class Field(AbstractObject.Field): + page_whatsapp_number = 'page_whatsapp_number' + subscribed_apps = 'subscribed_apps' + + _field_types = { + 'page_whatsapp_number': 'string', + 'subscribed_apps': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/whitehatfbdlrun.py b/facebook_business/adobjects/whitehatfbdlrun.py new file mode 100644 index 000000000..d6c41f078 --- /dev/null +++ b/facebook_business/adobjects/whitehatfbdlrun.py @@ -0,0 +1,84 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 WhitehatFBDLRun( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isWhitehatFBDLRun = True + super(WhitehatFBDLRun, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + creation_time = 'creation_time' + id = 'id' + is_pinned = 'is_pinned' + note = 'note' + result = 'result' + run_code = 'run_code' + status = 'status' + user_type = 'user_type' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=WhitehatFBDLRun, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'creation_time': 'datetime', + 'id': 'string', + 'is_pinned': 'bool', + 'note': 'string', + 'result': 'list>', + 'run_code': 'string', + 'status': 'string', + 'user_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/wifiinformation.py b/facebook_business/adobjects/wifiinformation.py new file mode 100644 index 000000000..0d4c921fa --- /dev/null +++ b/facebook_business/adobjects/wifiinformation.py @@ -0,0 +1,74 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 WifiInformation( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isWifiInformation = True + super(WifiInformation, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + name = 'name' + network_access_type = 'network_access_type' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=WifiInformation, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'name': 'string', + 'network_access_type': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/windowsapplink.py b/facebook_business/adobjects/windowsapplink.py index 018f65ebd..fc297666b 100644 --- a/facebook_business/adobjects/windowsapplink.py +++ b/facebook_business/adobjects/windowsapplink.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/windowsphoneapplink.py b/facebook_business/adobjects/windowsphoneapplink.py index 17aac42a5..bc59220fd 100644 --- a/facebook_business/adobjects/windowsphoneapplink.py +++ b/facebook_business/adobjects/windowsphoneapplink.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/adobjects/withasset3d.py b/facebook_business/adobjects/withasset3d.py new file mode 100644 index 000000000..3a6301650 --- /dev/null +++ b/facebook_business/adobjects/withasset3d.py @@ -0,0 +1,70 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 WithAsset3D( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isWithAsset3D = True + super(WithAsset3D, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=WithAsset3D, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/wituser.py b/facebook_business/adobjects/wituser.py new file mode 100644 index 000000000..7495095d3 --- /dev/null +++ b/facebook_business/adobjects/wituser.py @@ -0,0 +1,44 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 WITUser( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isWITUser = True + super(WITUser, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + access_token = 'access_token' + id = 'id' + name = 'name' + + _field_types = { + 'access_token': 'string', + 'id': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/woodhengepurchasedpaygreceipt.py b/facebook_business/adobjects/woodhengepurchasedpaygreceipt.py index e9d40bb9c..1134733f4 100644 --- a/facebook_business/adobjects/woodhengepurchasedpaygreceipt.py +++ b/facebook_business/adobjects/woodhengepurchasedpaygreceipt.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject diff --git a/facebook_business/adobjects/woodhengesupporter.py b/facebook_business/adobjects/woodhengesupporter.py new file mode 100644 index 000000000..65ac3916a --- /dev/null +++ b/facebook_business/adobjects/woodhengesupporter.py @@ -0,0 +1,80 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 WoodhengeSupporter( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isWoodhengeSupporter = True + super(WoodhengeSupporter, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + creation_time = 'creation_time' + id = 'id' + is_gifted_subscription = 'is_gifted_subscription' + most_recent_subscription_time = 'most_recent_subscription_time' + number_of_months_subscribed = 'number_of_months_subscribed' + user = 'user' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=WoodhengeSupporter, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'creation_time': 'datetime', + 'id': 'string', + 'is_gifted_subscription': 'bool', + 'most_recent_subscription_time': 'datetime', + 'number_of_months_subscribed': 'unsigned int', + 'user': 'User', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/workaccesscode.py b/facebook_business/adobjects/workaccesscode.py new file mode 100644 index 000000000..c302c2baf --- /dev/null +++ b/facebook_business/adobjects/workaccesscode.py @@ -0,0 +1,39 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject + +""" +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 WorkAccessCode( + AbstractObject, +): + + def __init__(self, api=None): + super(WorkAccessCode, self).__init__() + self._isWorkAccessCode = True + self._api = api + + class Field(AbstractObject.Field): + code = 'code' + expiration_time = 'expiration_time' + + _field_types = { + 'code': 'string', + 'expiration_time': 'datetime', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/workexperience.py b/facebook_business/adobjects/workexperience.py new file mode 100644 index 000000000..c14b4e3bf --- /dev/null +++ b/facebook_business/adobjects/workexperience.py @@ -0,0 +1,88 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 WorkExperience( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isWorkExperience = True + super(WorkExperience, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + description = 'description' + employer = 'employer' + end_date = 'end_date' + field_from = 'from' + id = 'id' + location = 'location' + position = 'position' + projects = 'projects' + start_date = 'start_date' + field_with = 'with' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=WorkExperience, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'description': 'string', + 'employer': 'Page', + 'end_date': 'string', + 'from': 'User', + 'id': 'string', + 'location': 'Page', + 'position': 'Page', + 'projects': 'list', + 'start_date': 'string', + 'with': 'list', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/workskill.py b/facebook_business/adobjects/workskill.py new file mode 100644 index 000000000..898920c79 --- /dev/null +++ b/facebook_business/adobjects/workskill.py @@ -0,0 +1,103 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 WorkSkill( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isWorkSkill = True + super(WorkSkill, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + id = 'id' + name = 'name' + + def api_get(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=WorkSkill, + api_type='NODE', + response_parser=ObjectParser(reuse_object=self), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + def get_users(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False): + from facebook_business.utils import api_utils + if batch is None and (success is not None or failure is not None): + api_utils.warning('`success` and `failure` callback only work for batch call.') + from facebook_business.adobjects.user import User + param_types = { + } + enums = { + } + request = FacebookRequest( + node_id=self['id'], + method='GET', + endpoint='/users', + api=self._api, + param_checker=TypeChecker(param_types, enums), + target_class=User, + api_type='EDGE', + response_parser=ObjectParser(target_class=User, api=self._api), + ) + request.add_params(params) + request.add_fields(fields) + + if batch is not None: + request.add_to_batch(batch, success=success, failure=failure) + return request + elif pending: + return request + else: + self.assure_call() + return request.execute() + + _field_types = { + 'id': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/workuserbadges.py b/facebook_business/adobjects/workuserbadges.py new file mode 100644 index 000000000..e422b6f07 --- /dev/null +++ b/facebook_business/adobjects/workuserbadges.py @@ -0,0 +1,48 @@ +# 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. + +from facebook_business.adobjects.abstractobject import AbstractObject +from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject +from facebook_business.adobjects.objectparser import ObjectParser +from facebook_business.api import FacebookRequest +from facebook_business.typechecker import TypeChecker + +""" +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 WorkUserBadges( + AbstractCrudObject, +): + + def __init__(self, fbid=None, parent_id=None, api=None): + self._isWorkUserBadges = True + super(WorkUserBadges, self).__init__(fbid, parent_id, api) + + class Field(AbstractObject.Field): + category = 'category' + description = 'description' + icon = 'icon' + id = 'id' + name = 'name' + + _field_types = { + 'category': 'string', + 'description': 'string', + 'icon': 'string', + 'id': 'string', + 'name': 'string', + } + @classmethod + def _get_field_enum_info(cls): + field_enum_info = {} + return field_enum_info + + diff --git a/facebook_business/adobjects/workuserfrontline.py b/facebook_business/adobjects/workuserfrontline.py index e3fe0d2c9..348d79823 100644 --- a/facebook_business/adobjects/workuserfrontline.py +++ b/facebook_business/adobjects/workuserfrontline.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.adobjects.abstractobject import AbstractObject diff --git a/facebook_business/api.py b/facebook_business/api.py index d4ed973bc..bc3a8b0b7 100644 --- a/facebook_business/api.py +++ b/facebook_business/api.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. from facebook_business.session import FacebookSession from facebook_business import apiconfig @@ -114,7 +100,7 @@ def is_success(self): # Has body and no error if 'success' in json_body: return json_body['success'] - # API can retuen a success 200 when service unavailable occurs + # API can return a success 200 when service unavailable occurs return 'Service Unavailable' not in json_body elif self._http_status == http_client.NOT_MODIFIED: # ETAG Hit @@ -745,6 +731,7 @@ def execute(self): api=self._api, node_id=self._node_id, endpoint=self._endpoint, + object_parser=self._response_parser, ) cursor.load_next_page() return cursor @@ -813,7 +800,7 @@ def __init__( Args: source_object: An AbstractObject instance from which to inspect an edge. This object should have an id. - target_objects_class: Objects traverersed over will be initialized + target_objects_class: Objects traversed over will be initialized with this AbstractObject class. fields (optional): A list of fields of target_objects_class to automatically read in. @@ -923,7 +910,9 @@ def load_next_page(self): if ( 'paging' in response and 'cursors' in response['paging'] and - 'after' in response['paging']['cursors'] + 'after' in response['paging']['cursors'] and + # 'after' will always exist even if no more pages are available + 'next' in response['paging'] ): self.params['after'] = response['paging']['cursors']['after'] else: diff --git a/facebook_business/apiconfig.py b/facebook_business/apiconfig.py index 672173fd7..630bbc3e3 100644 --- a/facebook_business/apiconfig.py +++ b/facebook_business/apiconfig.py @@ -1,25 +1,11 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. ads_api_config = { - 'API_VERSION': 'v17.0', - 'SDK_VERSION': 'v17.0.4', + 'API_VERSION': 'v20.0', + 'SDK_VERSION': 'v20.0.0', 'STRICT_MODE': False } diff --git a/facebook_business/bootstrap.py b/facebook_business/bootstrap.py index eaf58e42c..1810f8811 100644 --- a/facebook_business/bootstrap.py +++ b/facebook_business/bootstrap.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. import sys import os @@ -55,9 +41,8 @@ def is_authenticated(cls): @classmethod def load_config(cls): - config_file = open(os.path.join(repo_dir, 'config.json')) - config = json.load(config_file) - config_file.close() + with open(os.path.join(repo_dir, 'config.json')) as config_file: + config = json.load(config_file) return config @classmethod diff --git a/facebook_business/crashreporter.py b/facebook_business/crashreporter.py index 1b63e4621..8884b2ff8 100644 --- a/facebook_business/crashreporter.py +++ b/facebook_business/crashreporter.py @@ -1,3 +1,9 @@ +# 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. + import sys import traceback import inspect @@ -28,7 +34,7 @@ def __init__(self, app_id, excepthook): @classmethod def enable(cls): - if cls.reporter_instance == None: + if cls.reporter_instance is None: api = FacebookAdsApi.get_default_api() cls.reporter_instance = cls(api._session.app_id, sys.excepthook) sys.excepthook = cls.reporter_instance.__exception_handler @@ -44,7 +50,7 @@ def disable(cls): @classmethod def enableLogging(cls): - if cls.logger == None: + if cls.logger is None: logging.basicConfig() cls.logger = logging.getLogger(__name__) cls.logger.setLevel(logging.INFO) diff --git a/facebook_business/docs_runner/doc_runner.py b/facebook_business/docs_runner/doc_runner.py index 3dc5841f5..868ce8b01 100644 --- a/facebook_business/docs_runner/doc_runner.py +++ b/facebook_business/docs_runner/doc_runner.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. from __future__ import print_function from __future__ import unicode_literals @@ -53,14 +39,14 @@ exec(code) except Exception as err: if isinstance(err, FacebookRequestError): - # Check if the error was trasient + # Check if the error was transient if err.api_transient_error() is True: exit_code = ExitCodesEnum.EXTERNAL_ERROR else: exit_code = ExitCodesEnum.USER_ERROR # String match for service errors. In these cases even - # if tranient flag is not set, mark it as external error + # if transient flag is not set, mark it as external error for exp in reg_exp: if re.findall(exp, err.get_message().lower()): exit_code = ExitCodesEnum.EXTERNAL_ERROR diff --git a/facebook_business/docs_runner/get_version.py b/facebook_business/docs_runner/get_version.py index 5ab8acc43..3d0de1b7b 100644 --- a/facebook_business/docs_runner/get_version.py +++ b/facebook_business/docs_runner/get_version.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. import sys import os diff --git a/facebook_business/exceptions.py b/facebook_business/exceptions.py index b53a1964c..a661923ff 100644 --- a/facebook_business/exceptions.py +++ b/facebook_business/exceptions.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. """ The exceptions module contains Exception subclasses whose instances might be diff --git a/facebook_business/exit_codes.py b/facebook_business/exit_codes.py index 077b2eb5b..6e0d84b50 100644 --- a/facebook_business/exit_codes.py +++ b/facebook_business/exit_codes.py @@ -1,23 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. class ExitCodesEnum: EXTERNAL_ERROR = 41 diff --git a/facebook_business/mixins.py b/facebook_business/mixins.py index 0fb85651a..f5da3d50a 100644 --- a/facebook_business/mixins.py +++ b/facebook_business/mixins.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. """ mixins contains attributes that objects share diff --git a/facebook_business/session.py b/facebook_business/session.py index 0e9aaa877..3dad0d9ec 100644 --- a/facebook_business/session.py +++ b/facebook_business/session.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. """ The purpose of the session module is to encapsulate authentication classes and diff --git a/facebook_business/specs.py b/facebook_business/specs.py index 5111aa21e..d4592e360 100644 --- a/facebook_business/specs.py +++ b/facebook_business/specs.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. """ specs module contains classes that help you define and create specs for use diff --git a/facebook_business/test/integration_test_runner.py b/facebook_business/test/integration_test_runner.py index b588af5d0..1681c3cd9 100755 --- a/facebook_business/test/integration_test_runner.py +++ b/facebook_business/test/integration_test_runner.py @@ -22,12 +22,13 @@ Integration test runner for the Python Facebook Business SDK. Note: - New integration test should follow the file name convention using integration_ as preffix, + New integration test should follow the file name convention using integration_ as prefix, for example, integration_adset.py. How to run: python -m facebook_business.test.integration_test_runner ''' + import os, subprocess DIRECTORY = os.path.dirname(os.path.abspath(__file__)) @@ -40,15 +41,15 @@ RUNNER = "runner" CONSTANT = "constant" -integration_tests = [] -for filename in os.listdir(DIRECTORY): - if filename.endswith(".py") \ - and filename.startswith("integration_") \ - and UTILS not in filename \ - and RUNNER not in filename \ - and CONSTANT not in filename: - integration_tests.append(filename.split(".")[0]) - +integration_tests = [ + filename.split(".")[0] + for filename in os.listdir(DIRECTORY) + if filename.endswith(".py") + and filename.startswith("integration_") + and UTILS not in filename + and RUNNER not in filename + and CONSTANT not in filename +] failed = False for test in integration_tests: diff --git a/facebook_business/test/other_docs.py b/facebook_business/test/other_docs.py index 86f50a4b0..caddb7afe 100644 --- a/facebook_business/test/other_docs.py +++ b/facebook_business/test/other_docs.py @@ -25,6 +25,7 @@ python -m facebook_business.test.other_docs ''' + import os import sys import json @@ -43,10 +44,8 @@ class InsightsDocsTestCase(DocsTestCase): pass if __name__ == '__main__': - handle = open(DocsDataStore.get('filename'), 'w') - handle.write('') - handle.close() - + with open(DocsDataStore.get('filename'), 'w') as handle: + handle.write('') try: config_file = open('./config.json') except IOError: diff --git a/facebook_business/test_config.py.dist b/facebook_business/test_config.py.dist index 2c1ad6bfd..047c36ab3 100644 --- a/facebook_business/test_config.py.dist +++ b/facebook_business/test_config.py.dist @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. # This file stores the information needed to perform integration testing # on the Python Ads SDK. diff --git a/facebook_business/typechecker.py b/facebook_business/typechecker.py index 295089d45..50c495864 100644 --- a/facebook_business/typechecker.py +++ b/facebook_business/typechecker.py @@ -1,23 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. import importlib import os @@ -52,9 +37,7 @@ def convert_string_to_prim_type(self, primitive_type, value): elif primitive_type in ("unsigned int", "int"): return int(value) elif primitive_type == "bool": - if value in ("false", "0", "null"): - return False - return True + return value not in ("false", "0", "null") elif primitive_type == "float": return float(value) elif primitive_type == "datetime": @@ -113,15 +96,19 @@ def is_type(self, value_type, value, allow_dict_as_obj=True): if not isinstance(value, list): return False sub_type = self.get_type_from_collection(value_type, 'list')[0] - return all([self.is_type(sub_type, item) for item in value]) + return all(self.is_type(sub_type, item) for item in value) if self.is_type_collection(value_type, 'map'): if not isinstance(value, dict): return False sub_types = self.get_type_from_collection(value_type, 'map') - sub_type_key = sub_types[0] - sub_type_value = sub_types[1] - return all([self.is_type(sub_type_key, k) and - self.is_type(sub_type_value, v) for k, v in value.items()]) + if len(sub_types) == 2: + sub_type_key = sub_types[0] + sub_type_value = sub_types[1] + else: + sub_type_key = 'string' + sub_type_value = sub_types[0] + return all(self.is_type(sub_type_key, k) and + self.is_type(sub_type_value, v) for k, v in value.items()) if (type(value).__name__ == value_type or hasattr(value, '_is' + value_type)): @@ -179,11 +166,13 @@ def get_typed_value(self, key, value): else: sub_type_key = 'string' sub_type_value = sub_types[0] - typed_value = dict( - (self.get_typed_value(sub_type_key, k), - self.get_typed_value(sub_type_value, v)) + typed_value = { + self.get_typed_value(sub_type_key, k): self.get_typed_value( + sub_type_value, v + ) for (k, v) in value.items() - ) + } + elif isinstance(value, dict): try: typed_value = self._create_field_object(field_type, value) diff --git a/facebook_business/utils/api_utils.py b/facebook_business/utils/api_utils.py index 6376d7c1e..2de8befb4 100644 --- a/facebook_business/utils/api_utils.py +++ b/facebook_business/utils/api_utils.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. +# 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. +# This source code is licensed under the license found in the +# LICENSE file in the root directory of this source tree. import warnings from facebook_business import apiconfig diff --git a/facebook_business/utils/urls.py b/facebook_business/utils/urls.py index 2b35496b2..0d0cbade4 100644 --- a/facebook_business/utils/urls.py +++ b/facebook_business/utils/urls.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. import six diff --git a/facebook_business/utils/version.py b/facebook_business/utils/version.py index f2a7ffae8..d6f92731e 100644 --- a/facebook_business/utils/version.py +++ b/facebook_business/utils/version.py @@ -1,22 +1,8 @@ -# Copyright 2014 Facebook, Inc. - -# 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. +# 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. """ Gets the current Facebook Python SDK version. diff --git a/facebook_business/video_uploader.py b/facebook_business/video_uploader.py index 68ee9f51c..1c9265634 100644 --- a/facebook_business/video_uploader.py +++ b/facebook_business/video_uploader.py @@ -1,22 +1,8 @@ -# Copyright 2015 Facebook, Inc. - -# 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. +# 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. """ video uploader that is used to upload video to adaccount @@ -233,7 +219,7 @@ def send_request(self, context): subcode = e.api_error_subcode() body = e.body() if subcode == 1363037: - # existing issue, try again immedidately + # existing issue, try again immediately if (body and 'error' in body and 'error_data' in body['error'] and 'start_offset' in body['error']['error_data'] and diff --git a/requirements-tests.txt b/requirements-tests.txt index 1ae2592b2..df1eda23f 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -1,2 +1 @@ -enum34; python_version < '3.4' mock >= 1.0.1 diff --git a/requirements.txt b/requirements.txt index dd9aa1580..6a9edd971 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,4 @@ requests >= 2.3.0 six >= 1.7.3 curlify >= 2.1.0 pycountry >= 19.8.18 -enum34; python_version < '3.4' aiohttp; python_version >= '3.5.3' diff --git a/setup.py b/setup.py index f51ea1fa3..e23c1d757 100644 --- a/setup.py +++ b/setup.py @@ -29,9 +29,9 @@ requirements_filename = os.path.join(this_dir, 'requirements.txt') PACKAGE_NAME = 'facebook_business' -PACKAGE_VERSION = '17.0.4+work4' +PACKAGE_VERSION = '20.0.0+work4' PACKAGE_AUTHOR = 'Facebook' -PACKAGE_AUTHOR_EMAIL = '' +PACKAGE_AUTHOR_EMAIL = 'shuotian@meta.com' PACKAGE_URL = 'https://github.com/facebook/facebook-python-business-sdk' PACKAGE_DOWNLOAD_URL = \ 'https://github.com/facebook/facebook-python-business-sdk/tarball/' + PACKAGE_VERSION